Man page - htons(3)

Packages contains this manual

Available languages:

en fr pt_BR es pl ko cs ja ru ro de

Manual

BYTEORDER

์ด ๋ฆ„
๋ผ ์ด ๋ธŒ ๋Ÿฌ ๋ฆฌ
์š” ์•ฝ
์„ค ๋ช…
์† ์„ฑ
ํ‘œ ์ค€
์ด ๋ ฅ
์ถ” ๊ฐ€ ์ฐธ ์กฐ
๋ฒˆ ์—ญ

์ด ๋ฆ„

htonl, htons, ntohl, ntohs -ํ˜ธ ์Šค ํŠธ ์™€ ๋„ค ํŠธ ์› ๋ฐ” ์ด ํŠธ ์ˆœ ์„œ ์‚ฌ ์ด ๋กœ ๊ฐ’ ๋“ค ์„ ๋ฐ” ๊พผ ๋‹ค .

๋ผ ์ด ๋ธŒ ๋Ÿฌ ๋ฆฌ

ํ‘œ ์ค€ C ๋ผ ์ด ๋ธŒ ๋Ÿฌ ๋ฆฌ ( libc , -lc )

์š” ์•ฝ

#include <arpa/inet.h>

uint32_t htonl(uint32_t hostlong );
uint16_t htons(uint16_t
hostshort );

uint32_t ntohl(uint32_t netlong );
uint16_t ntohs(uint16_t
netshort );

์„ค ๋ช…

The htonl () function converts the unsigned integer hostlong from host byte order to network byte order.

The htons () function converts the unsigned short integer hostshort from host byte order to network byte order.

The ntohl () function converts the unsigned integer netlong from network byte order to host byte order.

The ntohs () function converts the unsigned short integer netshort from network byte order to host byte order.

i386์— ์„œ , ํ˜ธ ์Šค ํŠธ ๋ฐ” ์ด ํŠธ ์ˆœ ์„œ ๋Š” Least Significant Byte๊ฐ€ ์•ž ์— ์˜ค ๊ณ  , ๋ฐ˜ ๋ฉด ์— Internet์— ์„œ ์‚ฌ ์šฉ ๋˜ ๊ณ  ์žˆ ๋Š” ๋„ค ํŠธ ์› ๋ฐ” ์ด ํŠธ ์ˆœ ์„œ ๋Š” Most Significant Byte๊ฐ€ ์•ž ์— ์˜จ ๋‹ค .

์† ์„ฑ

์ด ์„น ์…˜ ์— ์„œ ์‚ฌ ์šฉ ๋˜ ๋Š” ์šฉ ์–ด ์— ๋Œ€ ํ•œ ์„ค ๋ช… ์€ attributes (7)์„ ์ฐธ ์กฐ ํ•˜ ์‹ญ ์‹œ ์˜ค .

Image grohtml-4018263-1.png

ํ‘œ ์ค€

POSIX.1-2008.

์ด ๋ ฅ

POSIX.1-2001.

์ถ” ๊ฐ€ ์ฐธ ์กฐ

bswap (3), endian (3), gethostbyname (3), getservent (3)

๋ฒˆ ์—ญ

์ด ๋งค ๋‰ด ์–ผ ํŽ˜ ์ด ์ง€ ์˜ ํ•œ ๊ตญ ์–ด ๋ฒˆ ์—ญ ์€ ๋‹ค ์Œ ์— ์˜ ํ•ด ํŽธ ์ง‘ ๋˜ ์—ˆ ์Šต ๋‹ˆ ๋‹ค : ์ • ๊ฐ• ํ›ˆ <skyeyes@soback.kornet.net>

์ด ๋ฒˆ ์—ญ ์€ ๋ฌด ๋ฃŒ ๋ฌธ ์„œ ์ž… ๋‹ˆ ๋‹ค . ์ € ์ž‘ ๊ถŒ ์กฐ ๊ฑด ์— ๋Œ€ ํ•ด ์„œ ๋Š” GNU General Public License ๋ฒ„ ์ „ 3 ์ด ์ƒ ์„ ์ฝ ์œผ ์‹ญ ์‹œ ์˜ค . ์ฑ… ์ž„ ์ด ์—† ์Šต ๋‹ˆ ๋‹ค .

์ด ๋งค ๋‰ด ์–ผ ํŽ˜ ์ด ์ง€ ์˜ ๋ฒˆ ์—ญ ์— ์„œ ์˜ค ๋ฅ˜ ๋ฅผ ๋ฐœ ๊ฒฌ ํ•˜ ๋ฉด translation-team-ko@googlegroups.com ๋กœ ์ด ๋ฉ” ์ผ ์„ ๋ณด ๋‚ด ์ฃผ ์‹ญ ์‹œ ์˜ค .