def next_ip(ip):
 ip2int = (lambda ipstr: struct.unpack('!I', socket.inet_aton(ipstr))[0])
 int2ip = (lambda n: socket.inet_ntoa(struct.pack('!I', n)))
 return int2ip((ip2int(ip) + 1))

def next_ip ( ip ) : ip2int = ( lambda ipstr : struct . unpack ( '!I' , socket . inet_aton ( ipstr ) ) [ 0 ] ) int2ip = ( lambda n : socket . inet_ntoa ( struct . pack ( '!I' , n ) ) ) return int2ip ( ( ip2int ( ip ) + 1 ) )
return the next ip address following the given ip address .