diff options
author | mike <mike@FreeBSD.org> | 2002-04-29 17:02:51 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-04-29 17:02:51 +0000 |
commit | 70b7e322533fcafe131ee3c12e591829a27d710b (patch) | |
tree | 0de2781c0158c22a5a671d82be233f3d982102af /share/man/man9/byteorder.9 | |
parent | ffe589be53a6d90602d3b16ad2f9fc31102fac0c (diff) | |
download | FreeBSD-src-70b7e322533fcafe131ee3c12e591829a27d710b.zip FreeBSD-src-70b7e322533fcafe131ee3c12e591829a27d710b.tar.gz |
Document bswap16(), bswap32(), and bswap64(). Change the included
header to reflect the new prototype location.
Diffstat (limited to 'share/man/man9/byteorder.9')
-rw-r--r-- | share/man/man9/byteorder.9 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/share/man/man9/byteorder.9 b/share/man/man9/byteorder.9 index 2a379ac..90dac16 100644 --- a/share/man/man9/byteorder.9 +++ b/share/man/man9/byteorder.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 5, 2002 +.Dd April 29, 2002 .Dt BYTEORDER 9 .Os .Sh NAME @@ -42,7 +42,13 @@ .Nm le64toh .Nd convert values between big endian, little endian, and host byte order .Sh SYNOPSIS -.In sys/param.h +.In sys/endian.h +.Ft uint16_t +.Fn bswap16 "uint16_t int16" +.Ft uint32_t +.Fn bswap32 "uint32_t int32" +.Ft uint64_t +.Fn bswap64 "uint64_t int64" .Ft uint16_t .Fn be16toh "uint16_t big16" .Ft uint32_t @@ -69,6 +75,15 @@ .Fn le64toh "uint64_t little64" .Sh DESCRIPTION The +.Fn bswap16 , +.Fn bswap32 , +and +.Fn bswap64 +functions return a byte order swapped integer. +On big endian systems, the number is converted to little endian byte order. +On little endian systems, the number is converted to big endian byte order. +.Pp +The .Fn be16toh , .Fn be32toh , and |