Print this page
10229 Some man pages have incorrect cross-references
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/byteorder.3c
+++ new/usr/src/man/man3c/byteorder.3c
1 1 .\"
2 2 .\" The contents of this file are subject to the terms of the
3 3 .\" Common Development and Distribution License (the "License").
4 4 .\" You may not use this file except in compliance with the License.
5 5 .\"
6 6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7 7 .\" or http://www.opensolaris.org/os/licensing.
8 8 .\" See the License for the specific language governing permissions
9 9 .\" and limitations under the License.
10 10 .\"
11 11 .\" When distributing Covered Code, include this CDDL HEADER in each
12 12 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13 13 .\" If applicable, add the following below this CDDL HEADER, with the
14 14 .\" fields enclosed by brackets "[]" replaced with your own identifying
15 15 .\" information: Portions Copyright [yyyy] [name of copyright owner]
16 16 .\"
17 17 .\"
18 18 .\" Copyright 1989 AT&T
19 19 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
20 20 .\" Copyright 2018 Nexenta Systems, Inc.
21 21 .\"
22 22 .Dd August 2, 2018
23 23 .Dt BYTEORDER 3C
24 24 .Os
25 25 .Sh NAME
26 26 .Nm byteorder ,
27 27 .Nm htonl ,
28 28 .Nm htonll ,
29 29 .Nm htons ,
30 30 .Nm ntohl ,
31 31 .Nm ntohll ,
32 32 .Nm ntohs
33 33 .Nd convert values between host and network byte order
34 34 .Sh LIBRARY
35 35 .Lb libc
36 36 .Sh SYNOPSIS
37 37 .In sys/types.h
38 38 .In netinet/in.h
39 39 .In inttypes.h
40 40 .Ft uint32_t
41 41 .Fo htonl
42 42 .Fa "uint32_t hostlong"
43 43 .Fc
44 44 .Ft uint64_t
45 45 .Fo htonll
46 46 .Fa "uint64_t hostlonglong"
47 47 .Fc
48 48 .Ft uint16_t
49 49 .Fo htons
50 50 .Fa "uint16_t hostshort"
51 51 .Fc
52 52 .Ft uint32_t
53 53 .Fo ntohl
54 54 .Fa "uint32_t netlong"
55 55 .Fc
56 56 .Ft uint64_t
57 57 .Fo ntohll
58 58 .Fa "uint64_t netlonglong"
59 59 .Fc
60 60 .Ft uint16_t
61 61 .Fo ntohs
62 62 .Fa "uint16_t netshort"
63 63 .Fc
64 64 .Sh DESCRIPTION
65 65 These functions convert 16-bit, 32-bit, and 64-bit quantities between network
66 66 byte order and host byte order.
67 67 On some architectures these routines are defined as
↓ open down ↓ |
67 lines elided |
↑ open up ↑ |
68 68 .Dv NULL
69 69 macros in the include file
70 70 .In netinet/in.h .
71 71 On other architectures, the routines are functional when the host byte order is
72 72 different from network byte order.
73 73 .Pp
74 74 These functions are most often used in conjunction with Internet addresses and
75 75 ports as returned by
76 76 .Xr gethostent 3NSL
77 77 and
78 -.Xr getservent 3NSL .
78 +.Xr getservent 3SOCKET .
79 79 .Sh MT-LEVEL
80 80 .Sy Safe
81 81 .Sh SEE ALSO
82 82 .Xr inet.h 3HEAD ,
83 83 .Xr gethostent 3NSL ,
84 -.Xr getservent 3NSL ,
84 +.Xr getservent 3SOCKET ,
85 85 .Xr attributes 5 ,
86 86 .Xr byteorder 5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX