diff options
author | Anders Broman <anders.broman@ericsson.com> | 2010-04-29 20:45:53 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2010-04-29 20:45:53 +0000 |
commit | 447faa608249ba769866a069b48698cf09c9b137 (patch) | |
tree | 2594675b8efedad7769dacfe13fb85fbc2ef4454 /epan/dissectors/packet-ranap.c | |
parent | 3f9d9a766e557770e942840b17d78044a572d08e (diff) |
From Mike Morrin:
Dissection of BSSMAP IEs: Old BSS to New BSS Info and New BSS to Old BSS Info
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4712
svn path=/trunk/; revision=32606
Diffstat (limited to 'epan/dissectors/packet-ranap.c')
-rw-r--r-- | epan/dissectors/packet-ranap.c | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index cd53ee4a87..164492457e 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -51,6 +51,7 @@ #include "packet-ranap.h" #include "packet-e212.h" #include "packet-sccp.h" +#include "packet-gsm_a_common.h" #ifdef _MSC_VER /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */ @@ -382,7 +383,7 @@ typedef enum _ProtocolIE_ID_enum { } ProtocolIE_ID_enum; /*--- End of included file: packet-ranap-val.h ---*/ -#line 62 "packet-ranap-template.c" +#line 63 "packet-ranap-template.c" /* Initialize the protocol and registered fields */ static int proto_ranap = -1; @@ -1033,7 +1034,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 "packet-ranap-template.c" +#line 76 "packet-ranap-template.c" /* Initialize the subtree pointers */ static int ett_ranap = -1; @@ -1338,7 +1339,7 @@ static gint ett_ranap_UnsuccessfulOutcome = -1; static gint ett_ranap_Outcome = -1; /*--- End of included file: packet-ranap-ett.c ---*/ -#line 81 "packet-ranap-template.c" +#line 82 "packet-ranap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -2485,7 +2486,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 239 "ranap.cnf" +#line 262 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -4271,7 +4272,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 280 "ranap.cnf" +#line 303 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; @@ -4968,8 +4969,15 @@ dissect_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode(tvbuff_t *tvb 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 250 "ranap.cnf" + tvbuff_t *l3_info_tvb=NULL; + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, NULL); + NO_BOUND, NO_BOUND, FALSE, &l3_info_tvb); + + if (l3_info_tvb) + dissector_try_port(nas_pdu_dissector_table, 0x1, l3_info_tvb, actx->pinfo, proto_tree_get_root(tree)); + return offset; } @@ -5171,8 +5179,15 @@ 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 242 "ranap.cnf" + tvbuff_t *bss_info_tvb=NULL; + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, NULL); + NO_BOUND, NO_BOUND, FALSE, &bss_info_tvb); + + if (bss_info_tvb) + bssmap_new_bss_to_old_bss_info(bss_info_tvb, tree, actx->pinfo); + return offset; } @@ -5217,8 +5232,15 @@ dissect_ranap_NumberOfSteps(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx 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 234 "ranap.cnf" + tvbuff_t *bss_info_tvb=NULL; + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, NULL); + NO_BOUND, NO_BOUND, FALSE, &bss_info_tvb); + + if (bss_info_tvb) + bssmap_old_bss_to_new_bss_info(bss_info_tvb, tree, actx->pinfo); + return offset; } @@ -6301,7 +6323,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 306 "ranap.cnf" +#line 329 "ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); @@ -6378,7 +6400,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 292 "ranap.cnf" +#line 315 "ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset @@ -6504,7 +6526,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 316 "ranap.cnf" +#line 339 "ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); @@ -6689,7 +6711,7 @@ dissect_ranap_UnsuccessfullyTransmittedDataVolume(tvbuff_t *tvb _U_, int offset 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 258 "ranap.cnf" +#line 281 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; proto_tree *subtree; gint tvb_len; @@ -11783,7 +11805,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 "packet-ranap-template.c" +#line 142 "packet-ranap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -14477,7 +14499,7 @@ void proto_register_ranap(void) { "ranap.T_value", HFILL }}, /*--- End of included file: packet-ranap-hfarr.c ---*/ -#line 298 "packet-ranap-template.c" +#line 299 "packet-ranap-template.c" }; /* List of subtrees */ @@ -14783,7 +14805,7 @@ void proto_register_ranap(void) { &ett_ranap_Outcome, /*--- End of included file: packet-ranap-ettarr.c ---*/ -#line 305 "packet-ranap-template.c" +#line 306 "packet-ranap-template.c" }; @@ -15144,7 +15166,7 @@ proto_reg_handoff_ranap(void) /*--- End of included file: packet-ranap-dis-tab.c ---*/ -#line 350 "packet-ranap-template.c" +#line 351 "packet-ranap-template.c" } else { dissector_delete("sccp.ssn", local_ranap_sccp_ssn, ranap_handle); } |