ipaddr = int(''.join([ '%02x' % int(x) for x in ip.split('.') ]), 16)