]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udp.c
print frame-relay flags & DLCI # for cisco style encaps
[tcpdump] / print-udp.c
index 27441c25eae16a69eb87f2d09494e862b0b59905..eace4c5db72ccb6dd1749f12c0aec096d99ffcd4 100644 (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.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)));
 }