Commit 31107f28 authored by Federico Sismondi's avatar Federico Sismondi

small fixes on opentun module

parent f27cef9a
......@@ -7,8 +7,6 @@ Acknowledgements to :
"""
from __future__ import *
from . import arrow_down, arrow_up
from . import messages
......@@ -588,8 +586,7 @@ class OpenTunWindows(TunBase):
def get_tap_control_code(cls, request, method):
return cls.get_ctl_code(34, request, method, 0)
TAP_IOCTL_SET_MEDIA_STATUS = get_tap_control_code(6, 0)
TAP_IOCTL_CONFIG_TUN = get_tap_control_code(10, 0)
# Key in the Windows registry where to find all network interfaces (don't change, this is always the same)
ADAPTER_KEY = r'SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
......@@ -599,6 +596,9 @@ class OpenTunWindows(TunBase):
def __init__(self, *args, **kwargs):
self.TAP_IOCTL_SET_MEDIA_STATUS = self.get_tap_control_code(6, 0)
self.TAP_IOCTL_CONFIG_TUN = self.get_tap_control_code(10, 0)
# log
log.info("create instance")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment