aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-12 22:17:49 -0800
committerGuy Harris <guy@alum.mit.edu>2018-11-13 06:18:22 +0000
commit88e98d876ec8e85db330654f7203805dd642a1a3 (patch)
tree99166215565f0bbfa3a4f20fbd4d509963994856 /epan
parentc348dd4b106621f85079ebaf8202229c689ea93b (diff)
Move the Linux ARPHRD_ types to epan/arptypes.h.
Change-Id: I6fa9593af64e8af1ade4f049ea949989adfd00c7 Reviewed-on: https://code.wireshark.org/review/30595 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r--epan/arptypes.h7
-rw-r--r--epan/dissectors/packet-ieee80211-radiotap.c4
-rw-r--r--epan/dissectors/packet-sll.c9
-rw-r--r--epan/dissectors/packet-sll.h10
4 files changed, 11 insertions, 19 deletions
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 <epan/prefs.h>
#include <epan/addr_resolv.h>
#include <epan/expert.h>
+#include <epan/arptypes.h>
#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 <epan/addr_resolv.h>
#include <epan/etypes.h>
+#include <epan/arptypes.h>
#include <epan/decode_as.h>
#include <epan/proto_data.h>
@@ -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