summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/e2ap/e2ap.cnf
blob: 205bdefd2274cee0bf03f71914c06d450e425318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
# e2ap.cnf
# e2ap conformation file

#.OPT
PER
ALIGNED
#.END

#.USE_VALS_EXT
ProcedureCode
ProtocolIE-ID
NI-ProtocolIE-ID

#.EXPORTS ONLY_VALS WS_DLL

#.EXPORTS

#.PDU
E2AP-PDU

E2SM-KPM-EventTriggerDefinition
E2SM-KPM-ActionDefinition
E2SM-KPM-IndicationHeader
E2SM-KPM-IndicationMessage
E2SM-KPM-RANfunction-Description

E2SM-RC-EventTrigger
E2SM-RC-ActionDefinition
E2SM-RC-RANFunctionDefinition
E2SM-RC-IndicationMessage
E2SM-RC-IndicationHeader
E2SM-RC-CallProcessID
E2SM-RC-ControlHeader
E2SM-RC-ControlMessage
E2SM-RC-ControlOutcome
# New for v3
# E2SM-RC-QueryOutcome
# E2SM-RC-QueryDefinition
# E2SM-RC-QueryHeader


E2SM-NI-EventTriggerDefinition
E2SM-NI-ActionDefinition
E2SM-NI-RANfunction-Description
E2SM-NI-IndicationMessage
E2SM-NI-IndicationHeader
E2SM-NI-CallProcessID
E2SM-NI-ControlHeader
E2SM-NI-ControlMessage
E2SM-NI-ControlOutcome


#.MAKE_ENUM
ProcedureCode
ProtocolIE-ID


#.NO_EMIT

#.OMIT_ASSIGNMENT
# Get rid of unused code warnings
ProtocolIE-FieldPair
ProtocolIE-ContainerList
ProtocolIE-ContainerPair
ProtocolIE-ContainerPairList
Presence
FreqBandNrItem
IndexToRFSP
EN-GNB-ID
SubscriberProfileIDforRFP
QoSID
GroupID
CoreCPID

#.END


#.TYPE_ATTR
#E2SM-KPM-IndicationMessage DISPLAY=BASE_DEC STRINGS=VALS(e2ap_E2SM_KPM_IndicationMessage_vals)
#E2SM-KPM-IndicationHeader DISPLAY=BASE_DEC STRINGS=VALS(e2ap_E2SM_KPM_IndicationHeader_vals)

#.TYPE_RENAME

InitiatingMessage/value InitiatingMessage_value
SuccessfulOutcome/value SuccessfulOutcome_value
UnsuccessfulOutcome/value UnsuccessfulOutcome_value

#.FIELD_RENAME

InitiatingMessage/value initiatingMessagevalue
UnsuccessfulOutcome/value unsuccessfulOutcome_value
SuccessfulOutcome/value successfulOutcome_value

#GlobalGNB-ID/gNB-ID globalGNB-ID_gNB-ID


#.FIELD_ATTR
#GlobalGNB-ID/gNB-ID       ABBREV=globalGNB_ID.gNB_ID

#.FN_BODY ProtocolIE-ID VAL_PTR=&e2ap_data->protocol_ie_id
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
%(DEFAULT_BODY)s

#.FN_FTR ProtocolIE-ID
  if (tree) {
    proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s",
                           val_to_str_ext(e2ap_data->protocol_ie_id, &e2ap_ProtocolIE_ID_vals_ext, "unknown (%d)"));
  }
#.END


# TODO: probably not worth it
# #.FN_BODY E2AP-PDU VAL_PTR=&value
#   uint32_t value;
# %(DEFAULT_BODY)s
#   col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(value, e2ap_E2AP_PDU_vals, "Unknown"));



#.FN_PARS ProtocolIE-Field/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_ProtocolIEFieldValue
# Currently not used
# FN_PARS ProtocolIE-FieldPair/firstValue  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_ProtocolIEFieldPairFirstValue
# FN_PARS ProtocolIE-FieldPair/secondValue  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_ProtocolIEFieldPairSecondValue


#.FN_BODY ProcedureCode  VAL_PTR = &e2ap_data->procedure_code
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
%(DEFAULT_BODY)s
  //col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", val_to_str(e2ap_data->procedure_code, e2ap_ProcedureCode_vals, "Unknown"));
#.END



#.FN_PARS InitiatingMessage/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_InitiatingMessageValue
#.FN_HDR InitiatingMessage/value
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->message_type = INITIATING_MESSAGE;
#.FN_PARS SuccessfulOutcome/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_SuccessfulOutcomeValue
#.FN_HDR SuccessfulOutcome/value
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->message_type = SUCCESSFUL_OUTCOME;
#.FN_PARS UnsuccessfulOutcome/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_UnsuccessfulOutcomeValue
#.FN_HDR UnsuccessfulOutcome/value
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->message_type = UNSUCCESSFUL_OUTCOME;

#--- Parameterization is not supported in asn2wrs ---

#ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, e2ap-PROTOCOL-IES : IEsSetParam} ::=
# SEQUENCE (SIZE (lowerBound..upperBound)) OF
# ProtocolIE-Container {{IEsSetParam}}

# #.FN_PARS ProtocolIE-ContainerList
# MIN_VAL = asn1_param_get_integer(%(ACTX)s,"lowerBound")
# MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
# #.FN_HDR ProtocolIE-ContainerList
#   static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
#     { "lowerBound", ASN1_PAR_INTEGER },
#     { "upperBound", ASN1_PAR_INTEGER },
#     { NULL, (asn1_par_type)0 }
#   };
#   asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
# #.END

#ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, e2ap-PROTOCOL-IES-PAIR : IEsSetParam} ::=
# SEQUENCE (SIZE (lowerBound..upperBound)) OF
# ProtocolIE-ContainerPair {{IEsSetParam}}

# Currently not used
# FN_PARS ProtocolIE-ContainerPairList
#MIN_VAL = asn1_param_get_integer(%(ACTX)s,"lowerBound")
#MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
# FN_HDR ProtocolIE-ContainerPairList
#  static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = {
#    { "lowerBound", ASN1_PAR_INTEGER },
#    { "upperBound", ASN1_PAR_INTEGER },
#    { NULL, 0 }
#  };
#  asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars);
# END

#PduSessionResource-IE-ContainerList                  { e2ap-PROTOCOL-IES      : IEsSetParam } ::= ProtocolIE-ContainerList     { 1, maxnoofPduSessionResources,   {IEsSetParam} }
# FN_BODY PduSessionResource-IE-ContainerList
#  asn1_stack_frame_push(%(ACTX)s, "ProtocolIE-ContainerList");
#  asn1_param_push_integer(%(ACTX)s, 1);
#  asn1_param_push_integer(%(ACTX)s, maxnoofE_RABs);
# %(DEFAULT_BODY)s
#  asn1_stack_frame_pop(%(ACTX)s, "ProtocolIE-ContainerList");
# END

# PduSessionResource-IE-ContainerPairList              { e2ap-PROTOCOL-IES-PAIR : IEsSetParam } ::= ProtocolIE-ContainerPairList { 1, maxnoofPduSessionResources,   {IEsSetParam} }
# Currently not used
# FN_BODY SAEB-IE-ContainerPairList
#  asn1_stack_frame_push(%(ACTX)s, "ProtocolIE-ContainerPairList");
#  asn1_param_push_integer(%(ACTX)s, 1);
#  asn1_param_push_integer(%(ACTX)s, maxnoofE_RABs);
#%(DEFAULT_BODY)s
#  asn1_stack_frame_pop(%(ACTX)s, "ProtocolIE-ContainerPairList");
# END

# Currently not used
# ProtocolError-IE-ContainerList        { e2ap-PROTOCOL-IES      : IEsSetParam } ::= ProtocolIE-ContainerList     { 1, maxnoofPduSessionResources,   {IEsSetParam} }
# FN_BODY ProtocolError-IE-ContainerList
#  asn1_stack_frame_push(%(ACTX)s, "ProtocolIE-ContainerList");
#  asn1_param_push_integer(%(ACTX)s, 1);
#  asn1_param_push_integer(%(ACTX)s, maxnoofE_RABs);
#%(DEFAULT_BODY)s
#  asn1_stack_frame_pop(%(ACTX)s, "ProtocolIE-ContainerList");
# END

# .FN_HDR PrivateIE-ID
#  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
#  e2ap_data->obj_id = NULL;

# FN_BODY PrivateIE-ID/global  FN_VARIANT = _str  VAL_PTR = &e2ap_data->obj_id
#  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
# %(DEFAULT_BODY)s

# FN_BODY PrivateIE-Field/value
#  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
#  if (e2ap_data->obj_id) {
#    offset = call_per_oid_callback(e2ap_data->obj_id, tvb, actx->pinfo, tree, offset, actx, hf_index);
#  } else {
# %(DEFAULT_BODY)s
#  }




# #.FN_BODY E2AP-Message VAL_PTR = &parameter_tvb
#  tvbuff_t *parameter_tvb;
#  proto_tree *subtree;
#%(DEFAULT_BODY)s
#  if (!parameter_tvb)
#    return offset;

#  subtree = proto_item_add_subtree(actx->created_item, ett_e2ap_e2ap_Message);
#  col_set_fence(actx->pinfo->cinfo, COL_INFO);
#  call_dissector(e2ap_handle, parameter_tvb, actx->pinfo, subtree);

#.FN_BODY E2SM-KPM-IndicationHeader-Format1/colletStartTime
  int ts_offset = offset;
  %(DEFAULT_BODY)s
  /* Add as a generated field the timestamp decoded */
  const char *time_str = tvb_ntp_fmt_ts_sec(tvb, (ts_offset+7)/8);
  proto_item *ti = proto_tree_add_string(tree, hf_e2ap_timestamp_string, tvb, (ts_offset+7)/8, 4, time_str);
  proto_item_set_generated(ti);


# ################################################################################
# Calling in-depth definitions of E2AP OCTET STRING fields.

