diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-12-16 19:52:35 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-12-16 19:52:35 -0800 |
commit | a08e63fd7a8f5bfeb6b6f47adf580cd7f9af3dec (patch) | |
tree | 6b644e8d5f201345bf4e544be50ce27aa9b697d4 /addrtoname.c | |
parent | 41dbcba30b824744612ff4ee3b151083464b4000 (diff) | |
download | tcpdump-a08e63fd7a8f5bfeb6b6f47adf580cd7f9af3dec.tar.gz |
Move NTOH and HTON macros into addrname.c
We don't want to encourage people to use them in code that pulls data
out of packets, as we want that code to use the EXTRACT_ macros.
Diffstat (limited to 'addrtoname.c')
-rw-r--r-- | addrtoname.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addrtoname.c b/addrtoname.c index 9d5c88cc..b08253a3 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -33,6 +33,13 @@ #include <netdissect-stdinc.h> +#ifndef NTOHL +#define NTOHL(x) (x) = ntohl(x) +#define NTOHS(x) (x) = ntohs(x) +#define HTONL(x) (x) = htonl(x) +#define HTONS(x) (x) = htons(x) +#endif + #ifdef USE_ETHER_NTOHOST #ifdef HAVE_NETINET_IF_ETHER_H struct mbuf; /* Squelch compiler warnings on some platforms for */ |