1BYTEORDER(3bsd) LOCAL BYTEORDER(3bsd)
2
4 be16enc, be16dec, be32enc, be32dec, be64enc, be64dec, le16enc, le16dec,
5 le32enc, le32dec, le64enc, le64dec — byte order operations
6
8 #include <sys/endian.h>
9 (See libbsd(7) for include usage.)
10
11 uint16_t
12 be16dec(const void *);
13
14 uint32_t
15 be32dec(const void *);
16
17 uint64_t
18 be64dec(const void *);
19
20 uint16_t
21 le16dec(const void *);
22
23 uint32_t
24 le32dec(const void *);
25
26 uint64_t
27 le64dec(const void *);
28
29 void
30 be16enc(void *, uint16_t);
31
32 void
33 be32enc(void *, uint32_t);
34
35 void
36 be64enc(void *, uint64_t);
37
38 void
39 le16enc(void *, uint16_t);
40
41 void
42 le32enc(void *, uint32_t);
43
44 void
45 le64enc(void *, uint64_t);
46
48 The be16enc(), be16dec(), be32enc(), be32dec(), be64enc(), be64dec(),
49 le16enc(), le16dec(), le32enc(), le32dec(), le64enc(), and le64dec()
50 functions encode and decode integers to/from byte strings on any align‐
51 ment in big/little endian format.
52
54 byteorder(3)
55
57 The encode/decode functions first appeared in FreeBSD 5.1.
58
59BSD April 29, 2002 BSD