#.FN_BODY RANfunctionDefinition  VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;

  /* We know that the next thing is a RANFunction-Name, but it's wrapped up in a sequence,
     so can't silently/hiddenly call ranFunctionName here... */

  %(DEFAULT_BODY)s

  /* Looking for shortName string near beginning of tvb */
  bool found = false;
  /* For each RAN function name.. */
  int n, found_index;
  for (n=KPM_RANFUNCTIONS; n<MAX_RANFUNCTIONS && !found; n++) {
    uint32_t tvb_len = tvb_captured_length(parameter_tvb);
    unsigned name_len = (int)strlen(g_ran_function_name_table[n]);
    /* For each of several byte positions.. */
    for (int m=0; (m<30) && ((m+name_len+1))<tvb_len; m++) {
      /* Have we found a match on the name? */
      if (tvb_strneql(parameter_tvb, m, g_ran_function_name_table[n], name_len) == 0) {
        /* We don't yet know the OID (should be OK),
           so for now just call with the first/only available dissector for this RAN Function name */
        if (g_ran_functions_available_dissectors[n].num_available_dissectors) {
          g_ran_functions_available_dissectors[n].ran_function_dissectors[0]->functions.ran_function_definition_dissector(parameter_tvb, actx->pinfo, tree, NULL);
          found = true;
          found_index = n;
          break;
        }
      }
    }
  }

  if (found && (found_index==CCC_RANFUNCTIONS)) {
    // ranFunctionName, for this ranFunction, is inside the JSON.  Rather than try to retrive it,
    // just use this proxy that ought to appear at the start...  OID should get set in the normal way.
    if (!actx->pinfo->fd->visited) {
      e2ap_store_ran_function_mapping(actx->pinfo, tree, parameter_tvb, "{" /*"ORAN-E2SM-CCC"*/);
    }
  }

  if (!found) {
    proto_item *ti = proto_tree_add_item(tree, hf_e2ap_ran_function_name_not_recognised, tvb, 0, 0, ENC_NA);
    expert_add_info_format(actx->pinfo, ti, &ei_e2ap_ran_function_names_no_match,
                           "ShortName does not match any known Service Model");
  }

#.FN_BODY RANfunction-Name/ranFunction-ShortName VAL_PTR=&value_tvb
  tvbuff_t *value_tvb;
%(DEFAULT_BODY)s
  if (!actx->pinfo->fd->visited) {
    /* N.B. too early to work out exact dissector, as don't have OID yet */
    e2ap_store_ran_function_mapping(actx->pinfo, tree, value_tvb,
                                    tvb_get_string_enc(actx->pinfo->pool, value_tvb, 0, tvb_captured_length(value_tvb), ENC_ASCII));
  }

#.FN_BODY RANfunctionOID  VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  /* Now complete mapping with OID string */
  e2ap_update_ran_function_mapping(actx->pinfo, tree, parameter_tvb,
                                   tvb_get_string_enc(actx->pinfo->pool, parameter_tvb, 0,
                                   tvb_captured_length(parameter_tvb), ENC_ASCII));



# TODO: for these IEs, report as expert info if have RAN Function dissector, but it lacks that IE!

#.FN_BODY RICcontrolHeader VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ric_control_header_dissector) {
      dissector->functions.ric_control_header_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICcontrolMessage VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ric_control_message_dissector) {
      dissector->functions.ric_control_message_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICcontrolOutcome VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ric_control_outcome_dissector) {
        dissector->functions.ric_control_outcome_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICqueryOutcome VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ric_query_outcome_dissector) {
      dissector->functions.ric_query_outcome_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICqueryDefinition VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ric_query_definition_dissector) {
      dissector->functions.ric_query_definition_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICqueryHeader VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ric_query_header_dissector) {
      dissector->functions.ric_query_header_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }



#.FN_BODY RICeventTriggerDefinition VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ran_event_trigger_dissector) {
      dissector->functions.ran_event_trigger_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICactionDefinition VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ran_action_definition_dissector) {
      dissector->functions.ran_action_definition_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICindicationHeader VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ran_indication_header_dissector) {
      dissector->functions.ran_indication_header_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICindicationMessage VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ran_indication_message_dissector) {
      dissector->functions.ran_indication_message_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }

#.FN_BODY RICcallProcessID VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb;
  %(DEFAULT_BODY)s
  ran_function_dissector_t* dissector = lookup_ranfunction_dissector(actx->pinfo, tree, parameter_tvb);
  if (dissector) {
    if (dissector->functions.ran_callprocessid_dissector) {
      dissector->functions.ran_callprocessid_dissector(parameter_tvb, actx->pinfo, tree, NULL);
    }
  }
# ################################################################################



#.ASSIGN_VALUE_TO_TYPE  # e2ap does not have constants assigned to types, they are pure INTEGER
# ProcedureCode

id-E2setup                                   ProcedureCode
id-ErrorIndication                           ProcedureCode
id-Reset                                     ProcedureCode
id-RICcontrol                                ProcedureCode
id-RICindication                             ProcedureCode
id-RICserviceQuery                           ProcedureCode
id-RICserviceUpdate                          ProcedureCode
id-RICsubscription                           ProcedureCode
id-RICsubscriptionDelete                     ProcedureCode
id-E2nodeConfigurationUpdate	             ProcedureCode
id-E2connectionUpdate                        ProcedureCode
id-RICsubscriptionDeleteRequired             ProcedureCode
id-E2removal                                 ProcedureCode
# New for v3
id-RICsubscriptionModification               ProcedureCode
id-RICsubscriptionModificationRequired       ProcedureCode
id-RICquery                                  ProcedureCode



