diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-10-30 16:15:27 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-10-30 16:15:27 +0000 |
commit | 77377a9d22e48effd6ddfe5e31ab90d76f8975ca (patch) | |
tree | 5040359939a19b4911c6d75553f317ef82241184 | |
parent | d3b7b182c17a7c7af646c867ec8ece3da5668e1e (diff) |
- Bitrate must be FT_UINT64
- Dissect HandoverCommand
svn path=/trunk/; revision=30771
-rw-r--r-- | asn1/x2ap/packet-x2ap-template.c | 2 | ||||
-rw-r--r-- | asn1/x2ap/x2ap.cnf | 33 | ||||
-rw-r--r-- | epan/dissectors/packet-x2ap.c | 57 |
3 files changed, 75 insertions, 17 deletions
diff --git a/asn1/x2ap/packet-x2ap-template.c b/asn1/x2ap/packet-x2ap-template.c index 5f993664fa..f80f065a76 100644 --- a/asn1/x2ap/packet-x2ap-template.c +++ b/asn1/x2ap/packet-x2ap-template.c @@ -43,6 +43,8 @@ #include "packet-per.h" #include "packet-e212.h" +#include "packet-frame.h" +#include "packet-lte-rrc.h" #ifdef _MSC_VER /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */ diff --git a/asn1/x2ap/x2ap.cnf b/asn1/x2ap/x2ap.cnf index bf82b0a893..da44c57021 100644 --- a/asn1/x2ap/x2ap.cnf +++ b/asn1/x2ap/x2ap.cnf @@ -74,11 +74,11 @@ ProtocolIE-ContainerPairList #.FN_PARS UnsuccessfulOutcome/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_UnsuccessfulOutcomeValue -#.FN_BODY PLMN-Identity VAL_PTR = parameter_tvb +#.FN_BODY PLMN-Identity VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb=NULL; - offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - 3, 3, FALSE, ¶meter_tvb); +%(DEFAULT_BODY)s + if(tvb_length(tvb)==0) return offset; @@ -87,6 +87,30 @@ ProtocolIE-ContainerPairList dissect_e212_mcc_mnc(parameter_tvb, tree, 0); #.END +#.FN_BODY TargeteNBtoSource-eNBTransparentContainer VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + +%(DEFAULT_BODY)s + if (!parameter_tvb) + return offset; + + TRY { + dissect_lte_rrc_HandoverCommand_PDU(parameter_tvb, actx->pinfo, tree); + } + CATCH(BoundsError) { + g_warning("BoundsError"); + show_exception(parameter_tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); + } + CATCH(ReportedBoundsError) { + g_warning("ReportedBoundsError"); + show_exception(parameter_tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); + } + CATCH_ALL{ + g_warning("CATCH_ALL"); + show_exception(parameter_tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); + } + ENDTRY; + #.TYPE_ATTR ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(x2ap_ProtocolIE_ID_vals) #.END @@ -234,4 +258,7 @@ ResourceStatusFailure N x2ap.proc.uout id-resourceStatusReportingInitiation ResourceStatusUpdate N x2ap.proc.imsg id-resourceStatusReporting PrivateMessage N x2ap.proc.imsg id-privateMessage + +#.TYPE_ATTR +BitRate TYPE = FT_UINT64 DISPLAY = BASE_DEC STRINGS = NULL #.END diff --git a/epan/dissectors/packet-x2ap.c b/epan/dissectors/packet-x2ap.c index d8b3de8263..0e12a37bed 100644 --- a/epan/dissectors/packet-x2ap.c +++ b/epan/dissectors/packet-x2ap.c @@ -51,6 +51,8 @@ #include "packet-per.h" #include "packet-e212.h" +#include "packet-frame.h" +#include "packet-lte-rrc.h" #ifdef _MSC_VER /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */ @@ -145,7 +147,7 @@ typedef enum _ProtocolIE_ID_enum { } ProtocolIE_ID_enum; /*--- End of included file: packet-x2ap-val.h ---*/ -#line 59 "packet-x2ap-template.c" +#line 61 "packet-x2ap-template.c" /* Initialize the protocol and registered fields */ static int proto_x2ap = -1; @@ -379,7 +381,7 @@ static int hf_x2ap_successfulOutcome_value = -1; /* SuccessfulOutcome_value */ static int hf_x2ap_value = -1; /* UnsuccessfulOutcome_value */ /*--- End of included file: packet-x2ap-hf.c ---*/ -#line 64 "packet-x2ap-template.c" +#line 66 "packet-x2ap-template.c" /* Initialize the subtree pointers */ static int ett_x2ap = -1; @@ -489,7 +491,7 @@ static gint ett_x2ap_SuccessfulOutcome = -1; static gint ett_x2ap_UnsuccessfulOutcome = -1; /*--- End of included file: packet-x2ap-ett.c ---*/ -#line 69 "packet-x2ap-template.c" +#line 71 "packet-x2ap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -929,6 +931,8 @@ dissect_x2ap_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, ¶meter_tvb); + + if(tvb_length(tvb)==0) return offset; @@ -2426,8 +2430,33 @@ dissect_x2ap_SubscriberProfileIDforRFP(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_x2ap_TargeteNBtoSource_eNBTransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 91 "x2ap.cnf" + tvbuff_t *parameter_tvb=NULL; + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, NULL); + NO_BOUND, NO_BOUND, FALSE, ¶meter_tvb); + + if (!parameter_tvb) + return offset; + + TRY { + dissect_lte_rrc_HandoverCommand_PDU(parameter_tvb, actx->pinfo, tree); + } + CATCH(BoundsError) { + g_warning("BoundsError"); + show_exception(parameter_tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); + } + CATCH(ReportedBoundsError) { + g_warning("ReportedBoundsError"); + show_exception(parameter_tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); + } + CATCH_ALL{ + g_warning("CATCH_ALL"); + show_exception(parameter_tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); + } + ENDTRY; + + return offset; } @@ -3754,7 +3783,7 @@ static void dissect_X2AP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot /*--- End of included file: packet-x2ap-fn.c ---*/ -#line 89 "packet-x2ap-template.c" +#line 91 "packet-x2ap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -4276,19 +4305,19 @@ void proto_register_x2ap(void) { "x2ap.LAC", HFILL }}, { &hf_x2ap_e_RAB_MaximumBitrateDL, { "e-RAB-MaximumBitrateDL", "x2ap.e_RAB_MaximumBitrateDL", - FT_UINT32, BASE_DEC, NULL, 0, + FT_UINT64, BASE_DEC, NULL, 0, "x2ap.BitRate", HFILL }}, { &hf_x2ap_e_RAB_MaximumBitrateUL, { "e-RAB-MaximumBitrateUL", "x2ap.e_RAB_MaximumBitrateUL", - FT_UINT32, BASE_DEC, NULL, 0, + FT_UINT64, BASE_DEC, NULL, 0, "x2ap.BitRate", HFILL }}, { &hf_x2ap_e_RAB_GuaranteedBitrateDL, { "e-RAB-GuaranteedBitrateDL", "x2ap.e_RAB_GuaranteedBitrateDL", - FT_UINT32, BASE_DEC, NULL, 0, + FT_UINT64, BASE_DEC, NULL, 0, "x2ap.BitRate", HFILL }}, { &hf_x2ap_e_RAB_GuaranteedBitrateUL, { "e-RAB-GuaranteedBitrateUL", "x2ap.e_RAB_GuaranteedBitrateUL", - FT_UINT32, BASE_DEC, NULL, 0, + FT_UINT64, BASE_DEC, NULL, 0, "x2ap.BitRate", HFILL }}, { &hf_x2ap_eNB_ID, { "eNB-ID", "x2ap.eNB_ID", @@ -4508,11 +4537,11 @@ void proto_register_x2ap(void) { "x2ap.LastVisitedCell_Item", HFILL }}, { &hf_x2ap_uEaggregateMaximumBitRateDownlink, { "uEaggregateMaximumBitRateDownlink", "x2ap.uEaggregateMaximumBitRateDownlink", - FT_UINT32, BASE_DEC, NULL, 0, + FT_UINT64, BASE_DEC, NULL, 0, "x2ap.BitRate", HFILL }}, { &hf_x2ap_uEaggregateMaximumBitRateUplink, { "uEaggregateMaximumBitRateUplink", "x2ap.uEaggregateMaximumBitRateUplink", - FT_UINT32, BASE_DEC, NULL, 0, + FT_UINT64, BASE_DEC, NULL, 0, "x2ap.BitRate", HFILL }}, { &hf_x2ap_encryptionAlgorithms, { "encryptionAlgorithms", "x2ap.encryptionAlgorithms", @@ -4704,7 +4733,7 @@ void proto_register_x2ap(void) { "x2ap.UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-x2ap-hfarr.c ---*/ -#line 138 "packet-x2ap-template.c" +#line 140 "packet-x2ap-template.c" }; /* List of subtrees */ @@ -4815,7 +4844,7 @@ void proto_register_x2ap(void) { &ett_x2ap_UnsuccessfulOutcome, /*--- End of included file: packet-x2ap-ettarr.c ---*/ -#line 144 "packet-x2ap-template.c" +#line 146 "packet-x2ap-template.c" }; @@ -4915,7 +4944,7 @@ proto_reg_handoff_x2ap(void) /*--- End of included file: packet-x2ap-dis-tab.c ---*/ -#line 177 "packet-x2ap-template.c" +#line 179 "packet-x2ap-template.c" } |