Annotated edit history of
ntohs(3) version 1, including all changes.
View license author blame.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
BYTEORDER |
|
|
2 |
!!!BYTEORDER |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
CONFORMING TO |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
htonl, htons, ntohl, ntohs - convert values between host and network byte order |
|
|
13 |
!!SYNOPSIS |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
__#include |
|
|
17 |
__ ''hostlong''__); |
|
|
18 |
unsigned short int htons(unsigned short int__ ''hostshort''__); |
|
|
19 |
unsigned long int ntohl(unsigned long int__ ''netlong''__); |
|
|
20 |
unsigned short int ntohs(unsigned short int__ ''netshort''__); |
|
|
21 |
__ |
|
|
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
The __htonl()__ function converts the long integer |
|
|
26 |
''hostlong'' from host byte order to network byte |
|
|
27 |
order. |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
The __htons()__ function converts the short integer |
|
|
31 |
''hostshort'' from host byte order to network byte |
|
|
32 |
order. |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
The __ntohl()__ function converts the long integer |
|
|
36 |
''netlong'' from network byte order to host byte |
|
|
37 |
order. |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
The __ntohs()__ function converts the short integer |
|
|
41 |
''netshort'' from network byte order to host byte |
|
|
42 |
order. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
On the i80x86 the host byte order is Least Significant Byte |
|
|
46 |
first, whereas the network byte order, as used on the |
|
|
47 |
Internet, is Most Significant Byte first. |
|
|
48 |
!!CONFORMING TO |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
BSD 4.3 |
|
|
52 |
!!SEE ALSO |
|
|
53 |
|
|
|
54 |
|
|
|
55 |
gethostbyname(3), getservent(3) |
|
|
56 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.