X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/38050da48ed59d6a85df524f015fdbff439366c1..refs/heads/master:/addrtoname.c?ds=sidebyside diff --git a/addrtoname.c b/addrtoname.c index ee5f3215..43bfc47d 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -22,9 +22,7 @@ * and address to string conversion routines */ -#ifdef HAVE_CONFIG_H #include -#endif #ifdef HAVE_CASPER #include @@ -77,11 +75,6 @@ #endif /* what declares ether_ntohost() */ #ifdef NEED_NETINET_IF_ETHER_H - /* - * Include diag-control.h before , which too defines a macro - * named ND_UNREACHABLE. - */ - #include "diag-control.h" #include /* Needed on some platforms */ #include /* Needed on some platforms */ #include @@ -297,6 +290,7 @@ ipaddr_string(netdissect_options *ndo, const u_char *ap) * (2) Address is foreign and -f was given. (If -f was not * given, f_netmask and f_localnet are 0 and the test * evaluates to true) + * Both addr and f_netmask and f_localnet are in network byte order. */ if (!ndo->ndo_nflag && (addr & f_netmask) == f_localnet) { @@ -1251,7 +1245,7 @@ init_ipxsaparray(netdissect_options *ndo) * Initialize the address to name translation machinery. We map all * non-local IP addresses to numeric addresses if ndo->ndo_fflag is true * (i.e., to prevent blocking on the nameserver). localnet is the IP address - * of the local network. mask is its subnet mask. + * of the local network, mask is its subnet mask, both in network byte order. */ void init_addrtoname(netdissect_options *ndo, uint32_t localnet, uint32_t mask)