byteorder.3bsd man page

be16enc, be16dec, be32enc, be32dec, be64enc, be64dec, le16enc, le16dec, le32enc, le32dec, le64enc, le64dec ā€” byte order operations

Synopsis

#include <sys/endian.h> (See libbsd(7) for include usage.)
uint16_t
be16dec(const void *);

uint32_t
be32dec(const void *);

uint64_t
be64dec(const void *);

uint16_t
le16dec(const void *);

uint32_t
le32dec(const void *);

uint64_t
le64dec(const void *);

void
be16enc(void *, uint16_t);

void
be32enc(void *, uint32_t);

void
be64enc(void *, uint64_t);

void
le16enc(void *, uint16_t);

void
le32enc(void *, uint32_t);

void
le64enc(void *, uint64_t);

Description

The be16enc(), be16dec(), be32enc(), be32dec(), be64enc(), be64dec(), le16enc(), le16dec(), le32enc(), le32dec(), le64enc(), and le64dec() functions encode and decode integers to/from byte strings on any alignment in big/little endian format.

See Also

byteorder(3)

History

The encode/decode functions first appeared in FreeBSD 5.1.

Referenced By

bswap(3), byteorder.3bsd(3), endian(3), inet(3), ip(7), pmdaCacheLookup(3), signal-safety(7), strfile(1).

The man pages be16dec.3bsd(3), be16enc.3bsd(3), be32dec.3bsd(3), be32enc.3bsd(3), be64dec.3bsd(3), be64enc.3bsd(3), le16dec.3bsd(3), le16enc.3bsd(3), le32dec.3bsd(3), le32enc.3bsd(3), le64dec.3bsd(3) and le64enc.3bsd(3) are aliases of byteorder.3bsd(3).

April 29, 2002