aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-05-03 14:54:39 +0000
committerMichael Mann <mmann78@netscape.net>2013-05-03 14:54:39 +0000
commitce537f6b9434dfb817cfa9ae2cd2a3a131dccce5 (patch)
treead8896509ce9d9d36f68b0de7b585698a1cfc624 /epan
parent2602490a2d0d81a3f37c65aae5973a9aae21dd21 (diff)
Remove static packet_info *gpinfo and just use the packet_info provided by the function.
svn path=/trunk/; revision=49145
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bssgp.c64
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c43
-rw-r--r--epan/dissectors/packet-gsm_bssmap_le.c10
-rw-r--r--epan/dissectors/packet-gsm_sms.c57
-rw-r--r--epan/dissectors/packet-nas_eps.c35
-rw-r--r--epan/dissectors/packet-sgsap.c14
6 files changed, 100 insertions, 123 deletions
diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c
index 2c02af675f..80b0c9bb07 100644
--- a/epan/dissectors/packet-bssgp.c
+++ b/epan/dissectors/packet-bssgp.c
@@ -79,7 +79,6 @@ void proto_reg_handoff_bssgp(void);
static int bssgp_decode_nri = 0;
static guint bssgp_nri_length = 4;
-static packet_info *gpinfo;
static guint8 g_pdu_type, g_rim_application_identity;
static proto_tree *gparent_tree;
static dissector_handle_t llc_handle;
@@ -898,7 +897,7 @@ de_bssgp_flush_action(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
*/
static guint16
-de_bssgp_llc_pdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_bssgp_llc_pdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *next_tvb=NULL;
guint32 curr_offset;
@@ -912,10 +911,10 @@ de_bssgp_llc_pdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
if(next_tvb){
if (llc_handle) {
- call_dissector(llc_handle, next_tvb, gpinfo, gparent_tree);
+ call_dissector(llc_handle, next_tvb, pinfo, gparent_tree);
}
else if (data_handle) {
- call_dissector(data_handle, next_tvb, gpinfo, gparent_tree);
+ call_dissector(data_handle, next_tvb, pinfo, gparent_tree);
}
}
@@ -1100,7 +1099,7 @@ static const value_string bssgp_precedence_dl[] = {
};
static guint16
-de_bssgp_qos_profile(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_qos_profile(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_item *pi, *pre_item;
guint32 curr_offset;
@@ -1113,7 +1112,7 @@ de_bssgp_qos_profile(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
/* octet 3-4 Peak bit rate provided by the network (note)
* NOTE: The bit rate 0 (zero) shall mean "best effort" in this IE.
*/
- link_dir = gpinfo->link_dir;
+ link_dir = pinfo->link_dir;
peak_bit_rate = tvb_get_ntohs(tvb, curr_offset);
pi = proto_tree_add_text(tree, tvb, curr_offset, 1, "Peak bit rate: ");
@@ -1515,7 +1514,7 @@ de_bssgp_serv_utran_cco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* 11.3.48 NSEI (Network Service Entity Identifier)
*/
static guint16
-de_bssgp_nsei(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_nsei(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint16 nsei;
@@ -1526,7 +1525,7 @@ de_bssgp_nsei(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o
proto_tree_add_item(tree, hf_bssgp_nsei, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
- col_append_sep_fstr(gpinfo->cinfo, COL_INFO, BSSGP_SEP, "NSEI %u", nsei);
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, BSSGP_SEP, "NSEI %u", nsei);
return(curr_offset-offset);
@@ -1535,7 +1534,7 @@ de_bssgp_nsei(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o
* 11.3.49 RRLP APDU
*/
static guint16
-de_bssgp_rrlp_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_rrlp_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *next_tvb=NULL;
guint32 curr_offset;
@@ -1555,9 +1554,9 @@ de_bssgp_rrlp_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
if(next_tvb){
if (rrlp_handle) {
- call_dissector(rrlp_handle, next_tvb, gpinfo, gparent_tree);
+ call_dissector(rrlp_handle, next_tvb, pinfo, gparent_tree);
}else if (data_handle) {
- call_dissector(data_handle, next_tvb, gpinfo, gparent_tree);
+ call_dissector(data_handle, next_tvb, pinfo, gparent_tree);
}
}
return(len);
@@ -1748,7 +1747,7 @@ de_bssgp_ran_information_request_app_cont(tvbuff_t *tvb, proto_tree *tree, packe
{
asn1_ctx_t asn1_ctx;
- asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, gpinfo);
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
/* 11.3.63.1.4 RAN-INFORMATION-REQUEST Application Container for the SON Transfer Application */
/* Reporting Cell Identifier */
/* convert to bit offset */
@@ -1765,7 +1764,7 @@ de_bssgp_ran_information_request_app_cont(tvbuff_t *tvb, proto_tree *tree, packe
* 3GPP TS 25.413
*/
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- curr_offset = curr_offset + dissect_ranap_SourceCellID_PDU(new_tvb, gpinfo, tree, NULL);
+ curr_offset = curr_offset + dissect_ranap_SourceCellID_PDU(new_tvb, pinfo, tree, NULL);
break;
default :
proto_tree_add_text(tree, tvb, curr_offset, len, "Unknown RIM Application Identity");
@@ -1847,7 +1846,7 @@ de_bssgp_ran_information_app_cont_unit(tvbuff_t *tvb, proto_tree *tree, packet_i
if (msg_fcn_p == NULL){
proto_tree_add_text(si_tree, tvb, curr_offset, 21, "Unknown SI message");
}else{
- (*msg_fcn_p)(tvb, si_tree, gpinfo, curr_offset+1, 20);
+ (*msg_fcn_p)(tvb, si_tree, pinfo, curr_offset+1, 20);
}
curr_offset+=21;
}
@@ -1895,14 +1894,14 @@ de_bssgp_ran_information_app_cont_unit(tvbuff_t *tvb, proto_tree *tree, packet_i
* Source Cell ID) as defined in 3GPP TS 25.413
*/
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- curr_offset = curr_offset + dissect_ranap_SourceCellID_PDU(new_tvb, gpinfo, tree, NULL);
+ curr_offset = curr_offset + dissect_ranap_SourceCellID_PDU(new_tvb, pinfo, tree, NULL);
break;
case 2:
/* If the RAT discriminator field indicates E-UTRAN, this field is encoded as the E-UTRAN CGI IE as
* defined in 3GPP TS 36.413
*/
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- curr_offset = curr_offset + dissect_s1ap_Global_ENB_ID_PDU(new_tvb, gpinfo, tree, NULL);
+ curr_offset = curr_offset + dissect_s1ap_Global_ENB_ID_PDU(new_tvb, pinfo, tree, NULL);
break;
default:
break;
@@ -1916,7 +1915,7 @@ de_bssgp_ran_information_app_cont_unit(tvbuff_t *tvb, proto_tree *tree, packet_i
* (UTRAN Source Cell ID) as defined in 3GPP TS 25.413
*/
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- curr_offset = curr_offset + dissect_ranap_SourceCellID_PDU(new_tvb, gpinfo, tree, NULL);
+ curr_offset = curr_offset + dissect_ranap_SourceCellID_PDU(new_tvb, pinfo, tree, NULL);
/* Octet (m+1)-n UTRA SI Container
* UTRA SI Container: This field contains System Information Container valid for the reporting cell
* encoded as defined in TS 25.331
@@ -1972,7 +1971,7 @@ static const value_string bssgp_utra_si_cause_vals[] = {
};
static guint16
-de_bssgp_ran_app_error_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_ran_app_error_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *new_tvb = NULL;
guint32 curr_offset;
@@ -2018,7 +2017,7 @@ de_bssgp_ran_app_error_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
* The "SON Transfer Cause" field is encoded as the SON Transfer Cause IE as defined in 3GPP TS 36.413
*/
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- curr_offset = curr_offset + dissect_s1ap_SONtransferCause_PDU(new_tvb, gpinfo, tree, NULL);
+ curr_offset = curr_offset + dissect_s1ap_SONtransferCause_PDU(new_tvb, pinfo, tree, NULL);
/* Erroneous Application Container including IEI and LI */
proto_tree_add_text(tree, tvb, curr_offset, len-(curr_offset-offset), "Erroneous Application Container including IEI and LI");
break;
@@ -2212,7 +2211,7 @@ static const value_string bssgp_ra_discriminator_vals[] = {
};
static guint16
-de_bssgp_rim_routing_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_rim_routing_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint8 oct;
guint16 rnc_id;
@@ -2261,7 +2260,7 @@ de_bssgp_rim_routing_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_
curr_offset = curr_offset+ de_emm_trac_area_id(tvb, tree, pinfo, curr_offset, 5, add_string, string_len);
/* Octets 9-n contain the Global eNB ID (see 3GPP TS 36.413 [36]) of the eNodeB. */
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- dissect_s1ap_Global_ENB_ID_PDU(new_tvb, gpinfo, tree, NULL);
+ dissect_s1ap_Global_ENB_ID_PDU(new_tvb, pinfo, tree, NULL);
break;
default:
proto_tree_add_text(tree, tvb, curr_offset, 3, "Unknown RIM Routing Address discriminator");
@@ -2301,7 +2300,7 @@ de_bssgp_mbms_session_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_
* 11.3.72 MBMS Session Duration
*/
static guint16
-de_bssgp_mbms_session_dur(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_mbms_session_dur(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *new_tvb;
guint32 curr_offset;
@@ -2310,7 +2309,7 @@ de_bssgp_mbms_session_dur(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U
/* AVP Code: 904 MBMS-Session-Duration Registered by packet-gtp.c */
new_tvb =tvb_new_subset(tvb, offset, len, len);
- dissector_try_uint(diameter_3gpp_avp_dissector_table, 904, new_tvb, gpinfo, tree);
+ dissector_try_uint(diameter_3gpp_avp_dissector_table, 904, new_tvb, pinfo, tree);
return(curr_offset-offset);
}
@@ -2322,7 +2321,7 @@ de_bssgp_mbms_session_dur(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U
*
*/
static guint16
-de_bssgp_mbms_sai_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_bssgp_mbms_sai_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *new_tvb;
guint32 curr_offset;
@@ -2331,7 +2330,7 @@ de_bssgp_mbms_sai_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
/* AVP Code: 903 MBMS-Service-Area Registered by packet-gtp.c */
new_tvb =tvb_new_subset(tvb, offset, len, len);
- dissector_try_uint(diameter_3gpp_avp_dissector_table, 903, new_tvb, gpinfo, tree);
+ dissector_try_uint(diameter_3gpp_avp_dissector_table, 903, new_tvb, pinfo, tree);
return(curr_offset-offset);
}
@@ -2840,7 +2839,7 @@ de_bssgp_mbms_session_rep_no(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
* 11.3.94 Inter RAT Handover Info
*/
static guint16
-de_bssgp_inter_rat_ho_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_inter_rat_ho_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *new_tvb;
guint32 curr_offset;
@@ -2852,7 +2851,7 @@ de_bssgp_inter_rat_ho_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _
* Inter RAT Handover Information coded as specified in 3GPP
* Technical Specification 25.331
*/
- dissect_rrc_InterRATHandoverInfo_PDU(new_tvb, gpinfo, tree, NULL);
+ dissect_rrc_InterRATHandoverInfo_PDU(new_tvb, pinfo, tree, NULL);
return(len);
}
@@ -3096,7 +3095,7 @@ de_bssgp_enb_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
/* Octets 8-n contain the Global eNB ID (see 3GPP TS 36.413) of the eNodeB. */
new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
- dissect_s1ap_Global_ENB_ID_PDU(new_tvb, gpinfo, tree, NULL);
+ dissect_s1ap_Global_ENB_ID_PDU(new_tvb, pinfo, tree, NULL);
return(len);
}
@@ -3104,7 +3103,7 @@ de_bssgp_enb_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
* 11.3.104 E-UTRAN Inter RAT Handover Info
*/
static guint16
-de_bssgp_e_utran_inter_rat_ho_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_e_utran_inter_rat_ho_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *new_tvb;
guint32 curr_offset;
@@ -3118,7 +3117,7 @@ de_bssgp_e_utran_inter_rat_ho_info(tvbuff_t *tvb, proto_tree *tree, packet_info
* significant bit of the first octet of the octet string contains bit 8 of
* the first octet of the IE.
*/
- dissect_lte_rrc_UE_EUTRA_Capability_PDU(new_tvb, gpinfo, tree, NULL);
+ dissect_lte_rrc_UE_EUTRA_Capability_PDU(new_tvb, pinfo, tree, NULL);
return(len);
}
@@ -3181,7 +3180,7 @@ de_bssgp_reliable_inter_rat_ho_inf(tvbuff_t *tvb, proto_tree *tree, packet_info
* 11.3.108 SON Transfer Application Identity
*/
static guint16
-de_bssgp_son_transfer_app_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset _U_, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_bssgp_son_transfer_app_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset _U_, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *next_tvb;
@@ -3190,7 +3189,7 @@ de_bssgp_son_transfer_app_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
*/
if(len > 0){
next_tvb = tvb_new_subset(tvb, offset, len, len);
- dissect_s1ap_SONtransferApplicationIdentity_PDU(next_tvb, gpinfo, tree, NULL);
+ dissect_s1ap_SONtransferApplicationIdentity_PDU(next_tvb, pinfo, tree, NULL);
}
return(len);
@@ -6371,7 +6370,6 @@ dissect_bssgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
/* Save pinfo */
- gpinfo = pinfo;
g_rim_application_identity = 0;
gparent_tree = tree;
len = tvb_length(tvb);
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index 0ac40af1d3..019c7905c0 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -648,7 +648,6 @@ static dissector_handle_t bssgp_handle;
static dissector_handle_t rrc_handle;
static dissector_handle_t rtp_handle;
-static packet_info *g_pinfo;
static proto_tree *g_tree;
static guint8 cell_discriminator = 0x0f; /* tracks whether handover is to UMTS */
@@ -1683,7 +1682,7 @@ be_lsa_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
* Formats everything after the discriminator, shared function
*/
guint16
-be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
+be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
{
guint32 value;
guint32 curr_offset;
@@ -1719,9 +1718,9 @@ be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
/* FALLTHRU */
case 0x0c: /* For identification of a UTRAN cell for cell load information: */
if (disc != 0x0b)
- curr_offset = dissect_e212_mcc_mnc(tvb, g_pinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
else
- curr_offset = dissect_e212_mcc_mnc(tvb, g_pinfo, tree, curr_offset, FALSE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, FALSE);
/* FALLTHRU */
case 0x01:
@@ -1964,7 +1963,7 @@ be_lsa_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
* [2] 3.2.2.24 Layer 3 Information
*/
static guint16
-be_l3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+be_l3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
tvbuff_t *l3_tvb;
@@ -1999,12 +1998,12 @@ be_l3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
}
else if ((cell_discriminator & 0x0f) < 8) {
/* GSM */
- call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
+ call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
}
else if ((cell_discriminator & 0x0f) < 13) {
/* UMTS or CDMA 2000 */
- dissect_rrc_HandoverToUTRANCommand_PDU(l3_tvb, g_pinfo, g_tree, NULL);
+ dissect_rrc_HandoverToUTRANCommand_PDU(l3_tvb, pinfo, g_tree, NULL);
}
else{
proto_tree_add_text(tree, l3_tvb, curr_offset, len, "Unrecognised Cell Discriminator %x",cell_discriminator);
@@ -2443,7 +2442,7 @@ be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
* [2] 3.2.2.35 Layer 3 Message Contents
*/
static guint16
-be_l3_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+be_l3_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *l3_tvb;
@@ -2457,7 +2456,7 @@ be_l3_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offse
/* Octet j (j = 3, 4, ..., n) is the unchanged octet j of a radio interface layer 3 message
* as defined in 3GPP TS 24.008, n is equal to the length of that radio interface layer 3 message. */
- call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
+ call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
return(len);
}
@@ -2927,13 +2926,11 @@ bssmap_old_bss_to_new_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
return;
}
- g_pinfo = pinfo;
g_tree = tree;
len = tvb_length(tvb);
be_field_element_dissect(tvb, tree, pinfo, 0, len, NULL, 0);
- g_pinfo = NULL;
g_tree = NULL;
}
/*
@@ -3004,7 +3001,7 @@ be_loc_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
* according to 3GPP TS 23.032.
*/
static guint16
-be_loc_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+be_loc_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *data_tvb;
guint32 curr_offset;
@@ -3012,7 +3009,7 @@ be_loc_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
curr_offset = offset;
data_tvb = tvb_new_subset(tvb, curr_offset, len, len);
- dissect_geographical_description(data_tvb, g_pinfo, tree);
+ dissect_geographical_description(data_tvb, pinfo, tree);
return(len);
}
@@ -3087,7 +3084,7 @@ static const value_string gsm_a_apdu_protocol_id_strings[] = {
};
static guint16
-be_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+be_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 apdu_protocol_id;
@@ -3117,7 +3114,7 @@ be_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset,
*/
APDU_tvb = tvb_new_subset(tvb, curr_offset, len, len);
if (gsm_bsslap_handle)
- call_dissector(gsm_bsslap_handle, APDU_tvb, g_pinfo, g_tree);
+ call_dissector(gsm_bsslap_handle, APDU_tvb, pinfo, g_tree);
break;
case 2:
/* LLP
@@ -3243,7 +3240,7 @@ be_serv_ho(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
*/
static guint16
-be_src_rnc_to_tar_rnc_umts(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+be_src_rnc_to_tar_rnc_umts(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *container_tvb;
guint32 curr_offset;
@@ -3255,7 +3252,7 @@ be_src_rnc_to_tar_rnc_umts(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _
* RANAP specification 3GPP TS 25.413, excluding RANAP tag
*/
container_tvb = tvb_new_subset(tvb, curr_offset, len, len);
- dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU(container_tvb, g_pinfo, tree, NULL);
+ dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU(container_tvb, pinfo, tree, NULL);
return(len);
}
@@ -3350,13 +3347,11 @@ bssmap_new_bss_to_old_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
return;
}
- g_pinfo = pinfo;
g_tree = tree;
len = tvb_length(tvb);
be_field_element_dissect(tvb, tree, pinfo, 0, len, NULL, 0);
- g_pinfo = NULL;
g_tree = NULL;
}
@@ -4509,7 +4504,7 @@ be_fe_target_radio_cell_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
/* 3.2.3.4 GPRS Suspend Information */
static guint16
-be_fe_gprs_suspend_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+be_fe_gprs_suspend_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset = offset;
@@ -4517,7 +4512,7 @@ be_fe_gprs_suspend_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
Call the BSSGP dissector here, assuming that the encoding is per 48.018 */
- bssgp_suspend_ack(tvb, tree, g_pinfo, offset, len);
+ bssgp_suspend_ack(tvb, tree, pinfo, offset, len);
curr_offset += len;
return(curr_offset - offset);
@@ -4561,13 +4556,13 @@ be_fe_dual_transfer_mode_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinf
/* 3.2.3.7 Inter RAT Handover Info */
static guint16
-be_fe_inter_rat_handover_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+be_fe_inter_rat_handover_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *container_tvb;
/* Octets 3-n are encoded as Inter RAT Handover Info as defined in 3GPP TS 25.331 */
container_tvb = tvb_new_subset(tvb, offset, len, len);
- dissect_rrc_InterRATHandoverInfo_PDU(container_tvb, g_pinfo, tree, NULL);
+ dissect_rrc_InterRATHandoverInfo_PDU(container_tvb, pinfo, tree, NULL);
return len;
}
@@ -6966,7 +6961,6 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = 0;
saved_offset = offset;
- g_pinfo = pinfo;
g_tree = tree;
len = tvb_length(tvb);
@@ -7045,7 +7039,6 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sccp_msg_p->data.co.assoc->app_info = cell_discriminator | 0xCDF0;
}
}
- g_pinfo = NULL;
g_tree = NULL;
}
diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c
index 0879c0c198..90b557e7f6 100644
--- a/epan/dissectors/packet-gsm_bssmap_le.c
+++ b/epan/dissectors/packet-gsm_bssmap_le.c
@@ -222,7 +222,6 @@ static gint ett_bssmap_le_msg = -1;
static dissector_handle_t gsm_bsslap_handle = NULL;
-static packet_info *g_pinfo;
static proto_tree *g_tree;
#define NUM_GSM_BSSMAP_LE_ELEM (sizeof(gsm_bssmap_le_elem_strings)/sizeof(value_string))
@@ -233,7 +232,7 @@ gint ett_gsm_bssmap_le_elem[NUM_GSM_BSSMAP_LE_ELEM];
*/
static guint16
-de_bmaple_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_bmaple_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 apdu_protocol_id;
@@ -262,7 +261,7 @@ de_bmaple_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
*/
APDU_tvb = tvb_new_subset(tvb, curr_offset+2, len-1, len-1);
if(gsm_bsslap_handle)
- call_dissector(gsm_bsslap_handle, APDU_tvb, g_pinfo, g_tree);
+ call_dissector(gsm_bsslap_handle, APDU_tvb, pinfo, g_tree);
break;
case 2:
/* LLP
@@ -559,7 +558,7 @@ de_bmaple_lcs_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
* 10.20 Positioning Data
*/
static guint16
-de_bmaple_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_bmaple_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *data_tvb;
guint32 curr_offset;
@@ -567,7 +566,7 @@ de_bmaple_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
curr_offset = offset;
data_tvb = tvb_new_subset(tvb, curr_offset, len, len);
- dissect_geographical_description(data_tvb, g_pinfo, tree);
+ dissect_geographical_description(data_tvb, pinfo, tree);
return(len);
}
@@ -937,7 +936,6 @@ dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = 0;
saved_offset = offset;
- g_pinfo = pinfo;
g_tree = tree;
len = tvb_length(tvb);
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index 56418047f3..31d2cf11dd 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -150,7 +150,6 @@ static gint hf_gsm_sms_tp_ud = -1;
static gboolean reassemble_sms = TRUE;
static char bigbuf[1024];
-static packet_info *g_pinfo;
static proto_tree *g_tree;
/* 3GPP TS 23.038 version 7.0.0 Release 7
@@ -2578,7 +2577,7 @@ dis_field_ud_iei(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
#define SMS_MAX_MESSAGE_SIZE 160
static char messagebuf[SMS_MAX_MESSAGE_SIZE+1];
static void
-dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gboolean udhi, guint8 udl,
+dis_field_ud(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint32 length, gboolean udhi, guint8 udl,
gboolean seven_bit, gboolean eight_bit, gboolean ucs2, gboolean compressed)
{
static guint8 fill_bits_mask[7] =
@@ -2669,10 +2668,10 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
if ( is_fragmented && reassemble_sms)
{
try_gsm_sms_ud_reassemble = TRUE;
- save_fragmented = g_pinfo->fragmented;
- g_pinfo->fragmented = TRUE;
+ save_fragmented = pinfo->fragmented;
+ pinfo->fragmented = TRUE;
fd_sm = fragment_add_seq_check (&g_sm_reassembly_table, tvb, offset,
- g_pinfo,
+ pinfo,
g_sm_id, /* guint32 ID for fragments belonging together */
NULL,
g_frag-1, /* guint32 fragment sequence number */
@@ -2684,20 +2683,20 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
reassembled_in = fd_sm->reassembled_in;
}
- sm_tvb = process_reassembled_data(tvb, offset, g_pinfo,
+ sm_tvb = process_reassembled_data(tvb, offset, pinfo,
"Reassembled Short Message", fd_sm, &sm_frag_items,
NULL, tree);
- if(reassembled && g_pinfo->fd->num == reassembled_in)
+ if(reassembled && pinfo->fd->num == reassembled_in)
{
/* Reassembled */
- col_append_str (g_pinfo->cinfo, COL_INFO,
+ col_append_str (pinfo->cinfo, COL_INFO,
" (Short Message Reassembled)");
}
else
{
/* Not last packet of reassembled Short Message */
- col_append_fstr (g_pinfo->cinfo, COL_INFO,
+ col_append_fstr (pinfo->cinfo, COL_INFO,
" (Short Message fragment %u of %u)", g_frag, g_frags);
}
@@ -2720,7 +2719,7 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
{
if (seven_bit)
{
- if(!(reassembled && g_pinfo->fd->num == reassembled_in))
+ if(!(reassembled && pinfo->fd->num == reassembled_in))
{
/* Show unassembled SMS */
out_len =
@@ -2764,9 +2763,9 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
{
/*proto_tree_add_text(subtree, tvb , offset , length, "%s",
tvb_format_text(tvb, offset, length)); */
- if (! dissector_try_uint(gsm_sms_dissector_tbl, g_port_src, sm_tvb, g_pinfo, subtree))
+ if (! dissector_try_uint(gsm_sms_dissector_tbl, g_port_src, sm_tvb, pinfo, subtree))
{
- if (! dissector_try_uint(gsm_sms_dissector_tbl, g_port_dst,sm_tvb, g_pinfo, subtree))
+ if (! dissector_try_uint(gsm_sms_dissector_tbl, g_port_dst,sm_tvb, pinfo, subtree))
{
if (subtree)
{ /* Only display if needed */
@@ -2783,7 +2782,7 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
{
guint8 rep_len = tvb_reported_length(sm_tvb);
- if(!(reassembled && g_pinfo->fd->num == reassembled_in))
+ if(!(reassembled && pinfo->fd->num == reassembled_in))
{
/* Show unreassembled SMS */
utf8_text = g_convert_with_iconv(tvb_get_ptr(sm_tvb, 0, rep_len), rep_len , cd , NULL , NULL , &l_conv_error);
@@ -2847,7 +2846,7 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
}
if (try_gsm_sms_ud_reassemble) /* Clean up defragmentation */
- g_pinfo->fragmented = save_fragmented;
+ pinfo->fragmented = save_fragmented;
}
/* 9.2.3.27 */
@@ -2905,7 +2904,7 @@ dis_field_pi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 oct)
* Section 9.2.2
*/
static void
-dis_msg_deliver(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
+dis_msg_deliver(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset)
{
guint32 saved_offset;
guint32 length;
@@ -2954,7 +2953,7 @@ dis_msg_deliver(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
{
offset++;
- dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
+ dis_field_ud(tvb, pinfo, tree, offset, length - (offset - saved_offset), udhi, udl,
seven_bit, eight_bit, ucs2, compressed);
}
}
@@ -2964,7 +2963,7 @@ dis_msg_deliver(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
* Section 9.2.2
*/
static void
-dis_msg_deliver_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
+dis_msg_deliver_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset)
{
guint32 saved_offset;
guint32 length;
@@ -3074,7 +3073,7 @@ dis_msg_deliver_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
{
offset++;
- dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
+ dis_field_ud(tvb, pinfo, tree, offset, length - (offset - saved_offset), udhi, udl,
seven_bit, eight_bit, ucs2, compressed);
}
}
@@ -3084,7 +3083,7 @@ dis_msg_deliver_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
* Section 9.2.2
*/
static void
-dis_msg_submit(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
+dis_msg_submit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset)
{
guint32 saved_offset;
guint32 length;
@@ -3141,7 +3140,7 @@ dis_msg_submit(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
{
offset++;
- dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
+ dis_field_ud(tvb, pinfo, tree, offset, length - (offset - saved_offset), udhi, udl,
seven_bit, eight_bit, ucs2, compressed);
}
}
@@ -3151,7 +3150,7 @@ dis_msg_submit(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
* Section 9.2.2
*/
static void
-dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
+dis_msg_submit_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset)
{
guint32 saved_offset;
guint32 length;
@@ -3251,7 +3250,7 @@ dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
if (udl > 0)
{
- dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
+ dis_field_ud(tvb, pinfo, tree, offset, length - (offset - saved_offset), udhi, udl,
seven_bit, eight_bit, ucs2, compressed);
}
}
@@ -3261,7 +3260,7 @@ dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
* Section 9.2.2
*/
static void
-dis_msg_status_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
+dis_msg_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset)
{
guint32 saved_offset;
guint32 length;
@@ -3370,7 +3369,7 @@ dis_msg_status_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
{
offset++;
- dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
+ dis_field_ud(tvb, pinfo, tree, offset, length - (offset - saved_offset), udhi, udl,
seven_bit, eight_bit, ucs2, compressed);
}
}
@@ -3380,7 +3379,7 @@ dis_msg_status_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
* Section 9.2.2
*/
static void
-dis_msg_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
+dis_msg_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset)
{
guint8 oct;
guint8 cdl;
@@ -3433,7 +3432,7 @@ dis_msg_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
static gint ett_msgs[NUM_MSGS];
#endif
-static void (*gsm_sms_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset) = {
+static void (*gsm_sms_msg_fcn[])(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) = {
dis_msg_deliver, /* SMS-DELIVER */
dis_msg_deliver_report, /* SMS-DELIVER REPORT */
dis_msg_submit, /* SMS-SUBMIT */
@@ -3450,7 +3449,7 @@ static void (*gsm_sms_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset
static void
dissect_gsm_sms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset) = NULL;
+ void (*msg_fcn)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) = NULL;
proto_item *gsm_sms_item;
proto_tree *gsm_sms_tree = NULL;
guint32 offset;
@@ -3460,8 +3459,6 @@ dissect_gsm_sms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const gchar *str = NULL;
/*gint ett_msg_idx;*/
-
- g_pinfo = pinfo;
g_is_wsp = 0;
g_sm_id = 0;
g_frags = 0;
@@ -3524,7 +3521,7 @@ dissect_gsm_sms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- (*msg_fcn)(tvb, gsm_sms_tree, offset);
+ (*msg_fcn)(tvb, pinfo, gsm_sms_tree, offset);
}
}
}
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c
index f79407a55b..82698d6fa6 100644
--- a/epan/dissectors/packet-nas_eps.c
+++ b/epan/dissectors/packet-nas_eps.c
@@ -215,7 +215,6 @@ static int ett_nas_eps_gen_msg_cont = -1;
static int ett_nas_eps_cmn_add_info = -1;
/* Global variables */
-static packet_info *gpinfo;
static gboolean g_nas_eps_dissect_plain = FALSE;
guint8 eps_nas_gen_msg_cont_type = 0;
@@ -1055,7 +1054,7 @@ static const value_string nas_eps_emm_type_of_id_vals[] = {
{ 0, NULL }
};
static guint16
-de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
@@ -1086,7 +1085,7 @@ de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
case 6:
/* GUTI */
curr_offset++;
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
/* MME Group ID octet 7 - 8 */
proto_tree_add_item(tree, hf_nas_eps_emm_mme_grp_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
@@ -1195,7 +1194,7 @@ static const value_string nas_eps_emm_eps_update_type_vals[] = {
* 9.9.3.15 ESM message container
*/
static guint16
-de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
@@ -1213,7 +1212,7 @@ de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
/* This IE can contain any ESM PDU as defined in subclause 8.3. */
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
/* Plain NAS message */
- disect_nas_eps_esm_msg(new_tvb, gpinfo, sub_tree, 0/* offset */);
+ disect_nas_eps_esm_msg(new_tvb, pinfo, sub_tree, 0/* offset */);
return(len);
}
@@ -1382,7 +1381,7 @@ de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* 9.9.3.22 NAS message container
*/
static guint16
-de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
@@ -1403,7 +1402,7 @@ de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
if (gsm_a_dtap_handle)
- call_dissector(gsm_a_dtap_handle, new_tvb, gpinfo, sub_tree);
+ call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
return(len);
}
@@ -1556,7 +1555,7 @@ de_emm_nas_short_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
*/
guint16
-de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
@@ -1564,7 +1563,7 @@ de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
curr_offset = offset;
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
@@ -1584,7 +1583,7 @@ static const value_string nas_eps_emm_tai_tol_vals[] = {
};
static guint16
-de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
@@ -1618,7 +1617,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
/* type of list = "000" */
/* TAC 1 octet 5
* TAC 1 (continued) octet 6
@@ -1641,7 +1640,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
break;
@@ -1657,7 +1656,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
- curr_offset = dissect_e212_mcc_mnc(tvb, gpinfo, tree, curr_offset, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
}
@@ -2050,7 +2049,7 @@ de_emm_lcs_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* 9.9.3.41 LCS client identity
*/
static guint16
-de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
@@ -2064,7 +2063,7 @@ de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
* in subclause 17.7.13 of 3GPP TS 29.002 [15B](GSM MAP).
*/
new_tvb = tvb_new_subset(tvb, curr_offset, len, len );
- dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, gpinfo, tree, NULL );
+ dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, pinfo, tree, NULL );
return(len);
}
@@ -4813,9 +4812,6 @@ dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 pd;
int offset = 0;
- /* Save pinfo */
- gpinfo = pinfo;
-
/* make entry in the Protocol column on summary display */
col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
@@ -4921,9 +4917,6 @@ dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
- /* Save pinfo */
- gpinfo = pinfo;
-
/* make entry in the Protocol column on summary display */
col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c
index bb2846d42f..b53b6c9e28 100644
--- a/epan/dissectors/packet-sgsap.c
+++ b/epan/dissectors/packet-sgsap.c
@@ -47,7 +47,6 @@
/* Global variables */
static dissector_handle_t gsm_a_dtap_handle;
-static packet_info *gpinfo;
static guint gbl_sgsapSctpPort=SCTP_PORT_SGSAP;
@@ -139,13 +138,13 @@ de_sgsap_err_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
* as specified in subclause 8.21.5 of 3GPP TS 29.274 [17A] (GTPv2-C)
*/
static guint16
-de_sgsap_ecgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_sgsap_ecgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
- dissect_e212_mcc_mnc(tvb, gpinfo, tree, offset, TRUE);
+ dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
curr_offset += 3;
proto_tree_add_item(tree, hf_sgsap_eci, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
@@ -164,13 +163,13 @@ de_sgsap_ecgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o
* not fill the field reserved for it, the rest of the bits are set to '0'.
*/
static guint16
-de_sgsap_g_cn_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_sgsap_g_cn_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
- dissect_e212_mcc_mnc(tvb, gpinfo, tree, offset, TRUE);
+ dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
curr_offset += 3;
proto_tree_add_item(tree, hf_sgsap_cn_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
@@ -368,7 +367,7 @@ de_sgsap_mme_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
* as defined in subclause 7.2 of 3GPP TS 24.011 [10]
*/
static guint16
-de_sgsap_nas_msg_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+de_sgsap_nas_msg_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
tvbuff_t *new_tvb;
guint32 curr_offset;
@@ -380,7 +379,7 @@ de_sgsap_nas_msg_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _
*/
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);
+ call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, tree);
}
return(len);
@@ -1395,7 +1394,6 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 oct;
/* Save pinfo */
- gpinfo = pinfo;
len = tvb_length(tvb);
/* Make entry in the Protocol column on summary display */