diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-05-26 15:50:10 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-05-26 15:50:10 +0000 |
commit | a3f8b9e4c05b86c2bcd2d20f6c0c0c2d7c6f21d0 (patch) | |
tree | e52dffbeb6f09b22361195ffe6e9309a98c9ca28 | |
parent | 277980a6c696002eb5d26bcb3f72c9db54c70a90 (diff) |
zbee: Misc cleanup:
- Ethereal --> Wireshark
- Make fome fcns & vars static
- Spelling
- hf[] blurbs: "" --> NULL
- Remove some unneeded forward declarations
- packet-zep: rework reg_handoff to init handles only once
- Rename global 'get_bit_field' to 'zbee_get_bit_field'
...
svn path=/trunk/; revision=28487
-rw-r--r-- | epan/dissectors/packet-zbee-aps.c | 141 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 133 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-security.c | 32 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp-binding.c | 46 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp-discovery.c | 86 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp-management.c | 44 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp.c | 47 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee.h | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-zep.c | 66 |
9 files changed, 290 insertions, 312 deletions
diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c index 09c0268f80..5002b57361 100644 --- a/epan/dissectors/packet-zbee-aps.c +++ b/epan/dissectors/packet-zbee-aps.c @@ -34,7 +34,7 @@ #include <glib.h> #include <gmodule.h> #include <epan/packet.h> -#include <epan/prefs.h> +#include <epan/prefs.h> /* req'd for packet-zbee-security.h */ #include <epan/expert.h> #include <epan/reassemble.h> @@ -47,28 +47,25 @@ * Function Declarations * ************************* */ -/* Protocol Registration */ -void proto_init_zbee_aps (void); - /* Dissector Routines */ -void dissect_zbee_aps (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_zbee_aps_cmd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_zbee_apf (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static void dissect_zbee_aps (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static void dissect_zbee_aps_cmd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static void dissect_zbee_apf (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Command Dissector Helpers */ -guint dissect_zbee_aps_skke_challenge (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_skke_data (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_transport_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_update_device (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_remove_device (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_request_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_switch_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_auth_challenge (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_auth_data (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_aps_tunnel (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_skke_challenge (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_skke_data (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_transport_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_update_device (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_remove_device (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_request_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_switch_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_auth_challenge (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_auth_data (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_aps_tunnel (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); /* Helper routine. */ -guint zbee_apf_transaction_len (tvbuff_t *tvb, guint offset, guint8 type); +static guint zbee_apf_transaction_len (tvbuff_t *tvb, guint offset, guint8 type); /******************** * Global Variables * @@ -169,7 +166,7 @@ static const fragment_items zbee_aps_frag_items = { /* Field Names */ /********************/ /* Frame Type Names */ -const value_string zbee_aps_frame_types[] = { +static const value_string zbee_aps_frame_types[] = { { ZBEE_APS_FCF_DATA, "Data" }, { ZBEE_APS_FCF_CMD, "Command" }, { ZBEE_APS_FCF_ACK, "Ack" }, @@ -177,7 +174,7 @@ const value_string zbee_aps_frame_types[] = { }; /* Delivery Mode Names */ -const value_string zbee_aps_delivery_modes[] = { +static const value_string zbee_aps_delivery_modes[] = { { ZBEE_APS_FCF_UNICAST, "Unicast" }, { ZBEE_APS_FCF_INDIRECT, "Indirect" }, { ZBEE_APS_FCF_BCAST, "Broadcast" }, @@ -186,7 +183,7 @@ const value_string zbee_aps_delivery_modes[] = { }; /* Fragmentation Mode Names */ -const value_string zbee_aps_fragmentation_modes[] = { +static const value_string zbee_aps_fragmentation_modes[] = { { ZBEE_APS_EXT_FCF_FRAGMENT_NONE, "None" }, { ZBEE_APS_EXT_FCF_FRAGMENT_FIRST, "First Block" }, { ZBEE_APS_EXT_FCF_FRAGMENT_MIDDLE, "Middle Block" }, @@ -194,7 +191,7 @@ const value_string zbee_aps_fragmentation_modes[] = { }; /* APS Command Names */ -const value_string zbee_aps_cmd_names[] = { +static const value_string zbee_aps_cmd_names[] = { { ZBEE_APS_CMD_SKKE1, "SKKE-1" }, { ZBEE_APS_CMD_SKKE2, "SKKE-2" }, { ZBEE_APS_CMD_SKKE3, "SKKE-3" }, @@ -213,7 +210,7 @@ const value_string zbee_aps_cmd_names[] = { }; /* APS Key Names */ -const value_string zbee_aps_key_names[] = { +static const value_string zbee_aps_key_names[] = { { ZBEE_APS_CMD_KEY_TC_MASTER, "Trust Center Master Key" }, { ZBEE_APS_CMD_KEY_STANDARD_NWK, "Standard Network Key" }, { ZBEE_APS_CMD_KEY_APP_MASTER, "Application Master Key" }, @@ -224,14 +221,14 @@ const value_string zbee_aps_key_names[] = { }; /* APS Key Names (Entity-Authentication). */ -const value_string zbee_aps_ea_key_names[] = { +static const value_string zbee_aps_ea_key_names[] = { { ZBEE_APS_CMD_EA_KEY_NWK, "Network Key" }, { ZBEE_APS_CMD_EA_KEY_LINK, "Link Key" }, { 0, NULL } }; /* Update Device Status Names */ -const value_string zbee_aps_update_status_names[] = { +static const value_string zbee_aps_update_status_names[] = { { ZBEE_APS_CMD_UPDATE_STANDARD_SEC_REJOIN, "Standard device secured rejoin" }, { ZBEE_APS_CMD_UPDATE_STANDARD_UNSEC_JOIN, "Standard device unsecured join" }, { ZBEE_APS_CMD_UPDATE_LEAVE, "Device left" }, @@ -243,13 +240,13 @@ const value_string zbee_aps_update_status_names[] = { }; /* Outdated ZigBee 2004 Value Strings. */ -const value_string zbee_apf_type_names[] = { +static const value_string zbee_apf_type_names[] = { { ZBEE_APP_TYPE_KVP, "Key-Value Pair" }, { ZBEE_APP_TYPE_MSG, "Message" }, { 0, NULL } }; -const value_string zbee_apf_kvp_command_names[] = { +static const value_string zbee_apf_kvp_command_names[] = { { ZBEE_APP_KVP_SET, "Set" }, { ZBEE_APP_KVP_EVENT, "Event" }, { ZBEE_APP_KVP_GET_ACK, "Get Acknowledgement" }, @@ -261,7 +258,7 @@ const value_string zbee_apf_kvp_command_names[] = { { 0, NULL } }; -const value_string zbee_apf_kvp_type_names[] = { +static const value_string zbee_apf_kvp_type_names[] = { { ZBEE_APP_KVP_NO_DATA, "No Data" }, { ZBEE_APP_KVP_UINT8, "8-bit Unsigned Integer" }, { ZBEE_APP_KVP_INT8, "8-bit Signed Integer" }, @@ -283,12 +280,12 @@ const value_string zbee_apf_kvp_type_names[] = { * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- */ -void +static void dissect_zbee_aps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvbuff_t *payload_tvb = NULL; @@ -320,13 +317,13 @@ dissect_zbee_aps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Get the FCF */ fcf = tvb_get_guint8(tvb, offset); - packet.type = get_bit_field(fcf, ZBEE_APS_FCF_FRAME_TYPE); - packet.delivery = get_bit_field(fcf, ZBEE_APS_FCF_DELIVERY_MODE); - packet.indirect_mode = get_bit_field(fcf, ZBEE_APS_FCF_INDIRECT_MODE); - packet.ack_mode = get_bit_field(fcf, ZBEE_APS_FCF_ACK_MODE); - packet.security = get_bit_field(fcf, ZBEE_APS_FCF_SECURITY); - packet.ack_req = get_bit_field(fcf, ZBEE_APS_FCF_ACK_REQ); - packet.ext_header = get_bit_field(fcf, ZBEE_APS_FCF_EXT_HEADER); + packet.type = zbee_get_bit_field(fcf, ZBEE_APS_FCF_FRAME_TYPE); + packet.delivery = zbee_get_bit_field(fcf, ZBEE_APS_FCF_DELIVERY_MODE); + packet.indirect_mode = zbee_get_bit_field(fcf, ZBEE_APS_FCF_INDIRECT_MODE); + packet.ack_mode = zbee_get_bit_field(fcf, ZBEE_APS_FCF_ACK_MODE); + packet.security = zbee_get_bit_field(fcf, ZBEE_APS_FCF_SECURITY); + packet.ack_req = zbee_get_bit_field(fcf, ZBEE_APS_FCF_ACK_REQ); + packet.ext_header = zbee_get_bit_field(fcf, ZBEE_APS_FCF_EXT_HEADER); /* Display the frame type to the proto root and info column. */ if (tree) { @@ -695,13 +692,13 @@ dissect_zbee_aps_no_endpt: * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * proto_item *proto_root - pointer to the root of the APS tree * RETURNS * void *--------------------------------------------------------------- */ -void dissect_zbee_aps_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void dissect_zbee_aps_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *cmd_root = NULL; proto_tree *cmd_tree = NULL; @@ -817,7 +814,7 @@ void dissect_zbee_aps_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_skke_challenge(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint64 init; @@ -863,7 +860,7 @@ dissect_zbee_aps_skke_challenge(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_skke_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint64 init; @@ -910,7 +907,7 @@ guint dissect_zbee_aps_skke_data (tvbuff_t *tvb, packet_info *pinfo, prot * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_transport_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint8 key_type; @@ -1036,7 +1033,7 @@ dissect_zbee_aps_transport_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_update_device(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { guint64 device; @@ -1084,7 +1081,7 @@ dissect_zbee_aps_update_device(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_remove_device(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint64 device; @@ -1114,7 +1111,7 @@ dissect_zbee_aps_remove_device(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_request_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint8 key_type; @@ -1154,7 +1151,7 @@ dissect_zbee_aps_request_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_switch_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint8 seqno; @@ -1185,7 +1182,7 @@ dissect_zbee_aps_switch_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_auth_challenge(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint8 key_type; @@ -1249,7 +1246,7 @@ dissect_zbee_aps_auth_challenge(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_auth_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset) { guint8 data_type; @@ -1299,7 +1296,7 @@ dissect_zbee_aps_auth_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_aps_tunnel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { guint64 dst; @@ -1338,7 +1335,7 @@ dissect_zbee_aps_tunnel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui * void *--------------------------------------------------------------- */ -void dissect_zbee_apf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void dissect_zbee_apf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *apf_tree = NULL; proto_item *proto_root; @@ -1359,8 +1356,8 @@ void dissect_zbee_apf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* Get the count and type. */ - count = get_bit_field(tvb_get_guint8(tvb, offset), ZBEE_APP_COUNT); - type = get_bit_field(tvb_get_guint8(tvb, offset), ZBEE_APP_TYPE); + count = zbee_get_bit_field(tvb_get_guint8(tvb, offset), ZBEE_APP_COUNT); + type = zbee_get_bit_field(tvb_get_guint8(tvb, offset), ZBEE_APP_TYPE); if (tree) { proto_tree_add_uint(apf_tree, hf_zbee_apf_count, tvb, offset, sizeof(guint8), count); proto_tree_add_uint(apf_tree, hf_zbee_apf_type, tvb, offset, sizeof(guint8), type); @@ -1411,7 +1408,7 @@ dissect_app_end: * guint *--------------------------------------------------------------- */ -guint +static guint zbee_apf_transaction_len(tvbuff_t *tvb, guint offset, guint8 type) { if (type == ZBEE_APP_TYPE_KVP) { @@ -1419,8 +1416,8 @@ zbee_apf_transaction_len(tvbuff_t *tvb, guint offset, guint8 type) /* | 1 Byte | 1 Byte | 2 Bytes | 0/1 Bytes | Variable | * | SeqNo | Cmd/Data Type | Attribute | Error Code | Data | */ - guint8 kvp_cmd = get_bit_field(tvb_get_guint8(tvb, offset+1), ZBEE_APP_KVP_CMD); - guint8 kvp_type = get_bit_field(tvb_get_guint8(tvb, offset+1), ZBEE_APP_KVP_TYPE); + guint8 kvp_cmd = zbee_get_bit_field(tvb_get_guint8(tvb, offset+1), ZBEE_APP_KVP_CMD); + guint8 kvp_type = zbee_get_bit_field(tvb_get_guint8(tvb, offset+1), ZBEE_APP_KVP_TYPE); guint kvp_len = ZBEE_APP_KVP_OVERHEAD; /* Add the length of the error code, if present. */ @@ -1486,6 +1483,23 @@ zbee_apf_transaction_len(tvbuff_t *tvb, guint offset, guint8 type) } } /* zbee_apf_transaction_len */ +/*FUNCTION:------------------------------------------------------ + * NAME + * proto_init_zbee_aps + * DESCRIPTION + * Initializes the APS dissectors prior to beginning protocol + * dissection. + * PARAMETERS + * none + * RETURNS + * void + *--------------------------------------------------------------- + */ +static void proto_init_zbee_aps(void) +{ + fragment_table_init(&zbee_aps_fragment_table); + reassembled_table_init(&zbee_aps_reassembled_table); +} /* proto_init_zbee_aps */ /*FUNCTION:------------------------------------------------------ * NAME @@ -1726,20 +1740,3 @@ void proto_reg_handoff_zbee_aps(void) zbee_apf_handle = find_dissector("zbee.apf"); } /* proto_reg_handoff_zbee_aps */ -/*FUNCTION:------------------------------------------------------ - * NAME - * proto_init_zbee_aps - * DESCRIPTION - * Initializes the APS dissectors prior to beginning protocol - * dissection. - * PARAMETERS - * none - * RETURNS - * void - *--------------------------------------------------------------- - */ -void proto_init_zbee_aps(void) -{ - fragment_table_init(&zbee_aps_fragment_table); - reassembled_table_init(&zbee_aps_reassembled_table); -} /* proto_init_zbee_aps */ diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index b9391b9bfd..12420f2f43 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -47,27 +47,22 @@ /*************************/ /* Function Declarations */ /*************************/ -/* Protocol Registration */ -void proto_reg_handoff_zbee_nwk (void); -void proto_register_zbee_nwk (void); - /* Dissector Routines */ -gboolean dissect_zbee_nwk_heur (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_zbee_nwk (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_zbee_nwk_cmd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void dissect_zbee_beacon (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static void dissect_zbee_nwk (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static void dissect_zbee_nwk_cmd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +static void dissect_zbee_beacon (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Command Dissector Helpers */ -guint dissect_zbee_nwk_route_req (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); -guint dissect_zbee_nwk_route_rep (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_nwk_status (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_nwk_leave (tvbuff_t *tvb, proto_tree *tree, guint offset); -guint dissect_zbee_nwk_route_rec (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); -guint dissect_zbee_nwk_rejoin_req (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); -guint dissect_zbee_nwk_rejoin_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); -guint dissect_zbee_nwk_link_status(tvbuff_t *tvb, proto_tree *tree, guint offset); -guint dissect_zbee_nwk_report (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); -guint dissect_zbee_nwk_update (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_nwk_route_req (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); +static guint dissect_zbee_nwk_route_rep (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_nwk_status (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_nwk_leave (tvbuff_t *tvb, proto_tree *tree, guint offset); +static guint dissect_zbee_nwk_route_rec (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); +static guint dissect_zbee_nwk_rejoin_req (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); +static guint dissect_zbee_nwk_rejoin_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset); +static guint dissect_zbee_nwk_link_status(tvbuff_t *tvb, proto_tree *tree, guint offset); +static guint dissect_zbee_nwk_report (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); +static guint dissect_zbee_nwk_update (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); /********************/ @@ -159,14 +154,14 @@ static dissector_handle_t aps_handle; /* Field Names */ /********************/ /* Frame Types */ -const value_string zbee_nwk_frame_types[] = { +static const value_string zbee_nwk_frame_types[] = { { ZBEE_NWK_FCF_DATA, "Data" }, { ZBEE_NWK_FCF_CMD, "Command" }, { 0, NULL } }; /* Route Discovery Modes */ -const value_string zbee_nwk_discovery_modes[] = { +static const value_string zbee_nwk_discovery_modes[] = { { ZBEE_NWK_FCF_DISCOVERY_SUPPRESS, "Suppress" }, { ZBEE_NWK_FCF_DISCOVERY_ENABLE, "Enable" }, { ZBEE_NWK_FCF_DISCOVERY_FORCE, "Force" }, @@ -174,7 +169,7 @@ const value_string zbee_nwk_discovery_modes[] = { }; /* Command Names*/ -const value_string zbee_nwk_cmd_names[] = { +static const value_string zbee_nwk_cmd_names[] = { { ZBEE_NWK_CMD_ROUTE_REQ, "Route Request" }, { ZBEE_NWK_CMD_ROUTE_REPLY, "Route Reply" }, { ZBEE_NWK_CMD_NWK_STATUS, "Network Status" }, @@ -189,7 +184,7 @@ const value_string zbee_nwk_cmd_names[] = { }; /* Many-To-One Route Discovery Modes. */ -const value_string zbee_nwk_cmd_route_many_modes[] = { +static const value_string zbee_nwk_cmd_route_many_modes[] = { { ZBEE_NWK_CMD_ROUTE_OPTION_MANY_NONE, "Not Many-to-One" }, { ZBEE_NWK_CMD_ROUTE_OPTION_MANY_REC, "With Source Routing" }, { ZBEE_NWK_CMD_ROUTE_OPTION_MANY_NOREC, "Without Source Routing" }, @@ -197,7 +192,7 @@ const value_string zbee_nwk_cmd_route_many_modes[] = { }; /* Rejoin Status Codes */ -const value_string zbee_nwk_rejoin_codes[] = { +static const value_string zbee_nwk_rejoin_codes[] = { { IEEE802154_CMD_ASRSP_AS_SUCCESS, "Success" }, { IEEE802154_CMD_ASRSP_PAN_FULL, "PAN Full" }, { IEEE802154_CMD_ASRSP_PAN_DENIED, "PAN Access Denied" }, @@ -205,19 +200,19 @@ const value_string zbee_nwk_rejoin_codes[] = { }; /* Network Report Types */ -const value_string zbee_nwk_report_types[] = { +static const value_string zbee_nwk_report_types[] = { { ZBEE_NWK_CMD_NWK_REPORT_ID_PAN_CONFLICT, "PAN Identifier Conflict" }, { 0, NULL } }; /* Network Update Types */ -const value_string zbee_nwk_update_types[] = { +static const value_string zbee_nwk_update_types[] = { { ZBEE_NWK_CMD_NWK_UPDATE_ID_PAN_UPDATE, "PAN Identifier Update" }, { 0, NULL } }; /* Network Status Codes */ -const value_string zbee_nwk_status_codes[] = { +static const value_string zbee_nwk_status_codes[] = { { ZBEE_NWK_STATUS_NO_ROUTE_AVAIL, "No Route Available" }, { ZBEE_NWK_STATUS_TREE_LINK_FAIL, "Tree Link Failure" }, { ZBEE_NWK_STATUS_NON_TREE_LINK_FAIL, "Non-tree Link Failure" }, @@ -241,7 +236,7 @@ const value_string zbee_nwk_status_codes[] = { }; /* Stack Profile Values. */ -const value_string zbee_nwk_stack_profiles[] = { +static const value_string zbee_nwk_stack_profiles[] = { { 0x00, "Network Specific" }, { 0x01, "ZigBee Home" }, { 0x02, "ZigBee PRO" }, @@ -273,11 +268,11 @@ proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, g /*FUNCTION:------------------------------------------------------ * NAME - * get_bit_field + * zbee_get_bit_field * DESCRIPTION * Extracts an integer sub-field from an int with a given mask * if the mask is 0, this will return 0, if the mask is non- - * continuos the output is undefined. + * continuous the output is undefined. * PARAMETERS * guint input * guint mask @@ -286,7 +281,7 @@ proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, g *--------------------------------------------------------------- */ guint -get_bit_field(guint input, guint mask) +zbee_get_bit_field(guint input, guint mask) { /* Sanity Check, don't want infinite loops. */ if (mask == 0) return 0; @@ -296,7 +291,7 @@ get_bit_field(guint input, guint mask) mask >>=1; } /* while */ return (input & mask); -} /* get_bit_field */ +} /* zbee_get_bit_field */ /*FUNCTION:------------------------------------------------------ * NAME @@ -306,12 +301,12 @@ get_bit_field(guint input, guint mask) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS - * Boolean value, wether it handles the packet or not. + * Boolean value, whether it handles the packet or not. *--------------------------------------------------------------- */ -gboolean +static gboolean dissect_zbee_nwk_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { ieee802154_packet *packet = pinfo->private_data; @@ -343,16 +338,16 @@ dissect_zbee_nwk_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * NAME * dissect_zbee_nwk * DESCRIPTION - * ZigBee packet dissection routine for ethereal. + * ZigBee packet dissection routine for Wireshark. * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- */ -void +static void dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvbuff_t *payload_tvb = NULL; @@ -385,14 +380,14 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Get and parse the FCF */ fcf = tvb_get_letohs(tvb, offset); - packet.type = get_bit_field(fcf, ZBEE_NWK_FCF_FRAME_TYPE); - packet.version = get_bit_field(fcf, ZBEE_NWK_FCF_VERSION); - packet.discovery = get_bit_field(fcf, ZBEE_NWK_FCF_DISCOVER_ROUTE); - packet.security = get_bit_field(fcf, ZBEE_NWK_FCF_SECURITY); - packet.multicast = get_bit_field(fcf, ZBEE_NWK_FCF_MULTICAST); - packet.route = get_bit_field(fcf, ZBEE_NWK_FCF_SOURCE_ROUTE); - packet.ext_dst = get_bit_field(fcf, ZBEE_NWK_FCF_EXT_DEST); - packet.ext_src = get_bit_field(fcf, ZBEE_NWK_FCF_EXT_SOURCE); + packet.type = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_FRAME_TYPE); + packet.version = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_VERSION); + packet.discovery = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_DISCOVER_ROUTE); + packet.security = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_SECURITY); + packet.multicast = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_MULTICAST); + packet.route = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_SOURCE_ROUTE); + packet.ext_dst = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_EXT_DEST); + packet.ext_src = zbee_get_bit_field(fcf, ZBEE_NWK_FCF_EXT_SOURCE); pinfo->zbee_stack_vers = packet.version; /* Display the FCF. */ @@ -491,9 +486,9 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if ((pinfo->zbee_stack_vers >= ZBEE_VERSION_2007) && packet.multicast) { guint8 mcast_control = tvb_get_guint8(tvb, offset); - packet.mcast_mode = get_bit_field(mcast_control, ZBEE_NWK_MCAST_MODE); - packet.mcast_radius = get_bit_field(mcast_control, ZBEE_NWK_MCAST_RADIUS); - packet.mcast_max_radius = get_bit_field(mcast_control, ZBEE_NWK_MCAST_MAX_RADIUS); + packet.mcast_mode = zbee_get_bit_field(mcast_control, ZBEE_NWK_MCAST_MODE); + packet.mcast_radius = zbee_get_bit_field(mcast_control, ZBEE_NWK_MCAST_RADIUS); + packet.mcast_max_radius = zbee_get_bit_field(mcast_control, ZBEE_NWK_MCAST_MAX_RADIUS); if (tree) { /* Create a subtree for the multicast control field. */ ti = proto_tree_add_text(nwk_tree, tvb, offset, sizeof(guint8), "Multicast Control Field"); @@ -617,18 +612,18 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * NAME * dissect_zbee_nwk_cmd * DESCRIPTION - * ZigBee Network command packet dissection routine for ethereal. + * ZigBee Network command packet dissection routine for Wireshark. * note: this dissector differs from others in that is shouldn't be * passed the main tree pointer, but the nwk tree instead. * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- */ -void dissect_zbee_nwk_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void dissect_zbee_nwk_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *cmd_tree = NULL; proto_item *cmd_root = NULL; @@ -743,7 +738,7 @@ void dissect_zbee_nwk_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_route_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset) { proto_tree *field_tree; @@ -826,7 +821,7 @@ dissect_zbee_nwk_route_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_route_rep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { proto_tree *field_tree; @@ -927,7 +922,7 @@ dissect_zbee_nwk_route_rep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { guint8 status_code; @@ -969,7 +964,7 @@ dissect_zbee_nwk_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_leave(tvbuff_t *tvb, proto_tree *tree, guint offset) { guint8 leave_options; @@ -1002,7 +997,7 @@ dissect_zbee_nwk_leave(tvbuff_t *tvb, proto_tree *tree, guint offset) * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_route_rec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset) { guint8 relay_count; @@ -1049,7 +1044,7 @@ dissect_zbee_nwk_route_rec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_rejoin_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset) { proto_tree *field_tree; @@ -1098,7 +1093,7 @@ dissect_zbee_nwk_rejoin_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_rejoin_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset) { guint16 addr; @@ -1145,7 +1140,7 @@ dissect_zbee_nwk_rejoin_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_link_status(tvbuff_t *tvb, proto_tree *tree, guint offset) { guint8 options; @@ -1191,7 +1186,7 @@ dissect_zbee_nwk_link_status(tvbuff_t *tvb, proto_tree *tree, guint offset) * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { guint8 options; @@ -1253,7 +1248,7 @@ dissect_zbee_nwk_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui * guint - offset after command dissection. *--------------------------------------------------------------- */ -guint +static guint dissect_zbee_nwk_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { guint8 options; @@ -1317,12 +1312,12 @@ dissect_zbee_nwk_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- */ -void dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { ieee802154_packet *packet = pinfo->private_data; @@ -1360,9 +1355,9 @@ void dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Get and display the stack profile and protocol version. */ temp = tvb_get_guint8(tvb, offset); - pinfo->zbee_stack_vers = version = get_bit_field(temp, ZBEE_NWK_BEACON_PROTOCOL_VERSION); + pinfo->zbee_stack_vers = version = zbee_get_bit_field(temp, ZBEE_NWK_BEACON_PROTOCOL_VERSION); if (tree) { - proto_tree_add_uint(beacon_tree, hf_zbee_beacon_stack_profile, tvb, offset, sizeof(guint8), get_bit_field(temp, ZBEE_NWK_BEACON_STACK_PROFILE)); + proto_tree_add_uint(beacon_tree, hf_zbee_beacon_stack_profile, tvb, offset, sizeof(guint8), zbee_get_bit_field(temp, ZBEE_NWK_BEACON_STACK_PROFILE)); proto_tree_add_uint(beacon_tree, hf_zbee_beacon_version, tvb, offset, sizeof(guint8), version); } offset += sizeof(guint8); @@ -1370,9 +1365,9 @@ void dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Get and display the security level and flags. */ temp = tvb_get_guint8(tvb, offset); if (tree) { - proto_tree_add_boolean(beacon_tree, hf_zbee_beacon_router_capacity, tvb, offset, sizeof(guint8), get_bit_field(temp, ZBEE_NWK_BEACON_ROUTER_CAPACITY)); - proto_tree_add_uint(beacon_tree, hf_zbee_beacon_depth, tvb, offset, sizeof(guint8), get_bit_field(temp, ZBEE_NWK_BEACON_NETWORK_DEPTH)); - proto_tree_add_boolean(beacon_tree, hf_zbee_beacon_end_device_capacity, tvb, offset, sizeof(guint8), get_bit_field(temp, ZBEE_NWK_BEACON_END_DEVICE_CAPACITY)); + proto_tree_add_boolean(beacon_tree, hf_zbee_beacon_router_capacity, tvb, offset, sizeof(guint8), zbee_get_bit_field(temp, ZBEE_NWK_BEACON_ROUTER_CAPACITY)); + proto_tree_add_uint(beacon_tree, hf_zbee_beacon_depth, tvb, offset, sizeof(guint8), zbee_get_bit_field(temp, ZBEE_NWK_BEACON_NETWORK_DEPTH)); + proto_tree_add_boolean(beacon_tree, hf_zbee_beacon_end_device_capacity, tvb, offset, sizeof(guint8), zbee_get_bit_field(temp, ZBEE_NWK_BEACON_END_DEVICE_CAPACITY)); } offset += sizeof(guint8); @@ -1740,7 +1735,7 @@ void proto_register_zbee_nwk(void) * NAME * proto_reg_handoff_zbee_nwk * DESCRIPTION - * Registers the zigbee dissector with Ethereal. + * Registers the zigbee dissector with Wireshark. * PARAMETERS * none * RETURNS diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c index d9bd60ebd0..a9c5441efa 100644 --- a/epan/dissectors/packet-zbee-security.c +++ b/epan/dissectors/packet-zbee-security.c @@ -53,10 +53,10 @@ #include "packet-zbee-security.h" /* Helper Functions */ -void zbee_security_parse_prefs(void); -gboolean zbee_sec_ccm_decrypt(const gchar *, const gchar *, const gchar *, const gchar *, gchar *, guint, guint, guint); -void zbee_sec_make_nonce (guint8 *, zbee_security_packet *); -guint8 * zbee_sec_key_hash(guint8 *, guint8, packet_info *); +static void zbee_security_parse_prefs(void); +static gboolean zbee_sec_ccm_decrypt(const gchar *, const gchar *, const gchar *, const gchar *, gchar *, guint, guint, guint); +static void zbee_sec_make_nonce (guint8 *, zbee_security_packet *); +static guint8 * zbee_sec_key_hash(guint8 *, guint8, packet_info *); /* Field pointers. */ static int hf_zbee_sec_level = -1; @@ -73,7 +73,7 @@ static gint ett_zbee_sec_control = -1; static dissector_handle_t data_handle; -const value_string zbee_sec_key_names[] = { +static const value_string zbee_sec_key_names[] = { { ZBEE_SEC_KEY_LINK, "Link Key" }, { ZBEE_SEC_KEY_NWK, "Network Key" }, { ZBEE_SEC_KEY_TRANSPORT, "Key-Transport Key" }, @@ -85,7 +85,7 @@ const value_string zbee_sec_key_names[] = { * security control field. If we were to display them all we would ever see is * security level 0. */ -const value_string zbee_sec_level_names[] = { +static const value_string zbee_sec_level_names[] = { { ZBEE_SEC_NONE, "None" }, { ZBEE_SEC_MIC32, "No Encryption, 32-bit MIC" }, { ZBEE_SEC_MIC64, "No Encryption, 64-bit MIC" }, @@ -219,7 +219,7 @@ void zbee_security_register(module_t *prefs, int proto) * gboolean *--------------------------------------------------------------- */ -gboolean +static gboolean zbee_security_parse_key(const gchar *key_str, guint8 *key_buf) { int i; @@ -271,7 +271,7 @@ zbee_security_parse_key(const gchar *key_str, guint8 *key_buf) * void *--------------------------------------------------------------- */ -void +static void zbee_security_parse_prefs(void) { int i; @@ -346,7 +346,7 @@ zbee_security_handoff(void) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * guint offset - pointer to the start of the auxilliary security header. * guint64 src - extended source address, or 0 if unknown. * RETURNS @@ -399,9 +399,9 @@ dissect_zbee_secure(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree, guint o */ ((guint8 *)(enc_buffer))[offset] = packet.control; #endif /* HAVE_LIBGCRYPT */ - packet.level = get_bit_field(packet.control, ZBEE_SEC_CONTROL_LEVEL); - packet.key = get_bit_field(packet.control, ZBEE_SEC_CONTROL_KEY); - packet.nonce = get_bit_field(packet.control, ZBEE_SEC_CONTROL_NONCE); + packet.level = zbee_get_bit_field(packet.control, ZBEE_SEC_CONTROL_LEVEL); + packet.key = zbee_get_bit_field(packet.control, ZBEE_SEC_CONTROL_KEY); + packet.nonce = zbee_get_bit_field(packet.control, ZBEE_SEC_CONTROL_NONCE); if (tree) { ti = proto_tree_add_text(sec_tree, tvb, offset, sizeof(guint8), "Security Control Field"); field_tree = proto_item_add_subtree(ti, ett_zbee_sec_control); @@ -610,7 +610,7 @@ decrypt_failed: * void *--------------------------------------------------------------- */ -void +static void zbee_sec_make_nonce(guint8 *nonce, zbee_security_packet *packet) { /* First 8 bytes are the extended source address (little endian). */ @@ -661,7 +661,7 @@ zbee_sec_make_nonce(guint8 *nonce, zbee_security_packet *packet) * gboolean - TRUE if successful. *--------------------------------------------------------------- */ -gboolean +static gboolean zbee_sec_ccm_decrypt(const gchar *key, /* Input */ const gchar *nonce, /* Input */ const gchar *a, /* Input */ @@ -875,7 +875,7 @@ zbee_sec_ccm_decrypt(const gchar *key, /* Input */ * void *--------------------------------------------------------------- */ -void +static void zbee_sec_hash(guint8 *input, guint input_len, guint8 *output) { guint8 cipher_in[ZBEE_SEC_CONST_BLOCKSIZE]; @@ -980,7 +980,7 @@ zbee_sec_hash(guint8 *input, guint input_len, guint8 *output) * guint8* *--------------------------------------------------------------- */ -guint8 * +static guint8 * zbee_sec_key_hash(guint8 *key, guint8 input, packet_info *pinfo _U_) { guint8 hash_in[2*ZBEE_SEC_CONST_BLOCKSIZE]; diff --git a/epan/dissectors/packet-zbee-zdp-binding.c b/epan/dissectors/packet-zbee-zdp-binding.c index 9b9b4087e9..3702229b69 100644 --- a/epan/dissectors/packet-zbee-zdp-binding.c +++ b/epan/dissectors/packet-zbee-zdp-binding.c @@ -51,7 +51,7 @@ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -139,7 +139,7 @@ zdp_parse_bind_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *offset, packe * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -200,7 +200,7 @@ dissect_zbee_zdp_req_end_device_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -266,7 +266,7 @@ dissect_zbee_zdp_req_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -332,7 +332,7 @@ dissect_zbee_zdp_req_unbind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -360,7 +360,7 @@ dissect_zbee_zdp_req_bind_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -395,7 +395,7 @@ dissect_zbee_zdp_req_replace_device(tvbuff_t *tvb, packet_info *pinfo, proto_tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -447,7 +447,7 @@ dissect_zbee_zdp_req_store_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pro * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -499,7 +499,7 @@ dissect_zbee_zdp_req_remove_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -541,7 +541,7 @@ dissect_zbee_zdp_req_backup_bind_table(tvbuff_t *tvb, packet_info *pinfo, proto_ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -567,7 +567,7 @@ dissect_zbee_zdp_req_recover_bind_table(tvbuff_t *tvb, packet_info *pinfo, proto * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -607,7 +607,7 @@ dissect_zbee_zdp_req_backup_source_bind(tvbuff_t *tvb, packet_info *pinfo, proto * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -637,7 +637,7 @@ dissect_zbee_zdp_req_recover_source_bind(tvbuff_t *tvb, packet_info *pinfo, prot * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -665,7 +665,7 @@ dissect_zbee_zdp_rsp_end_device_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -693,7 +693,7 @@ dissect_zbee_zdp_rsp_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -721,7 +721,7 @@ dissect_zbee_zdp_rsp_unbind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -765,7 +765,7 @@ dissect_zbee_zdp_rsp_bind_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -793,7 +793,7 @@ dissect_zbee_zdp_rsp_replace_device(tvbuff_t *tvb, packet_info *pinfo, proto_tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -821,7 +821,7 @@ dissect_zbee_zdp_rsp_store_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pro * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -849,7 +849,7 @@ dissect_zbee_zdp_rsp_remove_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -879,7 +879,7 @@ dissect_zbee_zdp_rsp_backup_bind_table(tvbuff_t *tvb, packet_info *pinfo, proto_ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -925,7 +925,7 @@ dissect_zbee_zdp_rsp_recover_bind_table(tvbuff_t *tvb, packet_info *pinfo, proto * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -953,7 +953,7 @@ dissect_zbee_zdp_rsp_backup_source_bind(tvbuff_t *tvb, packet_info *pinfo, proto * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- diff --git a/epan/dissectors/packet-zbee-zdp-discovery.c b/epan/dissectors/packet-zbee-zdp-discovery.c index 33cb2800b4..5d79e29eb9 100644 --- a/epan/dissectors/packet-zbee-zdp-discovery.c +++ b/epan/dissectors/packet-zbee-zdp-discovery.c @@ -51,7 +51,7 @@ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -84,7 +84,7 @@ dissect_zbee_zdp_req_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -117,7 +117,7 @@ dissect_zbee_zdp_req_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -145,7 +145,7 @@ dissect_zbee_zdp_req_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -173,7 +173,7 @@ dissect_zbee_zdp_req_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -203,7 +203,7 @@ dissect_zbee_zdp_req_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -231,7 +231,7 @@ dissect_zbee_zdp_req_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -283,7 +283,7 @@ dissect_zbee_zdp_req_match_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -311,7 +311,7 @@ dissect_zbee_zdp_req_complex_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -339,7 +339,7 @@ dissect_zbee_zdp_req_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -369,7 +369,7 @@ dissect_zbee_zdp_req_discovery_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -401,7 +401,7 @@ dissect_zbee_zdp_device_annce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -445,7 +445,7 @@ dissect_zbee_zdp_req_set_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -471,7 +471,7 @@ dissect_zbee_zdp_req_system_server_disc(tvbuff_t *tvb, packet_info *pinfo, proto * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -521,7 +521,7 @@ dissect_zbee_zdp_req_store_discovery(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -552,7 +552,7 @@ dissect_zbee_zdp_req_store_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -583,7 +583,7 @@ dissect_zbee_zdp_req_store_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -627,7 +627,7 @@ dissect_zbee_zdp_req_store_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -660,7 +660,7 @@ dissect_zbee_zdp_req_store_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -690,7 +690,7 @@ dissect_zbee_zdp_req_remove_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -720,7 +720,7 @@ dissect_zbee_zdp_req_find_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -752,7 +752,7 @@ dissect_zbee_zdp_req_ext_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -786,7 +786,7 @@ dissect_zbee_zdp_req_ext_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -841,7 +841,7 @@ dissect_zbee_zdp_rsp_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -896,7 +896,7 @@ dissect_zbee_zdp_rsp_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -931,7 +931,7 @@ dissect_zbee_zdp_rsp_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -966,7 +966,7 @@ dissect_zbee_zdp_rsp_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1003,7 +1003,7 @@ dissect_zbee_zdp_rsp_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1048,7 +1048,7 @@ dissect_zbee_zdp_rsp_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1093,7 +1093,7 @@ dissect_zbee_zdp_rsp_match_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1130,7 +1130,7 @@ dissect_zbee_zdp_rsp_complex_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1177,7 +1177,7 @@ dissect_zbee_zdp_rsp_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1211,7 +1211,7 @@ dissect_zbee_zdp_rsp_user_desc_conf(tvbuff_t *tvb, packet_info *pinfo, proto_tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1240,7 +1240,7 @@ dissect_zbee_zdp_rsp_discovery_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1271,7 +1271,7 @@ dissect_zbee_zdp_rsp_system_server_disc(tvbuff_t *tvb, packet_info *pinfo, proto * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1300,7 +1300,7 @@ dissect_zbee_zdp_rsp_discovery_store(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1329,7 +1329,7 @@ dissect_zbee_zdp_rsp_store_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1358,7 +1358,7 @@ dissect_zbee_zdp_rsp_store_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1387,7 +1387,7 @@ dissect_zbee_zdp_rsp_store_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1416,7 +1416,7 @@ dissect_zbee_zdp_rsp_store_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1445,7 +1445,7 @@ dissect_zbee_zdp_rsp_remove_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1479,7 +1479,7 @@ dissect_zbee_zdp_rsp_find_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -1529,7 +1529,7 @@ dissect_zbee_zdp_rsp_ext_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- diff --git a/epan/dissectors/packet-zbee-zdp-management.c b/epan/dissectors/packet-zbee-zdp-management.c index d62ce5d38e..606ee704ef 100644 --- a/epan/dissectors/packet-zbee-zdp-management.c +++ b/epan/dissectors/packet-zbee-zdp-management.c @@ -50,7 +50,7 @@ * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -118,7 +118,7 @@ zdp_parse_nwk_desc(proto_tree *tree, tvbuff_t *tvb, guint *offset, packet_info * * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -227,7 +227,7 @@ zdp_parse_neighbor_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *offset, p * Parses and displays a routing table entry. * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -271,7 +271,7 @@ zdp_parse_routing_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *offset) * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -291,7 +291,7 @@ extern void zdp_parse_bind_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *o * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -344,7 +344,7 @@ dissect_zbee_zdp_req_mgmt_nwk_disc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -370,7 +370,7 @@ dissect_zbee_zdp_req_mgmt_lqi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -396,7 +396,7 @@ dissect_zbee_zdp_req_mgmt_rtg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -422,7 +422,7 @@ dissect_zbee_zdp_req_mgmt_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -460,7 +460,7 @@ dissect_zbee_zdp_req_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -490,7 +490,7 @@ dissect_zbee_zdp_req_mgmt_direct_join(tvbuff_t *tvb, packet_info *pinfo, proto_t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -518,7 +518,7 @@ dissect_zbee_zdp_req_mgmt_permit_join(tvbuff_t *tvb, packet_info *pinfo, proto_t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -544,7 +544,7 @@ dissect_zbee_zdp_req_mgmt_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -589,7 +589,7 @@ dissect_zbee_zdp_req_mgmt_nwkupdate(tvbuff_t *tvb, packet_info *pinfo, proto_tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -635,7 +635,7 @@ dissect_zbee_zdp_rsp_mgmt_nwk_disc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -681,7 +681,7 @@ dissect_zbee_zdp_rsp_mgmt_lqi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -727,7 +727,7 @@ dissect_zbee_zdp_rsp_mgmt_rtg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -773,7 +773,7 @@ dissect_zbee_zdp_rsp_mgmt_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -801,7 +801,7 @@ dissect_zbee_zdp_rsp_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -829,7 +829,7 @@ dissect_zbee_zdp_rsp_mgmt_direct_join(tvbuff_t *tvb, packet_info *pinfo, proto_t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -857,7 +857,7 @@ dissect_zbee_zdp_rsp_mgmt_permit_join(tvbuff_t *tvb, packet_info *pinfo, proto_t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -909,7 +909,7 @@ dissect_zbee_zdp_rsp_mgmt_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c index d0b71dedf6..65b1f8b9d8 100644 --- a/epan/dissectors/packet-zbee-zdp.c +++ b/epan/dissectors/packet-zbee-zdp.c @@ -42,15 +42,8 @@ /*************************/ /* Function Declarations */ /*************************/ -/* Protocol Registration */ -void proto_reg_handoff_zbee_zdp (void); -void proto_register_zbee_zdp (void); - -/* Main Dissector Routines */ -void dissect_zbee_zdp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - /* Local Helper routines. */ -guint16 zdp_convert_2003cluster (guint8 cluster); +static guint16 zdp_convert_2003cluster (guint8 cluster); /* Message dissector routines. */ extern void dissect_zbee_zdp_req_nwk_addr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); @@ -288,13 +281,13 @@ dissector_handle_t data_handle; * Value Strings ************************************** */ -const value_string zbee_zdp_req_types[] = { +static const value_string zbee_zdp_req_types[] = { { ZBEE_ZDP_REQ_TYPE_SINGLE, "Single Device Response" }, { ZBEE_ZDP_REQ_TYPE_EXTENDED, "Extended Response" }, { 0, NULL } }; -const value_string zbee_zdp_cluster_names[] = { +static const value_string zbee_zdp_cluster_names[] = { { ZBEE_ZDP_REQ_NWK_ADDR, "Network Address Request" }, { ZBEE_ZDP_REQ_IEEE_ADDR, "Extended Address Request" }, { ZBEE_ZDP_REQ_NODE_DESC, "Node Descriptor Request" }, @@ -382,7 +375,7 @@ const value_string zbee_zdp_cluster_names[] = { { 0, NULL } }; -const value_string zbee_zdp_status_names[] = { +static const value_string zbee_zdp_status_names[] = { { ZBEE_ZDP_STATUS_SUCCESS, "Success" }, { ZBEE_ZDP_STATUS_INV_REQUESTTYPE, "Invalid Request Type" }, { ZBEE_ZDP_STATUS_DEVICE_NOT_FOUND, "Device Not Found" }, @@ -430,7 +423,7 @@ zdp_status_name(guint8 status) * guint16 *--------------------------------------------------------------- */ -guint16 +static guint16 zdp_convert_2003cluster(guint8 cluster) { if (cluster & ZBEE_ZDP_MSG_RESPONSE_BIT_2003) { @@ -451,7 +444,7 @@ zdp_convert_2003cluster(guint8 cluster) * tvbuff_t *tvb - pointer to buffer containing raw packet. * guint offset - offset after parsing last item. * packet_info *pinfo - packet information structure. - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- @@ -471,7 +464,7 @@ zdp_dump_excess(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tre /*FUNCTION:------------------------------------------------------ * NAME - * zbee_add_info + * zbee_append_info * DESCRIPTION * ZigBee helper function. Appends the info to the info column * and proto item. @@ -508,7 +501,7 @@ zbee_append_info(proto_item *item, packet_info *pinfo, const gchar *format, ...) * DESCRIPTION * ZigBee helper function. extracts an integer and displays it to the tree. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * int hfindex - index to field information. * tvbuff_t *tvb - pointer to buffer containing raw packet. * guint *offset - pointer to value of offset. @@ -565,7 +558,7 @@ zbee_parse_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, guint *offset, gui * ZigBee helper function. extracts an EUI64 address and displays * it to the tree. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * int hfindex - index to field information. * tvbuff_t *tvb - pointer to buffer containing raw packet. * guint *offset - pointer to value of offset. @@ -605,7 +598,7 @@ zbee_parse_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, guint *offset, gu * DESCRIPTION * Parses and displays the status value. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * tvbuff_t *tvb - pointer to buffer containing raw packet. * guint *offset - offset into the tvb to find the status value. * RETURNS @@ -633,7 +626,7 @@ zdp_parse_status(proto_tree *tree, tvbuff_t *tvb, guint *offset) * DESCRIPTION * Parses and displays the a channel mask. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * tvbuff_t *tvb - pointer to buffer containing raw packet. * guint *offset - offset into the tvb to find the status value. * RETURNS @@ -696,7 +689,7 @@ zdp_parse_chanmask(proto_tree *tree, tvbuff_t *tvb, guint *offset) * DESCRIPTION * Parses and displays MAC capability info flags. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * gint ettindex - subtree index to create the node descriptor in, or -1 * to create it without a subtree. * tvbuff_t *tvb - pointer to buffer containing raw packet. @@ -739,7 +732,7 @@ zdp_parse_cinfo(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *offset) * DESCRIPTION * Parses and displays server mode flags. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * gint ettindex - subtree index to create the node descriptor in, or -1 * to create it without a subtree. * tvbuff_t *tvb - pointer to buffer containing raw packet. @@ -783,7 +776,7 @@ zdp_parse_server_flags(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *of * Parses and displays a node descriptor to the the specified * tree. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * gint ettindex - subtree index to create the node descriptor in, or -1 * to create it without a subtree. * tvbuff_t *tvb - pointer to buffer containing raw packet. @@ -856,7 +849,7 @@ zdp_parse_node_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *offse * Parses and displays a node descriptor to the the specified * tree. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * gint ettindex - subtree index to create the node descriptor in, or -1 * to create it without a subtree. * tvbuff_t *tvb - pointer to buffer containing raw packet. @@ -920,7 +913,7 @@ zdp_parse_power_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *offs * Parses and displays a simple descriptor to the the specified * tree. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * gint ettindex - subtree index to create the node descriptor in, or -1 * to create it without a subtree. * tvbuff_t *tvb - pointer to buffer containing raw packet. @@ -988,7 +981,7 @@ zdp_parse_simple_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *off * Parses and displays a simple descriptor to the the specified * tree. * PARAMETERS - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * gint ettindex - subtree index to create the node descriptor in, or -1 * to create it without a subtree. * tvbuff_t *tvb - pointer to buffer containing raw packet. @@ -1082,12 +1075,12 @@ zdp_parse_complex_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *of * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_into *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- */ -void +static void dissect_zbee_zdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *zdp_tree = NULL; @@ -1791,6 +1784,6 @@ void proto_reg_handoff_zbee_zdp(void) data_handle = find_dissector("data"); /* Register our dissector with the ZigBee application dissectors. */ - zdp_handle = create_dissector_handle(dissect_zbee_zdp, proto_zbee_zdp); + zdp_handle = find_dissector("zbee.zdp"); dissector_add("zbee.profile", ZBEE_ZDP_PROFILE, zdp_handle); } /* proto_reg_handoff_zbee_zdp */ diff --git a/epan/dissectors/packet-zbee.h b/epan/dissectors/packet-zbee.h index 9d8993cba9..89b04473aa 100644 --- a/epan/dissectors/packet-zbee.h +++ b/epan/dissectors/packet-zbee.h @@ -54,11 +54,8 @@ #define ZBEE_HAS_2007(x) ((x) >= ZBEE_VERSION_2007) /* Helper Functions */ -proto_item *proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value); -guint get_bit_field(guint input, guint mask); - -/* Name Strings */ -extern const value_string zbee_nwk_stack_profiles[]; +extern proto_item *proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value); +extern guint zbee_get_bit_field(guint input, guint mask); #endif /* PACKET_ZBEE_H */ diff --git a/epan/dissectors/packet-zep.c b/epan/dissectors/packet-zep.c index e65182ef07..aa7fc550e9 100644 --- a/epan/dissectors/packet-zep.c +++ b/epan/dissectors/packet-zep.c @@ -62,9 +62,6 @@ /* Function declarations */ void proto_reg_handoff_zep(void); -void proto_register_zep(void); -void dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -void ntp_to_nstime(guint32, guint32, nstime_t *); /* Initialize protocol and registered fields. */ static int proto_zep = -1; @@ -86,8 +83,8 @@ static guint32 gPREF_zep_udp_port = ZEP_DEFAULT_PORT; /* Dissector handles */ static dissector_handle_t data_handle; -static dissector_handle_t ieee802154_handle = NULL; -static dissector_handle_t ieee802154_ccfcs_handle = NULL; +static dissector_handle_t ieee802154_handle; +static dissector_handle_t ieee802154_ccfcs_handle; /*FUNCTION:------------------------------------------------------ @@ -103,7 +100,7 @@ static dissector_handle_t ieee802154_ccfcs_handle = NULL; * void *--------------------------------------------------------------- */ -void ntp_to_nstime(guint32 ntp_secs, guint32 ntp_fraction, nstime_t *nstime_ptr) +static void ntp_to_nstime(guint32 ntp_secs, guint32 ntp_fraction, nstime_t *nstime_ptr) { double temp; nstime_ptr->secs = (ntp_secs >= NTP_BASETIME) ? ntp_secs - NTP_BASETIME : ntp_secs; @@ -115,17 +112,16 @@ void ntp_to_nstime(guint32 ntp_secs, guint32 ntp_fraction, nstime_t *nstime_ptr) * NAME * dissect_zep * DESCRIPTION - * IEEE 802.15.4 packet dissection routine for ethereal. + * IEEE 802.15.4 packet dissection routine for Wireshark. * PARAMETERS * tvbuff_t *tvb - pointer to buffer containing raw packet. * packet_info *pinfo - pointer to packet information fields - * proto_tree *tree - pointer to data tree ethereal uses to display packet. + * proto_tree *tree - pointer to data tree Wireshark uses to display packet. * RETURNS * void *--------------------------------------------------------------- */ -void -dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvbuff_t *next_tvb; proto_item *proto_root, *pi; @@ -136,7 +132,7 @@ dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissector_handle_t next_dissector; - /* Determine whether this is a Q51/IEEE 802.15.4 Sniffer Packet or not */ + /* Determine whether this is a Q51/IEEE 802.15.4 sniffer packet or not */ if(strcmp(tvb_get_string(tvb, 0, 2), ZEP_PREAMBLE)){ /* This is not a Q51/ZigBee sniffer packet */ call_dissector(data_handle, tvb, pinfo, tree); @@ -311,15 +307,15 @@ void proto_register_zep(void) { &hf_zep_lqi, { "Link Quality Indication", "zep.lqi", FT_UINT8, BASE_DEC, NULL, 0x0, - "", HFILL }}, + NULL, HFILL }}, { &hf_zep_timestamp, { "Timestamp", "zep.time", FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0x0, - "", HFILL }}, + NULL, HFILL }}, { &hf_zep_seqno, { "Sequence Number", "zep.seqno", FT_UINT8, BASE_DEC, NULL, 0x0, - "", HFILL }}, + NULL, HFILL }}, { &hf_zep_ieee_length, { "Length", "zep.length", FT_UINT8, BASE_DEC, NULL, 0x0, @@ -346,7 +342,7 @@ void proto_register_zep(void) "Default port is 17754", 10, &gPREF_zep_udp_port); - /* Register dissector with Ethereal. */ + /* Register dissector with Wireshark. */ register_dissector("zep", dissect_zep, proto_zep); } /* proto_register_zep */ @@ -354,7 +350,7 @@ void proto_register_zep(void) * NAME * proto_reg_handoff_zep * DESCRIPTION - * Registers the zigbee dissector with Ethereal. + * Registers the zigbee dissector with Wireshark. * Will be called every time 'apply' is pressed in the preferences menu. * PARAMETERS * none @@ -364,24 +360,25 @@ void proto_register_zep(void) */ void proto_reg_handoff_zep(void) { - static gboolean inited = FALSE; - static int lastPort; - dissector_handle_t h; - dissector_handle_t zep_handle; - - /* Get dissector handles. */ - if ( !(h = find_dissector("wpan")) ) { /* Try use built-in 802.15.4 disector */ - h = find_dissector("ieee802154"); /* otherwise use older 802.15.4 plugin disector */ - } - ieee802154_handle = h; - if ( !(h = find_dissector("wpan_cc24xx")) ) { /* Try use built-in 802.15.4 (Chipcon) disector */ - h = find_dissector("ieee802154_ccfcs"); /* otherwise use older 802.15.4 (Chipcon) plugin disector */ - } - ieee802154_ccfcs_handle = h; - zep_handle = find_dissector("zep"); - data_handle = find_dissector("data"); - - if (inited){ + static dissector_handle_t zep_handle; + static int lastPort; + static gboolean inited = FALSE; + + if ( !inited) { + dissector_handle_t h; + /* Get dissector handles. */ + if ( !(h = find_dissector("wpan")) ) { /* Try use built-in 802.15.4 disector */ + h = find_dissector("ieee802154"); /* otherwise use older 802.15.4 plugin disector */ + } + ieee802154_handle = h; + if ( !(h = find_dissector("wpan_cc24xx")) ) { /* Try use built-in 802.15.4 (Chipcon) disector */ + h = find_dissector("ieee802154_ccfcs"); /* otherwise use older 802.15.4 (Chipcon) plugin disector */ + } + ieee802154_ccfcs_handle = h; + zep_handle = find_dissector("zep"); + data_handle = find_dissector("data"); + inited = TRUE; + } else { /* If we were already registered, de-register our dissector * to free the port. */ dissector_delete("udp.port", lastPort, zep_handle); @@ -390,6 +387,5 @@ void proto_reg_handoff_zep(void) /* Register our dissector. */ dissector_add("udp.port", gPREF_zep_udp_port, zep_handle); lastPort = gPREF_zep_udp_port; - inited = TRUE; } /* proto_reg_handoff_zep */ |