def net2range(network):
 (addr, mask) = network.split('/')
 addr = ip2int(addr)
 if ('.' in mask):
  mask = ip2int(mask)
 else:
  mask = int2mask(int(mask))
 start = (addr & mask)
 stop = int2ip(((start + 4294967295) - mask))
 start = int2ip(start)
 return (start, stop)

def net2range ( network ) : ( addr , mask ) = network . split ( '/' ) addr = ip2int ( addr ) if ( '.' in mask ) : mask = ip2int ( mask ) else : mask = int2mask ( int ( mask ) ) start = ( addr & mask ) stop = int2ip ( ( ( start + 4294967295 ) - mask ) ) start = int2ip ( start ) return ( start , stop )
converts a network to a tuple .