diff options
-rw-r--r-- | epan/dissectors/packet-gsm_a_common.h | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_a_gm.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_a_rr.c | 101 | ||||
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-nas_eps.c | 4 |
5 files changed, 102 insertions, 21 deletions
diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h index be88e51345..3e3e5bc691 100644 --- a/epan/dissectors/packet-gsm_a_common.h +++ b/epan/dissectors/packet-gsm_a_common.h @@ -1101,9 +1101,9 @@ typedef enum DE_RR_EXT_MEAS_RESULT, /* [3] 10.5.2.45 Extended Measurement Results */ DE_RR_EXT_MEAS_FREQ_LIST, /* [3] 10.5.2.46 Extended Measurement Frequency List */ DE_RR_SUS_CAU, /* [3] 10.5.2.47 Suspension Cause */ -/* [3] 10.5.2.48 APDU ID - * [3] 10.5.2.49 APDU Flags - * [3] 10.5.2.50 APDU Data */ + DE_RR_APDU_ID, /* [3] 10.5.2.48 APDU ID */ + DE_RR_APDU_FLAGS, /* [3] 10.5.2.49 APDU Flags */ + DE_RR_APDU_DATA, /* [3] 10.5.2.50 APDU Data */ DE_RR_HO_TO_UTRAN_CMD, /* [3] 10.5.2.51 Handover To UTRAN Command */ /* [3] 10.5.2.52 Handover To cdma2000 Command * [3] 10.5.2.53 (void) diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c index 23b68c6070..d1a6d413c1 100644 --- a/epan/dissectors/packet-gsm_a_gm.c +++ b/epan/dissectors/packet-gsm_a_gm.c @@ -2930,7 +2930,6 @@ de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint { guint32 curr_offset; tvbuff_t *rrc_irat_ho_info_tvb; - static packet_info p_info; curr_offset = offset; @@ -2938,7 +2937,7 @@ de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/ rrc_irat_ho_info_tvb = tvb_new_subset(tvb, curr_offset, len, len); if (rrc_irat_ho_info_handle) - call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, &p_info , tree); + call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, gsm_a_dtap_pinfo , tree); else proto_tree_add_text(tree, tvb, curr_offset, len,"INTER RAT HANDOVER INFO - Not decoded"); @@ -3304,7 +3303,6 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add guint16 prot; tvbuff_t *l3_tvb; dissector_handle_t handle = NULL; - static packet_info p_info; prot = tvb_get_ntohs(tvb,curr_offset); e_len = tvb_get_guint8(tvb, curr_offset+2); @@ -3369,7 +3367,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add * dissect the embedded message */ l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len); - call_dissector(handle, l3_tvb , &p_info , tree ); + call_dissector(handle, l3_tvb , gsm_a_dtap_pinfo , tree ); } else { @@ -3379,7 +3377,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add * dissect the embedded DATA message */ l3_tvb = tvb_new_subset(tvb, curr_offset, e_len, e_len); - call_dissector(data_handle, l3_tvb, &p_info , tree); + call_dissector(data_handle, l3_tvb, gsm_a_dtap_pinfo , tree); } } } diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c index 2f802ff4d3..2d83a56a19 100644 --- a/epan/dissectors/packet-gsm_a_rr.c +++ b/epan/dissectors/packet-gsm_a_rr.c @@ -301,9 +301,9 @@ const value_string gsm_rr_elem_strings[] = { { 0x00, "Extended Measurement Results" }, /* [3] 10.5.2.45 Extended Measurement Results */ { 0x00, "Extended Measurement Frequency List" }, /* [3] 10.5.2.46 Extended Measurement Frequency List */ { 0x00, "Suspension Cause" }, /* [3] 10.5.2.47 */ -/* [3] 10.5.2.48 APDU ID - * [3] 10.5.2.49 APDU Flags - * [3] 10.5.2.50 APDU Data */ + { 0x00, "APDU ID" }, /* [3] 10.5.2.48 APDU ID */ + { 0x00, "APDU Flags" }, /* [3] 10.5.2.49 APDU Flags */ + { 0x00, "APDU Data" }, /* [3] 10.5.2.50 APDU Data */ { 0x00, "Handover to UTRAN Command" }, /* [3] 10.5.2.51 Handover To UTRAN Command */ /* [3] 10.5.2.52 Handover To cdma2000 Command * [3] 10.5.2.53 (void) @@ -497,6 +497,9 @@ static int hf_gsm_a_rr_chnl_needed_ch2 = -1; static int hf_gsm_a_rr_chnl_needed_ch3 = -1; static int hf_gsm_a_rr_chnl_needed_ch4 = -1; static int hf_gsm_a_rr_suspension_cause = -1; +static int hf_gsm_a_rr_apdu_id = -1; +static int hf_gsm_a_rr_apdu_flags = -1; +static int hf_gsm_a_rr_apdu_data = -1; static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8 = -1; static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7 = -1; static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6 = -1; @@ -691,7 +694,7 @@ static gint ett_sacch_msg = -1; static char a_bigbuf[1024]; static dissector_handle_t data_handle; - +static dissector_handle_t rrlp_dissector; #define NUM_GSM_RR_ELEM (sizeof(gsm_rr_elem_strings)/sizeof(value_string)) @@ -1812,14 +1815,14 @@ de_rr_utran_cm(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint32 curr_offset; tvbuff_t *rrc_irat_ho_info_tvb; - static packet_info p_info; curr_offset = offset; if (len) { rrc_irat_ho_info_tvb = tvb_new_subset(tvb, curr_offset, len, len); if (rrc_irat_ho_info_handle) - call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, &p_info, tree); + /* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_utran_cm */ + call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, gsm_a_dtap_pinfo, tree); } curr_offset += len; @@ -6224,9 +6227,49 @@ de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc } /* * [3] 10.5.2.48 APDU ID + */ +static const value_string gsm_a_rr_apdu_id_vals[] = { + { 0, "RRLP (GSM 04.31) LCS" }, + { 0, NULL }, +}; +static guint16 +de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) +{ + proto_tree_add_item(tree, hf_gsm_a_rr_apdu_id, tvb, offset, 1, FALSE); + + return 0; +} + +/* * [3] 10.5.2.49 APDU Flags + */ +static const value_string gsm_a_rr_apdu_flags_vals[] = { + { 1, "Last or only segment" }, + { 2, "First or only segment" }, + { 0, NULL }, +}; +static guint16 +de_rr_apdu_flags(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) +{ + proto_tree_add_item(tree, hf_gsm_a_rr_apdu_flags, tvb, offset, 1, FALSE); + + return 1; +} + +/* * [3] 10.5.2.50 APDU Data */ +static guint16 +de_rr_apdu_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) +{ + tvbuff_t *sub_tvb; + + sub_tvb = tvb_new_subset(tvb, offset, len, len); + + call_dissector(rrlp_dissector, sub_tvb, gsm_a_dtap_pinfo, tree); + + return len; +} /* * [3] 10.5.2.51 Handover To UTRAN Command @@ -6236,14 +6279,14 @@ de_rr_ho_to_utran_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len { guint32 curr_offset; tvbuff_t *rrc_irat_ho_to_utran_cmd_tvb; - static packet_info p_info; curr_offset = offset; if (len) { rrc_irat_ho_to_utran_cmd_tvb = tvb_new_subset(tvb, curr_offset, len, len); if (rrc_irat_ho_to_utran_cmd_handle) - call_dissector(rrc_irat_ho_to_utran_cmd_handle, rrc_irat_ho_to_utran_cmd_tvb, &p_info, tree); + /* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_ho_to_utran_cmd */ + call_dissector(rrc_irat_ho_to_utran_cmd_handle, rrc_irat_ho_to_utran_cmd_tvb, gsm_a_dtap_pinfo, tree); } curr_offset += len; @@ -6466,9 +6509,9 @@ guint16 (*rr_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint de_rr_ext_meas_result, /* [3] 10.5.2.45 Extended Measurement Results */ de_rr_ext_meas_freq_list, /* [3] 10.5.2.46 Extended Measurement Frequency List */ de_rr_sus_cau, /* [3] 10.5.2.47 Suspension Cause */ -/* [3] 10.5.2.48 APDU ID - * [3] 10.5.2.49 APDU Flags - * [3] 10.5.2.50 APDU Data */ + de_rr_apdu_id, /* [3] 10.5.2.48 APDU ID */ + de_rr_apdu_flags, /* [3] 10.5.2.49 APDU Flags */ + de_rr_apdu_data, /* [3] 10.5.2.50 APDU Data */ de_rr_ho_to_utran_cmd, /* [3] 10.5.2.51 Handover To UTRAN Command */ /* [3] 10.5.2.52 Handover To cdma2000 Command * [3] 10.5.2.53 (void) @@ -7864,6 +7907,24 @@ dtap_rr_ext_meas_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l } /* + * 9.1.53 Application Information + */ +static void +dtap_rr_app_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) +{ + guint32 curr_offset; + guint32 consumed; + guint curr_len; + + curr_offset = offset; + curr_len = len; + + ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_APDU_ID); + ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_APDU_FLAGS); + ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_APDU_DATA, NULL); +} + +/* * [4] 9.1.54 Measurement Information */ static const value_string gsm_a_rr_3g_wait_vals[] = { @@ -8386,7 +8447,7 @@ static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset NULL, /* UTRAN Classmark Change/Handover To UTRAN Command */ /* spec conflict */ - NULL, /* Application Information */ + dtap_rr_app_inf, /* Application Information */ NULL, /* NONE */ }; @@ -9155,6 +9216,21 @@ proto_register_gsm_a_rr(void) FT_UINT8,BASE_DEC, VALS(gsm_a_rr_suspension_cause_vals), 0x0, NULL, HFILL } }, + { &hf_gsm_a_rr_apdu_id, + { "APDU ID","gsm_a.rr.apdu_id", + FT_UINT8,BASE_HEX, VALS(gsm_a_rr_apdu_id_vals), 0x0f, + NULL, HFILL } + }, + { &hf_gsm_a_rr_apdu_flags, + { "APDU Flags","gsm_a.rr.apdu_flags", + FT_UINT8,BASE_HEX, VALS(gsm_a_rr_apdu_flags_vals), 0xf0, + NULL, HFILL } + }, + { &hf_gsm_a_rr_apdu_data, + { "APDU Data","gsm_a.rr.apdu_data", + FT_BYTES,BASE_HEX, NULL, 0x00, + NULL, HFILL } + }, { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8, { "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8", FT_BOOLEAN,8, TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80, @@ -10157,4 +10233,5 @@ proto_reg_handoff_gsm_a_rr(void) data_handle = find_dissector("data"); rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info"); rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd"); + rrlp_dissector = find_dissector("rrlp"); } diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index c8bb132db5..8b5bc08649 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -660,11 +660,13 @@ dissect_gtpv2_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto /* * 8.13 Protocol Configuration Options (PCO) * Editor's note: PCO will be defined in 3GPP TS 23.003 and its coding in TS 24.301 - * Dissected in packey-gsm_a_gm.c + * Dissected in packet-gsm_a_gm.c */ static void dissect_gtpv2_pco(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_) { + /* pinfo needed */ + gsm_a_dtap_pinfo = pinfo; de_sm_pco(tvb, tree, 0, length, NULL, 0); } diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index 41edb25de0..0a573f76a7 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -3756,6 +3756,8 @@ disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int } else { + /* If calling any "gsm" ie dissectors needing pinfo */ + gsm_a_dtap_pinfo = pinfo; (*msg_fcn)(tvb, tree, offset, len - offset); } @@ -3831,6 +3833,8 @@ dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int } else { + /* If calling any "gsm" ie dissectors needing pinfo */ + gsm_a_dtap_pinfo = pinfo; (*msg_fcn)(tvb, tree, offset, len - offset); } |