diff options
author | fenner <fenner@FreeBSD.org> | 2000-01-30 01:05:24 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2000-01-30 01:05:24 +0000 |
commit | c780ea93f313e481b5e76344d0c206cf1568e727 (patch) | |
tree | cd7ad03c67eea60f72e32cf23a00c051002101b6 /contrib/tcpdump/print-sl.c | |
parent | 107d567bf3f832610112e1377af645f8f827e1dd (diff) | |
download | FreeBSD-src-c780ea93f313e481b5e76344d0c206cf1568e727.zip FreeBSD-src-c780ea93f313e481b5e76344d0c206cf1568e727.tar.gz |
Merge tcpdump 3.5
Diffstat (limited to 'contrib/tcpdump/print-sl.c')
-rw-r--r-- | contrib/tcpdump/print-sl.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/contrib/tcpdump/print-sl.c b/contrib/tcpdump/print-sl.c index 7e52352..c2f622b 100644 --- a/contrib/tcpdump/print-sl.c +++ b/contrib/tcpdump/print-sl.c @@ -17,11 +17,17 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * $FreeBSD$ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: print-sl.c,v 1.42 97/06/12 14:21:35 leres Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.46 1999/11/21 12:38:24 itojun Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #ifdef HAVE_NET_SLIP_H @@ -44,9 +50,7 @@ struct rtentry; #include <net/ethernet.h> #include <netinet/ip_var.h> #include <netinet/udp.h> -#include <netinet/udp_var.h> #include <netinet/tcp.h> -#include <netinet/tcpip.h> #include <net/slcompress.h> #include <net/slip.h> @@ -104,7 +108,18 @@ sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) if (eflag) sliplink_print(p, ip, length); - ip_print((u_char *)ip, length); + switch (ip->ip_v) { + case 4: + ip_print((u_char *)ip, length); + break; +#ifdef INET6 + case 6: + ip6_print((u_char *)ip, length); + break; +#endif + default: + printf ("ip v%d", ip->ip_v); + } if (xflag) default_print((u_char *)ip, caplen - SLIP_HDRLEN); |