1 /*
2  *  packet-h248_annex_c.c
3  *  H.248 annex C
4  *
5  *  (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
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 
14 #include "config.h"
15 
16 #include <epan/packet.h>
17 #include <epan/exceptions.h>
18 #include <epan/asn1.h>
19 #include <epan/expert.h>
20 #include <wsutil/strtoi.h>
21 
22 #include "packet-ber.h"
23 #include "packet-isup.h"
24 #include "packet-q931.h"
25 #include "packet-h248.h"
26 
27 void proto_register_h248_annex_c(void);
28 void proto_reg_handoff_h248_annex_c(void);
29 
30 
31 #define PNAME  "H.248 Annex C"
32 #define PSNAME "H248C"
33 #define PFNAME "h248.annexc"
34 
35 /* H.248 Annex C */
36 static int proto_h248_pkg_annexc = -1;
37 
38 static int hf_h248_sdp_connection_info = -1;
39 static int hf_h248_sdp_media_port = -1;
40 
41 static int hf_h248_pkg_annexc_media = -1;
42 static int hf_h248_pkg_annexc_ACodec = -1;
43 static int hf_h248_pkg_annexc_Mediatx = -1;
44 static int hf_h248_pkg_annexc_NSAP = -1;
45 static int hf_h248_pkg_annexc_BIR = -1;
46 static int hf_h248_pkg_annexc_transmission_mode = -1;
47 static int hf_h248_pkg_annexc_num_of_channels = -1;
48 static int hf_h248_pkg_annexc_sampling_rate = -1;
49 static int hf_h248_pkg_annexc_bit_rate = -1;
50 static int hf_h248_pkg_annexc_samplepp = -1;
51 static int hf_h248_pkg_annexc_silence_supp = -1;
52 static int hf_h248_pkg_annexc_encrypt_type = -1;
53 static int hf_h248_pkg_annexc_encrypt_key = -1;
54 static int hf_h248_pkg_annexc_gain = -1;
55 static int hf_h248_pkg_annexc_jitterbuf = -1;
56 static int hf_h248_pkg_annexc_propdelay = -1;
57 static int hf_h248_pkg_annexc_rtp_payload = -1;
58 
59 static int hf_h248_pkg_annexc_h222 = -1;
60 static int hf_h248_pkg_annexc_h223 = -1;
61 static int hf_h248_pkg_annexc_v76 = -1;
62 static int hf_h248_pkg_annexc_h2250 = -1;
63 
64 static int hf_h248_pkg_annexc_aesa = -1;
65 static int hf_h248_pkg_annexc_vp = -1;
66 static int hf_h248_pkg_annexc_vc = -1;
67 static int hf_h248_pkg_annexc_sc = -1;
68 static int hf_h248_pkg_annexc_bcob = -1;
69 static int hf_h248_pkg_annexc_bbtc = -1;
70 static int hf_h248_pkg_annexc_atc = -1;
71 static int hf_h248_pkg_annexc_stc = -1;
72 static int hf_h248_pkg_annexc_uppc = -1;
73 static int hf_h248_pkg_annexc_pcr0 = -1;
74 static int hf_h248_pkg_annexc_scr0 = -1;
75 static int hf_h248_pkg_annexc_mbs0 = -1;
76 static int hf_h248_pkg_annexc_pcr1 = -1;
77 static int hf_h248_pkg_annexc_scr1 = -1;
78 static int hf_h248_pkg_annexc_mbs1 = -1;
79 static int hf_h248_pkg_annexc_bei = -1;
80 static int hf_h248_pkg_annexc_ti = -1;
81 static int hf_h248_pkg_annexc_fd = -1;
82 static int hf_h248_pkg_annexc_a2pcdv = -1;
83 static int hf_h248_pkg_annexc_c2pcdv = -1;
84 static int hf_h248_pkg_annexc_appcdv = -1;
85 static int hf_h248_pkg_annexc_cppcdv = -1;
86 static int hf_h248_pkg_annexc_aclr = -1;
87 static int hf_h248_pkg_annexc_meetd = -1;
88 static int hf_h248_pkg_annexc_ceetd = -1;
89 static int hf_h248_pkg_annexc_QosClass = -1;
90 static int hf_h248_pkg_annexc_AALtype = -1;
91 
92 static int hf_h248_pkg_annexc_dlci = -1;
93 static int hf_h248_pkg_annexc_cid = -1;
94 static int hf_h248_pkg_annexc_sid = -1;
95 static int hf_h248_pkg_annexc_ppt = -1;
96 
97 static int hf_h248_pkg_annexc_ipv4 = -1;
98 static int hf_h248_pkg_annexc_ipv6 = -1;
99 static int hf_h248_pkg_annexc_port = -1;
100 static int hf_h248_pkg_annexc_porttype = -1;
101 
102 static int hf_h248_pkg_annexc_alc = -1;
103 static int hf_h248_pkg_annexc_sut = -1;
104 static int hf_h248_pkg_annexc_tci = -1;
105 static int hf_h248_pkg_annexc_timer_cu = -1;
106 static int hf_h248_pkg_annexc_maxcpssdu = -1;
107 
108 static int hf_h248_pkg_annexc_aal1st = -1;
109 static int hf_h248_pkg_annexc_cbrr = -1;
110 static int hf_h248_pkg_annexc_scri = -1;
111 static int hf_h248_pkg_annexc_ecm = -1;
112 static int hf_h248_pkg_annexc_sdbt = -1;
113 static int hf_h248_pkg_annexc_pfci = -1;
114 
115 static int hf_h248_pkg_annexc_tmr = -1;
116 static int hf_h248_pkg_annexc_tmrsr = -1;
117 static int hf_h248_pkg_annexc_contcheck = -1;
118 static int hf_h248_pkg_annexc_itc = -1;
119 static int hf_h248_pkg_annexc_transmode = -1;
120 static int hf_h248_pkg_annexc_transrate = -1;
121 static int hf_h248_pkg_annexc_mult = -1;
122 static int hf_h248_pkg_annexc_syncasync = -1;
123 static int hf_h248_pkg_annexc_negotiation = -1;
124 static int hf_h248_pkg_annexc_userrate = -1;
125 static int hf_h248_pkg_annexc_intrate = -1;
126 static int hf_h248_pkg_annexc_nictx = -1;
127 static int hf_h248_pkg_annexc_nicrx = -1;
128 static int hf_h248_pkg_annexc_flowconttx = -1;
129 static int hf_h248_pkg_annexc_flowcontrx = -1;
130 static int hf_h248_pkg_annexc_rateadapthdr = -1;
131 static int hf_h248_pkg_annexc_multiframe = -1;
132 static int hf_h248_pkg_annexc_opmode = -1;
133 static int hf_h248_pkg_annexc_llidnegot = -1;
134 static int hf_h248_pkg_annexc_assign = -1;
135 static int hf_h248_pkg_annexc_inbandneg = -1;
136 static int hf_h248_pkg_annexc_stopbits = -1;
137 static int hf_h248_pkg_annexc_databits = -1;
138 static int hf_h248_pkg_annexc_parity = -1;
139 static int hf_h248_pkg_annexc_duplexmode = -1;
140 static int hf_h248_pkg_annexc_modem = -1;
141 static int hf_h248_pkg_annexc_layer2prot = -1;
142 static int hf_h248_pkg_annexc_layer3prot = -1;
143 static int hf_h248_pkg_annexc_addlayer3prot = -1;
144 static int hf_h248_pkg_annexc_dialedn = -1;
145 static int hf_h248_pkg_annexc_dialingn = -1;
146 static int hf_h248_pkg_annexc_echoci = -1;
147 static int hf_h248_pkg_annexc_nci = -1;
148 static int hf_h248_pkg_annexc_USI = -1;
149 
150 static int hf_h248_pkg_annexc_fmsdu = -1;
151 static int hf_h248_pkg_annexc_bmsdu = -1;
152 static int hf_h248_pkg_annexc_sscs = -1;
153 
154 static int hf_h248_pkg_annexc_sdp_v = -1;
155 static int hf_h248_pkg_annexc_sdp_o = -1;
156 static int hf_h248_pkg_annexc_sdp_s = -1;
157 static int hf_h248_pkg_annexc_sdp_i = -1;
158 static int hf_h248_pkg_annexc_sdp_u = -1;
159 static int hf_h248_pkg_annexc_sdp_e = -1;
160 static int hf_h248_pkg_annexc_sdp_p = -1;
161 static int hf_h248_pkg_annexc_sdp_c = -1;
162 static int hf_h248_pkg_annexc_sdp_b = -1;
163 static int hf_h248_pkg_annexc_sdp_z = -1;
164 static int hf_h248_pkg_annexc_sdp_k = -1;
165 static int hf_h248_pkg_annexc_sdp_a = -1;
166 static int hf_h248_pkg_annexc_sdp_t = -1;
167 static int hf_h248_pkg_annexc_sdp_r = -1;
168 static int hf_h248_pkg_annexc_sdp_m = -1;
169 
170 static int hf_h248_pkg_annexc_olc = -1;
171 static int hf_h248_pkg_annexc_olcack = -1;
172 static int hf_h248_pkg_annexc_olccnf = -1;
173 static int hf_h248_pkg_annexc_olcrej = -1;
174 static int hf_h248_pkg_annexc_clc = -1;
175 static int hf_h248_pkg_annexc_clcack = -1;
176 
177 static expert_field ei_h248_sdp_media_port_invalid = EI_INIT;
178 
179 static gint ett_annexc = -1;
180 static gint ett_vpvc = -1;
181 static gint ett_codec = -1;
182 
183 static const value_string h248_annexc_package_properties_vals[] = {
184 	{ 0x0000, "Media stream properties H.248.1 Annex C" },
185 	{ 0x1001, "media" },
186 	{ 0x1002, "transmission mode" },
187 	{ 0x1003, "num_of_channels" },
188 	{ 0x1004, "sampling_rate" },
189 	{ 0x1005, "bit_rate" },
190 	{ 0x1006, "ACodec" },
191 	{ 0x1007, "samplepp" },
192 	{ 0x1008, "silence_supp" },
193 	{ 0x1009, "encrypt_type" },
194 	{ 0x100A, "encrypt_key" },
195 	{ 0x100B, "echo canceller" },
196 	{ 0x100C, "gain" },
197 	{ 0x100D, "jitterbuf" },
198 	{ 0x100E, "propdelay" },
199 	{ 0x100F, "rtp_payload" },
200 
201 	{ 0x2001, "h222" },
202 	{ 0x2002, "h223" },
203 	{ 0x2003, "v76" },
204 	{ 0x2004, "h2250" },
205 
206 	{ 0x3001, "Mediatx" },
207 	{ 0x3002, "BIR" },
208 	{ 0x3003, "NSAP" },
209 
210 	{ 0x4001, "aesa" },
211 	{ 0x4002, "vp" },
212 	{ 0x4003, "sc" },
213 	{ 0x4004, "bcob" },
214 	{ 0x4005, "bbtc" },
215 	{ 0x4006, "atc" },
216 	{ 0x4007, "stc" },
217 	{ 0x4008, "uppc" },
218 	{ 0x4009, "pcr0" },
219 	{ 0x400a, "scr0" },
220 	{ 0x400b, "mbs0" },
221 	{ 0x400c, "pcr1" },
222 	{ 0x400d, "scr1" },
223 	{ 0x400e, "mbs1" },
224 	{ 0x400f, "bei" },
225 	{ 0x4010, "ti" },
226 	{ 0x4011, "fd" },
227 	{ 0x4012, "a2pcdv" },
228 	{ 0x4013, "c2pcdv" },
229 	{ 0x4014, "appcdv" },
230 	{ 0x4015, "cppcdv" },
231 	{ 0x4016, "aclr" },
232 	{ 0x4017, "meetd" },
233 	{ 0x4018, "ceetd" },
234 	{ 0x4019, "QosClass" },
235 	{ 0x401a, "AALtype" },
236 
237 	{ 0x5001, "DLCI" },
238 	{ 0x5002, "CID" },
239 	{ 0x5003, "SID/Noiselevel" },
240 	{ 0x5004, "PPT" },
241 
242 	{ 0x6001, "IPv4" },
243 	{ 0x6002, "IPv6" },
244 	{ 0x6003, "Port" },
245 	{ 0x6004, "Porttype" },
246 
247 	{ 0x7001, "AESA" },
248 	{ 0x7002, "ALC" },
249 	{ 0x7003, "SSCS" },
250 	{ 0x7004, "SUT" },
251 	{ 0x7005, "TCI" },
252 	{ 0x7006, "Timer_CU" },
253 	{ 0x7007, "MaxCPSSDU" },
254 	{ 0x7008, "CID" },
255 
256 	{ 0x8001, "AAL1ST" },
257 	{ 0x8002, "CBRR" },
258 	{ 0x8003, "SCRI" },
259 	{ 0x8004, "ECM" },
260 	{ 0x8005, "SDTB" },
261 	{ 0x8006, "PFCI" },
262 
263 	{ 0x9001, "TMR" },
264 	{ 0x9008, "USI" },
265 	{ 0x9009, "syncasync" },
266 	{ 0x900a, "negotiation" },
267 	{ 0x900b, "userrate" },
268 	{ 0x900c, "intrate" },
269 	{ 0x900d, "nictx" },
270 	{ 0x900e, "nicrx" },
271 	{ 0x900f, "flowconttx" },
272 	{ 0x9010, "flowcontrx" },
273 	{ 0x9011, "rateadapthdr" },
274 	{ 0x9012, "multiframe" },
275 	{ 0x9013, "opmode" },
276 	{ 0x9014, "llnegot" },
277 	{ 0x9015, "assign" },
278 	{ 0x9016, "inbandneg" },
279 	{ 0x9017, "stopbits" },
280 	{ 0x9018, "databits" },
281 	{ 0x9019, "parity" },
282 	{ 0x901a, "duplexmode" },
283 	{ 0x901b, "modem" },
284 	{ 0x901c, "layer2prot" },
285 	{ 0x901d, "layer3prot" },
286 	{ 0x901e, "addlayer3prot" },
287 	{ 0x901f, "DialledN" },
288 	{ 0x9020, "DiallingN" },
289 	{ 0x9021, "ECHOCI" },
290 	{ 0x9022, "NCI" },
291 	{ 0x9023, "USI" },
292 
293 	{ 0xA001, "FMSDU" },
294 	{ 0xA002, "BMSDU" },
295 
296 	{ 0xB001, "SDP_V (Protocol Version)" },
297 	{ 0xB002, "SDP_O (Owner/creator)" },
298 	{ 0xB003, "SDP_S (Session Name)" },
299 	{ 0xB004, "SDP_I (Session Identifier)" },
300 	{ 0xB005, "SDP_U (URI)" },
301 	{ 0xB006, "SDP_E (email address)" },
302 	{ 0xB007, "SDP_P (phone number)" },
303 	{ 0xB008, "SDP_C (connection)" },
304 	{ 0xB009, "SDP_B (bandwidth info)" },
305 	{ 0xB00A, "SDP_Z (TZ adjustment)" },
306 	{ 0xB00B, "SDP_K (encryption key)" },
307 	{ 0xB00C, "SDP_A (Session attributes)" },
308 	{ 0xB00D, "SDP_T (Active Session Time)" },
309 	{ 0xB00E, "SDP_R (Repeat times)" },
310 	{ 0xB00F, "SDP_M (Media type, portm transport and format)" },
311 
312 	{ 0xC001, "OLC" },
313 	{ 0xC002, "OLCack" },
314 	{ 0xC003, "OLCcnf" },
315 	{ 0xC004, "OLCrej" },
316 	{ 0xC005, "CLC" },
317 	{ 0xC006, "CLCack" },
318 
319 	{ 0,NULL }
320 };
321 
322 
323 
324 static const value_string h248_annexc_media_vals[] = {
325 	{   0, "Audio" },
326 	{   1, "Video" },
327 	{   2, "Data" },
328 	{   0,NULL }
329 };
330 
331 static const value_string h248_pkg_annexc_Mediatx_vals[] = {
332 	{   0x0000, "TDM Circuit" },
333 	{   0x0001, "ATM" },
334 	{   0x0002, "FR" },
335 	{   0x0003, "Ipv4" },
336 	{   0x0004, "Ipv6" },
337 	{0,     NULL}
338 };
339 
340 static const value_string h248_annexc_transmission_mode[] = {
341 	{0, "Send"},
342 	{1, "Receive"},
343 	{2, "Send&Receive"},
344 	{0,NULL}
345 };
346 
347 static const value_string h248_pkg_annexc_sc[] _U_ = {
348 	{0, "CBR"},
349 	{1, "nrt-VBR1"},
350 	{2, "nrt-VBR2"},
351 	{3, "nrt-VBR3"},
352 	{4, "rt-VBR1"},
353 	{5, "rt-VBR2"},
354 	{6, "rt-VBR3"},
355 	{7, "UBR1"},
356 	{8, "UBR2"},
357 	{9, "ABR"},
358 	{0,NULL}
359 };
360 
361 static const value_string h248_pkg_annexc_atc_values[] = {
362 	{0, "DBR"},
363 	{1, "SBR1"},
364 
365 	{2, "SBR2"},
366 	{3, "SBR3"},
367 	{4, "ABT/IT"},
368 	{5, "ABT/DT"},
369 	{6, "ABR"},
370 	{0,NULL}
371 };
372 
373 static const value_string h248_pkg_annexc_stc_values[] = {
374 	{0, "Not Susceptible to clipping"},
375 	{1, "Susceptible to clipping"},
376 	{0,NULL}
377 };
378 
379 static const value_string h248_pkg_annexc_uppc_values[] = {
380 	{0, "point-to-point"},
381 	{1, "point-to-multipoint"},
382 	{0,NULL}
383 };
384 
385 static const value_string h248_pkg_annexc_syncasync_values[] = {
386 	{0, "Synchronous Data"},
387 	{1, "Asynchronous Data"},
388 	{0,NULL}
389 };
390 
391 static const value_string h248_pkg_annexc_negotiation_values[] = {
392 	{0, "In-Band negotiation possible"},
393 	{1, "In-Band negotiation not possible"},
394 	{0,NULL}
395 };
396 
397 static const value_string h248_pkg_annexc_userrate_values[] = {
398 	{0x0, "E-Bit specified I.460 or higher negotiated in-band"},
399 	{0x1, "0.6 kbps (X.1)"},
400 	{0x2, "1.2 kbps"},
401 	{0x3, "2.4 kbps (X.1)"},
402 	{0x4, "3.6 kbps"},
403 	{0x5, "4.8 kbps (X.1)"},
404 	{0x6, "7.2 kbps"},
405 	{0x7, "8 kbps (I.460)"},
406 	{0x8, "9.6 kbps (X.1)"},
407 	{0x9, "14.4 kbps"},
408 	{0xa, "16 kbps (I.460)"},
409 	{0xb, "19.2 kbps"},
410 	{0xc, "32 kbps (I.460)"},
411 	{0xd, "38.4 kbps (V.110)"},
412 	{0xe, "48 kbps (X.1)"},
413 	{0xf, "56 kbps"},
414 
415 	{0x12, "57.6 kbps (V.14 extended)"},
416 	{0x13, "28.8 kbps (V.110)"},
417 	{0x14, "24 kbps (V.110)"},
418 	{0x15, "0.1345 kbps (X.1)"},
419 	{0x16, "0.100 kbps (X.1)"},
420 	{0x17, "0.075/1.2 kbps (X.1)"},
421 	{0x18, "1.2/0.075 kbps (X.1)"},
422 	{0x19, "0.050 kbps (X.1)"},
423 	{0x1a, "0.075 kbps (X.1)"},
424 	{0x1b, "0.110 kbps (X.1)"},
425 	{0x1c, "0.150 kbps (X.1)"},
426 	{0x1d, "0.200 kbps (X.1)"},
427 	{0x1e, "0.300 kbps (X.1)"},
428 	{0x1f, "12 kbps (X.1)"},
429 	{0,NULL}
430 };
431 
432 static const value_string h248_pkg_annexc_intrate_values[] = {
433 	{0x0, "Not Used"},
434 	{0x1, "8 kbps"},
435 	{0x2, "16 kbps"},
436 	{0x3, "32 kbps"},
437 	{0,NULL}
438 };
439 
440 
441 static const value_string h248_pkg_annexc_nictx_values[] = {
442 	{0, "Not required to transmit with NIC"},
443 	{1, "Required to transmit with NIC"},
444 	{0,NULL}
445 };
446 
447 static const value_string h248_pkg_annexc_nicrx_values[] = {
448 	{0, "Cannot accept data with NIC"},
449 	{1, "Can accept data with NIC"},
450 	{0,NULL}
451 };
452 
453 
454 static const value_string h248_pkg_annexc_flowconttx_values[] = {
455 	{0, "Not Required"},
456 	{1, "Required"},
457 	{0,NULL}
458 };
459 
460 static const value_string h248_pkg_annexc_flowcontrx_values[] = {
461 	{0, "Cannot accept data with flow control mechanism"},
462 	{1, "Can accept data with flow control mechanism"},
463 	{0,NULL}
464 };
465 
466 static const value_string h248_pkg_annexc_rateadapthdr_values[] = {
467 	{0, "not included"},
468 	{1, "included"},
469 	{0,NULL}
470 };
471 
472 static const value_string h248_pkg_annexc_multiframe_values[] = {
473 	{0, "not supported"},
474 	{1, "supported"},
475 	{0,NULL}
476 };
477 
478 static const value_string h248_pkg_annexc_opmode_values[] = {
479 	{0, "bit transparent"},
480 	{1, "protocol sensitive"},
481 	{0,NULL}
482 };
483 
484 static const value_string h248_pkg_annexc_llidnegot_values[] = {
485 	{0, "Default, LLI=256 only"},
486 	{1, "Full protocol negotiation"},
487 	{0,NULL}
488 };
489 
490 static const value_string h248_pkg_annexc_assign_values[] = {
491 	{0, "Originator is default assignee"},
492 	{1, "Originator is assignor only"},
493 	{0,NULL}
494 };
495 
496 static const value_string h248_pkg_annexc_inbandneg_values[] = {
497 	{0, "negotiation on temporary signalling connection"},
498 	{1, "negotiation in-band"},
499 	{0,NULL}
500 };
501 
502 static const value_string h248_pkg_annexc_stopbits_values[] = {
503 	{0, "none"},
504 	{1, "1 bit"},
505 	{2, "1.5 bits"},
506 	{3, "2 bits"},
507 	{0,NULL}
508 };
509 
510 
511 static const value_string h248_pkg_annexc_databits_values[] = {
512 	{0, "Not Used"},
513 	{1, "5 bits"},
514 	{2, "7 bits"},
515 	{3, "8 bits"},
516 	{0,NULL}
517 };
518 
519 
520 static const value_string h248_pkg_annexc_parity_values[] = {
521 	{0, "Odd"},
522 	{2, "Even"},
523 	{3, "None"},
524 	{4, "Forced to 0"},
525 	{5, "Forced to 1"},
526 	{0,NULL}
527 };
528 
529 
530 static const value_string h248_pkg_annexc_duplexmode_values[] = {
531 	{0, "Half Duplex"},
532 	{1, "Full Duplex"},
533 	{0,NULL}
534 };
535 
536 
537 static const value_string h248_pkg_annexc_modem_values[] = {
538 	{0x00, "National Use"},
539 	{0x01, "National Use"},
540 	{0x02, "National Use"},
541 	{0x03, "National Use"},
542 	{0x04, "National Use"},
543 	{0x05, "National Use"},
544 
545 	{0x11, "V.21"},
546 	{0x12, "V.22"},
547 	{0x13, "V.22bis"},
548 	{0x14, "V.23"},
549 	{0x15, "V.26"},
550 	{0x16, "V.26bis"},
551 	{0x17, "V.26ter"},
552 	{0x18, "V.27"},
553 	{0x19, "V.27bis"},
554 	{0x1A, "V.27ter"},
555 	{0x1B, "V.29"},
556 	{0x1D, "V.32"},
557 	{0x1E, "V.34"},
558 
559 	{0x20, "National Use"},
560 	{0x21, "National Use"},
561 	{0x22, "National Use"},
562 	{0x23, "National Use"},
563 	{0x24, "National Use"},
564 	{0x25, "National Use"},
565 	{0x26, "National Use"},
566 	{0x27, "National Use"},
567 	{0x28, "National Use"},
568 	{0x29, "National Use"},
569 	{0x2a, "National Use"},
570 	{0x2b, "National Use"},
571 	{0x2c, "National Use"},
572 	{0x2d, "National Use"},
573 	{0x2e, "National Use"},
574 	{0x2f, "National Use"},
575 
576 	{0x30, "User Specified"},
577 	{0x31, "User Specified"},
578 	{0x32, "User Specified"},
579 	{0x33, "User Specified"},
580 	{0x34, "User Specified"},
581 	{0x35, "User Specified"},
582 	{0x36, "User Specified"},
583 	{0x37, "User Specified"},
584 	{0x38, "User Specified"},
585 	{0x39, "User Specified"},
586 	{0x3a, "User Specified"},
587 	{0x3b, "User Specified"},
588 	{0x3c, "User Specified"},
589 	{0x3d, "User Specified"},
590 	{0x3e, "User Specified"},
591 	{0x3f, "User Specified"},
592 
593 	{0,NULL}
594 };
595 
596 
597 static const value_string h248_pkg_annexc_layer2prot_values[] = {
598 	{0x2, "Q.921/I.441"},
599 	{0x6, "X.25, link layer"},
600 	{0xC, "LLC (ISO/IEC 8802-2)"},
601 	{0,NULL}
602 };
603 
604 static const value_string h248_pkg_annexc_layer3prot_values[] = {
605 	{0x2, "Q.921/I.441"},
606 	{0x6, "X.25, packet layer"},
607 	{0xC, "IP, ISO/IEC TR 9577"},
608 	{0,NULL}
609 };
610 
611 static const value_string h248_pkg_annexc_addlayer3prot_values[] = {
612 	{0xCC, "IP (RFC 791)"},
613 	{0xCF, "PPP (RFC 1661)"},
614 	{0,NULL}
615 };
616 
617 #if 0
618 static const value_string h248_pkg_annexc_nci_satellite_values[] _U_ = {
619 	{0x0, "no satellite circuit"},
620 	{0x1, "one satellite circuit"},
621 	{0x2, "two satellite circuits"},
622 	{0x3, "spare"},
623 	{0,NULL}
624 };
625 
626 static const value_string h248_pkg_annexc_nci_continuity_values[] _U_ = {
627 	{0x0, "continuity check not required"},
628 	{0x1, "continuity check required on this circuit"},
629 	{0x2, "continuity check performed on a previous circuit"},
630 	{0x3, "spare"},
631 	{0,NULL}
632 };
633 
634 static const value_string h248_pkg_annexc_nci_echoctl_values[] _U_ = {
635 	{0x0, "outgoing echo control device not included"},
636 	{0x1, "outgoing echo control device included"},
637 	{0,NULL}
638 };
639 #endif
640 
641 static const value_string h248_pkg_annexc_QosClass_values[] = {
642 	{0x0, "Default"},
643 	{0x1, "Stringent"},
644 	{0x2, "Tolerant"},
645 	{0x3, "Bi-Level"},
646 	{0x4, "Unbounded"},
647 	{0x5, "Stringent Bi-level"},
648 	{0,NULL}
649 };
650 
651 static const value_string h248_pkg_annexc_AALtype_values[] = {
652 	{0x0, "AAL for Voice"},
653 	{0x1, "AAL1"},
654 	{0x2, "AAL2"},
655 	{0x3, "AAL3/4"},
656 	{0x5, "AAL5"},
657 	{0x10, "User Defined"},
658 	{0,NULL}
659 };
660 
661 static const value_string h248_pkg_annexc_porttype_values[] = {
662 	{0x0, "TCP"},
663 	{0x1, "UDP"},
664 	{0x2, "SCTP"},
665 	{0,NULL}
666 };
667 
668 static const value_string h248_pkg_annexc_aal1st_values[] = {
669 	{0x0, "null"},
670 	{0x1, "voiceband signal transport on 64kbps"},
671 	{0x2, "circuit transport"},
672 	{0x4, "high quality audio signal transport"},
673 	{0x5, "video signal transport"},
674 	{0,NULL}
675 };
676 
677 static const value_string h248_pkg_annexc_cbrr_values[] = {
678 	{0x01, "64 kbps"},
679 	{0x04, "1544 kbps"},
680 	{0x05, "6312 kbps"},
681 	{0x06, "32064 kbps"},
682 	{0x07, "44736 kbps"},
683 	{0x08, "44736 kbps"},
684 	{0x10, "2048 kbps"},
685 	{0x11, "8448 kbps"},
686 	{0x12, "34368 kbps"},
687 	{0x13, "139264 kbps"},
688 	{0x40, "n * 64 kbps"},
689 	{0x41, "n * 8 kbps"},
690 	{0,NULL}
691 };
692 
693 static const value_string h248_pkg_annexc_scri_values[] = {
694 	{0x0, "null"},
695 	{0x1, "SRTS"},
696 	{0x2, "ACM"},
697 	{0,NULL}
698 };
699 
700 
701 static const value_string h248_pkg_annexc_ecm_values[] = {
702 	{0x0, "null"},
703 	{0x1, "FEC - Loss"},
704 	{0x2, "FEC - Delay"},
705 	{0,NULL}
706 };
707 
708 
709 static const value_string h248_pkg_annexc_tmrsr_values[] = {
710 	/* TO DO */
711 	{0,NULL}
712 };
713 
714 
715 static const value_string h248_pkg_annexc_contcheck_values[] = {
716 	/* TO DO */
717 	{0,NULL}
718 };
719 
720 static const value_string h248_pkg_annexc_itc_values[] = {
721 	/* TO DO */
722 	{0,NULL}
723 };
724 
725 
726 static const value_string h248_pkg_annexc_transmode_values[] = {
727 	/* TO DO */
728 	{0,NULL}
729 };
730 
731 
732 static const value_string h248_pkg_annexc_transrate_values[] = {
733 	/* TO DO */
734 	{0,NULL}
735 };
736 
737 
738 
dissect_h248_annexc_acodec(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info _U_,void * implicit_p)739 static void dissect_h248_annexc_acodec(proto_tree* tree,
740 										tvbuff_t* tvb,
741 										packet_info* pinfo,
742 										int hfid,
743 										h248_curr_info_t* h248_info _U_,
744 										void* implicit_p ) {
745 	int len;
746 	tvbuff_t* new_tvb;
747 	asn1_ctx_t asn1_ctx;
748 
749 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
750 	dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb);
751 
752 	tree = proto_item_add_subtree(asn1_ctx.created_item,ett_codec);
753 	len = tvb_reported_length(new_tvb);
754 	dissect_codec_mode(tree,new_tvb,0,len);
755 }
756 
dissect_h248_annexc_BIR(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info,void * implicit_p)757 static void dissect_h248_annexc_BIR(proto_tree* tree,
758 									 tvbuff_t* tvb,
759 									 packet_info* pinfo,
760 									 int hfid,
761 									 h248_curr_info_t* h248_info,
762 									 void* implicit_p ) {
763 	tvbuff_t* new_tvb = NULL;
764 	asn1_ctx_t asn1_ctx;
765 
766 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
767 	dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb);
768 
769 	if ( new_tvb && h248_info->term && ! h248_info->term->bir ) {
770 		h248_info->term->bir = tvb_bytes_to_str(wmem_file_scope(), new_tvb,0,tvb_reported_length(new_tvb));
771 	}
772 }
773 
dissect_h248_annexc_NSAP(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info,void * implicit_p)774 static void dissect_h248_annexc_NSAP(proto_tree* tree,
775 									  tvbuff_t* tvb,
776 									  packet_info* pinfo,
777 									  int hfid,
778 									  h248_curr_info_t* h248_info,
779 									  void* implicit_p ) {
780 	tvbuff_t* new_tvb = NULL;
781 	asn1_ctx_t asn1_ctx;
782 
783 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
784 	dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb);
785 	if (new_tvb) {
786 		dissect_nsap(new_tvb, 0,tvb_reported_length(new_tvb), tree);
787 		if ( h248_info->term && ! h248_info->term->nsap) {
788 			h248_info->term->nsap = tvb_bytes_to_str(wmem_file_scope(), new_tvb,0,tvb_reported_length(new_tvb));
789 		}
790 	}
791 }
792 
dissect_h248_annexc_vpvc(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo _U_,int hfid,h248_curr_info_t * h248_info _U_,void * unused _U_)793 static void dissect_h248_annexc_vpvc(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo _U_, int hfid, h248_curr_info_t* h248_info _U_, void* unused _U_) {
794 	proto_item* pi = proto_tree_add_item(tree,hfid,tvb,0,2,ENC_BIG_ENDIAN);
795 	proto_tree* pt = proto_item_add_subtree(pi,ett_vpvc);
796 	proto_tree_add_item(pt,hf_h248_pkg_annexc_vp,tvb,0,2,ENC_BIG_ENDIAN);
797 	proto_tree_add_item(pt,hf_h248_pkg_annexc_vc,tvb,2,2,ENC_BIG_ENDIAN);
798 }
799 
dissect_h248_annexc_USI(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info _U_,void * implicit_p)800 static void dissect_h248_annexc_USI(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* h248_info _U_, void* implicit_p) {
801 	tvbuff_t* new_tvb = NULL;
802 	asn1_ctx_t asn1_ctx;
803 
804 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
805 	dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb);
806 	if (new_tvb)
807 		dissect_q931_bearer_capability_ie(new_tvb, 0, tvb_reported_length(new_tvb), tree);
808 }
809 
dissect_h248_annexc_SDP(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info _U_,void * implicit_p _U_)810 static void dissect_h248_annexc_SDP(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* h248_info _U_, void* implicit_p _U_) {
811 	asn1_ctx_t asn1_ctx;
812 
813 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
814 	dissect_ber_restricted_string(FALSE, BER_UNI_TAG_IA5String,
815 		&asn1_ctx, tree, tvb, 0, hfid,
816 		NULL);
817 }
818 
dissect_h248_annexc_SDP_C(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info _U_,void * implicit_p _U_)819 static void dissect_h248_annexc_SDP_C(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* h248_info _U_, void* implicit_p _U_) {
820 	asn1_ctx_t asn1_ctx;
821 	tvbuff_t *param_tvb = NULL;
822 	proto_item *ti;
823 
824 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
825 	dissect_ber_restricted_string(FALSE, BER_UNI_TAG_IA5String,
826 		&asn1_ctx, tree, tvb, 0, hfid,
827 		&param_tvb);
828 
829 	if (param_tvb){
830 		ti = proto_tree_add_item(tree, hf_h248_sdp_connection_info, param_tvb, 0, -1, ENC_BIG_ENDIAN);
831 		proto_item_set_generated(ti);
832 	}
833 }
834 
dissect_h248_annexc_SDP_M(proto_tree * tree,tvbuff_t * tvb,packet_info * pinfo,int hfid,h248_curr_info_t * h248_info _U_,void * implicit_p _U_)835 static void dissect_h248_annexc_SDP_M(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* h248_info _U_, void* implicit_p _U_) {
836 	asn1_ctx_t asn1_ctx;
837 	tvbuff_t *param_tvb = NULL;
838 	proto_item *ti;
839 	int offset, next_offset, tokenlen;
840 	gchar *port_str;
841 
842 	asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
843 	dissect_ber_restricted_string(FALSE, BER_UNI_TAG_IA5String,
844 		&asn1_ctx, tree, tvb, 0, hfid,
845 		&param_tvb);
846 
847 	if (param_tvb){
848 		offset = tvb_find_guint8(param_tvb, 0, -1, ' ');
849 		if (offset != -1){
850 			offset++;
851 			next_offset = tvb_find_guint8(param_tvb, offset, -1, ' ');
852 			if (next_offset > 0){
853 				tokenlen = next_offset - offset;
854 				port_str = tvb_get_string_enc(pinfo->pool, param_tvb, offset, tokenlen, ENC_UTF_8 | ENC_NA);
855 				if (g_ascii_isdigit(port_str[0])) {
856 					gint32 port = -1;
857 					gboolean port_valid;
858 					port_valid = ws_strtoi32(port_str, NULL, &port);
859 					ti = proto_tree_add_uint(tree, hf_h248_sdp_media_port, param_tvb, offset, tokenlen, port);
860 					proto_item_set_generated(ti);
861 					if (!port_valid)
862 						proto_tree_add_expert(tree, pinfo, &ei_h248_sdp_media_port_invalid, param_tvb, offset,
863 							tokenlen);
864 				}
865 			}
866 		}
867 	}
868 }
869 
870 static gboolean h248_c_implicit = TRUE;
871 
872 static h248_pkg_param_t h248_annexc_package_properties[] = {
873 	{ 0x1001, &hf_h248_pkg_annexc_media, h248_param_ber_integer, NULL },
874 	{ 0x1002, &hf_h248_pkg_annexc_transmission_mode, h248_param_ber_integer, NULL },
875 	{ 0x1003, &hf_h248_pkg_annexc_num_of_channels, h248_param_ber_integer, NULL },
876 	{ 0x1004, &hf_h248_pkg_annexc_sampling_rate, h248_param_ber_integer, NULL },
877 	{ 0x1005, &hf_h248_pkg_annexc_bit_rate, h248_param_ber_integer, NULL },
878 	{ 0x1006, &hf_h248_pkg_annexc_ACodec, dissect_h248_annexc_acodec, NULL },
879 	{ 0x1007, &hf_h248_pkg_annexc_samplepp, h248_param_ber_integer, NULL },
880 	{ 0x1008, &hf_h248_pkg_annexc_silence_supp, h248_param_ber_boolean, NULL },
881 	{ 0x1009, &hf_h248_pkg_annexc_encrypt_type, h248_param_ber_octetstring, NULL }, /* XXX Hand over to what in H.245? */
882 	{ 0x100A, &hf_h248_pkg_annexc_encrypt_key, h248_param_ber_integer, NULL },
883 	{ 0x100C, &hf_h248_pkg_annexc_gain, h248_param_ber_integer, NULL },
884 	{ 0x100D, &hf_h248_pkg_annexc_jitterbuf, h248_param_ber_integer, NULL },
885 	{ 0x100E, &hf_h248_pkg_annexc_propdelay, h248_param_ber_integer, NULL },
886 	{ 0x100F, &hf_h248_pkg_annexc_rtp_payload, h248_param_ber_integer, NULL },
887 
888 	{ 0x2001, &hf_h248_pkg_annexc_h222, h248_param_ber_octetstring, NULL },
889 	{ 0x2002, &hf_h248_pkg_annexc_h223, h248_param_ber_octetstring, NULL },
890 	{ 0x2003, &hf_h248_pkg_annexc_v76, h248_param_ber_octetstring, NULL },
891 	{ 0x2004, &hf_h248_pkg_annexc_h2250, h248_param_ber_octetstring, NULL },
892 
893 	{ 0x3001, &hf_h248_pkg_annexc_Mediatx, h248_param_ber_integer, NULL },
894 	{ 0x3002, &hf_h248_pkg_annexc_BIR, dissect_h248_annexc_BIR, NULL },
895 	{ 0x3003, &hf_h248_pkg_annexc_NSAP, dissect_h248_annexc_NSAP, NULL },
896 
897 	{ 0x4001, &hf_h248_pkg_annexc_aesa, h248_param_ber_octetstring, NULL },
898 	{ 0x4002, &hf_h248_pkg_annexc_vp, dissect_h248_annexc_vpvc, NULL },
899 	{ 0x4003, &hf_h248_pkg_annexc_sc, h248_param_ber_integer, NULL },
900 	{ 0x4004, &hf_h248_pkg_annexc_bcob, h248_param_ber_integer, NULL },
901 	{ 0x4005, &hf_h248_pkg_annexc_bbtc, h248_param_ber_integer, NULL },
902 	{ 0x4006, &hf_h248_pkg_annexc_atc, h248_param_ber_integer, NULL },
903 	{ 0x4007, &hf_h248_pkg_annexc_stc, h248_param_ber_integer, NULL },
904 	{ 0x4008, &hf_h248_pkg_annexc_uppc, h248_param_ber_integer, NULL },
905 	{ 0x4009, &hf_h248_pkg_annexc_pcr0, h248_param_ber_octetstring, NULL },
906 	{ 0x400a, &hf_h248_pkg_annexc_scr0, h248_param_ber_octetstring, NULL },
907 	{ 0x400b, &hf_h248_pkg_annexc_mbs0, h248_param_ber_octetstring, NULL },
908 	{ 0x400c, &hf_h248_pkg_annexc_pcr1, h248_param_ber_octetstring, NULL },
909 	{ 0x400d, &hf_h248_pkg_annexc_scr1, h248_param_ber_octetstring, NULL },
910 	{ 0x400e, &hf_h248_pkg_annexc_mbs1, h248_param_ber_octetstring, NULL },
911 	{ 0x400f, &hf_h248_pkg_annexc_bei, h248_param_ber_boolean, NULL },
912 	{ 0x4010, &hf_h248_pkg_annexc_ti, h248_param_ber_boolean, NULL },
913 	{ 0x4011, &hf_h248_pkg_annexc_fd, h248_param_ber_boolean, NULL },
914 	{ 0x4012, &hf_h248_pkg_annexc_a2pcdv, h248_param_ber_octetstring, NULL },
915 	{ 0x4013, &hf_h248_pkg_annexc_c2pcdv, h248_param_ber_octetstring, NULL },
916 	{ 0x4014, &hf_h248_pkg_annexc_appcdv, h248_param_ber_octetstring, NULL },
917 	{ 0x4015, &hf_h248_pkg_annexc_cppcdv, h248_param_ber_octetstring, NULL },
918 	{ 0x4016, &hf_h248_pkg_annexc_aclr, h248_param_ber_integer, NULL },
919 	{ 0x4017, &hf_h248_pkg_annexc_meetd, h248_param_ber_octetstring,NULL },
920 	{ 0x4018, &hf_h248_pkg_annexc_ceetd, h248_param_ber_octetstring,NULL },
921 	{ 0x4019, &hf_h248_pkg_annexc_QosClass, h248_param_ber_integer, NULL },
922 	{ 0x401A, &hf_h248_pkg_annexc_AALtype, h248_param_ber_integer, NULL },
923 
924 	{ 0x5001, &hf_h248_pkg_annexc_dlci, h248_param_ber_integer, NULL },
925 	{ 0x5002, &hf_h248_pkg_annexc_cid, h248_param_ber_integer, NULL },
926 	{ 0x5003, &hf_h248_pkg_annexc_sid, h248_param_ber_integer, NULL },
927 	{ 0x5004, &hf_h248_pkg_annexc_ppt, h248_param_ber_integer, NULL },
928 
929 	{ 0x6001, &hf_h248_pkg_annexc_ipv4, h248_param_ber_octetstring, NULL },
930 	{ 0x6002, &hf_h248_pkg_annexc_ipv6, h248_param_ber_octetstring,NULL },
931 	{ 0x6003, &hf_h248_pkg_annexc_port, h248_param_ber_integer, NULL },
932 	{ 0x6004, &hf_h248_pkg_annexc_porttype, h248_param_ber_integer, NULL },
933 
934 	{ 0x7001, &hf_h248_pkg_annexc_aesa, h248_param_ber_octetstring, NULL },
935 	{ 0x7002, &hf_h248_pkg_annexc_alc, h248_param_ber_octetstring,NULL }, /* from ALCAP */
936 	{ 0x7003, &hf_h248_pkg_annexc_sscs, h248_param_ber_octetstring, NULL },
937 	{ 0x7004, &hf_h248_pkg_annexc_sut, h248_param_ber_octetstring, NULL },
938 	{ 0x7005, &hf_h248_pkg_annexc_tci, h248_param_ber_boolean, NULL },
939 	{ 0x7006, &hf_h248_pkg_annexc_timer_cu, h248_param_ber_octetstring, NULL },
940 	{ 0x7007, &hf_h248_pkg_annexc_maxcpssdu, h248_param_ber_integer, NULL },
941 	{ 0x7008, &hf_h248_pkg_annexc_cid, h248_param_ber_integer, NULL },
942 
943 	{ 0x8001, &hf_h248_pkg_annexc_aal1st, h248_param_ber_integer, NULL },
944 	{ 0x8002, &hf_h248_pkg_annexc_cbrr, h248_param_ber_integer, NULL },
945 	{ 0x8003, &hf_h248_pkg_annexc_scri, h248_param_ber_integer, NULL },
946 	{ 0x8004, &hf_h248_pkg_annexc_ecm, h248_param_ber_integer, NULL },
947 	{ 0x8005, &hf_h248_pkg_annexc_sdbt, h248_param_ber_octetstring,NULL },
948 	{ 0x8006, &hf_h248_pkg_annexc_pfci, h248_param_ber_integer, NULL },
949 
950 	{ 0x9001, &hf_h248_pkg_annexc_tmr, h248_param_ber_octetstring, NULL },
951 	{ 0x9002, &hf_h248_pkg_annexc_tmrsr, h248_param_ber_integer, NULL },
952 	{ 0x9003, &hf_h248_pkg_annexc_contcheck, h248_param_ber_integer, NULL },
953 	{ 0x9004, &hf_h248_pkg_annexc_itc, h248_param_ber_integer, NULL },
954 	{ 0x9005, &hf_h248_pkg_annexc_transmode, h248_param_ber_integer, NULL },
955 	{ 0x9006, &hf_h248_pkg_annexc_transrate, h248_param_ber_integer, NULL },
956 	{ 0x9007, &hf_h248_pkg_annexc_mult, h248_param_ber_integer, NULL },
957 	{ 0x9008, &hf_h248_pkg_annexc_USI, dissect_h248_annexc_USI, NULL },
958 	{ 0x9009, &hf_h248_pkg_annexc_syncasync, h248_param_ber_integer, NULL },
959 	{ 0x900A, &hf_h248_pkg_annexc_negotiation, h248_param_ber_integer, NULL },
960 	{ 0x900B, &hf_h248_pkg_annexc_userrate, h248_param_ber_integer, NULL },
961 	{ 0x900C, &hf_h248_pkg_annexc_intrate, h248_param_ber_integer, NULL },
962 	{ 0x900D, &hf_h248_pkg_annexc_nictx, h248_param_ber_boolean, NULL },
963 	{ 0x900E, &hf_h248_pkg_annexc_nicrx, h248_param_ber_boolean, NULL },
964 	{ 0x900F, &hf_h248_pkg_annexc_flowconttx, h248_param_ber_boolean, NULL },
965 	{ 0x9010, &hf_h248_pkg_annexc_flowcontrx, h248_param_ber_boolean, NULL },
966 	{ 0x9011, &hf_h248_pkg_annexc_rateadapthdr, h248_param_ber_boolean, NULL },
967 	{ 0x9012, &hf_h248_pkg_annexc_multiframe, h248_param_ber_boolean, NULL },
968 	{ 0x9013, &hf_h248_pkg_annexc_opmode, h248_param_ber_boolean, NULL },
969 	{ 0x9014, &hf_h248_pkg_annexc_llidnegot, h248_param_ber_boolean, NULL },
970 	{ 0x9015, &hf_h248_pkg_annexc_assign, h248_param_ber_boolean, NULL },
971 	{ 0x9016, &hf_h248_pkg_annexc_inbandneg, h248_param_ber_boolean, NULL },
972 	{ 0x9017, &hf_h248_pkg_annexc_stopbits, h248_param_ber_integer, NULL },
973 	{ 0x9018, &hf_h248_pkg_annexc_databits, h248_param_ber_integer, NULL },
974 	{ 0x9019, &hf_h248_pkg_annexc_parity, h248_param_ber_integer, NULL },
975 	{ 0x901a, &hf_h248_pkg_annexc_duplexmode, h248_param_ber_integer, NULL },
976 	{ 0x901b, &hf_h248_pkg_annexc_modem, h248_param_ber_integer, NULL },
977 	{ 0x901c, &hf_h248_pkg_annexc_layer2prot, h248_param_ber_integer, NULL },
978 	{ 0x901d, &hf_h248_pkg_annexc_layer3prot, h248_param_ber_integer, NULL },
979 	{ 0x901e, &hf_h248_pkg_annexc_addlayer3prot, h248_param_ber_integer, NULL },
980 	{ 0x901f, &hf_h248_pkg_annexc_dialedn, h248_param_ber_octetstring, NULL },
981 	{ 0x9020, &hf_h248_pkg_annexc_dialingn, h248_param_ber_octetstring, NULL },
982 	{ 0x9021, &hf_h248_pkg_annexc_echoci, h248_param_ber_integer, NULL },
983 	{ 0x9022, &hf_h248_pkg_annexc_nci, h248_param_ber_integer, NULL },
984 	{ 0x9023, &hf_h248_pkg_annexc_USI, dissect_h248_annexc_USI, NULL },
985 
986 	{ 0xA001, &hf_h248_pkg_annexc_fmsdu, h248_param_ber_octetstring, NULL },
987 	{ 0xA002, &hf_h248_pkg_annexc_bmsdu, h248_param_ber_octetstring, NULL },
988 	{ 0xA003, &hf_h248_pkg_annexc_sscs, NULL, NULL },
989 
990 	{ 0xB001, &hf_h248_pkg_annexc_sdp_v, dissect_h248_annexc_SDP, &h248_c_implicit },
991 	{ 0xB002, &hf_h248_pkg_annexc_sdp_o, dissect_h248_annexc_SDP, &h248_c_implicit },
992 	{ 0xB003, &hf_h248_pkg_annexc_sdp_s, dissect_h248_annexc_SDP, &h248_c_implicit },
993 	{ 0xB004, &hf_h248_pkg_annexc_sdp_i, dissect_h248_annexc_SDP, &h248_c_implicit },
994 	{ 0xB005, &hf_h248_pkg_annexc_sdp_u, dissect_h248_annexc_SDP, &h248_c_implicit },
995 	{ 0xB006, &hf_h248_pkg_annexc_sdp_e, dissect_h248_annexc_SDP, &h248_c_implicit },
996 	{ 0xB007, &hf_h248_pkg_annexc_sdp_p, dissect_h248_annexc_SDP, &h248_c_implicit },
997 	{ 0xB008, &hf_h248_pkg_annexc_sdp_c, dissect_h248_annexc_SDP_C, &h248_c_implicit },
998 	{ 0xB009, &hf_h248_pkg_annexc_sdp_b, dissect_h248_annexc_SDP, &h248_c_implicit },
999 	{ 0xB00a, &hf_h248_pkg_annexc_sdp_z, dissect_h248_annexc_SDP, &h248_c_implicit },
1000 	{ 0xB00b, &hf_h248_pkg_annexc_sdp_k, dissect_h248_annexc_SDP, &h248_c_implicit },
1001 	{ 0xB00c, &hf_h248_pkg_annexc_sdp_a, dissect_h248_annexc_SDP, &h248_c_implicit },
1002 	{ 0xB00d, &hf_h248_pkg_annexc_sdp_t, dissect_h248_annexc_SDP, &h248_c_implicit },
1003 	{ 0xB00e, &hf_h248_pkg_annexc_sdp_r, dissect_h248_annexc_SDP, &h248_c_implicit },
1004 	{ 0xB00f, &hf_h248_pkg_annexc_sdp_m, dissect_h248_annexc_SDP_M, &h248_c_implicit },
1005 
1006 	{ 0xC001, &hf_h248_pkg_annexc_olc, h248_param_ber_octetstring,    NULL },
1007 	{ 0xC002, &hf_h248_pkg_annexc_olcack, h248_param_ber_octetstring, NULL },
1008 	{ 0xC003, &hf_h248_pkg_annexc_olccnf, h248_param_ber_octetstring, NULL },
1009 	{ 0xC004, &hf_h248_pkg_annexc_olcrej, h248_param_ber_octetstring, NULL },
1010 	{ 0xC005, &hf_h248_pkg_annexc_clc, h248_param_ber_octetstring,    NULL },
1011 	{ 0xC006, &hf_h248_pkg_annexc_clcack, h248_param_ber_octetstring, NULL },
1012 
1013 	{ 0, NULL, NULL, NULL }
1014 };
1015 
1016 static h248_package_t h248_annexc_package = {
1017 	0x0000,
1018 	&proto_h248_pkg_annexc,
1019 	&ett_annexc,
1020 	h248_annexc_package_properties_vals,
1021 	NULL,
1022 	NULL,
1023 	NULL,
1024 	h248_annexc_package_properties, /* properties */
1025 	NULL,							/* signals */
1026 	NULL,							/* events */
1027 	NULL							/* statistics */
1028 };
1029 
1030 
proto_register_h248_annex_c(void)1031 void proto_register_h248_annex_c(void) {
1032 	expert_module_t* expert_h248_pkg_annexc;
1033 
1034 	static hf_register_info hf[] = {
1035 		{ &hf_h248_pkg_annexc_media,
1036 		  { "Media", "h248.annexc.media",
1037 		    FT_UINT32, BASE_HEX, VALS(h248_annexc_media_vals), 0,
1038 		    "Media Type", HFILL }},
1039 		{ &hf_h248_pkg_annexc_ACodec,
1040 		  { "ACodec", "h248.annexc.ACodec",
1041 		    FT_BYTES, BASE_NONE, NULL, 0,
1042 		    NULL, HFILL }},
1043 		{ &hf_h248_pkg_annexc_Mediatx,
1044 		  { "Mediatx", "h248.annexc.Mediatx",
1045 		    FT_UINT32, BASE_DEC, VALS(h248_pkg_annexc_Mediatx_vals), 0,
1046 		    NULL, HFILL }},
1047 		{ &hf_h248_pkg_annexc_BIR,
1048 		  { "BIR", "h248.annexc.BIR",
1049 		    FT_BYTES, BASE_NONE, NULL, 0,
1050 		    NULL, HFILL }},
1051 		{ &hf_h248_pkg_annexc_NSAP,
1052 		  { "NSAP", "h248.annexc.NSAP",
1053 		    FT_BYTES, BASE_NONE, NULL, 0,
1054 		    NULL, HFILL }},
1055 		{ &hf_h248_pkg_annexc_transmission_mode,
1056 		  { "Transmission Mode", "h248.annexc.transmission_mode",
1057 		    FT_UINT32, BASE_DEC, VALS(h248_annexc_transmission_mode), 0,
1058 		    NULL, HFILL }},
1059 		{ &hf_h248_pkg_annexc_num_of_channels,
1060 		  { "Number of Channels", "h248.annexc.num_of_channels",
1061 		    FT_UINT32, BASE_DEC, NULL, 0,
1062 		    NULL, HFILL }},
1063 		{ &hf_h248_pkg_annexc_sampling_rate,
1064 		  { "Sampling Rate", "h248.annexc.sampling_rate",
1065 		    FT_UINT32, BASE_DEC, NULL, 0,
1066 		    NULL, HFILL }},
1067 		{ &hf_h248_pkg_annexc_bit_rate,
1068 		  { "Bit Rate", "h248.annexc.bit_rate",
1069 		    FT_UINT32, BASE_DEC, NULL, 0,
1070 		    NULL, HFILL }},
1071 		{ &hf_h248_pkg_annexc_samplepp,
1072 		  { "Samplepp", "h248.annexc.samplepp",
1073 		    FT_UINT32, BASE_DEC, NULL, 0,
1074 		    NULL, HFILL }},
1075 		{ &hf_h248_pkg_annexc_silence_supp,
1076 		  { "SilenceSupp", "h248.annexc.silence_supp",
1077 		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1078 		    "Silence Suppression", HFILL }},
1079 		{ &hf_h248_pkg_annexc_encrypt_type,
1080 		  { "Encrypttype", "h248.annexc.encrypt_type",
1081 		    FT_BYTES, BASE_NONE, NULL, 0,
1082 		    "Encryption Type", HFILL }},
1083 		{ &hf_h248_pkg_annexc_encrypt_key,
1084 		  { "Encrypt Key", "h248.annexc.encrypt_key",
1085 		    FT_UINT32, BASE_DEC, NULL, 0,
1086 		    "Encryption Key", HFILL }},
1087 		{ &hf_h248_pkg_annexc_gain,
1088 		  { "Gain", "h248.annexc.gain",
1089 		    FT_UINT32, BASE_DEC, NULL, 0,
1090 		    "Gain (dB)", HFILL }},
1091 		{ &hf_h248_pkg_annexc_jitterbuf,
1092 		  { "JitterBuff", "h248.annexc.jitterbuf",
1093 		    FT_UINT32, BASE_DEC, NULL, 0,
1094 		    "Jitter Buffer Size (ms)", HFILL }},
1095 		{ &hf_h248_pkg_annexc_propdelay,
1096 		  { "Propagation Delay", "h248.annexc.propdelay",
1097 		    FT_UINT32, BASE_DEC, NULL, 0,
1098 		    "Propagation Delay (ms)", HFILL }},
1099 		{ &hf_h248_pkg_annexc_rtp_payload,
1100 		  { "RTP Payload type", "h248.annexc.rtp_payload",
1101 		    FT_UINT32, BASE_DEC, NULL, 0,
1102 		    "Payload type in RTP Profile", HFILL }},
1103 		{ &hf_h248_pkg_annexc_h222,
1104 		  { "H222LogicalChannelParameters", "h248.annexc.h222",
1105 		    FT_BYTES, BASE_NONE, NULL, 0,
1106 		    NULL, HFILL }},
1107 		{ &hf_h248_pkg_annexc_h223,
1108 		  { "H223LogicalChannelParameters", "h248.annexc.h223",
1109 		    FT_BYTES, BASE_NONE, NULL, 0,
1110 		    NULL, HFILL }},
1111 		{ &hf_h248_pkg_annexc_v76,
1112 		  { "V76LogicalChannelParameters", "h248.annexc.v76",
1113 		    FT_BYTES, BASE_NONE, NULL, 0,
1114 		    NULL, HFILL }},
1115 		{ &hf_h248_pkg_annexc_h2250,
1116 		  { "H2250LogicalChannelParameters", "h248.annexc.h2250",
1117 		    FT_BYTES, BASE_NONE, NULL, 0,
1118 		    NULL, HFILL }},
1119 		{ &hf_h248_pkg_annexc_aesa,
1120 		  { "AESA", "h248.annexc.aesa",
1121 		    FT_BYTES, BASE_NONE, NULL, 0,
1122 		    "ATM End System Address", HFILL }},
1123 		{ &hf_h248_pkg_annexc_vp,
1124 		  { "VPI", "h248.annexc.vpi",
1125 		    FT_UINT16, BASE_DEC, NULL, 0,
1126 		    "Virtual Path Identifier", HFILL }},
1127 		{ &hf_h248_pkg_annexc_vc,
1128 		  { "VCI", "h248.annexc.vci",
1129 		    FT_UINT16, BASE_DEC, NULL, 0,
1130 		    "Virtual Circuit Identifier", HFILL }},
1131 		{ &hf_h248_pkg_annexc_sc,
1132 		  { "Service Class", "h248.annexc.sc",
1133 		    FT_UINT32, BASE_DEC, NULL, 0,
1134 		    NULL, HFILL }},
1135 		{ &hf_h248_pkg_annexc_bcob,
1136 		  { "BCOB", "h248.annexc.bcob",
1137 		    FT_UINT8, BASE_DEC, NULL, 0x1F,
1138 		    "Broadband Bearer Class", HFILL }},
1139 		{ &hf_h248_pkg_annexc_bbtc,
1140 		  { "BBTC", "h248.annexc.bbtc",
1141 		    FT_UINT8, BASE_DEC, NULL, 0x3F,
1142 		    "Broadband Transfer Capability", HFILL }},
1143 		{ &hf_h248_pkg_annexc_atc,
1144 		  { "ATC", "h248.annexc.atc",
1145 		    FT_UINT32, BASE_DEC, VALS(h248_pkg_annexc_atc_values), 0x0,
1146 		    "ATM Traffic Capability", HFILL }},
1147 		{ &hf_h248_pkg_annexc_stc,
1148 		  { "STC", "h248.annexc.stc",
1149 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_stc_values), 0x03,
1150 		    "Susceptibility to Clipping", HFILL }},
1151 		{ &hf_h248_pkg_annexc_uppc,
1152 		  { "UPPC", "h248.annexc.uppc",
1153 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_uppc_values), 0x03,
1154 		    "User Plane Connection Configuration", HFILL }},
1155 
1156 		{ &hf_h248_pkg_annexc_pcr0,
1157 		  { "PCR0", "h248.annexc.pcr0",
1158 		    FT_UINT24, BASE_DEC, NULL, 0,
1159 		    "Peak Cell Rate for CLP=0", HFILL }},
1160 		{ &hf_h248_pkg_annexc_scr0,
1161 		  { "SCR0", "h248.annexc.scr0",
1162 		    FT_UINT24, BASE_DEC, NULL, 0,
1163 		    "Sustained Cell Rate for CLP=0", HFILL }},
1164 		{ &hf_h248_pkg_annexc_mbs0,
1165 		  { "MBS0", "h248.annexc.mbs0",
1166 		    FT_UINT24, BASE_DEC, NULL, 0,
1167 		    "Maximum Burst Size for CLP=0", HFILL }},
1168 
1169 		{ &hf_h248_pkg_annexc_pcr1,
1170 		  { "PCR1", "h248.annexc.pcr1",
1171 		    FT_UINT24, BASE_DEC, NULL, 0,
1172 		    "Peak Cell Rate for CLP=1", HFILL }},
1173 		{ &hf_h248_pkg_annexc_scr1,
1174 		  { "SCR1", "h248.annexc.scr1",
1175 		    FT_UINT24, BASE_DEC, NULL, 0,
1176 		    "Sustained Cell Rate for CLP=1", HFILL }},
1177 		{ &hf_h248_pkg_annexc_mbs1,
1178 		  { "MBS1", "h248.annexc.mbs1",
1179 		    FT_UINT24, BASE_DEC, NULL, 0,
1180 		    "Maximum Burst Size for CLP=1", HFILL }},
1181 
1182 		{ &hf_h248_pkg_annexc_bei,
1183 		  { "BEI", "h248.annexc.bei",
1184 		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1185 		    "Best Effort Indicator", HFILL }},
1186 		{ &hf_h248_pkg_annexc_ti,
1187 		  { "TI", "h248.annexc.ti",
1188 		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1189 		    "Tagging Indicator", HFILL }},
1190 		{ &hf_h248_pkg_annexc_fd,
1191 		  { "FD", "h248.annexc.fd",
1192 		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1193 		    "Frame Discard", HFILL }},
1194 
1195 		{ &hf_h248_pkg_annexc_a2pcdv,
1196 		  { "A2PCDV", "h248.annexc.a2pcdv",
1197 		    FT_UINT24, BASE_DEC, NULL, 0,
1198 		    "Acceptable 2 point CDV", HFILL }},
1199 		{ &hf_h248_pkg_annexc_c2pcdv,
1200 		  { "C2PCDV", "h248.annexc.c2pcdv",
1201 		    FT_UINT24, BASE_DEC, NULL, 0,
1202 		    "Cumulative 2 point CDV", HFILL }},
1203 		{ &hf_h248_pkg_annexc_appcdv,
1204 		  { "APPCDV", "h248.annexc.appcdv",
1205 		    FT_UINT24, BASE_DEC, NULL, 0,
1206 		    "Acceptable Point to Point CDV", HFILL }},
1207 		{ &hf_h248_pkg_annexc_cppcdv,
1208 		  { "CPPCDV", "h248.annexc.cppcdv",
1209 		    FT_UINT24, BASE_DEC, NULL, 0,
1210 		    "Cumulative Point to Point CDV", HFILL }},
1211 		{ &hf_h248_pkg_annexc_aclr,
1212 		  { "ACLR", "h248.annexc.aclr",
1213 		    FT_UINT8, BASE_DEC, NULL, 0,
1214 		    "Acceptable Cell Loss Ratio (Q.2965.2 ATMF UNI 4.0)", HFILL }},
1215 
1216 		{ &hf_h248_pkg_annexc_meetd,
1217 		  { "MEETD", "h248.annexc.meetd",
1218 		    FT_UINT16, BASE_DEC, NULL, 0,
1219 		    "Maximum End-to-End Transit Delay (Q.2965.2 ATMF UNI 4.0)", HFILL }},
1220 		{ &hf_h248_pkg_annexc_ceetd,
1221 		  { "CEETD", "h248.annexc.ceetd",
1222 		    FT_UINT16, BASE_DEC, NULL, 0,
1223 		    "Cumulative End-to-End Transit Delay (Q.2965.2 ATMF UNI 4.0)", HFILL }},
1224 		{ &hf_h248_pkg_annexc_QosClass,
1225 		  { "QosClass", "h248.annexc.qosclass",
1226 		    FT_UINT16, BASE_DEC, VALS(h248_pkg_annexc_QosClass_values), 0,
1227 		    "QoS Class (Q.2965.1)", HFILL }},
1228 		{ &hf_h248_pkg_annexc_AALtype,
1229 		  { "AALtype", "h248.annexc.aaltype",
1230 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_AALtype_values), 0,
1231 		    "AAL Type", HFILL }},
1232 
1233 		{ &hf_h248_pkg_annexc_dlci,
1234 		  { "DLCI", "h248.annexc.dlci",
1235 		    FT_UINT32, BASE_DEC, NULL, 0,
1236 		    "Data Link Connection ID (FR)", HFILL }},
1237 		{ &hf_h248_pkg_annexc_cid,
1238 		  { "CID", "h248.annexc.cid",
1239 		    FT_UINT32, BASE_DEC, NULL, 0,
1240 		    "Channel-Id", HFILL }},
1241 		{ &hf_h248_pkg_annexc_sid,
1242 		  { "SID", "h248.annexc.sid",
1243 		    FT_UINT32, BASE_DEC, NULL, 0,
1244 		    "Silence Insertion Descriptor", HFILL }},
1245 		{ &hf_h248_pkg_annexc_ppt,
1246 		  { "PPT", "h248.annexc.ppt",
1247 		    FT_UINT32, BASE_DEC, NULL, 0,
1248 		    "Primary Payload Type", HFILL }},
1249 
1250 		{ &hf_h248_pkg_annexc_ipv4,
1251 		  { "IPv4", "h248.annexc.ipv4",
1252 		    FT_IPv4, BASE_NONE, NULL, 0,
1253 		    "IPv4 Address", HFILL }},
1254 		{ &hf_h248_pkg_annexc_ipv6,
1255 		  { "IPv6", "h248.annexc.ipv6",
1256 		    FT_IPv6, BASE_NONE, NULL, 0,
1257 		    "IPv6 Address", HFILL }},
1258 		{ &hf_h248_pkg_annexc_port,
1259 		  { "Port", "h248.annexc.port",
1260 		    FT_UINT16, BASE_DEC, NULL, 0,
1261 		    NULL, HFILL }},
1262 		{ &hf_h248_pkg_annexc_porttype,
1263 		  { "PortType", "h248.annexc.porttype",
1264 		    FT_UINT32, BASE_DEC, VALS(h248_pkg_annexc_porttype_values), 0,
1265 		    "Port Type", HFILL }},
1266 
1267 		{ &hf_h248_pkg_annexc_alc,
1268 		  { "ALC", "h248.annexc.alc",
1269 		    FT_BYTES, BASE_NONE, NULL, 0,
1270 		    "AAL2 Link Characteristics", HFILL }},
1271 		{ &hf_h248_pkg_annexc_sut,
1272 		  { "SUT", "h248.annexc.sut",
1273 		    FT_BYTES, BASE_NONE, NULL, 0,
1274 		    "Served User Transport", HFILL }},
1275 		{ &hf_h248_pkg_annexc_tci,
1276 		  { "TCI", "h248.annexc.tci",
1277 		    FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1278 		    "Test Connection Indicator", HFILL }},
1279 		{ &hf_h248_pkg_annexc_timer_cu,
1280 		  { "Timer CU", "h248.annexc.timer_cu",
1281 		    FT_UINT32, BASE_DEC, NULL, 0,
1282 		    "Milliseconds to hold the  partially filled cell before sending", HFILL }},
1283 		{ &hf_h248_pkg_annexc_maxcpssdu,
1284 		  { "Max CPS SDU", "h248.annexc.maxcpssdu",
1285 		    FT_UINT8, BASE_DEC, NULL, 0,
1286 		    "Maximum Common Part Sublayer Service Data Unit size", HFILL }},
1287 
1288 		{ &hf_h248_pkg_annexc_aal1st,
1289 		  { "AAL1ST", "h248.annexc.aal1st",
1290 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_aal1st_values), 0,
1291 		    "AAL1 subtype", HFILL }},
1292 		{ &hf_h248_pkg_annexc_cbrr,
1293 		  { "CBRR", "h248.annexc.cbrr",
1294 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_cbrr_values), 0,
1295 		    "CBR rate", HFILL }},
1296 		{ &hf_h248_pkg_annexc_scri,
1297 		  { "SCRI", "h248.annexc.scri",
1298 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_scri_values), 0,
1299 		    "Source Clock frequency Recovery Method", HFILL }},
1300 		{ &hf_h248_pkg_annexc_ecm,
1301 		  { "ECM", "h248.annexc.ecm",
1302 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_ecm_values), 0,
1303 		    "Error Correction Method", HFILL }},
1304 		{ &hf_h248_pkg_annexc_sdbt,
1305 		  { "SDBT", "h248.annexc.sdbt",
1306 		    FT_UINT16, BASE_DEC, NULL, 0,
1307 		    "Structured Data Transfer Blocksize", HFILL }},
1308 		{ &hf_h248_pkg_annexc_pfci,
1309 		  { "PFCI", "h248.annexc.pfci",
1310 		    FT_UINT8, BASE_DEC, NULL, 0,
1311 		    "Partially Filled Cells Identifier", HFILL }},
1312 
1313 		{ &hf_h248_pkg_annexc_tmr,
1314 		  { "TMR", "h248.annexc.tmr",
1315 		    FT_UINT8, BASE_HEX|BASE_EXT_STRING, &isup_transmission_medium_requirement_value_ext, 0,
1316 		    "Transmission Medium Requirement", HFILL }},
1317 		{ &hf_h248_pkg_annexc_tmrsr,
1318 		  { "TMSR", "h248.annexc.tmsr",
1319 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_tmrsr_values), 0,
1320 		    "Transmission Medium Requirement Subrate", HFILL }},
1321 		{ &hf_h248_pkg_annexc_contcheck,
1322 		  { "Continuity Check", "h248.annexc.contcheck",
1323 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_contcheck_values), 0x0C,
1324 		    NULL, HFILL }},
1325 
1326 		{ &hf_h248_pkg_annexc_itc,
1327 		  { "ITC", "h248.annexc.itc",
1328 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_itc_values), 0x1f,
1329 		    "Information Transfer Capability", HFILL }},
1330 		{ &hf_h248_pkg_annexc_transmode,
1331 		  { "TransMode", "h248.annexc.transmode",
1332 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_transmode_values), 0x60,
1333 		    "Transfer Mode", HFILL }},
1334 		{ &hf_h248_pkg_annexc_transrate,
1335 		  { "TransRate", "h248.annexc.transrate",
1336 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_transrate_values), 0x1f,
1337 		    "Transfer Rate", HFILL }},
1338 		{ &hf_h248_pkg_annexc_mult,
1339 		  { "Rate Multiplier", "h248.annexc.mult",
1340 		    FT_UINT8, BASE_DEC, NULL, 0,
1341 		    NULL, HFILL }},
1342 		{ &hf_h248_pkg_annexc_syncasync,
1343 		  { "SyncAsync", "h248.annexc.syncasync",
1344 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_syncasync_values), 0x80,
1345 		    "Synchronous/Asynchronous", HFILL }},
1346 		{ &hf_h248_pkg_annexc_negotiation,
1347 		  { "UPPC", "h248.annexc.negotiation",
1348 		    FT_UINT8, BASE_DEC, VALS(h248_pkg_annexc_negotiation_values), 0x40,
1349 		    "Negotiation", HFILL }},
1350 
1351 		{ &hf_h248_pkg_annexc_userrate,
1352 		  { "Userrate", "h248.annexc.userrate",
1353 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_userrate_values), 0x1f,
1354 		    "User Rate", HFILL }},
1355 		{ &hf_h248_pkg_annexc_intrate,
1356 		  { "UPPC", "h248.annexc.intrate",
1357 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_intrate_values), 0xc0,
1358 		    "Intermediate Rate", HFILL }},
1359 		{ &hf_h248_pkg_annexc_nictx,
1360 		  { "nictx", "h248.annexc.nictx",
1361 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_nictx_values), 0xc0,
1362 		    "Network independent clock on transmission", HFILL }},
1363 		{ &hf_h248_pkg_annexc_nicrx,
1364 		  { "nicrx", "h248.annexc.nicrx",
1365 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_nicrx_values), 0xc0,
1366 		    "Network independent clock on reception", HFILL }},
1367 		{ &hf_h248_pkg_annexc_flowconttx,
1368 		  { "flowconttx", "h248.annexc.flowconttx",
1369 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_flowconttx_values), 0xc0,
1370 		    "Flow Control on Transmission", HFILL }},
1371 		{ &hf_h248_pkg_annexc_flowcontrx,
1372 		  { "flowcontrx", "h248.annexc.flowcontrx",
1373 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_flowcontrx_values), 0xc0,
1374 		    "Flow Control on Reception", HFILL }},
1375 		{ &hf_h248_pkg_annexc_rateadapthdr,
1376 		  { "rateadapthdr", "h248.annexc.rateadapthdr",
1377 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_rateadapthdr_values), 0xc0,
1378 		    "Rate Adaptation Header/No-Header", HFILL }},
1379 		{ &hf_h248_pkg_annexc_multiframe,
1380 		  { "multiframe", "h248.annexc.multiframe",
1381 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_multiframe_values), 0xc0,
1382 		    "Multiple Frame establishment support in datalink", HFILL }},
1383 		{ &hf_h248_pkg_annexc_opmode,
1384 		  { "OPMODE", "h248.annexc.opmode",
1385 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_opmode_values), 0xc0,
1386 		    "Mode of operation", HFILL }},
1387 		{ &hf_h248_pkg_annexc_llidnegot,
1388 		  { "llidnegot", "h248.annexc.llidnegot",
1389 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_llidnegot_values), 0xc0,
1390 		    "Logical Link Identifier negotiation", HFILL }},
1391 
1392 		{ &hf_h248_pkg_annexc_assign,
1393 		  { "llidnegot", "h248.annexc.assign",
1394 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_assign_values), 0xc0,
1395 		    "Assignor/Assignee", HFILL }},
1396 		{ &hf_h248_pkg_annexc_inbandneg,
1397 		  { "inbandneg", "h248.annexc.inbandneg",
1398 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_inbandneg_values), 0xc0,
1399 		    "In-band/Out-band negotiation", HFILL }},
1400 		{ &hf_h248_pkg_annexc_stopbits,
1401 		  { "stopbits", "h248.annexc.stopbits",
1402 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_stopbits_values), 0xc0,
1403 		    "Number of stop bits", HFILL }},
1404 		{ &hf_h248_pkg_annexc_databits,
1405 		  { "databits", "h248.annexc.databits",
1406 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_databits_values), 0xc0,
1407 		    "Number of data bits", HFILL }},
1408 		{ &hf_h248_pkg_annexc_parity,
1409 		  { "parity", "h248.annexc.parity",
1410 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_parity_values), 0xe0,
1411 		    "Parity Information Bits", HFILL }},
1412 		{ &hf_h248_pkg_annexc_duplexmode,
1413 		  { "duplexmode", "h248.annexc.duplexmode",
1414 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_duplexmode_values), 0x80,
1415 		    "Mode Duplex", HFILL }},
1416 
1417 		{ &hf_h248_pkg_annexc_modem,
1418 		  { "modem", "h248.annexc.modem",
1419 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_modem_values), 0xfc,
1420 		    "Modem Type", HFILL }},
1421 		{ &hf_h248_pkg_annexc_layer2prot,
1422 		  { "layer2prot", "h248.annexc.layer2prot",
1423 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_layer2prot_values), 0x80,
1424 		    "Layer 2 protocol", HFILL }},
1425 		{ &hf_h248_pkg_annexc_layer3prot,
1426 		  { "layer3prot", "h248.annexc.layer3prot",
1427 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_layer3prot_values), 0x80,
1428 		    "Layer 3 protocol", HFILL }},
1429 		{ &hf_h248_pkg_annexc_addlayer3prot,
1430 		  { "addlayer3prot", "h248.annexc.addlayer3prot",
1431 		    FT_UINT8, BASE_HEX, VALS(h248_pkg_annexc_addlayer3prot_values), 0x80,
1432 		    "Additional User Information Layer 3 protocol", HFILL }},
1433 		{ &hf_h248_pkg_annexc_dialedn,
1434 		  { "Dialed Number", "h248.annexc.dialedn",
1435 		    FT_BYTES, BASE_NONE, NULL, 0,
1436 		    NULL, HFILL }},
1437 		{ &hf_h248_pkg_annexc_dialingn,
1438 		  { "Dialing Number", "h248.annexc.dialingn",
1439 		    FT_BYTES, BASE_NONE, NULL, 0,
1440 		    NULL, HFILL }},
1441 		{ &hf_h248_pkg_annexc_echoci,
1442 		  { "ECHOCI", "h248.annexc.echoci",
1443 		    FT_BYTES, BASE_NONE, NULL, 0,
1444 		    "Not used", HFILL }},
1445 		{ &hf_h248_pkg_annexc_nci,
1446 		  { "NCI", "h248.annexc.nci",
1447 		    FT_UINT8, BASE_HEX, NULL, 0xff,
1448 		    "Nature of Connection Indicator", HFILL }},
1449 
1450 
1451 		{ &hf_h248_pkg_annexc_USI,
1452 		  { "USI", "h248.annexc.USI",
1453 		    FT_BYTES, BASE_NONE, NULL, 0,
1454 		    "User Service Information", HFILL }},
1455 
1456 
1457 		{ &hf_h248_pkg_annexc_fmsdu,
1458 		  { "fmsdu", "h248.annexc.fmsdu",
1459 		    FT_BYTES, BASE_NONE, NULL, 0,
1460 		    NULL, HFILL }},
1461 		{ &hf_h248_pkg_annexc_bmsdu,
1462 		  { "bmsdu", "h248.annexc.bmsdu",
1463 		    FT_BYTES, BASE_NONE, NULL, 0,
1464 		    NULL, HFILL }},
1465 		{ &hf_h248_pkg_annexc_sscs,
1466 		  { "sscs", "h248.annexc.sscs",
1467 		    FT_BYTES, BASE_NONE, NULL, 0,
1468 		    NULL, HFILL }},
1469 
1470 
1471 		{ &hf_h248_pkg_annexc_sdp_v,
1472 		  { "sdp_v", "h248.annexc.sdp_v",
1473 		    FT_STRING, BASE_NONE, NULL, 0,
1474 		    "SDP V", HFILL }},
1475 		{ &hf_h248_pkg_annexc_sdp_o,
1476 		  { "sdp_o", "h248.annexc.sdp_o",
1477 		    FT_STRING, BASE_NONE, NULL, 0,
1478 		    "SDP O", HFILL }},
1479 		{ &hf_h248_pkg_annexc_sdp_s,
1480 		  { "sdp_s", "h248.annexc.sdp_s",
1481 		    FT_STRING, BASE_NONE, NULL, 0,
1482 		    "SDP S", HFILL }},
1483 		{ &hf_h248_pkg_annexc_sdp_i,
1484 		  { "sdp_i", "h248.annexc.sdp_i",
1485 		    FT_STRING, BASE_NONE, NULL, 0,
1486 		    "SDP I", HFILL }},
1487 		{ &hf_h248_pkg_annexc_sdp_u,
1488 		  { "sdp_u", "h248.annexc.sdp_u",
1489 		    FT_STRING, BASE_NONE, NULL, 0,
1490 		    "SDP U", HFILL }},
1491 		{ &hf_h248_pkg_annexc_sdp_e,
1492 		  { "sdp_e", "h248.annexc.sdp_e",
1493 		    FT_STRING, BASE_NONE, NULL, 0,
1494 		    "SDP E", HFILL }},
1495 		{ &hf_h248_pkg_annexc_sdp_p,
1496 		  { "sdp_p", "h248.annexc.sdp_p",
1497 		    FT_STRING, BASE_NONE, NULL, 0,
1498 		    "SDP P", HFILL }},
1499 		{ &hf_h248_pkg_annexc_sdp_c,
1500 		  { "sdp_c", "h248.annexc.sdp_c",
1501 		    FT_STRING, BASE_NONE, NULL, 0,
1502 		    "SDP C", HFILL }},
1503 		{ &hf_h248_pkg_annexc_sdp_b,
1504 		  { "sdp_b", "h248.annexc.sdp_b",
1505 		    FT_STRING, BASE_NONE, NULL, 0,
1506 		    "SDP B", HFILL }},
1507 		{ &hf_h248_pkg_annexc_sdp_z,
1508 		  { "sdp_z", "h248.annexc.sdp_z",
1509 		    FT_STRING, BASE_NONE, NULL, 0,
1510 		    "SDP Z", HFILL }},
1511 		{ &hf_h248_pkg_annexc_sdp_k,
1512 		  { "sdp_k", "h248.annexc.sdp_k",
1513 		    FT_STRING, BASE_NONE, NULL, 0,
1514 		    "SDP K", HFILL }},
1515 		{ &hf_h248_pkg_annexc_sdp_a,
1516 		  { "sdp_a", "h248.annexc.sdp_a",
1517 		    FT_STRING, BASE_NONE, NULL, 0,
1518 		    "SDP A", HFILL }},
1519 		{ &hf_h248_pkg_annexc_sdp_t,
1520 		  { "sdp_t", "h248.annexc.sdp_t",
1521 		    FT_STRING, BASE_NONE, NULL, 0,
1522 		    "SDP T", HFILL }},
1523 		{ &hf_h248_pkg_annexc_sdp_r,
1524 		  { "sdp_r", "h248.annexc.sdp_r",
1525 		    FT_STRING, BASE_NONE, NULL, 0,
1526 		    "SDP R", HFILL }},
1527 		{ &hf_h248_pkg_annexc_sdp_m,
1528 		  { "sdp_m", "h248.annexc.sdp_m",
1529 		    FT_STRING, BASE_NONE, NULL, 0,
1530 		    "SDP M", HFILL }},
1531 
1532 		{ &hf_h248_pkg_annexc_olc,
1533 		  { "OLC", "h248.annexc.olc",
1534 		    FT_BYTES, BASE_NONE, NULL, 0,
1535 		    "Open Logical Channel", HFILL }},
1536 		{ &hf_h248_pkg_annexc_olcack,
1537 		  { "OLCack", "h248.annexc.olcack",
1538 		    FT_BYTES, BASE_NONE, NULL, 0,
1539 		    "Open Logical Channel Acknowledge", HFILL }},
1540 		{ &hf_h248_pkg_annexc_olccnf,
1541 		  { "OLCcnf", "h248.annexc.olccnf",
1542 		    FT_BYTES, BASE_NONE, NULL, 0,
1543 		    "Open Logical Channel CNF", HFILL }},
1544 		{ &hf_h248_pkg_annexc_olcrej,
1545 		  { "OLCrej", "h248.annexc.olcrej",
1546 		    FT_BYTES, BASE_NONE, NULL, 0,
1547 		    "Open Logical Channel Reject", HFILL }},
1548 		{ &hf_h248_pkg_annexc_clc,
1549 		  { "CLC", "h248.annexc.clc",
1550 		    FT_BYTES, BASE_NONE, NULL, 0,
1551 		    "Close Logical Channel", HFILL }},
1552 		{ &hf_h248_pkg_annexc_clcack,
1553 		  { "CLCack", "h248.annexc.clcack",
1554 		    FT_BYTES, BASE_NONE, NULL, 0,
1555 		    NULL, HFILL }},
1556 	};
1557 
1558 	static gint *ett[] = {
1559 		&ett_annexc,
1560 		&ett_vpvc,
1561 		&ett_codec
1562 	};
1563 
1564 	static ei_register_info ei[] = {
1565 		{ &ei_h248_sdp_media_port_invalid, { "h248.annexc.sdp.media.port.invalid", PI_MALFORMED, PI_ERROR,
1566 			"Invalid SDP media port", EXPFILL }}
1567 	};
1568 
1569 	proto_h248_pkg_annexc = proto_register_protocol(PNAME, PSNAME, PFNAME);
1570 
1571 	proto_register_field_array(proto_h248_pkg_annexc, hf, array_length(hf));
1572 
1573 	proto_register_subtree_array(ett, array_length(ett));
1574 
1575 	h248_register_package(&h248_annexc_package,MERGE_PKG_HIGH);
1576 
1577 	expert_h248_pkg_annexc = expert_register_protocol(proto_h248_pkg_annexc);
1578 	expert_register_field_array(expert_h248_pkg_annexc, ei, array_length(ei));
1579 }
1580 
1581 void
proto_reg_handoff_h248_annex_c(void)1582 proto_reg_handoff_h248_annex_c(void)
1583 {
1584 
1585 	hf_h248_sdp_connection_info = proto_registrar_get_id_byname("sdp.connection_info");
1586 	hf_h248_sdp_media_port = proto_registrar_get_id_byname("sdp.media.port");
1587 
1588 }
1589 /*
1590  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
1591  *
1592  * Local variables:
1593  * c-basic-offset: 8
1594  * tab-width: 8
1595  * indent-tabs-mode: t
1596  * End:
1597  *
1598  * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1599  * :indentSize=8:tabSize=8:noTabs=false:
1600  */
1601