From 7fe3c1111adb85e0c50edc054340341b9ccd6c5b Mon Sep 17 00:00:00 2001 From: itojun Date: Tue, 19 Oct 1999 15:18:28 +0000 Subject: IPv6 packet filtering code. ./configure --enable-ipv6 (requires getaddrinfo(3) and getnameinfo(3)). TODO: make it work even without getaddrinfo(3) or getnameinfo(3) (or, tcpdump/configure.in should provide alternative version by AC_REPLACE_FUNCS) TODO: make IPv6 filtering code work by default TODO: make "protochain" friendly with optimization --- bpf/net/bpf.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'bpf') diff --git a/bpf/net/bpf.h b/bpf/net/bpf.h index 8d5cd9f..57b8074 100644 --- a/bpf/net/bpf.h +++ b/bpf/net/bpf.h @@ -37,7 +37,7 @@ * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 * - * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.36 1999-10-07 23:46:41 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/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. -- cgit v1.2.3