diff options
author | Owen Kirby <osk@exegin.com> | 2017-11-09 18:33:51 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-11-11 19:11:44 +0000 |
commit | 3f11c2f7c53ff07aa2d402eda013259706f257f8 (patch) | |
tree | 9d76e1360ed34cbc4a47449f30ff266c32e630d6 /epan/dissectors/packet-ieee802154.h | |
parent | 499ae4ab573fbfefdb1c200e3177e18844e545b5 (diff) |
Wi-SUN Protocol dissection and IEEE 802.15.4 IE cleanup.
This patch adds dissection for the Wi-SUN Field Area Network standard. Wi-SUN
packets are encoded as a collection of IEEE 802.15.4 information elements. This
required a bit of refactoring in how the IE dissector table is handled so that
external protocols could supply their own dissectors.
While I was working with the IEs, I also added support for the TSCH Timeslot and
Global Time IEs from the IEEE 802.15.4 standard in addition to some general
cleanup.
Change-Id: I2858e4ab577756568e33b86adfe282967899abd5
Reviewed-on: https://code.wireshark.org/review/24331
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ieee802154.h')
-rw-r--r-- | epan/dissectors/packet-ieee802154.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee802154.h b/epan/dissectors/packet-ieee802154.h index e305051c42..c7b5e665ed 100644 --- a/epan/dissectors/packet-ieee802154.h +++ b/epan/dissectors/packet-ieee802154.h @@ -34,6 +34,7 @@ /* Dissector tables for the Header IEs and Payload IEs */ #define IEEE802154_HEADER_IE_DTABLE "wpan.header_ie" #define IEEE802154_PAYLOAD_IE_DTABLE "wpan.payload_ie" +#define IEEE802154_MLME_IE_DTABLE "wpan.mlme_ie" /* Packet Overhead from MAC header + footer (excluding addressing) */ #define IEEE802154_MAX_FRAME_LEN 127 @@ -177,7 +178,6 @@ #define IEEE802154_MLME_PSIE_EB_FLT_ATTR_LEN 0x18 /* Vendor OUIs */ -#define IEEE802154_VENDOR_OUI_ZIGBEE 0x4A191B /* Bit-masks for CC24xx style FCS */ #define IEEE802154_CC24xx_CORRELATION 0x7F00 @@ -248,7 +248,7 @@ typedef enum { #define IEEE802154_HEADER_IE_RCC_CAP 0x27 #define IEEE802154_HEADER_IE_RCCN 0x28 #define IEEE802154_HEADER_IE_GLOBAL_TIME 0x29 -/* Assigned to External Organization: 0x2a */ +#define IEEE802154_HEADER_IE_WISUN 0x2a #define IEEE802154_HEADER_IE_DA_IE 0x2b /* Reserved 0x2c-0x7d */ #define IEEE802154_HEADER_IE_HT1 0x7e @@ -260,7 +260,7 @@ typedef enum { #define IEEE802154_PAYLOAD_IE_MLME 0x1 /* Media Access Control (MAC) subLayer Management Entity */ #define IEEE802154_PAYLOAD_IE_VENDOR 0x2 /* Vendor Specific */ #define IEEE802154_PAYLOAD_IE_MPX 0x3 /* MPX IE (802.15.9) */ -/* Reserved 0x4 */ +#define IEEE802154_PAYLOAD_IE_WISUN 0x4 /* Wi-SUN IE */ #define IEEE802154_PAYLOAD_IE_IETF 0x5 /* IETF IE, RFC 8137 */ /* Reserved 0x6-0xe */ #define IEEE802154_PAYLOAD_IE_TERMINATION 0xf @@ -362,6 +362,7 @@ typedef enum { #define IEEE802159_MPX_ABORT 6 /* IEEE 802.15.9 Table 20 */ #define IEEE802159_MPX_MULTIPLEX_ID_KMP 1 +#define IEEE802159_MPX_MULTIPLEX_ID_WISUN 2 /* IEEE 802.15.9 Table 21 */ #define IEEE802159_MPX_KMP_ID_IEEE8021X 1 #define IEEE802159_MPX_KMP_ID_HIP 2 @@ -372,6 +373,10 @@ typedef enum { #define IEEE802159_MPX_KMP_ID_IEEE80211_GKH 7 #define IEEE802159_MPX_KMP_ID_ETSI_TS_102_887_2 8 #define IEEE802159_MPX_KMP_ID_VENDOR_SPECIFIC 255 +/* Wi-SUN MPX Sub-ID values. */ +#define IEEE802159_MPX_WISUN_SUBID_MHDS 0 +#define IEEE802159_MPX_WISUN_SUBID_6LOWPAN 1 +#define IEEE802159_MPX_WISUN_SUBID_SECURITY 2 /* Structure containing information regarding all necessary packet fields. */ typedef struct { @@ -480,6 +485,9 @@ void ccm_init_block(gchar *block, gboolean adata, gint M, guint64 addr, guint32 gboolean ccm_ctr_encrypt(const gchar *key, const gchar *iv, gchar *mic, gchar *data, gint length); gboolean ccm_cbc_mac(const gchar *key, const gchar *iv, const gchar *a, gint a_len, const gchar *m, gint m_len, gchar *mic); +proto_tree *ieee802154_create_hie_tree(tvbuff_t *tvb, proto_tree *tree, int hf, gint ett); +proto_tree *ieee802154_create_pie_tree(tvbuff_t *tvb, proto_tree *tree, int hf, gint ett); + typedef struct { unsigned char* rx_mic; guint* rx_mic_length; |