]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udp.c
add support for optional AFI, SAFI and MAXPREFL values that
[tcpdump] / print-udp.c
index 67c367152046a4a56e0d8117e03dcb13c59a9295..166eca3a304b1b61ccd4b2eb19e76084e82bf570 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.113 2002-12-11 07:14:10 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.117 2003-05-11 06:01:17 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -390,6 +390,7 @@ static int udp6_cksum(const struct ip6_hdr *ip6, const struct udphdr *up,
 #define LWRES_PORT             921
 #define ZEPHYR_SRV_PORT                2103
 #define ZEPHYR_CLT_PORT                2104
+#define MPLS_LSP_PING_PORT      3503 /* draft-ietf-mpls-lsp-ping-02.txt */
 
 #ifdef INET6
 #define RIPNG_PORT 521         /*XXX*/
@@ -529,6 +530,11 @@ udp_print(register const u_char *bp, u_int length,
                        udpipaddr_print(ip, sport, dport);
                        cnfp_print(cp, (const u_char *)ip);
                        break;
+
+               case PT_TFTP:
+                       udpipaddr_print(ip, sport, dport);
+                       tftp_print(cp, length);
+                       break;
                }
                return;
        }
@@ -603,7 +609,7 @@ udp_print(register const u_char *bp, u_int length,
                else if (ISPORT(TFTP_PORT))
                        tftp_print((const u_char *)(up + 1), length);
                else if (ISPORT(IPPORT_BOOTPC) || ISPORT(IPPORT_BOOTPS))
-                       bootp_print((const u_char *)(up + 1), sport, dport, length);
+                       bootp_print((const u_char *)(up + 1), length);
                else if (ISPORT(RIP_PORT))
                        rip_print((const u_char *)(up + 1), length);
                else if (ISPORT(ISAKMP_PORT))
@@ -663,7 +669,9 @@ udp_print(register const u_char *bp, u_int length,
                else if (ISPORT(LWRES_PORT))
                        lwres_print((const u_char *)(up + 1), length);
                 else if (ISPORT(LDP_PORT))
-                        printf("LDP, length: %u", length);
+                       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);
                else
                        (void)printf("udp %u",
                            (u_int32_t)(ulen - sizeof(*up)));