/src/wireshark/epan/dissectors/packet-h248_q1950.c
Line | Count | Source |
1 | | /* |
2 | | * packet-h248_q1950.c |
3 | | * Q.1950 annex A |
4 | | * |
5 | | * (c) 2006, Anders Broman <anders.broman@ericsson.com> |
6 | | * |
7 | | * Wireshark - Network traffic analyzer |
8 | | * By Gerald Combs <gerald@wireshark.org> |
9 | | * Copyright 1998 Gerald Combs |
10 | | * |
11 | | * SPDX-License-Identifier: GPL-2.0-or-later |
12 | | * |
13 | | * Ref ITU-T Rec. Q.1950 (12/2002) |
14 | | */ |
15 | | |
16 | | #include "config.h" |
17 | | |
18 | | #include <epan/packet.h> |
19 | | #include <epan/asn1.h> |
20 | | |
21 | | #include "packet-ber.h" |
22 | | #include "packet-isup.h" |
23 | | #include "packet-h248.h" |
24 | | |
25 | | void proto_reg_handoff_q1950(void); |
26 | | void proto_register_q1950(void); |
27 | | |
28 | 14 | #define PNAME "H.248 Q.1950 Annex A" |
29 | 14 | #define PSNAME "H248Q1950" |
30 | 14 | #define PFNAME "h248q1950" |
31 | | |
32 | | static int proto_q1950; |
33 | | static bool implicit; |
34 | | |
35 | | /* A.3 Bearer characteristics package */ |
36 | | static int hf_h248_pkg_BCP; |
37 | | static int hf_h248_pkg_BCP_BNCChar; |
38 | | |
39 | | static int ett_h248_pkg_BCP; |
40 | | |
41 | | static const value_string h248_pkg_BCP_parameters[] _U_ = { |
42 | | { 0x0001, "BNCChar (BNC Characteristics)" }, |
43 | | {0, NULL} |
44 | | }; |
45 | | |
46 | | static const value_string h248_pkg_BCP_props_vals[] = { |
47 | | {0, "Bearer Characteristics Q.1950 Annex A (bcp)" }, |
48 | | {1, "BNC Characteristics (BNCChar)"}, |
49 | | {0,NULL} |
50 | | }; |
51 | | |
52 | | /* Properties */ |
53 | | static const h248_pkg_param_t h248_pkg_BCP_props[] = { |
54 | | { 0x0001, &hf_h248_pkg_BCP_BNCChar, h248_param_ber_integer, &implicit }, |
55 | | { 0, NULL, NULL, NULL} |
56 | | }; |
57 | | |
58 | | /* Packet definitions */ |
59 | | static h248_package_t h248_pkg_BCP = { |
60 | | 0x001e, |
61 | | &hf_h248_pkg_BCP, |
62 | | &ett_h248_pkg_BCP, |
63 | | h248_pkg_BCP_props_vals, |
64 | | NULL, |
65 | | NULL, |
66 | | NULL, |
67 | | h248_pkg_BCP_props, /* Properties */ |
68 | | NULL, /* signals */ |
69 | | NULL, /* events */ |
70 | | NULL /* statistics */ |
71 | | }; |
72 | | |
73 | | /* A.4 Bearer Network connection cut-through package */ |
74 | | static int hf_h248_pkg_BNCCT; |
75 | | |
76 | | static int hf_h248_pkg_BNCCT_prop; |
77 | | |
78 | | static int ett_h248_pkg_BNCCT; |
79 | | |
80 | | #if 0 |
81 | | static const value_string h248_pkg_BNCCT_parameters[] _U_ = { |
82 | | { 0x0001, "BNC Cut Through Capability" }, |
83 | | { 0, NULL } |
84 | | }; |
85 | | #endif |
86 | | |
87 | | static const value_string h248_pkg_BNCCT_props_vals[] = { |
88 | | {0,"Bearer Network Connection Cut Q.1950 Annex A" }, |
89 | | {1,"BNCCT"}, |
90 | | {0,NULL} |
91 | | }; |
92 | | |
93 | | static const value_string h248_pkg_BNCCT_prop_vals[] = { |
94 | | {1,"Early"}, |
95 | | {2,"Late"}, |
96 | | {0,NULL} |
97 | | }; |
98 | | |
99 | | /* Properties */ |
100 | | static const h248_pkg_param_t h248_pkg_BNCCT_props[] = { |
101 | | { 0x0001, &hf_h248_pkg_BNCCT_prop, h248_param_ber_integer, &implicit }, |
102 | | { 0, NULL, NULL, NULL} |
103 | | }; |
104 | | |
105 | | /* Packet definitions */ |
106 | | static h248_package_t h248_pkg_BNCCT = { |
107 | | 0x001f, |
108 | | &hf_h248_pkg_BNCCT, |
109 | | &ett_h248_pkg_BNCCT, |
110 | | h248_pkg_BNCCT_props_vals, |
111 | | NULL, |
112 | | NULL, |
113 | | NULL, |
114 | | h248_pkg_BNCCT_props, /* Properties */ |
115 | | NULL, /* signals */ |
116 | | NULL, /* events */ |
117 | | NULL /* statistics */ |
118 | | }; |
119 | | |
120 | | /* A.5 Bearer Reuse Idle Package */ |
121 | | static int hf_h248_pkg_RI; |
122 | | |
123 | | static int hf_h248_pkg_RII; |
124 | | |
125 | | static int ett_h248_pkg_RI; |
126 | | |
127 | | static const value_string h248_pkg_RI_parameters[] = { |
128 | | { 0x0000, "Reuse Idle Q.1950 Annex A" }, |
129 | | { 0x0001, "Reuse Idle Indication" }, |
130 | | { 0, NULL } |
131 | | }; |
132 | | |
133 | | static const value_string h248_pkg_RII_vals[] = { |
134 | | {0,"Not_Reuse_Idle"}, |
135 | | {1,"ReUse_Idle"}, |
136 | | {0,NULL} |
137 | | }; |
138 | | |
139 | | /* Properties */ |
140 | | static const h248_pkg_param_t h248_pkg_RI_props[] = { |
141 | | { 0x0001, &hf_h248_pkg_RII, h248_param_ber_integer, &implicit }, |
142 | | { 0, NULL, NULL, NULL} |
143 | | }; |
144 | | |
145 | | /* Packet definitions */ |
146 | | static h248_package_t h248_pkg_RI = { |
147 | | 0x0020, |
148 | | &hf_h248_pkg_RI, |
149 | | &ett_h248_pkg_RI, |
150 | | h248_pkg_RI_parameters, |
151 | | NULL, |
152 | | NULL, |
153 | | NULL, |
154 | | h248_pkg_RI_props, /* Properties */ |
155 | | NULL, /* signals */ |
156 | | NULL, /* events */ |
157 | | NULL /* statistics */ |
158 | | }; |
159 | | |
160 | | |
161 | | /* A.5 Bearer Reuse Idle Package */ |
162 | | |
163 | | /* A.6 Generic bearer connection package |
164 | | Package Name: GB |
165 | | Package ID: 0x0021 |
166 | | */ |
167 | | |
168 | | static int hf_h248_pkg_GB; |
169 | | static int hf_h248_pkg_GB_BNCChange; |
170 | | static int hf_h248_pkg_GB_BNCChange_type; |
171 | | static int hf_h248_pkg_GB_EstBNC; |
172 | | static int hf_h248_pkg_GB_ModBNC; |
173 | | static int hf_h248_pkg_GB_RelBNC; |
174 | | static int hf_h248_pkg_GB_RelBNC_Generalcause; |
175 | | static int hf_h248_pkg_GB_RelBNC_Failurecause; |
176 | | static int hf_h248_pkg_GB_RelBNC_Reset; |
177 | | |
178 | | static int ett_h248_pkg_GB; |
179 | | static int ett_h248_pkg_GB_EstBNC; |
180 | | static int ett_h248_pkg_GB_ModBNC; |
181 | | static int ett_h248_pkg_GB_RelBNC; |
182 | | static int ett_h248_pkg_GB_BNCChange; |
183 | | |
184 | | static const value_string h248_pkg_GB_events_vals[] = { |
185 | | { 0x0001, "BNCChange" }, |
186 | | { 0, NULL } |
187 | | }; |
188 | | |
189 | | |
190 | | static const value_string h248_pkg_GB_BNCChange_type_vals[] = { |
191 | | {0x01, "Bearer Established"}, |
192 | | {0x02,"Bearer Modified"}, |
193 | | {0x03,"Bearer Cut through"}, |
194 | | {0x04,"Bearer Modification Failure"}, |
195 | | {0,NULL} |
196 | | }; |
197 | | |
198 | | static const value_string h248_pkg_GB_BNCChange_params_vals[] = { |
199 | | {0x01, "Type"}, |
200 | | {0,NULL} |
201 | | }; |
202 | | |
203 | | static const h248_pkg_param_t h248_pkg_GB_BNCChange_pars[] = { |
204 | | { 0x0001, &hf_h248_pkg_GB_BNCChange_type, h248_param_ber_integer, &implicit }, |
205 | | { 0, NULL, NULL, NULL} |
206 | | }; |
207 | | |
208 | | static const h248_pkg_evt_t h248_pkg_GB_events[] = { |
209 | | { 0x0001, &hf_h248_pkg_GB_BNCChange, &ett_h248_pkg_GB_BNCChange, h248_pkg_GB_BNCChange_pars, h248_pkg_GB_BNCChange_params_vals}, |
210 | | { 0, NULL, NULL, NULL, NULL} |
211 | | }; |
212 | | |
213 | | static const value_string h248_pkg_GB_signals_vals[] = { |
214 | | {0x01, "Establish BNC"}, |
215 | | {0x02, "Modify BNC"}, |
216 | | {0,NULL} |
217 | | }; |
218 | | |
219 | | static const value_string h248_pkg_GB_RelBNC_vals[] = { |
220 | | {0x01, "Generalcause"}, |
221 | | {0x02, "Failurecause"}, |
222 | | {0x03, "Reset"}, |
223 | | {0,NULL} |
224 | | }; |
225 | | |
226 | | static const value_string h248_pkg_GB_RelBNC_Generalcause_vals[] = { |
227 | | {0x01, "Normal Release"}, |
228 | | {0x02, "Unavailable Resources"}, |
229 | | {0x03, "Failure, Temporary"}, |
230 | | {0x04, "Failure, Permanent"}, |
231 | | {0x05, "Interworking Error"}, |
232 | | {0x06, "Unsupported"}, |
233 | | {0,NULL} |
234 | | }; |
235 | | |
236 | | static const h248_pkg_param_t h248_pkg_GB_RelBNC_pars[] = { |
237 | | { 0x0001, &hf_h248_pkg_GB_RelBNC_Generalcause, h248_param_ber_integer, &implicit }, |
238 | | { 0x0002, &hf_h248_pkg_GB_RelBNC_Failurecause, h248_param_ber_octetstring, &implicit }, |
239 | | { 0x0003, &hf_h248_pkg_GB_RelBNC_Reset, h248_param_ber_boolean, &implicit }, |
240 | | { 0, NULL, NULL, NULL} |
241 | | }; |
242 | | |
243 | | |
244 | | static const h248_pkg_sig_t h248_pkg_GB_signals[] = { |
245 | | { 0x0001,&hf_h248_pkg_GB_EstBNC,&ett_h248_pkg_GB_EstBNC, NULL, NULL}, |
246 | | { 0x0002,&hf_h248_pkg_GB_ModBNC,&ett_h248_pkg_GB_ModBNC, NULL, NULL}, |
247 | | { 0x0003,&hf_h248_pkg_GB_RelBNC,&ett_h248_pkg_GB_RelBNC, h248_pkg_GB_RelBNC_pars, h248_pkg_GB_RelBNC_vals}, |
248 | | { 0, NULL, NULL, NULL, NULL} |
249 | | }; |
250 | | |
251 | | static const value_string h248_pkg_GB_props_vals[] = { |
252 | | { 0x0000, "Generic Bearer Connection Q.1950 Annex A (gb)" }, |
253 | | { 0, NULL } |
254 | | }; |
255 | | |
256 | | static h248_package_t h248_pkg_GB = { |
257 | | 0x0021, |
258 | | &hf_h248_pkg_GB, |
259 | | &ett_h248_pkg_GB, |
260 | | h248_pkg_GB_props_vals, |
261 | | h248_pkg_GB_signals_vals, |
262 | | h248_pkg_GB_events_vals, |
263 | | NULL, |
264 | | NULL, /* Properties */ |
265 | | h248_pkg_GB_signals, /* signals */ |
266 | | h248_pkg_GB_events, /* events */ |
267 | | NULL /* statistics */ |
268 | | }; |
269 | | |
270 | | |
271 | | /* A.7 Bearer control tunnelling package */ |
272 | | static dissector_handle_t bctp_dissector; |
273 | | |
274 | | static int hf_h248_pkg_bt; |
275 | | static int hf_h248_pkg_bt_tind; |
276 | | static int hf_h248_pkg_bt_tunopt; |
277 | | static int hf_h248_pkg_bt_bit; |
278 | | |
279 | | static int ett_h248_pkg_bt; |
280 | | static int ett_h248_pkg_bt_tind; |
281 | | static int ett_h248_pkg_bt_bit; |
282 | | |
283 | 0 | static void dissect_bt_tunneled_proto(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* i _U_, void* d _U_) { |
284 | 0 | tvbuff_t* bctp_tvb = NULL; |
285 | 0 | int8_t appclass; |
286 | 0 | bool pc; |
287 | 0 | int32_t tag; |
288 | 0 | asn1_ctx_t asn1_ctx; |
289 | |
|
290 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); |
291 | |
|
292 | 0 | get_ber_identifier(tvb, 0, &appclass, &pc, &tag); |
293 | | |
294 | | /* XXX: is this enough to guess it? */ |
295 | 0 | if (tag == BER_UNI_TAG_OCTETSTRING) { |
296 | 0 | dissect_ber_octet_string(false, &asn1_ctx, tree, tvb, 0, hfid, &bctp_tvb); |
297 | |
|
298 | 0 | if (bctp_tvb) { |
299 | 0 | call_dissector(bctp_dissector,bctp_tvb,pinfo,tree); |
300 | 0 | } |
301 | 0 | } else { |
302 | 0 | proto_tree_add_item(tree,hfid,tvb,0,-1,ENC_NA); |
303 | 0 | } |
304 | |
|
305 | 0 | } |
306 | | |
307 | | |
308 | | /* Properties */ |
309 | | static const value_string h248_pkg_bt_props_vals[] = { |
310 | | { 0, "Bearer Control Tunnelling Q.1950 Annex A" }, |
311 | | { 1, "Tunnelling Options"}, |
312 | | { 0, NULL} |
313 | | }; |
314 | | |
315 | | static const value_string h248_pkg_bt_tunopt_vals[] = { |
316 | | { 1, "1 (In the same message as the command response to the command which generated the bearer control tunnel)"}, |
317 | | { 2, "2 (Tunnel message at any time)"}, |
318 | | { 3, "NO"}, |
319 | | { 0, NULL} |
320 | | }; |
321 | | |
322 | | static const h248_pkg_param_t h248_pkg_bt_props[] = { |
323 | | { 0x0001, &hf_h248_pkg_bt_tunopt, h248_param_ber_integer, &implicit }, |
324 | | { 0, NULL, NULL, NULL} |
325 | | }; |
326 | | |
327 | | /* Events */ |
328 | | static const value_string h248_pkg_bt_evt_vals[] = { |
329 | | {1,"Tunnel indication"}, |
330 | | {0,NULL} |
331 | | }; |
332 | | |
333 | | static const value_string h248_pkg_bt_tind_vals[] = { |
334 | | {1,"Tunnel Indication"}, |
335 | | {0,NULL} |
336 | | }; |
337 | | |
338 | | static const h248_pkg_param_t h248_pkg_bt_bit_params[] = { |
339 | | { 0x0001, &hf_h248_pkg_bt_bit, dissect_bt_tunneled_proto, &implicit }, |
340 | | { 0, NULL, NULL, NULL} |
341 | | }; |
342 | | |
343 | | static const value_string h248_pkg_bt_sigs_vals[] = { |
344 | | {1,"Bearer Information Tunnel"}, |
345 | | {0,NULL} |
346 | | }; |
347 | | |
348 | | static const h248_pkg_evt_t h248_pkg_bt_events[] = { |
349 | | { 0x0001, &hf_h248_pkg_bt_tind, &ett_h248_pkg_bt_tind, h248_pkg_bt_bit_params, h248_pkg_bt_tind_vals}, |
350 | | { 0, NULL, NULL, NULL, NULL} |
351 | | }; |
352 | | |
353 | | static const h248_pkg_sig_t h248_pkg_bt_signals[] = { |
354 | | { 0x0001,&hf_h248_pkg_bt_bit,&ett_h248_pkg_bt_bit, h248_pkg_bt_bit_params, h248_pkg_bt_tind_vals}, |
355 | | { 0, NULL, NULL, NULL, NULL} |
356 | | }; |
357 | | |
358 | | /* Packet definitions */ |
359 | | static h248_package_t h248_pkg_bct = { |
360 | | 0x0022, |
361 | | &hf_h248_pkg_bt, |
362 | | &ett_h248_pkg_bt, |
363 | | h248_pkg_bt_props_vals, |
364 | | h248_pkg_bt_sigs_vals, |
365 | | h248_pkg_bt_evt_vals, |
366 | | NULL, |
367 | | h248_pkg_bt_props, /* Properties */ |
368 | | h248_pkg_bt_signals, /* signals */ |
369 | | h248_pkg_bt_events, /* events */ |
370 | | NULL /* statistics */ |
371 | | }; |
372 | | |
373 | | /* A.8 Basic call progress tones generator with directionality */ |
374 | | static int hf_h248_pkg_bcg; |
375 | | static int hf_h248_pkg_bcg_sig_bdt_par_btd; |
376 | | static int hf_h248_pkg_bcg_sig_bdt; |
377 | | static int hf_h248_pkg_bcg_sig_brt; |
378 | | static int hf_h248_pkg_bcg_sig_bbt; |
379 | | static int hf_h248_pkg_bcg_sig_bct; |
380 | | static int hf_h248_pkg_bcg_sig_bsit; |
381 | | static int hf_h248_pkg_bcg_sig_bwt; |
382 | | static int hf_h248_pkg_bcg_sig_bpt; |
383 | | static int hf_h248_pkg_bcg_sig_bcw; |
384 | | static int hf_h248_pkg_bcg_sig_bcr; |
385 | | static int hf_h248_pkg_bcg_sig_bpy; |
386 | | |
387 | | static int ett_h248_pkg_bcg; |
388 | | static int ett_h248_pkg_bcg_sig_bdt; |
389 | | |
390 | | static const value_string h248_pkg_bcg_sig_bdt_par_btd_vals[] = { |
391 | | { 0x0001, "ext (External)" }, |
392 | | { 0x0002, "int (Internal)" }, |
393 | | { 0x0003, "both (Both)" }, |
394 | | {0, NULL}, |
395 | | }; |
396 | | |
397 | | static const h248_pkg_param_t h248_pkg_h248_pkg_bcg_sig_bdt_params[] = { |
398 | | { 0x0001, &hf_h248_pkg_bcg_sig_bdt_par_btd, h248_param_ber_integer, &implicit }, |
399 | | { 0, NULL, NULL, NULL} |
400 | | }; |
401 | | |
402 | | static const value_string h248_pkg_bcg_signals_vals[] = { |
403 | | { 0x0040, "Dial Tone (bdt)" }, |
404 | | { 0x0041, "Ringing Tone (brt)" }, |
405 | | { 0x0042, "Busy Tone (bbt)" }, |
406 | | { 0x0043, "Congestion Tone (bct)" }, |
407 | | { 0x0044, "Special information tone (bsit)" }, |
408 | | { 0x0045, "Warning Tone (bwt)" }, |
409 | | { 0x0046, "Payphone Recognition Tone (bpt)" }, |
410 | | { 0x0047, "Call Waiting Tone (bcw)" }, |
411 | | { 0x0048, "Caller Waiting Tone (bcr)" }, |
412 | | { 0x0049, "Pay Tone (bpy)" }, |
413 | | { 0, NULL } |
414 | | }; |
415 | | |
416 | | static const h248_pkg_sig_t h248_pkg_bcg_signals[] = { |
417 | | /* All the tones have the same parameters */ |
418 | | { 0x0040, &hf_h248_pkg_bcg_sig_bdt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
419 | | { 0x0041, &hf_h248_pkg_bcg_sig_brt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
420 | | { 0x0042, &hf_h248_pkg_bcg_sig_bbt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
421 | | { 0x0043, &hf_h248_pkg_bcg_sig_bct, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
422 | | { 0x0044, &hf_h248_pkg_bcg_sig_bsit, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
423 | | { 0x0045, &hf_h248_pkg_bcg_sig_bwt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL}, |
424 | | { 0x0046, &hf_h248_pkg_bcg_sig_bpt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
425 | | { 0x0047, &hf_h248_pkg_bcg_sig_bcw, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
426 | | { 0x0048, &hf_h248_pkg_bcg_sig_bcr, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
427 | | { 0x0049, &hf_h248_pkg_bcg_sig_bpy, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params, NULL }, |
428 | | { 0, NULL, NULL, NULL,NULL} |
429 | | }; |
430 | | |
431 | | static const value_string h248_pkg_bcg_props_vals[] = { |
432 | | { 0, "Basic Call Progress Tones Q.1950 Annex A" }, |
433 | | { 0, NULL } |
434 | | }; |
435 | | |
436 | | /* Packet definitions */ |
437 | | static h248_package_t h248_pkg_bcg = { |
438 | | 0x0023, |
439 | | &hf_h248_pkg_bcg, |
440 | | &ett_h248_pkg_bcg, |
441 | | h248_pkg_bcg_props_vals, |
442 | | h248_pkg_bcg_signals_vals, |
443 | | NULL, |
444 | | NULL, |
445 | | NULL, /* Properties */ |
446 | | h248_pkg_bcg_signals, /* signals */ |
447 | | NULL, /* events */ |
448 | | NULL /* statistics */ |
449 | | }; |
450 | | |
451 | | |
452 | 14 | void proto_reg_handoff_q1950(void) { |
453 | 14 | bctp_dissector = find_dissector_add_dependency("bctp", proto_q1950); |
454 | | |
455 | 14 | } |
456 | | |
457 | | /* Register dissector */ |
458 | 14 | void proto_register_q1950(void) { |
459 | 14 | static hf_register_info hf[] = { |
460 | | /* A.3 Bearer characteristics package */ |
461 | 14 | { &hf_h248_pkg_BCP, |
462 | 14 | { "BCP (Bearer characteristics package)", "h248.BCP", |
463 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
464 | 14 | }, |
465 | 14 | { &hf_h248_pkg_BCP_BNCChar, |
466 | 14 | { "BNCChar (BNC Characteristics)", "h248.bcp.bncchar", |
467 | 14 | FT_UINT32, BASE_HEX|BASE_EXT_STRING, &bearer_network_connection_characteristics_vals_ext, 0, "BNC Characteristics", HFILL } |
468 | 14 | }, |
469 | | |
470 | | /* A.4 Bearer Network connection cut-through package */ |
471 | 14 | { &hf_h248_pkg_BNCCT, |
472 | 14 | { "BNCCT (Bearer network connection cut-through package)", "h248.BNCCT", |
473 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
474 | 14 | }, |
475 | 14 | { &hf_h248_pkg_BNCCT_prop, |
476 | 14 | { "Bearer network connection cut-through capability", "h248.bcp.bncct", |
477 | 14 | FT_UINT32, BASE_HEX, VALS(h248_pkg_BNCCT_prop_vals), 0, "This property allows the MGC to ask the MG when the cut through of a bearer will occur, early or late.", HFILL } |
478 | 14 | }, |
479 | | |
480 | 14 | { &hf_h248_pkg_GB, |
481 | 14 | { "GB (Generic bearer connection)", "h248.GB", |
482 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
483 | 14 | }, |
484 | 14 | { &hf_h248_pkg_GB_BNCChange, |
485 | 14 | { "BNCChange", "h248.GB.BNCChang", |
486 | 14 | FT_BYTES, BASE_NONE, NULL, 0, "This event occurs whenever a change to a Bearer Network connection occurs", HFILL } |
487 | 14 | }, |
488 | 14 | { &hf_h248_pkg_GB_BNCChange_type, |
489 | 14 | { "Type", "h248.GB.BNCChang.Type", |
490 | 14 | FT_UINT32, BASE_HEX, VALS(h248_pkg_GB_BNCChange_type_vals), 0, NULL, HFILL } |
491 | 14 | }, |
492 | 14 | { &hf_h248_pkg_GB_EstBNC, |
493 | 14 | { "Type", "h248.GB.BNCChang.EstBNC", |
494 | 14 | FT_BYTES, BASE_NONE, NULL, 0, "This signal triggers the bearer control function to send bearer establishment signalling", HFILL } |
495 | 14 | }, |
496 | 14 | { &hf_h248_pkg_GB_ModBNC, |
497 | 14 | { "Type", "h248.GB.BNCChang.ModBNC", |
498 | 14 | FT_BYTES, BASE_NONE, NULL, 0, "This signal triggers the bearer control function to send bearer modification", HFILL } |
499 | 14 | }, |
500 | 14 | { &hf_h248_pkg_GB_RelBNC, |
501 | 14 | { "RelBNC", "h248.GB.BNCChang.RelBNC", |
502 | 14 | FT_BYTES, BASE_NONE, NULL, 0, "This signal triggers the bearer control function to send bearer release", HFILL } |
503 | 14 | }, |
504 | 14 | { &hf_h248_pkg_GB_RelBNC_Generalcause, |
505 | 14 | { "Generalcause", "h248.GB.BNCChang.RelBNC.Generalcause", |
506 | 14 | FT_UINT32, BASE_HEX, VALS(h248_pkg_GB_RelBNC_Generalcause_vals), 0, "This indicates the general reason for the Release", HFILL } |
507 | 14 | }, |
508 | 14 | { &hf_h248_pkg_GB_RelBNC_Failurecause, |
509 | 14 | { "Failurecause", "h248.GB.BNCChang.RelBNC.Failurecause", |
510 | 14 | FT_BYTES, BASE_NONE, NULL, 0, "The Release Cause is the value generated by the Released equipment", HFILL } |
511 | 14 | }, |
512 | 14 | { &hf_h248_pkg_GB_RelBNC_Reset, |
513 | 14 | { "RelBNC", "h248.GB.BNCChang.RelBNC.Reset", |
514 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, "This signal triggers the bearer control function to send bearer release", HFILL } |
515 | 14 | }, |
516 | | |
517 | | /* A.5 Bearer Network connection cut-through package */ |
518 | 14 | { &hf_h248_pkg_RI, |
519 | 14 | { "RI (Reuse idle package)", "h248.RI", |
520 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
521 | 14 | }, |
522 | 14 | { &hf_h248_pkg_RII, |
523 | 14 | { "Reuse Idle Indication", "h248.bcp.rii", |
524 | 14 | FT_UINT32, BASE_HEX, VALS(h248_pkg_RII_vals), 0, "This property indicates that the provided bearer network connection relates to an Idle Bearer.", HFILL } |
525 | 14 | }, |
526 | | |
527 | | /* A.7 Bearer control tunnelling package */ |
528 | 14 | { &hf_h248_pkg_bt, |
529 | 14 | { "BT (Bearer control Tunneling)", "h248.BT", |
530 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
531 | 14 | }, |
532 | 14 | { &hf_h248_pkg_bt_tunopt, |
533 | 14 | { "Tunnelling Options", "h248.BT.TunOpt", |
534 | 14 | FT_UINT32, BASE_DEC, VALS(h248_pkg_bt_tunopt_vals), 0, NULL, HFILL } |
535 | 14 | }, |
536 | 14 | { &hf_h248_pkg_bt_tind, |
537 | 14 | { "tind (Tunnel INDication)", "h248.BT.TIND", |
538 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
539 | 14 | }, |
540 | 14 | { &hf_h248_pkg_bt_bit, |
541 | 14 | { "Bearer Information Transport", "h248.BT.BIT", |
542 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
543 | 14 | }, |
544 | | |
545 | | |
546 | | /* A.8 Basic call progress tones generator with directionality */ |
547 | 14 | { &hf_h248_pkg_bcg, |
548 | 14 | { "bcg (Basic call progress tones generator with directionality)", "h248.bcg", |
549 | 14 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } |
550 | 14 | }, |
551 | 14 | { &hf_h248_pkg_bcg_sig_bdt_par_btd, |
552 | 14 | { "btd (Tone Direction)", "h248.bcp.btd", |
553 | 14 | FT_UINT32, BASE_HEX, VALS(h248_pkg_bcg_sig_bdt_par_btd_vals), 0, NULL, HFILL } |
554 | 14 | }, |
555 | 14 | { &hf_h248_pkg_bcg_sig_bdt, |
556 | 14 | { "bdt (Dial Tone)", "h248.bcg.bdt", |
557 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
558 | 14 | }, |
559 | 14 | { &hf_h248_pkg_bcg_sig_brt, |
560 | 14 | { "brt (Ringing tone)", "h248.bcg.brt", |
561 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
562 | 14 | }, |
563 | 14 | { &hf_h248_pkg_bcg_sig_bbt, |
564 | 14 | { "bbt (Busy tone)", "h248.bcg.bbt", |
565 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
566 | 14 | }, |
567 | 14 | { &hf_h248_pkg_bcg_sig_bct, |
568 | 14 | { "bct (Congestion tone)", "h248.bcg.bct", |
569 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
570 | 14 | }, |
571 | 14 | { &hf_h248_pkg_bcg_sig_bsit, |
572 | 14 | { "bsit (Special information tone)", "h248.bcg.bsit", |
573 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
574 | 14 | }, |
575 | 14 | { &hf_h248_pkg_bcg_sig_bwt, |
576 | 14 | { "bwt (Warning tone)", "h248.bcg.bwt", |
577 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
578 | 14 | }, |
579 | 14 | { &hf_h248_pkg_bcg_sig_bpt, |
580 | 14 | { "bpt (Payphone recognition tone)", "h248.bcg.bpt", |
581 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
582 | 14 | }, |
583 | 14 | { &hf_h248_pkg_bcg_sig_bcw, |
584 | 14 | { "bcw (Call waiting tone)", "h248.bcg.bcw", |
585 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
586 | 14 | }, |
587 | 14 | { &hf_h248_pkg_bcg_sig_bcr, |
588 | 14 | { "bcr (Call ringing tone)", "h248.bcg.bcr", |
589 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
590 | 14 | }, |
591 | 14 | { &hf_h248_pkg_bcg_sig_bpy, |
592 | 14 | { "bpy (Pay tone)", "h248.bcg.bpy", |
593 | 14 | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } |
594 | 14 | }, |
595 | 14 | }; |
596 | | |
597 | 14 | static int *ett[] = { |
598 | 14 | &ett_h248_pkg_BCP, |
599 | 14 | &ett_h248_pkg_bt, |
600 | 14 | &ett_h248_pkg_bt_tind, |
601 | 14 | &ett_h248_pkg_bt_bit, |
602 | 14 | &ett_h248_pkg_bcg, |
603 | 14 | &ett_h248_pkg_bcg_sig_bdt, |
604 | 14 | &ett_h248_pkg_BNCCT, |
605 | 14 | &ett_h248_pkg_RI, |
606 | 14 | &ett_h248_pkg_GB, |
607 | 14 | &ett_h248_pkg_GB_EstBNC, |
608 | 14 | &ett_h248_pkg_GB_ModBNC, |
609 | 14 | &ett_h248_pkg_GB_RelBNC, |
610 | 14 | &ett_h248_pkg_GB_BNCChange |
611 | 14 | }; |
612 | | |
613 | 14 | proto_q1950 = proto_register_protocol(PNAME, PSNAME, PFNAME); |
614 | | |
615 | 14 | proto_register_field_array(proto_q1950, hf, array_length(hf)); |
616 | | |
617 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
618 | | |
619 | | /* Register the packages */ |
620 | 14 | h248_register_package(&h248_pkg_BCP,REPLACE_PKG); |
621 | 14 | h248_register_package(&h248_pkg_BNCCT,REPLACE_PKG); |
622 | 14 | h248_register_package(&h248_pkg_RI,REPLACE_PKG); |
623 | 14 | h248_register_package(&h248_pkg_GB,REPLACE_PKG); |
624 | 14 | h248_register_package(&h248_pkg_bcg,REPLACE_PKG); |
625 | 14 | h248_register_package(&h248_pkg_bct,REPLACE_PKG); |
626 | | |
627 | 14 | } |
628 | | |
629 | | /* |
630 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
631 | | * |
632 | | * Local variables: |
633 | | * c-basic-offset: 4 |
634 | | * tab-width: 8 |
635 | | * indent-tabs-mode: nil |
636 | | * End: |
637 | | * |
638 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
639 | | * :indentSize=4:tabSize=8:noTabs=true: |
640 | | */ |