# ProtocolIE-ID
id-Cause                                      ProtocolIE-ID
id-CriticalityDiagnostics                     ProtocolIE-ID
id-GlobalE2node-ID                            ProtocolIE-ID
id-GlobalRIC-ID                               ProtocolIE-ID
id-RANfunctionID                              ProtocolIE-ID
id-RANfunctionID-Item                         ProtocolIE-ID
id-RANfunctionIEcause-Item                    ProtocolIE-ID
id-RANfunction-Item                           ProtocolIE-ID
id-RANfunctionsAccepted                       ProtocolIE-ID
id-RANfunctionsAdded                          ProtocolIE-ID
id-RANfunctionsDeleted                        ProtocolIE-ID
id-RANfunctionsModified                       ProtocolIE-ID
id-RANfunctionsRejected                       ProtocolIE-ID
id-RICaction-Admitted-Item                    ProtocolIE-ID
id-RICactionID                                ProtocolIE-ID
id-RICaction-NotAdmitted-Item                 ProtocolIE-ID
id-RICactions-Admitted                        ProtocolIE-ID
id-RICactions-NotAdmitted                     ProtocolIE-ID
id-RICaction-ToBeSetup-Item                   ProtocolIE-ID
id-RICcallProcessID                           ProtocolIE-ID
id-RICcontrolAckRequest                       ProtocolIE-ID
id-RICcontrolHeader                           ProtocolIE-ID
id-RICcontrolMessage                          ProtocolIE-ID
id-RICcontrolStatus                           ProtocolIE-ID
id-RICindicationHeader                        ProtocolIE-ID
id-RICindicationMessage                       ProtocolIE-ID
id-RICindicationSN                            ProtocolIE-ID
id-RICindicationType                          ProtocolIE-ID
id-RICrequestID                               ProtocolIE-ID
id-RICsubscriptionDetails                     ProtocolIE-ID
id-TimeToWait                                 ProtocolIE-ID
id-RICcontrolOutcome                          ProtocolIE-ID

id-E2nodeComponentConfigUpdate                ProtocolIE-ID
id-E2nodeComponentConfigUpdate-Item           ProtocolIE-ID
id-E2nodeComponentConfigUpdateAck             ProtocolIE-ID
id-E2nodeComponentConfigUpdateAck-Item        ProtocolIE-ID
id-E2connectionSetup                          ProtocolIE-ID
id-E2connectionSetupFailed                    ProtocolIE-ID
id-E2connectionSetupFailed-Item               ProtocolIE-ID
id-E2connectionFailed-Item                    ProtocolIE-ID
id-E2connectionUpdate-Item                    ProtocolIE-ID
id-E2connectionUpdateAdd                      ProtocolIE-ID
id-E2connectionUpdateModify                   ProtocolIE-ID
id-E2connectionUpdateRemove                   ProtocolIE-ID
id-E2connectionUpdateRemove-Item              ProtocolIE-ID
id-TNLinformation                             ProtocolIE-ID
id-TransactionID                              ProtocolIE-ID

id-E2nodeComponentConfigAddition              ProtocolIE-ID
id-E2nodeComponentConfigAddition-Item         ProtocolIE-ID
id-E2nodeComponentConfigAdditionAck           ProtocolIE-ID
id-E2nodeComponentConfigAdditionAck-Item      ProtocolIE-ID
id-E2nodeComponentConfigRemoval               ProtocolIE-ID
id-E2nodeComponentConfigRemoval-Item          ProtocolIE-ID
id-E2nodeComponentConfigRemovalAck            ProtocolIE-ID
id-E2nodeComponentConfigRemovalAck-Item       ProtocolIE-ID
id-E2nodeTNLassociationRemoval                ProtocolIE-ID
id-E2nodeTNLassociationRemoval-Item           ProtocolIE-ID
id-RICsubscriptionToBeRemoved                 ProtocolIE-ID
id-RICsubscription-withCause-Item             ProtocolIE-ID
# New for v3
id-RICsubscriptionStartTime                         ProtocolIE-ID
id-RICsubscriptionEndTime                           ProtocolIE-ID
id-RICeventTriggerDefinitionToBeModified            ProtocolIE-ID
id-RICactionsToBeRemovedForModification-List        ProtocolIE-ID
id-RICaction-ToBeRemovedForModification-Item        ProtocolIE-ID
id-RICactionsToBeModifiedForModification-List       ProtocolIE-ID
id-RICaction-ToBeModifiedForModification-Item       ProtocolIE-ID
id-RICactionsToBeAddedForModification-List          ProtocolIE-ID
id-RICaction-ToBeAddedForModification-Item          ProtocolIE-ID
id-RICactionsRemovedForModification-List            ProtocolIE-ID
id-RICaction-RemovedForModification-Item            ProtocolIE-ID
id-RICactionsFailedToBeRemovedForModification-List  ProtocolIE-ID
id-RICaction-FailedToBeRemovedForModification-Item  ProtocolIE-ID
id-RICactionsModifiedForModification-List           ProtocolIE-ID
id-RICaction-ModifiedForModification-Item           ProtocolIE-ID
id-RICactionsFailedToBeModifiedForModification-List ProtocolIE-ID
id-RICaction-FailedToBeModifiedForModification-Item ProtocolIE-ID
id-RICactionsAddedForModification-List              ProtocolIE-ID
id-RICaction-AddedForModification-Item              ProtocolIE-ID
id-RICactionsFailedToBeAddedForModification-List    ProtocolIE-ID
id-RICaction-FailedToBeAddedForModification-Item    ProtocolIE-ID
id-RICactionsRequiredToBeModified-List              ProtocolIE-ID
id-RICaction-RequiredToBeModified-Item              ProtocolIE-ID
id-RICactionsRequiredToBeRemoved-List               ProtocolIE-ID
id-RICaction-RequiredToBeRemoved-Item               ProtocolIE-ID
id-RICactionsConfirmedForModification-List          ProtocolIE-ID
id-RICaction-ConfirmedForModification-Item          ProtocolIE-ID
id-RICactionsRefusedToBeModified-List               ProtocolIE-ID
id-RICaction-RefusedToBeModified-Item               ProtocolIE-ID
id-RICactionsConfirmedForRemoval-List               ProtocolIE-ID
id-RICaction-ConfirmedForRemoval-Item               ProtocolIE-ID
id-RICactionsRefusedToBeRemoved-List                ProtocolIE-ID
id-RICaction-RefusedToBeRemoved-Item                ProtocolIE-ID
id-RICqueryHeader                                   ProtocolIE-ID
id-RICqueryDefinition                               ProtocolIE-ID
id-RICqueryOutcome                                  ProtocolIE-ID
#.END


