tcpdump/tcpdump-4.0.0-portnumbers.patch
Miroslav Lichvar 2f0df680df - update to post 4.0.0 git snapshot 20090818git832d2c
- print retrans and reachable times in ICMPv6 as milliseconds (#474264)
2009-08-20 15:11:12 +00:00

38 lines
1.3 KiB
Diff

diff -up tcpdump-3.9.8/addrtoname.c.portnumbers tcpdump-3.9.8/addrtoname.c
--- tcpdump-3.9.8/addrtoname.c.portnumbers 2007-09-26 03:59:52.000000000 +0200
+++ tcpdump-3.9.8/addrtoname.c 2008-08-29 13:53:12.000000000 +0200
@@ -704,7 +704,7 @@ init_servarray(void)
while (table->name)
table = table->nxt;
- if (nflag) {
+ if (nflag > 1) {
(void)snprintf(buf, sizeof(buf), "%d", port);
table->name = strdup(buf);
} else
@@ -1104,7 +1104,7 @@ init_addrtoname(u_int32_t localnet, u_in
f_localnet = localnet;
f_netmask = mask;
}
- if (nflag)
+ if (nflag > 1)
/*
* Simplest way to suppress names.
*/
diff -up tcpdump-3.9.8/tcpdump.1.portnumbers tcpdump-3.9.8/tcpdump.1
--- tcpdump-3.9.8/tcpdump.1.in.portnumbers 2008-08-29 13:53:12.000000000 +0200
+++ tcpdump-3.9.8/tcpdump.1.in 2008-08-29 13:53:12.000000000 +0200
@@ -403,7 +403,11 @@ Use \fIsecret\fP as a shared secret for
TCP segments with the TCP-MD5 option (RFC 2385), if present.
.TP
.B \-n
-Don't convert addresses (i.e., host addresses, port numbers, etc.) to names.
+Don't convert host addresses to names. This can be used to avoid
+DNS lookups.
+.TP
+.B \-nn
+Don't convert protocol and port numbers etc. to names either.
.TP
.B \-N
Don't print domain name qualification of host names.