diff options
author | fenner <fenner@FreeBSD.org> | 1998-09-15 19:28:10 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1998-09-15 19:28:10 +0000 |
commit | ca0d84cb8bfc8789fd48ada56322a575c4a1aa68 (patch) | |
tree | 5c946e9b84405911032e77b9942372a03521a64f /contrib/libpcap/bpf | |
parent | 737558aa98d3b86de65ff8e1fd0fe39d5debcde7 (diff) | |
download | FreeBSD-src-ca0d84cb8bfc8789fd48ada56322a575c4a1aa68.zip FreeBSD-src-ca0d84cb8bfc8789fd48ada56322a575c4a1aa68.tar.gz |
Virgin import of LBL libpcap v0.4
Diffstat (limited to 'contrib/libpcap/bpf')
-rw-r--r-- | contrib/libpcap/bpf/net/bpf.h | 6 | ||||
-rw-r--r-- | contrib/libpcap/bpf/net/bpf_filter.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/contrib/libpcap/bpf/net/bpf.h b/contrib/libpcap/bpf/net/bpf.h index d2e0af1..704ef05 100644 --- a/contrib/libpcap/bpf/net/bpf.h +++ b/contrib/libpcap/bpf/net/bpf.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, @@ -37,7 +37,7 @@ * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 * - * @(#) $Header: bpf.h,v 1.35 96/09/26 21:57:37 leres Exp $ (LBL) + * @(#) $Header: bpf.h,v 1.36 97/06/12 14:29:53 leres Exp $ (LBL) */ #ifndef BPF_MAJOR_VERSION @@ -170,6 +170,8 @@ struct bpf_hdr { #define DLT_FDDI 10 /* FDDI */ #define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */ #define DLT_RAW 12 /* raw IP */ +#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ +#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ /* * The instruction encondings. diff --git a/contrib/libpcap/bpf/net/bpf_filter.c b/contrib/libpcap/bpf/net/bpf_filter.c index 9afb10b..a588019 100644 --- a/contrib/libpcap/bpf/net/bpf_filter.c +++ b/contrib/libpcap/bpf/net/bpf_filter.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, @@ -40,7 +40,7 @@ #if !(defined(lint) || defined(KERNEL)) static const char rcsid[] = - "@(#) $Header: bpf_filter.c,v 1.31 96/12/11 20:18:39 leres Exp $ (LBL)"; + "@(#) $Header: bpf_filter.c,v 1.33 97/04/26 13:37:18 leres Exp $ (LBL)"; #endif #include <sys/param.h> @@ -507,7 +507,7 @@ bpf_validate(f, len) register int from = i + 1; if (BPF_OP(p->code) == BPF_JA) { - if (from + p->k >= len) + if (from + p->k >= (unsigned)len) return 0; } else if (from + p->jt >= len || from + p->jf >= len) |