#.REGISTER

#E2AP-PROTOCOL-IES

Cause                                       N e2ap.ies id-Cause
CriticalityDiagnostics                      N e2ap.ies id-CriticalityDiagnostics
GlobalE2node-ID                             N e2ap.ies id-GlobalE2node-ID
GlobalRIC-ID                                N e2ap.ies id-GlobalRIC-ID
RANfunctionID                               N e2ap.ies id-RANfunctionID
RANfunctionID-Item                          N e2ap.ies id-RANfunctionID-Item
RANfunctionIDcause-Item                     N e2ap.ies id-RANfunctionIEcause-Item
RANfunction-Item                            N e2ap.ies id-RANfunction-Item
RANfunctionsID-List                         N e2ap.ies id-RANfunctionsAccepted
RANfunctions-List                           N e2ap.ies id-RANfunctionsAdded
RANfunctionsID-List                         N e2ap.ies id-RANfunctionsDeleted
RANfunctions-List                           N e2ap.ies id-RANfunctionsModified
RANfunctionsIDcause-List                    N e2ap.ies id-RANfunctionsRejected
RICaction-Admitted-Item                     N e2ap.ies id-RICaction-Admitted-Item
RICactionID                                 N e2ap.ies id-RICactionID
RICaction-NotAdmitted-Item                  N e2ap.ies id-RICaction-NotAdmitted-Item
RICaction-Admitted-List                     N e2ap.ies id-RICactions-Admitted
RICaction-ToBeSetup-Item                    N e2ap.ies id-RICaction-ToBeSetup-Item
RICcallProcessID                            N e2ap.ies id-RICcallProcessID
RICaction-NotAdmitted-List                  N e2ap.ies id-RICactions-NotAdmitted
RICcontrolAckRequest                        N e2ap.ies id-RICcontrolAckRequest
RICcontrolHeader                            N e2ap.ies id-RICcontrolHeader
RICcontrolMessage                           N e2ap.ies id-RICcontrolMessage
RICcontrolOutcome                           N e2ap.ies id-RICcontrolOutcome
#RICcontrolStatus                            N e2ap.ies id-RICcontrolStatus
RICindicationHeader                         N e2ap.ies id-RICindicationHeader
RICindicationMessage                        N e2ap.ies id-RICindicationMessage
RICindicationSN                             N e2ap.ies id-RICindicationSN
RICindicationType                           N e2ap.ies id-RICindicationType
RICrequestID                                N e2ap.ies id-RICrequestID
RICsubscriptionDetails                      N e2ap.ies id-RICsubscriptionDetails
#RICcontrolHeader                            N e2ap.ies id-RICcontrolHeader
#RICcontrolMessage                           N e2ap.ies id-RICcontrolMessage

TimeToWait                                  N e2ap.ies id-TimeToWait
#RICcontrolOutcome                           N e2ap.ies id-RICcontrolOutcome

E2nodeComponentConfigUpdate-List            N e2ap.ies id-E2nodeComponentConfigUpdate
E2nodeComponentConfigUpdate-Item            N e2ap.ies id-E2nodeComponentConfigUpdate-Item
E2nodeComponentConfigUpdateAck-List         N e2ap.ies id-E2nodeComponentConfigUpdateAck
E2nodeComponentConfigUpdateAck-Item         N e2ap.ies id-E2nodeComponentConfigUpdateAck-Item
E2connectionUpdate-List                     N e2ap.ies id-E2connectionSetup
E2connectionSetupFailed-List                N e2ap.ies id-E2connectionSetupFailed
E2connectionSetupFailed-Item                N e2ap.ies id-E2connectionSetupFailed-Item
#E2connectionSetupFailed-Item               N e2ap.ies id-E2connectionFailed-Item
E2connectionUpdate-Item                     N e2ap.ies id-E2connectionUpdate-Item
E2connectionUpdate-List                     N e2ap.ies id-E2connectionUpdateAdd
E2connectionUpdate-List                     N e2ap.ies id-E2connectionUpdateModify
E2connectionUpdateRemove-List               N e2ap.ies id-E2connectionUpdateRemove
E2connectionUpdateRemove-Item               N e2ap.ies id-E2connectionUpdateRemove-Item
TNLinformation                              N e2ap.ies id-TNLinformation
TransactionID                               N e2ap.ies id-TransactionID

E2nodeComponentConfigAddition-List          N e2ap.ies id-E2nodeComponentConfigAddition
E2nodeComponentConfigAddition-Item          N e2ap.ies id-E2nodeComponentConfigAddition-Item
E2nodeComponentConfigAdditionAck-List       N e2ap.ies id-E2nodeComponentConfigAdditionAck
E2nodeComponentConfigAdditionAck-Item       N e2ap.ies id-E2nodeComponentConfigAdditionAck-Item
E2nodeComponentConfigRemoval-List           N e2ap.ies id-E2nodeComponentConfigRemoval
E2nodeComponentConfigRemoval-Item           N e2ap.ies id-E2nodeComponentConfigRemoval-Item
E2nodeComponentConfigRemovalAck-List        N e2ap.ies id-E2nodeComponentConfigRemovalAck
E2nodeComponentConfigRemovalAck-Item        N e2ap.ies id-E2nodeComponentConfigRemovalAck-Item
E2nodeTNLassociationRemoval-List            N e2ap.ies id-E2nodeTNLassociationRemoval
E2nodeTNLassociationRemoval-Item            N e2ap.ies id-E2nodeTNLassociationRemoval-Item
RICsubscription-List-withCause              N e2ap.ies id-RICsubscriptionToBeRemoved
RICsubscription-withCause-Item              N e2ap.ies id-RICsubscription-withCause-Item

