From aae9bd2bccda7ddbeb438e8238ced9c4cd1e9d1d Mon Sep 17 00:00:00 2001 From: fenner Date: Sun, 30 Jan 2000 00:32:56 +0000 Subject: Virgin import of tcpdump.org libpcap v0.5 --- contrib/libpcap/bpf/net/bpf.h | 23 +++++++++++++++++++---- contrib/libpcap/bpf/net/bpf_filter.c | 2 +- 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'contrib/libpcap/bpf') diff --git a/contrib/libpcap/bpf/net/bpf.h b/contrib/libpcap/bpf/net/bpf.h index 704ef05..8a997aa 100644 --- a/contrib/libpcap/bpf/net/bpf.h +++ b/contrib/libpcap/bpf/net/bpf.h @@ -37,7 +37,7 @@ * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 * - * @(#) $Header: bpf.h,v 1.36 97/06/12 14:29:53 leres Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/bpf/net/bpf.h,v 1.37 1999/10/19 15:18:31 itojun Exp $ (LBL) */ #ifndef BPF_MAJOR_VERSION @@ -52,7 +52,11 @@ typedef u_int bpf_u_int32; * Alignment macros. BPF_WORDALIGN rounds up to the next * even multiple of BPF_ALIGNMENT. */ +#ifndef __NetBSD__ #define BPF_ALIGNMENT sizeof(bpf_int32) +#else +#define BPF_ALIGNMENT sizeof(long) +#endif #define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) #define BPF_MAXINSNS 512 @@ -168,10 +172,21 @@ struct bpf_hdr { #define DLT_SLIP 8 /* Serial Line IP */ #define DLT_PPP 9 /* Point-to-point Protocol */ #define DLT_FDDI 10 /* FDDI */ +#ifdef __FreeBSD__ +#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */ +#endif +#ifdef __OpenBSD__ #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 */ +#define DLT_LOOP 12 /* loopback */ +#endif +/* offset to avoid collision with BSD/OS values */ +#ifndef DLT_ATM_RFC1483 +#define DLT_ATM_RFC1483 100 /* LLC/SNAP encapsulated atm */ +#endif +#define DLT_RAW 101 /* raw IP */ +#define DLT_SLIP_BSDOS 102 /* BSD/OS Serial Line IP */ +#define DLT_PPP_BSDOS 103 /* BSD/OS Point-to-point Protocol */ +#define DLT_CHDLC 104 /* Cisco HDLC */ /* * The instruction encondings. diff --git a/contrib/libpcap/bpf/net/bpf_filter.c b/contrib/libpcap/bpf/net/bpf_filter.c index a588019..f274542 100644 --- a/contrib/libpcap/bpf/net/bpf_filter.c +++ b/contrib/libpcap/bpf/net/bpf_filter.c @@ -40,7 +40,7 @@ #if !(defined(lint) || defined(KERNEL)) static const char rcsid[] = - "@(#) $Header: bpf_filter.c,v 1.33 97/04/26 13:37:18 leres Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v 1.33.1.1 1999/10/07 23:46:41 mcr Exp $ (LBL)"; #endif #include -- cgit v1.1