2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2016 Joyent, Inc.
37 .Nd convert between big and little endian byte order
115 family of functions convert 16, 32, and 64-bit values between the host's
116 native byte order and big- or little-endian.
117 All of the functions in this family simply return their input when the host's
118 native byte order is the same as the desired order.
119 For more information on endianness, see
127 functions take a 16-bit, 32-bit, or 64-bit value and convert it from
128 big-endian to the host's native endianness, swapping bytes as required.
135 functions take a 16-bit, 32-bit, or 64-bit value and convert it from
136 little-endian to the host's native endianness, swapping bytes as
144 functions take a 16-bit, 32-bit, or 64-bit value and convert it from
145 the host's native endianness to big-endian, swapping bytes as required.
152 functions take a 16-bit, 32-bit, or 64-bit value and convert it from
153 the host's native endianness to little-endian, swapping bytes as
173 Historically, different platforms have diverged on the naming of these
175 To better support extant software, both are provided.
177 While these functions are common across multiple platforms, they have
178 not been standardized.
179 Portable applications should instead use the functions defined in
182 The functions always succeed and return a value that has been properly
184 .Sh INTERFACE STABILITY