# New for v3
RICsubscriptionTime                         N e2ap.ies id-RICsubscriptionStartTime
RICsubscriptionTime                         N e2ap.ies id-RICsubscriptionEndTime
RICeventTriggerDefinition                   N e2ap.ies id-RICeventTriggerDefinitionToBeModified
RICactions-ToBeRemovedForModification-List  N e2ap.ies id-RICactionsToBeRemovedForModification-List
RICaction-ToBeRemovedForModification-Item   N e2ap.ies id-RICaction-ToBeRemovedForModification-Item
RICactions-ToBeModifiedForModification-List N e2ap.ies id-RICactionsToBeModifiedForModification-List
RICaction-ToBeModifiedForModification-Item  N e2ap.ies id-RICaction-ToBeModifiedForModification-Item
RICactions-ToBeAddedForModification-List    N e2ap.ies id-RICactionsToBeAddedForModification-List
RICaction-ToBeAddedForModification-Item     N e2ap.ies id-RICaction-ToBeAddedForModification-Item
RICactions-RemovedForModification-List      N e2ap.ies id-RICactionsRemovedForModification-List
RICaction-RemovedForModification-Item       N e2ap.ies id-RICaction-RemovedForModification-Item
RICactions-FailedToBeRemovedForModification-List      N e2ap.ies id-RICactionsFailedToBeRemovedForModification-List
RICaction-FailedToBeRemovedForModification-Item       N e2ap.ies id-RICaction-FailedToBeRemovedForModification-Item
RICactions-ModifiedForModification-List               N e2ap.ies id-RICactionsModifiedForModification-List
RICaction-ModifiedForModification-Item                N e2ap.ies id-RICaction-ModifiedForModification-Item
RICactions-FailedToBeModifiedForModification-List     N e2ap.ies id-RICactionsFailedToBeModifiedForModification-List
RICaction-FailedToBeModifiedForModification-Item      N e2ap.ies id-RICaction-FailedToBeModifiedForModification-Item
RICactions-AddedForModification-List                  N e2ap.ies id-RICactionsAddedForModification-List
RICaction-AddedForModification-Item                   N e2ap.ies id-RICaction-AddedForModification-Item
RICactions-FailedToBeAddedForModification-List        N e2ap.ies id-RICactionsFailedToBeAddedForModification-List
RICaction-FailedToBeAddedForModification-Item         N e2ap.ies id-RICaction-FailedToBeAddedForModification-Item
RICactions-RequiredToBeModified-List                  N e2ap.ies id-RICactionsRequiredToBeModified-List
RICaction-RequiredToBeModified-Item                   N e2ap.ies id-RICaction-RequiredToBeModified-Item
RICactions-RequiredToBeRemoved-List                   N e2ap.ies id-RICactionsRequiredToBeRemoved-List
RICaction-RequiredToBeRemoved-Item                    N e2ap.ies id-RICaction-RequiredToBeRemoved-Item
RICactions-ConfirmedForModification-List              N e2ap.ies id-RICactionsConfirmedForModification-List
RICaction-ConfirmedForModification-Item               N e2ap.ies id-RICaction-ConfirmedForModification-Item
RICactions-RefusedToBeModified-List                   N e2ap.ies id-RICactionsRefusedToBeModified-List
RICaction-RefusedToBeModified-Item                    N e2ap.ies id-RICaction-RefusedToBeModified-Item
RICactions-ConfirmedForRemoval-List                   N e2ap.ies id-RICactionsConfirmedForRemoval-List
RICaction-ConfirmedForRemoval-Item                    N e2ap.ies id-RICaction-ConfirmedForRemoval-Item
RICactions-RefusedToBeRemoved-List                    N e2ap.ies id-RICactionsRefusedToBeRemoved-List
RICaction-RefusedToBeRemoved-Item                     N e2ap.ies id-RICaction-RefusedToBeRemoved-Item
RICqueryHeader                                        N e2ap.ies id-RICqueryHeader
RICqueryDefinition                                    N e2ap.ies id-RICqueryDefinition
RICqueryOutcome                                       N e2ap.ies id-RICqueryOutcome

#e2ap-PROTOCOL-EXTENSION

#E2AP-ELEMENTARY-PROCEDURE

E2connectionUpdate                       N e2ap.proc.imsg id-E2connectionUpdate
E2connectionUpdateAcknowledge            N e2ap.proc.sout id-E2connectionUpdate
E2connectionUpdateFailure                N e2ap.proc.uout id-E2connectionUpdate

E2nodeConfigurationUpdate                N e2ap.proc.imsg id-E2nodeConfigurationUpdate
E2nodeConfigurationUpdateAcknowledge     N e2ap.proc.sout id-E2nodeConfigurationUpdate
E2nodeConfigurationUpdateFailure         N e2ap.proc.uout id-E2nodeConfigurationUpdate

E2setupFailure                           N e2ap.proc.uout id-E2setup
E2setupRequest                           N e2ap.proc.imsg id-E2setup
E2setupResponse                          N e2ap.proc.sout id-E2setup

ErrorIndication                          N e2ap.proc.imsg id-ErrorIndication

ResetRequest                             N e2ap.proc.imsg id-Reset
ResetResponse                            N e2ap.proc.sout id-Reset

