diff options
author | Bill Meier <wmeier@newsguy.com> | 2010-10-10 20:07:06 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2010-10-10 20:07:06 +0000 |
commit | 209109c2fd465c6b2065d625c4dba0ad9c879b1e (patch) | |
tree | ba9e70aa89acbddba4fac5b0280f0b16296c0f07 /epan/dissectors | |
parent | 219877f1d3b966206179c7b4d126d5aaf56f09ba (diff) |
Define some fcns & vars as static ...
svn path=/trunk/; revision=34458
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-nas_eps.c | 192 | ||||
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-netflow.c | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-nfs.c | 20 | ||||
-rw-r--r-- | epan/dissectors/packet-nfs.h | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-omron-fins.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-radius.c | 46 | ||||
-rw-r--r-- | epan/dissectors/packet-rsl.c | 94 | ||||
-rw-r--r-- | epan/dissectors/packet-sasp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-tds.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-tpkt.c | 20 | ||||
-rw-r--r-- | epan/dissectors/packet-xml.c | 23 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp.c | 2 |
14 files changed, 228 insertions, 217 deletions
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index 869b57ee14..47edaa8448 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -198,27 +198,27 @@ static int ett_nas_eps = -1; static int ett_nas_eps_esm_msg_cont = -1; /* Global variables */ -packet_info *gpinfo; +static packet_info *gpinfo; /* Table 9.8.1: Message types for EPS mobility management * 0 1 - - - - - - EPS mobility management messages */ -static const value_string nas_msg_emm_strings[] = { +static const value_string nas_msg_emm_strings[] = { { 0x41, "Attach request"}, { 0x42, "Attach accept"}, { 0x43, "Attach complete"}, { 0x44, "Attach reject"}, { 0x45, "Detach request"}, { 0x46, "Detach accept"}, - + { 0x48, "Tracking area update request"}, { 0x49, "Tracking area update accept"}, { 0x4a, "Tracking area update complete"}, { 0x4b, "Tracking area update reject"}, - + { 0x4c, "Extended service request"}, { 0x4e, "Service reject"}, - + { 0x50, "GUTI reallocation command"}, { 0x51, "GUTI reallocation complete"}, { 0x52, "Authentication request"}, @@ -230,7 +230,7 @@ static const value_string nas_msg_emm_strings[] = { { 0x5d, "Security mode command"}, { 0x5e, "Security mode complete"}, { 0x5f, "Security mode reject"}, - + { 0x60, "EMM status"}, { 0x61, "EMM information"}, { 0x62, "Downlink NAS transport"}, @@ -243,7 +243,7 @@ static const value_string nas_msg_emm_strings[] = { /* Table 9.8.2: Message types for EPS session management */ -static const value_string nas_msg_esm_strings[] = { +static const value_string nas_msg_esm_strings[] = { { 0xc1, "Activate default EPS bearer context request"}, { 0xc2, "Activate default EPS bearer context accept"}, { 0xc3, "Activate default EPS bearer context reject"}, @@ -332,7 +332,7 @@ calc_bitrate_ext(guint8 value){ else if (value > 0xba && value <= 0xfa) { return_value = 128 + (value-0xba)*2; } - + return return_value; } @@ -354,7 +354,7 @@ typedef enum DE_EPS_COMMON_NONE /* NONE */ } nas_eps_common_elem_idx_t; -/* +/* * 9.9.2 Common information elements */ @@ -420,8 +420,8 @@ de_eps_cmn_eps_be_ctx_status(tvbuff_t *tvb, proto_tree *tree, guint32 offset, gu */ /* * 9.9.2.7 Spare half octet - * This element is used in the description of EMM and ESM messages when an odd number of - * half octet type 1 information elements are used. This element is filled with spare bits + * This element is used in the description of EMM and ESM messages when an odd number of + * half octet type 1 information elements are used. This element is filled with spare bits * set to zero and is placed in bits 5 to 8 of the octet unless otherwise specified. * Coded Inline */ @@ -485,7 +485,7 @@ de_sec_par_to_eutra(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _ proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, (curr_offset<<3)+5, 3, FALSE); curr_offset++; return len; -} +} /* * 9.9.2.10 Supported codec list @@ -603,7 +603,7 @@ typedef enum DE_EMM_TRAC_AREA_ID_LST, /* 9.9.3.33 Tracking area identity list */ DE_EMM_UE_NET_CAP, /* 9.9.3.34 UE network capability */ DE_EMM_UE_RA_CAP_INF_UPD_NEED, /* 9.9.3.35 UE radio capability information update needed */ - DE_EMM_UE_SEC_CAP, /* 9.9.3.36 UE security capability */ + DE_EMM_UE_SEC_CAP, /* 9.9.3.36 UE security capability */ DE_EMM_EMERG_NUM_LST, /* 9.9.3.37 Emergency Number List */ DE_EMM_CLI, /* 9.9.3.38 CLI */ DE_EMM_SS_CODE, /* 9.9.3.39 SS Code */ @@ -757,7 +757,7 @@ static const value_string nas_eps_emm_type_of_dtatch_UL_vals[] = { { 0, NULL } }; -/* +/* * In the network to UE direction: */ @@ -963,7 +963,7 @@ de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g proto_tree_add_text(tree, tvb, curr_offset, len - 1, "Type of identity not known"); break; } - + return(len); } @@ -1107,7 +1107,7 @@ de_emm_nas_imeisv_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len bit_offset = curr_offset<<3; bit_offset+=4; proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, FALSE); - proto_tree_add_item(tree, hf_nas_eps_esm_imeisv_req, tvb, curr_offset, 1, FALSE); + proto_tree_add_item(tree, hf_nas_eps_esm_imeisv_req, tvb, curr_offset, 1, FALSE); curr_offset++; return(curr_offset - offset); @@ -1191,7 +1191,7 @@ de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len /* Get the bit offset of the lover half of the octet bits 4 - 1 */ bit_offset = curr_offset<<3; bit_offset+=4; - + /* Type of security context flag (TSC) (octet 1) V 1/2 */ proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, FALSE); bit_offset++; @@ -1223,7 +1223,7 @@ de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _ new_tvb = tvb_new_subset(tvb, curr_offset, len, len ); if(gsm_a_dtap_handle) call_dissector(gsm_a_dtap_handle,new_tvb, gpinfo, tree); - + return(len); } /* @@ -1377,7 +1377,7 @@ de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _ /* * 9.9.3.33 Tracking area identity list */ -/* Type of list (octet 1) +/* Type of list (octet 1) * Bits 7 6 */ static const value_string nas_eps_emm_tai_tol_vals[] = { @@ -1473,7 +1473,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l return(curr_offset-offset); } /* - * 9.9.3.34 UE network capability + * 9.9.3.34 UE network capability */ static const true_false_string nas_eps_emm_supported_flg_value = { @@ -1749,7 +1749,7 @@ de_emm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_ /* * The coding of the CLI value part is the same as for octets 3 to 14 - * of the Calling party BCD number information element defined in + * of the Calling party BCD number information element defined in * subclause 10.5.4.9 of 3GPP TS 24.008 */ @@ -1817,8 +1817,8 @@ de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len return(len); } -/* - * 9.9.3.42 Generic message container type +/* + * 9.9.3.42 Generic message container type */ static guint16 @@ -1832,7 +1832,7 @@ de_emm_gen_msg_cont_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint return(len); } -/* +/* * 9.9.3.43 Generic message container */ static guint16 @@ -1846,7 +1846,7 @@ de_emm_gen_msg_cont(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _ return(len); } -/* +/* * 9.9.3.44 Voice domain preference and UE's usage setting */ static guint16 @@ -2038,7 +2038,7 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar "Use the value indicated by the maximum bit rate for uplink in octet 4."); }else{ proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet, - "Maximum bit rate for uplink(extended) : %u %s", + "Maximum bit rate for uplink(extended) : %u %s", calc_bitrate_ext(octet), (octet > 0x4a) ? "Mbps" : "kbps"); } @@ -2052,7 +2052,7 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar "Use the value indicated by the maximum bit rate for downlink in octet 5."); }else{ proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet, - "Maximum bit rate for downlink(extended) : %u %s", + "Maximum bit rate for downlink(extended) : %u %s", calc_bitrate_ext(octet), (octet > 0x4a) ? "Mbps" : "kbps"); } @@ -2066,7 +2066,7 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar "Use the value indicated by the Guaranteed bit rate for uplink in octet 6."); }else{ proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet, - "Guaranteed bit rate for uplink(extended) : %u %s", + "Guaranteed bit rate for uplink(extended) : %u %s", calc_bitrate_ext(octet), (octet > 0x4a) ? "Mbps" : "kbps"); } @@ -2080,7 +2080,7 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar "Use the value indicated by the Guaranteed bit rate for downlink in octet 7."); }else{ proto_tree_add_uint_format(tree, hf_nas_eps_embr_ul, tvb, curr_offset, 1, octet, - "Guaranteed bit rate for downlink(extended) : %u %s", + "Guaranteed bit rate for downlink(extended) : %u %s", calc_bitrate_ext(octet), (octet > 0x4a) ? "Mbps" : "kbps"); } @@ -2113,7 +2113,7 @@ static const value_string nas_eps_esm_cause_vals[] = { { 0x2b, "Invalid EPS bearer identity"}, { 0x2c, "Semantic errors in packet filter(s)"}, { 0x2d, "Syntactical errors in packet filter(s)"}, - { 0x2e, "EPS bearer context without TFT already activated"}, + { 0x2e, "EPS bearer context without TFT already activated"}, { 0x2f, "PTI mismatch"}, { 0x31, "Last PDN disconnection not allowed"}, { 0x32, "PDN type IPv4 only allowed"}, @@ -2150,7 +2150,7 @@ de_esm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch return(curr_offset - offset); } /* - * 9.9.4.5 ESM information transfer flag + * 9.9.4.5 ESM information transfer flag */ /* EIT (ESM information transfer) */ static const true_false_string nas_eps_emm_eit_vals = { @@ -2171,9 +2171,9 @@ de_esm_inf_trf_flg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U return(curr_offset-offset); } /* - * 9.9.4.6 Linked EPS bearer identity + * 9.9.4.6 Linked EPS bearer identity */ -/* +/* * Linked EPS bearer identity (bits 1-4) */ @@ -2211,12 +2211,12 @@ de_esm_lnkd_eps_bearer_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint return(len); } /* - * 9.9.4.7 LLC service access point identifier + * 9.9.4.7 LLC service access point identifier * See subclause 10.5.6.9 in 3GPP TS 24.008 */ /* - * 9.9.4.8 Packet flow identifier - * See subclause 10.5.6.11 in 3GPP TS 24.008 + * 9.9.4.8 Packet flow identifier + * See subclause 10.5.6.11 in 3GPP TS 24.008 */ /* * 9.9.4.9 PDN address @@ -2276,7 +2276,7 @@ static const value_string nas_eps_esm_pdn_type_values[] = { }; /* - * 9.9.4.11 Protocol configuration options + * 9.9.4.11 Protocol configuration options * See subclause 10.5.6.3 in 3GPP TS 24.008 */ /* @@ -2284,7 +2284,7 @@ static const value_string nas_eps_esm_pdn_type_values[] = { * See subclause 10.5.6.5 in 3GPP TS 24.008 */ /* - * 9.9.4.13 Radio priority + * 9.9.4.13 Radio priority * See subclause 10.5.7.2 in 3GPP TS 24.008 */ /* @@ -2292,7 +2292,7 @@ static const value_string nas_eps_esm_pdn_type_values[] = { * See subclause 10.5.6.17 in 3GPP TS 24.008 */ /* - * 9.9.4.15 Traffic flow aggregate description + * 9.9.4.15 Traffic flow aggregate description * The Traffic flow aggregate description information element is encoded using the same format as the Traffic flow * template information element (see subclause 10.5.6.12 in 3GPP TS 24.008 [13]). When sending this IE, the UE shall * assign the packet filter identifier values so that they are unique across all packet filters for the PDN connection. @@ -2303,7 +2303,7 @@ static const value_string nas_eps_esm_pdn_type_values[] = { * packet-gsm_a_gm.c */ /* - * 9.9.4.17 Transaction identifier + * 9.9.4.17 Transaction identifier * The Transaction identifier information element is coded as the Linked TI information element in 3GPP TS 24.008 [13], * subclause 10.5.6.7. * The coding of the TI flag, the TI value and the EXT bit is defined in 3GPP TS 24.007[20]. @@ -2365,20 +2365,20 @@ guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint /* 9.9.4 EPS Session Management (ESM) information elements */ const value_string nas_esm_elem_strings[] = { { 0x00, "Access point name" }, /* 9.9.4.1 Access point name */ - { 0x00, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */ + { 0x00, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */ { 0x00, "EPS quality of service" }, /* 9.9.4.3 EPS quality of service */ { 0x00, "ESM cause" }, /* 9.9.4.4 ESM cause */ - { 0x00, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */ + { 0x00, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */ { 0x00, "Linked EPS bearer identity" }, /* 9.9.4.6 Linked EPS bearer identity */ - { 0x00, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */ + { 0x00, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */ { 0x00, "Packet flow identifier" }, /* 9.9.4.8 Packet flow identifier */ { 0x00, "PDN address" }, /* 9.9.4.9 PDN address */ { 0x00, "PDN type" }, /* 9.9.4.10 PDN type */ - { 0x00, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */ + { 0x00, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */ { 0x00, "Quality of service" }, /* 9.9.4.12 Quality of service */ { 0x00, "Radio priority" }, /* 9.9.4.13 Radio priority */ { 0x00, "Request type" }, /* 9.9.4.14 Request type */ - { 0x00, "Traffic flow aggregate description" }, /* 9.9.4.15 Traffic flow aggregate description */ + { 0x00, "Traffic flow aggregate description" }, /* 9.9.4.15 Traffic flow aggregate description */ { 0x00, "Traffic flow templat" }, /* 9.9.4.16 Traffic flow template */ { 0x00, "Transaction identifier" }, /* 9.9.4.17 Transaction identifier */ { 0, NULL } @@ -2394,17 +2394,17 @@ typedef enum DE_ESM_APN_AGR_MAX_BR, /* 9.9.4.2 APN aggregate maximum bit rate */ DE_ESM_EPS_QOS, /* 9.9.4.3 EPS quality of service */ DE_ESM_CAUSE, /* 9.9.4.4 ESM cause */ - DE_ESM_INF_TRF_FLG, /* 9.9.4.5 ESM information transfer flag */ + DE_ESM_INF_TRF_FLG, /* 9.9.4.5 ESM information transfer flag */ DE_ESM_LNKED_EPS_B_ID, /* 9.9.4.6 Linked EPS bearer identity */ - DE_ESM_LLC_SAPI, /* 9.9.4.7 LLC service access point identifier */ + DE_ESM_LLC_SAPI, /* 9.9.4.7 LLC service access point identifier */ DE_ESM_P_FLW_ID, /* 9.9.4.8 Packet flow identifier */ DE_ESM_PDN_ADDR, /* 9.9.4.9 PDN address */ DE_ESM_PDN_TYPE, /* 9.9.4.10 PDN type */ - DE_ESM_PROT_CONF_OPT, /* 9.9.4.11 Protocol configuration options */ + DE_ESM_PROT_CONF_OPT, /* 9.9.4.11 Protocol configuration options */ DE_ESM_QOS, /* 9.9.4.12 Quality of service */ DE_ESM_RA_PRI, /* 9.9.4.13 Radio priority */ DE_ESM_REQ_TYPE, /* 9.9.4.14 Request type */ - DE_ESM_TRAF_FLOW_AGR_DESC, /* 9.9.4.15 Traffic flow aggregate description */ + DE_ESM_TRAF_FLOW_AGR_DESC, /* 9.9.4.15 Traffic flow aggregate description */ DE_ESM_TRAF_FLOW_TEMPL, /* 9.9.4.16 Traffic flow template */ DE_ESM_TID, /* 9.9.4.17 Transaction identifier */ DE_ESM_NONE /* NONE */ @@ -2417,17 +2417,17 @@ guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint de_esm_apn_aggr_max_br, /* 9.9.4.2 APN aggregate maximum bit rate */ de_esm_qos, /* 9.9.4.3 EPS quality of service */ de_esm_cause, /* 9.9.4.4 ESM cause */ - de_esm_inf_trf_flg, /* 9.9.4.5 ESM information transfer flag */ + de_esm_inf_trf_flg, /* 9.9.4.5 ESM information transfer flag */ de_esm_lnkd_eps_bearer_id, /* 9.9.4.6 Linked EPS bearer identity */ - NULL, /* 9.9.4.7 LLC service access point identifier */ + NULL, /* 9.9.4.7 LLC service access point identifier */ NULL, /* 9.9.4.8 Packet flow identifier */ de_esm_pdn_addr, /* 9.9.4.9 PDN address */ NULL, /* 9.9.4.10 PDN type */ - NULL, /* 9.9.4.11 Protocol configuration options */ + NULL, /* 9.9.4.11 Protocol configuration options */ NULL, /* 9.9.4.12 Quality of service */ NULL, /* 9.9.4.13 Radio priority */ NULL, /* 9.9.4.14 Request type */ - NULL, /* 9.9.4.15 Traffic flow aggregate description */ + NULL, /* 9.9.4.15 Traffic flow aggregate description */ NULL, /* 9.9.4.16 Traffic flow template */ NULL, /* 9.9.4.17 Transaction identifier */ NULL, /* NONE */ @@ -2483,7 +2483,7 @@ nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) ELEM_OPT_TLV(0x4a, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_PLM_LST, " - Equivalent PLMNs"); /* 34 Emergency Number List 9.9.3.37 O TLV 5-50 */ ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, ""); - /* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */ + /* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */ ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, ""); /* F- Additional update result Additional update result 9.9.3.0A O TV 1 */ ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, "" ); @@ -2550,14 +2550,14 @@ nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL); bit_offset+=4; - /* EPS attach type EPS attach type 9.9.3.11 M V 1/2 + /* EPS attach type EPS attach type 9.9.3.11 M V 1/2 * Inline: */ proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, FALSE); bit_offset++; proto_tree_add_bits_item(tree, hf_nas_eps_emm_eps_att_type, tvb, bit_offset, 3, FALSE); bit_offset+=3; - + /* Fix the lengths */ curr_len--; curr_offset++; @@ -2592,11 +2592,11 @@ nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) /* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */ /* ELEM_OPT_TLV(0x5D, xxxxxx, xxxxxx, ""); */ - + EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* - * 8.2.5 Authentication failure + * 8.2.5 Authentication failure */ static void nas_emm_attach_fail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) @@ -2639,12 +2639,12 @@ nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE); bit_offset+=4; /* H0 */ - /* - * NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 + /* + * NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */ de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME"); bit_offset+=4; - + /* Fix the lengths */ curr_len--; curr_offset++; @@ -2703,12 +2703,12 @@ nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) /* 60 CLI CLI 9.9.3.38 O TLV 3-12 */ ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, " - CLI"); /* 61 SS Code SS Code 9.9.3.39 O TV 2 */ - ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, ""); + ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, ""); /* 62 LCS indicator LCS indicator 9.9.3.40 O TV 2 */ - ELEM_OPT_TV(0x62, NAS_PDU_TYPE_EMM, DE_EMM_LCS_IND, ""); + ELEM_OPT_TV(0x62, NAS_PDU_TYPE_EMM, DE_EMM_LCS_IND, ""); /* 63 LCS client identity LCS client identity 9.9.3.41 O TLV 3-257 */ - ELEM_OPT_TLV(0x63, NAS_PDU_TYPE_EMM, DE_EMM_LCS_CLIENT_ID, ""); - + ELEM_OPT_TLV(0x63, NAS_PDU_TYPE_EMM, DE_EMM_LCS_CLIENT_ID, ""); + EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* @@ -2935,7 +2935,7 @@ nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint /* GUTI EPS mobile identity 9.9.3.12 M LV 12 */ ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI"); - + /* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */ ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, ""); @@ -2994,7 +2994,7 @@ nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) /* Mobile identity Mobile identity 9.9.2.3 M LV 4-10 */ ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, ""); - + EXTRANEOUS_DATA_CHECK(curr_len, 0); } @@ -3057,7 +3057,7 @@ nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len /* 23 IMEISV Mobile identity 9.9.2.3 O TLV 11 */ ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - IMEISV"); - + EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* @@ -3143,7 +3143,7 @@ nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) /* * 8.2.25 Service request * This message is sent by the UE to the network to request the establishment - * of a NAS signalling connection and of the radio and S1 bearers. + * of a NAS signalling connection and of the radio and S1 bearers. * Its structure does not follow the structure of a standard layer 3 message. See table 8.2.25.1. */ /* Table 8.2.25.1 @@ -3202,9 +3202,9 @@ nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint /* 5A T3412 value GPRS timer 9.9.3.16 O TV 2 */ ELEM_OPT_TV(0x5a, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value"); /* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */ - ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI"); + ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI"); /* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */ - ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, ""); + ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, ""); /* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */ ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, ""); /* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */ @@ -3339,7 +3339,7 @@ nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) /* NAS message container NAS message container 9.9.3.22 M LV 3-252*/ ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, ""); - + EXTRANEOUS_DATA_CHECK(curr_len, 0); } @@ -3406,7 +3406,7 @@ nas_esm_act_ded_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offs /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */ ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , "" ); - + EXTRANEOUS_DATA_CHECK(curr_len, 0); } @@ -3427,7 +3427,7 @@ nas_esm_act_ded_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offs ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE); /* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */ ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , "" ); - + EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* @@ -3611,7 +3611,7 @@ nas_esm_bearer_res_all_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin EXTRANEOUS_DATA_CHECK(curr_len, 0); } /* - * 8.3.9 Bearer resource modification reject + * 8.3.9 Bearer resource modification reject */ static void nas_esm_bearer_res_mod_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) @@ -3892,7 +3892,7 @@ nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) /* Request type 9.9.4.14 M V 1/2 */ ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_REQ_TYPE); - + /* Lengths already fixed by the call to ELEM_MAND_V macro */ if (curr_len==0) @@ -3989,7 +3989,8 @@ static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset NULL, /* NONE */ }; -void get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p) +static void +get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p) { gint idx; @@ -4012,15 +4013,15 @@ static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset nas_emm_attach_rej, /* Attach reject */ nas_emm_detach_req, /* Detach request */ NULL, /* 8.2.10 Detach accept */ - + nas_emm_trac_area_upd_req, /* Tracking area update request */ nas_emm_trac_area_upd_acc, /* Tracking area update accept */ NULL, /* Tracking area update complete (No IE's)*/ nas_emm_trac_area_upd_rej, /* Tracking area update reject */ - + nas_emm_ext_serv_req, /* Extended service request */ nas_emm_serv_rej, /* Service reject */ - + nas_emm_guti_realloc_cmd, /* GUTI reallocation command */ NULL, /* GUTI reallocation complete (No IE's) */ nas_emm_auth_req, /* Authentication request */ @@ -4032,7 +4033,7 @@ static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset nas_emm_sec_mode_cmd, /* Security mode command */ nas_emm_sec_mode_comp, /* Security mode complete */ nas_emm_sec_mode_rej, /* Security mode reject */ - + nas_emm_emm_status, /* EMM status */ nas_emm_emm_inf, /* EMM information */ nas_emm_dl_nas_trans, /* Downlink NAS transport */ @@ -4044,7 +4045,8 @@ static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset }; -void get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p) +static void +get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p) { gint idx; @@ -4056,8 +4058,8 @@ void get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, in return; } -/* - * EPS session management messages. +/* + * EPS session management messages. * A plain NAS message is pased to this function */ static void @@ -4079,7 +4081,7 @@ disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, FALSE); offset++; - /* Procedure transaction identity 9.4 + /* Procedure transaction identity 9.4 * The procedure transaction identity and its use are defined in 3GPP TS 24.007 */ proto_tree_add_item(tree, hf_nas_eps_esm_proc_trans_id, tvb, offset, 1, FALSE); @@ -4221,7 +4223,7 @@ dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int * d) sequence number; * e) plain NAS message, as defined in item 1. * - * The EPS bearer identity and the procedure transaction identity are only used in messages + * The EPS bearer identity and the procedure transaction identity are only used in messages * with protocol discriminator EPS session management. Octet 1a with the procedure transaction * identity shall only be included in these messages. */ @@ -4311,26 +4313,26 @@ dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pd = tvb_get_guint8(tvb,offset)&0x0f; switch (pd){ case 2: - /* EPS session management messages. - * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values + /* EPS session management messages. + * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values */ disect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset); break; case 7: - /* EPS mobility management messages. - * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values + /* EPS mobility management messages. + * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values */ dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE); break; case 15: - /* Special conformance testing functions for User Equipment messages. - * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values + /* Special conformance testing functions for User Equipment messages. + * Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values */ if (gsm_a_dtap_handle){ tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, -1, -1); gsm_a_dtap_pinfo = pinfo; call_dissector(gsm_a_dtap_handle, new_tvb, gsm_a_dtap_pinfo, nas_eps_tree); - break; + break; } /* else fall through default */ default: proto_tree_add_text(nas_eps_tree, tvb, offset, -1, "Not a NAS EPS PD %u(%s)",pd,val_to_str(pd, protocol_discriminator_vals,"unknown")); @@ -5000,7 +5002,7 @@ void proto_register_nas_eps(void) { NULL, HFILL } }, /* ESM hf cvariables */ - { &hf_nas_eps_msg_esm_type, + { &hf_nas_eps_msg_esm_type, { "NAS EPS session management messages", "nas_eps.nas_msg_esm_type", FT_UINT8, BASE_HEX, VALS(nas_msg_esm_strings), 0x0, NULL, HFILL } @@ -5070,7 +5072,7 @@ void proto_register_nas_eps(void) { /* Register fields and subtrees */ proto_register_field_array(proto_nas_eps, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - + /* Register dissector */ register_dissector(PFNAME, dissect_nas_eps, proto_nas_eps); } diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index e17c73e420..09991d5fab 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -322,7 +322,7 @@ typedef struct _ndmp_conv_data_t { ndmp_task_data_t *task; conversation_t *conversation; } ndmp_conv_data_t; -ndmp_conv_data_t *ndmp_conv_data=NULL; +static ndmp_conv_data_t *ndmp_conv_data=NULL; static proto_tree *top_tree; static itl_nexus_t * diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c index 4aea1f4296..66788ba702 100644 --- a/epan/dissectors/packet-netflow.c +++ b/epan/dissectors/packet-netflow.c @@ -1131,18 +1131,21 @@ typedef struct _ntptime_t { long ntp_frac_sec; /* n/(2**32) */ } ntptime_t; -void nstime_to_ntptime(nstime_t *nst, ntptime_t *ntpt) { +static void +nstime_to_ntptime(nstime_t *nst, ntptime_t *ntpt) { ntpt->ntp_sec = nst->secs + NTP_BASETIME; ntpt->ntp_frac_sec = (long) ((nst->nsecs*FLOAT_DENOM)/1000000000.0); } -void ntptime_to_nstime(ntptime_t *ntpt, nstime_t *nst) { +static void +ntptime_to_nstime(ntptime_t *ntpt, nstime_t *nst) { nst->secs = ntpt->ntp_sec - NTP_BASETIME; nst->nsecs = (int)((ntpt->ntp_frac_sec*1000000000.0)/FLOAT_DENOM); } #endif -void ntptime_buf_to_nstime(const guint8 *ntptime_buf, nstime_t *nstime) { +static void +ntptime_buf_to_nstime(const guint8 *ntptime_buf, nstime_t *nstime) { nstime->secs = pntohl(&ntptime_buf[0]) - NTP_BASETIME; nstime->nsecs = (int)((pntohl(&ntptime_buf[4])*1000000000.0)/FLOAT_DENOM); } diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index bb022c1627..2d0c165036 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -679,7 +679,7 @@ static enum_val_t nfs_fhandle_types[] = { { NULL, NULL, 0 } }; /* decode all nfs filehandles as this type */ -gint default_nfs_fhandle_type=FHT_UNKNOWN; +static gint default_nfs_fhandle_type=FHT_UNKNOWN; /* For dissector helpers which take a "levels" argument to indicate how * many expansions up they should populate the expansion items with @@ -779,7 +779,7 @@ static int nfsv4_operation_tiers[] = { /* file name snooping */ gboolean nfs_file_name_snooping = FALSE; -gboolean nfs_file_name_full_snooping = FALSE; +static gboolean nfs_file_name_full_snooping = FALSE; typedef struct nfs_name_snoop { int fh_length; unsigned char *fh; @@ -804,8 +804,8 @@ static GHashTable *nfs_name_snoop_matched = NULL; static emem_tree_t *nfs_name_snoop_known = NULL; static emem_tree_t *nfs_file_handles = NULL; -gboolean nfs_display_v4_tag = TRUE; -gboolean display_major_nfsv4_ops = TRUE; +static gboolean nfs_display_v4_tag = TRUE; +static gboolean display_major_nfsv4_ops = TRUE; static int dissect_nfs_stateid4(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 *hash); @@ -1206,7 +1206,7 @@ static const value_string names_fhtype[] = }; -const true_false_string tfs_endianness = { "Little Endian", "Big Endian" }; +static const true_false_string tfs_endianness = { "Little Endian", "Big Endian" }; /* SVR4: checked with ReliantUNIX (5.43, 5.44, 5.45), OpenSolaris (build 101a) */ @@ -1662,7 +1662,7 @@ dissect_fhandle_data_NETAPP(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *t } } -const value_string netapp_file_flag_vals[] = { +static const value_string netapp_file_flag_vals[] = { { 0x0000, "Not set"}, { 0x0001, "Set"}, { 0, NULL} @@ -2607,7 +2607,7 @@ dissect_nfs2_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pro /* RFC 1094, Page 15 */ -const value_string nfs2_ftype[] = +static const value_string nfs2_ftype[] = { { 0, "Non-File" }, { 1, "Regular File" }, @@ -8068,7 +8068,7 @@ static const value_string names_nfsv4_operation[] = { { 0, NULL } }; -gint *nfsv4_operation_ett[] = +static gint *nfsv4_operation_ett[] = { &ett_nfs_access4 , &ett_nfs_access_supp4, @@ -10163,7 +10163,7 @@ static const value_string layoutreturn_names[] = { { 0, NULL } }; -const value_string nfs_fh_obj_id[] = { +static const value_string nfs_fh_obj_id[] = { { 1, "NF4REG"}, { 2, "NF4DIR"}, { 3, "NF4BLK"}, @@ -10230,7 +10230,7 @@ static const value_string names_nfs_cb_operation[] = { { 0, NULL } }; -gint *nfs_cb_operation_ett[] = +static gint *nfs_cb_operation_ett[] = { &ett_nfs_cb_getattr, &ett_nfs_cb_recall, diff --git a/epan/dissectors/packet-nfs.h b/epan/dissectors/packet-nfs.h index 9114c6c43b..8b33df58d0 100644 --- a/epan/dissectors/packet-nfs.h +++ b/epan/dissectors/packet-nfs.h @@ -206,7 +206,6 @@ extern proto_tree* display_access_items(tvbuff_t* tvb, int offset, packet_info* extern int dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree, int version, GString *optext); -extern gint default_nfs_fhandle_type; extern gint hf_nfs_nfsstat; #endif /* packet-nfs.h */ diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c index e69793f518..8aa2c830d0 100644 --- a/epan/dissectors/packet-omron-fins.c +++ b/epan/dissectors/packet-omron-fins.c @@ -934,7 +934,7 @@ static const int *data_type_fields[] = { NULL }; -const int *cyclic_non_fatal_1_fields[] = { +static const int *cyclic_non_fatal_1_fields[] = { &hf_omron_cyclic_1, &hf_omron_cyclic_2, &hf_omron_cyclic_3, @@ -945,7 +945,7 @@ const int *cyclic_non_fatal_1_fields[] = { NULL }; -const int *cyclic_non_fatal_2_fields[] = { +static const int *cyclic_non_fatal_2_fields[] = { &hf_omron_cyclic_8, &hf_omron_cyclic_9, &hf_omron_cyclic_10, @@ -957,7 +957,7 @@ const int *cyclic_non_fatal_2_fields[] = { NULL }; -const int *cyclic_non_fatal_3_fields[] = { +static const int *cyclic_non_fatal_3_fields[] = { &hf_omron_cyclic_16, &hf_omron_cyclic_17, &hf_omron_cyclic_18, @@ -969,7 +969,7 @@ const int *cyclic_non_fatal_3_fields[] = { NULL }; -const int *cyclic_non_fatal_4_fields[] = { +static const int *cyclic_non_fatal_4_fields[] = { &hf_omron_cyclic_24, &hf_omron_cyclic_25, &hf_omron_cyclic_26, @@ -981,7 +981,7 @@ const int *cyclic_non_fatal_4_fields[] = { NULL }; -const int *cyclic_non_fatal_5_fields[] = { +static const int *cyclic_non_fatal_5_fields[] = { &hf_omron_cyclic_32, &hf_omron_cyclic_33, &hf_omron_cyclic_34, @@ -993,7 +993,7 @@ const int *cyclic_non_fatal_5_fields[] = { NULL }; -const int *cyclic_non_fatal_6_fields[] = { +static const int *cyclic_non_fatal_6_fields[] = { &hf_omron_cyclic_40, &hf_omron_cyclic_41, &hf_omron_cyclic_42, @@ -1005,7 +1005,7 @@ const int *cyclic_non_fatal_6_fields[] = { NULL }; -const int *cyclic_non_fatal_7_fields[] = { +static const int *cyclic_non_fatal_7_fields[] = { &hf_omron_cyclic_48, &hf_omron_cyclic_49, &hf_omron_cyclic_50, @@ -1017,7 +1017,7 @@ const int *cyclic_non_fatal_7_fields[] = { NULL }; -const int *cyclic_non_fatal_8_fields[] = { +static const int *cyclic_non_fatal_8_fields[] = { &hf_omron_cyclic_56, &hf_omron_cyclic_57, &hf_omron_cyclic_58, diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index db08795e00..a89aeca1bb 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -129,9 +129,9 @@ static gint ett_eap = -1; */ static int radius_tap = -1; -radius_vendor_info_t no_vendor = {"Unknown Vendor",0,NULL,-1,1,1,FALSE}; +static radius_vendor_info_t no_vendor = {"Unknown Vendor",0,NULL,-1,1,1,FALSE}; -radius_attr_info_t no_dictionary_entry = {"Unknown-Attribute",0,FALSE,FALSE,radius_octets, NULL, NULL, -1, -1, -1, -1, -1, NULL }; +static radius_attr_info_t no_dictionary_entry = {"Unknown-Attribute",0,FALSE,FALSE,radius_octets, NULL, NULL, -1, -1, -1, -1, -1, NULL }; static dissector_handle_t eap_handle; @@ -182,8 +182,8 @@ static const value_string radius_vals[] = {RADIUS_DISCONNECT_REQUEST_ACK, "Disconnect-ACK"}, /* 41 RFC3575 */ {RADIUS_DISCONNECT_REQUEST_NAK, "Disconnect-NAK"}, /* 42 RFC3575 */ {RADIUS_CHANGE_FILTER_REQUEST, "CoA-Request"}, /* 43 */ - {RADIUS_CHANGE_FILTER_REQUEST_ACK, "CoA-ACK"}, /* 44 */ - {RADIUS_CHANGE_FILTER_REQUEST_NAK, "CoA-NAK"}, /* 45 */ + {RADIUS_CHANGE_FILTER_REQUEST_ACK, "CoA-ACK"}, /* 44 */ + {RADIUS_CHANGE_FILTER_REQUEST_NAK, "CoA-NAK"}, /* 45 */ /* 50 IP-Address-Allocate [RFC3575] 51 IP-Address-Release [RFC3575] @@ -227,7 +227,7 @@ static gint radius_vsa_equal(gconstpointer k1, gconstpointer k2) const radius_vsa_buffer_key* key1 = (const radius_vsa_buffer_key*) k1; const radius_vsa_buffer_key* key2 = (const radius_vsa_buffer_key*) k2; - return (((key1->vendor_id == key2->vendor_id) && + return (((key1->vendor_id == key2->vendor_id) && (key1->vsa_type == key2->vsa_type) ) ? TRUE : FALSE); } @@ -237,7 +237,7 @@ static guint radius_vsa_hash(gconstpointer k) const radius_vsa_buffer_key* key = (const radius_vsa_buffer_key*) k; return key->vendor_id + key->vsa_type; -} +} /* Compare 2 keys */ static gint radius_call_equal(gconstpointer k1, gconstpointer k2) @@ -635,7 +635,7 @@ void radius_ipv6prefix(radius_attr_info_t* a, proto_tree* tree, packet_info *pin proto_item_append_text(avp_item, "[wrong length for IPv6 prefix]"); return; } - + /* first byte is reserved == 0x00 */ if (tvb_get_guint8(tvb, offset)) { proto_item_append_text(avp_item, "[invalid reserved byte for IPv6 prefix]"); @@ -1079,7 +1079,7 @@ static void dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, add_avp_to_tree(avp_tree, avp_item, pinfo, vsa_tvb, dictionary_entry, vsa_buffer->len, 0); g_hash_table_remove(vsa_buffer_table, &(vsa_buffer->key)); g_free(vsa_buffer); - + } else { add_avp_to_tree(avp_tree, avp_item, pinfo, tvb, dictionary_entry, avp_vsa_len, offset); } @@ -1310,7 +1310,7 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint avplength; e_radiushdr rh; radius_info_t *rad_info; - + conversation_t* conversation; radius_call_info_key radius_call_key; @@ -1318,13 +1318,13 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) radius_call_t *radius_call = NULL; nstime_t delta; static address null_address = { AT_NONE, 0, NULL }; - + /* does this look like radius ? */ if(!is_radius(tvb)){ return 0; } - + col_set_str(pinfo->cinfo, COL_PROTOCOL, "RADIUS"); col_clear(pinfo->cinfo, COL_INFO); @@ -1786,7 +1786,7 @@ extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_i /* XXX: Default "standard" values: Should be parameters ? */ vendor->type_octets = 1; vendor->length_octets = 1; - vendor->has_flags = FALSE; + vendor->has_flags = FALSE; g_hash_table_insert(dict->vendors_by_id,GUINT_TO_POINTER(vendor->code),vendor); g_hash_table_insert(dict->vendors_by_name,(gpointer)(vendor->name),vendor); @@ -1897,7 +1897,7 @@ static void register_radius_fields(const char* unused _U_) { { "Ascend Data Filter", "radius.ascenddatafilter", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }} }; - + gint *base_ett[] = { &ett_radius, &ett_radius_avp, @@ -1905,32 +1905,32 @@ static void register_radius_fields(const char* unused _U_) { &(no_dictionary_entry.ett), &(no_vendor.ett), }; - + hfett_t ri; char* dir = NULL; gchar* dict_err_str = NULL; - + ri.hf = g_array_new(FALSE,TRUE,sizeof(hf_register_info)); ri.ett = g_array_new(FALSE,TRUE,sizeof(gint *)); ri.vend_vs = g_array_new(TRUE,TRUE,sizeof(value_string)); - + g_array_append_vals(ri.hf, base_hf, array_length(base_hf)); g_array_append_vals(ri.ett, base_ett, array_length(base_ett)); - + dir = get_persconffile_path("radius", FALSE, FALSE); - + if (test_for_directory(dir) != EISDIR) { /* Although dir isn't a directory it may still use memory */ g_free(dir); - + dir = get_datafile_path("radius"); - + if (test_for_directory(dir) != EISDIR) { g_free(dir); dir = NULL; } } - + if (dir) { radius_load_dictionary(dict,dir,"dictionary",&dict_err_str); @@ -1938,7 +1938,7 @@ static void register_radius_fields(const char* unused _U_) { g_warning("radius: %s",dict_err_str); g_free(dict_err_str); } - + g_hash_table_foreach(dict->attrs_by_id,register_attrs,&ri); g_hash_table_foreach(dict->vendors_by_id,register_vendors,&ri); } @@ -1985,7 +1985,7 @@ proto_register_radius(void) "Time to live for a radius request used for matching it with a response", 10, &request_ttl); radius_tap = register_tap("radius"); proto_register_prefix("radius",register_radius_fields); - + dict = g_malloc(sizeof(radius_dictionary_t)); dict->attrs_by_id = g_hash_table_new(g_direct_hash,g_direct_equal); dict->attrs_by_name = g_hash_table_new(g_str_hash,g_str_equal); diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c index b10a671e5d..5f688d673e 100644 --- a/epan/dissectors/packet-rsl.c +++ b/epan/dissectors/packet-rsl.c @@ -173,9 +173,9 @@ static int ett_ie_meas_res_no = -1; static int ett_ie_message_id = -1; static int ett_ie_sys_info_type = -1; -proto_tree *top_tree; -dissector_handle_t gsm_a_ccch_handle; -dissector_handle_t gsm_a_dtap_handle; +static proto_tree *top_tree; +static dissector_handle_t gsm_a_ccch_handle; +static dissector_handle_t gsm_a_dtap_handle; static gboolean is_si2q = FALSE; @@ -245,7 +245,7 @@ static const value_string rsl_msg_disc_vals[] = { #define RSL_MSG_CHAN_ACTIV_N_ACK 35 #define RSL_MSG_CONN_FAIL 36 #define RSL_MSG_DEACTIVATE_SACCH 37 - + #define RSL_MSG_ENCR_CMD 38 /* 8.4.6 */ #define RSL_MSG_HANDODET 39 /* 8.4.7 */ #define RSL_MSG_MEAS_RES 40 /* 8.4.8 */ @@ -401,7 +401,7 @@ static const value_string rsl_msg_type_vals[] = { #define RSL_IE_TFO_STATUS 59 #define RSL_IE_LLP_APDU 60 #define RSL_IE_TFO_TRANSP_CONT 61 - + static const value_string rsl_ie_type_vals[] = { { 0x01, "Channel Number" }, /* 9.3.1 */ { 0x02, "Link Identifier" }, /* 9.3.2 */ @@ -657,7 +657,7 @@ dissect_rsl_ie_act_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* The R bit indicates if the procedure is an initial activation or a reactivation. */ proto_tree_add_item(ie_tree, hf_rsl_rbit, tvb, offset, 1, FALSE); - /* The A-bits indicate the type of activation, which defines the access procedure + /* The A-bits indicate the type of activation, which defines the access procedure * and the operation of the data link layer */ octet = (tvb_get_guint8(tvb,offset) & 0x06)>>1; @@ -741,9 +741,9 @@ dissect_rsl_ie_bs_power(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* FPC_EPC mode */ proto_tree_add_item(ie_tree, hf_rsl_bs_fpc_epc_mode, tvb, offset, 1, FALSE); - /* The Power Level field (octet 2) indicates the number of 2 dB steps by - * which the power shall be reduced from its nominal value, Pn, - * set by the network operator to adjust the coverage. + /* The Power Level field (octet 2) indicates the number of 2 dB steps by + * which the power shall be reduced from its nominal value, Pn, + * set by the network operator to adjust the coverage. * Thus the Power Level values correspond to the following powers (relative to Pn): */ proto_tree_add_item(ie_tree, hf_rsl_bs_power, tvb, offset, 1, FALSE); @@ -891,7 +891,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, ie_offset = offset; /* The DTX bits of octet 3 indicate whether DTX is applied - * DTXd indicates use of DTX in the downlink direction (BTS to MS) and + * DTXd indicates use of DTX in the downlink direction (BTS to MS) and * DTXu indicates use of DTX in the uplink direction (MS to BTS). */ proto_tree_add_item(ie_tree, hf_rsl_cm_dtxd, tvb, offset, 1, FALSE); @@ -900,7 +900,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* The "Speech or data indicator" field (octet 4) */ proto_tree_add_item(ie_tree, hf_rsl_speech_or_data, tvb, offset, 1, FALSE); octet = tvb_get_guint8(tvb,offset); - offset++; + offset++; /* Channel rate and type */ proto_tree_add_item(ie_tree, hf_rsl_ch_rate_and_type, tvb, offset, 1, FALSE); offset++; @@ -1050,7 +1050,7 @@ dissect_rsl_ie_ho_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i /* Element identifier */ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); offset++; - + /* Hand-over reference */ proto_tree_add_item(ie_tree, hf_rsl_ho_ref, tvb, offset, 1, FALSE); offset++; @@ -1237,7 +1237,7 @@ dissect_rsl_ie_paging_grp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); offset++; - /* The Paging Group field (octet 2) contains the binary representation of the paging + /* The Paging Group field (octet 2) contains the binary representation of the paging * group as defined in 3GPP TS 45.002. */ proto_tree_add_item(ie_tree, hf_rsl_paging_grp, tvb, offset, 1, FALSE); @@ -1269,7 +1269,7 @@ dissect_rsl_ie_paging_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); offset++; - /* + /* * Paging Buffer Space. */ proto_tree_add_item(ie_tree, hf_rsl_paging_load, tvb, offset, 2, FALSE); @@ -1620,7 +1620,7 @@ dissect_rsl_ie_staring_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t return offset; } -/* +/* * 9.3.24 Timing Advance */ static int @@ -1701,7 +1701,7 @@ dissect_rsl_ie_uplik_meas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre */ proto_tree_add_item(ie_tree, hf_rsl_rxlev_sub_up, tvb, offset, 1, FALSE); offset++; - /* Octet 5 + /* Octet 5 * 8 7 6 5 4 3 2 1 * Reserved | RXQUAL.FULL.up | RXQUAL.SUB.up */ @@ -1726,7 +1726,7 @@ static const value_string rsl_class_vals[] = { { 0x07, "Interworking" }, { 0, NULL } }; - + /* * 9.3.26 Cause */ @@ -1758,7 +1758,7 @@ dissect_rsl_ie_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); offset++; ie_offset = offset; - + /* Cause Value */ octet = tvb_get_guint8(tvb,offset); proto_tree_add_item(tree, hf_rsl_extension_bit, tvb, offset, 1, FALSE); @@ -1766,7 +1766,7 @@ dissect_rsl_ie_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in if ((octet & 0x80) == 80) /* Cause Extension*/ offset++; - + /* Diagnostic(s) if any */ return ie_offset+length; } @@ -1967,7 +1967,7 @@ dissect_rsl_ie_smscb_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); offset++; - /* + /* * SMSCB frame */ proto_tree_add_text(ie_tree, tvb,offset,length,"SMSCB frame"); @@ -2001,14 +2001,14 @@ dissect_rsl_ie_ms_timing_offset(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); offset++; - /* Timing Offset - * The meaning of the MS Timing Offset is as defined in 3GPP TS 45.010. + /* Timing Offset + * The meaning of the MS Timing Offset is as defined in 3GPP TS 45.010. * The value of MS Timing Offset is the binary value of the 8-bit Timing Offset field (octet 2) - 63. * The range of MS Timing Offset is therefore -63 to 192. */ proto_tree_add_item(ie_tree, hf_rsl_timing_offset, tvb, offset, 1, FALSE); offset++; - + return offset; } @@ -2080,7 +2080,7 @@ dissect_rsl_ie_full_bcch_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); offset++; - /* + /* * Octets 3-25 contain the complete L3 message as defined in 3GPP TS 44.018. */ @@ -2128,10 +2128,10 @@ dissect_rsl_ie_ch_needed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree /* Channel */ proto_tree_add_item(ie_tree, hf_rsl_ch_needed, tvb, offset, 1, FALSE); offset++; - + return offset; } -/* +/* * 9.3.41 CB Command type */ static int @@ -2158,7 +2158,7 @@ dissect_rsl_ie_cb_cmd_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr /* Channel */ proto_tree_add_item(ie_tree, hf_rsl_ch_needed, tvb, offset, 1, FALSE); offset++; - + return offset; } @@ -2192,7 +2192,7 @@ dissect_rsl_ie_smscb_mess(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre offset++; ie_offset = offset; - /* + /* * SMSCB Message */ @@ -2284,7 +2284,7 @@ dissect_rsl_ie_smscb_ch_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t /* Channel Ind */ proto_tree_add_item(ie_tree, hf_rsl_ch_ind, tvb, offset, 1, FALSE); offset++; - + return offset; } @@ -2318,7 +2318,7 @@ dissect_rsl_ie_grp_call_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t proto_tree_add_text(ie_tree, tvb,offset,length,"Descriptive group or broadcast call reference"); - /* The octets 3 to 7 are coded in the same way as the octets 2 to 6 + /* The octets 3 to 7 are coded in the same way as the octets 2 to 6 * in the Descriptive group or broadcast call reference * information element as defined in 3GPP TS 24.008. */ @@ -2362,7 +2362,7 @@ dissect_rsl_ie_ch_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, * information element as defined in 3GPP TS 44.018, n-2 is equal to the length of the radio interface * Group channel description information element */ - + offset = offset + length; return offset; @@ -2397,7 +2397,7 @@ dissect_rsl_ie_nch_drx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* Octet 3 bits 3, 4 and 5 are bits 1, 2 and 3 of the radio interface * eMLPP priority as defined in 3GPP TS 44.018. */ - /* Octet 3 bits 1 and 2 are bits 1 and 2 of the radio interface NLN + /* Octet 3 bits 1 and 2 are bits 1 and 2 of the radio interface NLN * as defined in 3GPP TS 44.018. */ @@ -2448,7 +2448,7 @@ dissect_rsl_ie_cmd_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_tree_add_item(ie_tree, hf_rsl_command, tvb, offset, 1, FALSE); offset++; } - + return offset; } /* @@ -2487,9 +2487,9 @@ dissect_rsl_ie_emlpp_prio(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre offset++; /* The call priority field (bit 3 to 1 of octet 2) is coded in the same way - * as the call priority field (bit 3 to 1 of octet 5) in the + * as the call priority field (bit 3 to 1 of octet 5) in the * Descriptive group or broadcast call reference information element - * as defined in 3GPP TS 24.008. + * as defined in 3GPP TS 24.008. */ proto_tree_add_item(ie_tree, hf_rsl_emlpp_prio, tvb, offset, 1, FALSE); offset++; @@ -2521,7 +2521,7 @@ dissect_rsl_ie_uic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset++; /* Octet 3 bits 1 to 6 contain the radio interface octet 2 bits 3 to 8 of the - * UIC information element as defined in 3GPP TS 44.018. + * UIC information element as defined in 3GPP TS 44.018. */ proto_tree_add_text(ie_tree, tvb,offset,1,"UIC"); offset++; @@ -2680,7 +2680,7 @@ dissect_rsl_ie_sup_codec_types(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * and bit 8 is set to 0, or if bit 6 of the Codec List field (octet 4) indicates * that UMTS AMR is supported, or if bit 7 of the Codec List field (octet 4) * indicates that UMTS AMR 2 is supported, or if bit 1, 3, 4 or 5 of the Codec List - * extension 1 field (octet 5) indicates that AMR WB is supported, the following + * extension 1 field (octet 5) indicates that AMR WB is supported, the following * two octets (after the Codec List field and its extensions) is present */ @@ -2768,14 +2768,14 @@ dissect_rsl_ie_rtd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); offset++; - /* The RTD field is the binary representation of the value of the + /* The RTD field is the binary representation of the value of the * round trip delay in 20 ms increments. */ rtd = (tvb_get_guint8(tvb,offset)>>1)*20; rtd_item = proto_tree_add_uint(tree, hf_rsl_rtd, tvb,offset,1,rtd); proto_item_append_text(rtd_item," ms"); - /* The Delay IND field indicates if the delay corresponds to a BTS + /* The Delay IND field indicates if the delay corresponds to a BTS * to transcoder delay or to a BTS to remote BTS delay. */ proto_tree_add_item(ie_tree, hf_rsl_delay_ind, tvb, offset, 1, FALSE); @@ -2863,7 +2863,7 @@ dissect_rsl_ie_llp_apdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* * 9.3.59 TFO transparent container * This is a variable length element that conveys a message associated with TFO protocol, - * as defined in 3GPP TS 28.062. This element can be sent from the BSC to the BTS or + * as defined in 3GPP TS 28.062. This element can be sent from the BSC to the BTS or * from the BTS to the BSC. The BTS shall retrieve the information it is able to understand, * and forward transparently the complete information to the BSC or to the TRAU. */ @@ -3015,7 +3015,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) if(tvb_length_remaining(tvb,offset) > 0) offset = dissect_rsl_ie_staring_time(tvb, pinfo, tree, offset, FALSE); break; - /* 8.5.2 CCCH LOAD INDICATION 18*/ + /* 8.5.2 CCCH LOAD INDICATION 18*/ case RSL_MSG_CCCH_LOAD_IND: /* Channel number (note) 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); @@ -3170,7 +3170,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) offset = dissect_rsl_ie_ho_ref(tvb, pinfo, tree, offset, FALSE); /* BS Power 9.3.4 O 3) TV 2 */ if(tvb_length_remaining(tvb,offset) > 0) - offset = dissect_rsl_ie_bs_power(tvb, pinfo, tree, offset, FALSE); + offset = dissect_rsl_ie_bs_power(tvb, pinfo, tree, offset, FALSE); /* MS Power 9.3.13 O 3) TV 2 */ if(tvb_length_remaining(tvb,offset) > 0) offset = dissect_rsl_ie_ms_pow(tvb, pinfo, tree, offset, FALSE); @@ -3238,7 +3238,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Link Identifier 9.3.2 M TV 2 */ offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE); /* L3 Info (CIPH MOD CMD) 9.3.11 M TLV 6 */ - offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, TRUE); + offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, TRUE); break; /* 8.4.7 HANDOVER DETECTION */ case RSL_MSG_HANDODET: /* 39 8.4.7 */ @@ -3263,10 +3263,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) offset = dissect_rsl_ie_l1_inf(tvb, pinfo, tree, offset, FALSE); /* L3 Info (MEAS REP, EXT MEAS REP or ENH MEAS REP) 9.3.11 O 1) TLV 21 */ if(tvb_length_remaining(tvb,offset) > 0) - offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE); + offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE); /* MS Timing Offset 9.3.37 O 2) TV 2 */ if(tvb_length_remaining(tvb,offset) > 0) - offset = dissect_rsl_ie_ms_timing_offset(tvb, pinfo, tree, offset, FALSE); + offset = dissect_rsl_ie_ms_timing_offset(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.9 MODE MODIFY */ case RSL_MSG_MODE_MODIFY_REQ: /* 41 8.4.9 */ @@ -3276,7 +3276,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) offset = dissect_rsl_ie_ch_mode(tvb, pinfo, tree, offset, TRUE); /* Encryption information 9.3.7 O 1) TLV >=3 */ if(tvb_length_remaining(tvb,offset) > 0) - offset = dissect_rsl_ie_enc_inf(tvb, pinfo, tree, offset, FALSE); + offset = dissect_rsl_ie_enc_inf(tvb, pinfo, tree, offset, FALSE); /* Main channel reference 9.3.45 O 2) TV 2 */ if(tvb_length_remaining(tvb,offset) > 0) offset = dissect_rsl_ie_main_ch_ref(tvb, pinfo, tree, offset, FALSE); @@ -3469,7 +3469,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, TRUE); /* Supported Codec Type 9.3.54 O 1) TLV >=5 */ if(tvb_length_remaining(tvb,offset) > 0) - offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE); + offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE); /* TFO transparent container 9.3.59 O 4) TLV >=3 */ if(tvb_length_remaining(tvb,offset) > 0) offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE); diff --git a/epan/dissectors/packet-sasp.c b/epan/dissectors/packet-sasp.c index 483016e44e..4ddf6c1704 100644 --- a/epan/dissectors/packet-sasp.c +++ b/epan/dissectors/packet-sasp.c @@ -312,8 +312,8 @@ static const value_string set_mem_state_reply_response_code[] = { }; -proto_item *memdatacomp = NULL; -proto_tree *memdatacomp_tree = NULL; +static proto_item *memdatacomp = NULL; +static proto_tree *memdatacomp_tree = NULL; diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 9737435cfa..e1453f80ef 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -2439,7 +2439,8 @@ ssl_load_key(FILE* fp) return private_key; } -const char *BAGTYPE(gnutls_pkcs12_bag_type_t x) { +static const char * +BAGTYPE(gnutls_pkcs12_bag_type_t x) { switch (x) { case GNUTLS_BAG_EMPTY: return "Empty"; case GNUTLS_BAG_PKCS8_ENCRYPTED_KEY: return "PKCS#8 Encrypted key"; diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index 54bc972f6c..469b486480 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -392,7 +392,7 @@ static dissector_handle_t data_handle; static gint tds_protocol_type = TDS_PROTOCOL_NOT_SPECIFIED; -const enum_val_t tds_protocol_type_options[] = { +static const enum_val_t tds_protocol_type_options[] = { {"not_specified", "Not Specified", TDS_PROTOCOL_NOT_SPECIFIED}, {"tds4", "TDS 4", TDS_PROTOCOL_4}, /* TDS 4.2 and TDS 4.6 */ {"tds5", "TDS 5", TDS_PROTOCOL_5}, @@ -416,7 +416,7 @@ const enum_val_t tds_protocol_type_options[] = { static gboolean tds_little_endian = TRUE; -const enum_val_t tds_endian_type_options[] = { +static const enum_val_t tds_endian_type_options[] = { {"little_endian", "Little Endian", TRUE}, {"big_endian" , "Big Endian" , FALSE}, {NULL, NULL, -1} @@ -612,7 +612,8 @@ tds_tvb_get_xxtohl(tvbuff_t *tvb, gint offset, gboolean tds_little_endian_flag) } -static int tds_token_is_fixed_size(guint8 token) +static int +tds_token_is_fixed_size(guint8 token) { switch (token) { case TDS_DONE_TOKEN: @@ -629,7 +630,8 @@ static int tds_token_is_fixed_size(guint8 token) } -static int tds_get_fixed_token_size(guint8 token) +static int +tds_get_fixed_token_size(guint8 token) { switch(token) { case TDS_DONE_TOKEN: @@ -921,7 +923,8 @@ dissect_tds7_login(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } -static int get_size_by_coltype(int servertype) +static int +get_size_by_coltype(int servertype) { switch(servertype) { diff --git a/epan/dissectors/packet-tpkt.c b/epan/dissectors/packet-tpkt.c index 7f6fa01d0b..1228d37fe2 100644 --- a/epan/dissectors/packet-tpkt.c +++ b/epan/dissectors/packet-tpkt.c @@ -108,7 +108,8 @@ is_tpkt(tvbuff_t *tvb, int min_len) */ return pkt_len; } -guint16 is_asciitpkt(tvbuff_t *tvb) +guint16 +is_asciitpkt(tvbuff_t *tvb) { guint16 count; /* @@ -136,7 +137,8 @@ guint16 is_asciitpkt(tvbuff_t *tvb) } -int parseLengthText ( guint8* pTpktData ) +static int +parseLengthText ( guint8* pTpktData ) { int value = 0; const guint8 * pData = pTpktData; @@ -156,7 +158,8 @@ int parseLengthText ( guint8* pTpktData ) } return value; } -int parseVersionText ( guint8* pTpktData ) +static int +parseVersionText ( guint8* pTpktData ) { int value = 0; guint8 * pData = pTpktData; @@ -177,7 +180,8 @@ int parseVersionText ( guint8* pTpktData ) return value; } -int parseReservedText ( guint8* pTpktData ) +static int +parseReservedText ( guint8* pTpktData ) { int value = 0; guint8 * pData = pTpktData; @@ -210,7 +214,7 @@ dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, volatile int offset = 0; int length_remaining; int data_len; - int mgcp_packet_len = 0; + volatile int mgcp_packet_len = 0; int mgcp_version = 0; int mgcp_reserved = 0; volatile int length; @@ -593,16 +597,18 @@ dissect_tpkt_x224(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, x224_handle); } + /* * Dissect ASCII TPKT, which wraps a ASCII TPKT header around an OSI TP * PDU. - + */ +#if 0 static void dissect_ascii_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { dissect_asciitpkt(tvb, pinfo, tree, osi_tp_handle); } - */ +#endif void proto_register_tpkt(void) diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c index 02902f4022..fee534bfda 100644 --- a/epan/dissectors/packet-xml.c +++ b/epan/dissectors/packet-xml.c @@ -35,10 +35,7 @@ #include <dirent.h> #endif -#include <ctype.h> -#include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <errno.h> #include <glib.h> @@ -101,8 +98,8 @@ static gboolean pref_heuristic_unicode = FALSE; #define XML_SCOPED_NAME -1001 -GArray* hf_arr; -GArray* ett_arr; +static GArray* hf_arr; +static GArray* ett_arr; static const gchar* default_media_types[] = { "text/xml", @@ -155,7 +152,7 @@ static const gchar* default_media_types[] = { "application/x-wms-logconnectstats", "application/x-wms-logplaystats", "application/x-wms-sendevent", - "application/rss+xml", + "application/rss+xml", "image/svg+xml", }; @@ -185,7 +182,7 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static GPtrArray* stack = NULL; xml_frame_t* current_frame; char* colinfo_str; - + if (stack != NULL) g_ptr_array_free(stack,TRUE); @@ -269,7 +266,7 @@ xml_frame_t *xml_get_attrib(xml_frame_t *frame, const gchar *name) { xml_frame_t *xml_item = frame->first_child; while (xml_item) { - if ((xml_item->type == XML_FRAME_ATTRIB) && + if ((xml_item->type == XML_FRAME_ATTRIB) && xml_item->name_orig_case && !strcmp(xml_item->name_orig_case, name)) { attr = xml_item; break; @@ -579,7 +576,7 @@ static void after_attrib(void* tvbparse_data, const void* wanted_data _U_, tvbpa proto_item_set_text(pi, "%s", tvb_format_text(tok->tvb,tok->offset,tok->len)); current_frame->last_item = pi; - + new_frame = ep_alloc(sizeof(xml_frame_t)); new_frame->type = XML_FRAME_ATTRIB; new_frame->name = name; @@ -882,7 +879,7 @@ static gchar* fully_qualified_name(GPtrArray* hier, gchar* name, gchar* proto_na GString* s = g_string_new(proto_name); gchar* str; g_string_append(s,"."); - + for (i = 1; i < hier->len; i++) { g_string_append_printf(s, "%s.",(gchar*)g_ptr_array_index(hier,i)); } @@ -1317,7 +1314,7 @@ static void apply_prefs(void) { pref_heuristic_media_save = FALSE; } } - + if (pref_heuristic_tcp_save != pref_heuristic_tcp ) { if (pref_heuristic_tcp) { heur_dissector_add("tcp", dissect_xml_heur, xml_ns.hf_tag); @@ -1327,7 +1324,7 @@ static void apply_prefs(void) { pref_heuristic_tcp_save = FALSE; } } - + if (pref_heuristic_udp_save != pref_heuristic_udp ) { if (pref_heuristic_udp) { heur_dissector_add("udp", dissect_xml_heur, xml_ns.hf_tag); @@ -1341,7 +1338,7 @@ static void apply_prefs(void) { range_foreach(xml_tcp_range, range_delete_xml_tcp_callback); g_free(xml_tcp_range); xml_tcp_range = range_copy(global_xml_tcp_range); - range_foreach(xml_tcp_range, range_add_xml_tcp_callback); + range_foreach(xml_tcp_range, range_add_xml_tcp_callback); } void diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c index 72b17d8371..164603178b 100644 --- a/epan/dissectors/packet-zbee-zdp.c +++ b/epan/dissectors/packet-zbee-zdp.c @@ -274,7 +274,7 @@ gint ett_zbee_zdp_rtg = -1; gint ett_zbee_zdp_cache = -1; /* Data dissector handle. */ -dissector_handle_t data_handle; +static dissector_handle_t data_handle; /************************************** * Value Strings |