|
|
4ea394f |
From c653dd118fce60a16f0d17e983fc4693bf1287bd Mon Sep 17 00:00:00 2001
|
|
|
4ea394f |
From: rpm-build <rpm-build>
|
|
|
4ea394f |
Date: Mon, 20 Oct 2014 13:26:38 +0200
|
|
|
4ea394f |
Subject: [PATCH 7/7] Introduce -nn option
|
|
|
4ea394f |
|
|
|
4ea394f |
This changes the semantics on -n option so only namelookups are skipped. Port
|
|
|
4ea394f |
numbers *are* translated to their string representations. Option -nn then has
|
|
|
4ea394f |
the same semantics as -n had originally.
|
|
|
4ea394f |
---
|
|
|
4ea394f |
addrtoname.c | 4 ++--
|
|
|
4ea394f |
tcpdump.1.in | 6 +++++-
|
|
|
4ea394f |
2 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
4ea394f |
|
|
|
4ea394f |
diff --git a/addrtoname.c b/addrtoname.c
|
|
|
4ea394f |
index 277751d..ed8376b 100644
|
|
|
4ea394f |
--- a/addrtoname.c
|
|
|
4ea394f |
+++ b/addrtoname.c
|
|
|
4ea394f |
@@ -787,7 +787,7 @@ init_servarray(netdissect_options *ndo)
|
|
|
4ea394f |
|
|
|
4ea394f |
while (table->name)
|
|
|
4ea394f |
table = table->nxt;
|
|
|
4ea394f |
- if (ndo->ndo_nflag) {
|
|
|
4ea394f |
+ if (ndo->ndo_nflag > 1) {
|
|
|
4ea394f |
(void)snprintf(buf, sizeof(buf), "%d", port);
|
|
|
4ea394f |
table->name = strdup(buf);
|
|
|
4ea394f |
} else
|
|
|
4ea394f |
@@ -1187,7 +1187,7 @@ init_addrtoname(netdissect_options *ndo, uint32_t localnet, uint32_t mask)
|
|
|
4ea394f |
f_localnet = localnet;
|
|
|
4ea394f |
f_netmask = mask;
|
|
|
4ea394f |
}
|
|
|
4ea394f |
- if (ndo->ndo_nflag)
|
|
|
4ea394f |
+ if (ndo->ndo_nflag > 1)
|
|
|
4ea394f |
/*
|
|
|
4ea394f |
* Simplest way to suppress names.
|
|
|
4ea394f |
*/
|
|
|
4ea394f |
diff --git a/tcpdump.1.in b/tcpdump.1.in
|
|
|
4ea394f |
index e3a6ef4..a8e65c2 100644
|
|
|
4ea394f |
--- a/tcpdump.1.in
|
|
|
4ea394f |
+++ b/tcpdump.1.in
|
|
|
4ea394f |
@@ -532,7 +532,11 @@ Use \fIsecret\fP as a shared secret for validating the digests found in
|
|
|
4ea394f |
TCP segments with the TCP-MD5 option (RFC 2385), if present.
|
|
|
4ea394f |
.TP
|
|
|
4ea394f |
.B \-n
|
|
|
4ea394f |
-Don't convert addresses (i.e., host addresses, port numbers, etc.) to names.
|
|
|
4ea394f |
+Don't convert host addresses to names. This can be used to avoid
|
|
|
4ea394f |
+DNS lookups.
|
|
|
4ea394f |
+.TP
|
|
|
4ea394f |
+.B \-nn
|
|
|
4ea394f |
+Don't convert protocol and port numbers etc. to names either.
|
|
|
4ea394f |
.TP
|
|
|
4ea394f |
.B \-N
|
|
|
4ea394f |
Don't print domain name qualification of host names.
|
|
|
4ea394f |
--
|
|
|
4ea394f |
1.8.3.1
|
|
|
4ea394f |
|