RICcontrolAcknowledge                    N e2ap.proc.sout id-RICcontrol
RICcontrolFailure                        N e2ap.proc.uout id-RICcontrol
RICcontrolRequest                        N e2ap.proc.imsg id-RICcontrol

RICindication                            N e2ap.proc.imsg id-RICindication

RICserviceQuery                          N e2ap.proc.imsg id-RICserviceQuery

RICserviceUpdate                         N e2ap.proc.imsg id-RICserviceUpdate
RICserviceUpdateAcknowledge              N e2ap.proc.sout id-RICserviceUpdate
RICserviceUpdateFailure                  N e2ap.proc.uout id-RICserviceUpdate

RICsubscriptionFailure                   N e2ap.proc.uout id-RICsubscription
RICsubscriptionRequest                   N e2ap.proc.imsg id-RICsubscription
RICsubscriptionResponse                  N e2ap.proc.sout id-RICsubscription

RICsubscriptionDeleteFailure             N e2ap.proc.uout id-RICsubscriptionDelete
RICsubscriptionDeleteRequest             N e2ap.proc.imsg id-RICsubscriptionDelete
RICsubscriptionDeleteResponse            N e2ap.proc.sout id-RICsubscriptionDelete

RICsubscriptionDeleteRequired            N e2ap.proc.sout id-RICsubscriptionDeleteRequired

E2RemovalFailure                         N e2ap.proc.uout id-E2removal
E2RemovalRequest                         N e2ap.proc.imsg id-E2removal
E2RemovalResponse                        N e2ap.proc.sout id-E2removal

RICsubscriptionModificationFailure       N e2ap.proc.uout id-RICsubscriptionModification
RICsubscriptionModificationRequest       N e2ap.proc.imsg id-RICsubscriptionModification
RICsubscriptionModificationResponse      N e2ap.proc.sout id-RICsubscriptionModification

RICsubscriptionModificationRefuse        N e2ap.proc.uout id-RICsubscriptionModificationRequired
RICsubscriptionModificationRequired      N e2ap.proc.imsg id-RICsubscriptionModificationRequired
RICsubscriptionModificationConfirm       N e2ap.proc.sout id-RICsubscriptionModificationRequired

RICQueryFailure                          N e2ap.proc.uout id-RICquery
RICQueryRequest                          N e2ap.proc.imsg id-RICquery
RICQueryResponse                         N e2ap.proc.sout id-RICquery



#.FN_BODY RANfunctionID VAL_PTR=&value
  uint32_t value;
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->ran_function_id = value;


#.FN_BODY GlobalgNB-ID/gnb-id
  int start_offset = offset;
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  /* Limit length, but really can't be > 5 bytes.. */
  e2ap_data->gnb_id_len = MIN((offset-start_offset)/8, MAX_GNB_ID_BYTES);
  tvb_memcpy(tvb, &e2ap_data->gnb_id_bytes, start_offset/8, e2ap_data->gnb_id_len);
  update_conversation_from_gnb_id(actx);



#.FN_BODY TNLinformation/tnlAddress VAL_PTR=&value_tvb
  tvbuff_t *value_tvb;
%(DEFAULT_BODY)s
  if (tvb_captured_length(value_tvb)==4) {
    proto_item_append_text(tree, " (%%s", tvb_ip_to_str(actx->pinfo->pool, value_tvb, 0));
  }
  else {
    proto_item_append_text(tree, " (%%s", tvb_ip6_to_str(actx->pinfo->pool, value_tvb, 0));
  }

#.FN_BODY TNLinformation/tnlPort
  proto_item_append_text(tree, ":%%u)", tvb_get_ntohs(tvb, offset/8));
%(DEFAULT_BODY)s


#.FN_BODY E2nodeComponentConfiguration/e2nodeComponentRequestPart VAL_PTR=&value_tvb
  tvbuff_t *value_tvb;
%(DEFAULT_BODY)s
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  if (e2ap_data->component_configuration_dissector) {
    col_append_str(actx->pinfo->cinfo, COL_PROTOCOL, "|");
    col_set_fence(actx->pinfo->cinfo, COL_PROTOCOL);
    col_set_writable(actx->pinfo->cinfo, COL_INFO, false);
    call_dissector(e2ap_data->component_configuration_dissector, value_tvb, actx->pinfo, tree);
    col_set_writable(actx->pinfo->cinfo, COL_INFO, true);
  }

#.FN_BODY E2nodeComponentConfiguration/e2nodeComponentResponsePart VAL_PTR=&value_tvb
  tvbuff_t *value_tvb;
%(DEFAULT_BODY)s
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  if (e2ap_data->component_configuration_dissector) {
    col_set_writable(actx->pinfo->cinfo, COL_INFO, false);
    call_dissector(e2ap_data->component_configuration_dissector, value_tvb, actx->pinfo, tree);
    col_set_writable(actx->pinfo->cinfo, COL_INFO, true);
  }


#.FN_BODY E2nodeComponentID/e2nodeComponentInterfaceTypeNG
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->component_configuration_dissector = find_dissector("ngap");

#.FN_BODY E2nodeComponentID/e2nodeComponentInterfaceTypeXn
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->component_configuration_dissector = find_dissector("xnap");

#.FN_BODY E2nodeComponentID/e2nodeComponentInterfaceTypeE1
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->component_configuration_dissector = find_dissector("e1ap");

#.FN_BODY E2nodeComponentID/e2nodeComponentInterfaceTypeF1
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->component_configuration_dissector = find_dissector("f1ap");

# There is not yet a dissector for W1AP..

