diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-11-02 09:40:18 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-11-02 13:03:16 +0000 |
commit | 1316fdf209af0ff5a881dc8ae1ad8ede6ef78bda (patch) | |
tree | 71a9f8dcf4df8af203a93e27a2bc248e94613ca3 /epan/dissectors/packet-ranap.c | |
parent | 1c5b3c378321267e86aa4154c3d907a1088f6949 (diff) |
[GTPv2] Dissect UTRAN F-Container content.
Change-Id: Idaf07e31876b453f88c5fd7e886c72dffcb35a96
Reviewed-on: https://code.wireshark.org/review/11492
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ranap.c')
-rw-r--r-- | epan/dissectors/packet-ranap.c | 78 |
1 files changed, 43 insertions, 35 deletions
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index e0f78c1c6b..1245e20c6c 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -47,6 +47,7 @@ #include "packet-sccp.h" #include "packet-gsm_a_common.h" #include "packet-isup.h" +#include "packet-s1ap.h" #ifdef _MSC_VER /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */ @@ -407,7 +408,7 @@ typedef enum _ProtocolIE_ID_enum { } ProtocolIE_ID_enum; /*--- End of included file: packet-ranap-val.h ---*/ -#line 58 "../../asn1/ranap/packet-ranap-template.c" +#line 59 "../../asn1/ranap/packet-ranap-template.c" void proto_register_ranap(void); void proto_reg_handoff_ranap(void); @@ -549,7 +550,7 @@ static int hf_ranap_SAPI_PDU = -1; /* SAPI */ static int hf_ranap_SessionUpdateID_PDU = -1; /* SessionUpdateID */ static int hf_ranap_SignallingIndication_PDU = -1; /* SignallingIndication */ static int hf_ranap_SNA_Access_Information_PDU = -1; /* SNA_Access_Information */ -static int hf_ranap_Source_ToTarget_TransparentContainer_PDU = -1; /* Source_ToTarget_TransparentContainer */ +static int hf_ranap_ranap_Source_ToTarget_TransparentContainer_PDU = -1; /* Source_ToTarget_TransparentContainer */ static int hf_ranap_ranap_SourceCellID_PDU = -1; /* SourceCellID */ static int hf_ranap_SourceBSS_ToTargetBSS_TransparentContainer_PDU = -1; /* SourceBSS_ToTargetBSS_TransparentContainer */ static int hf_ranap_SourceID_PDU = -1; /* SourceID */ @@ -1145,7 +1146,7 @@ static int hf_ranap_unsuccessfulOutcome_value = -1; /* UnsuccessfulOutcome_valu static int hf_ranap_value = -1; /* T_value */ /*--- End of included file: packet-ranap-hf.c ---*/ -#line 75 "../../asn1/ranap/packet-ranap-template.c" +#line 76 "../../asn1/ranap/packet-ranap-template.c" /* Initialize the subtree pointers */ static int ett_ranap = -1; @@ -1481,7 +1482,7 @@ static gint ett_ranap_UnsuccessfulOutcome = -1; static gint ett_ranap_Outcome = -1; /*--- End of included file: packet-ranap-ett.c ---*/ -#line 82 "../../asn1/ranap/packet-ranap-template.c" +#line 83 "../../asn1/ranap/packet-ranap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -1661,7 +1662,7 @@ dissect_ranap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &ProcedureCode, FALSE); -#line 92 "../../asn1/ranap/ranap.cnf" +#line 93 "../../asn1/ranap/ranap.cnf" col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str_ext_const(ProcedureCode, &ranap_ProcedureCode_vals_ext, "unknown message")); @@ -1945,7 +1946,7 @@ dissect_ranap_ProtocolIE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, &ProtocolIE_ID, FALSE); -#line 76 "../../asn1/ranap/ranap.cnf" +#line 77 "../../asn1/ranap/ranap.cnf" if (tree) { proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str_ext(ProtocolIE_ID, &ranap_ProtocolIE_ID_vals_ext, "unknown (%d)")); } @@ -2067,7 +2068,7 @@ static const per_sequence_t ProtocolIE_ContainerList_sequence_of[1] = { static int dissect_ranap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 116 "../../asn1/ranap/ranap.cnf" +#line 117 "../../asn1/ranap/ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, @@ -2089,7 +2090,7 @@ static const per_sequence_t ProtocolIE_ContainerPairList_sequence_of[1] = { static int dissect_ranap_ProtocolIE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 132 "../../asn1/ranap/ranap.cnf" +#line 133 "../../asn1/ranap/ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, @@ -2658,7 +2659,7 @@ dissect_ranap_APN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto static int dissect_ranap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 281 "../../asn1/ranap/ranap.cnf" +#line 282 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -3155,7 +3156,7 @@ dissect_ranap_AuthorisedPLMNs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_ranap_BindingID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 374 "../../asn1/ranap/ranap.cnf" +#line 375 "../../asn1/ranap/ranap.cnf" tvbuff_t *value_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, &value_tvb); @@ -3169,7 +3170,6 @@ dissect_ranap_BindingID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, - return offset; } @@ -4588,7 +4588,7 @@ dissect_ranap_GlobalRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 333 "../../asn1/ranap/ranap.cnf" +#line 334 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; @@ -4771,7 +4771,7 @@ dissect_ranap_ImmediateMDT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 189 "../../asn1/ranap/ranap.cnf" +#line 190 "../../asn1/ranap/ranap.cnf" tvbuff_t* imsi_tvb; const char *digit_str; sccp_msg_info_t *sccp_info; @@ -5622,7 +5622,7 @@ dissect_ranap_LocationReportingTransferInformation(tvbuff_t *tvb _U_, int offset static int dissect_ranap_L3_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 269 "../../asn1/ranap/ranap.cnf" +#line 270 "../../asn1/ranap/ranap.cnf" tvbuff_t *l3_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6042,7 +6042,7 @@ dissect_ranap_MSISDN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr static int dissect_ranap_NAS_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 214 "../../asn1/ranap/ranap.cnf" +#line 215 "../../asn1/ranap/ranap.cnf" tvbuff_t *nas_pdu_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6080,7 +6080,7 @@ dissect_ranap_NAS_SynchronisationIndicator(tvbuff_t *tvb _U_, int offset _U_, as static int dissect_ranap_NewBSS_To_OldBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 261 "../../asn1/ranap/ranap.cnf" +#line 262 "../../asn1/ranap/ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6169,7 +6169,7 @@ dissect_ranap_Offload_RAB_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx static int dissect_ranap_OldBSS_ToNewBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 253 "../../asn1/ranap/ranap.cnf" +#line 254 "../../asn1/ranap/ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -7335,7 +7335,7 @@ dissect_ranap_RNSAPRelocationParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ static int dissect_ranap_RRC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 223 "../../asn1/ranap/ranap.cnf" +#line 224 "../../asn1/ranap/ranap.cnf" tvbuff_t *rrc_message_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -7447,7 +7447,7 @@ dissect_ranap_Service_Handover(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_ranap_Source_ToTarget_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 359 "../../asn1/ranap/ranap.cnf" +#line 360 "../../asn1/ranap/ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); @@ -7524,7 +7524,7 @@ static const per_sequence_t SourceRNC_ToTargetRNC_TransparentContainer_sequence[ static int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 345 "../../asn1/ranap/ranap.cnf" +#line 346 "../../asn1/ranap/ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset @@ -7763,7 +7763,7 @@ dissect_ranap_SRVCC_Operation_Possible(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_ranap_Target_ToSource_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 369 "../../asn1/ranap/ranap.cnf" +#line 370 "../../asn1/ranap/ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); @@ -7895,7 +7895,7 @@ dissect_ranap_TraceType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 304 "../../asn1/ranap/ranap.cnf" +#line 305 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; proto_item *item; proto_tree *subtree, *nsap_tree; @@ -7994,8 +7994,16 @@ dissect_ranap_UE_AggregateMaximumBitRate(tvbuff_t *tvb _U_, int offset _U_, asn1 static int dissect_ranap_UE_History_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 385 "../../asn1/ranap/ranap.cnf" + tvbuff_t *value_tvb = NULL; + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, NULL); + NO_BOUND, NO_BOUND, FALSE, &value_tvb); + + if (value_tvb) + dissect_s1ap_UE_HistoryInformation_PDU(value_tvb, actx->pinfo, tree, NULL); + + return offset; } @@ -8253,7 +8261,7 @@ dissect_ranap_VelocityEstimate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_ranap_RAB_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 142 "../../asn1/ranap/ranap.cnf" +#line 143 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); @@ -8269,7 +8277,7 @@ dissect_ranap_RAB_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_ranap_RAB_IE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 150 "../../asn1/ranap/ranap.cnf" +#line 151 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerPairList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); @@ -8285,7 +8293,7 @@ dissect_ranap_RAB_IE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_ranap_IuSigConId_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 167 "../../asn1/ranap/ranap.cnf" +#line 168 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfIuSigConIds); @@ -8301,7 +8309,7 @@ dissect_ranap_IuSigConId_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn static int dissect_ranap_DirectTransfer_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 175 "../../asn1/ranap/ranap.cnf" +#line 176 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfDTs); @@ -11631,11 +11639,11 @@ static int dissect_SNA_Access_Information_PDU(tvbuff_t *tvb _U_, packet_info *pi offset += 7; offset >>= 3; return offset; } -static int dissect_Source_ToTarget_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { +int dissect_ranap_Source_ToTarget_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); - offset = dissect_ranap_Source_ToTarget_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_Source_ToTarget_TransparentContainer_PDU); + offset = dissect_ranap_Source_ToTarget_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_ranap_Source_ToTarget_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } @@ -13082,7 +13090,7 @@ static int dissect_RANAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot /*--- End of included file: packet-ranap-fn.c ---*/ -#line 141 "../../asn1/ranap/packet-ranap-template.c" +#line 142 "../../asn1/ranap/packet-ranap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) @@ -13758,7 +13766,7 @@ void proto_register_ranap(void) { { "SNA-Access-Information", "ranap.SNA_Access_Information_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_ranap_Source_ToTarget_TransparentContainer_PDU, + { &hf_ranap_ranap_Source_ToTarget_TransparentContainer_PDU, { "Source-ToTarget-TransparentContainer", "ranap.Source_ToTarget_TransparentContainer", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, @@ -16136,7 +16144,7 @@ void proto_register_ranap(void) { NULL, HFILL }}, /*--- End of included file: packet-ranap-hfarr.c ---*/ -#line 326 "../../asn1/ranap/packet-ranap-template.c" +#line 327 "../../asn1/ranap/packet-ranap-template.c" }; /* List of subtrees */ @@ -16473,7 +16481,7 @@ void proto_register_ranap(void) { &ett_ranap_Outcome, /*--- End of included file: packet-ranap-ettarr.c ---*/ -#line 334 "../../asn1/ranap/packet-ranap-template.c" +#line 335 "../../asn1/ranap/packet-ranap-template.c" }; @@ -16535,7 +16543,7 @@ proto_reg_handoff_ranap(void) dissector_add_uint("ranap.ies", id_RelocationType, new_create_dissector_handle(dissect_RelocationType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_SourceID, new_create_dissector_handle(dissect_SourceID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Source_ToTarget_TransparentContainer, new_create_dissector_handle(dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU, proto_ranap)); - dissector_add_uint("ranap.ies", SPECIAL|id_Source_ToTarget_TransparentContainer, new_create_dissector_handle(dissect_Source_ToTarget_TransparentContainer_PDU, proto_ranap)); + dissector_add_uint("ranap.ies", SPECIAL|id_Source_ToTarget_TransparentContainer, new_create_dissector_handle(dissect_ranap_Source_ToTarget_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TargetID, new_create_dissector_handle(dissect_TargetID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Target_ToSource_TransparentContainer, new_create_dissector_handle(dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", SPECIAL|id_Target_ToSource_TransparentContainer, new_create_dissector_handle(dissect_Target_ToSource_TransparentContainer_PDU, proto_ranap)); @@ -16856,7 +16864,7 @@ proto_reg_handoff_ranap(void) /*--- End of included file: packet-ranap-dis-tab.c ---*/ -#line 384 "../../asn1/ranap/packet-ranap-template.c" +#line 385 "../../asn1/ranap/packet-ranap-template.c" } else { dissector_delete_uint("sccp.ssn", local_ranap_sccp_ssn, ranap_handle); } |