X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5d19d3c0ac649a19d1693db14d0d16526c23e052..880d6cb4bd1b78aa883ddfa2ec1beea5170fe440:/print-udp.c diff --git a/print-udp.c b/print-udp.c index d1e734b8..13e571c5 100644 --- a/print-udp.c +++ b/print-udp.c @@ -21,7 +21,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.64 1999-11-17 05:45:58 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.70 1999-12-22 06:27:23 itojun Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -59,7 +63,7 @@ static const char rcsid[] = #include "addrtoname.h" #include "appletalk.h" -#include "nfsv2.h" +#include "nfs.h" #include "bootp.h" struct rtcphdr { @@ -303,6 +307,9 @@ rtcp_print(const u_char *hdr, const u_char *ep) #define ISAKMP_PORT_USER2 8500 /*??? - nonstandard*/ #define RX_PORT_LOW 7000 /*XXX*/ #define RX_PORT_HIGH 7009 /*XXX*/ +#define NETBIOS_NS_PORT 137 +#define NETBIOS_DGRAM_PORT 138 +#define CISCO_AUTORP_PORT 496 /*XXX*/ #ifdef INET6 #define RIPNG_PORT 521 /*XXX*/ @@ -334,11 +341,14 @@ udp_print(register const u_char *bp, u_int length, register const u_char *bp2) #endif /*INET6*/ cp = (u_char *)(up + 1); if (cp > snapend) { - printf("[|udp]"); + (void)printf("%s > %s: [|udp]", + ipaddr_string(&ip->ip_src), ipaddr_string(&ip->ip_dst)); return; } if (length < sizeof(struct udphdr)) { - (void)printf(" truncated-udp %d", length); + (void)printf("%s > %s: truncated-udp %d", + ipaddr_string(&ip->ip_src), ipaddr_string(&ip->ip_dst), + length); return; } length -= sizeof(struct udphdr); @@ -503,6 +513,12 @@ udp_print(register const u_char *bp, u_int length, register const u_char *bp2) krb_print((const void *)(up + 1), length); else if (ISPORT(L2TP_PORT)) l2tp_print((const u_char *)(up + 1), length); + else if (ISPORT(NETBIOS_NS_PORT)) { + nbt_udp137_print((const u_char *)(up + 1), length); + } + else if (ISPORT(NETBIOS_DGRAM_PORT)) { + nbt_udp138_print((const u_char *)(up + 1), length); + } else if (dport == 3456) vat_print((const void *)(up + 1), length, up); /* @@ -526,6 +542,8 @@ udp_print(register const u_char *bp, u_int length, register const u_char *bp2) */ else if (dport == 4567) wb_print((const void *)(up + 1), length); + else if (ISPORT(CISCO_AUTORP_PORT)) + cisco_autorp_print((const void *)(up + 1), length); else (void)printf(" udp %u", (u_int32_t)(ulen - sizeof(*up)));