bpf.h (58273) | bpf.h (80767) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 24 unchanged lines hidden (view full) --- 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.h 8.1 (Berkeley) 6/10/93 39 * @(#)bpf.h 1.34 (LBL) 6/16/96 40 * | 1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 24 unchanged lines hidden (view full) --- 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.h 8.1 (Berkeley) 6/10/93 39 * @(#)bpf.h 1.34 (LBL) 6/16/96 40 * |
41 * $FreeBSD: head/sys/net/bpf.h 58273 2000-03-19 05:42:34Z rwatson $ | 41 * $FreeBSD: head/sys/net/bpf.h 80767 2001-07-31 23:27:06Z fenner $ |
42 */ 43 44#ifndef _NET_BPF_H_ 45#define _NET_BPF_H_ 46 47/* BSD style release date */ 48#define BPF_RELEASE 199606 49 --- 97 unchanged lines hidden (view full) --- 147#define DLT_CHAOS 5 /* Chaos */ 148#define DLT_IEEE802 6 /* IEEE 802 Networks */ 149#define DLT_ARCNET 7 /* ARCNET */ 150#define DLT_SLIP 8 /* Serial Line IP */ 151#define DLT_PPP 9 /* Point-to-point Protocol */ 152#define DLT_FDDI 10 /* FDDI */ 153#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */ 154#define DLT_RAW 12 /* raw IP */ | 42 */ 43 44#ifndef _NET_BPF_H_ 45#define _NET_BPF_H_ 46 47/* BSD style release date */ 48#define BPF_RELEASE 199606 49 --- 97 unchanged lines hidden (view full) --- 147#define DLT_CHAOS 5 /* Chaos */ 148#define DLT_IEEE802 6 /* IEEE 802 Networks */ 149#define DLT_ARCNET 7 /* ARCNET */ 150#define DLT_SLIP 8 /* Serial Line IP */ 151#define DLT_PPP 9 /* Point-to-point Protocol */ 152#define DLT_FDDI 10 /* FDDI */ 153#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */ 154#define DLT_RAW 12 /* raw IP */ |
155#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ 156#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ | |
157 158/* | 155 156/* |
157 * These are values from BSD/OS's "bpf.h". 158 * These are not the same as the values from the traditional libpcap 159 * "bpf.h"; however, these values shouldn't be generated by any 160 * OS other than BSD/OS, so the correct values to use here are the 161 * BSD/OS values. 162 * 163 * Platforms that have already assigned these values to other 164 * DLT_ codes, however, should give these codes the values 165 * from that platform, so that programs that use these codes will 166 * continue to compile - even though they won't correctly read 167 * files of these types. 168 */ 169#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ 170#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ 171 172#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ 173 174/* 175 * This value is defined by NetBSD; other platforms should refrain from 176 * using it for other purposes, so that NetBSD savefiles with a link 177 * type of 50 can be read as this type on all platforms. 178 */ 179#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ 180 181/* 182 * This value was defined by libpcap 0.5; platforms that have defined 183 * it with a different value should define it here with that value - 184 * a link type of 104 in a save file will be mapped to DLT_C_HDLC, 185 * whatever value that happens to be, so programs will correctly 186 * handle files with that link type regardless of the value of 187 * DLT_C_HDLC. 188 * 189 * The name DLT_C_HDLC was used by BSD/OS; we use that name for source 190 * compatibility with programs written for BSD/OS. 191 * 192 * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, 193 * for source compatibility with programs written for libpcap 0.5. 194 */ 195#define DLT_C_HDLC 104 /* Cisco HDLC */ 196#define DLT_CHDLC DLT_C_HDLC 197 198/* 199 * Reserved for future use. 200 * Do not pick other numerical value for these unless you have also 201 * picked up the tcpdump.org top-of-CVS-tree version of "savefile.c", 202 * which will arrange that capture files for these DLT_ types have 203 * the same "network" value on all platforms, regardless of what 204 * value is chosen for their DLT_ type (thus allowing captures made 205 * on one platform to be read on other platforms, even if the two 206 * platforms don't use the same numerical values for all DLT_ types). 207 */ 208#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ 209 210/* 211 * Values between 106 and 107 are used in capture file headers as 212 * link-layer types corresponding to DLT_ types that might differ 213 * between platforms; don't use those values for new DLT_ new types. 214 */ 215 216/* 217 * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except 218 * that the AF_ type in the link-layer header is in network byte order. 219 * 220 * OpenBSD defines it as 12, but that collides with DLT_RAW, so we 221 * define it as 108 here. If OpenBSD picks up this file, it should 222 * define DLT_LOOP as 12 in its version, as per the comment above - 223 * and should not use 108 for any purpose. 224 */ 225#define DLT_LOOP 108 226 227/* 228 * Values between 109 and 112 are used in capture file headers as 229 * link-layer types corresponding to DLT_ types that might differ 230 * between platforms; don't use those values for new DLT_ new types. 231 */ 232 233/* 234 * This is for Linux cooked sockets. 235 */ 236#define DLT_LINUX_SLL 113 237 238/* |
|
159 * The instruction encodings. 160 */ 161/* instruction classes */ 162#define BPF_CLASS(code) ((code) & 0x07) 163#define BPF_LD 0x00 164#define BPF_LDX 0x01 165#define BPF_ST 0x02 166#define BPF_STX 0x03 --- 80 unchanged lines hidden --- | 239 * The instruction encodings. 240 */ 241/* instruction classes */ 242#define BPF_CLASS(code) ((code) & 0x07) 243#define BPF_LD 0x00 244#define BPF_LDX 0x01 245#define BPF_ST 0x02 246#define BPF_STX 0x03 --- 80 unchanged lines hidden --- |