NGAP: fix dissection of N2 Information Content

Change-Id: I8aaf578c8eb71533313cf2cfd42871eae0c0ff57
Reviewed-on: https://code.wireshark.org/review/33603
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
This commit is contained in:
Pascal Quantin 2019-06-16 12:40:14 +02:00
parent 3487b8f9c3
commit be3d469ddc
6 changed files with 387 additions and 152 deletions

View File

@ -116,6 +116,9 @@ libwsutil.so.0 libwsutil0 #MINVER#
json_dumper_value_string@Base 2.9.0
json_dumper_value_va_list@Base 2.9.1
json_dumper_write_base64@Base 2.9.1
json_get_double@Base 3.1.0
json_get_object@Base 3.1.0
json_get_string@Base 3.1.0
json_parse@Base 2.9.0
json_validate@Base 2.9.0
linear2alaw@Base 1.12.0~rc1

View File

@ -1246,7 +1246,18 @@ UplinkUEAssociatedNRPPaTransport N ngap.proc.imsg id-UplinkUEAssociatedNR
WriteReplaceWarningRequest N ngap.proc.imsg id-WriteReplaceWarning
WriteReplaceWarningResponse N ngap.proc.sout id-WriteReplaceWarning
PDUSessionResourceSetupRequest S ngap.n2_ie_type "PDU_RES_SETUP_REQ"
PDUSessionResourceReleaseCommand S ngap.n2_ie_type "PDU_RES_REL_CMD"
PDUSessionResourceModifyRequest S ngap.n2_ie_type "PDU_RES_MOD_REQ"
HandoverCommand S ngap.n2_ie_type "HANDOVER_CMD"
HandoverRequired S ngap.n2_ie_type "HANDOVER_REQUIRED"
HandoverPreparationFailure S ngap.n2_ie_type "HANDOVER_PREP_FAIL"
SourceToTarget-TransparentContainer S ngap.n2_ie_type "SRC_TO_TAR_CONTAINER"
TargetToSource-TransparentContainer S ngap.n2_ie_type "TAR_TO_SRC_CONTAINER"
#S ngap.n2_ie_type "RAN_STATUS_TRANS_CONTAINER"
SONConfigurationTransfer S ngap.n2_ie_type "SON_CONFIG_TRANSFER"
NRPPa-PDU S ngap.n2_ie_type "NRPPA_PDU"
UERadioCapability S ngap.n2_ie_type "UE_RADIO_CAPABILITY"
#.FN_HDR AMFConfigurationUpdate
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "AMFConfigurationUpdate");

View File

