change IP type into in_addr_t, add socket functions in transport.c