#.FN_BODY E2nodeComponentID/e2nodeComponentInterfaceTypeS1
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->component_configuration_dissector = find_dissector("s1ap");

#.FN_BODY E2nodeComponentID/e2nodeComponentInterfaceTypeX2
%(DEFAULT_BODY)s
  /* Store value in packet-private data */
  struct e2ap_private_data *e2ap_data = e2ap_get_private_data(actx->pinfo);
  e2ap_data->component_configuration_dissector = find_dissector("x2ap");



# Set labels and update stats for the various message types

#.FN_HDR E2connectionUpdate
  set_message_label(actx, MTYPE_E2_CONNECTION_UPDATE);
  set_stats_message_type(actx->pinfo, MTYPE_E2_CONNECTION_UPDATE);


#.FN_HDR E2connectionUpdateAcknowledge
  set_message_label(actx, MTYPE_E2_CONNECTION_UPDATE_ACK);
  set_stats_message_type(actx->pinfo, MTYPE_E2_CONNECTION_UPDATE_ACK);

#.FN_HDR E2connectionUpdateFailure
  set_message_label(actx, MTYPE_E2_CONNECTION_UPDATE_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_E2_CONNECTION_UPDATE_FAIL);


#.FN_HDR E2nodeConfigurationUpdate
  set_message_label(actx, MTYPE_E2_CONFIGURATION_UPDATE_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_E2_CONFIGURATION_UPDATE_FAIL);


#.FN_HDR E2nodeConfigurationUpdateAcknowledge
  set_message_label(actx, MTYPE_E2_CONFIGURATION_UPDATE_ACK);
  set_stats_message_type(actx->pinfo, MTYPE_E2_CONFIGURATION_UPDATE_ACK);

#.FN_HDR E2nodeConfigurationUpdateFailure
  set_message_label(actx, MTYPE_E2_CONFIGURATION_UPDATE_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_E2_CONFIGURATION_UPDATE_FAIL);


#.FN_HDR E2setupFailure
  set_message_label(actx, MTYPE_E2_SETUP_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_E2_SETUP_FAIL);

#.FN_HDR E2setupRequest
  set_message_label(actx, MTYPE_E2_SETUP_REQUEST);
  set_stats_message_type(actx->pinfo, MTYPE_E2_SETUP_REQUEST);

#.FN_HDR E2setupResponse
  set_message_label(actx, MTYPE_E2_SETUP_RESPONSE);
  set_stats_message_type(actx->pinfo, MTYPE_E2_SETUP_RESPONSE);



#.FN_HDR ErrorIndication
  set_message_label(actx, MTYPE_ERROR_INDICATION);
  set_stats_message_type(actx->pinfo, MTYPE_ERROR_INDICATION);


#.FN_HDR ResetRequest
  set_message_label(actx, MTYPE_RESET_REQUEST);
  set_stats_message_type(actx->pinfo, MTYPE_RESET_REQUEST);

#.FN_HDR ResetResponse
  set_message_label(actx, MTYPE_RESET_RESPONSE);
  set_stats_message_type(actx->pinfo, MTYPE_RESET_RESPONSE);


#.FN_HDR RICcontrolAcknowledge
  set_message_label(actx, MTYPE_RIC_CONTROL_ACK);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_CONTROL_ACK);

#.FN_HDR RICcontrolFailure
  set_message_label(actx, MTYPE_RIC_CONTROL_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_CONTROL_FAIL);

#.FN_HDR RICcontrolRequest
  set_message_label(actx, MTYPE_RIC_CONTROL_REQUEST);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_CONTROL_REQUEST);


#.FN_HDR RICindication
  set_message_label(actx, MTYPE_RIC_IND);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_IND);


#.FN_HDR RICserviceQuery
  set_message_label(actx, MTYPE_RIC_SERVICE_QUERY);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SERVICE_QUERY);


#.FN_HDR RICserviceUpdate
  set_message_label(actx, MTYPE_RIC_SERVICE_UPDATE);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SERVICE_UPDATE);

#.FN_HDR RICserviceUpdateAcknowledge
  set_message_label(actx, MTYPE_RIC_SERVICE_UPDATE_ACK);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SERVICE_UPDATE_ACK);

#.FN_HDR RICserviceUpdateFailure
  set_message_label(actx, MTYPE_RIC_SERVICE_UPDATE_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SERVICE_UPDATE_FAIL);



#.FN_HDR RICsubscriptionFailure
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_FAIL);

#.FN_HDR RICsubscriptionRequest
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_REQUEST);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_REQUEST);

#.FN_HDR RICsubscriptionResponse
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_RESPONSE);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_RESPONSE);



#.FN_HDR RICsubscriptionDeleteFailure
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_DELETE_FAIL);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_DELETE_FAIL);

#.FN_HDR RICsubscriptionDeleteRequest
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_DELETE_REQUEST);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_DELETE_REQUEST);

#.FN_HDR RICsubscriptionDeleteResponse
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_DELETE_RESPONSE);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_DELETE_RESPONSE);

#.FN_HDR RICsubscriptionDeleteRequired
  set_message_label(actx, MTYPE_RIC_SUBSCRIPTION_DELETE_REQUIRED);
  set_stats_message_type(actx->pinfo, MTYPE_RIC_SUBSCRIPTION_DELETE_REQUIRED);


#
# Editor modelines  -  https://www.wireshark.org/tools/modelines.html
#
# Local variables:
# c-basic-offset: 2
# tab-width: 8
# indent-tabs-mode: nil
# End:
#
# vi: set shiftwidth=2 tabstop=8 expandtab:
# :indentSize=2:tabSize=8:noTabs=true:
#