summaryrefslogtreecommitdiff
path: root/addrtoname.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-04-04 00:46:33 -0700
committerGuy Harris <guy@alum.mit.edu>2014-04-04 00:46:33 -0700
commit32938f947fe3ac8d2f7fff6242abbcfcff7cc007 (patch)
tree14319d1fd0fc6ea31525980635cb70a2062f183f /addrtoname.c
parent1cde6435df23876fb88998e38739def0dc7dca47 (diff)
downloadtcpdump-32938f947fe3ac8d2f7fff6242abbcfcff7cc007.tar.gz
Define NETDISSECT_REWORKED and fix the issues it provokes.
I.e., use the flags from the netdissect_options structure.
Diffstat (limited to 'addrtoname.c')
-rw-r--r--addrtoname.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/addrtoname.c b/addrtoname.c
index ba0397c2..f3fabb06 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -22,6 +22,7 @@
* and address to string conversion routines
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -247,7 +248,7 @@ getname(netdissect_options *ndo, const u_char *ap)
char *dotp;
p->name = strdup(hp->h_name);
- if (Nflag) {
+ if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
if (dotp)
@@ -298,7 +299,7 @@ getname6(netdissect_options *ndo, const u_char *ap)
char *dotp;
p->name = strdup(hp->h_name);
- if (Nflag) {
+ if (ndo->ndo_Nflag) {
/* Remove domain qualifications */
dotp = strchr(p->name, '.');
if (dotp)
@@ -1131,14 +1132,14 @@ init_ipxsaparray(void)
/*
* Initialize the address to name translation machinery. We map all
- * non-local IP addresses to numeric addresses if fflag is true (i.e.,
- * to prevent blocking on the nameserver). localnet is the IP address
+ * 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.
*/
void
init_addrtoname(netdissect_options *ndo, u_int32_t localnet, u_int32_t mask)
{
- if (fflag) {
+ if (ndo->ndo_fflag) {
f_localnet = localnet;
f_netmask = mask;
}