def ipv4_to_int(ip):
 return struct.unpack('!I', addrconv.ipv4.text_to_bin(ip))[0]

def ipv4_to_int ( ip ) : return struct . unpack ( '!I' , addrconv . ipv4 . text_to_bin ( ip ) ) [ 0 ]
converts human readable ipv4 string to int type representation .