diff --git a/epan/arptypes.h b/epan/arptypes.h index 8c51a56b8f..3d99443343 100644 --- a/epan/arptypes.h +++ b/epan/arptypes.h @@ -63,9 +63,10 @@ extern "C" { #define ARPHDR_HW_EXP2 256 /* HW_EXP2 */ /* Virtual ARP types for non ARP hardware used in Linux cooked mode. */ -#define ARPHRD_LOOPBACK 772 /* Loopback */ -#define ARPHRD_IPGRE 778 /* GRE over IP */ -#define ARPHRD_NETLINK 824 /* netlink */ +#define ARPHRD_LOOPBACK 772 /* Loopback */ +#define ARPHRD_IPGRE 778 /* GRE over IP */ +#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ +#define ARPHRD_NETLINK 824 /* netlink */ #ifdef __cplusplus } diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index 8a3ed8ab7e..973dd82e39 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -24,9 +24,9 @@ #include #include #include +#include #include "packet-ieee80211.h" #include "packet-ieee80211-radiotap-iter.h" -#include "packet-sll.h" void proto_register_radiotap(void); void proto_reg_handoff_radiotap(void); @@ -4443,7 +4443,7 @@ void proto_reg_handoff_radiotap(void) * monitor-mode packets in Linux cooked captures, so dissect * those frames. */ - dissector_add_uint("sll.hatype", LINUX_SLL_ARPHRD_IEEE80211_RADIOTAP, + dissector_add_uint("sll.hatype", ARPHRD_IEEE80211_RADIOTAP, radiotap_handle); radiotap_cap_handle = create_capture_dissector_handle(capture_radiotap, proto_radiotap); diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c index 9d6af1e4a1..d4f0feb206 100644 --- a/epan/dissectors/packet-sll.c +++ b/epan/dissectors/packet-sll.c @@ -25,6 +25,7 @@ #include "packet-gre.h" #include #include +#include #include #include @@ -277,16 +278,16 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) /* * XXX - special purpose hack. Netlink packets have a hardware - * address type of LINUX_SLL_ARPHRD_NETLINK, but the protocol - * type value indicates the Netlink message type; we just hand - * the netlink dissector our *entire* packet. + * address type of ARPHRD_NETLINK, but the protocol type value + * indicates the Netlink message type; we just hand the netlink + * dissector our *entire* packet. * * That's different from link-layer types such as 802.11+radiotap, * where the payload follows the complete SLL header, and the * protocol field in the SLL header is irrelevant; for those, * we have the sll.hatype dissector table. */ - if (hatype == LINUX_SLL_ARPHRD_NETLINK) { + if (hatype == ARPHRD_NETLINK) { return call_dissector(netlink_handle, tvb, pinfo, tree); } diff --git a/epan/dissectors/packet-sll.h b/epan/dissectors/packet-sll.h index 179d6a1746..9dcc5ca5e0 100644 --- a/epan/dissectors/packet-sll.h +++ b/epan/dissectors/packet-sll.h @@ -26,14 +26,4 @@ #define LINUX_SLL_P_ISI 0x00F5 /* Intelligent Service Interface */ #define LINUX_SLL_P_IEEE802154 0x00f6 /* 802.15.4 on monitor inteface */ -/* - * The LINUX_SLL_ values for ARPHRD_ types that get treated specially, - * because their packets do *not* get the link-layer header stripped - * in a cooked capture. - * - * https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_arp.h - */ -#define LINUX_SLL_ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ -#define LINUX_SLL_ARPHRD_NETLINK 824 /* Netlink header */ - #endif