#ifndef _UTILITY_H #define _UTILITY_H #include #include #include #include "types.h" uint16 htons( unsigned short hostshort); /* htons function converts a unsigned short from host to TCP/IP network byte order (which is big-endian).*/ uint32 htonl(unsigned long hostlong); /* htonl function converts a unsigned long from host to TCP/IP network byte order (which is big-endian). */ uint32 ntohs(unsigned short netshort); /* ntohs function converts a unsigned short from TCP/IP network byte order to host byte order (which is little-endian on Intel processors). */ uint32 ntohl(unsigned long netlong); /* ntohl function converts a u_long from TCP/IP network order to host byte order (which is little-endian on Intel processors). */ #endif