BYTEORDER

Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Å´º¾ó (3)
Updated: 1993³â 4¿ù 15ÀÏ
Index
Return to Main Contents
 

À̸§

htonl, htons, ntohl, ntohs -È£½ºÆ®¿Í ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­ »çÀÌ·Î °ªµéÀ» ¹Ù²Û´Ù.  

»ç¿ë¹ý

#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);
 

¼³¸í

htonl() ÇÔ¼ö´Â long Á¤¼öÇü hostlongÀ» È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼­¿¡¼­ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­·Î ¹Ù²Û´Ù.

htons() ÇÔ¼ö´Â short Á¤¼öÇü hostshortÀ» È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼­¿¡¼­ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­·Î ¹Ù²Û´Ù.

ntohl() ÇÔ¼ö´Â long Á¤¼öÇü netlong¸¦ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­¿¡¼­ È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼­·Î ¹Ù²Û´Ù.

ntohs() ÇÔ¼ö´Â short Á¤¼öÇü netshort¸¦ ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­¿¡¼­ È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼­·Î ¹Ù²Û´Ù.

i80x86¿¡¼­, È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼­´Â Least Significant Byte°¡ ¾Õ¿¡ ¿À°í, ¹Ý¸é¿¡ Internet¿¡¼­ »ç¿ëµÇ°í ÀÖ´Â ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­´Â Most Significant Byte°¡ ¾Õ¿¡ ¿Â´Ù.  

ȣȯ

BSD 4.3  

°ü·Ã Ç׸ñ

gethostbyname(3), getservent(3)  

¿ªÀÚ

Á¤°­ÈÆ <skyeyes@soback.kornet.net>, 2001³â 4¿ù 30ÀÏ


 

Index

À̸§
»ç¿ë¹ý
¼³¸í
ȣȯ
°ü·Ã Ç׸ñ
¿ªÀÚ

This document was created by man2html, using the manual pages.
Time: 08:07:01 GMT, March 25, 2004