diff options
Diffstat (limited to 'usr.sbin/ipftest/ipft_pc.c')
-rw-r--r-- | usr.sbin/ipftest/ipft_pc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/ipftest/ipft_pc.c b/usr.sbin/ipftest/ipft_pc.c index e80d13fe0b8..1ce697153e6 100644 --- a/usr.sbin/ipftest/ipft_pc.c +++ b/usr.sbin/ipftest/ipft_pc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipft_pc.c,v 1.17 2001/01/17 06:01:22 fgsch Exp $ */ +/* $OpenBSD: ipft_pc.c,v 1.18 2001/01/30 04:31:01 kjell Exp $ */ /* * Copyright (C) 1993-2000 by Darren Reed. @@ -28,7 +28,7 @@ #include <netinet/ip.h> #include <netinet/tcp.h> #include <net/if.h> -#include <netinet/ip_compat.h> +#include <netinet/ip_fil_compat.h> #include <netinet/tcpip.h> #include "ipf.h" #include "pcap.h" @@ -48,9 +48,9 @@ struct llc { * While many of these maybe the same, some do have different header formats * which make this useful. */ -#define DLT_MAX 10 +#define DLT_MAX 14 -static struct llc llcs[DLT_MAX+1] = { +static struct llc llcs[DLT_MAX] = { { 0, 0, 0 }, /* DLT_NULL */ { 14, 12, 2 }, /* DLT_E10MB */ { 0, 0, 0 }, /* DLT_EN3MB */ @@ -61,7 +61,10 @@ static struct llc llcs[DLT_MAX+1] = { { 0, 0, 0 }, /* DLT_ARCNET */ { 0, 0, 0 }, /* DLT_SLIP */ { 0, 0, 0 }, /* DLT_PPP */ - { 0, 0, 0 } /* DLT_FDDI */ + { 0, 0, 0 }, /* DLT_FDDI */ + { 0, 0, 0 }, /* DLT_ATMRFC1483 */ + { 0, 0, 0 }, /* DLT_LOOP */ + { 0, 0, 0 } /* DLT_ENC */ }; static int pcap_open __P((char *)); @@ -116,7 +119,7 @@ char *fname; swap_hdr(&ph); } - if (ph.pc_v_maj != PCAP_VERSION_MAJ || ph.pc_type > DLT_MAX) { + if (ph.pc_v_maj != PCAP_VERSION_MAJ || ph.pc_type >= DLT_MAX) { (void) close(fd); return -2; } |