1 #!/usr/bin/env python 2 3 import os,time 4 import array,fcntl,struct,socket 5 6 def check_net(): 7 ifname = "eth1" 8 buff = array.array('i', [0x0000000a, 0x00000000]) 9 addr, length = buff.buffer_info() 10 arg = struct.pack("Pi", addr, length) 11 data = (ifname + '