X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fe0fcd92e3ae841f7ccf84b250df1ec4afdaecbc..5cc4c57d4320f80c059506eccd5ad7fa3d97c66f:/print-udp.c?ds=inline diff --git a/print-udp.c b/print-udp.c index 27441c25..eace4c5d 100644 --- a/print-udp.c +++ b/print-udp.c @@ -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.133 2004-07-27 17:04:21 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] "); @@ -673,14 +673,18 @@ udp_print(register const u_char *bp, u_int length, else if (ISPORT(LDP_PORT)) ldp_print((const u_char *)(up + 1), length); else if (ISPORT(MPLS_LSP_PING_PORT)) - mpls_lsp_ping_print((const u_char *)(up + 1), length); + lspping_print((const u_char *)(up + 1), length); else if (dport == BFD_CONTROL_PORT || dport == BFD_ECHO_PORT ) bfd_print((const u_char *)(up+1), length, dport); + else if (ISPORT(LMP_PORT)) + lmp_print((const u_char *)(up + 1), length); + else if (ISPORT(SIP_PORT)) + sip_print((const u_char *)(up + 1), length); 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))); }