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