For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
[obnox/wireshark/wip.git] / epan / dissectors / packet-h283.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* packet-h283.c                                                              */
4 /* ../../tools/asn2wrs.py -p h283 -c ./h283.cnf -s ./packet-h283-template -D . -O ../../epan/dissectors LCT-PROTOCOL.asn */
5
6 /* Input file: packet-h283-template.c */
7
8 #line 1 "../../asn1/h283/packet-h283-template.c"
9 /* packet-h283.c
10  * Routines for H.283 packet dissection
11  * 2007  Tomas Kukosa
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32  */
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <glib.h>
39 #include <epan/packet.h>
40 #include <epan/oids.h>
41 #include <epan/asn1.h>
42
43 #include "packet-per.h"
44
45 #define PNAME  "H.283 Logical Channel Transport"
46 #define PSNAME "LCT"
47 #define PFNAME "lct"
48
49 /* Initialize the protocol and registered fields */
50 static int proto_h283 = -1;
51
52 /*--- Included file: packet-h283-hf.c ---*/
53 #line 1 "../../asn1/h283/packet-h283-hf.c"
54 static int hf_h283_LCTPDU_PDU = -1;               /* LCTPDU */
55 static int hf_h283_t35CountryCode = -1;           /* INTEGER_0_255 */
56 static int hf_h283_t35Extension = -1;             /* INTEGER_0_255 */
57 static int hf_h283_manufacturerCode = -1;         /* INTEGER_0_65535 */
58 static int hf_h283_object = -1;                   /* OBJECT_IDENTIFIER */
59 static int hf_h283_h221NonStandard = -1;          /* H221NonStandard */
60 static int hf_h283_nonStandardIdentifier = -1;    /* NonStandardIdentifier */
61 static int hf_h283_data = -1;                     /* OCTET_STRING */
62 static int hf_h283_srcAddr = -1;                  /* MTAddress */
63 static int hf_h283_dstAddr = -1;                  /* MTAddress */
64 static int hf_h283_timestamp = -1;                /* INTEGER_0_4294967295 */
65 static int hf_h283_seqNumber = -1;                /* INTEGER_0_65535 */
66 static int hf_h283_pduType = -1;                  /* T_pduType */
67 static int hf_h283_ack = -1;                      /* NULL */
68 static int hf_h283_rdcData = -1;                  /* RDCData */
69 static int hf_h283_nonStandardParameters = -1;    /* SEQUENCE_OF_NonStandardParameter */
70 static int hf_h283_nonStandardParameters_item = -1;  /* NonStandardParameter */
71 static int hf_h283_mAddress = -1;                 /* INTEGER_0_65535 */
72 static int hf_h283_tAddress = -1;                 /* INTEGER_0_65535 */
73 static int hf_h283_reliable = -1;                 /* BOOLEAN */
74 static int hf_h283_dataType = -1;                 /* T_dataType */
75 static int hf_h283_lctMessage = -1;               /* LCTMessage */
76 static int hf_h283_rdcPDU = -1;                   /* T_rdcPDU */
77 static int hf_h283_lctRequest = -1;               /* LCTRequest */
78 static int hf_h283_lctResponse = -1;              /* LCTResponse */
79 static int hf_h283_lctIndication = -1;            /* LCTIndication */
80 static int hf_h283_nonStandardMessage = -1;       /* NonStandardMessage */
81 static int hf_h283_announceReq = -1;              /* NULL */
82 static int hf_h283_deviceListReq = -1;            /* NULL */
83 static int hf_h283_announceResp = -1;             /* NULL */
84 static int hf_h283_deviceListResp = -1;           /* T_deviceListResp */
85 static int hf_h283_deviceChange = -1;             /* NULL */
86
87 /*--- End of included file: packet-h283-hf.c ---*/
88 #line 44 "../../asn1/h283/packet-h283-template.c"
89
90 /* Initialize the subtree pointers */
91 static int ett_h283 = -1;
92
93 /*--- Included file: packet-h283-ett.c ---*/
94 #line 1 "../../asn1/h283/packet-h283-ett.c"
95 static gint ett_h283_H221NonStandard = -1;
96 static gint ett_h283_NonStandardIdentifier = -1;
97 static gint ett_h283_NonStandardParameter = -1;
98 static gint ett_h283_LCTPDU = -1;
99 static gint ett_h283_T_pduType = -1;
100 static gint ett_h283_SEQUENCE_OF_NonStandardParameter = -1;
101 static gint ett_h283_MTAddress = -1;
102 static gint ett_h283_RDCData = -1;
103 static gint ett_h283_T_dataType = -1;
104 static gint ett_h283_LCTMessage = -1;
105 static gint ett_h283_LCTRequest = -1;
106 static gint ett_h283_LCTResponse = -1;
107 static gint ett_h283_LCTIndication = -1;
108 static gint ett_h283_NonStandardMessage = -1;
109
110 /*--- End of included file: packet-h283-ett.c ---*/
111 #line 48 "../../asn1/h283/packet-h283-template.c"
112
113 /* Subdissectors */
114 static dissector_handle_t rdc_pdu_handle;
115 static dissector_handle_t rdc_device_list_handle;
116 static dissector_handle_t data_handle;
117
118 static gboolean info_is_set;
119
120
121 /*--- Included file: packet-h283-fn.c ---*/
122 #line 1 "../../asn1/h283/packet-h283-fn.c"
123
124
125 static int
126 dissect_h283_INTEGER_0_255(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
127   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
128                                                             0U, 255U, NULL, FALSE);
129
130   return offset;
131 }
132
133
134
135 static int
136 dissect_h283_INTEGER_0_65535(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
137   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
138                                                             0U, 65535U, NULL, FALSE);
139
140   return offset;
141 }
142
143
144 static const per_sequence_t H221NonStandard_sequence[] = {
145   { &hf_h283_t35CountryCode , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_255 },
146   { &hf_h283_t35Extension   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_255 },
147   { &hf_h283_manufacturerCode, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_65535 },
148   { NULL, 0, 0, NULL }
149 };
150
151 static int
152 dissect_h283_H221NonStandard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
153   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
154                                    ett_h283_H221NonStandard, H221NonStandard_sequence);
155
156   return offset;
157 }
158
159
160
161 static int
162 dissect_h283_OBJECT_IDENTIFIER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
163   offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
164
165   return offset;
166 }
167
168
169 static const value_string h283_NonStandardIdentifier_vals[] = {
170   {   0, "object" },
171   {   1, "h221NonStandard" },
172   { 0, NULL }
173 };
174
175 static const per_choice_t NonStandardIdentifier_choice[] = {
176   {   0, &hf_h283_object         , ASN1_EXTENSION_ROOT    , dissect_h283_OBJECT_IDENTIFIER },
177   {   1, &hf_h283_h221NonStandard, ASN1_EXTENSION_ROOT    , dissect_h283_H221NonStandard },
178   { 0, NULL, 0, NULL }
179 };
180
181 static int
182 dissect_h283_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
183   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
184                                  ett_h283_NonStandardIdentifier, NonStandardIdentifier_choice,
185                                  NULL);
186
187   return offset;
188 }
189
190
191
192 static int
193 dissect_h283_OCTET_STRING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
194   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
195                                        NO_BOUND, NO_BOUND, FALSE, NULL);
196
197   return offset;
198 }
199
200
201 static const per_sequence_t NonStandardParameter_sequence[] = {
202   { &hf_h283_nonStandardIdentifier, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_NonStandardIdentifier },
203   { &hf_h283_data           , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_OCTET_STRING },
204   { NULL, 0, 0, NULL }
205 };
206
207 static int
208 dissect_h283_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
209   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
210                                    ett_h283_NonStandardParameter, NonStandardParameter_sequence);
211
212   return offset;
213 }
214
215
216 static const per_sequence_t MTAddress_sequence[] = {
217   { &hf_h283_mAddress       , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_65535 },
218   { &hf_h283_tAddress       , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_65535 },
219   { NULL, 0, 0, NULL }
220 };
221
222 static int
223 dissect_h283_MTAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
224   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
225                                    ett_h283_MTAddress, MTAddress_sequence);
226
227   return offset;
228 }
229
230
231
232 static int
233 dissect_h283_INTEGER_0_4294967295(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
234   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
235                                                             0U, 4294967295U, NULL, FALSE);
236
237   return offset;
238 }
239
240
241
242 static int
243 dissect_h283_NULL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
244   offset = dissect_per_null(tvb, offset, actx, tree, hf_index);
245
246   return offset;
247 }
248
249
250
251 static int
252 dissect_h283_BOOLEAN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
253   offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, NULL);
254
255   return offset;
256 }
257
258
259 static const value_string h283_LCTRequest_vals[] = {
260   {   0, "announceReq" },
261   {   1, "deviceListReq" },
262   { 0, NULL }
263 };
264
265 static const per_choice_t LCTRequest_choice[] = {
266   {   0, &hf_h283_announceReq    , ASN1_EXTENSION_ROOT    , dissect_h283_NULL },
267   {   1, &hf_h283_deviceListReq  , ASN1_EXTENSION_ROOT    , dissect_h283_NULL },
268   { 0, NULL, 0, NULL }
269 };
270
271 static int
272 dissect_h283_LCTRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
273 #line 58 "../../asn1/h283/h283.cnf"
274   gint32 msg_type = -1;
275   const gchar *p = NULL;
276
277   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
278                                  ett_h283_LCTRequest, LCTRequest_choice,
279                                  &msg_type);
280
281 #line 61 "../../asn1/h283/h283.cnf"
282   p = match_strval(msg_type, VALS(h283_LCTRequest_vals));
283   if (!info_is_set && p ) {
284     col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTRequest/%s", p);
285     info_is_set = TRUE;
286   }
287
288   return offset;
289 }
290
291
292
293 static int
294 dissect_h283_T_deviceListResp(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
295 #line 105 "../../asn1/h283/h283.cnf"
296   tvbuff_t *next_tvb = NULL;
297
298   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
299                                        NO_BOUND, NO_BOUND, FALSE, &next_tvb);
300
301   if (next_tvb && tvb_length(next_tvb)) {
302     call_dissector((rdc_device_list_handle)?rdc_device_list_handle:data_handle, next_tvb, actx->pinfo, tree);
303   }
304
305
306   return offset;
307 }
308
309
310 static const value_string h283_LCTResponse_vals[] = {
311   {   0, "announceResp" },
312   {   1, "deviceListResp" },
313   { 0, NULL }
314 };
315
316 static const per_choice_t LCTResponse_choice[] = {
317   {   0, &hf_h283_announceResp   , ASN1_EXTENSION_ROOT    , dissect_h283_NULL },
318   {   1, &hf_h283_deviceListResp , ASN1_EXTENSION_ROOT    , dissect_h283_T_deviceListResp },
319   { 0, NULL, 0, NULL }
320 };
321
322 static int
323 dissect_h283_LCTResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
324 #line 71 "../../asn1/h283/h283.cnf"
325   gint32 msg_type = -1;
326   const gchar *p = NULL;
327
328   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
329                                  ett_h283_LCTResponse, LCTResponse_choice,
330                                  &msg_type);
331
332 #line 74 "../../asn1/h283/h283.cnf"
333   p = match_strval(msg_type, VALS(h283_LCTResponse_vals));
334   if (!info_is_set && p ) {
335     col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTResponse/%s", p);
336     info_is_set = TRUE;
337   }
338
339   return offset;
340 }
341
342
343 static const value_string h283_LCTIndication_vals[] = {
344   {   0, "deviceChange" },
345   { 0, NULL }
346 };
347
348 static const per_choice_t LCTIndication_choice[] = {
349   {   0, &hf_h283_deviceChange   , ASN1_EXTENSION_ROOT    , dissect_h283_NULL },
350   { 0, NULL, 0, NULL }
351 };
352
353 static int
354 dissect_h283_LCTIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
355 #line 84 "../../asn1/h283/h283.cnf"
356   gint32 msg_type = -1;
357   const gchar *p = NULL;
358
359   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
360                                  ett_h283_LCTIndication, LCTIndication_choice,
361                                  &msg_type);
362
363 #line 87 "../../asn1/h283/h283.cnf"
364   p = match_strval(msg_type, VALS(h283_LCTIndication_vals));
365   if (!info_is_set && p ) {
366     col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTIndication/%s", p);
367     info_is_set = TRUE;
368   }
369
370   return offset;
371 }
372
373
374 static const per_sequence_t SEQUENCE_OF_NonStandardParameter_sequence_of[1] = {
375   { &hf_h283_nonStandardParameters_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h283_NonStandardParameter },
376 };
377
378 static int
379 dissect_h283_SEQUENCE_OF_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
380   offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
381                                       ett_h283_SEQUENCE_OF_NonStandardParameter, SEQUENCE_OF_NonStandardParameter_sequence_of);
382
383   return offset;
384 }
385
386
387 static const per_sequence_t NonStandardMessage_sequence[] = {
388   { &hf_h283_nonStandardParameters, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h283_SEQUENCE_OF_NonStandardParameter },
389   { NULL, 0, 0, NULL }
390 };
391
392 static int
393 dissect_h283_NonStandardMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
394   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
395                                    ett_h283_NonStandardMessage, NonStandardMessage_sequence);
396
397   return offset;
398 }
399
400
401 static const value_string h283_LCTMessage_vals[] = {
402   {   0, "lctRequest" },
403   {   1, "lctResponse" },
404   {   2, "lctIndication" },
405   {   3, "nonStandardMessage" },
406   { 0, NULL }
407 };
408
409 static const per_choice_t LCTMessage_choice[] = {
410   {   0, &hf_h283_lctRequest     , ASN1_EXTENSION_ROOT    , dissect_h283_LCTRequest },
411   {   1, &hf_h283_lctResponse    , ASN1_EXTENSION_ROOT    , dissect_h283_LCTResponse },
412   {   2, &hf_h283_lctIndication  , ASN1_EXTENSION_ROOT    , dissect_h283_LCTIndication },
413   {   3, &hf_h283_nonStandardMessage, ASN1_EXTENSION_ROOT    , dissect_h283_NonStandardMessage },
414   { 0, NULL, 0, NULL }
415 };
416
417 static int
418 dissect_h283_LCTMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
419 #line 45 "../../asn1/h283/h283.cnf"
420   gint32 msg_type = -1;
421   const gchar *p = NULL;
422
423   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
424                                  ett_h283_LCTMessage, LCTMessage_choice,
425                                  &msg_type);
426
427 #line 48 "../../asn1/h283/h283.cnf"
428   p = match_strval(msg_type, VALS(h283_LCTMessage_vals));
429   if (!info_is_set && p ) {
430     col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTMessage/%s", p);
431     info_is_set = TRUE;
432   }
433
434   return offset;
435 }
436
437
438
439 static int
440 dissect_h283_T_rdcPDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
441 #line 95 "../../asn1/h283/h283.cnf"
442   tvbuff_t *next_tvb = NULL;
443
444   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
445                                        NO_BOUND, NO_BOUND, FALSE, &next_tvb);
446
447   if (next_tvb && tvb_length(next_tvb)) {
448     call_dissector((rdc_pdu_handle)?rdc_pdu_handle:data_handle, next_tvb, actx->pinfo, proto_tree_get_root(tree));
449   }
450   info_is_set = TRUE;
451
452
453   return offset;
454 }
455
456
457 static const value_string h283_T_dataType_vals[] = {
458   {   0, "lctMessage" },
459   {   1, "rdcPDU" },
460   { 0, NULL }
461 };
462
463 static const per_choice_t T_dataType_choice[] = {
464   {   0, &hf_h283_lctMessage     , ASN1_NO_EXTENSIONS     , dissect_h283_LCTMessage },
465   {   1, &hf_h283_rdcPDU         , ASN1_NO_EXTENSIONS     , dissect_h283_T_rdcPDU },
466   { 0, NULL, 0, NULL }
467 };
468
469 static int
470 dissect_h283_T_dataType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
471 #line 32 "../../asn1/h283/h283.cnf"
472   gint32 data_type = -1;
473   const gchar *p = NULL;
474
475   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
476                                  ett_h283_T_dataType, T_dataType_choice,
477                                  &data_type);
478
479 #line 35 "../../asn1/h283/h283.cnf"
480   p = match_strval(data_type, VALS(h283_T_dataType_vals));
481   if (!info_is_set && p ) {
482     col_add_fstr(actx->pinfo->cinfo, COL_INFO, "RDCData/%s", p);
483     info_is_set = TRUE;
484   }
485
486   return offset;
487 }
488
489
490 static const per_sequence_t RDCData_sequence[] = {
491   { &hf_h283_reliable       , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_BOOLEAN },
492   { &hf_h283_dataType       , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_T_dataType },
493   { NULL, 0, 0, NULL }
494 };
495
496 static int
497 dissect_h283_RDCData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
498   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
499                                    ett_h283_RDCData, RDCData_sequence);
500
501   return offset;
502 }
503
504
505 static const value_string h283_T_pduType_vals[] = {
506   {   0, "ack" },
507   {   1, "rdcData" },
508   { 0, NULL }
509 };
510
511 static const per_choice_t T_pduType_choice[] = {
512   {   0, &hf_h283_ack            , ASN1_NO_EXTENSIONS     , dissect_h283_NULL },
513   {   1, &hf_h283_rdcData        , ASN1_NO_EXTENSIONS     , dissect_h283_RDCData },
514   { 0, NULL, 0, NULL }
515 };
516
517 static int
518 dissect_h283_T_pduType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
519 #line 19 "../../asn1/h283/h283.cnf"
520   gint32 pdu_type = -1;
521   const gchar *p = NULL;
522
523   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
524                                  ett_h283_T_pduType, T_pduType_choice,
525                                  &pdu_type);
526
527 #line 22 "../../asn1/h283/h283.cnf"
528   p = match_strval(pdu_type, VALS(h283_T_pduType_vals));
529   if (!info_is_set && p ) {
530     col_set_str(actx->pinfo->cinfo, COL_INFO, p);
531     info_is_set = TRUE;
532   }
533
534   return offset;
535 }
536
537
538 static const per_sequence_t LCTPDU_sequence[] = {
539   { &hf_h283_srcAddr        , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_MTAddress },
540   { &hf_h283_dstAddr        , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_MTAddress },
541   { &hf_h283_timestamp      , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_4294967295 },
542   { &hf_h283_seqNumber      , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_INTEGER_0_65535 },
543   { &hf_h283_pduType        , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h283_T_pduType },
544   { &hf_h283_nonStandardParameters, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h283_SEQUENCE_OF_NonStandardParameter },
545   { NULL, 0, 0, NULL }
546 };
547
548 static int
549 dissect_h283_LCTPDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
550   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
551                                    ett_h283_LCTPDU, LCTPDU_sequence);
552
553   return offset;
554 }
555
556 /*--- PDUs ---*/
557
558 static int dissect_LCTPDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
559   int offset = 0;
560   asn1_ctx_t asn1_ctx;
561   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
562   offset = dissect_h283_LCTPDU(tvb, offset, &asn1_ctx, tree, hf_h283_LCTPDU_PDU);
563   offset += 7; offset >>= 3;
564   return offset;
565 }
566
567
568 /*--- End of included file: packet-h283-fn.c ---*/
569 #line 57 "../../asn1/h283/packet-h283-template.c"
570
571 static int
572 dissect_h283_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
573 {
574   proto_item  *ti = NULL;
575   proto_tree  *h283_tree = NULL;
576
577   col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
578
579   info_is_set = FALSE;
580
581   ti = proto_tree_add_item(tree, proto_h283, tvb, 0, -1, ENC_NA);
582   h283_tree = proto_item_add_subtree(ti, ett_h283);
583
584   return dissect_LCTPDU_PDU(tvb, pinfo, h283_tree);
585 }
586
587 /*--- proto_register_h283 ----------------------------------------------*/
588 void proto_register_h283(void) {
589
590   /* List of fields */
591   static hf_register_info hf[] = {
592
593 /*--- Included file: packet-h283-hfarr.c ---*/
594 #line 1 "../../asn1/h283/packet-h283-hfarr.c"
595     { &hf_h283_LCTPDU_PDU,
596       { "LCTPDU", "h283.LCTPDU",
597         FT_NONE, BASE_NONE, NULL, 0,
598         NULL, HFILL }},
599     { &hf_h283_t35CountryCode,
600       { "t35CountryCode", "h283.t35CountryCode",
601         FT_UINT32, BASE_DEC, NULL, 0,
602         "INTEGER_0_255", HFILL }},
603     { &hf_h283_t35Extension,
604       { "t35Extension", "h283.t35Extension",
605         FT_UINT32, BASE_DEC, NULL, 0,
606         "INTEGER_0_255", HFILL }},
607     { &hf_h283_manufacturerCode,
608       { "manufacturerCode", "h283.manufacturerCode",
609         FT_UINT32, BASE_DEC, NULL, 0,
610         "INTEGER_0_65535", HFILL }},
611     { &hf_h283_object,
612       { "object", "h283.object",
613         FT_OID, BASE_NONE, NULL, 0,
614         "OBJECT_IDENTIFIER", HFILL }},
615     { &hf_h283_h221NonStandard,
616       { "h221NonStandard", "h283.h221NonStandard",
617         FT_NONE, BASE_NONE, NULL, 0,
618         NULL, HFILL }},
619     { &hf_h283_nonStandardIdentifier,
620       { "nonStandardIdentifier", "h283.nonStandardIdentifier",
621         FT_UINT32, BASE_DEC, VALS(h283_NonStandardIdentifier_vals), 0,
622         NULL, HFILL }},
623     { &hf_h283_data,
624       { "data", "h283.data",
625         FT_BYTES, BASE_NONE, NULL, 0,
626         "OCTET_STRING", HFILL }},
627     { &hf_h283_srcAddr,
628       { "srcAddr", "h283.srcAddr",
629         FT_NONE, BASE_NONE, NULL, 0,
630         "MTAddress", HFILL }},
631     { &hf_h283_dstAddr,
632       { "dstAddr", "h283.dstAddr",
633         FT_NONE, BASE_NONE, NULL, 0,
634         "MTAddress", HFILL }},
635     { &hf_h283_timestamp,
636       { "timestamp", "h283.timestamp",
637         FT_UINT32, BASE_DEC, NULL, 0,
638         "INTEGER_0_4294967295", HFILL }},
639     { &hf_h283_seqNumber,
640       { "seqNumber", "h283.seqNumber",
641         FT_UINT32, BASE_DEC, NULL, 0,
642         "INTEGER_0_65535", HFILL }},
643     { &hf_h283_pduType,
644       { "pduType", "h283.pduType",
645         FT_UINT32, BASE_DEC, VALS(h283_T_pduType_vals), 0,
646         NULL, HFILL }},
647     { &hf_h283_ack,
648       { "ack", "h283.ack",
649         FT_NONE, BASE_NONE, NULL, 0,
650         NULL, HFILL }},
651     { &hf_h283_rdcData,
652       { "rdcData", "h283.rdcData",
653         FT_NONE, BASE_NONE, NULL, 0,
654         NULL, HFILL }},
655     { &hf_h283_nonStandardParameters,
656       { "nonStandardParameters", "h283.nonStandardParameters",
657         FT_UINT32, BASE_DEC, NULL, 0,
658         "SEQUENCE_OF_NonStandardParameter", HFILL }},
659     { &hf_h283_nonStandardParameters_item,
660       { "NonStandardParameter", "h283.NonStandardParameter",
661         FT_NONE, BASE_NONE, NULL, 0,
662         NULL, HFILL }},
663     { &hf_h283_mAddress,
664       { "mAddress", "h283.mAddress",
665         FT_UINT32, BASE_DEC, NULL, 0,
666         "INTEGER_0_65535", HFILL }},
667     { &hf_h283_tAddress,
668       { "tAddress", "h283.tAddress",
669         FT_UINT32, BASE_DEC, NULL, 0,
670         "INTEGER_0_65535", HFILL }},
671     { &hf_h283_reliable,
672       { "reliable", "h283.reliable",
673         FT_BOOLEAN, BASE_NONE, NULL, 0,
674         "BOOLEAN", HFILL }},
675     { &hf_h283_dataType,
676       { "dataType", "h283.dataType",
677         FT_UINT32, BASE_DEC, VALS(h283_T_dataType_vals), 0,
678         NULL, HFILL }},
679     { &hf_h283_lctMessage,
680       { "lctMessage", "h283.lctMessage",
681         FT_UINT32, BASE_DEC, VALS(h283_LCTMessage_vals), 0,
682         NULL, HFILL }},
683     { &hf_h283_rdcPDU,
684       { "rdcPDU", "h283.rdcPDU",
685         FT_UINT32, BASE_DEC, NULL, 0,
686         NULL, HFILL }},
687     { &hf_h283_lctRequest,
688       { "lctRequest", "h283.lctRequest",
689         FT_UINT32, BASE_DEC, VALS(h283_LCTRequest_vals), 0,
690         NULL, HFILL }},
691     { &hf_h283_lctResponse,
692       { "lctResponse", "h283.lctResponse",
693         FT_UINT32, BASE_DEC, VALS(h283_LCTResponse_vals), 0,
694         NULL, HFILL }},
695     { &hf_h283_lctIndication,
696       { "lctIndication", "h283.lctIndication",
697         FT_UINT32, BASE_DEC, VALS(h283_LCTIndication_vals), 0,
698         NULL, HFILL }},
699     { &hf_h283_nonStandardMessage,
700       { "nonStandardMessage", "h283.nonStandardMessage",
701         FT_NONE, BASE_NONE, NULL, 0,
702         NULL, HFILL }},
703     { &hf_h283_announceReq,
704       { "announceReq", "h283.announceReq",
705         FT_NONE, BASE_NONE, NULL, 0,
706         NULL, HFILL }},
707     { &hf_h283_deviceListReq,
708       { "deviceListReq", "h283.deviceListReq",
709         FT_NONE, BASE_NONE, NULL, 0,
710         NULL, HFILL }},
711     { &hf_h283_announceResp,
712       { "announceResp", "h283.announceResp",
713         FT_NONE, BASE_NONE, NULL, 0,
714         NULL, HFILL }},
715     { &hf_h283_deviceListResp,
716       { "deviceListResp", "h283.deviceListResp",
717         FT_UINT32, BASE_DEC, NULL, 0,
718         NULL, HFILL }},
719     { &hf_h283_deviceChange,
720       { "deviceChange", "h283.deviceChange",
721         FT_NONE, BASE_NONE, NULL, 0,
722         NULL, HFILL }},
723
724 /*--- End of included file: packet-h283-hfarr.c ---*/
725 #line 80 "../../asn1/h283/packet-h283-template.c"
726   };
727
728   /* List of subtrees */
729   static gint *ett[] = {
730     &ett_h283,
731
732 /*--- Included file: packet-h283-ettarr.c ---*/
733 #line 1 "../../asn1/h283/packet-h283-ettarr.c"
734     &ett_h283_H221NonStandard,
735     &ett_h283_NonStandardIdentifier,
736     &ett_h283_NonStandardParameter,
737     &ett_h283_LCTPDU,
738     &ett_h283_T_pduType,
739     &ett_h283_SEQUENCE_OF_NonStandardParameter,
740     &ett_h283_MTAddress,
741     &ett_h283_RDCData,
742     &ett_h283_T_dataType,
743     &ett_h283_LCTMessage,
744     &ett_h283_LCTRequest,
745     &ett_h283_LCTResponse,
746     &ett_h283_LCTIndication,
747     &ett_h283_NonStandardMessage,
748
749 /*--- End of included file: packet-h283-ettarr.c ---*/
750 #line 86 "../../asn1/h283/packet-h283-template.c"
751   };
752
753   /* Register protocol */
754   proto_h283 = proto_register_protocol(PNAME, PSNAME, PFNAME);
755
756   /* Register fields and subtrees */
757   proto_register_field_array(proto_h283, hf, array_length(hf));
758   proto_register_subtree_array(ett, array_length(ett));
759
760   new_register_dissector(PFNAME, dissect_h283_udp, proto_h283);
761
762 }
763
764 /*--- proto_reg_handoff_h283 -------------------------------------------*/
765 void proto_reg_handoff_h283(void)
766 {
767   dissector_handle_t h283_udp_handle;
768
769   h283_udp_handle = find_dissector(PFNAME);
770   dissector_add_handle("udp.port", h283_udp_handle);
771
772   rdc_pdu_handle = find_dissector("rdc");
773   rdc_device_list_handle = find_dissector("rdc.device_list");
774   data_handle = find_dissector("data");
775 }
776