1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-27 08:52:28 +01:00

branches/experimental:

- A bunch of documentation additions/updates.
- Minor refactoring.
- Fix catching wrong exception in netentry.py
This commit is contained in:
imdano
2008-09-25 20:17:35 +00:00
parent bb1d222150
commit df0ebdb92f
11 changed files with 160 additions and 46 deletions

View File

@@ -76,28 +76,34 @@ RALINK_DRIVER = 'ralink legacy'
def SetDNS(*args, **kargs):
""" Call the wnettools SetDNS method. """
return wnettools.SetDNS(*args, **kargs)
def GetDefaultGateway(*args, **kargs):
""" Call the wnettools GetDefaultGateway method. """
return wnettools.GetDefaultGateway(*args, **kargs)
def StopDHCP(*args, **kargs):
""" Call the wnettools StopDHCP method. """
return wnettools.StopDHCP(*args, **kargs)
def GetWirelessInterfaces(*args, **kargs):
""" Call the wnettools GetWirelessInterfaces method. """
return wnettools.GetWirelessInterfaces(*args, **kargs)
def GetWiredInterfaces(*args, **kargs):
""" Call the wnettools GetWiredInterfaces method. """
return wnettools.GetWiredInterfaces(*args, **kargs)
def NeedsExternalCalls(*args, **kargs):
""" Return True, since this backend using iwconfig/ifconfig. """
return True
class Interface(wnettools.BaseInterface):
""" Control a network interface. """
def __init__(self, iface, verbose=False):
""" Initialise the object.
""" Initialize the object.
Keyword arguments:
iface -- the name of the interface

View File

@@ -83,18 +83,23 @@ SIOCETHTOOL = 0x8946
SIOCGIFFLAGS = 0x8913
def SetDNS(*args, **kargs):
""" Call the wnettools SetDNS method. """
return wnettools.SetDNS(*args, **kargs)
def GetDefaultGateway(*args, **kargs):
""" Call the wnettools GetDefaultGateway method. """
return wnettools.GetDefaultGateway(*args, **kargs)
def StopDHCP(*args, **kargs):
""" Call the wnettools StopDHCP method. """
return wnettools.StopDHCP(*args, **kargs)
def GetWirelessInterfaces(*args, **kargs):
""" Call the wnettools GetWirelessInterfaces method. """
return wnettools.GetWirelessInterfaces(*args, **kargs)
def GetWiredInterfaces(*args, **kargs):
""" Call the wnettools GetWiredInterfaces method. """
return wnettools.GetWiredInterfaces(*args, **kargs)
def get_iw_ioctl_result(iface, call):
@@ -121,6 +126,7 @@ def get_iw_ioctl_result(iface, call):
return buff.tostring()
def NeedsExternalCalls(*args, **kargs):
""" Return False, since this backend doesn't use any external apps. """
return False
@@ -535,4 +541,3 @@ class WirelessInterface(Interface, wnettools.BaseWirelessInterface):
return None
return buff.strip('\x00')