@ -15,7 +15,6 @@
#include <stdio.h>
#include <epan/packet.h>
#include <epan/strutil.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
@ -23,6 +22,7 @@
#include <epan/expert.h>
#include <epan/proto_data.h>
#include <epan/conversation.h>
#include <wsutil/wsjson.h>
#include "packet-ngap.h"
#include "packet-per.h"
@ -188,6 +188,7 @@ static dissector_table_t ngap_extension_dissector_table;
static dissector_table_t ngap_proc_imsg_dissector_table;
static dissector_table_t ngap_proc_sout_dissector_table;
static dissector_table_t ngap_proc_uout_dissector_table;
static dissector_table_t ngap_n2_ie_type_dissector_table;
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
/* Currently not used
@ -428,45 +429,104 @@ dissect_ngap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
return dissect_NGAP_PDU_PDU(tvb, pinfo, ngap_tree, NULL);
}
/* 3GPP TS 29.502 */
/*
* 6.1.6.4.3 N2 SM Information
* N2 SM Information shall encode NG Application Protocol (NGAP) IEs, as specified in subclause 9.3 of 3GPP TS 38.413 [9] (ASN.1 encoded),
* using the vnd.3gpp.ngap content-type.
*/
/* 3GPP TS 29.518 chapter 6.1.6.4.3 */
static int
dissect_ngap_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
dissect_ngap_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
guint protocol_ie_id;
tvbuff_t* json_tvb = (tvbuff_t*)p_get_proto_data(pinfo->pool, pinfo, proto_json, 0);
int ret;
char *json_data;
const char *n2_info_class, *str;
jsmntok_t *tokens, *cur_tok, *n2_info_content_tok;
dissector_handle_t subdissector;
tvbuff_t* json_tvb = (tvbuff_t*)p_get_proto_data(pinfo->pool, pinfo, proto_json, 0);
http_message_info_t *message_info = (http_message_info_t *)data;
if (!json_tvb) {
return 0;
}
/*See if we can find the key"ngapMessageType" in the jason buffer*/
const guint8* start_pos, * curr_pos;
int pos, buf_len = tvb_captured_length(json_tvb);
if (!json_tvb || !message_info || !message_info->content_id)
return 0;
start_pos = tvb_get_ptr(json_tvb, 0, buf_len);
curr_pos = strstr(start_pos, "ngapMessageType");
json_data = tvb_get_string_enc(wmem_packet_scope(), json_tvb, 0, tvb_reported_length(json_tvb), ENC_UTF_8|ENC_NA);
ret = json_parse(json_data, NULL, 0);
if (ret < 0)
return 0;
tokens = wmem_alloc_array(wmem_packet_scope(), jsmntok_t, ret);
if (json_parse(json_data, tokens, ret) < 0)
return 0;
cur_tok = json_get_object(json_data, tokens, "n2InfoContainer");
if (!cur_tok)
return 0;
n2_info_class = json_get_string(json_data, cur_tok, "n2InformationClass");
if (!n2_info_class)
return 0;
if (!strcmp(n2_info_class, "SM")) {
cur_tok = json_get_object(json_data, cur_tok, "smInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "n2InfoContent");
if (!n2_info_content_tok)
return 0;
str = json_get_string(json_data, n2_info_content_tok, "ngapIeType");
if (!str)
return 0;
subdissector = dissector_get_string_handle(ngap_n2_ie_type_dissector_table, str);
} else if (!strcmp(n2_info_class, "RAN")) {
cur_tok = json_get_object(json_data, cur_tok, "ranInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "n2InfoContent");
if (!n2_info_content_tok)
return 0;
str = json_get_string(json_data, n2_info_content_tok, "ngapIeType");
if (!str)
return 0;
subdissector = dissector_get_string_handle(ngap_n2_ie_type_dissector_table, str);
} else if (!strcmp(n2_info_class, "NRPPa")) {
cur_tok = json_get_object(json_data, cur_tok, "nrppaInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "nrppaPdu");
if (!n2_info_content_tok)
return 0;
str = json_get_string(json_data, n2_info_content_tok, "ngapIeType");
if (!str)
return 0;
subdissector = dissector_get_string_handle(ngap_n2_ie_type_dissector_table, str);
} else if (!strcmp(n2_info_class, "PWS") ||
!strcmp(n2_info_class, "PWS-BCAL") ||
!strcmp(n2_info_class, "PWS-RF")) {
gdouble msg_type;
cur_tok = json_get_object(json_data, cur_tok, "pwsInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "pwsContainer");
if (!n2_info_content_tok)
return 0;
if (!json_get_double(json_data, n2_info_content_tok, "ngapMessageType", &msg_type))
return 0;
if (!strcmp(n2_info_class, "PWS-BCAL"))
subdissector = dissector_get_uint_handle(ngap_proc_sout_dissector_table, (guint32)msg_type);
else
subdissector = dissector_get_uint_handle(ngap_proc_imsg_dissector_table, (guint32)msg_type);
} else {
subdissector = NULL;
}
if(!curr_pos) {
return 0;
}
curr_pos += 17;
/* Make sure we have enough room*/
pos = (int)(curr_pos - start_pos);
if (buf_len < pos + 2) {
return 0;
}
if (sscanf(curr_pos, "%u", &protocol_ie_id) != 1) {
return 0;
}
return (dissector_try_uint_new(ngap_ies_dissector_table, protocol_ie_id, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
if (subdissector) {
proto_item *ngap_item;
proto_tree *ngap_tree;
cur_tok = json_get_object(json_data, n2_info_content_tok, "ngapData");
if (!cur_tok)
return 0;
str = json_get_string(json_data, cur_tok, "contentId");
if (!str || strcmp(str, message_info->content_id))
return 0;
col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NGAP");
ngap_item = proto_tree_add_item(tree, proto_ngap, tvb, 0, -1, ENC_NA);
ngap_tree = proto_item_add_subtree(ngap_item, ett_ngap);
call_dissector_with_data(subdissector, tvb, pinfo, ngap_tree, NULL);
return tvb_captured_length(tvb);
} else {
return 0;
}
}
/*--- proto_reg_handoff_ngap ---------------------------------------*/
@ -691,7 +751,7 @@ void proto_register_ngap(void) {
ngap_proc_imsg_dissector_table = register_dissector_table("ngap.proc.imsg", "NGAP-ELEMENTARY-PROCEDURE InitiatingMessage", proto_ngap, FT_UINT32, BASE_DEC);
ngap_proc_sout_dissector_table = register_dissector_table("ngap.proc.sout", "NGAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", proto_ngap, FT_UINT32, BASE_DEC);
ngap_proc_uout_dissector_table = register_dissector_table("ngap.proc.uout", "NGAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", proto_ngap, FT_UINT32, BASE_DEC);
ngap_n2_ie_type_dissector_table = register_dissector_table("ngap.n2_ie_type", "NGAP N2 IE Type", proto_ngap, FT_STRING, FALSE);
/* Register configuration options for ports */
ngap_module = prefs_register_protocol(proto_ngap, proto_reg_handoff_ngap);

View File

@ -23,7 +23,6 @@
#include <stdio.h>
#include <epan/packet.h>
#include <epan/strutil.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
@ -31,6 +30,7 @@
#include <epan/expert.h>
#include <epan/proto_data.h>
#include <epan/conversation.h>
#include <wsutil/wsjson.h>
#include "packet-ngap.h"
#include "packet-per.h"
@ -1637,6 +1637,7 @@ static dissector_table_t ngap_extension_dissector_table;
static dissector_table_t ngap_proc_imsg_dissector_table;
static dissector_table_t ngap_proc_sout_dissector_table;
static dissector_table_t ngap_proc_uout_dissector_table;
static dissector_table_t ngap_n2_ie_type_dissector_table;
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
/* Currently not used
@ -10497,7 +10498,7 @@ static const per_sequence_t PDUSessionResourceSetupRequest_sequence[] = {
static int
dissect_ngap_PDUSessionResourceSetupRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1393 "./asn1/ngap/ngap.cnf"
#line 1404 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceSetupRequest");
@ -10515,7 +10516,7 @@ static const per_sequence_t PDUSessionResourceSetupResponse_sequence[] = {
static int
dissect_ngap_PDUSessionResourceSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1396 "./asn1/ngap/ngap.cnf"
#line 1407 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceSetupResponse");
@ -10533,7 +10534,7 @@ static const per_sequence_t PDUSessionResourceReleaseCommand_sequence[] = {
static int
dissect_ngap_PDUSessionResourceReleaseCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1387 "./asn1/ngap/ngap.cnf"
#line 1398 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceReleaseCommand");
@ -10551,7 +10552,7 @@ static const per_sequence_t PDUSessionResourceReleaseResponse_sequence[] = {
static int
dissect_ngap_PDUSessionResourceReleaseResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1390 "./asn1/ngap/ngap.cnf"
#line 1401 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceReleaseResponse");
@ -10569,7 +10570,7 @@ static const per_sequence_t PDUSessionResourceModifyRequest_sequence[] = {
static int
dissect_ngap_PDUSessionResourceModifyRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1372 "./asn1/ngap/ngap.cnf"
#line 1383 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceModifyRequest");
@ -10587,7 +10588,7 @@ static const per_sequence_t PDUSessionResourceModifyResponse_sequence[] = {
static int
dissect_ngap_PDUSessionResourceModifyResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1375 "./asn1/ngap/ngap.cnf"
#line 1386 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceModifyResponse");
@ -10605,7 +10606,7 @@ static const per_sequence_t PDUSessionResourceNotify_sequence[] = {
static int
dissect_ngap_PDUSessionResourceNotify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1384 "./asn1/ngap/ngap.cnf"
#line 1395 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceNotify");
@ -10623,7 +10624,7 @@ static const per_sequence_t PDUSessionResourceModifyIndication_sequence[] = {
static int
dissect_ngap_PDUSessionResourceModifyIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1378 "./asn1/ngap/ngap.cnf"
#line 1389 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceModifyIndication");
@ -10641,7 +10642,7 @@ static const per_sequence_t PDUSessionResourceModifyConfirm_sequence[] = {
static int
dissect_ngap_PDUSessionResourceModifyConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1381 "./asn1/ngap/ngap.cnf"
#line 1392 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PDUSessionResourceModifyConfirm");
@ -10659,7 +10660,7 @@ static const per_sequence_t InitialContextSetupRequest_sequence[] = {
static int
dissect_ngap_InitialContextSetupRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1315 "./asn1/ngap/ngap.cnf"
#line 1326 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "InitialContextSetupRequest");
@ -10677,7 +10678,7 @@ static const per_sequence_t InitialContextSetupResponse_sequence[] = {
static int
dissect_ngap_InitialContextSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1318 "./asn1/ngap/ngap.cnf"
#line 1329 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "InitialContextSetupResponse");
@ -10695,7 +10696,7 @@ static const per_sequence_t InitialContextSetupFailure_sequence[] = {
static int
dissect_ngap_InitialContextSetupFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1321 "./asn1/ngap/ngap.cnf"
#line 1332 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "InitialContextSetupFailure");
@ -10713,7 +10714,7 @@ static const per_sequence_t UEContextReleaseRequest_sequence[] = {
static int
dissect_ngap_UEContextReleaseRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1453 "./asn1/ngap/ngap.cnf"
#line 1464 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextReleaseRequest");
@ -10731,7 +10732,7 @@ static const per_sequence_t UEContextReleaseCommand_sequence[] = {
static int
dissect_ngap_UEContextReleaseCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1447 "./asn1/ngap/ngap.cnf"
#line 1458 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextReleaseCommand");
@ -10749,7 +10750,7 @@ static const per_sequence_t UEContextReleaseComplete_sequence[] = {
static int
dissect_ngap_UEContextReleaseComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1450 "./asn1/ngap/ngap.cnf"
#line 1461 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextReleaseComplete");
@ -10767,7 +10768,7 @@ static const per_sequence_t UEContextModificationRequest_sequence[] = {
static int
dissect_ngap_UEContextModificationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1438 "./asn1/ngap/ngap.cnf"
#line 1449 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationRequest");
@ -10785,7 +10786,7 @@ static const per_sequence_t UEContextModificationResponse_sequence[] = {
static int
dissect_ngap_UEContextModificationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1441 "./asn1/ngap/ngap.cnf"
#line 1452 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationResponse");
@ -10803,7 +10804,7 @@ static const per_sequence_t UEContextModificationFailure_sequence[] = {
static int
dissect_ngap_UEContextModificationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1444 "./asn1/ngap/ngap.cnf"
#line 1455 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationFailure");
@ -10821,7 +10822,7 @@ static const per_sequence_t RRCInactiveTransitionReport_sequence[] = {
static int
dissect_ngap_RRCInactiveTransitionReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1426 "./asn1/ngap/ngap.cnf"
#line 1437 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "RRCInactiveTransitionReport");
@ -10839,7 +10840,7 @@ static const per_sequence_t HandoverRequired_sequence[] = {
static int
dissect_ngap_HandoverRequired(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1297 "./asn1/ngap/ngap.cnf"
#line 1308 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverRequired");
@ -10857,7 +10858,7 @@ static const per_sequence_t HandoverCommand_sequence[] = {
static int
dissect_ngap_HandoverCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1300 "./asn1/ngap/ngap.cnf"
#line 1311 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverCommand");
@ -10875,7 +10876,7 @@ static const per_sequence_t HandoverPreparationFailure_sequence[] = {
static int
dissect_ngap_HandoverPreparationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1303 "./asn1/ngap/ngap.cnf"
#line 1314 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverPreparationFailure");
@ -10914,7 +10915,7 @@ static const per_sequence_t HandoverRequestAcknowledge_sequence[] = {
static int
dissect_ngap_HandoverRequestAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1309 "./asn1/ngap/ngap.cnf"
#line 1320 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverRequestAcknowledge");
@ -10932,7 +10933,7 @@ static const per_sequence_t HandoverFailure_sequence[] = {
static int
dissect_ngap_HandoverFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1312 "./asn1/ngap/ngap.cnf"
#line 1323 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverFailure");
@ -10950,7 +10951,7 @@ static const per_sequence_t HandoverNotify_sequence[] = {
static int
dissect_ngap_HandoverNotify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1294 "./asn1/ngap/ngap.cnf"
#line 1305 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverNotify");
@ -10968,7 +10969,7 @@ static const per_sequence_t PathSwitchRequest_sequence[] = {
static int
dissect_ngap_PathSwitchRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1363 "./asn1/ngap/ngap.cnf"
#line 1374 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PathSwitchRequest");
@ -10986,7 +10987,7 @@ static const per_sequence_t PathSwitchRequestAcknowledge_sequence[] = {
static int
dissect_ngap_PathSwitchRequestAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1366 "./asn1/ngap/ngap.cnf"
#line 1377 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PathSwitchRequestAcknowledge");
@ -11004,7 +11005,7 @@ static const per_sequence_t PathSwitchRequestFailure_sequence[] = {
static int
dissect_ngap_PathSwitchRequestFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1369 "./asn1/ngap/ngap.cnf"
#line 1380 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PathSwitchRequestFailure");
@ -11022,7 +11023,7 @@ static const per_sequence_t HandoverCancel_sequence[] = {
static int
dissect_ngap_HandoverCancel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1288 "./asn1/ngap/ngap.cnf"
#line 1299 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverCancel");
@ -11040,7 +11041,7 @@ static const per_sequence_t HandoverCancelAcknowledge_sequence[] = {
static int
dissect_ngap_HandoverCancelAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1291 "./asn1/ngap/ngap.cnf"
#line 1302 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverCancelAcknowledge");
@ -11058,7 +11059,7 @@ static const per_sequence_t UplinkRANStatusTransfer_sequence[] = {
static int
dissect_ngap_UplinkRANStatusTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1477 "./asn1/ngap/ngap.cnf"
#line 1488 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkRANStatusTransfer");
@ -11076,7 +11077,7 @@ static const per_sequence_t DownlinkRANStatusTransfer_sequence[] = {
static int
dissect_ngap_DownlinkRANStatusTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1279 "./asn1/ngap/ngap.cnf"
#line 1290 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkRANStatusTransfer");
@ -11094,7 +11095,7 @@ static const per_sequence_t Paging_sequence[] = {
static int
dissect_ngap_Paging(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1360 "./asn1/ngap/ngap.cnf"
#line 1371 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "Paging");
@ -11175,7 +11176,7 @@ static const per_sequence_t NASNonDeliveryIndication_sequence[] = {
static int
dissect_ngap_NASNonDeliveryIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1336 "./asn1/ngap/ngap.cnf"
#line 1347 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NASNonDeliveryIndication");
@ -11193,7 +11194,7 @@ static const per_sequence_t RerouteNASRequest_sequence[] = {
static int
dissect_ngap_RerouteNASRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1423 "./asn1/ngap/ngap.cnf"
#line 1434 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "RerouteNASRequest");
@ -11233,7 +11234,7 @@ static const per_sequence_t NGSetupRequest_sequence[] = {
static int
dissect_ngap_NGSetupRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1345 "./asn1/ngap/ngap.cnf"
#line 1356 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NGSetupRequest");
@ -11251,7 +11252,7 @@ static const per_sequence_t NGSetupResponse_sequence[] = {
static int
dissect_ngap_NGSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1348 "./asn1/ngap/ngap.cnf"
#line 1359 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NGSetupResponse");
@ -11269,7 +11270,7 @@ static const per_sequence_t NGSetupFailure_sequence[] = {
static int
dissect_ngap_NGSetupFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1351 "./asn1/ngap/ngap.cnf"
#line 1362 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NGSetupFailure");
@ -11287,7 +11288,7 @@ static const per_sequence_t RANConfigurationUpdate_sequence[] = {
static int
dissect_ngap_RANConfigurationUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1414 "./asn1/ngap/ngap.cnf"
#line 1425 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "RANConfigurationUpdate");
@ -11305,7 +11306,7 @@ static const per_sequence_t RANConfigurationUpdateAcknowledge_sequence[] = {
static int
dissect_ngap_RANConfigurationUpdateAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1417 "./asn1/ngap/ngap.cnf"
#line 1428 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "RANConfigurationUpdateAcknowledge");
@ -11323,7 +11324,7 @@ static const per_sequence_t RANConfigurationUpdateFailure_sequence[] = {
static int
dissect_ngap_RANConfigurationUpdateFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1420 "./asn1/ngap/ngap.cnf"
#line 1431 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "RANConfigurationUpdateFailure");
@ -11341,7 +11342,7 @@ static const per_sequence_t AMFConfigurationUpdate_sequence[] = {
static int
dissect_ngap_AMFConfigurationUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1252 "./asn1/ngap/ngap.cnf"
#line 1263 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "AMFConfigurationUpdate");
@ -11359,7 +11360,7 @@ static const per_sequence_t AMFConfigurationUpdateAcknowledge_sequence[] = {
static int
dissect_ngap_AMFConfigurationUpdateAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1255 "./asn1/ngap/ngap.cnf"
#line 1266 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "AMFConfigurationUpdateAcknowledge");
@ -11377,7 +11378,7 @@ static const per_sequence_t AMFConfigurationUpdateFailure_sequence[] = {
static int
dissect_ngap_AMFConfigurationUpdateFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1258 "./asn1/ngap/ngap.cnf"
#line 1269 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "AMFConfigurationUpdateFailure");
@ -11395,7 +11396,7 @@ static const per_sequence_t AMFStatusIndication_sequence[] = {
static int
dissect_ngap_AMFStatusIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1261 "./asn1/ngap/ngap.cnf"
#line 1272 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "AMFStatusIndication");
@ -11413,7 +11414,7 @@ static const per_sequence_t NGReset_sequence[] = {
static int
dissect_ngap_NGReset(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1339 "./asn1/ngap/ngap.cnf"
#line 1350 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NGReset");
@ -11431,7 +11432,7 @@ static const per_sequence_t NGResetAcknowledge_sequence[] = {
static int
dissect_ngap_NGResetAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1342 "./asn1/ngap/ngap.cnf"
#line 1353 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NGResetAcknowledge");
@ -11449,7 +11450,7 @@ static const per_sequence_t ErrorIndication_sequence[] = {
static int
dissect_ngap_ErrorIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1285 "./asn1/ngap/ngap.cnf"
#line 1296 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ErrorIndication");
@ -11467,7 +11468,7 @@ static const per_sequence_t OverloadStart_sequence[] = {
static int
dissect_ngap_OverloadStart(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1354 "./asn1/ngap/ngap.cnf"
#line 1365 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "OverloadStart");
@ -11485,7 +11486,7 @@ static const per_sequence_t OverloadStop_sequence[] = {
static int
dissect_ngap_OverloadStop(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1357 "./asn1/ngap/ngap.cnf"
#line 1368 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "OverloadStop");
@ -11503,7 +11504,7 @@ static const per_sequence_t UplinkRANConfigurationTransfer_sequence[] = {
static int
dissect_ngap_UplinkRANConfigurationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1474 "./asn1/ngap/ngap.cnf"
#line 1485 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkRANConfigurationTransfer");
@ -11521,7 +11522,7 @@ static const per_sequence_t DownlinkRANConfigurationTransfer_sequence[] = {
static int
dissect_ngap_DownlinkRANConfigurationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1276 "./asn1/ngap/ngap.cnf"
#line 1287 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkRANConfigurationTransfer");
@ -11539,7 +11540,7 @@ static const per_sequence_t WriteReplaceWarningRequest_sequence[] = {
static int
dissect_ngap_WriteReplaceWarningRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1483 "./asn1/ngap/ngap.cnf"
#line 1494 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "WriteReplaceWarningRequest");
@ -11557,7 +11558,7 @@ static const per_sequence_t WriteReplaceWarningResponse_sequence[] = {
static int
dissect_ngap_WriteReplaceWarningResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1486 "./asn1/ngap/ngap.cnf"
#line 1497 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "WriteReplaceWarningResponse");
@ -11576,7 +11577,7 @@ static const per_sequence_t PWSCancelRequest_sequence[] = {
static int
dissect_ngap_PWSCancelRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1402 "./asn1/ngap/ngap.cnf"
#line 1413 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWSCancelRequest");
@ -11594,7 +11595,7 @@ static const per_sequence_t PWSCancelResponse_sequence[] = {
static int
dissect_ngap_PWSCancelResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1405 "./asn1/ngap/ngap.cnf"
#line 1416 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWSCancelResponse");
@ -11612,7 +11613,7 @@ static const per_sequence_t PWSRestartIndication_sequence[] = {
static int
dissect_ngap_PWSRestartIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1411 "./asn1/ngap/ngap.cnf"
#line 1422 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWSRestartIndication");
@ -11630,7 +11631,7 @@ static const per_sequence_t PWSFailureIndication_sequence[] = {
static int
dissect_ngap_PWSFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1408 "./asn1/ngap/ngap.cnf"
#line 1419 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWSFailureIndication");
@ -11648,7 +11649,7 @@ static const per_sequence_t DownlinkUEAssociatedNRPPaTransport_sequence[] = {
static int
dissect_ngap_DownlinkUEAssociatedNRPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1282 "./asn1/ngap/ngap.cnf"
#line 1293 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkUEAssociatedNRPPaTransport");
@ -11666,7 +11667,7 @@ static const per_sequence_t UplinkUEAssociatedNRPPaTransport_sequence[] = {
static int
dissect_ngap_UplinkUEAssociatedNRPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1480 "./asn1/ngap/ngap.cnf"
#line 1491 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkUEAssociatedNRPPaTransport");
@ -11684,7 +11685,7 @@ static const per_sequence_t DownlinkNonUEAssociatedNRPPaTransport_sequence[] = {
static int
dissect_ngap_DownlinkNonUEAssociatedNRPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1273 "./asn1/ngap/ngap.cnf"
#line 1284 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkNonUEAssociatedNRPPaTransport");
@ -11702,7 +11703,7 @@ static const per_sequence_t UplinkNonUEAssociatedNRPPaTransport_sequence[] = {
static int
dissect_ngap_UplinkNonUEAssociatedNRPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1471 "./asn1/ngap/ngap.cnf"
#line 1482 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkNonUEAssociatedNRPPaTransport");
@ -11720,7 +11721,7 @@ static const per_sequence_t TraceStart_sequence[] = {
static int
dissect_ngap_TraceStart(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1435 "./asn1/ngap/ngap.cnf"
#line 1446 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "TraceStart");
@ -11738,7 +11739,7 @@ static const per_sequence_t TraceFailureIndication_sequence[] = {
static int
dissect_ngap_TraceFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1432 "./asn1/ngap/ngap.cnf"
#line 1443 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "TraceFailureIndication");
@ -11756,7 +11757,7 @@ static const per_sequence_t DeactivateTrace_sequence[] = {
static int
dissect_ngap_DeactivateTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1267 "./asn1/ngap/ngap.cnf"
#line 1278 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DeactivateTrace");
@ -11774,7 +11775,7 @@ static const per_sequence_t CellTrafficTrace_sequence[] = {
static int
dissect_ngap_CellTrafficTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1264 "./asn1/ngap/ngap.cnf"
#line 1275 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "CellTrafficTrace");
@ -11792,7 +11793,7 @@ static const per_sequence_t LocationReportingControl_sequence[] = {
static int
dissect_ngap_LocationReportingControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1330 "./asn1/ngap/ngap.cnf"
#line 1341 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "LocationReportingControl");
@ -11810,7 +11811,7 @@ static const per_sequence_t LocationReportingFailureIndication_sequence[] = {
static int
dissect_ngap_LocationReportingFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1333 "./asn1/ngap/ngap.cnf"
#line 1344 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "LocationReportingFailureIndication");
@ -11828,7 +11829,7 @@ static const per_sequence_t LocationReport_sequence[] = {
static int
dissect_ngap_LocationReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1327 "./asn1/ngap/ngap.cnf"
#line 1338 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "LocationReport");
@ -11846,7 +11847,7 @@ static const per_sequence_t UETNLABindingReleaseRequest_sequence[] = {
static int
dissect_ngap_UETNLABindingReleaseRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1462 "./asn1/ngap/ngap.cnf"
#line 1473 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UETNLABindingReleaseRequest");
@ -11864,7 +11865,7 @@ static const per_sequence_t UERadioCapabilityInfoIndication_sequence[] = {
static int
dissect_ngap_UERadioCapabilityInfoIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1465 "./asn1/ngap/ngap.cnf"
#line 1476 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UERadioCapabilityInfoIndication");
@ -11882,7 +11883,7 @@ static const per_sequence_t UERadioCapabilityCheckRequest_sequence[] = {
static int
dissect_ngap_UERadioCapabilityCheckRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1456 "./asn1/ngap/ngap.cnf"
#line 1467 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UERadioCapabilityCheckRequest");
@ -11900,7 +11901,7 @@ static const per_sequence_t UERadioCapabilityCheckResponse_sequence[] = {
static int
dissect_ngap_UERadioCapabilityCheckResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1459 "./asn1/ngap/ngap.cnf"
#line 1470 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UERadioCapabilityCheckResponse");
@ -11918,7 +11919,7 @@ static const per_sequence_t PrivateMessage_sequence[] = {
static int
dissect_ngap_PrivateMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1399 "./asn1/ngap/ngap.cnf"
#line 1410 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PrivateMessage");
@ -11936,7 +11937,7 @@ static const per_sequence_t SecondaryRATDataUsageReport_sequence[] = {
static int
dissect_ngap_SecondaryRATDataUsageReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1429 "./asn1/ngap/ngap.cnf"
#line 1440 "./asn1/ngap/ngap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "SecondaryRATDataUsageReport");
@ -14108,7 +14109,7 @@ static int dissect_PDUSessionResourceReleaseCommandTransfer_PDU(tvbuff_t *tvb _U
/*--- End of included file: packet-ngap-fn.c ---*/
#line 329 "./asn1/ngap/packet-ngap-template.c"
#line 330 "./asn1/ngap/packet-ngap-template.c"
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
@ -14211,45 +14212,104 @@ dissect_ngap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
return dissect_NGAP_PDU_PDU(tvb, pinfo, ngap_tree, NULL);
}
/* 3GPP TS 29.502 */
/*
* 6.1.6.4.3 N2 SM Information
* N2 SM Information shall encode NG Application Protocol (NGAP) IEs, as specified in subclause 9.3 of 3GPP TS 38.413 [9] (ASN.1 encoded),
* using the vnd.3gpp.ngap content-type.
*/
/* 3GPP TS 29.518 chapter 6.1.6.4.3 */
static int
dissect_ngap_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
dissect_ngap_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
guint protocol_ie_id;
tvbuff_t* json_tvb = (tvbuff_t*)p_get_proto_data(pinfo->pool, pinfo, proto_json, 0);
int ret;
char *json_data;
const char *n2_info_class, *str;
jsmntok_t *tokens, *cur_tok, *n2_info_content_tok;
dissector_handle_t subdissector;
tvbuff_t* json_tvb = (tvbuff_t*)p_get_proto_data(pinfo->pool, pinfo, proto_json, 0);
http_message_info_t *message_info = (http_message_info_t *)data;
if (!json_tvb) {
return 0;
}
/*See if we can find the key"ngapMessageType" in the jason buffer*/
const guint8* start_pos, * curr_pos;
int pos, buf_len = tvb_captured_length(json_tvb);
if (!json_tvb || !message_info || !message_info->content_id)
return 0;
start_pos = tvb_get_ptr(json_tvb, 0, buf_len);
curr_pos = strstr(start_pos, "ngapMessageType");
json_data = tvb_get_string_enc(wmem_packet_scope(), json_tvb, 0, tvb_reported_length(json_tvb), ENC_UTF_8|ENC_NA);
ret = json_parse(json_data, NULL, 0);
if (ret < 0)
return 0;
tokens = wmem_alloc_array(wmem_packet_scope(), jsmntok_t, ret);
if (json_parse(json_data, tokens, ret) < 0)
return 0;
cur_tok = json_get_object(json_data, tokens, "n2InfoContainer");
if (!cur_tok)
return 0;
n2_info_class = json_get_string(json_data, cur_tok, "n2InformationClass");
if (!n2_info_class)
return 0;
if (!strcmp(n2_info_class, "SM")) {
cur_tok = json_get_object(json_data, cur_tok, "smInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "n2InfoContent");
if (!n2_info_content_tok)
return 0;
str = json_get_string(json_data, n2_info_content_tok, "ngapIeType");
if (!str)
return 0;
subdissector = dissector_get_string_handle(ngap_n2_ie_type_dissector_table, str);
} else if (!strcmp(n2_info_class, "RAN")) {
cur_tok = json_get_object(json_data, cur_tok, "ranInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "n2InfoContent");
if (!n2_info_content_tok)
return 0;
str = json_get_string(json_data, n2_info_content_tok, "ngapIeType");
if (!str)
return 0;
subdissector = dissector_get_string_handle(ngap_n2_ie_type_dissector_table, str);
} else if (!strcmp(n2_info_class, "NRPPa")) {
cur_tok = json_get_object(json_data, cur_tok, "nrppaInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "nrppaPdu");
if (!n2_info_content_tok)
return 0;
str = json_get_string(json_data, n2_info_content_tok, "ngapIeType");
if (!str)
return 0;
subdissector = dissector_get_string_handle(ngap_n2_ie_type_dissector_table, str);
} else if (!strcmp(n2_info_class, "PWS") ||
!strcmp(n2_info_class, "PWS-BCAL") ||
!strcmp(n2_info_class, "PWS-RF")) {
gdouble msg_type;
cur_tok = json_get_object(json_data, cur_tok, "pwsInfo");
if (!cur_tok)
return 0;
n2_info_content_tok = json_get_object(json_data, cur_tok, "pwsContainer");
if (!n2_info_content_tok)
return 0;
if (!json_get_double(json_data, n2_info_content_tok, "ngapMessageType", &msg_type))
return 0;
if (!strcmp(n2_info_class, "PWS-BCAL"))
subdissector = dissector_get_uint_handle(ngap_proc_sout_dissector_table, (guint32)msg_type);
else
subdissector = dissector_get_uint_handle(ngap_proc_imsg_dissector_table, (guint32)msg_type);
} else {
subdissector = NULL;
}
if(!curr_pos) {
return 0;
}
curr_pos += 17;
/* Make sure we have enough room*/
pos = (int)(curr_pos - start_pos);
if (buf_len < pos + 2) {
return 0;
}
if (sscanf(curr_pos, "%u", &protocol_ie_id) != 1) {
return 0;
}
return (dissector_try_uint_new(ngap_ies_dissector_table, protocol_ie_id, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
if (subdissector) {
proto_item *ngap_item;
proto_tree *ngap_tree;
cur_tok = json_get_object(json_data, n2_info_content_tok, "ngapData");
if (!cur_tok)
return 0;
str = json_get_string(json_data, cur_tok, "contentId");
if (!str || strcmp(str, message_info->content_id))
return 0;
col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NGAP");
ngap_item = proto_tree_add_item(tree, proto_ngap, tvb, 0, -1, ENC_NA);
ngap_tree = proto_item_add_subtree(ngap_item, ett_ngap);
call_dissector_with_data(subdissector, tvb, pinfo, ngap_tree, NULL);
return tvb_captured_length(tvb);
} else {
return 0;
}
}
/*--- proto_reg_handoff_ngap ---------------------------------------*/
@ -14506,10 +14566,21 @@ proto_reg_handoff_ngap(void)
dissector_add_uint("ngap.proc.imsg", id_UplinkUEAssociatedNRPPaTransport, create_dissector_handle(dissect_UplinkUEAssociatedNRPPaTransport_PDU, proto_ngap));
dissector_add_uint("ngap.proc.imsg", id_WriteReplaceWarning, create_dissector_handle(dissect_WriteReplaceWarningRequest_PDU, proto_ngap));
dissector_add_uint("ngap.proc.sout", id_WriteReplaceWarning, create_dissector_handle(dissect_WriteReplaceWarningResponse_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "PDU_RES_SETUP_REQ", create_dissector_handle(dissect_PDUSessionResourceSetupRequest_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "PDU_RES_REL_CMD", create_dissector_handle(dissect_PDUSessionResourceReleaseCommand_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "PDU_RES_MOD_REQ", create_dissector_handle(dissect_PDUSessionResourceModifyRequest_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "HANDOVER_CMD", create_dissector_handle(dissect_HandoverCommand_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "HANDOVER_REQUIRED", create_dissector_handle(dissect_HandoverRequired_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "HANDOVER_PREP_FAIL", create_dissector_handle(dissect_HandoverPreparationFailure_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "SRC_TO_TAR_CONTAINER", create_dissector_handle(dissect_SourceToTarget_TransparentContainer_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "TAR_TO_SRC_CONTAINER", create_dissector_handle(dissect_TargetToSource_TransparentContainer_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "SON_CONFIG_TRANSFER", create_dissector_handle(dissect_SONConfigurationTransfer_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "NRPPA_PDU", create_dissector_handle(dissect_NRPPa_PDU_PDU, proto_ngap));
dissector_add_string("ngap.n2_ie_type", "UE_RADIO_CAPABILITY", create_dissector_handle(dissect_UERadioCapability_PDU, proto_ngap));
/*--- End of included file: packet-ngap-dis-tab.c ---*/
#line 488 "./asn1/ngap/packet-ngap-template.c"
#line 548 "./asn1/ngap/packet-ngap-template.c"
dissector_add_string("media_type", "application/vnd.3gpp.ngap", ngap_media_type_handle);
} else {
@ -17553,7 +17624,7 @@ void proto_register_ngap(void) {
"UnsuccessfulOutcome_value", HFILL }},
/*--- End of included file: packet-ngap-hfarr.c ---*/
#line 635 "./asn1/ngap/packet-ngap-template.c"
#line 695 "./asn1/ngap/packet-ngap-template.c"
};
/* List of subtrees */
@ -18015,7 +18086,7 @@ void proto_register_ngap(void) {
&ett_ngap_UnsuccessfulOutcome,
/*--- End of included file: packet-ngap-ettarr.c ---*/
#line 665 "./asn1/ngap/packet-ngap-template.c"
#line 725 "./asn1/ngap/packet-ngap-template.c"
};
static ei_register_info ei[] = {
@ -18045,7 +18116,7 @@ void proto_register_ngap(void) {
ngap_proc_imsg_dissector_table = register_dissector_table("ngap.proc.imsg", "NGAP-ELEMENTARY-PROCEDURE InitiatingMessage", proto_ngap, FT_UINT32, BASE_DEC);
ngap_proc_sout_dissector_table = register_dissector_table("ngap.proc.sout", "NGAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", proto_ngap, FT_UINT32, BASE_DEC);
ngap_proc_uout_dissector_table = register_dissector_table("ngap.proc.uout", "NGAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", proto_ngap, FT_UINT32, BASE_DEC);
ngap_n2_ie_type_dissector_table = register_dissector_table("ngap.n2_ie_type", "NGAP N2 IE Type", proto_ngap, FT_STRING, FALSE);
/* Register configuration options for ports */
ngap_module = prefs_register_protocol(proto_ngap, proto_reg_handoff_ngap);

View File

@ -15,6 +15,7 @@
#include "wsjson.h"
#include <string.h>
#include <errno.h>
#include <wsutil/jsmn.h>
#include <wsutil/str_util.h>
#include <wsutil/unicode-utils.h>
@ -69,6 +70,76 @@ json_parse(const char *buf, jsmntok_t *tokens, unsigned int max_tokens)
return jsmn_parse(&p, buf, strlen(buf), tokens, max_tokens);
}
static
jsmntok_t *json_get_next_object(jsmntok_t *cur)
{
int i;
jsmntok_t *next = cur+1;
for (i = 0; i < cur->size; i++) {
next = json_get_next_object(next);
}
return next;
}
jsmntok_t *json_get_object(const char *buf, jsmntok_t *parent, const gchar* name)
{
int i;
jsmntok_t *cur = parent+1;
for (i = 0; i < parent->size; i++) {
if (cur->type == JSMN_STRING &&
!strncmp(&buf[cur->start], name, cur->end - cur->start)
&& strlen(name) == (size_t)(cur->end - cur->start) &&
cur->size == 1 && (cur+1)->type == JSMN_OBJECT) {
return cur+1;
}
cur = json_get_next_object(cur);
}
return NULL;
}
char *json_get_string(char *buf, jsmntok_t *parent, const gchar* name)
{
int i;
jsmntok_t *cur = parent+1;
for (i = 0; i < parent->size; i++) {
if (cur->type == JSMN_STRING &&
!strncmp(&buf[cur->start], name, cur->end - cur->start)
&& strlen(name) == (size_t)(cur->end - cur->start) &&
cur->size == 1 && (cur+1)->type == JSMN_STRING) {
buf[(cur+1)->end] = '\0';
if (!json_decode_string_inplace(&buf[(cur+1)->start]))
return NULL;
return &buf[(cur+1)->start];
}
cur = json_get_next_object(cur);
}
return NULL;
}
gboolean json_get_double(char *buf, jsmntok_t *parent, const gchar* name, gdouble *val)
{
int i;
jsmntok_t *cur = parent+1;
for (i = 0; i < parent->size; i++) {
if (cur->type == JSMN_STRING &&
!strncmp(&buf[cur->start], name, cur->end - cur->start)
&& strlen(name) == (size_t)(cur->end - cur->start) &&
cur->size == 1 && (cur+1)->type == JSMN_PRIMITIVE) {
buf[(cur+1)->end] = '\0';
*val = g_ascii_strtod(&buf[(cur+1)->start], NULL);
if (errno != 0)
return FALSE;
return TRUE;
}
cur = json_get_next_object(cur);
}
return FALSE;
}
gboolean
json_decode_string_inplace(char *text)
{

View File

@ -29,6 +29,25 @@ WS_DLL_PUBLIC gboolean json_validate(const guint8 *buf, const size_t len);
WS_DLL_PUBLIC int json_parse(const char *buf, jsmntok_t *tokens, unsigned int max_tokens);
/**
* Get the pointer to an object belonging to parent object and named as the name variable.
* Returns NULL if not found.
*/
WS_DLL_PUBLIC jsmntok_t *json_get_object(const char *buf, jsmntok_t *parent, const gchar* name);
/**
* Get the unescaped value of a string object belonging to parent object and named as the name variable.
* Returns NULL if not found. Caution: it modifies input buffer.
*/
WS_DLL_PUBLIC char *json_get_string(char *buf, jsmntok_t *parent, const gchar* name);
/**
* Get the value of a number object belonging to parent object and named as the name variable.
* Returns FALSE if not found. Caution: it modifies input buffer.
* Scientific notation not supported yet.
*/
WS_DLL_PUBLIC gboolean json_get_double(char *buf, jsmntok_t *parent, const gchar* name, gdouble *val);
/**
* Decode the contents of a JSON string value by overwriting the input data.
* Returns TRUE on success and FALSE if invalid characters were encountered.