|
|
#include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h>in_addr_t htonl(in_addr_t hostlong);
in_port_t htons(in_port_t hostshort);
in_addr_t ntohl(in_addr_t netlong);
in_port_t ntohs(in_port_t netshort);
These routines are most often used in conjunction with Internet addresses and ports as returned by gethostent(3N) and getservent(3N).