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>
This commit is contained in:
parent
c348dd4b10
commit
88e98d876e
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue