Fix a few "equality comparison with extraneous parentheses" warnings
[obnox/wireshark/wip.git] / epan / dissectors / packet-h248_3gpp.c
1 /*
2  *  packet-h248_3gpp.c
3  *  3GPP H.248 Packages
4  *
5  *  (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
6  *
7  * $Id$
8  *
9  * Wireshark - Network traffic analyzer
10  * By Gerald Combs <gerald@wireshark.org>
11  * Copyright 1998 Gerald Combs
12  *
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.
17  *
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.
22  *
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 #ifdef HAVE_CONFIG_H
29 # include "config.h"
30 #endif
31
32 #include "packet-h248.h"
33 #define PNAME  "H.248 3GPP"
34 #define PSNAME "H2483GPP"
35 #define PFNAME "h2483gpp"
36
37 #include "packet-isup.h"
38
39 /*
40  * 3GUP Package
41  * 3GPP TS 29.232 -- 15.1.1
42  */
43 static int hf_h248_package_3GUP = -1;
44
45 static int hf_h248_package_3GUP_Mode = -1;
46 static int hf_h248_package_3GUP_UPversions = -1;
47 static int hf_h248_package_3GUP_delerrsdu = -1;
48 static int hf_h248_package_3GUP_interface = -1;
49 static int hf_h248_package_3GUP_initdir = -1;
50
51 static gint ett_h248_package_3GUP = -1;
52
53 static gboolean implicit = FALSE;
54
55 static const value_string h248_3GUP_properties_vals[] = {
56         { 0x0001, "Mode" },
57         { 0x0002, "Versions" },
58         { 0x0003, "delerrsdu" },
59         { 0x0004, "interface" },
60         { 0x0005, "initdir" },
61         {0,     NULL}
62 };
63
64 static const value_string h248_3GUP_Mode_vals[] = {
65         {   0x00000001, "Transparent mode" },
66         {   0x00000002, "Support mode for predefined SDU sizes" },
67         {0,     NULL}
68 };
69
70 static const value_string h248_3GUP_upversions_vals[] = {
71         {   0x01, "Version 1" },
72         {   0x02, "Version 2" },
73         {   0x03, "Version 3" },
74         {   0x04, "Version 4" },
75         {   0x05, "Version 5" },
76         {   0x06, "Version 6" },
77         {   0x07, "Version 7" },
78         {   0x08, "Version 8" },
79         {   0x09, "Version 9" },
80         {   0x0A, "Version 10" },
81         {   0x0B, "Version 11" },
82         {   0x0C, "Version 12" },
83         {   0x0D, "Version 13" },
84         {   0x0E, "Version 14" },
85         {   0x0F, "Version 15" },
86         {   0x10, "Version 16" },
87         {0,     NULL}
88 };
89
90 static const value_string h248_3GUP_delerrsdu_vals[] = {
91         {   0x0001, "Yes" },
92         {   0x0002, "No" },
93         {   0x0003, "Not Applicable" },
94         {0,     NULL}
95 };
96
97 static const value_string h248_3GUP_interface_vals[] = {
98         {   0x0001, "RAN (Iu interface)" },
99         {   0x0002, "CN (Nb interface)" },
100         {0,     NULL}
101 };
102
103 static const value_string h248_3GUP_initdir_vals[] = {
104         {   0x0001, "Incoming" },
105         {   0x0002, "Outgoing" },
106         {0,     NULL}
107 };
108
109 static const value_string h248_3GUP_parameters[] _U_ = {
110         {   0x0001, "Mode" },
111         {   0x0002, "UPversions" },
112         {   0x0003, "Delivery of erroneous SDUs" },
113         {   0x0004, "Interface" },
114         {   0x0005, "Initialisation Direction" },
115         {0,     NULL}
116 };
117
118 static const h248_pkg_param_t h248_package_3GUP_properties[] = {
119         { 0x0001, &hf_h248_package_3GUP_Mode, h248_param_ber_integer, &implicit },
120         { 0x0002, &hf_h248_package_3GUP_UPversions, h248_param_ber_integer, &implicit },
121         { 0x0003, &hf_h248_package_3GUP_delerrsdu, h248_param_ber_integer, &implicit },
122         { 0x0004, &hf_h248_package_3GUP_interface, h248_param_ber_integer, &implicit },
123         { 0x0005, &hf_h248_package_3GUP_initdir, h248_param_ber_integer, &implicit },
124         { 0x0000, NULL, NULL, NULL }
125 };
126
127 static const h248_package_t h248_package_3GUP = {
128         0x002f,
129         &hf_h248_package_3GUP,
130         &ett_h248_package_3GUP,
131         h248_3GUP_properties_vals,
132         NULL,
133         NULL,
134         NULL,
135         h248_package_3GUP_properties,
136         NULL,
137         NULL,
138         NULL
139 };
140
141
142 /*
143  * Circuit Switched Data package
144  * 3GPP TS 29.232 -- 15.2.1
145  */
146
147 static int hf_h248_package_3GCSD = -1;
148
149 static int hf_h248_package_3GCSD_plmnbc = -1;
150 static int hf_h248_package_3GCSD_gsmchancod = -1;
151 static int hf_h248_pkg_3GCSD_evt_protres = -1;
152 static int hf_h248_pkg_3GCSD_evt_protres_result = -1;
153 static int hf_h248_pkg_3GCSD_evt_protres_cause = -1;
154 static int hf_h248_pkg_3GCSD_evt_ratechg = -1;
155 static int hf_h248_pkg_3GCSD_evt_ratechg_rate = -1;
156 static int hf_h248_pkg_3GCSD_sig_actprot = -1;
157 static int hf_h248_pkg_3GCSD_actprot_sig_localpeer = -1;
158
159 static gint ett_h248_package_3GCSD = -1;
160 static gint ett_h248_3GCSD_evt_protres = -1;
161 static gint ett_h248_3GCSD_evt_ratechg = -1;
162 static gint ett_pkg_3GCSD_sig_actprot = -1;
163
164 static const value_string h248_3GCSD_properties_vals[] = {
165         { 0x0001, "plmnbc"},
166         { 0x0002, "gsmchancod"},
167         {0,     NULL}
168 };
169
170 static const value_string h248_3GCSD_signals_vals[] _U_ = {
171         { 0x0001, "actprot" },
172         {0,     NULL}
173 };
174
175 static const value_string h248_3GCSD_signal_actprot_vals[] = {
176         { 0x0001, "localpeer" },
177         {0,     NULL}
178 };
179
180 static const value_string h248_3GCSD_events_vals[] _U_ = {
181         { 0x0001, "protres"},
182         { 0x0002, "ratechg"},
183         {0,     NULL}
184 };
185
186 static const value_string h248_3GCSD_event_protres_vals[] = {
187         { 0x0001, "result"},
188         { 0x0002, "cause"},
189         {0,     NULL}
190 };
191
192 static const value_string h248_3GCSD_event_ratechg_vals[] = {
193         { 0x0001, "rate"},
194         {0,     NULL}
195 };
196
197 static const value_string h248_3GCSD_evt_protres_result_vals[] = {
198         {1,"Success"},
199         {0,"Failure"},
200         {0,NULL}
201 };
202
203 static const value_string h248_3GCSD_evt_protres_cause_vals[] = {
204         {1,"Unsp"},
205         {2,"V8V34"},
206         {0,NULL}
207 };
208
209 static const value_string h248_3GCSD_actprot_sig_localpeer_vals[] = {
210         {0,"Orig"},
211         {1,"Term"},
212         {0,NULL}
213 };
214
215 static const h248_pkg_param_t h248_package_3GCSD_props[] = {
216         { 0x0001, &hf_h248_package_3GCSD_plmnbc, h248_param_ber_octetstring, &implicit},
217         { 0x0002, &hf_h248_package_3GCSD_gsmchancod, h248_param_ber_octetstring, &implicit },
218         { 0x0000, NULL, NULL, NULL }
219 };
220
221 static const h248_pkg_param_t h248_pkg_3GCSD_evt_protres_params[] = {
222         { 0x0001, &hf_h248_pkg_3GCSD_evt_protres_result, h248_param_ber_integer, &implicit },
223         { 0x0002, &hf_h248_pkg_3GCSD_evt_protres_cause, h248_param_ber_integer, &implicit },
224         { 0, NULL, NULL, NULL}
225 };
226
227 static const h248_pkg_param_t h248_pkg_3GCSD_evt_ratechg_params[] = {
228         { 0x0001, &hf_h248_pkg_3GCSD_evt_ratechg_rate, h248_param_ber_integer, &implicit },
229         { 0, NULL, NULL, NULL}
230 };
231
232 static const h248_pkg_evt_t h248_package_3GCSD_evts[] = {
233         { 0x0001, &hf_h248_pkg_3GCSD_evt_protres, &ett_h248_3GCSD_evt_protres, h248_pkg_3GCSD_evt_protres_params, h248_3GCSD_event_protres_vals},
234         { 0x0002, &hf_h248_pkg_3GCSD_evt_ratechg, &ett_h248_3GCSD_evt_ratechg, h248_pkg_3GCSD_evt_ratechg_params, h248_3GCSD_event_ratechg_vals},
235         { 0, NULL, NULL, NULL,NULL}
236 };
237
238 static const h248_pkg_param_t h248_pkg_3GCSD_actprot_sig_params[] = {
239         { 0x0001, &hf_h248_pkg_3GCSD_actprot_sig_localpeer, h248_param_ber_integer, &implicit },
240         { 0, NULL, NULL, NULL}
241 };
242
243 static const h248_pkg_sig_t h248_package_3GCSD_sigs[] = {
244         { 0x0010, &hf_h248_pkg_3GCSD_sig_actprot, &ett_pkg_3GCSD_sig_actprot, h248_pkg_3GCSD_actprot_sig_params, h248_3GCSD_signal_actprot_vals },
245         { 0, NULL, NULL, NULL,NULL}
246 };
247
248 static const h248_package_t h248_package_3GCSD = {
249         0x0030,
250         &hf_h248_package_3GCSD,
251         &ett_h248_package_3GCSD,
252         h248_3GCSD_properties_vals,
253         NULL,
254         NULL,
255         NULL,
256         h248_package_3GCSD_props,
257         h248_package_3GCSD_sigs,
258         h248_package_3GCSD_evts,
259         NULL
260 };
261
262
263 /*
264  * TFO package
265  * 3GPP TS 29.232 -- 15.2.2
266  */
267 static int hf_h248_package_3GTFO = -1;
268
269 static int hf_h248_pkg_3GTFO_evt_codec_modify = -1;
270 static int hf_h248_pkg_3GTFO_evt_distant_codec_list = -1;
271 static int hf_h248_pkg_3GTFO_evt_status = -1;
272 static int hf_h248_pkg_3GTFO_enable = -1;
273 static int hf_h248_pkg_3GTFO_codeclist = -1;
274 static int hf_h248_pkg_3GTFO_evt_codec_modify_optimalcodec = -1;
275 static int hf_h248_pkg_3GTFO_evt_distant_codec_list_distlist = -1;
276 static int hf_h248_pkg_3GTFO_evt_status_tfostatus = -1;
277
278 static gint ett_h248_package_3GTFO = -1;
279 static gint ett_h248_3GTFO_evt_status = -1;
280 static gint ett_h248_3GTFO_evt_distant_codec_list = -1;
281 static gint ett_h248_3GTFO_evt_codec_modify = -1;
282 static gint ett_h248_3GTFO_codec_list = -1;
283 static gint ett_h248_3GTFO_codec = -1;
284
285
286 static void dissect_3GTFO_codec_mode(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* cu _U_, void* ignored _U_) {
287         tvbuff_t* sub_tvb = NULL;
288         gint8 class;
289         gboolean pc;
290         gint32 tag;
291         asn1_ctx_t asn1_ctx;
292
293         asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
294
295         get_ber_identifier(tvb, 0, &class, &pc, &tag);
296
297         /* XXX: is this enough to guess it? */
298         if (tag==BER_UNI_TAG_OCTETSTRING) {
299                 dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, 0, hfid, &sub_tvb );
300
301                 if (sub_tvb) {
302                         proto_tree* pt = proto_item_add_subtree(asn1_ctx.created_item, ett_h248_3GTFO_codec);
303                         dissect_codec_mode(pt, sub_tvb, 0, tvb_length(tvb));
304                 }
305         } else {
306                 proto_tree_add_item(tree,hfid,tvb,0,-1,FALSE);
307         }
308
309 }
310
311 static void dissect_3GTFO_codec_list(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* cu _U_, void* ignored _U_) {
312         tvbuff_t* sub_tvb = NULL;
313         gint8 class;
314         gboolean pc;
315         gint32 tag;
316         asn1_ctx_t asn1_ctx;
317
318         asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
319
320         get_ber_identifier(tvb, 0, &class, &pc, &tag);
321
322         if (tag==BER_UNI_TAG_OCTETSTRING) {
323                 dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, 0, hfid, &sub_tvb );
324
325                 if (sub_tvb) {
326                         proto_tree* pt = proto_item_add_subtree(asn1_ctx.created_item,ett_h248_3GTFO_codec_list);
327                         int len = tvb_length(sub_tvb);
328                         int offset = 0;
329                         do {
330                                 offset = dissect_codec_mode(pt, sub_tvb, offset, len);
331                         } while(offset < len);
332                 }
333         } else {
334                 proto_tree_add_item(tree,hfid,tvb,0,-1,FALSE);
335         }
336 }
337
338
339 static const value_string h248_package_3GTFO_props_vals[] = {
340         {1,"enable"},
341         {2,"codeclist"},
342         {0,NULL}
343 };
344
345 static const value_string h248_pkg_3GTFO_evt_codec_modify_params_vals[] = {
346         {11,"optimalcodec"},
347         {0,NULL}
348 };
349
350
351 static const value_string h248_pkg_3GTFO_evt_distant_codec_list_params_vals[] = {
352         {13,"distlist"},
353         {0,NULL}
354 };
355
356 static const value_string h248_pkg_3GTFO_evt_status_params_vals[] = {
357         {1,"tfostatus"},
358         {0,NULL}
359 };
360
361
362 static const value_string h248_package_3GTFO_evts_vals[] = {
363         {10,"codec_modify"},
364         {12,"distant_codec_list"},
365         {14,"status"},
366         {0,NULL}
367 };
368
369 static const value_string tfoenable_vals[] = {
370         {1,"On"},
371         {2,"Off"},
372         {0,NULL}
373 };
374
375 static const h248_pkg_param_t h248_package_3GTFO_props[] = {
376         { 0x0001, &hf_h248_pkg_3GTFO_enable, h248_param_ber_integer, &implicit },
377         { 0x0002, &hf_h248_pkg_3GTFO_codeclist, dissect_3GTFO_codec_list, NULL }, /* Sub-list of Octet string Q.765.5 + TS 26.103 .*/
378         { 0, NULL, NULL, NULL}
379 };
380
381
382 static const h248_pkg_param_t h248_pkg_3GTFO_evt_codec_modify_params[] = {
383         { 0x0011, &hf_h248_pkg_3GTFO_evt_codec_modify_optimalcodec, dissect_3GTFO_codec_mode, NULL }, /* Q.765.5 + TS 26.103 .*/
384         { 0, NULL, NULL, NULL}
385 };
386
387
388 static const h248_pkg_param_t h248_pkg_3GTFO_evt_distant_codec_list_params[] = {
389         { 0x0013, &hf_h248_pkg_3GTFO_evt_distant_codec_list_distlist, dissect_3GTFO_codec_list, NULL }, /* Sub-list of Octet string Q.765.5 + TS 26.103 .*/
390         { 0, NULL, NULL, NULL}
391 };
392
393 static const h248_pkg_param_t h248_pkg_3GTFO_evt_status_params[] = {
394         { 0x0001, &hf_h248_pkg_3GTFO_evt_status_tfostatus, h248_param_ber_boolean, &implicit },
395         { 0, NULL, NULL, NULL}
396 };
397
398 static const h248_pkg_evt_t h248_package_3GTFO_evts[] = {
399         { 0x0010, &hf_h248_pkg_3GTFO_evt_codec_modify, &ett_h248_3GTFO_evt_codec_modify, h248_pkg_3GTFO_evt_codec_modify_params, h248_pkg_3GTFO_evt_codec_modify_params_vals},
400         { 0x0012, &hf_h248_pkg_3GTFO_evt_distant_codec_list, &ett_h248_3GTFO_evt_distant_codec_list, h248_pkg_3GTFO_evt_distant_codec_list_params, h248_pkg_3GTFO_evt_distant_codec_list_params_vals},
401         { 0x0014, &hf_h248_pkg_3GTFO_evt_status, &ett_h248_3GTFO_evt_status, h248_pkg_3GTFO_evt_status_params, h248_pkg_3GTFO_evt_status_params_vals},
402         { 0, NULL, NULL, NULL,NULL}
403 };
404
405 static const h248_package_t h248_package_3GTFO = {
406         0x0031,
407         &hf_h248_package_3GTFO,
408         &ett_h248_package_3GTFO,
409         h248_package_3GTFO_props_vals,
410         NULL,
411         h248_package_3GTFO_evts_vals,
412         NULL,
413         h248_package_3GTFO_props,
414         NULL,
415         h248_package_3GTFO_evts,
416         NULL};
417
418 /*
419  * 3G Expanded Call Progress Tones Generator Package
420  * 3GPP TS 29.232 -- 15.2.3
421  */
422 /*
423  * Modification Of Link Characteristics Bearer Capability
424  * 3GPP TS 29.232 -- 15.2.4
425  */
426 /*
427  * Enhanced Circuit Switched Data package
428  * 3GPP TS 29.232 -- 15.2.5
429  */
430 /*
431  * Cellular Text telephone Modem Text Transport
432  * 3GPP TS 29.232 -- 15.2.6
433  */
434 /*
435  * IP transport package
436  * 3GPP TS 29.232 -- 15.2.7
437  */
438 /*
439  * Flexible Tone Generator Package
440  * 3GPP TS 29.232 -- 15.2.8
441  */
442 /*
443  * Trace Package
444  * 3GPP TS 29.232 -- 15.2.9
445  */
446 /*
447  * ASCI Group call package
448  * 3GPP TS 29.232 -- 15.2.10
449  */
450
451
452 void proto_register_h248_3gpp(void) {
453         static hf_register_info hf[] = {
454                 { &hf_h248_package_3GUP_Mode,
455                 { "Mode", "h248.package_3GUP.Mode",
456                         FT_UINT32, BASE_DEC, VALS(h248_3GUP_Mode_vals), 0,
457                         NULL, HFILL }},
458                 { &hf_h248_package_3GUP_UPversions,
459                 { "UPversions", "h248.package_3GUP.upversions",
460                         FT_UINT32, BASE_DEC, VALS(h248_3GUP_upversions_vals), 0,
461                         NULL, HFILL }},
462                 { &hf_h248_package_3GUP_delerrsdu,
463                 { "Delivery of erroneous SDUs", "h248.package_3GUP.delerrsdu",
464                         FT_UINT32, BASE_DEC, VALS(h248_3GUP_delerrsdu_vals), 0,
465                         NULL, HFILL }},
466                 { &hf_h248_package_3GUP_interface,
467                 { "Interface", "h248.package_3GUP.interface",
468                         FT_UINT32, BASE_DEC, VALS(h248_3GUP_interface_vals), 0,
469                         NULL, HFILL }},
470                 { &hf_h248_package_3GUP_initdir,
471                 { "Initialisation Direction", "h248.package_3GUP.initdir",
472                         FT_UINT32, BASE_DEC, VALS(h248_3GUP_initdir_vals), 0,
473                         NULL, HFILL }},
474
475
476                 { &hf_h248_package_3GCSD,
477                 { "CSD Package", "h248.package_3GCSD",
478                         FT_BYTES, BASE_NONE, NULL, 0,
479                         "Circuit Switched Data Package", HFILL }},
480                 { &hf_h248_package_3GCSD_plmnbc,
481                 { "PLMN Bearer Capability", "h248.package_3GCSD.plmnbc",
482                         FT_BYTES, BASE_NONE, NULL, 0,
483                         "The PLMN Bearer Capability", HFILL }},
484                 { &hf_h248_package_3GCSD_gsmchancod,
485                 { "GSM channel coding", "h248.package_3GCSD.gsmchancod",
486                         FT_BYTES, BASE_NONE, NULL, 0,
487                         "Channel information needed for GSM", HFILL }},
488                 { &hf_h248_pkg_3GCSD_evt_protres,
489                 { "Protocol Negotiation Result", "h248.package_3GCSD.protres",
490                         FT_BYTES, BASE_NONE, NULL, 0,
491                         "This event is used to report the result of the protocol negotiation", HFILL }},
492                 { &hf_h248_pkg_3GCSD_evt_protres_result,
493                 { "Negotiation Result", "h248.package_3GCSD.protres.result",
494                         FT_UINT32, BASE_DEC, VALS(h248_3GCSD_evt_protres_result_vals), 0,
495                         "reports whether the protocol negotiation has been successful", HFILL }},
496                 { &hf_h248_pkg_3GCSD_evt_protres_cause,
497                 { "Possible Failure Cause", "h248.package_3GCSD.protres.cause",
498                         FT_UINT32, BASE_DEC, VALS(h248_3GCSD_evt_protres_cause_vals), 0,
499                         "indicates the possible failure cause", HFILL }},
500                 { &hf_h248_pkg_3GCSD_evt_ratechg,
501                 { "Rate Change", "h248.package_3GCSD.ratechg",
502                         FT_BYTES, BASE_NONE, NULL, 0,
503                         "This event is used to report a rate change", HFILL }},
504                 { &hf_h248_pkg_3GCSD_evt_ratechg_rate,
505                 { "New Rate", "h248.package_3GCSD.ratechg.rate",
506                         FT_UINT32, BASE_DEC, NULL, 0,
507                         "reports the new rate for the termination", HFILL }},
508                 { &hf_h248_pkg_3GCSD_sig_actprot,
509                 { "Activate Protocol", "h248.package_3GCSD.actprot",
510                         FT_BYTES, BASE_NONE, NULL, 0,
511                         "Activate the higher layer protocol", HFILL }},
512                 { &hf_h248_pkg_3GCSD_actprot_sig_localpeer,
513                 { "Local Peer Role", "h248.package_3GCSD.actprot.localpeer",
514                         FT_UINT32, BASE_DEC, VALS(h248_3GCSD_actprot_sig_localpeer_vals), 0,
515                         "It is used to inform the modem whether it should act as originating or terminating peer", HFILL }},
516
517
518                 { &hf_h248_package_3GTFO,
519                 { "Tandem Free Operation", "h248.package_3GTFO",
520                         FT_BYTES, BASE_NONE, NULL, 0,
521                         "This package defines events and properties for Tandem Free Operation (TFO) control", HFILL }},
522                 { &hf_h248_pkg_3GTFO_enable,
523                 { "TFO Activity Control", "h248.package_3GTFO.tfoenable",
524                         FT_UINT32, BASE_DEC, VALS(tfoenable_vals), 0,
525                         "Defines if TFO is enabled or not", HFILL }},
526                 { &hf_h248_pkg_3GTFO_codeclist,
527                 { "TFO Codec List", "h248.package_3GTFO.codeclist",
528                         FT_BYTES, BASE_NONE, NULL, 0,
529                         "List of codecs for use in TFO protocol", HFILL }},
530
531                 { &hf_h248_pkg_3GTFO_evt_codec_modify,
532                 { "Optimal Codec Event", "h248.package_3GTFO.codec_modify",
533                         FT_BYTES, BASE_NONE, NULL, 0,
534                         "The event is used to notify the MGC that TFO negotiation has resulted in an optimal codec type being proposed", HFILL }},
535                 { &hf_h248_pkg_3GTFO_evt_codec_modify_optimalcodec,
536                 { "Optimal Codec Type", "h248.package_3GTFO.codec_modify.optimalcodec",
537                         FT_BYTES, BASE_NONE, NULL, 0,
538                         "indicates which is the proposed codec type for TFO", HFILL }},
539
540                 { &hf_h248_pkg_3GTFO_evt_distant_codec_list,
541                 { "Codec List Event", "h248.package_3GTFO.distant_codec_list",
542                         FT_BYTES, BASE_NONE, NULL, 0,
543                         "The event is used to notify the MGC of the distant TFO partner's supported codec list", HFILL }},
544
545                 { &hf_h248_pkg_3GTFO_evt_distant_codec_list_distlist,
546                 { "Distant Codec List", "h248.package_3GTFO.distant_codec_list.distlist",
547                         FT_BYTES, BASE_NONE, NULL, 0,
548                         "indicates the codec list for TFO", HFILL }},
549
550                 { &hf_h248_pkg_3GTFO_evt_status,
551                 { "TFO Status Event", "h248.package_3GTFO.status",
552                         FT_BYTES, BASE_NONE, NULL, 0,
553                         "The event is used to notify the MGC that a TFO link has been established or broken", HFILL }},
554                 { &hf_h248_pkg_3GTFO_evt_status_tfostatus,
555                 { "TFO Status", "h248.package_3GTFO.status.tfostatus",
556                         FT_BOOLEAN, BASE_NONE, NULL, 0x0,
557                         "reports whether TFO has been established or broken", HFILL }},
558         };
559
560         static gint *ett[] = {
561                 &ett_h248_package_3GUP,
562                 &ett_h248_package_3GCSD,
563                 &ett_h248_3GCSD_evt_protres,
564                 &ett_h248_3GCSD_evt_ratechg,
565                 &ett_h248_package_3GTFO,
566                 &ett_h248_3GTFO_evt_status,
567                 &ett_h248_3GTFO_evt_distant_codec_list,
568                 &ett_h248_3GTFO_evt_codec_modify,
569                 &ett_h248_3GTFO_codec_list,
570                 &ett_h248_3GTFO_codec,
571                 &ett_pkg_3GCSD_sig_actprot
572         };
573
574         hf_h248_package_3GUP = proto_register_protocol(PNAME, PSNAME, PFNAME);
575
576         proto_register_field_array(hf_h248_package_3GUP, hf, array_length(hf));
577
578         proto_register_subtree_array(ett, array_length(ett));
579
580         h248_register_package(&h248_package_3GUP);
581         h248_register_package(&h248_package_3GCSD);
582         h248_register_package(&h248_package_3GTFO);
583 }
584