diff --git a/pcap-linux.c b/pcap-linux.c index 70068b5..d1d2335 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -2389,6 +2389,9 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) /* FALLTHROUGH */ case ARPHRD_METRICOM: +#ifndef ARPHRD_LOOPBACK +#define ARPHRD_LOOPBACK 772 +#endif case ARPHRD_LOOPBACK: handle->linktype = DLT_EN10MB; handle->offset = 2; @@ -2409,6 +2412,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) case ARPHRD_CHAOS: handle->linktype = DLT_CHAOS; break; + #ifndef ARPHRD_CAN #define ARPHRD_CAN 280 #endif @@ -2437,7 +2441,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) handle->offset = 3; break; -#ifndef ARPHRD_ATM /* FIXME: How to #include this? */ +#ifndef ARPHRD_ATM /* FIXME: How to #include this? Values: 16, 19, 21 */ #define ARPHRD_ATM 19 #endif case ARPHRD_ATM: @@ -2504,6 +2508,9 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) handle->linktype = DLT_IEEE802_11_RADIO; break; +#ifndef ARPHRD_PPP +#define ARPHRD_PPP 512 +#endif case ARPHRD_PPP: /* * Some PPP code in the kernel supplies no link-layer @@ -2561,10 +2568,25 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) #define ARPHRD_SIT 776 /* From Linux 2.2.13 */ #endif case ARPHRD_SIT: +#ifndef ARPHRD_CSLIP +#define ARPHRD_CSLIP 257 +#endif case ARPHRD_CSLIP: +#ifndef ARPHRD_SLIP6 +#define ARPHRD_SLIP6 258 +#endif case ARPHRD_SLIP6: +#ifndef ARPHRD_CSLIP6 +#define ARPHRD_CSLIP6 259 +#endif case ARPHRD_CSLIP6: +#ifndef ARPHRD_ADAPT +#define ARPHRD_ADAPT 264 +#endif case ARPHRD_ADAPT: +#ifndef ARPHRD_SLIP +#define ARPHRD_SLIP 256 +#endif case ARPHRD_SLIP: #ifndef ARPHRD_RAWHDLC #define ARPHRD_RAWHDLC 518 @@ -2588,6 +2610,9 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok) handle->linktype = DLT_FRELAY; break; +#ifndef ARPHRD_LOCALTLK +#define ARPHRD_LOCALTLK 773 /* IANA defines this as 11 */ +#endif case ARPHRD_LOCALTLK: handle->linktype = DLT_LTALK; break;