From 96c8c830869c9e7e896a67ad30360195cff0c4d8 Mon Sep 17 00:00:00 2001 From: Robert Sauter Date: Wed, 28 Jun 2017 10:17:02 +0200 Subject: IEEE 802.15.4: Whitespace and small comment cleanups No code changes. Change-Id: I282334594be476596f30e8396fe66a995e3e0292 Reviewed-on: https://code.wireshark.org/review/22439 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-ieee802154.c | 539 ++++++++++++++++++------------------ 1 file changed, 271 insertions(+), 268 deletions(-) diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index 097d61f89d..1d292c74bb 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -152,8 +152,7 @@ UAT_HEX_CB_DEF(addr_uat, pan, static_addr_t) UAT_BUFFER_CB_DEF(addr_uat, eui64, static_addr_t, eui64, eui64_len) /* - * Key Decryption UAT - * + * Decryption Keys UAT */ /* UAT variables */ @@ -297,7 +296,7 @@ static tvbuff_t *dissect_ieee802154_decrypt(tvbuff_t *, guint, packet_info *, ie static gboolean ieee802154_set_mac_key(ieee802154_packet *packet, unsigned char *key, unsigned char *alt_key, ieee802154_key_t* uat_key); -/* Initialize Protocol and Registered fields */ +/* Initialize Protocol and Registered fields */ static int proto_ieee802154_nonask_phy = -1; static int hf_ieee802154_nonask_phy_preamble = -1; static int hf_ieee802154_nonask_phy_sfd = -1; @@ -421,7 +420,7 @@ static int hf_ieee802154_rssi = -1; static int hf_ieee802154_fcs_ok = -1; static int hf_ieee802154_correlation = -1; -/* Registered fields for Command Packets */ +/* Registered fields for Command Packets */ static int hf_ieee802154_cmd_id = -1; static int hf_ieee802154_cinfo_alt_coord = -1; static int hf_ieee802154_cinfo_device_type = -1; @@ -441,7 +440,7 @@ static int hf_ieee802154_gtsreq_len = -1; static int hf_ieee802154_gtsreq_dir = -1; static int hf_ieee802154_gtsreq_type = -1; -/* Registered fields for Beacon Packets */ +/* Registered fields for Beacon Packets */ static int hf_ieee802154_beacon_order = -1; static int hf_ieee802154_superframe_order = -1; static int hf_ieee802154_cap = -1; @@ -455,7 +454,7 @@ static int hf_ieee802154_gts_address = -1; static int hf_ieee802154_pending16 = -1; static int hf_ieee802154_pending64 = -1; -/* Registered fields for Auxiliary Security Header */ +/* Registered fields for Auxiliary Security Header */ static int hf_ieee802154_aux_security_header = -1; static int hf_ieee802154_aux_sec_security_control = -1; static int hf_ieee802154_aux_sec_security_level = -1; @@ -474,7 +473,7 @@ static int hf_ieee802154_key_number = -1; static int hf_ieee802154_sec_frame_counter = -1; static int hf_ieee802154_sec_key_sequence_counter = -1; -/* Initialize Subtree Pointers */ +/* Initialize Subtree Pointers */ static gint ett_ieee802154_nonask_phy = -1; static gint ett_ieee802154_nonask_phy_phr = -1; static gint ett_ieee802154 = -1; @@ -746,11 +745,11 @@ static const value_string ieee802154_psie_names[] = { }; static const value_string zboss_page_names[] = { - { 0, "2.4 GHz" }, - { 28, "863-868 MHz band"}, - { 29, "868-870, 870-876 MHz band" }, - { 30, "870-876 MHz band" }, - { 31, "915-921 MHz band" }, + { 0, "2.4 GHz" }, + { 28, "863-868 MHz band"}, + { 29, "868-870, 870-876 MHz band" }, + { 30, "870-876 MHz band" }, + { 31, "915-921 MHz band" }, { 0, NULL } }; @@ -867,13 +866,13 @@ static int ieee802_15_4_short_address_len(void) /** * Dissector helper, parses and displays the frame control field. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields - *@param tree pointer to data tree wireshark uses to display packet. - *@param packet IEEE 802.15.4 packet information. - *@param offset offset into the tvb to find the FCF. + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields + * @param tree pointer to data tree wireshark uses to display packet. + * @param packet IEEE 802.15.4 packet information. + * @param offset offset into the tvb to find the FCF. * -*/ + */ static void dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet, guint *offset) { @@ -1039,13 +1038,13 @@ tvbuff_t *dissect_ieee802154_payload(tvbuff_t * tvb, guint offset, packet_info * return payload_tvb; } -/* - *Dissector for IEEE 802.15.4 non-ASK PHY packet with an FCS containing a 16-bit CRC value. +/** + * Dissector for IEEE 802.15.4 non-ASK PHY packet with an FCS containing a 16-bit CRC value. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields - *@param tree pointer to data tree wireshark uses to display packet. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields + * @param tree pointer to data tree wireshark uses to display packet. + */ static int dissect_ieee802154_nonask_phy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { @@ -1065,26 +1064,26 @@ dissect_ieee802154_nonask_phy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* Add the protocol name. */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "IEEE 802.15.4 non-ASK PHY"); - phr=tvb_get_guint8(tvb,offset+4+1); + phr = tvb_get_guint8(tvb,offset+4+1); - if(tree) { - guint loffset=offset; + if (tree) { + guint loffset = offset; static const int * phr_fields[] = { &hf_ieee802154_nonask_phy_length, NULL }; proto_tree_add_item(ieee802154_tree, hf_ieee802154_nonask_phy_preamble, tvb, loffset, 4, ENC_LITTLE_ENDIAN); - loffset+=4; + loffset +=4 ; proto_tree_add_item(ieee802154_tree, hf_ieee802154_nonask_phy_sfd, tvb, loffset, 1, ENC_LITTLE_ENDIAN); - loffset+=1; + loffset +=1 ; proto_tree_add_bitmask(ieee802154_tree, tvb, loffset, hf_ieee802154_nonask_phr, ett_ieee802154_nonask_phy_phr, phr_fields, ENC_NA); } - offset+=4+2*1; - mac=tvb_new_subset_length_caplen(tvb,offset,-1, phr & IEEE802154_PHY_LENGTH_MASK); + offset += 4+2*1; + mac = tvb_new_subset_length_caplen(tvb,offset,-1, phr & IEEE802154_PHY_LENGTH_MASK); /* Call the common dissector. */ dissect_ieee802154(mac, pinfo, ieee802154_tree, NULL); @@ -1092,12 +1091,12 @@ dissect_ieee802154_nonask_phy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre } /* dissect_ieee802154_nonask_phy */ /** - *Dissector for IEEE 802.15.4 packet with an FCS containing a 16-bit CRC value. + * Dissector for IEEE 802.15.4 packet with an FCS containing a 16-bit CRC value. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields. - *@param tree pointer to data tree wireshark uses to display packet. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields. + * @param tree pointer to data tree wireshark uses to display packet. + */ static int dissect_ieee802154(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { @@ -1121,11 +1120,11 @@ dissect_ieee802154(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da /** * Dissector for IEEE 802.15.4 packet with no FCS present. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields - *@param tree pointer to data tree wireshark uses to display packet. - *@return captured length. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields + * @param tree pointer to data tree wireshark uses to display packet. + * @return captured length. + */ static int dissect_ieee802154_nofcs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * data _U_) { @@ -1148,11 +1147,11 @@ dissect_ieee802154_nofcs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo /** * Dissector for IEEE 802.15.4 packet dump produced by ZBOSS * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields - *@param tree pointer to data tree wireshark uses to display packet. - *@return new tvb subset if this is really ZBOSS dump, else oririnal tvb. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields + * @param tree pointer to data tree wireshark uses to display packet. + * @return new tvb subset if this is really ZBOSS dump, else oririnal tvb. + */ static tvbuff_t * dissect_zboss_specific(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { @@ -1194,14 +1193,14 @@ dissect_zboss_specific(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) } /* dissect_zboss_heur */ /** - *Dissector for IEEE 802.15.4 packet with a ChipCon/Texas - *Instruments compatible FCS. This is typically called by - *layers encapsulating an IEEE 802.15.4 packet. + * Dissector for IEEE 802.15.4 packet with a ChipCon/Texas + * Instruments compatible FCS. This is typically called by + * layers encapsulating an IEEE 802.15.4 packet. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields - *@param tree pointer to data tree wireshark uses to display packet. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields + * @param tree pointer to data tree wireshark uses to display packet. + */ static int dissect_ieee802154_cc24xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * data _U_) { @@ -1211,23 +1210,23 @@ dissect_ieee802154_cc24xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v } /* dissect_ieee802154_cc24xx */ /** - *IEEE 802.15.4 packet dissection routine for Wireshark. + * IEEE 802.15.4 packet dissection routine for Wireshark. * - *This function extracts all the information first before displaying. - *If payload exists, that portion will be passed into another dissector - *for further processing. + * This function extracts all the information first before displaying. + * If payload exists, that portion will be passed into another dissector + * for further processing. * - *This is called after the individual dissect_ieee802154* functions - *have been called to determine what sort of FCS is present. - *The dissect_ieee802154* functions will set the parameters - *in the ieee802154_packet structure, and pass it to this one - *through the data parameter. + * This is called after the individual dissect_ieee802154* functions + * have been called to determine what sort of FCS is present. + * The dissect_ieee802154* functions will set the parameters + * in the ieee802154_packet structure, and pass it to this one + * through the data parameter. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields - *@param tree pointer to data tree wireshark uses to display packet. - *@param options bitwise or of dissector options (see DISSECT_IEEE802154_OPTION_xxx). -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields + * @param tree pointer to data tree wireshark uses to display packet. + * @param options bitwise or of dissector options (see DISSECT_IEEE802154_OPTION_xxx). + */ static void dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint options) { @@ -1255,7 +1254,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g packet->short_table = ieee802154_map.short_table; /* Allocate frame data with hints for upper layers */ - if(!pinfo->fd->flags.visited){ + if (!pinfo->fd->flags.visited) { ieee_hints = wmem_new0(wmem_file_scope(), ieee802154_hints_t); p_add_proto_data(wmem_file_scope(), pinfo, proto_ieee802154, 0, ieee_hints); } else { @@ -1286,15 +1285,15 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g expert_add_info(pinfo, proto_root, &ei_ieee802154_seqno_suppression); } } else { /* IEEE 802.15.4 Sequence Number Suppression */ - packet->seqno = tvb_get_guint8(tvb, offset); - if (tree) { - proto_tree_add_uint(ieee802154_tree, hf_ieee802154_seqno, tvb, offset, 1, packet->seqno); - /* For Ack packets display this in the root. */ - if (packet->frame_type == IEEE802154_FCF_ACK) { - proto_item_append_text(proto_root, ", Sequence Number: %u", packet->seqno); + packet->seqno = tvb_get_guint8(tvb, offset); + if (tree) { + proto_tree_add_uint(ieee802154_tree, hf_ieee802154_seqno, tvb, offset, 1, packet->seqno); + /* For Ack packets display this in the root. */ + if (packet->frame_type == IEEE802154_FCF_ACK) { + proto_item_append_text(proto_root, ", Sequence Number: %u", packet->seqno); + } } - } - offset += 1; + offset += 1; } /* @@ -1684,7 +1683,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g } } - /* Existance of the Auxiliary Security Header is controlled by the Security Enabled Field */ + /* Existence of the Auxiliary Security Header is controlled by the Security Enabled Field */ if ((packet->security_enable) && (packet->version != IEEE802154_VERSION_2003)) { dissect_ieee802154_aux_sec_header_and_key(tvb, pinfo, ieee802154_tree, packet, &offset); } @@ -1703,7 +1702,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g if (packet->frame_type == IEEE802154_FCF_CMD) { /** - * In IEEE802.15.4-2003 and 2006 the command identifier is considered to be part of the header + * In IEEE802.15.4-2003 and 2006 the command identifier is considered to be part of the header * and is thus not encrypted. For IEEE802.15.4-2012e and later the command id is considered to be * part of the payload, is encrypted, and follows the payload IEs. Thus we only parse the command id * here for 2006 and earlier frames. */ @@ -1824,7 +1823,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g offset = 0; - /* presence of Payload IEs is defined by the termination of the Header IEs */ + /* Presence of Payload IEs is defined by the termination of the Header IEs */ if (packet->payload_ie_present) { offset += dissect_ieee802154_payload_ie(payload_tvb, pinfo, ieee802154_tree, offset); } @@ -1847,8 +1846,8 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g } if (offset > 0) { - payload_tvb = tvb_new_subset_remaining(payload_tvb, offset); - offset = 0; + payload_tvb = tvb_new_subset_remaining(payload_tvb, offset); + offset = 0; } /* If it is ok to dissect bad FCS, FCS might be absent, so still dissect @@ -1978,17 +1977,18 @@ dissect_ieee802154_fcs: } /* dissect_ieee802154_common */ /** - * Subdissector for the MLME Channel Hopping IE + * Subdissector for the MLME Channel Hopping Payload IE * * Reference: IEEE 802.15.4-2015 - 7.4.4.31 Channel hopping IE * - *@param tvb pointer to buffer containing raw packet. - *@param tree pointer to data tree wireshark uses to display packet. - *@param psie_remaining size of the Information Element. - *@param offset offset into the tvbuff to begin dissection. + * @param tvb pointer to buffer containing raw packet. + * @param tree pointer to data tree wireshark uses to display packet. + * @param psie_remaining size of the Information Element. + * @param offset offset into the tvbuff to begin dissection. */ static void -dissect_802154_channel_hopping(tvbuff_t *tvb, proto_tree *tree, guint16 psie_remaining, guint *offset){ +dissect_802154_channel_hopping(tvbuff_t *tvb, proto_tree *tree, guint16 psie_remaining, guint *offset) +{ proto_item *tsch_channel_hopping_data_item = NULL; proto_tree *tsch_channel_hopping_data_tree = NULL; static const int * fields_long[] = { @@ -2005,21 +2005,22 @@ dissect_802154_channel_hopping(tvbuff_t *tvb, proto_tree *tree, guint16 psie_rem proto_tree_add_item(tsch_channel_hopping_data_tree, hf_ieee802154_tsch_hopping_sequence_id, tvb, (*offset), 1, ENC_LITTLE_ENDIAN); - if (psie_remaining > 1){ + if (psie_remaining > 1) { proto_tree_add_item(tsch_channel_hopping_data_tree, hf_ieee802154_mlme_ie_data, tvb, *offset, psie_remaining, ENC_NA); } *offset += psie_remaining; } /* dissect_802154_channel_hopping */ /** - *Subdissector command for the Payload Information Element MLME TSCH Synchronization + * Subdissector for the Payload Information Element MLME TSCH Synchronization * - *@param tvb pointer to buffer containing raw packet. - *@param tree pointer to data tree wireshark uses to display packet. - *@param offset offset into the tvbuff to begin dissection. + * @param tvb pointer to buffer containing raw packet. + * @param tree pointer to data tree wireshark uses to display packet. + * @param offset offset into the tvbuff to begin dissection. */ static void -dissect_802154_tsch_time_sync(tvbuff_t *tvb, proto_tree *tree, int *offset, guint psie_remaining) { +dissect_802154_tsch_time_sync(tvbuff_t *tvb, proto_tree *tree, int *offset, guint psie_remaining) +{ proto_item *tsch_sync_data_item = NULL; proto_tree *tsch_sync_data_tree = NULL; @@ -2037,16 +2038,17 @@ dissect_802154_tsch_time_sync(tvbuff_t *tvb, proto_tree *tree, int *offset, guin }/* dissect_802154_tsch_time_sync*/ /** - *Subdissector command for the Payload Information Element MLME TSCH Slotframe and Link + * Subdissector for the Payload Information Element MLME TSCH Slotframe and Link * - *@param tvb pointer to buffer containing raw packet. - *@param tree pointer to data tree wireshark uses to display packet. - *@param psie_remaining size of the Information Element. - *@param offset offset into the tvbuff to begin dissection. + * @param tvb pointer to buffer containing raw packet. + * @param tree pointer to data tree wireshark uses to display packet. + * @param psie_remaining size of the Information Element. + * @param offset offset into the tvbuff to begin dissection. */ static void dissect_802154_tsch_slotframe_link(tvbuff_t *tvb, proto_tree *tree, guint16 psie_remaining, guint16 psie_id, - guint *offset){ + guint *offset) +{ guint8 nb_slotframes; guint8 nb_slotframes_aux; guint8 nb_links; @@ -2077,7 +2079,7 @@ dissect_802154_tsch_slotframe_link(tvbuff_t *tvb, proto_tree *tree, guint16 psie *offset += 1; slotframe_index = 1; - while(nb_slotframes_aux > 0){ + while (nb_slotframes_aux > 0) { nb_links = tvb_get_guint8(tvb, *offset + 3); nb_links_aux = nb_links; @@ -2105,13 +2107,13 @@ dissect_802154_tsch_slotframe_link(tvbuff_t *tvb, proto_tree *tree, guint16 psie }/* dissect_802154_tsch_slotframe_link */ /** - *Subdissector command for the 6TOP Protocol contained within the Payload Information Elements. + * Subdissector for the 6TOP Protocol contained within the Payload Information Elements. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields. - *@param p_inf_elem_tree pointer to data tree wireshark uses to display packet. - *@param offset offset into the tvbuff to begin dissection. - *@param pie_length size of the 6TOP message + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields. + * @param p_inf_elem_tree pointer to data tree wireshark uses to display packet. + * @param offset offset into the tvbuff to begin dissection. + * @param pie_length size of the 6TOP message */ static int dissect_ieee802154_6top(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_inf_elem_tree, guint offset, gint pie_length) @@ -2192,7 +2194,7 @@ dissect_ieee802154_6top(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_inf_ele pie_length -= 5; if (type == IETF_6TOP_TYPE_REQUEST) { - switch(code) { + switch (code) { case IETF_6TOP_CMD_ADD: case IETF_6TOP_CMD_DELETE: if (pie_length < 4) { @@ -2276,7 +2278,7 @@ dissect_ieee802154_6top(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_inf_ele if (have_cell_list) { cell_list_tree = proto_tree_add_subtree_format(sixtop_tree, tvb, offset, pie_length, ett_ieee802154_p_ie_6top_cell_list, NULL, "Cell List"); - for (i = 0; pie_length > 0; pie_length -= 4, offset += 4, i++){ + for (i = 0; pie_length > 0; pie_length -= 4, offset += 4, i++) { cell_tree = proto_tree_add_subtree_format(cell_list_tree, tvb, offset, 4, ett_ieee802154_p_ie_6top_cell, NULL, "Cell [%u]", i); proto_tree_add_item(cell_tree, hf_ieee802154_6top_slot_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2288,13 +2290,13 @@ dissect_ieee802154_6top(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_inf_ele } /* dissect_ieee802154_6top */ /** - *Subdissector command for the Superframe specification sub-field within the beacon frame. + * Subdissector for the Superframe specification sub-field within the beacon frame. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to command subtree. - *@param offset offset into the tvbuff to begin dissection. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to command subtree. + * @param offset offset into the tvbuff to begin dissection. + */ void dissect_ieee802154_superframe(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset) { @@ -2313,13 +2315,13 @@ dissect_ieee802154_superframe(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree } /* dissect_ieee802154_superframe */ /** - *Subdissector command for the GTS information fields within the beacon frame. + * Subdissector for the GTS information fields within the beacon frame. * - *@param tvb - pointer to buffer containing raw packet. - *@param pinfo - pointer to packet information fields (unused). - *@param tree - pointer to command subtree. - *@param offset - offset into the tvbuff to begin dissection. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to command subtree. + * @param offset offset into the tvbuff to begin dissection. + */ void dissect_ieee802154_gtsinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset) { @@ -2392,13 +2394,13 @@ dissect_ieee802154_gtsinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr } /* dissect_ieee802154_gtsinfo */ /** - *Subdissector command for the pending address list fields within the beacon frame. + * Subdissector for the pending address list fields within the beacon frame. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to command subtree. - *@offset offset into the tvbuff to begin dissection. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to command subtree. + * @param offset into the tvbuff to begin dissection. + */ void dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset) { @@ -2444,7 +2446,7 @@ dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t * @param ett tree index * @param new_item pointer to store the item created for this Header IE * @returns the tree created for the Header IE -*/ + */ static proto_tree* create_header_ie_tree(tvbuff_t *tvb, proto_tree *tree, guint offset, guint ie_length, int hf, gint ett, proto_item** new_item) { @@ -2644,16 +2646,15 @@ dissect_ieee802154_header_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } /* dissect_ieee802154_header_ie */ /** - * Subdissector command for MAC Layer Management Entitiy (MLME) - * Payload Sub IEs (Information Elements) + * Subdissector for MAC Layer Management Entitiy (MLME) Payload Sub IEs * * Reference: IEEE 802.15.4-2015: 7.4.3.2 MLME IE * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to command subtree. - *@param offset offset into the tvbuff to begin dissection. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to command subtree. + * @param offset offset into the tvbuff to begin dissection. + */ static int dissect_ieee802154_payload_mlme_sub_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset) { @@ -2811,11 +2812,13 @@ dissect_ieee802154_payload_mlme_sub_ie(tvbuff_t *tvb, packet_info *pinfo _U_, pr } /** + * Subdissector for MAC Layer Management Entitiy (MLME) Payload Sub IEs * * Reference: IEEE 802.15.4-2015 - 7.4.4.4 TSCH Timeslot IE */ static void -dissect_802154_tsch_timeslot(tvbuff_t *tvb, proto_tree *tree, guint psie_remaining, guint16 psie_id, int *offset){ +dissect_802154_tsch_timeslot(tvbuff_t *tvb, proto_tree *tree, guint psie_remaining, guint16 psie_id, int *offset) +{ proto_tree * timeslot_tree; proto_item * timeslot_item; @@ -2834,8 +2837,8 @@ dissect_802154_tsch_timeslot(tvbuff_t *tvb, proto_tree *tree, guint psie_remaini } static void -dissect_802154_enhanced_beacon_filter(tvbuff_t *tvb, proto_tree *tree, guint16 psie_remaining, gint *offset){ - +dissect_802154_enhanced_beacon_filter(tvbuff_t *tvb, proto_tree *tree, guint16 psie_remaining, gint *offset) +{ guint8 filter; guint8 attr_len; guint32 attr_bitmap = 0; @@ -2882,14 +2885,14 @@ dissect_802154_enhanced_beacon_filter(tvbuff_t *tvb, proto_tree *tree, guint16 p } /** - *Subdissector command for Vendor Specific IEs (Information Elements) + * Subdissector for Vendor Specific IEs (Information Elements) * - *@param tvb pointer to buffer containing the Vendor Specific IE - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to command subtree. - *@param offset offset into the tvbuff to begin dissection. - *@param pie_length the length of the Vendor Payload IE -*/ + * @param tvb pointer to buffer containing the Vendor Specific IE + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to command subtree. + * @param offset offset into the tvbuff to begin dissection. + * @param pie_length the length of the Vendor Payload IE + */ static int dissect_ieee802154_vendor_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, gint pie_length) { @@ -2920,13 +2923,13 @@ dissect_ieee802154_vendor_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } /** - *Subdissector command for Payload IEs (Information Elements) + * Subdissector for Payload IEs (Information Elements) * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to command subtree. - *@param offset offset into the tvbuff to begin dissection. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to command subtree. + * @param offset offset into the tvbuff to begin dissection. + */ static int dissect_ieee802154_payload_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset) { @@ -3022,13 +3025,13 @@ static const true_false_string tfs_cinfo_device_type = { "FFD", "RFD" }; static const true_false_string tfs_cinfo_power_src = { "AC/Mains Power", "Battery" }; /** - *Command subdissector routine for the Association request command. + * Command subdissector routine for the Association request command. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields. - *@param tree pointer to protocol tree. - *@param packet IEEE 802.15.4 packet information. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields. + * @param tree pointer to protocol tree. + * @param packet IEEE 802.15.4 packet information. + */ static void dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet) @@ -3062,13 +3065,13 @@ dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } /* dissect_ieee802154_assoc_req */ /** - *Command subdissector routine for the Association response command. + * Command subdissector routine for the Association response command. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields. - *@param tree pointer to protocol tree. - *@param packet IEEE 802.15.4 packet information. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields. + * @param tree pointer to protocol tree. + * @param packet IEEE 802.15.4 packet information. + */ static void dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet) { @@ -3128,11 +3131,11 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /** * Command subdissector routine for the Disassociate command. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields. - *@param tree pointer to protocol tree. - *@param packet IEEE 802.15.4 packet information. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields. + * @param tree pointer to protocol tree. + * @param packet IEEE 802.15.4 packet information. + */ static void dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet) { @@ -3148,7 +3151,7 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, reason = tvb_get_guint8(tvb, 0); if (tree) { ti = proto_tree_add_uint(subtree, hf_ieee802154_disassoc_reason, tvb, 0, 1, reason); - switch(reason) { + switch (reason) { case 0x01: proto_item_append_text(ti, " (Coordinator requests device to leave)"); break; @@ -3181,11 +3184,11 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /** * Command subdissector routine for the Coordinator Realignment command. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields. - *@param tree pointer to protocol tree. - *@param packet IEEE 802.15.4 packet information. -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields. + * @param tree pointer to protocol tree. + * @param packet IEEE 802.15.4 packet information. + */ static void dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet) { @@ -3255,18 +3258,18 @@ static const true_false_string tfs_gtsreq_dir = { "Receive", "Transmit" }; static const true_false_string tfs_gtsreq_type= { "Allocate GTS", "Deallocate GTS" }; /** - *Command subdissector routine for the GTS request command. + * Command subdissector routine for the GTS request command. * - *Assumes that COL_INFO will be set to the command name, - *command name will already be appended to the command subtree - *and protocol root. In addition, assumes that the command ID - *has already been parsed. + * Assumes that COL_INFO will be set to the command name, + * command name will already be appended to the command subtree + * and protocol root. In addition, assumes that the command ID + * has already been parsed. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to protocol tree. - *@param packet IEEE 802.15.4 packet information (unused). -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to protocol tree. + * @param packet IEEE 802.15.4 packet information (unused). + */ static void dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet) @@ -3294,11 +3297,11 @@ dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i /** * Subdissector routine all commands. * - *@param tvb pointer to buffer containing raw packet. - *@param pinfo pointer to packet information fields (unused). - *@param tree pointer to protocol tree. - *@param packet IEEE 802.15.4 packet information (unused). -*/ + * @param tvb pointer to buffer containing raw packet. + * @param pinfo pointer to packet information fields (unused). + * @param tree pointer to protocol tree. + * @param packet IEEE 802.15.4 packet information (unused). + */ static void dissect_ieee802154_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet) { @@ -3405,19 +3408,19 @@ dissect_ieee802154_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } /* dissect_ieee802154_command */ /** - *IEEE 802.15.4 decryption algorithm. Tries to find the - *appropriate key from the information in the IEEE 802.15.4 - *packet structure and dissector config. + * IEEE 802.15.4 decryption algorithm. Tries to find the + * appropriate key from the information in the IEEE 802.15.4 + * packet structure and dissector config. * - *This function implements the security proceedures for the - *2006 version of the spec only. IEEE 802.15.4-2003 is - *unsupported. - *@param tvb IEEE 802.15.4 packet. - *@param pinfo Packet info structure. - *@param offset Offset where the ciphertext 'c' starts. - *@param packet IEEE 802.15.4 packet information. - *@return decrypted payload. -*/ + * This function implements the security proceedures for the + * 2006 version of the spec only. IEEE 802.15.4-2003 is + * unsupported. + * @param tvb IEEE 802.15.4 packet. + * @param pinfo Packet info structure. + * @param offset Offset where the ciphertext 'c' starts. + * @param packet IEEE 802.15.4 packet information. + * @return decrypted payload. + */ static tvbuff_t * dissect_ieee802154_decrypt(tvbuff_t *tvb, guint offset, @@ -3583,16 +3586,16 @@ dissect_ieee802154_decrypt(tvbuff_t *tvb, } /* dissect_ieee802154_decrypt */ /** - *Creates the CCM* initial block value for IEEE 802.15.4. + * Creates the CCM* initial block value for IEEE 802.15.4. * - *@param block Output pointer for the initial block. - *@param adata TRUE if additional auth data is present - *@param M CCM* parameter M. - *@param addr Source extended address. - *@param frame_counter Packet frame counter - *@param level Security level or key_sequence_counter for 802.15.4-2003 - *@param ctr_val Value in the last L bytes of the block. -*/ + * @param block Output pointer for the initial block. + * @param adata TRUE if additional auth data is present + * @param M CCM* parameter M. + * @param addr Source extended address. + * @param frame_counter Packet frame counter + * @param level Security level or key_sequence_counter for 802.15.4-2003 + * @param ctr_val Value in the last L bytes of the block. + */ void ccm_init_block(gchar *block, gboolean adata, gint M, guint64 addr, guint32 frame_counter, guint8 level, gint ctr_val) { @@ -3623,16 +3626,16 @@ ccm_init_block(gchar *block, gboolean adata, gint M, guint64 addr, guint32 frame block[i] = (guint8)((ctr_val >> 0) & 0xff); } /* ccm_init_block */ -/* +/** * Perform an in-place CTR-mode encryption/decryption. * - *@param key Encryption Key. - *@param iv Counter initial value. - *@param mic MIC to encrypt/decrypt. - *@param data Buffer to encrypt/decrypt. - *@param length Length of the buffer. - *@return TRUE on SUCCESS, FALSE on error. -*/ + * @param key Encryption Key. + * @param iv Counter initial value. + * @param mic MIC to encrypt/decrypt. + * @param data Buffer to encrypt/decrypt. + * @param length Length of the buffer. + * @return TRUE on SUCCESS, FALSE on error. + */ gboolean ccm_ctr_encrypt(const gchar *key, const gchar *iv, gchar *mic, gchar *data, gint length) { @@ -3670,16 +3673,16 @@ ccm_ctr_encrypt(const gchar *key, const gchar *iv, gchar *mic, gchar *data, gint } /* ccm_ctr_encrypt */ /** - *Generate a CBC-MAC of the decrypted payload and additional authentication headers. - *@param key Encryption Key. - *@param iv Counter initial value. - *@param a Additional auth headers. - *@param a_len Length of the additional headers. - *@param m Plaintext message. - *@param m_len Length of plaintext message. - *@param mic Output for CBC-MAC. - *@return TRUE on SUCCESS, FALSE on error. -*/ + * Generate a CBC-MAC of the decrypted payload and additional authentication headers. + * @param key Encryption Key. + * @param iv Counter initial value. + * @param a Additional auth headers. + * @param a_len Length of the additional headers. + * @param m Plaintext message. + * @param m_len Length of plaintext message. + * @param mic Output for CBC-MAC. + * @return TRUE on SUCCESS, FALSE on error. + */ gboolean ccm_cbc_mac(const gchar *key, const gchar *iv, const gchar *a, gint a_len, const gchar *m, gint m_len, gchar *mic) { @@ -3823,14 +3826,14 @@ static gboolean ieee802154_set_mac_key(ieee802154_packet *packet, unsigned char } /** - *Creates a record that maps the given short address and pan to a long (extended) address. - *@param short_addr 16-bit short address - *@param pan 16-bit PAN id - *@param long_addr 64-bit long (extended) address - *@param proto pointer to name of current protocol - *@param fnum Frame number this mapping became valid - *@return TRUE Record was updated, FALSE Couldn't find it -*/ + * Creates a record that maps the given short address and pan to a long (extended) address. + * @param short_addr 16-bit short address + * @param pan 16-bit PAN id + * @param long_addr 64-bit long (extended) address + * @param proto pointer to name of current protocol + * @param fnum Frame number this mapping became valid + * @return TRUE Record was updated, FALSE Couldn't find it + */ ieee802154_map_rec *ieee802154_addr_update(ieee802154_map_tab_t *au_ieee802154_map, guint16 short_addr, guint16 pan, guint64 long_addr, const char *proto, guint fnum) { @@ -3884,15 +3887,15 @@ ieee802154_map_rec *ieee802154_addr_update(ieee802154_map_tab_t *au_ieee802154_m } /* ieee802154_addr_update */ /** - *Marks a mapping record associated with device with short_addr - *as invalid at a certain frame number, typically when a - *disassociation occurs. + * Marks a mapping record associated with device with short_addr + * as invalid at a certain frame number, typically when a + * disassociation occurs. * - *@param short_addr 16-bit short address - *@param pan 16-bit PAN id - *@param fnum Frame number when mapping became invalid - *@return TRUE Record was updated, FALSE Couldn't find it -*/ + * @param short_addr 16-bit short address + * @param pan 16-bit PAN id + * @param fnum Frame number when mapping became invalid + * @return TRUE Record was updated, FALSE Couldn't find it + */ gboolean ieee802154_short_addr_invalidate(guint16 short_addr, guint16 pan, guint fnum) { ieee802154_short_addr addr16; @@ -3916,10 +3919,10 @@ gboolean ieee802154_short_addr_invalidate(guint16 short_addr, guint16 pan, guint * as invalid at a certain frame number, typically when a * disassociation occurs. * - *@param long_addr 16-bit short address - *@param fnum Frame number when mapping became invalid - *@return TRUE If record was updated, FALSE otherwise -*/ + * @param long_addr 16-bit short address + * @param fnum Frame number when mapping became invalid + * @return TRUE If record was updated, FALSE otherwise + */ gboolean ieee802154_long_addr_invalidate(guint64 long_addr, guint fnum) { ieee802154_map_rec *map_rec; @@ -3939,7 +3942,7 @@ gboolean ieee802154_long_addr_invalidate(guint64 long_addr, guint fnum) * tables for mapping between 16-bit to 64-bit addresses and * populates them with static address pairs from a UAT * preference table. -*/ + */ static void proto_init_ieee802154(void) { @@ -3956,7 +3959,7 @@ proto_init_ieee802154(void) /** * Cleanup for the IEEE 802.15.4 dissector. -*/ + */ static void proto_cleanup_ieee802154(void) { @@ -3988,7 +3991,7 @@ static gpointer ieee802154_da_value(packet_info *pinfo _U_) /** * IEEE 802.15.4 protocol registration routine. -*/ + */ void proto_register_ieee802154(void) { /* Protocol fields */ @@ -4008,7 +4011,7 @@ void proto_register_ieee802154(void) IEEE802154_PHY_LENGTH_MASK, NULL, HFILL }}, { &hf_ieee802154_nonask_phr, - { "PHR", "wpan-nonask-phy.phr", FT_UINT8, BASE_HEX, NULL, + { "PHR", "wpan-nonask-phy.phr", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, }; @@ -4205,7 +4208,7 @@ void proto_register_ieee802154(void) { "Enhanced Beacon Filter IE", "wpan.enhanced_beacon_filter", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_payload_ie_tlv, - { "Payload IE TLV", "wpan.payload_ie_tlv", FT_UINT16, BASE_HEX, NULL, + { "Payload IE TLV", "wpan.payload_ie_tlv", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_payload_ie_type, @@ -4237,7 +4240,7 @@ void proto_register_ieee802154(void) IEEE802154_PSIE_LENGTH_MASK_SHORT, NULL, HFILL }}, { &hf_ieee802154_psie_long, - { "Payload Sub IE (long)", "wpan.payload_sub_ie.long", FT_UINT16, BASE_HEX, NULL, + { "Payload Sub IE (long)", "wpan.payload_sub_ie.long", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_psie_type_long, @@ -4261,40 +4264,40 @@ void proto_register_ieee802154(void) NULL, HFILL }}, { &hf_ieee802154_tsch_asn, - { "Absolute Slot Number", "wpan.tsch.asn", FT_UINT40, BASE_DEC, NULL, 0x0, + { "Absolute Slot Number", "wpan.tsch.asn", FT_UINT40, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_join_metric, - { "Join Metric", "wpan.tsch.join_metric", FT_UINT8, BASE_DEC, NULL, 0x0, + { "Join Metric", "wpan.tsch.join_metric", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_channel_hopping, - { "Channel Hopping IE", "wpan.channel_hopping", FT_NONE, BASE_NONE, NULL, 0x0, + { "Channel Hopping IE", "wpan.channel_hopping", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotframe, - { "Slotframe IE", "wpan.tsch.slotframe", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { "Slotframe IE", "wpan.tsch.slotframe", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotframe_list, - { "Slotframe info list", "wpan.tsch.slotframe_list", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { "Slotframe info list", "wpan.tsch.slotframe_list", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_link_info, - { "Link Information", "wpan.tsch.link_info", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { "Link Information", "wpan.tsch.link_info", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_link_nb_slotf, - { "Number of Slotframes", "wpan.tsch.slotframe_num", FT_UINT8, BASE_DEC, NULL, 0x0, + { "Number of Slotframes", "wpan.tsch.slotframe_num", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_link_slotf_handle, - { "Slotframe handle", "wpan.tsch.slotframe_handle", FT_UINT8, BASE_DEC, NULL, 0x0, + { "Slotframe handle", "wpan.tsch.slotframe_handle", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_size, - { "Slotframe size", "wpan.tsch.slotframe_size", FT_UINT16, BASE_DEC, NULL, 0x0, + { "Slotframe size", "wpan.tsch.slotframe_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_link_nb_links, - { "Number of Links", "wpan.tsch.nb_links", FT_UINT8, BASE_DEC, NULL, 0x0, + { "Number of Links", "wpan.tsch.nb_links", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_link_timeslot, @@ -4302,15 +4305,15 @@ void proto_register_ieee802154(void) NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_link_channel_offset, - { "Channel Offset", "wpan.tsch.channel_offset", FT_UINT16, BASE_DEC, NULL, 0x0, + { "Channel Offset", "wpan.tsch.channel_offset", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_slotf_link_options, - { "Link Options", "wpan.tsch.link_options", FT_UINT8, BASE_DEC, NULL, 0x0, + { "Link Options", "wpan.tsch.link_options", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_tsch_hopping_sequence_id, - { "Hopping Sequence ID", "wpan.tsch.hopping_sequence_id", FT_UINT8, BASE_HEX, NULL, 0x0, + { "Hopping Sequence ID", "wpan.tsch.hopping_sequence_id", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_psie_eb_filter_pjoin, @@ -4559,7 +4562,7 @@ void proto_register_ieee802154(void) "A flag defining the direction of the GTS Slot.", HFILL }}, { &hf_ieee802154_gts_address, - { "Address", "wpan.gts.address", FT_UINT16, BASE_HEX, NULL, 0x0, + { "Address", "wpan.gts.address", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_ieee802154_pending16, @@ -4901,7 +4904,7 @@ void proto_reg_handoff_ieee802154(void) static gboolean prefs_initialized = FALSE; static unsigned int old_ieee802154_ethertype; - if (!prefs_initialized){ + if (!prefs_initialized) { /* Get the dissector handles. */ zigbee_beacon_handle = find_dissector_add_dependency("zbee_beacon", proto_ieee802154); zigbee_ie_handle = find_dissector_add_dependency("zbee_ie", proto_ieee802154); -- cgit v1.2.1