display cosmetics for printing NTP packets

This commit is contained in:
hannes 2004-01-28 14:54:49 +00:00
parent 74bb4ee159
commit efe5ca00c7
2 changed files with 5 additions and 8 deletions

View File

@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.40 2004-01-28 14:34:50 hannes Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.41 2004-01-28 14:54:50 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -82,9 +82,6 @@ ntp_print(register const u_char *cp, u_int length)
int mode, version, leapind;
bp = (struct ntpdata *)cp;
/* Note funny sized packets */
if (length != sizeof(struct ntpdata))
(void)printf(" [len=%d]", length);
TCHECK(bp->status);

View File

@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.129 2003-11-19 00:19:56 guy Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.130 2004-01-28 14:54:49 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -568,7 +568,7 @@ udp_print(register const u_char *bp, u_int length,
}
udpipaddr_print(ip, sport, dport);
if (IP_V(ip) == 4 && vflag && !fragmented) {
if (IP_V(ip) == 4 && (vflag > 1) && !fragmented) {
int sum = up->uh_sum;
if (sum == 0) {
(void)printf("[no cksum] ");
@ -678,9 +678,9 @@ udp_print(register const u_char *bp, u_int length,
dport == BFD_ECHO_PORT )
bfd_print((const u_char *)(up+1), length, dport);
else
(void)printf("UDP, length: %u",
(void)printf("UDP, length %u",
(u_int32_t)(ulen - sizeof(*up)));
#undef ISPORT
} else
(void)printf("UDP, length: %u", (u_int32_t)(ulen - sizeof(*up)));
(void)printf("UDP, length %u", (u_int32_t)(ulen - sizeof(*up)));
}