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
|
# hnbap.cnf
# hnbap conformation file
# Copyright 2010 Neil Piercy, ip.access Limited <Neil.Piercy@ipaccess.com>
#.OPT
PER
ALIGNED
#.END
#.PDU
HNBAP-PDU
#.MAKE_ENUM
ProtocolIE-ID
ProcedureCode
#.TYPE_RENAME
ProtocolIE-Field/value ProtocolIE_Field_value
PrivateIE-Field/value PrivateIE_Field_value
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
PrivateIE-Field/value private_value
ProtocolIE-Field/value ie_field_value
ProtocolIE-Field/id protocol_ie_field_id
PrivateIE-Field/id private_ie_field_id
GeographicalLocation/geographicalCoordinates geographical_location_geographical_coordinates
HNB-Location-Information/geographicalCoordinates hnb_location_information_geographical_coordinates
MacroCoverageInformation/cellIdentity macroCellID
#.OMIT_ASSIGNMENT
Presence
ProtocolIE-ContainerList
ProtocolIE-Single-Container
#.END
#.NO_EMIT
AccessResult
#.END
#.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(hnbap_ProtocolIE_ID_vals), "unknown (%d)"));
}
#.END
#.FN_PARS ProtocolIE-Field/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolIEFieldValue
#.FN_PARS ProtocolExtensionField/extensionValue FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolExtensionFieldExtensionValue
#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode
#.FN_FTR ProcedureCode
if (strcmp(val_to_str_const(ProcedureCode, hnbap_ProcedureCode_vals, "Unknown"), "Unknown") == 0) {
col_set_str(actx->pinfo->cinfo, COL_INFO,
"Unknown Message");
} /* Known Procedures should be included below and broken out as ELEMENTARY names to avoid confusion */
#.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
# There is no protocol inside HNBAP so fill col info with HNBAP elementary procedure name
#.FN_BODY HNBRegisterRequest
col_set_str(actx->pinfo->cinfo, COL_INFO,
"HNB_REGISTER_REQUEST ");
%(DEFAULT_BODY)s
#.FN_BODY HNBRegisterAccept
col_set_str(actx->pinfo->cinfo, COL_INFO,
"HNB_REGISTER_ACCEPT ");
%(DEFAULT_BODY)s
#.FN_BODY HNBRegisterReject
col_set_str(actx->pinfo->cinfo, COL_INFO,
"HNB_REGISTER_REJECT ");
%(DEFAULT_BODY)s
#.FN_BODY UERegisterRequest
col_set_str(actx->pinfo->cinfo, COL_INFO,
"UE_REGISTER_REQUEST ");
%(DEFAULT_BODY)s
#.FN_BODY UERegisterAccept
col_set_str(actx->pinfo->cinfo, COL_INFO,
"UE_REGISTER_ACCEPT ");
%(DEFAULT_BODY)s
#.FN_BODY UERegisterReject
col_set_str(actx->pinfo->cinfo, COL_INFO,
"UE_REGISTER_REJECT ");
%(DEFAULT_BODY)s
#.FN_BODY UEDe-Register
col_set_str(actx->pinfo->cinfo, COL_INFO,
"UE_DE-REGISTER ");
%(DEFAULT_BODY)s
#.FN_BODY HNBDe-Register
col_set_str(actx->pinfo->cinfo, COL_INFO,
"HNB_DE-REGISTER ");
%(DEFAULT_BODY)s
#.FN_BODY ErrorIndication
col_set_str(actx->pinfo->cinfo, COL_INFO,
"ERROR_INDICATION ");
col_set_fence(actx->pinfo->cinfo, COL_INFO); /* Protect info from CriticalityDiagnostics decodes */
%(DEFAULT_BODY)s
#.FN_BODY CSGMembershipUpdate
col_set_str(actx->pinfo->cinfo, COL_INFO,
"CSG_MEMBERSHIP_UPDATE_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY PrivateMessage
col_set_str(actx->pinfo->cinfo, COL_INFO,
"PRIVATE_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY TNLUpdateRequest
col_set_str(actx->pinfo->cinfo, COL_INFO,
"TNL_UPDATE_REQUEST_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY TNLUpdateResponse
col_set_str(actx->pinfo->cinfo, COL_INFO,
"TNL_UPDATE_RESPONSE_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY TNLUpdateFailure
col_set_str(actx->pinfo->cinfo, COL_INFO,
"TNL_UPDATE_FAILURE_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY HNBConfigTransferRequest
col_set_str(actx->pinfo->cinfo, COL_INFO,
"HNB_CONFIG_TRANSFER_REQUEST_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY HNBConfigTransferResponse
col_set_str(actx->pinfo->cinfo, COL_INFO,
"HNB_CONFIG_TRANSFER_RESPONSE_MESSAGE ");
%(DEFAULT_BODY)s
#.FN_BODY RelocationComplete
col_set_str(actx->pinfo->cinfo, COL_INFO,
"RELOCATION_COMPLETE_MESSAGE ");
%(DEFAULT_BODY)s
#.END
#.FN_BODY IMSI VAL_PTR = ¶meter_tvb
tvbuff_t *parameter_tvb;
%(DEFAULT_BODY)s
if (parameter_tvb) {
proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_hnbap_imsi);
dissect_e212_imsi(parameter_tvb, actx->pinfo, subtree, 0, tvb_reported_length(parameter_tvb), false);
}
#.FN_BODY PLMNidentity VAL_PTR = ¶meter_tvb
tvbuff_t *parameter_tvb;
struct hnbap_private_data *hnbap_data = hnbap_get_private_data(actx->pinfo);
e212_number_type_t number_type = hnbap_data->number_type;
hnbap_data->number_type = E212_NONE;
%(DEFAULT_BODY)s
if (parameter_tvb) {
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, number_type, false);
}
#.END
#.FN_BODY CGI
struct hnbap_private_data *hnbap_data = hnbap_get_private_data(actx->pinfo);
hnbap_data->number_type = E212_CGI;
%(DEFAULT_BODY)s
#.FN_BODY LAI
struct hnbap_private_data *hnbap_data = hnbap_get_private_data(actx->pinfo);
/* The RAI is defined in the ASN.1 as the LAI plus the RAC; don't override
* the MNC/MCC field types in that case.
*/
if (hnbap_data->number_type != E212_RAI) {
hnbap_data->number_type = E212_LAI;
}
%(DEFAULT_BODY)s
#.TYPE_ATTR
LAC TYPE = FT_UINT16 DISPLAY = BASE_DEC_HEX
#.FN_BODY LAC VAL_PTR = ¶meter_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 RAI
struct hnbap_private_data *hnbap_data = hnbap_get_private_data(actx->pinfo);
hnbap_data->number_type = E212_RAI;
%(DEFAULT_BODY)s
#.TYPE_ATTR
RAC TYPE = FT_UINT8 DISPLAY = BASE_DEC_HEX
#.FN_BODY RAC VAL_PTR = ¶meter_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, 1, ENC_BIG_ENDIAN);
}
#.TYPE_ATTR
SAC TYPE = FT_UINT16 DISPLAY = BASE_DEC_HEX
#.FN_BODY SAC VAL_PTR = ¶meter_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);
}
#.ASSIGN_VALUE_TO_TYPE # HNBAP ASN.1 does not have constants assigned to types
# ProcedureCode
id-HNBRegister ProcedureCode
id-HNBDe-Register ProcedureCode
id-UERegister ProcedureCode
id-UEDe-Register ProcedureCode
id-ErrorIndication ProcedureCode
id-privateMessage ProcedureCode
id-CSGMembershipUpdate ProcedureCode
id-TNLUpdate ProcedureCode
id-HNBConfigTransfer ProcedureCode
id-RelocationComplete ProcedureCode
# ProtocolIE-ID
id-Cause ProtocolIE-ID
id-CriticalityDiagnostics ProtocolIE-ID
id-HNB-Identity ProtocolIE-ID
id-Context-ID ProtocolIE-ID
id-UE-Identity ProtocolIE-ID
id-LAC ProtocolIE-ID
id-RAC ProtocolIE-ID
id-HNB-Location-Information ProtocolIE-ID
id-PLMNidentity ProtocolIE-ID
id-SAC ProtocolIE-ID
id-CellIdentity ProtocolIE-ID
id-Registration-Cause ProtocolIE-ID
id-UE-Capabilities ProtocolIE-ID
id-RNC-ID ProtocolIE-ID
id-CSG-ID ProtocolIE-ID
id-BackoffTimer ProtocolIE-ID
id-HNB-Internet-Information ProtocolIE-ID
id-HNB-Cell-Access-Mode ProtocolIE-ID
id-MuxPortNumber ProtocolIE-ID
id-Service-Area-For-Broadcast ProtocolIE-ID
id-CSGMembershipStatus ProtocolIE-ID
id-RABList ProtocolIE-ID
id-HNBConfigInfo ProtocolIE-ID
id-AccessResult ProtocolIE-ID
id-Update-cause ProtocolIE-ID
id-NeighbourInfoList ProtocolIE-ID
id-NeighbourInfoRequestList ProtocolIE-ID
id-Iurh-Signalling-TNL-Address ProtocolIE-ID
id-PSC ProtocolIE-ID
id-HNB-Cell-Identifier ProtocolIE-ID
#.END
#.REGISTER
#HNBAP-PROTOCOL-IES
Cause N hnbap.ies id-Cause
CriticalityDiagnostics N hnbap.ies id-CriticalityDiagnostics
HNB-Identity N hnbap.ies id-HNB-Identity
Context-ID N hnbap.ies id-Context-ID
UE-Identity N hnbap.ies id-UE-Identity
LAC N hnbap.ies id-LAC
RAC N hnbap.ies id-RAC
HNB-Location-Information N hnbap.ies id-HNB-Location-Information
PLMNidentity N hnbap.ies id-PLMNidentity
SAC N hnbap.ies id-SAC
CellIdentity N hnbap.ies id-CellIdentity
Registration-Cause N hnbap.ies id-Registration-Cause
UE-Capabilities N hnbap.ies id-UE-Capabilities
RNC-ID N hnbap.ies id-RNC-ID
CSG-ID N hnbap.ies id-CSG-ID
BackoffTimer N hnbap.ies id-BackoffTimer
CSGMembershipStatus N hnbap.ies id-CSGMembershipStatus
RABList N hnbap.ies id-RABList
# id-HNBConfigInfo
# id-AccessResult
Update-cause N hnbap.ies id-Update-cause
NeighbourInfoList N hnbap.ies id-NeighbourInfoList
NeighbourInfoRequestList N hnbap.ies id-NeighbourInfoRequestList
# id-HNB-Cell-Identifier
#HNBAP-PROTOCOL-EXTENSION
IP-Address N hnbap.extension id-HNB-Internet-Information
HNB-Cell-Access-Mode N hnbap.extension id-HNB-Cell-Access-Mode
MuxPortNumber N hnbap.extension id-MuxPortNumber
CSGMembershipStatus N hnbap.extension id-CSGMembershipStatus
IP-Address N hnbap.extension id-Iurh-Signalling-TNL-Address
PSC N hnbap.extension id-PSC
#HNBAP-ELEMENTARY-PROCEDURE
#CLASS 1
HNBRegisterRequest N hnbap.proc.imsg id-HNBRegister
HNBRegisterAccept N hnbap.proc.sout id-HNBRegister
HNBRegisterReject N hnbap.proc.uout id-HNBRegister
UERegisterRequest N hnbap.proc.imsg id-UERegister
UERegisterAccept N hnbap.proc.sout id-UERegister
UERegisterReject N hnbap.proc.uout id-UERegister
TNLUpdateRequest N hnbap.proc.imsg id-TNLUpdate
TNLUpdateResponse N hnbap.proc.sout id-TNLUpdate
TNLUpdateFailure N hnbap.proc.uout id-TNLUpdate
HNBConfigTransferRequest N hnbap.proc.imsg id-HNBConfigTransfer
HNBConfigTransferResponse N hnbap.proc.sout id-HNBConfigTransfer
RelocationComplete N hnbap.proc.imsg id-RelocationComplete
#CLASS 2
UEDe-Register N hnbap.proc.imsg id-UEDe-Register
HNBDe-Register N hnbap.proc.imsg id-HNBDe-Register
ErrorIndication N hnbap.proc.imsg id-ErrorIndication
CSGMembershipUpdate N hnbap.proc.imsg id-CSGMembershipUpdate
PrivateMessage N hnbap.proc.imsg id-privateMessage
#.END
|