FreeBSD also defines DLT_SLIP_BSDOS as 13 and DLT_PPP_BSDOS as 14, so we
define them that way on FreeBSD as well as NetBSD.
This commit is contained in:
parent
cb73be0549
commit
d5c3be9ab6
38
pcap-bpf.h
38
pcap-bpf.h
|
@ -37,7 +37,7 @@
|
||||||
*
|
*
|
||||||
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
||||||
*
|
*
|
||||||
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.4 2003-03-08 09:13:39 guy Exp $ (LBL)
|
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.5 2003-03-08 09:21:37 guy Exp $ (LBL)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -110,14 +110,8 @@ struct bpf_version {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are the types that are the same on all platforms; on other
|
* These are the types that are the same on all platforms, and that
|
||||||
* platforms, a <net/bpf.h> should be supplied that defines the additional
|
* have been defined by <net/bpf.h> for ages.
|
||||||
* DLT_* codes appropriately for that platform (the BSDs, for example,
|
|
||||||
* should not just pick up this version of "bpf.h"; they should also define
|
|
||||||
* the additional DLT_* codes used by their kernels, as well as the values
|
|
||||||
* defined here - and, if the values they use for particular DLT_ types
|
|
||||||
* differ from those here, they should use their values, not the ones
|
|
||||||
* here).
|
|
||||||
*/
|
*/
|
||||||
#define DLT_NULL 0 /* no link-layer encapsulation */
|
#define DLT_NULL 0 /* no link-layer encapsulation */
|
||||||
#define DLT_EN10MB 1 /* Ethernet (10Mb) */
|
#define DLT_EN10MB 1 /* Ethernet (10Mb) */
|
||||||
|
@ -132,15 +126,16 @@ struct bpf_version {
|
||||||
#define DLT_FDDI 10 /* FDDI */
|
#define DLT_FDDI 10 /* FDDI */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are values from the traditional libpcap "bpf.h".
|
* These are types that are different on some platforms, and that
|
||||||
* Ports of this to particular platforms should replace these definitions
|
* have been defined by <net/bpf.h> for ages. We use #ifdefs to
|
||||||
* with the ones appropriate to that platform, if the values are
|
* detect the BSDs that define them differently from the traditional
|
||||||
* different on that platform.
|
* libpcap <net/bpf.h>
|
||||||
*
|
*
|
||||||
* XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
|
* XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
|
||||||
* but I don't know what the right #define is for BSD/OS.
|
* but I don't know what the right #define is for BSD/OS.
|
||||||
*/
|
*/
|
||||||
#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */
|
#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
#define DLT_RAW 14 /* raw IP */
|
#define DLT_RAW 14 /* raw IP */
|
||||||
#else
|
#else
|
||||||
|
@ -148,19 +143,12 @@ struct bpf_version {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are values from BSD/OS's "bpf.h".
|
* Given that the only OS that currently generates BSD/OS SLIP or PPP
|
||||||
* These are not the same as the values from the traditional libpcap
|
* is, well, BSD/OS, arguably everybody should have chosen its values
|
||||||
* "bpf.h"; however, these values shouldn't be generated by any
|
* for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
|
||||||
* OS other than BSD/OS, so the correct values to use here are the
|
* didn't. So it goes.
|
||||||
* BSD/OS values.
|
|
||||||
*
|
|
||||||
* Platforms that have already assigned these values to other
|
|
||||||
* DLT_ codes, however, should give these codes the values
|
|
||||||
* from that platform, so that programs that use these codes will
|
|
||||||
* continue to compile - even though they won't correctly read
|
|
||||||
* files of these types.
|
|
||||||
*/
|
*/
|
||||||
#ifdef __NetBSD__
|
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||||
#ifndef DLT_SLIP_BSDOS
|
#ifndef DLT_SLIP_BSDOS
|
||||||
#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */
|
#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */
|
||||||
#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */
|
#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */
|
||||||
|
|
Reference in New Issue