From: hannes Date: Sun, 14 Jul 2002 19:46:51 +0000 (+0000) Subject: the last commit contained a bogus commit message; X-Git-Tag: tcpdump-3.8-bp~435 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/2bb13d73f10e64f569f6a9438feb4716a5cf3741 the last commit contained a bogus commit message; purpose of 1.105 was to print the ip header values (len, ttl, tos) at the beginning of the line (where it belongs to) and not at the end; it is only displayed using the -v(erbose) options; the BGP output (where i am working now on) gets much more cleaner now; --- diff --git a/print-ip.c b/print-ip.c index fb6b21b6..c147d48b 100644 --- a/print-ip.c +++ b/print-ip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.106 2002-07-14 14:14:50 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.107 2002-07-14 19:46:51 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -309,22 +309,21 @@ ip_print(register const u_char *bp, register u_int length) printf("IP "); if (vflag) { - if (ip->ip_tos) { - (void)printf("(tos 0x%x", (int)ip->ip_tos); - /* ECN bits */ - if (ip->ip_tos & 0x03) { - switch (ip->ip_tos & 0x03) { - case 1: - (void)printf(",ECT(1)"); - break; - case 2: - (void)printf(",ECT(0)"); - break; - case 3: - (void)printf(",CE"); - } - } + (void)printf("(tos 0x%x", (int)ip->ip_tos); + /* ECN bits */ + if (ip->ip_tos & 0x03) { + switch (ip->ip_tos & 0x03) { + case 1: + (void)printf(",ECT(1)"); + break; + case 2: + (void)printf(",ECT(0)"); + break; + case 3: + (void)printf(",CE"); + } } + if (ip->ip_ttl >= 1) (void)printf(", ttl %d", (int)ip->ip_ttl);