mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 10:54:47 +00:00
lib: add 64bit versions of htonl/ntohl
Add 64bit version of htonl/ntohl. Signed-off-by: Stephen Worley <sworley@nvidia.com>
This commit is contained in:
parent
1ca713b375
commit
04cb115d97
@ -338,6 +338,15 @@ struct in_pktinfo {
|
|||||||
|
|
||||||
#define strmatch(a,b) (!strcmp((a), (b)))
|
#define strmatch(a,b) (!strcmp((a), (b)))
|
||||||
|
|
||||||
|
#define htonll(x) \
|
||||||
|
((1 == htonl(1)) \
|
||||||
|
? (x) \
|
||||||
|
: ((uint64_t)htonl((x)&0xFFFFFFFF) << 32) | htonl((x) >> 32))
|
||||||
|
#define ntohll(x) \
|
||||||
|
((1 == ntohl(1)) \
|
||||||
|
? (x) \
|
||||||
|
: ((uint64_t)ntohl((x)&0xFFFFFFFF) << 32) | ntohl((x) >> 32))
|
||||||
|
|
||||||
#ifndef INADDR_LOOPBACK
|
#ifndef INADDR_LOOPBACK
|
||||||
#define INADDR_LOOPBACK 0x7f000001 /* Internet address 127.0.0.1. */
|
#define INADDR_LOOPBACK 0x7f000001 /* Internet address 127.0.0.1. */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user