aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/sbc-ap/sbc-ap.cnf
blob: 0f03ef837df3d78b1e797f73ef52164a09776cf7 (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
# sbc-ap.cnf
# sbc-ap conformation file

#.OPT
PER
ALIGNED
#.END

#.EXPORTS

#.PDU
SBC-AP-PDU

#.MAKE_ENUM
ProcedureCode
ProtocolIE-ID

#.NO_EMIT
TBCD-STRING
#.END

#.OMIT_ASSIGNMENT
# Get rid of unused code warnings
ProtocolIE-ContainerList
Presence
Unknown-Tracking-Area-List
NgENB-ID
List-of-5GS-Cells-for-Failure

#.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

ProtocolExtensionField/id ext_id

ProtocolIE-Field/value ie_field_value

#.FN_PARS ProtocolIE-ID  VAL_PTR=&ProtocolIE_ID
#.FN_FTR ProtocolIE-ID
  if (tree) {
    proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str(ProtocolIE_ID, VALS(sbc_ap_ProtocolIE_ID_vals), "unknown (%d)"));
  }
#.END



#.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_PARS ProtocolExtensionID  VAL_PTR=&ProtocolExtensionID
#.FN_PARS ProtocolExtensionField/extensionValue  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_ProtocolExtensionFieldExtensionValue

#.FN_PARS  ProcedureCode  VAL_PTR = &ProcedureCode
#.FN_FTR ProcedureCode
   col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
                   val_to_str(ProcedureCode, sbc_ap_ProcedureCode_vals,
                              "unknown message"));
#.END

#.FN_PARS InitiatingMessage/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_InitiatingMessageValue

#.FN_PARS SuccessfulOutcome/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_SuccessfulOutcomeValue

#.FN_PARS UnsuccessfulOutcome/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_UnsuccessfulOutcomeValue

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

#ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, SBC-AP-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, 0 }
#  };
#  asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
#.END
#ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, SBC-AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
#	SEQUENCE (SIZE (lowerBound..upperBound)) OF
#	ProtocolIE-ContainerPair {{IEsSetParam}}

# following construction is not supported by asn2wrs
# PLMNidentity ::= TBCD-STRING (SIZE (3))
# TBCD-STRING ::= OCTET STRING

#.FN_BODY PLMNidentity  VAL_PTR = parameter_tvb
  tvbuff_t *parameter_tvb=NULL;

  offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
                                       3, 3, FALSE, &parameter_tvb);
    if(tvb_reported_length(tvb)==0)
        return offset;

    if (!parameter_tvb)
        return offset;
    dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
#.END

#.TYPE_ATTR
ProtocolExtensionID TYPE = FT_UINT8  DISPLAY = BASE_DEC STRINGS = VALS(sbc_ap_ProtocolIE_ID_vals)

#.ASSIGN_VALUE_TO_TYPE  # SBC-AP does not have constants assigned to types, they are pure INTEGER
# ProcedureCode
id-Write-Replace-Warning                    ProcedureCode
id-Stop-Warning                             ProcedureCode
id-Error-Indication                         ProcedureCode
id-Write-Replace-Warning-Indication         ProcedureCode
id-Stop-Warning-Indication                  ProcedureCode
id-PWS-Restart-Indication                   ProcedureCode
id-PWS-Failure-Indication                   ProcedureCode

# ProtocolIE-ID

id-Broadcast-Message-Content				ProtocolIE-ID
id-Cause 									ProtocolIE-ID
id-Criticality-Diagnostics					ProtocolIE-ID
id-Data-Coding-Scheme 						ProtocolIE-ID
id-Failure-List 							ProtocolIE-ID
id-Message-Identifier 						ProtocolIE-ID
id-Number-of-Broadcasts-Completed-List 		ProtocolIE-ID
id-Number-of-Broadcasts-Requested 			ProtocolIE-ID
id-Radio-Resource-Loading-List 				ProtocolIE-ID
id-Recovery-Indication 						ProtocolIE-ID
id-Repetition-Period 						ProtocolIE-ID
id-Serial-Number 							ProtocolIE-ID
id-Service-Areas-List 						ProtocolIE-ID
id-TypeOfError								ProtocolIE-ID
id-List-of-TAIs								ProtocolIE-ID
id-Warning-Area-List 						ProtocolIE-ID
id-Warning-Message-Content					ProtocolIE-ID
id-Warning-Security-Information				ProtocolIE-ID
id-Warning-Type								ProtocolIE-ID
id-Omc-Id 									ProtocolIE-ID
id-Concurrent-Warning-Message-Indicator		ProtocolIE-ID
id-Extended-Repetition-Period				ProtocolIE-ID
id-Unknown-Tracking-Area-List				ProtocolIE-ID
id-Broadcast-Scheduled-Area-List			ProtocolIE-ID
id-Send-Write-Replace-Warning-Indication	ProtocolIE-ID
id-Broadcast-Cancelled-Area-List			ProtocolIE-ID
id-Send-Stop-Warning-Indication				ProtocolIE-ID
id-Stop-All-Indicator						ProtocolIE-ID
id-Global-ENB-ID							ProtocolIE-ID
id-Broadcast-Empty-Area-List				ProtocolIE-ID
id-Restarted-Cell-List						ProtocolIE-ID
id-List-of-TAIs-Restart						ProtocolIE-ID
id-List-of-EAIs-Restart						ProtocolIE-ID
id-Failed-Cell-List							ProtocolIE-ID

