#define WISUN_SUBID_RSL 4
#define WISUN_SUBID_MHDS 5
#define WISUN_SUBID_VH 6
+#define WISUN_SUBID_EA 9
/* Wi-SUN Payload/Nested ID values. */
#define WISUN_PIE_SUBID_US 1
static int hf_wisun_rslie_rsl = -1;
static int hf_wisun_vhie = -1;
static int hf_wisun_vhie_vid = -1;
+static int hf_wisun_eaie = -1;
+static int hf_wisun_eaie_eui = -1;
static int hf_wisun_pie = -1;
static int hf_wisun_wsie = -1;
static int hf_wisun_wsie_type = -1;
static int hf_wisun_wsie_id = -1;
static int hf_wisun_wsie_length = -1;
+static int hf_wisun_wsie_id_short = -1;
+static int hf_wisun_wsie_length_short = -1;
static int hf_wisun_usie = -1;
static int hf_wisun_usie_dwell_interval = -1;
static int hf_wisun_usie_clock_drift = -1;
static gint ett_wisun_fcie = -1;
static gint ett_wisun_rslie = -1;
static gint ett_wisun_vhie = -1;
+static gint ett_wisun_eaie = -1;
static gint ett_wisun_pie = -1;
static gint ett_wisun_wsie_bitmap = -1;
static gint ett_wisun_usie = -1;
{ WISUN_SUBID_RSL, "Received Signal Level IE" },
{ WISUN_SUBID_MHDS, "Multi-Hop Delivery Service IE" },
{ WISUN_SUBID_VH, "Vendor Header IE" },
+ { WISUN_SUBID_EA, "EAPOL Authenticator EUI-64 IE" },
{ 0, NULL }
};
NULL
};
+static const int * wisun_format_nested_ie_short[] = {
+ &hf_wisun_wsie_type,
+ &hf_wisun_wsie_id_short,
+ &hf_wisun_wsie_length_short,
+ NULL
+};
+
static expert_field ei_wisun_subid_unsupported = EI_INIT;
static expert_field ei_wisun_wsie_short_format = EI_INIT;
static expert_field ei_wisun_wsie_unsupported = EI_INIT;
dissect_wisun_btie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
{
proto_tree_add_item(tree, hf_wisun_btie_slot, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(tree, hf_wisun_btie_bfio, tvb, offset+2, 4, ENC_LITTLE_ENDIAN);
- return 6;
+ /* as of FAN TPS 1v14, this is 3 bytes instead of 4 */
+ proto_tree_add_item(tree, hf_wisun_btie_bfio, tvb, offset+2, 3, ENC_LITTLE_ENDIAN);
+ return 5;
}
static void
return tvb_reported_length(tvb);
}
+static int
+dissect_wisun_eaie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
+{
+ proto_tree_add_item(tree, hf_wisun_eaie_eui, tvb, offset, 8, ENC_BIG_ENDIAN);
+ return 8;
+}
+
static int
dissect_wisun_hie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
offset += dissect_wisun_vhie(tvb, pinfo, subtree, offset);
break;
+ case WISUN_SUBID_EA:
+ subtree = wisun_create_hie_tree(tvb, tree, hf_wisun_eaie, ett_wisun_eaie);
+ offset += dissect_wisun_eaie(tvb, pinfo, subtree, offset);
+ break;
+
default:
subtree = wisun_create_hie_tree(tvb, tree, hf_wisun_unknown_ie, ett_wisun_unknown_ie);
expert_add_info(pinfo, subtree, &ei_wisun_subid_unsupported);
item = proto_tree_add_item(tree, hf_wisun_panie, tvb, 0, tvb_reported_length(tvb), ENC_NA);
subtree = proto_item_add_subtree(item, ett_wisun_panie);
- proto_tree_add_bitmask(subtree, tvb, offset, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
+ proto_tree_add_bitmask(subtree, tvb, offset, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie_short, ENC_LITTLE_ENDIAN);
offset += 2;
proto_tree_add_item(subtree, hf_wisun_panie_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
item = proto_tree_add_item(tree, hf_wisun_netnameie, tvb, 0, tvb_reported_length(tvb), ENC_NA);
subtree = proto_item_add_subtree(item, ett_wisun_netnameie);
- proto_tree_add_bitmask(subtree, tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
+ proto_tree_add_bitmask(subtree, tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie_short, ENC_LITTLE_ENDIAN);
proto_tree_add_item(subtree, hf_wisun_netnameie_name, tvb, 2, tvb_reported_length_remaining(tvb, 2), ENC_ASCII|ENC_NA);
return tvb_reported_length(tvb);
}
item = proto_tree_add_item(tree, hf_wisun_panverie, tvb, 0, tvb_reported_length(tvb), ENC_NA);
subtree = proto_item_add_subtree(item, ett_wisun_panverie);
- proto_tree_add_bitmask(subtree, tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
+ proto_tree_add_bitmask(subtree, tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie_short, ENC_LITTLE_ENDIAN);
proto_tree_add_item(subtree, hf_wisun_panverie_version, tvb, 2, 2, ENC_LITTLE_ENDIAN);
return tvb_reported_length(tvb);
}
item = proto_tree_add_item(tree, hf_wisun_gtkhashie, tvb, 0, tvb_reported_length(tvb), ENC_NA);
subtree = proto_item_add_subtree(item, ett_wisun_gtkhashie);
- proto_tree_add_bitmask(subtree, tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk0, tvb, 2, 8, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk1, tvb, 10, 8, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk2, tvb, 18, 8, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk3, tvb, 26, 8, ENC_LITTLE_ENDIAN);
+ proto_tree_add_bitmask(subtree, tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie_short, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk0, tvb, 2, 8, ENC_NA);
+ proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk1, tvb, 10, 8, ENC_NA);
+ proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk2, tvb, 18, 8, ENC_NA);
+ proto_tree_add_item(subtree, hf_wisun_gtkhashie_gtk3, tvb, 26, 8, ENC_NA);
return 34;
}
guint16 wsie_len;
tvbuff_t * wsie_tvb;
- /* No Wi-SUN Sub-IEs are currently defined for the short format. */
- if (!(wsie_ie & IEEE802154_PSIE_TYPE_MASK)) {
- wsie_len = (wsie_ie & IEEE802154_PSIE_LENGTH_MASK_SHORT) + 2;
- call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
- expert_add_info(pinfo, tree, &ei_wisun_wsie_short_format);
- offset += wsie_len + 2;
- continue;
- }
-
- wsie_len = (wsie_ie & IEEE802154_PSIE_LENGTH_MASK_LONG);
- wsie_tvb = tvb_new_subset_length(tvb, offset, wsie_len + 2);
- switch ((wsie_ie & IEEE802154_PSIE_ID_MASK_LONG) >> 11) {
- case WISUN_PIE_SUBID_US:
- dissect_wisun_usie(wsie_tvb, pinfo, tree, data);
- break;
- case WISUN_PIE_SUBID_BS:
- dissect_wisun_bsie(wsie_tvb, pinfo, tree, data);
- break;
- case WISUN_PIE_SUBID_VP:
- dissect_wisun_vpie(wsie_tvb, pinfo, tree, data);
- break;
- case WISUN_PIE_SUBID_PAN:
- dissect_wisun_panie(wsie_tvb, pinfo, tree, data);
- break;
- case WISUN_PIE_SUBID_NETNAME:
- dissect_wisun_netnameie(wsie_tvb, pinfo, tree, data);
- break;
- case WISUN_PIE_SUBID_PENVER:
- dissect_wisun_panverie(wsie_tvb, pinfo, tree, data);
- break;
- case WISUN_PIE_SUBID_GTKHASH:
- dissect_wisun_gtkhashie(wsie_tvb, pinfo, tree, data);
- break;
-
- default:{
- proto_item *item = proto_tree_add_item(tree, hf_wisun_unknown_ie, wsie_tvb, 0, tvb_reported_length(wsie_tvb), ENC_NA);
- proto_tree *subtree = proto_item_add_subtree(item, ett_wisun_unknown_ie);
- proto_tree_add_bitmask(subtree, wsie_tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
- expert_add_info(pinfo, subtree, &ei_wisun_wsie_unsupported);
- call_data_dissector(tvb_new_subset_remaining(wsie_tvb, 2), pinfo, subtree);
- break;
+ if (wsie_ie & IEEE802154_PSIE_TYPE_MASK) {
+ /* long format: Table 7-17-Sub-ID allocation for long format */
+ wsie_len = (wsie_ie & IEEE802154_PSIE_LENGTH_MASK_LONG);
+ wsie_tvb = tvb_new_subset_length(tvb, offset, wsie_len + 2);
+ switch ((wsie_ie & IEEE802154_PSIE_ID_MASK_LONG) >> 11) {
+ case WISUN_PIE_SUBID_US:
+ dissect_wisun_usie(wsie_tvb, pinfo, tree, data);
+ break;
+ case WISUN_PIE_SUBID_BS:
+ dissect_wisun_bsie(wsie_tvb, pinfo, tree, data);
+ break;
+ case WISUN_PIE_SUBID_VP:
+ dissect_wisun_vpie(wsie_tvb, pinfo, tree, data);
+ break;
+
+ default:{
+ proto_item *item = proto_tree_add_item(tree, hf_wisun_unknown_ie, wsie_tvb, 0, tvb_reported_length(wsie_tvb), ENC_NA);
+ proto_tree *subtree = proto_item_add_subtree(item, ett_wisun_unknown_ie);
+ proto_tree_add_bitmask(subtree, wsie_tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
+ expert_add_info(pinfo, subtree, &ei_wisun_wsie_unsupported);
+ call_data_dissector(tvb_new_subset_remaining(wsie_tvb, 2), pinfo, subtree);
+ break;
+ }
+ }
+ } else {
+ /* short format: Table 7-16-Sub-ID allocation for short format */
+ wsie_len = (wsie_ie & IEEE802154_PSIE_LENGTH_MASK_SHORT);
+ wsie_tvb = tvb_new_subset_length(tvb, offset, wsie_len + 2);
+ switch ((wsie_ie & IEEE802154_PSIE_ID_MASK_SHORT) >> 8) {
+ case WISUN_PIE_SUBID_PAN:
+ dissect_wisun_panie(wsie_tvb, pinfo, tree, data);
+ break;
+ case WISUN_PIE_SUBID_NETNAME:
+ dissect_wisun_netnameie(wsie_tvb, pinfo, tree, data);
+ break;
+ case WISUN_PIE_SUBID_PENVER:
+ dissect_wisun_panverie(wsie_tvb, pinfo, tree, data);
+ break;
+ case WISUN_PIE_SUBID_GTKHASH:
+ dissect_wisun_gtkhashie(wsie_tvb, pinfo, tree, data);
+ break;
+
+ default:{
+ proto_item *item = proto_tree_add_item(tree, hf_wisun_unknown_ie, wsie_tvb, 0, tvb_reported_length(wsie_tvb), ENC_NA);
+ proto_tree *subtree = proto_item_add_subtree(item, ett_wisun_unknown_ie);
+ proto_tree_add_bitmask(subtree, wsie_tvb, 0, hf_wisun_wsie, ett_wisun_wsie_bitmap, wisun_format_nested_ie, ENC_LITTLE_ENDIAN);
+ expert_add_info(pinfo, subtree, &ei_wisun_wsie_unsupported);
+ call_data_dissector(tvb_new_subset_remaining(wsie_tvb, 2), pinfo, subtree);
+ break;
+ }
}
}
- offset += (wsie_ie & IEEE802154_PSIE_LENGTH_MASK_LONG) + 2;
+ offset += tvb_reported_length(wsie_tvb);
}
return offset;
}
NULL, HFILL }
},
+ { &hf_wisun_eaie,
+ { "EAPOL Authenticator IE", "wisun.eaie", FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+
+ { &hf_wisun_eaie_eui,
+ { "Vendor ID", "wisun.eaie.eui", FT_EUI64, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+
/* Wi-SUN Payload IE */
{ &hf_wisun_pie,
{ "Wi-SUN Payload IE", "wisun.pie", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_wisun_wsie_id_short,
+ { "Sub ID", "wisun.wsie.id", FT_UINT16, BASE_DEC, VALS(wisun_wsie_names), IEEE802154_PSIE_ID_MASK_SHORT,
+ NULL, HFILL }
+ },
+
+ { &hf_wisun_wsie_length_short,
+ { "Length", "wisun.wsie.length", FT_UINT16, BASE_DEC, NULL, IEEE802154_PSIE_LENGTH_MASK_SHORT,
+ NULL, HFILL }
+ },
+
{ &hf_wisun_usie,
{ "Unicast Schedule IE", "wisun.usie", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_wisun_gtkhashie_gtk0,
- { "GTK0 Hash", "wisun.gtkhashie.gtk0", FT_UINT64, BASE_HEX, NULL, 0x0,
+ { "GTK0 Hash", "wisun.gtkhashie.gtk0", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_wisun_gtkhashie_gtk1,
- { "GTK1 Hash", "wisun.gtkhashie.gtk1", FT_UINT64, BASE_HEX, NULL, 0x0,
+ { "GTK1 Hash", "wisun.gtkhashie.gtk1", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_wisun_gtkhashie_gtk2,
- { "GTK2 Hash", "wisun.gtkhashie.gtk2", FT_UINT64, BASE_HEX, NULL, 0x0,
+ { "GTK2 Hash", "wisun.gtkhashie.gtk2", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_wisun_gtkhashie_gtk3,
- { "GTK3 Hash", "wisun.gtkhashie.gtk3", FT_UINT64, BASE_HEX, NULL, 0x0,
+ { "GTK3 Hash", "wisun.gtkhashie.gtk3", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
&ett_wisun_fcie,
&ett_wisun_rslie,
&ett_wisun_vhie,
+ &ett_wisun_eaie,
&ett_wisun_pie,
&ett_wisun_wsie_bitmap,
&ett_wisun_usie,