some code about network/IP in C