This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use those functions to enumerate all interfaces available on the system using Python. | |
# found on <http://code.activestate.com/recipes/439093/#c1> | |
import socket | |
import fcntl | |
import struct | |
import array | |
def all_interfaces(): | |
max_possible = 128 # arbitrary. raise if needed. |