id-List-of-5GS-TAIs					ProtocolIE-ID
id-Warning-Area-List-5GS				ProtocolIE-ID
id-Global-RAN-Node-ID					ProtocolIE-ID
id-Global-GNB-ID					ProtocolIE-ID
id-RAT-Selector-5GS					ProtocolIE-ID
id-Unknown-5GS-Tracking-Area-List			ProtocolIE-ID
id-Broadcast-Scheduled-Area-List-5GS			ProtocolIE-ID
id-Broadcast-Cancelled-Area-List-5GS			ProtocolIE-ID
id-Broadcast-Empty-Area-List-5GS			ProtocolIE-ID
id-Restarted-Cell-List-NR				ProtocolIE-ID
id-Failed-Cell-List-NR					ProtocolIE-ID
id-List-of-5GS-TAI-for-Restart				ProtocolIE-ID
id-Warning-Area-Coordinates				ProtocolIE-ID

#.REGISTER

#SBC-AP-PROTOCOL-IES

# N sbc_ap.ies id-Broadcast-Message-Content
Cause                                   N sbc_ap.ies id-Cause
Criticality-Diagnostics                 N sbc_ap.ies id-Criticality-Diagnostics
Data-Coding-Scheme                      N sbc_ap.ies id-Data-Coding-Scheme
# N sbc_ap.ies id-Failure-List
Message-Identifier                      N sbc_ap.ies id-Message-Identifier
# id-Number-of-Broadcasts-Completed-List
Number-of-Broadcasts-Requested          N sbc_ap.ies id-Number-of-Broadcasts-Requested
# not used ? N sbc_ap.ies id-Radio-Resource-Loading-List
# not used N sbc_ap.ies id-Recovery-Indication
Repetition-Period                       N sbc_ap.ies id-Repetition-Period
Serial-Number                           N sbc_ap.ies id-Serial-Number
# id-Service-Areas-List
# id-TypeOfError
List-of-TAIs                            N sbc_ap.ies id-List-of-TAIs
Warning-Area-List                       N sbc_ap.ies id-Warning-Area-List
Warning-Message-Content                 N sbc_ap.ies id-Warning-Message-Content
Warning-Security-Information            N sbc_ap.ies id-Warning-Security-Information
Warning-Type                            N sbc_ap.ies id-Warning-Type
Omc-Id                                  N sbc_ap.ies id-Omc-Id
Concurrent-Warning-Message-Indicator    N sbc_ap.ies id-Concurrent-Warning-Message-Indicator
Extended-Repetition-Period              N sbc_ap.ies id-Extended-Repetition-Period
List-of-TAIs                            N sbc_ap.ies id-Unknown-Tracking-Area-List
Broadcast-Scheduled-Area-List           N sbc_ap.ies id-Broadcast-Scheduled-Area-List
Send-Write-Replace-Warning-Indication   N sbc_ap.ies id-Send-Write-Replace-Warning-Indication
Broadcast-Cancelled-Area-List           N sbc_ap.ies id-Broadcast-Cancelled-Area-List
Send-Stop-Warning-Indication            N sbc_ap.ies id-Send-Stop-Warning-Indication
Stop-All-Indicator                      N sbc_ap.ies id-Stop-All-Indicator
Global-ENB-ID                           N sbc_ap.ies id-Global-ENB-ID
Broadcast-Empty-Area-List               N sbc_ap.ies id-Broadcast-Empty-Area-List
Restarted-Cell-List                     N sbc_ap.ies id-Restarted-Cell-List
List-of-TAIs-Restart                    N sbc_ap.ies id-List-of-TAIs-Restart
List-of-EAIs-Restart                    N sbc_ap.ies id-List-of-EAIs-Restart
Failed-Cell-List                        N sbc_ap.ies id-Failed-Cell-List

