#include <netinet/in.h> unsigned long int htonl(unsigned long int hostlong); unsigned short int htons(unsigned short int hostshort); unsigned long int ntohl(unsigned long int netlong); unsigned short int ntohs(unsigned short int netshort);
htons() ÇÔ¼ö´Â short Á¤¼öÇü hostshortÀ» È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼¿¡¼ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼·Î ¹Ù²Û´Ù.
ntohl() ÇÔ¼ö´Â long Á¤¼öÇü netlong¸¦ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼¿¡¼ È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼·Î ¹Ù²Û´Ù.
ntohs() ÇÔ¼ö´Â short Á¤¼öÇü netshort¸¦ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼¿¡¼ È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼·Î ¹Ù²Û´Ù.
i80x86¿¡¼, È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼´Â Least Significant Byte°¡ ¾Õ¿¡ ¿À°í, ¹Ý¸é¿¡ Internet¿¡¼ »ç¿ëµÇ°í ÀÖ´Â ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼´Â Most Significant Byte°¡ ¾Õ¿¡ ¿Â´Ù.