diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2017-07-13 12:11:29 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-07-13 11:38:52 +0000 |
commit | 0e3032254806075db24dccd39b8b234d16d911a4 (patch) | |
tree | 39f3a4dda29439f53a06dbbb21b61acba5ea1ea3 /epan/dissectors/packet-m2ap.c | |
parent | a6a2da6c4eb36398781beaa8bc1c94ef4b9a85f4 (diff) |
M2AP: upgrade dissector to v14.0.0
Change-Id: If564a2cffead403dd3d06c1a031b8985fcde7e4b
Reviewed-on: https://code.wireshark.org/review/22603
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@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-m2ap.c')
-rw-r--r-- | epan/dissectors/packet-m2ap.c | 144 |
1 files changed, 142 insertions, 2 deletions
diff --git a/epan/dissectors/packet-m2ap.c b/epan/dissectors/packet-m2ap.c index 82bc6a65fa..1e4e217faf 100644 --- a/epan/dissectors/packet-m2ap.c +++ b/epan/dissectors/packet-m2ap.c @@ -28,7 +28,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Reference: 3GPP TS 36.443 v13.3.0 + * Reference: 3GPP TS 36.443 v14.0.0 */ #include "config.h" @@ -127,7 +127,10 @@ typedef enum _ProtocolIE_ID_enum { id_Active_MBMS_Session_List = 42, id_MBMS_Suspension_Notification_List = 43, id_MBMS_Suspension_Notification_Item = 44, - id_SC_PTM_Information = 45 + id_SC_PTM_Information = 45, + id_Modification_PeriodExtended = 46, + id_Repetition_PeriodExtended = 47, + id_MCH_Scheduling_PeriodExtended2 = 48 } ProtocolIE_ID_enum; /*--- End of included file: packet-m2ap-val.h ---*/ @@ -159,8 +162,11 @@ static int hf_m2ap_MCCHrelatedBCCH_ConfigPerMBSFNArea_Item_PDU = -1; /* MCCHrel static int hf_m2ap_MCE_MBMS_M2AP_ID_PDU = -1; /* MCE_MBMS_M2AP_ID */ static int hf_m2ap_MCEname_PDU = -1; /* MCEname */ static int hf_m2ap_MCH_Scheduling_PeriodExtended_PDU = -1; /* MCH_Scheduling_PeriodExtended */ +static int hf_m2ap_MCH_Scheduling_PeriodExtended2_PDU = -1; /* MCH_Scheduling_PeriodExtended2 */ static int hf_m2ap_Modulation_Coding_Scheme2_PDU = -1; /* Modulation_Coding_Scheme2 */ +static int hf_m2ap_Modification_PeriodExtended_PDU = -1; /* Modification_PeriodExtended */ static int hf_m2ap_Common_Subframe_Allocation_Period_PDU = -1; /* Common_Subframe_Allocation_Period */ +static int hf_m2ap_Repetition_PeriodExtended_PDU = -1; /* Repetition_PeriodExtended */ static int hf_m2ap_SC_PTM_Information_PDU = -1; /* SC_PTM_Information */ static int hf_m2ap_TimeToWait_PDU = -1; /* TimeToWait */ static int hf_m2ap_TMGI_PDU = -1; /* TMGI */ @@ -247,6 +253,8 @@ static int hf_m2ap_typeOfError = -1; /* TypeOfError */ static int hf_m2ap_pLMN_Identity = -1; /* PLMN_Identity */ static int hf_m2ap_eUTRANcellIdentifier = -1; /* EUTRANCellIdentifier */ static int hf_m2ap_macro_eNB_ID = -1; /* BIT_STRING_SIZE_20 */ +static int hf_m2ap_short_Macro_eNB_ID = -1; /* BIT_STRING_SIZE_18 */ +static int hf_m2ap_long_Macro_eNB_ID = -1; /* BIT_STRING_SIZE_21 */ static int hf_m2ap_mbsfnSynchronisationArea = -1; /* MBSFN_SynchronisationArea_ID */ static int hf_m2ap_mbmsServiceAreaList = -1; /* MBMS_Service_Area_ID_List */ static int hf_m2ap_mBMSConfigData = -1; /* ENB_MBMS_Configuration_data_Item */ @@ -579,6 +587,9 @@ static const value_string m2ap_ProtocolIE_ID_vals[] = { { id_MBMS_Suspension_Notification_List, "id-MBMS-Suspension-Notification-List" }, { id_MBMS_Suspension_Notification_Item, "id-MBMS-Suspension-Notification-Item" }, { id_SC_PTM_Information, "id-SC-PTM-Information" }, + { id_Modification_PeriodExtended, "id-Modification-PeriodExtended" }, + { id_Repetition_PeriodExtended, "id-Repetition-PeriodExtended" }, + { id_MCH_Scheduling_PeriodExtended2, "id-MCH-Scheduling-PeriodExtended2" }, { 0, NULL } }; @@ -1114,13 +1125,37 @@ dissect_m2ap_BIT_STRING_SIZE_20(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a } + +static int +dissect_m2ap_BIT_STRING_SIZE_18(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, + 18, 18, FALSE, NULL, NULL); + + return offset; +} + + + +static int +dissect_m2ap_BIT_STRING_SIZE_21(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, + 21, 21, FALSE, NULL, NULL); + + return offset; +} + + static const value_string m2ap_ENB_ID_vals[] = { { 0, "macro-eNB-ID" }, + { 1, "short-Macro-eNB-ID" }, + { 2, "long-Macro-eNB-ID" }, { 0, NULL } }; static const per_choice_t ENB_ID_choice[] = { { 0, &hf_m2ap_macro_eNB_ID , ASN1_EXTENSION_ROOT , dissect_m2ap_BIT_STRING_SIZE_20 }, + { 1, &hf_m2ap_short_Macro_eNB_ID, ASN1_NOT_EXTENSION_ROOT, dissect_m2ap_BIT_STRING_SIZE_18 }, + { 2, &hf_m2ap_long_Macro_eNB_ID, ASN1_NOT_EXTENSION_ROOT, dissect_m2ap_BIT_STRING_SIZE_21 }, { 0, NULL, 0, NULL } }; @@ -1753,6 +1788,22 @@ dissect_m2ap_MCH_Scheduling_PeriodExtended(tvbuff_t *tvb _U_, int offset _U_, as } +static const value_string m2ap_MCH_Scheduling_PeriodExtended2_vals[] = { + { 0, "rf1" }, + { 1, "rf2" }, + { 0, NULL } +}; + + +static int +dissect_m2ap_MCH_Scheduling_PeriodExtended2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, + 2, NULL, TRUE, 0, NULL); + + return offset; +} + + static int dissect_m2ap_Modulation_Coding_Scheme2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { @@ -1763,6 +1814,29 @@ dissect_m2ap_Modulation_Coding_Scheme2(tvbuff_t *tvb _U_, int offset _U_, asn1_c } +static const value_string m2ap_Modification_PeriodExtended_vals[] = { + { 0, "rf1" }, + { 1, "rf2" }, + { 2, "rf4" }, + { 3, "rf8" }, + { 4, "rf16" }, + { 5, "rf32" }, + { 6, "rf64" }, + { 7, "rf128" }, + { 8, "rf256" }, + { 0, NULL } +}; + + +static int +dissect_m2ap_Modification_PeriodExtended(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, + 9, NULL, TRUE, 0, NULL); + + return offset; +} + + static int dissect_m2ap_INTEGER_0_28(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { @@ -1811,6 +1885,25 @@ dissect_m2ap_Common_Subframe_Allocation_Period(tvbuff_t *tvb _U_, int offset _U_ } +static const value_string m2ap_Repetition_PeriodExtended_vals[] = { + { 0, "rf1" }, + { 1, "rf2" }, + { 2, "rf4" }, + { 3, "rf8" }, + { 4, "rf16" }, + { 0, NULL } +}; + + +static int +dissect_m2ap_Repetition_PeriodExtended(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, + 5, NULL, TRUE, 0, NULL); + + return offset; +} + + static const per_sequence_t SC_PTM_Information_sequence[] = { { &hf_m2ap_mbmsCellList , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_m2ap_MBMS_Cell_List }, { &hf_m2ap_mbms_E_RAB_QoS_Parameters, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_m2ap_MBMS_E_RAB_QoS_Parameters }, @@ -2915,6 +3008,14 @@ static int dissect_MCH_Scheduling_PeriodExtended_PDU(tvbuff_t *tvb _U_, packet_i offset += 7; offset >>= 3; return offset; } +static int dissect_MCH_Scheduling_PeriodExtended2_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_m2ap_MCH_Scheduling_PeriodExtended2(tvb, offset, &asn1_ctx, tree, hf_m2ap_MCH_Scheduling_PeriodExtended2_PDU); + offset += 7; offset >>= 3; + return offset; +} static int dissect_Modulation_Coding_Scheme2_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; @@ -2923,6 +3024,14 @@ static int dissect_Modulation_Coding_Scheme2_PDU(tvbuff_t *tvb _U_, packet_info offset += 7; offset >>= 3; return offset; } +static int dissect_Modification_PeriodExtended_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_m2ap_Modification_PeriodExtended(tvb, offset, &asn1_ctx, tree, hf_m2ap_Modification_PeriodExtended_PDU); + offset += 7; offset >>= 3; + return offset; +} static int dissect_Common_Subframe_Allocation_Period_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; @@ -2931,6 +3040,14 @@ static int dissect_Common_Subframe_Allocation_Period_PDU(tvbuff_t *tvb _U_, pack offset += 7; offset >>= 3; return offset; } +static int dissect_Repetition_PeriodExtended_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_m2ap_Repetition_PeriodExtended(tvb, offset, &asn1_ctx, tree, hf_m2ap_Repetition_PeriodExtended_PDU); + offset += 7; offset >>= 3; + return offset; +} static int dissect_SC_PTM_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; @@ -3484,14 +3601,26 @@ proto_register_m2ap(void) { { "MCH-Scheduling-PeriodExtended", "m2ap.MCH_Scheduling_PeriodExtended", FT_UINT32, BASE_DEC, VALS(m2ap_MCH_Scheduling_PeriodExtended_vals), 0, NULL, HFILL }}, + { &hf_m2ap_MCH_Scheduling_PeriodExtended2_PDU, + { "MCH-Scheduling-PeriodExtended2", "m2ap.MCH_Scheduling_PeriodExtended2", + FT_UINT32, BASE_DEC, VALS(m2ap_MCH_Scheduling_PeriodExtended2_vals), 0, + NULL, HFILL }}, { &hf_m2ap_Modulation_Coding_Scheme2_PDU, { "Modulation-Coding-Scheme2", "m2ap.Modulation_Coding_Scheme2", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, + { &hf_m2ap_Modification_PeriodExtended_PDU, + { "Modification-PeriodExtended", "m2ap.Modification_PeriodExtended", + FT_UINT32, BASE_DEC, VALS(m2ap_Modification_PeriodExtended_vals), 0, + NULL, HFILL }}, { &hf_m2ap_Common_Subframe_Allocation_Period_PDU, { "Common-Subframe-Allocation-Period", "m2ap.Common_Subframe_Allocation_Period", FT_UINT32, BASE_DEC, VALS(m2ap_Common_Subframe_Allocation_Period_vals), 0, NULL, HFILL }}, + { &hf_m2ap_Repetition_PeriodExtended_PDU, + { "Repetition-PeriodExtended", "m2ap.Repetition_PeriodExtended", + FT_UINT32, BASE_DEC, VALS(m2ap_Repetition_PeriodExtended_vals), 0, + NULL, HFILL }}, { &hf_m2ap_SC_PTM_Information_PDU, { "SC-PTM-Information", "m2ap.SC_PTM_Information_element", FT_NONE, BASE_NONE, NULL, 0, @@ -3836,6 +3965,14 @@ proto_register_m2ap(void) { { "macro-eNB-ID", "m2ap.macro_eNB_ID", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_20", HFILL }}, + { &hf_m2ap_short_Macro_eNB_ID, + { "short-Macro-eNB-ID", "m2ap.short_Macro_eNB_ID", + FT_BYTES, BASE_NONE, NULL, 0, + "BIT_STRING_SIZE_18", HFILL }}, + { &hf_m2ap_long_Macro_eNB_ID, + { "long-Macro-eNB-ID", "m2ap.long_Macro_eNB_ID", + FT_BYTES, BASE_NONE, NULL, 0, + "BIT_STRING_SIZE_21", HFILL }}, { &hf_m2ap_mbsfnSynchronisationArea, { "mbsfnSynchronisationArea", "m2ap.mbsfnSynchronisationArea", FT_UINT32, BASE_DEC, NULL, 0, @@ -4291,6 +4428,9 @@ proto_reg_handoff_m2ap(void) dissector_add_uint("m2ap.ies", id_SC_PTM_Information, create_dissector_handle(dissect_SC_PTM_Information_PDU, proto_m2ap)); dissector_add_uint("m2ap.extension", id_Modulation_Coding_Scheme2, create_dissector_handle(dissect_Modulation_Coding_Scheme2_PDU, proto_m2ap)); dissector_add_uint("m2ap.extension", id_MCH_Scheduling_PeriodExtended, create_dissector_handle(dissect_MCH_Scheduling_PeriodExtended_PDU, proto_m2ap)); + dissector_add_uint("m2ap.extension", id_Repetition_PeriodExtended, create_dissector_handle(dissect_Repetition_PeriodExtended_PDU, proto_m2ap)); + dissector_add_uint("m2ap.extension", id_Modification_PeriodExtended, create_dissector_handle(dissect_Modification_PeriodExtended_PDU, proto_m2ap)); + dissector_add_uint("m2ap.extension", id_MCH_Scheduling_PeriodExtended2, create_dissector_handle(dissect_MCH_Scheduling_PeriodExtended2_PDU, proto_m2ap)); dissector_add_uint("m2ap.proc.imsg", id_sessionStart, create_dissector_handle(dissect_SessionStartRequest_PDU, proto_m2ap)); dissector_add_uint("m2ap.proc.sout", id_sessionStart, create_dissector_handle(dissect_SessionStartResponse_PDU, proto_m2ap)); dissector_add_uint("m2ap.proc.uout", id_sessionStart, create_dissector_handle(dissect_SessionStartFailure_PDU, proto_m2ap)); |