|
|
|
@ -179,6 +179,7 @@ def getRouteTable(onlyIface=[]):
|
|
|
|
|
yield (network,dict(zip(routeParams[0::2],routeParams[1::2])))
|
|
|
|
|
|
|
|
|
|
def getInterfaces():
|
|
|
|
|
"""Get available interfaces"""
|
|
|
|
|
return filter(lambda x:x != "lo",
|
|
|
|
|
listDirectory('/sys/class/net'))
|
|
|
|
|
"""Get available interfaces (discard which hasn't device)"""
|
|
|
|
|
sysNet = "/sys/class/net"
|
|
|
|
|
return filter(lambda x:path.exists(path.join(sysNet,x,"device")),
|
|
|
|
|
listDirectory(sysNet))
|
|
|
|
|