List-of-5GS-TAIs                        N sbc_ap.extension id-List-of-5GS-TAIs
Warning-Area-List-5GS                   N sbc_ap.extension id-Warning-Area-List-5GS
Global-RAN-Node-ID                      N sbc_ap.extension id-Global-RAN-Node-ID
Global-GNB-ID                           N sbc_ap.extension id-Global-GNB-ID
RAT-Selector-5GS                        N sbc_ap.extension id-RAT-Selector-5GS
Unknown-5GS-Tracking-Area-List          N sbc_ap.extension id-Unknown-5GS-Tracking-Area-List
Broadcast-Scheduled-Area-List-5GS       N sbc_ap.extension id-Broadcast-Scheduled-Area-List-5GS
Broadcast-Cancelled-Area-List-5GS       N sbc_ap.extension id-Broadcast-Cancelled-Area-List-5GS
Broadcast-Empty-Area-List-5GS           N sbc_ap.extension id-Broadcast-Empty-Area-List-5GS
Restarted-Cell-List-NR                  N sbc_ap.extension id-Restarted-Cell-List-NR
Failed-Cell-List-NR                     N sbc_ap.extension id-Failed-Cell-List-NR
List-of-5GS-TAI-for-Restart             N sbc_ap.extension id-List-of-5GS-TAI-for-Restart
Warning-Area-Coordinates                N sbc_ap.ies id-Warning-Area-Coordinates


#SBC-AP-ELEMENTARY-PROCEDURE
Write-Replace-Warning-Request           N sbc_ap.proc.imsg id-Write-Replace-Warning
Write-Replace-Warning-Response          N sbc_ap.proc.sout id-Write-Replace-Warning

Stop-Warning-Request                    N sbc_ap.proc.imsg id-Stop-Warning
Stop-Warning-Response                   N sbc_ap.proc.sout id-Stop-Warning

Error-Indication                        N sbc_ap.proc.imsg id-Error-Indication

Write-Replace-Warning-Indication        N sbc_ap.proc.imsg id-Write-Replace-Warning-Indication

Stop-Warning-Indication                 N sbc_ap.proc.imsg id-Stop-Warning-Indication

PWS-Restart-Indication                  N sbc_ap.proc.imsg id-PWS-Restart-Indication

PWS-Failure-Indication                  N sbc_ap.proc.imsg id-PWS-Failure-Indication

#.END

#.TYPE_ATTR
Message-Identifier TYPE = FT_UINT16 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &lte_rrc_messageIdentifier_vals_ext

#.FN_HDR Write-Replace-Warning-Indication
  col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "Write-Replace-Warning-Indication");
#.FN_HDR Stop-Warning-Indication
  col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "Stop-Warning-Indication");
#.FN_HDR PWS-Restart-Indication
  col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWS-Restart-Indication");
#.FN_HDR PWS-Failure-Indication
  col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWS-Failure-Indication");

#.FN_BODY Message-Identifier VAL_PTR = &parameter_tvb HF_INDEX = -1
  tvbuff_t *parameter_tvb = NULL;
%(DEFAULT_BODY)s
  if (parameter_tvb) {
    actx->created_item = proto_tree_add_item(tree, hf_index, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
  }

#.FN_BODY Serial-Number VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb = NULL;
%(DEFAULT_BODY)s
  if (parameter_tvb) {
    proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_sbc_ap_Serial_Number);
    proto_tree_add_item(subtree, hf_sbc_ap_Serial_Number_gs, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
    proto_tree_add_item(subtree, hf_sbc_ap_Serial_Number_msg_code, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
    proto_tree_add_item(subtree, hf_sbc_ap_Serial_Number_upd_nb, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
  }

#.TYPE_ATTR
Repetition-Period DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_seconds

#.TYPE_ATTR
Extended-Repetition-Period DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_seconds

#.FN_BODY Warning-Type VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb = NULL;
%(DEFAULT_BODY)s
  if (parameter_tvb) {
    proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_sbc_ap_Warning_Type);
    proto_tree_add_item(subtree, hf_sbc_ap_Warning_Type_value, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
    proto_tree_add_item(subtree, hf_sbc_ap_Warning_Type_emergency_user_alert, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
    proto_tree_add_item(subtree, hf_sbc_ap_Warning_Type_popup, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
  }


#.FN_BODY Data-Coding-Scheme VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb = NULL;
%(DEFAULT_BODY)s
  if (parameter_tvb) {
    struct sbc_ap_private_data *sbc_ap_data = sbc_ap_get_private_data(actx->pinfo);
    proto_tree *subtree;

    subtree = proto_item_add_subtree(actx->created_item, ett_sbc_ap_Data_Coding_Scheme);
    sbc_ap_data->data_coding_scheme = dissect_cbs_data_coding_scheme(parameter_tvb, actx->pinfo, subtree, 0);
  }

#.FN_BODY Warning-Message-Content VAL_PTR = &parameter_tvb
  tvbuff_t *parameter_tvb = NULL;
%(DEFAULT_BODY)s
  if (parameter_tvb) {
    struct sbc_ap_private_data *sbc_ap_data = sbc_ap_get_private_data(actx->pinfo);
    proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_sbc_ap_Warning_Message_Contents);
    dissect_s1ap_warningMessageContents(parameter_tvb, subtree, actx->pinfo, sbc_ap_data->data_coding_scheme, hf_sbc_ap_Warning_Message_Contents_nb_pages, hf_sbc_ap_Warning_Message_Contents_decoded_page);
  }


#
# 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:
#