MSWSP: fix dissect_mswsp_smb()
[wireshark-wip.git] / epan / dissectors / packet-h248_annex_e.c
blob346d400f9a22fc8a0207e26f643f13f68ecb2206
1 /*
2 * packet-h248-annex_e.c
3 * H.248 Annex E
5 * (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
7 * $Id$
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #include "config.h"
31 /*****/
32 #include <epan/proto.h>
33 #include <epan/tvbuff.h>
34 #include <epan/tvbuff-int.h>
35 #include <epan/tvbparse.h>
36 /*****/
38 #include "packet-h248.h"
39 #define PNAME "H.248 Annex E"
40 #define PSNAME "H248E"
41 #define PFNAME "h248e"
43 #include <epan/dissectors/packet-alcap.h>
45 static int proto_h248_annex_E = -1;
47 static gboolean h248_e_implicit = FALSE;
48 static gboolean implicit = FALSE;
50 /* H.248.1 E.1 Generic Package */
51 static int hf_h248_pkg_generic = -1;
52 static int hf_h248_pkg_generic_cause_evt = -1;
53 static int hf_h248_pkg_generic_cause_gencause = -1;
54 static int hf_h248_pkg_generic_cause_failurecause = -1;
55 static int hf_h248_pkg_generic_sc_evt = -1;
56 static int hf_h248_pkg_generic_sc_sig_id = -1;
57 static int hf_h248_pkg_generic_sc_meth = -1;
58 static int hf_h248_pkg_generic_sc_slid = -1;
59 static int hf_h248_pkg_generic_sc_rid = -1;
61 static gint ett_h248_pkg_generic_cause_evt = -1;
62 static gint ett_h248_pkg_generic = -1;
63 static gint ett_h248_pkg_generic_sc_evt = -1;
65 static const value_string h248_pkg_generic_props_vals[] = {
66 { 0,"Generic Package - Annex E (g)" },
67 { 0, NULL }
70 static const value_string h248_pkg_generic_cause_vals[] _U_ = {
71 {1, "General Cause (gencause)"},
72 {2, "Faiure Cause (failurecause)"},
73 { 0, NULL }
76 static const value_string h248_pkg_generic_cause_gencause_vals[] = {
77 { 1, "Normal Release (NR)"},
78 { 2, "Unavailable Resources (UR)"},
79 { 3, "Failure, Temporary (FT)"},
80 { 4, "Failure, Permanent (FP)"},
81 { 5, "Interworking Error (IW)"},
82 { 6, "Unsupported (UN)"},
83 { 0, NULL }
86 static h248_pkg_param_t h248_pkg_generic_cause_evt_params[] = {
87 { 0x0001, &hf_h248_pkg_generic_cause_gencause, h248_param_ber_integer, &h248_e_implicit },
88 { 0x0002, &hf_h248_pkg_generic_cause_failurecause, h248_param_ber_octetstring, &h248_e_implicit },
89 { 0, NULL, NULL, NULL}
92 static const value_string h248_pkg_generic_sc_meth_vals[] _U_ = {
93 {0x0001,"Signal Identity (SigID)"},
94 {0x0002,"Termination Method (Meth)"},
95 {0x0003,"Signal List ID (SLID)"},
96 {0x0004,"Request ID (RID)"},
97 {0,NULL}
100 static const value_string h248_pkg_generic_sc_vals[] = {
101 {0x0001,"TO - Signal timed out or otherwise completed on its own"},
102 {0x0002,"EV - Interrupted by event"},
103 {0x0003,"SD - Halted by new Signals Descriptor"},
104 {0x0004,"NC - Not completed, other cause"},
105 {0x0005,"PI - First to penultimate iteration"},
106 {0,NULL}
109 static h248_pkg_param_t h248_pkg_generic_sc_evt_params[] = {
110 { 0x0001, &hf_h248_pkg_generic_sc_sig_id, h248_param_PkgdName, &h248_e_implicit },
111 { 0x0002, &hf_h248_pkg_generic_sc_meth, h248_param_ber_integer, &h248_e_implicit },
112 { 0x0003, &hf_h248_pkg_generic_sc_slid, h248_param_ber_integer, &h248_e_implicit },
113 { 0x0004, &hf_h248_pkg_generic_sc_rid, h248_param_ber_integer, &h248_e_implicit },
114 { 0, NULL, NULL, NULL}
117 static h248_pkg_evt_t h248_pkg_generic_cause_evts[] = {
118 { 0x0001, &hf_h248_pkg_generic_cause_evt, &ett_h248_pkg_generic_cause_evt, h248_pkg_generic_cause_evt_params, h248_pkg_generic_cause_gencause_vals},
119 { 0x0002, &hf_h248_pkg_generic_sc_evt, &ett_h248_pkg_generic_sc_evt, h248_pkg_generic_sc_evt_params, h248_pkg_generic_sc_vals},
120 { 0, NULL, NULL, NULL, NULL}
123 static h248_package_t h248_pkg_generic = {
124 0x0001,
125 &hf_h248_pkg_generic,
126 &ett_h248_pkg_generic,
127 h248_pkg_generic_props_vals,
128 NULL,
129 h248_pkg_generic_cause_vals,
130 NULL,
131 NULL,
132 NULL,
133 h248_pkg_generic_cause_evts,
134 NULL
138 /* H.248.1 E.2 Base Root Package */
139 #if 0 /* XXX: All of the following hf_... vars have no hf[] entry; package commented out */
140 static int hf_h248_pkg_root = -1;
141 static int hf_h248_pkg_root_maxnrofctx = -1;
142 static int hf_h248_pkg_root_maxtermsperctx = -1;
143 static int hf_h248_pkg_root_normalmgexectime = -1;
144 static int hf_h248_pkg_root_normalmgcexecutiontime = -1;
145 static int hf_h248_pkg_root_mg_provisionalresponsetimervalue = -1;
146 static int hf_h248_pkg_root_mgc_provisionalresponsetimervalue = -1;
147 static int hf_h248_pkg_root_mgc_orginalpendinglimit = -1;
148 static int hf_h248_pkg_root_mg_orginalpendinglimit = -1;
150 static gint ett_h248_pkg_root_params = -1;
152 static const value_string h248_pkg_root_props_vals[] = {
153 { 0x0000, "Base Root Package - Annex E (root)" },
154 { 0x0001, "Maximum Number of Contexts" },
155 { 0x0002, "Maximum Terminations Per Context" },
156 { 0x0003, "Normal MG Execution Time" },
157 { 0x0004, "Normal MGC Execution Time" },
158 { 0x0005, "MG Provisional Response Timer Value" },
159 { 0x0006, "MGC Provisional Response Timer Value" },
160 { 0x0007, "MGC Originated Pending Limit" },
161 { 0x0008, "MG Originated Pending Limit" },
162 { 0, NULL }
165 static h248_pkg_param_t h248_pkg_root_properties[] = {
166 { 0x0001, &hf_h248_pkg_root_maxnrofctx, h248_param_ber_integer, &h248_e_implicit },
167 { 0x0002, &hf_h248_pkg_root_maxtermsperctx, h248_param_ber_integer, &h248_e_implicit },
168 { 0x0003, &hf_h248_pkg_root_normalmgexectime, h248_param_ber_integer, &h248_e_implicit },
169 { 0x0004, &hf_h248_pkg_root_normalmgcexecutiontime, h248_param_ber_integer, &h248_e_implicit },
170 { 0x0005, &hf_h248_pkg_root_mg_provisionalresponsetimervalue, h248_param_ber_integer, &implicit },
171 { 0x0006, &hf_h248_pkg_root_mgc_provisionalresponsetimervalue, h248_param_ber_integer, &implicit },
172 { 0x0007, &hf_h248_pkg_root_mgc_orginalpendinglimit, h248_param_ber_integer, &implicit },
173 { 0x0008, &hf_h248_pkg_root_mg_orginalpendinglimit, h248_param_ber_integer, &implicit },
174 { 0, NULL, NULL, NULL}
177 static h248_package_t h248_pkg_root = {
178 0x0002,
179 &hf_h248_pkg_root,
180 &ett_h248_pkg_root_params,
181 h248_pkg_root_props_vals,
182 NULL,
183 NULL,
184 NULL,
185 h248_pkg_root_properties,
186 NULL,
187 NULL,
188 NULL
190 #endif
192 /* H.248.1 E.3 Tone Generator Package */
193 static int hf_h248_pkg_tonegen = -1;
194 static int hf_h248_pkg_tonegen_sig_pt = -1;
195 static int hf_h248_pkg_tonegen_sig_pt_tl = -1;
196 static int hf_h248_pkg_tonegen_sig_pt_ind = -1;
197 static int hf_h248_pkg_tonegen_sig_pg_btd = -1;
199 static gint ett_h248_pkg_tonegen_params = -1;
200 static gint ett_h248_pkg_tonegen_sig_pt = -1;
202 static const value_string h248_pkg_tonegen_props_vals[] = {
203 { 0x0000, "Tone Generator - Annex E (tonegen)" },
204 { 0, NULL }
207 static const value_string h248_pkg_tonegen_sigs_vals[] = {
208 { 0x0001, "Play Tone (pt)" },
209 { 0, NULL }
212 static const value_string h248_pkg_tonegen_pt_param_vals[] = {
213 { 0x0001, "Tone ID List (tl)" },
214 { 0x0002, "Inter-signal duration (ind)" },
215 { 0x0003, "Tone Direction (td)" },
216 { 0, NULL }
219 static const value_string h248_pkg_tonegen_pt_btd_param_vals[] = {
220 { 0x0001, "External (EXT)" },
221 { 0x0002, "Internal (INT)" },
222 { 0x0003, "Both (BOTH)" },
223 { 0, NULL }
226 static h248_pkg_param_t h248_pkg_tonegen_sig_params[] = {
227 { 0x0001, &hf_h248_pkg_tonegen_sig_pt_tl, h248_param_ber_integer, &h248_e_implicit },
228 { 0x0002, &hf_h248_pkg_tonegen_sig_pt_ind, h248_param_ber_integer, &h248_e_implicit },
229 { 0x0003, &hf_h248_pkg_tonegen_sig_pg_btd, h248_param_ber_integer, &implicit },
230 { 0, NULL, NULL, NULL}
233 static const h248_pkg_sig_t h248_pkg_tonegen_signals[] = {
234 { 0x0001, &hf_h248_pkg_tonegen_sig_pt, &ett_h248_pkg_tonegen_sig_pt, h248_pkg_tonegen_sig_params, h248_pkg_tonegen_pt_param_vals },
235 { 0, NULL, NULL, NULL, NULL }
238 static h248_package_t h248_pkg_tonegen = {
239 0x0003,
240 &hf_h248_pkg_tonegen,
241 &ett_h248_pkg_tonegen_params,
242 h248_pkg_tonegen_props_vals,
243 h248_pkg_tonegen_sigs_vals,
244 NULL,NULL,NULL,
245 h248_pkg_tonegen_signals,
246 NULL,
247 NULL
251 /* H.248.1 E.4 Tone Detector Package */
252 static int hf_h248_pkg_tonedet = -1;
253 static int hf_h248_pkg_tonedet_evt_std = -1;
254 static int hf_h248_pkg_tonedet_evt_etd = -1;
255 static int hf_h248_pkg_tonedet_evt_ltd = -1;
257 static int hf_h248_pkg_tonedet_evt_tl_param = -1;
258 static int hf_h248_pkg_tonedet_evt_dur_param = -1;
259 static int hf_h248_pkg_tonedet_evt_tid_param = -1;
261 static gint ett_h248_pkg_tonedet = -1;
262 static gint ett_h248_pkg_tonedet_evt_std = -1;
263 static gint ett_h248_pkg_tonedet_evt_etd = -1;
264 static gint ett_h248_pkg_tonedet_evt_ltd = -1;
266 static const value_string h248_pkg_tonedet_props_vals[] = {
267 { 0x0000, "Tone Detection Package - Annex E (tonedet)" },
268 { 0, NULL }
271 static const value_string h248_pkg_tonedet_events_vals[] = {
272 { 0x0001, "Start Tone Detected (std)" },
273 { 0x0002, "End Tone Detected (etd)" },
274 { 0x0003, "Long Tone Detected (ltd)" },
275 { 0, NULL }
278 static const value_string h248_pkg_tonedet_evt_param_vals[] = {
279 { 0x0001, "Tone ID List (tl)" },
280 { 0x0002, "Duration (dur)" },
281 { 0x0003, "Tone ID (tid)" },
282 { 0, NULL }
285 static const value_string h248_pkg_tonedet_tl_params_vals[] = {
286 { 0x0000, "Wildcard (*)" },
287 { 0, NULL }
290 static const h248_pkg_param_t h248_pkg_tonedet_event_params[] = {
291 { 0x0001, &hf_h248_pkg_tonedet_evt_tl_param, h248_param_uint_item, &implicit },
292 { 0x0002, &hf_h248_pkg_tonedet_evt_dur_param, h248_param_ber_integer, &implicit },
293 { 0x0003, &hf_h248_pkg_tonedet_evt_tid_param, h248_param_ber_integer, &implicit },
294 { 0, NULL, NULL, NULL }
297 static const h248_pkg_evt_t h248_pkg_tonedet_events[] = {
298 { 0x0001, &hf_h248_pkg_tonedet_evt_std, &ett_h248_pkg_tonedet_evt_std, h248_pkg_tonedet_event_params, h248_pkg_tonedet_evt_param_vals },
299 { 0x0002, &hf_h248_pkg_tonedet_evt_etd, &ett_h248_pkg_tonedet_evt_etd, h248_pkg_tonedet_event_params, h248_pkg_tonedet_evt_param_vals },
300 { 0x0003, &hf_h248_pkg_tonedet_evt_ltd, &ett_h248_pkg_tonedet_evt_ltd, h248_pkg_tonedet_event_params, h248_pkg_tonedet_evt_param_vals },
301 { 0, NULL, NULL, NULL, NULL }
304 static h248_package_t h248_pkg_tonedet = {
305 0x0004,
306 &hf_h248_pkg_tonedet,
307 &ett_h248_pkg_tonedet,
308 h248_pkg_tonedet_props_vals,
309 NULL,
310 h248_pkg_tonedet_events_vals,
311 NULL,
312 NULL,
313 NULL,
314 h248_pkg_tonedet_events,
315 NULL
319 /* E.5 Basic DTMF Generator Package */
320 static int hf_h248_pkg_dg = -1;
321 static int hf_h248_pkg_dg_sig_pt = -1;
322 static int hf_h248_pkg_dg_sig_d0 = -1;
323 static int hf_h248_pkg_dg_sig_d1 = -1;
324 static int hf_h248_pkg_dg_sig_d2 = -1;
325 static int hf_h248_pkg_dg_sig_d3 = -1;
326 static int hf_h248_pkg_dg_sig_d4 = -1;
327 static int hf_h248_pkg_dg_sig_d5 = -1;
328 static int hf_h248_pkg_dg_sig_d6 = -1;
329 static int hf_h248_pkg_dg_sig_d7 = -1;
330 static int hf_h248_pkg_dg_sig_d8 = -1;
331 static int hf_h248_pkg_dg_sig_d9 = -1;
332 static int hf_h248_pkg_dg_sig_da = -1;
333 static int hf_h248_pkg_dg_sig_db = -1;
334 static int hf_h248_pkg_dg_sig_dc = -1;
335 static int hf_h248_pkg_dg_sig_dd = -1;
336 static int hf_h248_pkg_dg_sig_ds = -1;
337 static int hf_h248_pkg_dg_sig_do = -1;
338 static int hf_h248_pkg_dg_sig_params = -1;
340 static gint ett_h248_pkg_dg = -1;
341 static gint ett_h248_pkg_dg_sig_pt = -1;
342 static gint ett_h248_pkg_dg_sig_d0 = -1;
343 static gint ett_h248_pkg_dg_sig_d1 = -1;
344 static gint ett_h248_pkg_dg_sig_d2 = -1;
345 static gint ett_h248_pkg_dg_sig_d3 = -1;
346 static gint ett_h248_pkg_dg_sig_d4 = -1;
347 static gint ett_h248_pkg_dg_sig_d5 = -1;
348 static gint ett_h248_pkg_dg_sig_d6 = -1;
349 static gint ett_h248_pkg_dg_sig_d7 = -1;
350 static gint ett_h248_pkg_dg_sig_d8 = -1;
351 static gint ett_h248_pkg_dg_sig_d9 = -1;
352 static gint ett_h248_pkg_dg_sig_da = -1;
353 static gint ett_h248_pkg_dg_sig_db = -1;
354 static gint ett_h248_pkg_dg_sig_dc = -1;
355 static gint ett_h248_pkg_dg_sig_dd = -1;
356 static gint ett_h248_pkg_dg_sig_ds = -1;
357 static gint ett_h248_pkg_dg_sig_do = -1;
359 static const value_string h248_pkg_dg_props_vals[] = {
360 { 0x0000, "Basic DTMF Generator Package - Annex E (dg)" },
361 { 0, NULL }
364 static const value_string h248_pkg_dg_signals_vals[] = {
365 /* from tonegeg */
366 { 0x0001, "Tone ID List (tl)" },
367 { 0x0002, "End Tone Detected (etd)" },
368 { 0x0003, "Long Tone Detected (ltd)" },
370 /* from dd */
371 { 0x0010, "0 (d0)"},
372 { 0x0011, "1 (d1)"},
373 { 0x0012, "2 (d2)"},
374 { 0x0013, "3 (d3)"},
375 { 0x0014, "4 (d4)"},
376 { 0x0015, "5 (d5)"},
377 { 0x0016, "6 (d6)"},
378 { 0x0017, "7 (d7)"},
379 { 0x0018, "8 (d8)"},
380 { 0x0019, "9 (d9)"},
381 { 0x001a, "A (dA)"},
382 { 0x001b, "B (dB)"},
383 { 0x001c, "C (dC)"},
384 { 0x001d, "D (dD)"},
385 { 0x0020, "* (ds)"},
386 { 0x0021, "# (do)"},
387 {0,NULL}
390 #if 0
391 static const value_string h248_pkg_dg_sig_params_vals[] = {
392 { 0x0001, "Tone Direction (btd)" },
393 { 0, NULL }
395 #endif
397 static const value_string h248_pkg_dg_sig_btd_vals[] = {
398 { 0x0001, "External (EXT)" },
399 { 0x0002, "Internal (INT)" },
400 { 0x0003, "Both (BOTH)" },
401 { 0, NULL }
404 static const h248_pkg_param_t h248_pkg_dg_signal_params[] = {
405 { 0x0001, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
406 { 0x0010, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
407 { 0x0011, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
408 { 0x0012, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
409 { 0x0013, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
410 { 0x0014, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
411 { 0x0015, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
412 { 0x0016, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
413 { 0x0017, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
414 { 0x0018, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
415 { 0x0019, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
416 { 0x001a, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
417 { 0x001b, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
418 { 0x001c, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
419 { 0x001d, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
420 { 0x0020, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
421 { 0x0021, &hf_h248_pkg_dg_sig_params, h248_param_ber_integer, &implicit },
422 { 0, NULL, NULL, NULL }
425 /* Signals definitions */
426 static h248_pkg_sig_t h248_pkg_dg_signals[] = {
427 { 0X0001, &hf_h248_pkg_dg_sig_pt, &ett_h248_pkg_dg_sig_pt, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
428 { 0x0010, &hf_h248_pkg_dg_sig_d0, &ett_h248_pkg_dg_sig_d0, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
429 { 0x0011, &hf_h248_pkg_dg_sig_d1, &ett_h248_pkg_dg_sig_d1, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
430 { 0x0012, &hf_h248_pkg_dg_sig_d2, &ett_h248_pkg_dg_sig_d2, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
431 { 0x0013, &hf_h248_pkg_dg_sig_d3, &ett_h248_pkg_dg_sig_d3, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
432 { 0x0014, &hf_h248_pkg_dg_sig_d4, &ett_h248_pkg_dg_sig_d4, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
433 { 0x0015, &hf_h248_pkg_dg_sig_d5, &ett_h248_pkg_dg_sig_d5, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
434 { 0x0016, &hf_h248_pkg_dg_sig_d6, &ett_h248_pkg_dg_sig_d6, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
435 { 0x0017, &hf_h248_pkg_dg_sig_d7, &ett_h248_pkg_dg_sig_d7, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
436 { 0x0018, &hf_h248_pkg_dg_sig_d8, &ett_h248_pkg_dg_sig_d8, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
437 { 0x0019, &hf_h248_pkg_dg_sig_d9, &ett_h248_pkg_dg_sig_d9, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
438 { 0x001a, &hf_h248_pkg_dg_sig_da, &ett_h248_pkg_dg_sig_da, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
439 { 0x001b, &hf_h248_pkg_dg_sig_db, &ett_h248_pkg_dg_sig_db, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
440 { 0x001c, &hf_h248_pkg_dg_sig_dc, &ett_h248_pkg_dg_sig_dc, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
441 { 0x001d, &hf_h248_pkg_dg_sig_dd, &ett_h248_pkg_dg_sig_dd, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
442 { 0x0020, &hf_h248_pkg_dg_sig_ds, &ett_h248_pkg_dg_sig_ds, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
443 { 0x0021, &hf_h248_pkg_dg_sig_do, &ett_h248_pkg_dg_sig_do, h248_pkg_dg_signal_params,h248_pkg_dg_signals_vals },
444 { 0, NULL, NULL, NULL, NULL}
447 /* Packet definitions */
448 static h248_package_t h248_pkg_dg = {
449 0x0005,
450 &hf_h248_pkg_dg,
451 &ett_h248_pkg_dg,
452 h248_pkg_dg_props_vals,
453 h248_pkg_dg_signals_vals,
454 NULL, NULL, NULL,
455 h248_pkg_dg_signals, /* signals */
456 NULL, NULL
459 /* H248.1 E.6 DTMF Detection Package (dd) */
461 #if 0 /* XXX: The following 5 hf_... vars have no hf[] entry: package commented out */
462 static int hf_h248_pkg_dd = -1;
463 static int hf_h248_pkg_dd_evt_std = -1;
464 static int hf_h248_pkg_dd_evt_etd = -1;
465 static int hf_h248_pkg_dd_evt_ltd = -1;
466 static int hf_h248_pkg_dd_evt_ce = -1;
467 #endif
468 #if 0
469 static int hf_h248_pkg_dd_evt_d0 = -1;
470 static int hf_h248_pkg_dd_evt_d1 = -1;
471 static int hf_h248_pkg_dd_evt_d2 = -1;
472 static int hf_h248_pkg_dd_evt_d3 = -1;
473 static int hf_h248_pkg_dd_evt_d4 = -1;
474 static int hf_h248_pkg_dd_evt_d5 = -1;
475 static int hf_h248_pkg_dd_evt_d6 = -1;
476 static int hf_h248_pkg_dd_evt_d7 = -1;
477 static int hf_h248_pkg_dd_evt_d8 = -1;
478 static int hf_h248_pkg_dd_evt_d9 = -1;
479 static int hf_h248_pkg_dd_evt_da = -1;
480 static int hf_h248_pkg_dd_evt_db = -1;
481 static int hf_h248_pkg_dd_evt_dc = -1;
482 static int hf_h248_pkg_dd_evt_dd = -1;
483 static int hf_h248_pkg_dd_evt_ds = -1;
484 static int hf_h248_pkg_dd_evt_do = -1;
485 static int hf_h248_pkg_dd_evt_ce_ds = -1;
486 static int hf_h248_pkg_dd_evt_ce_meth = -1;
487 static int hf_h248_pkg_dd_evt_tl_param = -1;
488 static int hf_h248_pkg_dd_evt_dur_param = -1;
489 static int hf_h248_pkg_dd_evt_tid_param = -1;
490 #endif
492 #if 0
493 static gint ett_h248_pkg_dd = -1;
494 static gint ett_h248_pkg_dd_evt_ce = -1;
495 static gint ett_h248_pkg_dd_evt_std = -1;
496 static gint ett_h248_pkg_dd_evt_etd = -1;
497 static gint ett_h248_pkg_dd_evt_ltd = -1;
499 static const value_string h248_pkg_dd_props_vals[] = {
500 { 0x0000, "DTMF Detection Package - Annex E (dd)" },
501 { 0, NULL }
504 static const value_string h248_pkg_dd_event_vals[] = {
505 /* from tonedet */
506 { 0x0000, "Wildcard (*)" },
507 { 0x0001, "Start Tone Detected (std)" },
508 { 0x0002, "End Tone Detected (etd)" },
509 { 0x0003, "Long Tone Detected (ltd)" },
510 { 0x0004, "Digit Completion Map (ce)" },
512 /* from dd */
513 { 0x0010, "0 (d0)"},
514 { 0x0011, "1 (d1)"},
515 { 0x0012, "2 (d2)"},
516 { 0x0013, "3 (d3)"},
517 { 0x0014, "4 (d4)"},
518 { 0x0015, "5 (d5)"},
519 { 0x0016, "6 (d6)"},
520 { 0x0017, "7 (d7)"},
521 { 0x0018, "8 (d8)"},
522 { 0x0019, "9 (d9)"},
523 { 0x001a, "A (dA)"},
524 { 0x001b, "B (dB)"},
525 { 0x001c, "C (dC)"},
526 { 0x001d, "D (dD)"},
527 { 0x0020, "* (ds)"},
528 { 0x0021, "# (do)"},
529 {0,NULL}
532 static const value_string h248_pkg_dd_event_params_vals[] = {
533 { 0x0001, "Unambiguous Match (UM)" },
534 { 0x0002, "Partial Match (PM)" },
535 { 0x0003, "Full Match (FM)" },
536 { 0, NULL }
539 static const value_string h248_pkg_dd_ce_vals[] = {
540 { 0x0001, "Digit String (ds)" },
541 { 0x0003, "Termination Method (meth)" },
542 { 0, NULL }
545 static h248_pkg_param_t h248_pkg_dd_ds_events[] = {
546 { 0x0001, &hf_h248_pkg_dd_evt_ce_ds, h248_param_ber_octetstring, &implicit },
547 { 0x0003, &hf_h248_pkg_dd_evt_ce_meth, h248_param_ber_integer, &implicit },
548 { 0, NULL, NULL, NULL }
551 static const h248_pkg_param_t h248_pkg_dd_event_params[] = {
552 { 0x0001, &hf_h248_pkg_dd_evt_tl_param, h248_param_ber_integer, &implicit },
553 { 0x0002, &hf_h248_pkg_dd_evt_dur_param, h248_param_ber_integer, &implicit },
554 { 0x0003, &hf_h248_pkg_dd_evt_tid_param, h248_param_ber_integer, &implicit },
555 { 0, NULL, NULL, NULL }
559 static h248_pkg_evt_t h248_pkg_dd_events[] = {
560 { 0x0001, &hf_h248_pkg_dd_evt_std, &ett_h248_pkg_dd_evt_std, h248_pkg_dd_event_params, h248_pkg_dd_event_vals },
561 { 0x0002, &hf_h248_pkg_dd_evt_etd, &ett_h248_pkg_dd_evt_etd, h248_pkg_dd_event_params, h248_pkg_dd_event_vals },
562 { 0x0003, &hf_h248_pkg_dd_evt_ltd, &ett_h248_pkg_dd_evt_ltd, h248_pkg_dd_event_params, h248_pkg_dd_event_vals },
563 { 0x0004, &hf_h248_pkg_dd_evt_ce, &ett_h248_pkg_dd_evt_ce, h248_pkg_dd_ds_events, h248_pkg_dd_ce_vals},
564 { 0, NULL, NULL, NULL, NULL }
567 static h248_package_t h248_pkg_dd = {
568 0x0006,
569 &hf_h248_pkg_dd,
570 &ett_h248_pkg_dd,
571 h248_pkg_dd_props_vals,
572 NULL,
573 h248_pkg_dd_event_vals,
574 NULL,
575 NULL, NULL,
576 h248_pkg_dd_events,
577 NULL
579 #endif
581 /* H.248.1.E.7 Call Progress Tones Generator package */
582 static int hf_h248_pkg_cg = -1;
583 static int hf_h248_pkg_cg_sig_pt = -1;
584 static int hf_h248_pkg_cg_sig_pt_tl = -1;
585 static int hf_h248_pkg_cg_sig_pt_ind = -1;
586 static int hf_h248_pkg_cg_sig_pt_btd = -1;
587 static int hf_h248_pkg_cg_sig_dt = -1;
588 static int hf_h248_pkg_cg_sig_rt = -1;
589 static int hf_h248_pkg_cg_sig_bt = -1;
590 static int hf_h248_pkg_cg_sig_ct = -1;
591 static int hf_h248_pkg_cg_sig_sit = -1;
592 static int hf_h248_pkg_cg_sig_wt = -1;
593 static int hf_h248_pkg_cg_sig_prt = -1;
594 static int hf_h248_pkg_cg_sig_cw = -1;
595 static int hf_h248_pkg_cg_sig_cr = -1;
597 static gint ett_h248_pkg_cg_params = -1;
598 static gint ett_h248_pkg_cg_sig_pt = -1;
599 static gint ett_h248_pkg_cg_sig_dt = -1;
600 static gint ett_h248_pkg_cg_sig_rt = -1;
601 static gint ett_h248_pkg_cg_sig_bt = -1;
602 static gint ett_h248_pkg_cg_sig_ct = -1;
603 static gint ett_h248_pkg_cg_sig_sit = -1;
604 static gint ett_h248_pkg_cg_sig_wt = -1;
605 static gint ett_h248_pkg_cg_sig_prt = -1;
606 static gint ett_h248_pkg_cg_sig_cw = -1;
607 static gint ett_h248_pkg_cg_sig_cr = -1;
609 static const value_string h248_pkg_cg_props_vals[] = {
610 { 0x0000, "Call Progress Tones Generator - Annex E (cg)" },
611 { 0, NULL }
614 static const value_string h248_pkg_cg_sig_cd_evt_vals[] = {
615 { 0x0001, "Play Tone (pt)" },
616 { 0x0030, "Dial Tone"},
617 { 0x0031, "Ring Tone" },
618 { 0x0032, "Busy Tone" },
619 { 0x0033, "Congestion Tone" },
620 { 0x0034, "Special Information Tone" },
621 { 0x0035, "(Recording) Warning Tone" },
622 { 0x0036, "Payphone Recognition Tone" },
623 { 0x0037, "Call Waiting Tone" },
624 { 0x0038, "Caller Waiting Tone" },
625 { 0, NULL }
628 static const value_string h248_pkg_cg_sig_pt_param_vals[] = {
629 { 0x0001, "Tone ID List (tl)"},
630 { 0x0002, "Inter-signal duration (ind)" },
631 { 0x0003, "Tone Direction (td)" },
632 { 0, NULL }
635 static const value_string h248_pkg_cg_pt_btd_param_vals[] = {
636 { 0x0001, "External (EXT)" },
637 { 0x0002, "Internal (INT)" },
638 { 0x0003, "Both (BOTH)" },
639 { 0, NULL }
642 static const h248_pkg_param_t h248_pkg_cg_sig_pt_params[] = {
643 { 0x0001, &hf_h248_pkg_cg_sig_pt_tl, h248_param_ber_integer, &implicit },
644 { 0x0002, &hf_h248_pkg_cg_sig_pt_ind, h248_param_ber_integer, &implicit },
645 { 0x0003, &hf_h248_pkg_cg_sig_pt_btd, h248_param_ber_integer, &implicit },
646 { 0, NULL, NULL, NULL}
649 static const h248_pkg_sig_t h248_pkg_cg_signals_cd_events[] = {
650 { 0x0001, &hf_h248_pkg_cg_sig_pt, &ett_h248_pkg_cg_sig_pt, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
651 { 0x0030, &hf_h248_pkg_cg_sig_dt, &ett_h248_pkg_cg_sig_dt, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
652 { 0x0031, &hf_h248_pkg_cg_sig_rt, &ett_h248_pkg_cg_sig_rt, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
653 { 0x0032, &hf_h248_pkg_cg_sig_bt, &ett_h248_pkg_cg_sig_bt, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
654 { 0x0033, &hf_h248_pkg_cg_sig_ct, &ett_h248_pkg_cg_sig_ct, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
655 { 0x0034, &hf_h248_pkg_cg_sig_sit, &ett_h248_pkg_cg_sig_sit, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
656 { 0x0035, &hf_h248_pkg_cg_sig_wt, &ett_h248_pkg_cg_sig_wt, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
657 { 0x0036, &hf_h248_pkg_cg_sig_prt, &ett_h248_pkg_cg_sig_prt, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
658 { 0x0037, &hf_h248_pkg_cg_sig_cw, &ett_h248_pkg_cg_sig_cw, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
659 { 0x0038, &hf_h248_pkg_cg_sig_cr, &ett_h248_pkg_cg_sig_cr, h248_pkg_cg_sig_pt_params, h248_pkg_cg_sig_pt_param_vals },
660 { 0, NULL, NULL, NULL, NULL }
663 static h248_package_t h248_pkg_cg = {
664 0x0007,
665 &hf_h248_pkg_cg,
666 &ett_h248_pkg_cg_params,
667 h248_pkg_cg_props_vals,
668 h248_pkg_cg_sig_cd_evt_vals,
669 NULL,NULL, /* value_stings: event, stats */
670 NULL, /* dissectors: prop */
671 h248_pkg_cg_signals_cd_events,
672 NULL, /* disectors: events */
673 NULL /* dissectors: stats */
676 /* H.248.1 E.8 - Call Tones Detection Package */
677 static int hf_h248_pkg_cd = -1;
679 static gint ett_h248_pkg_cd = -1;
681 static const value_string h248_pkg_cd_params_vals[] = {
682 { 0x0000, "Call Progress Tones Detection Package (cd)" },
683 { 0, NULL }
686 static h248_package_t h248_pkg_cd = {
687 0x0008,
688 &hf_h248_pkg_cd,
689 &ett_h248_pkg_cd,
690 h248_pkg_cd_params_vals,
691 NULL,
692 h248_pkg_cg_sig_cd_evt_vals,
693 NULL,
694 NULL,NULL,
695 (h248_pkg_evt_t *)(void*)h248_pkg_cg_signals_cd_events,
696 NULL
699 /* H.248.1 E.9 Analog Line Supervision Package */
700 static int hf_h248_pkg_al = -1;
701 static int hf_h248_pkg_al_sig_cadence = -1;
702 static int hf_h248_pkg_al_sig_cadence_on_off = -1;
703 /* static int hf_h248_pkg_al_sig_freq = -1; */
704 static int hf_h248_pkg_al_evt_onhook = -1;
705 static int hf_h248_pkg_al_evt_offhook = -1;
706 static int hf_h248_pkg_al_evt_flashhook = -1;
707 static int hf_h248_pkg_al_evt_onhook_par_strict = -1;
708 static int hf_h248_pkg_al_evt_offhook_par_strict = -1;
709 static int hf_h248_pkg_al_evt_onhook_par_init = -1;
710 static int hf_h248_pkg_al_evt_offhook_par_init = -1;
711 static int hf_h248_pkg_al_evt_flashhook_par_mindur = -1;
713 static gint ett_h248_pkg_al = -1;
714 static gint ett_h248_pkg_al_sig_cadence = -1;
715 static gint ett_h248_pkg_al_sig_freq = -1;
716 static gint ett_h248_pkg_al_evt_onhook = -1;
717 static gint ett_h248_pkg_al_evt_offhook = -1;
718 static gint ett_h248_pkg_al_evt_flashhook = -1;
720 static const value_string h248_pkg_al_props_vals[] = {
721 { 0x0000, "Analog Line Supervision Package - Annex E (al)" },
722 { 0, NULL }
725 static const value_string h248_pkg_al_sig_params_vals[] = {
726 { 1, "One" },
727 { 2, "Two" },
728 { 0x0006, "Cadence" },
729 { 0x0007, "Frequency (Hz)" },
730 { 0, NULL }
733 static const value_string h248_pkg_al_evt_onhook_params_vals[] = {
734 { 0x0001, "strict"},
735 { 0x0002, "init"},
736 { 0, NULL}
739 static const value_string h248_pkg_al_evt_flashhook_params_vals[] = {
740 { 0x0001, "mindur"},
741 { 0, NULL}
744 /* Packet definitions */
745 static const value_string h248_pkg_al_sig_evts_vals[] _U_ = {
746 /* Signals */
747 { 0x0002, "ri (Ring)" },
748 /* Events */
749 { 0x0004, "on (On-hook)" },
750 { 0x0005, "off (Off-hook)" },
751 { 0x0006, "fl (Flashhook)" },
752 {0, NULL},
755 /* Events definitions */
756 static const value_string h248_pkg_al_evt_onhook_strict_vals[] = {
757 { 0, "exact"},
758 { 1, "state"},
759 { 2, "failWrong"},
760 { 0, NULL }
763 static const true_false_string h248_pkg_al_evt_onhook_par_init_vals = {
764 "already on-hook",
765 "actual state transition to on-hook"
768 static const true_false_string h248_pkg_al_evt_offhook_par_init_vals = {
769 "already off-hook",
770 "actual state transition to off-hook"
774 static h248_pkg_param_t h248_pkg_al_sig_cadence[] = {
775 { 0x0006, &hf_h248_pkg_al_sig_cadence_on_off, h248_param_ber_octetstring, &h248_e_implicit },
776 { 0, NULL, NULL, NULL }
779 static h248_pkg_param_t h248_pkg_al_evt_onhook_params[] = {
780 { 0x0001, &hf_h248_pkg_al_evt_onhook_par_strict, h248_param_ber_integer, &h248_e_implicit },
781 { 0x0002, &hf_h248_pkg_al_evt_onhook_par_init, h248_param_ber_boolean, &h248_e_implicit },
782 { 0, NULL, NULL, NULL}
785 static h248_pkg_param_t h248_pkg_al_evt_offhook_params[] = {
786 { 0x0001, &hf_h248_pkg_al_evt_offhook_par_strict, h248_param_ber_integer, &h248_e_implicit },
787 { 0x0002, &hf_h248_pkg_al_evt_offhook_par_init, h248_param_ber_boolean, &h248_e_implicit },
788 { 0, NULL, NULL, NULL}
791 static h248_pkg_param_t h248_pkg_al_evt_flashhook_params[] = {
792 { 0x0001, &hf_h248_pkg_al_evt_flashhook_par_mindur, h248_param_ber_integer, &h248_e_implicit },
793 { 0, NULL, NULL, NULL}
796 static h248_pkg_sig_t h248_pkg_al_sig[] = {
797 { 0x0002, &hf_h248_pkg_al_sig_cadence, &ett_h248_pkg_al_sig_cadence, h248_pkg_al_sig_cadence, h248_pkg_al_sig_params_vals},
798 { 0, NULL, NULL, NULL, NULL }
801 static h248_pkg_evt_t h248_pkg_al_evts[] = {
802 { 0x0004, &hf_h248_pkg_al_evt_onhook, &ett_h248_pkg_al_evt_onhook, h248_pkg_al_evt_onhook_params, h248_pkg_al_evt_onhook_params_vals},
803 { 0x0005, &hf_h248_pkg_al_evt_offhook, &ett_h248_pkg_al_evt_offhook, h248_pkg_al_evt_offhook_params, h248_pkg_al_evt_onhook_params_vals },
804 { 0x0006, &hf_h248_pkg_al_evt_flashhook, &ett_h248_pkg_al_evt_flashhook, h248_pkg_al_evt_flashhook_params, h248_pkg_al_evt_flashhook_params_vals },
806 { 0, NULL, NULL, NULL, NULL}
809 static h248_package_t h248_pkg_al = {
810 0x0009,
811 &hf_h248_pkg_al,
812 &ett_h248_pkg_al,
813 h248_pkg_al_props_vals,
814 h248_pkg_al_sig_evts_vals,
815 h248_pkg_al_sig_evts_vals,
816 NULL,
817 NULL, /* Properties */
818 h248_pkg_al_sig, /* signals */
819 h248_pkg_al_evts, /* events */
820 NULL /* statistics */
824 /* H.248.1 E.10 - Basic Continuity Package */
825 static int hf_h248_pkg_ct = -1;
826 static gint ett_h248_pkg_ct = -1;
828 static const value_string h248_pkg_ct_props_vals[] = {
829 { 0x0000, "Basic Continuity Package (ct)" },
830 { 0, NULL }
833 static const value_string h248_pkg_ct_evt_sig_vals[] = {
834 { 0x0003, "Continuity Test (ct)" },
835 { 0x0004, "Respond (rsp)" },
836 { 0x0005, "Completion (cmp)" },
837 { 0, NULL }
840 static h248_package_t h248_pkg_ct = {
841 0x000a,
842 &hf_h248_pkg_ct,
843 &ett_h248_pkg_ct,
844 h248_pkg_ct_props_vals,
845 h248_pkg_ct_evt_sig_vals,
846 h248_pkg_ct_evt_sig_vals,
847 NULL,
848 NULL, NULL, NULL, NULL
851 /* H.248.1 E.11 Network Package */
852 static int hf_h248_pkg_nt = -1;
853 static gint ett_h248_pkg_nt = -1;
855 static const value_string h248_pkg_nt_props_evt_stats_vals[] = {
856 { 0x0000, "Network Package (nt)" },
857 { 0x0001, "Duration (dur)" },
858 { 0x0002, "Octets Sent (os)" },
859 { 0x0003, "Octets Received (or)" },
860 { 0x0005, "Network Failure (netfail)" },
861 { 0x0006, "Quality Alert (qualert)" },
862 { 0x0007, "Maximum Jitter Buffer (jit)" },
863 { 0, NULL }
866 static h248_package_t h248_pkg_nt = {
867 0x000b,
868 &hf_h248_pkg_nt,
869 &ett_h248_pkg_nt,
870 h248_pkg_nt_props_evt_stats_vals,
871 h248_pkg_nt_props_evt_stats_vals,
872 NULL,
873 h248_pkg_nt_props_evt_stats_vals,
874 NULL, NULL, NULL, NULL
877 /* H.248.1 E.12 RTP package */
878 static int hf_h248_pkg_rtp = -1;
879 static int hf_h248_pkg_rtp_stat_ps = -1;
881 static gint ett_h248_pkg_rtp = -1;
883 static const value_string h248_pkg_rtp_stat_vals[] _U_ = {
884 { 0x0004, "ps"},
885 { 0, NULL}
888 static const value_string h248_pkg_rtp_props_vals[] = {
889 { 0x0000, "RTP Package - Annex E (rtp)" },
890 { 0x0001, "pltrans (Payload Transition)" },
891 { 0x0004, "ps (Packets Sent)" },
892 { 0x0005, "pr (Packets Received)" },
893 { 0x0006, "pl (Packet Loss)" },
894 { 0x0007, "jit (Jitter)" },
895 { 0x0008, "delay (Delay)" },
896 {0, NULL},
899 static h248_pkg_stat_t h248_pkg_rtp_stat[] = {
900 { 0x0004, &hf_h248_pkg_rtp_stat_ps, &ett_h248_pkg_rtp, NULL,NULL},
903 /* Packet definitions */
904 static h248_package_t h248_pkg_rtp = {
905 0x000c,
906 &hf_h248_pkg_rtp,
907 &ett_h248_pkg_rtp,
908 h248_pkg_rtp_props_vals,
909 NULL,
910 NULL,
911 NULL,
912 NULL, /* Properties */
913 NULL, /* signals */
914 NULL, /* events */
915 h248_pkg_rtp_stat /* statistics */
918 /* H.248.1 E.13 TDM Circuit Package */
919 static int hf_h248_pkg_tdmc = -1;
920 static int hf_h248_pkg_tdmc_ec = -1;
921 static int hf_h248_pkg_tdmc_gain = -1;
923 static gint ett_h248_pkg_tdmc = -1;
925 static const true_false_string h248_tdmc_ec_vals = {
926 "On",
927 "Off"
929 static const value_string h248_pkg_tdmc_props_vals[] = {
930 { 0x0000, "TDM Circuit Package - Annex E (tdmc)" },
931 { 0x0008, "Echo Cancellation (ec)"},
932 { 0x000a, "Gain Control (gain)"},
933 { 0, NULL}
937 static h248_pkg_param_t h248_pkg_tdmc_props[] = {
938 { 0x0008, &hf_h248_pkg_tdmc_ec, h248_param_ber_boolean, &h248_e_implicit },
939 { 0x000a, &hf_h248_pkg_tdmc_gain, h248_param_ber_integer, &h248_e_implicit },
940 { 0, NULL, NULL, NULL}
943 static h248_package_t h248_pkg_tdmc = {
944 0x000d,
945 &hf_h248_pkg_tdmc,
946 &ett_h248_pkg_tdmc,
947 h248_pkg_tdmc_props_vals,
948 NULL,
949 NULL,
950 NULL,
951 h248_pkg_tdmc_props, /* Properties */
952 NULL, /* signals */
953 NULL, /* events */
954 NULL /* statistics */
959 void proto_register_h248_annex_e(void) {
960 static hf_register_info hf[] = {
961 /* H.248.1 E.1 Generic Package */
962 { &hf_h248_pkg_generic, { "Generic Package", "h248.pkg.generic", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
963 { &hf_h248_pkg_generic_cause_evt, { "Cause Event", "h248.pkg.generic.cause", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
964 { &hf_h248_pkg_generic_cause_gencause, { "Generic Cause", "h248.pkg.generic.cause.gencause", FT_UINT32, BASE_HEX, VALS(h248_pkg_generic_cause_gencause_vals), 0, NULL, HFILL }},
965 { &hf_h248_pkg_generic_cause_failurecause, { "Generic Cause", "h248.pkg.generic.cause.failurecause", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
966 { &hf_h248_pkg_generic_sc_evt, {"Signal Completion2","h248.pkg.generic.sc",FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL}},
967 { &hf_h248_pkg_generic_sc_sig_id, { "Signal Identity", "h248.pkg.generic.sc.sig_id", FT_BYTES, BASE_NONE, NULL , 0, NULL, HFILL }},
968 { &hf_h248_pkg_generic_sc_meth, { "Termination Method", "h248.pkg.generic.sc.meth", FT_UINT32, BASE_DEC, VALS(h248_pkg_generic_sc_vals) , 0, NULL, HFILL }},
969 { &hf_h248_pkg_generic_sc_slid, { "Signal List ID", "h248.pkg.generic.sc.slid", FT_UINT32, BASE_DEC, NULL , 0, NULL, HFILL }},
970 { &hf_h248_pkg_generic_sc_rid, { "Request ID", "h248.pkg.generic.sc.rid", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
972 /* H.248.1.E 3 Tone Generator (tonegeg) */
973 { &hf_h248_pkg_tonegen, { "Tone Generator (tonegen)", "h248.pkg.tonegen", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
974 { &hf_h248_pkg_tonegen_sig_pt, { "Play Tone (pt)", "h248.pkg.tonegen.pg", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
975 { &hf_h248_pkg_tonegen_sig_pt_tl, { "Tone List ID (tl)", "h248.pkg.tonegen.pt.tl", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
976 { &hf_h248_pkg_tonegen_sig_pt_ind, { "Inter-signal Duration (ind)", "h248.pkg.tonegem.pt.ind", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
977 { &hf_h248_pkg_tonegen_sig_pg_btd, { "Tone Direction (btd)", "h248.pkg.tonegen.pt.btd", FT_UINT32, BASE_HEX, VALS(h248_pkg_tonegen_pt_btd_param_vals), 0, NULL, HFILL }},
979 /* H.248.1 E.4 Tone Detection (tonedet) */
980 { &hf_h248_pkg_tonedet, { "Tone Detection Package", "h248.pkg.tonedet", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
981 { &hf_h248_pkg_tonedet_evt_std, { "Start Tone", "h248.pkg.tonedet.std", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
982 { &hf_h248_pkg_tonedet_evt_etd, { "End Tone", "h248.pkg.tonedet.etd", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
983 { &hf_h248_pkg_tonedet_evt_ltd, { "Long Tone", "h248.pkg.tonedet.ltd", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
984 { &hf_h248_pkg_tonedet_evt_tl_param, {"Tone Detail", "h248.pkg.tonedet.evt.tl", FT_UINT16, BASE_DEC, VALS(h248_pkg_tonedet_tl_params_vals), 0, NULL, HFILL }},
985 { &hf_h248_pkg_tonedet_evt_dur_param, {"Duration (ms)", "h248.pkg.tonedet.evt.dur", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
986 { &hf_h248_pkg_tonedet_evt_tid_param, {"Tone ID", "h248.pkg.tonedet.evt.tid", FT_UINT16, BASE_DEC, VALS(h248_pkg_tonedet_tl_params_vals), 0, NULL, HFILL }},
989 /* H.248.1 E.5 Basic DTMF Generator Package */
990 { &hf_h248_pkg_dg, { "Basic DTMF Generator Package (dg)", "h248.pkg.dg", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
991 { &hf_h248_pkg_dg_sig_pt, { "Play Tone", "h248.pkg.dg.pt", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
992 { &hf_h248_pkg_dg_sig_d0, { "Digit 0", "h248.pkg.dg.d0", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
993 { &hf_h248_pkg_dg_sig_d1, { "Digit 1", "h248.pkg.dg.d1", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
994 { &hf_h248_pkg_dg_sig_d2, { "Digit 2", "h248.pkg.dg.d2", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
995 { &hf_h248_pkg_dg_sig_d3, { "Digit 3", "h248.pkg.dg.d3", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
996 { &hf_h248_pkg_dg_sig_d4, { "Digit 4", "h248.pkg.dg.d4", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
997 { &hf_h248_pkg_dg_sig_d5, { "Digit 5", "h248.pkg.dg.d5", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
998 { &hf_h248_pkg_dg_sig_d6, { "Digit 6", "h248.pkg.dg.d6", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
999 { &hf_h248_pkg_dg_sig_d7, { "Digit 7", "h248.pkg.dg.d7", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1000 { &hf_h248_pkg_dg_sig_d8, { "Digit 8", "h248.pkg.dg.d8", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1001 { &hf_h248_pkg_dg_sig_d9, { "Digit 9", "h248.pkg.dg.d9", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1002 { &hf_h248_pkg_dg_sig_da, { "Digit A", "h248.pkg.dg.da", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1003 { &hf_h248_pkg_dg_sig_db, { "Digit B", "h248.pkg.dg.db", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1004 { &hf_h248_pkg_dg_sig_dc, { "Digit C", "h248.pkg.dg.dc", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1005 { &hf_h248_pkg_dg_sig_dd, { "Digit D", "h248.pkg.dg.dd", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1006 { &hf_h248_pkg_dg_sig_ds, { "Digit *", "h248.pkg.dg.ds", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1007 { &hf_h248_pkg_dg_sig_do, { "Digit #", "h248.pkg.dg.do", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1008 { &hf_h248_pkg_dg_sig_params, { "Event Parameters", "h248.pkg.dg.signal.direction", FT_UINT16, BASE_DEC, VALS(h248_pkg_dg_sig_btd_vals), 0, NULL, HFILL }},
1010 /* H.248.1 E.6 DTMF Detection Package */
1011 #if 0
1012 { &hf_h248_pkg_dd_evt_ce_ds, { "Digit(s) Detected", "h248.pkg.dd.ce.ds", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1013 { &hf_h248_pkg_dd_evt_ce_meth, { "Method Used", "h248.pkg.dd.ce.meth", FT_UINT16, BASE_DEC, VALS(h248_pkg_dd_event_params_vals), 0, NULL, HFILL }},
1014 { &hf_h248_pkg_dd_evt_tl_param, {"Tone Detail", "h248.pkg.dd.evt.tl", FT_UINT16, BASE_DEC, VALS(h248_pkg_dd_event_vals), 0, NULL, HFILL }},
1015 { &hf_h248_pkg_dd_evt_dur_param, {"Duration (ms)", "h248.pkg.dd.evt.dur", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
1016 { &hf_h248_pkg_dd_evt_tid_param, {"Tone ID", "h248.pkg.dd.evt.tid", FT_UINT16, BASE_DEC, VALS(h248_pkg_dd_event_vals), 0, NULL, HFILL }},
1017 #endif
1019 /* H.248.1.E.7 Call Progress Tones Generator package */
1020 { &hf_h248_pkg_cg, { "Call Progress Tones Generator", "h248.pkg.cg", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1021 { &hf_h248_pkg_cg_sig_pt, { "Play Tone (pt)", "h248.pkg.cg.pt", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1022 { &hf_h248_pkg_cg_sig_pt_tl, {"Tone List", "h248.pkg.cg.pt.tl", FT_UINT16, BASE_DEC_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1023 { &hf_h248_pkg_cg_sig_pt_ind, { "Inter-Signal Duration (ind)", "h248.pkg.cg.pt.ind", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1024 { &hf_h248_pkg_cg_sig_pt_btd, { "Tone Direction (btd)", "h248.pkg.cg.pt.btd", FT_UINT8, BASE_DEC, VALS(h248_pkg_cg_pt_btd_param_vals), 0, NULL, HFILL }},
1026 { &hf_h248_pkg_cg_sig_dt, { "Dial Tone (dt)", "h248.pkg.cg.dt", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1027 { &hf_h248_pkg_cg_sig_rt, { "Ring Tone (rt)", "h248.pkg.cg.rt",FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1028 { &hf_h248_pkg_cg_sig_bt, { "Buzy Tone (bt)", "h248.pkg.cg.bt", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1029 { &hf_h248_pkg_cg_sig_ct, { "Congestion Tone (ct)", "h248.pkg.cg.ct", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1030 { &hf_h248_pkg_cg_sig_sit, { "Special Information Tone (sit)", "h248.pkg.cg.sit", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1031 { &hf_h248_pkg_cg_sig_wt, { "(Recording) Warning Tone (wt)", "h248.pkg.cg.wt", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1032 { &hf_h248_pkg_cg_sig_prt, { "Payphone Recognition Tone (prt)", "h248.pkg.cg.prt", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1033 { &hf_h248_pkg_cg_sig_cw, { "Call Waiting Tone (wt)", "h248.pkg.cg.cw", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1034 { &hf_h248_pkg_cg_sig_cr, { "Caller Waiting Tone (rt)", "h248.pkg.cg.cr", FT_UINT16, BASE_HEX, VALS(h248_pkg_cg_sig_cd_evt_vals), 0, NULL, HFILL }},
1036 /* H.248.1 E.8 Call Progress Tones Detection Package */
1037 { &hf_h248_pkg_cd, { "Call Progress Tones Detection Package", "h248.pkg.cd", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1039 /* H.248.1 E.9 Analog Line Supervision Package */
1040 { &hf_h248_pkg_al, { "Analog Line Supervision Package", "h248.pkg.al", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1041 { &hf_h248_pkg_al_sig_cadence, { "Cadence", "h248.pkg.al.sig.cadence", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1042 { &hf_h248_pkg_al_sig_cadence_on_off, { "On/Off Cadence", "h248.pkg.al.sig.cadence_on_off", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1043 #if 0
1044 { &hf_h248_pkg_al_sig_freq, { "Ring Frequency", "h248.pkg.al.sig.freq", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1045 #endif
1046 { &hf_h248_pkg_al_evt_onhook, { "onhook", "h248.pkg.al.onhook", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1047 { &hf_h248_pkg_al_evt_offhook, { "offhook", "h248.pkg.al.offhook", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1048 { &hf_h248_pkg_al_evt_flashhook, { "flashhook", "h248.pkg.al.flashhook", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1049 { &hf_h248_pkg_al_evt_onhook_par_strict, { "strict", "h248.pkg.al.ev.onhook.strict", FT_UINT8, BASE_DEC, VALS(h248_pkg_al_evt_onhook_strict_vals), 0, NULL, HFILL }},
1050 { &hf_h248_pkg_al_evt_onhook_par_init, { "init", "h248.pkg.al.ev.onhook.init", FT_BOOLEAN, BASE_NONE, TFS(&h248_pkg_al_evt_onhook_par_init_vals), 0x0, NULL, HFILL }},
1051 { &hf_h248_pkg_al_evt_offhook_par_strict, { "strict", "h248.pkg.al.ev.offhook.strict", FT_UINT8, BASE_DEC, VALS(h248_pkg_al_evt_onhook_strict_vals), 0, NULL, HFILL }},
1052 { &hf_h248_pkg_al_evt_offhook_par_init, { "init", "h248.pkg.al.ev.onhook.init", FT_BOOLEAN, BASE_NONE, TFS(&h248_pkg_al_evt_offhook_par_init_vals), 0x0, NULL, HFILL }},
1053 { &hf_h248_pkg_al_evt_flashhook_par_mindur, { "Minimum duration in ms", "h248.pkg.al.ev.flashhook.mindur", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
1055 /* H.248.1 E.10 - Basic Continuity Package */
1056 { &hf_h248_pkg_ct, { "Basic Continuity package", "h248.pkg.ct", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1058 /* H.248.1 E.11 Network Package */
1059 { &hf_h248_pkg_nt, { "Network package", "h248.pkg.nt", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1061 /* H.248.1 E.12 RTP package */
1062 { &hf_h248_pkg_rtp, { "RTP package", "h248.pkg.rtp", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1063 { &hf_h248_pkg_rtp_stat_ps, { "Packets Sent", "h248.pkg.rtp.stat.ps", FT_UINT64, BASE_DEC, NULL, 0, NULL, HFILL }},
1065 /* H.248.1 E.13 TDM Circuit Package */
1066 { &hf_h248_pkg_tdmc, { "TDM Circuit Package", "h248.pkg.tdmc", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1067 { &hf_h248_pkg_tdmc_ec, { "Echo Cancellation", "h248.pkg.tdmc.ec", FT_BOOLEAN, BASE_NONE, TFS(&h248_tdmc_ec_vals), 0x0, NULL, HFILL }},
1068 { &hf_h248_pkg_tdmc_gain, { "Gain", "h248.pkg.tdmc.gain", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1071 static gint *ett[] = {
1072 /* generic 0x0001 */
1073 &ett_h248_pkg_generic_cause_evt,
1074 &ett_h248_pkg_generic,
1075 &ett_h248_pkg_generic_sc_evt,
1077 #if 0
1078 &ett_h248_pkg_root_params,
1079 #endif
1081 &ett_h248_pkg_tonegen_params,
1083 /* tonegen 0x0003 */
1084 &ett_h248_pkg_tonedet,
1085 &ett_h248_pkg_tonedet_evt_std,
1086 &ett_h248_pkg_tonedet_evt_etd,
1087 &ett_h248_pkg_tonedet_evt_ltd,
1089 /* dg 0x0005 */
1090 &ett_h248_pkg_dg,
1091 &ett_h248_pkg_dg_sig_pt,
1092 &ett_h248_pkg_dg_sig_d0,
1093 &ett_h248_pkg_dg_sig_d1,
1094 &ett_h248_pkg_dg_sig_d2,
1095 &ett_h248_pkg_dg_sig_d3,
1096 &ett_h248_pkg_dg_sig_d4,
1097 &ett_h248_pkg_dg_sig_d5,
1098 &ett_h248_pkg_dg_sig_d6,
1099 &ett_h248_pkg_dg_sig_d7,
1100 &ett_h248_pkg_dg_sig_d8,
1101 &ett_h248_pkg_dg_sig_d9,
1102 &ett_h248_pkg_dg_sig_da,
1103 &ett_h248_pkg_dg_sig_db,
1104 &ett_h248_pkg_dg_sig_dc,
1105 &ett_h248_pkg_dg_sig_dd,
1106 &ett_h248_pkg_dg_sig_ds,
1107 &ett_h248_pkg_dg_sig_do,
1109 /* dd 0x0006 */
1110 #if 0
1111 &ett_h248_pkg_dd,
1112 &ett_h248_pkg_dd_evt_std,
1113 &ett_h248_pkg_dd_evt_ltd,
1114 &ett_h248_pkg_dd_evt_etd,
1115 &ett_h248_pkg_dd_evt_ce,
1116 #endif
1118 /* 0x0007 Package cg */
1119 &ett_h248_pkg_cg_params,
1120 &ett_h248_pkg_cg_sig_pt,
1121 &ett_h248_pkg_tonegen_sig_pt,
1122 &ett_h248_pkg_cg_sig_dt,
1123 &ett_h248_pkg_cg_sig_rt,
1124 &ett_h248_pkg_cg_sig_bt,
1125 &ett_h248_pkg_cg_sig_ct,
1126 &ett_h248_pkg_cg_sig_sit,
1127 &ett_h248_pkg_cg_sig_wt,
1128 &ett_h248_pkg_cg_sig_prt,
1129 &ett_h248_pkg_cg_sig_cw,
1130 &ett_h248_pkg_cg_sig_cr,
1132 /* cd 0x0008 */
1133 &ett_h248_pkg_cd,
1135 /* al 0x0009 */
1136 &ett_h248_pkg_al,
1137 &ett_h248_pkg_al_sig_cadence,
1138 &ett_h248_pkg_al_sig_freq,
1139 &ett_h248_pkg_al_evt_flashhook,
1140 &ett_h248_pkg_al_evt_offhook,
1141 &ett_h248_pkg_al_evt_onhook,
1143 /* ct 0x000a */
1144 &ett_h248_pkg_ct,
1146 /* nt 0x000b */
1147 &ett_h248_pkg_nt,
1149 /* rtp 0x000c */
1150 &ett_h248_pkg_rtp,
1152 /* tdmc 0x000d */
1153 &ett_h248_pkg_tdmc
1156 proto_h248_annex_E = proto_register_protocol(PNAME, PSNAME, PFNAME);
1158 proto_register_field_array(proto_h248_annex_E, hf, array_length(hf));
1160 proto_register_subtree_array(ett, array_length(ett));
1162 /* MERGE_PKG_LOW is use to allow other custom version of these
1163 *H248 package to take presidence if already loaded */
1164 h248_register_package(&h248_pkg_generic,MERGE_PKG_LOW); /* 0x0001 */
1165 /* h248_register_package(&h248_pkg_root,MERGE_PKG_LOW); */ /* 0x0002 */
1166 h248_register_package(&h248_pkg_tonegen,MERGE_PKG_LOW); /* 0x0003 */
1167 h248_register_package(&h248_pkg_tonedet,MERGE_PKG_LOW); /* 0x0004 */
1168 h248_register_package(&h248_pkg_dg,MERGE_PKG_LOW); /* 0X0005 */
1169 /* h248_register_package(&h248_pkg_dd,MERGE_PKG_LOW); */ /* 0x0006 */
1170 h248_register_package(&h248_pkg_cg,MERGE_PKG_LOW); /* 0x0007 */
1171 h248_register_package(&h248_pkg_cd, MERGE_PKG_LOW); /* 0x0008 */
1172 h248_register_package(&h248_pkg_al,MERGE_PKG_LOW); /* 0x0009 */
1173 h248_register_package(&h248_pkg_ct, MERGE_PKG_LOW); /* 0x000a */
1174 h248_register_package(&h248_pkg_nt, MERGE_PKG_LOW); /* 0x000b */
1175 h248_register_package(&h248_pkg_rtp,MERGE_PKG_LOW); /* 0x000c */
1176 h248_register_package(&h248_pkg_tdmc,MERGE_PKG_LOW); /* 0x000d */