Print this page
9842 man page typos and spelling


 236 and big-endian and little-endian specifically.
 237 While these functions are similar to those in
 238 .Xr byteorder 3C ,
 239 they more explicitly cover different data conversions.
 240 Like them, these functions operate on either 16-bit, 32-bit, or 64-bit values.
 241 When converting from big-endian, to the host's endianness, the functions
 242 begin with
 243 .Sy betoh .
 244 If instead, one is converting data from the host's native endianness to
 245 another, then it starts with
 246 .Sy htobe .
 247 When working with little-endian data, the prefixes
 248 .Sy letoh
 249 and
 250 .Sy htole
 251 convert little-endian data to the host's endianness and from the host's
 252 to little-endian respectively.
 253 .Pp
 254 These functions are not standardized and the header they appear in varies
 255 between the BSDs and GNU/Linux.
 256 Applications that wish to be portable, shoulda instead use the
 257 .Xr byteorder 3C
 258 functions.
 259 .Pp
 260 All of these functions in both families simply return their input when
 261 the host's native byte order is the same as the desired order.
 262 For example, when calling
 263 .Xr htonl 3C
 264 on a big-endian system the original data is returned with no conversion
 265 or modification.
 266 .Sh SEE ALSO
 267 .Xr byteorder 3C ,
 268 .Xr endian 3C ,
 269 .Xr endian.h 3HEAD ,
 270 .Xr inet 3HEAD


 236 and big-endian and little-endian specifically.
 237 While these functions are similar to those in
 238 .Xr byteorder 3C ,
 239 they more explicitly cover different data conversions.
 240 Like them, these functions operate on either 16-bit, 32-bit, or 64-bit values.
 241 When converting from big-endian, to the host's endianness, the functions
 242 begin with
 243 .Sy betoh .
 244 If instead, one is converting data from the host's native endianness to
 245 another, then it starts with
 246 .Sy htobe .
 247 When working with little-endian data, the prefixes
 248 .Sy letoh
 249 and
 250 .Sy htole
 251 convert little-endian data to the host's endianness and from the host's
 252 to little-endian respectively.
 253 .Pp
 254 These functions are not standardized and the header they appear in varies
 255 between the BSDs and GNU/Linux.
 256 Applications that wish to be portable, should instead use the
 257 .Xr byteorder 3C
 258 functions.
 259 .Pp
 260 All of these functions in both families simply return their input when
 261 the host's native byte order is the same as the desired order.
 262 For example, when calling
 263 .Xr htonl 3C
 264 on a big-endian system the original data is returned with no conversion
 265 or modification.
 266 .Sh SEE ALSO
 267 .Xr byteorder 3C ,
 268 .Xr endian 3C ,
 269 .Xr endian.h 3HEAD ,
 270 .Xr inet 3HEAD