* and address to string conversion routines
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#ifdef HAVE_CASPER
#include <libcasper.h>
#endif /* what declares ether_ntohost() */
#ifdef NEED_NETINET_IF_ETHER_H
- /*
- * Include diag-control.h before <net/if.h>, which too defines a macro
- * named ND_UNREACHABLE.
- */
- #include "diag-control.h"
#include <net/if.h> /* Needed on some platforms */
#include <netinet/in.h> /* Needed on some platforms */
#include <netinet/if_ether.h>
* (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) {
* 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)