diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/byteorder.3 | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/lib/libc/net/byteorder.3 b/src/lib/libc/net/byteorder.3 index 3bb154b08a..e3b7972160 100644 --- a/src/lib/libc/net/byteorder.3 +++ b/src/lib/libc/net/byteorder.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: byteorder.3,v 1.10 2003/09/21 10:50:15 fgsch Exp $ | 1 | .\" $OpenBSD: byteorder.3,v 1.11 2003/09/21 18:11:27 fgsch Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -35,19 +35,14 @@ | |||
35 | .Nm htons , | 35 | .Nm htons , |
36 | .Nm ntohl , | 36 | .Nm ntohl , |
37 | .Nm ntohs , | 37 | .Nm ntohs , |
38 | .Nm htobe64 , | ||
39 | .Nm htobe32 , | 38 | .Nm htobe32 , |
40 | .Nm htobe16 , | 39 | .Nm htobe16 , |
41 | .Nm betoh64 , | ||
42 | .Nm betoh32 , | 40 | .Nm betoh32 , |
43 | .Nm betoh16 , | 41 | .Nm betoh16 , |
44 | .Nm htole64 , | ||
45 | .Nm htole32 , | 42 | .Nm htole32 , |
46 | .Nm htole16 , | 43 | .Nm htole16 , |
47 | .Nm letoh64 , | ||
48 | .Nm letoh32 , | 44 | .Nm letoh32 , |
49 | .Nm letoh16 , | 45 | .Nm letoh16 , |
50 | .Nm swap64 , | ||
51 | .Nm swap32 , | 46 | .Nm swap32 , |
52 | .Nm swap16 | 47 | .Nm swap16 |
53 | .Nd convert values between different byte orderings | 48 | .Nd convert values between different byte orderings |
@@ -62,38 +57,28 @@ | |||
62 | .Fn ntohl "u_int32_t net32" | 57 | .Fn ntohl "u_int32_t net32" |
63 | .Ft u_int16_t | 58 | .Ft u_int16_t |
64 | .Fn ntohs "u_int16_t net16" | 59 | .Fn ntohs "u_int16_t net16" |
65 | .Ft u_int64_t | ||
66 | .Fn htobe64 "u_int64_t host64" | ||
67 | .Ft u_int32_t | 60 | .Ft u_int32_t |
68 | .Fn htobe32 "u_int32_t host32" | 61 | .Fn htobe32 "u_int32_t host32" |
69 | .Ft u_int16_t | 62 | .Ft u_int16_t |
70 | .Fn htobe16 "u_int16_t host16" | 63 | .Fn htobe16 "u_int16_t host16" |
71 | .Ft u_int64_t | ||
72 | .Fn betoh64 "u_int64_t big64" | ||
73 | .Ft u_int32_t | 64 | .Ft u_int32_t |
74 | .Fn betoh32 "u_int32_t big32" | 65 | .Fn betoh32 "u_int32_t big32" |
75 | .Ft u_int16_t | 66 | .Ft u_int16_t |
76 | .Fn betoh16 "u_int16_t big16" | 67 | .Fn betoh16 "u_int16_t big16" |
77 | .Ft u_int64_t | ||
78 | .Fn htole64 "u_int64_t host64" | ||
79 | .Ft u_int32_t | 68 | .Ft u_int32_t |
80 | .Fn htole32 "u_int32_t host32" | 69 | .Fn htole32 "u_int32_t host32" |
81 | .Ft u_int16_t | 70 | .Ft u_int16_t |
82 | .Fn htole16 "u_int16_t host16" | 71 | .Fn htole16 "u_int16_t host16" |
83 | .Ft u_int64_t | ||
84 | .Fn letoh64 "u_int64_t little64" | ||
85 | .Ft u_int32_t | 72 | .Ft u_int32_t |
86 | .Fn letoh32 "u_int32_t little32" | 73 | .Fn letoh32 "u_int32_t little32" |
87 | .Ft u_int16_t | 74 | .Ft u_int16_t |
88 | .Fn letoh16 "u_int16_t little16" | 75 | .Fn letoh16 "u_int16_t little16" |
89 | .Ft u_int64_t | ||
90 | .Fn swap64 "u_int32_t val64" | ||
91 | .Ft u_int32_t | 76 | .Ft u_int32_t |
92 | .Fn swap32 "u_int32_t val32" | 77 | .Fn swap32 "u_int32_t val32" |
93 | .Ft u_int16_t | 78 | .Ft u_int16_t |
94 | .Fn swap16 "u_int16_t val16" | 79 | .Fn swap16 "u_int16_t val16" |
95 | .Sh DESCRIPTION | 80 | .Sh DESCRIPTION |
96 | These routines convert 16, 32 and 64-bit quantities between different | 81 | These routines convert 16- and 32-bit quantities between different |
97 | byte orderings. | 82 | byte orderings. |
98 | The | 83 | The |
99 | .Dq swap | 84 | .Dq swap |
@@ -132,8 +117,6 @@ Short (16-bit, used in conjunction with forms involving | |||
132 | 16-bit. | 117 | 16-bit. |
133 | .It 32 | 118 | .It 32 |
134 | 32-bit. | 119 | 32-bit. |
135 | .It 64 | ||
136 | 64-bit. | ||
137 | .El | 120 | .El |
138 | .Pp | 121 | .Pp |
139 | The swap functions are of the form: swap{size}. | 122 | The swap functions are of the form: swap{size}. |
@@ -166,7 +149,7 @@ The functions involving either | |||
166 | or | 149 | or |
167 | .Dq swap | 150 | .Dq swap |
168 | use the numbers | 151 | use the numbers |
169 | 16, 32 and 64 for specifying the bitwidth of the quantities they operate on. | 152 | 16 and 32 for specifying the bitwidth of the quantities they operate on. |
170 | Currently all supported architectures are either big- or little-endian | 153 | Currently all supported architectures are either big- or little-endian |
171 | so either the | 154 | so either the |
172 | .Dq be | 155 | .Dq be |