Hi
DLT_LOOP is defined improperly in pcap-bpf.c for OpenBSD.
Here is the current:
/*
* OpenBSD DLT_LOOP, for loopback devices; it's like
DLT_NULL, except
* that the AF_ type in the link-layer header is in network
byte order.
*
* OpenBSD defines it as 12, but that collides with DLT_RAW,
so we
* define it as 108 here. If OpenBSD picks up this file, it
should
* define DLT_LOOP as 12 in its version, as per the comment
above -
* and should not use 108 as a DLT_ value.
*/
#define DLT_LOOP 108
It needs to be changed to:
#ifdef __OpenBSD__
#define DLT_LOOP 12
#else
#define DLT_LOOP 108
#endif
Here is the corresponding section from my net/bpf.h in
OpenBSD 4.0
/*
* Data-link level type codes.
*/
#define DLT_NULL 0 /* no link-layer encapsulation
*/
#define DLT_EN10MB 1 /* Ethernet (10Mb) */
#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb)
*/
#define DLT_AX25 3 /* Amateur Radio AX.25 */
#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
#define DLT_CHAOS 5 /* Chaos */
#define DLT_IEEE802 6 /* IEEE 802 Networks */
#define DLT_ARCNET 7 /* ARCNET */
#define DLT_SLIP 8 /* Serial Line IP */
#define DLT_PPP 9 /* Point-to-point Protocol */
#define DLT_FDDI 10 /* FDDI */
#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm
*/
#define DLT_LOOP 12 /* loopback type (af header) */
#define DLT_ENC 13 /* IPSEC enc type (af header,
spi, flags) */
#define DLT_RAW 14 /* raw IP */
#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */
#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point
Protocol */
#define DLT_OLD_PFLOG 17 /* Packet filter logging,
old (XXX
remove?) */
#define DLT_PFSYNC 18 /* Packet filter state syncing
*/
#define DLT_PPP_ETHER 51 /* PPP over Ethernet;
session only w/o
ether header */
#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */
#define DLT_PFLOG 117 /* Packet filter logging, by
pcap people */
#define DLT_IEEE802_11_RADIO 127 /* IEEE 802.11 plus WLAN
header */
Thanks
Jonathan Steel
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/
a> to unsubscribe.
|