def clib_net_host_u16(value):
value = int(value)
if value < 0 or value > 65535:
return 0
return int(struct.unpack('>I', struct.pack('i', value))[0]/65536)
