mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-24 02:23:27 +08:00
(sl_if_print): actually examine the IP version. From
kuznet@ms2.inr.ac.ru
This commit is contained in:
parent
8571b51746
commit
f216362db4
15
print-sl.c
15
print-sl.c
@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.43 1999-10-17 21:37:15 mcr Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.44 1999-11-21 03:49:30 assar Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NET_SLIP_H
|
||||
@ -101,7 +101,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:
|
||||
ipv6_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);
|
||||
|
Loading…
Reference in New Issue
Block a user