Enable Lua tcp tap userdata.
[obnox/wireshark/wip.git] / epan / dissectors / packet-logotypecertextn.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* packet-logotypecertextn.c                                                  */
4 /* ../../tools/asn2wrs.py -b -p logotypecertextn -c ./logotypecertextn.cnf -s ./packet-logotypecertextn-template -D . LogotypeCertExtn.asn */
5
6 /* Input file: packet-logotypecertextn-template.c */
7
8 #line 1 "packet-logotypecertextn-template.c"
9 /* packet-logotype-cert-extn.c
10  * Routines for RFC3709 Logotype Certificate Extensions packet dissection
11  *   Ronnie Sahlberg 2004
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
41 #include <stdio.h>
42 #include <string.h>
43
44 #include "packet-ber.h"
45 #include "packet-logotypecertextn.h"
46 #include "packet-x509af.h"
47
48 #define PNAME  "Logotype Certificate Extensions"
49 #define PSNAME "LogotypeCertExtn"
50 #define PFNAME "logotypecertextn"
51
52 /* Initialize the protocol and registered fields */
53 static int proto_logotypecertextn = -1;
54
55 /*--- Included file: packet-logotypecertextn-hf.c ---*/
56 #line 1 "packet-logotypecertextn-hf.c"
57 static int hf_logotypecertextn_LogotypeExtn_PDU = -1;  /* LogotypeExtn */
58 static int hf_logotypecertextn_communityLogos = -1;  /* SEQUENCE_OF_LogotypeInfo */
59 static int hf_logotypecertextn_communityLogos_item = -1;  /* LogotypeInfo */
60 static int hf_logotypecertextn_issuerLogo = -1;   /* LogotypeInfo */
61 static int hf_logotypecertextn_subjectLogo = -1;  /* LogotypeInfo */
62 static int hf_logotypecertextn_otherLogos = -1;   /* SEQUENCE_OF_OtherLogotypeInfo */
63 static int hf_logotypecertextn_otherLogos_item = -1;  /* OtherLogotypeInfo */
64 static int hf_logotypecertextn_direct = -1;       /* LogotypeData */
65 static int hf_logotypecertextn_indirect = -1;     /* LogotypeReference */
66 static int hf_logotypecertextn_image = -1;        /* SEQUENCE_OF_LogotypeImage */
67 static int hf_logotypecertextn_image_item = -1;   /* LogotypeImage */
68 static int hf_logotypecertextn_audio = -1;        /* SEQUENCE_OF_LogotypeAudio */
69 static int hf_logotypecertextn_audio_item = -1;   /* LogotypeAudio */
70 static int hf_logotypecertextn_imageDetails = -1;  /* LogotypeDetails */
71 static int hf_logotypecertextn_imageInfo = -1;    /* LogotypeImageInfo */
72 static int hf_logotypecertextn_audioDetails = -1;  /* LogotypeDetails */
73 static int hf_logotypecertextn_audioInfo = -1;    /* LogotypeAudioInfo */
74 static int hf_logotypecertextn_mediaType = -1;    /* IA5String */
75 static int hf_logotypecertextn_logotypeHash = -1;  /* SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue */
76 static int hf_logotypecertextn_logotypeHash_item = -1;  /* HashAlgAndValue */
77 static int hf_logotypecertextn_logotypeURI = -1;  /* T_logotypeURI */
78 static int hf_logotypecertextn_logotypeURI_item = -1;  /* T_logotypeURI_item */
79 static int hf_logotypecertextn_type = -1;         /* LogotypeImageType */
80 static int hf_logotypecertextn_fileSize = -1;     /* INTEGER */
81 static int hf_logotypecertextn_xSize = -1;        /* INTEGER */
82 static int hf_logotypecertextn_ySize = -1;        /* INTEGER */
83 static int hf_logotypecertextn_resolution = -1;   /* LogotypeImageResolution */
84 static int hf_logotypecertextn_language = -1;     /* IA5String */
85 static int hf_logotypecertextn_numBits = -1;      /* INTEGER */
86 static int hf_logotypecertextn_tableSize = -1;    /* INTEGER */
87 static int hf_logotypecertextn_playTime = -1;     /* INTEGER */
88 static int hf_logotypecertextn_channels = -1;     /* INTEGER */
89 static int hf_logotypecertextn_sampleRate = -1;   /* INTEGER */
90 static int hf_logotypecertextn_logotypeType = -1;  /* OBJECT_IDENTIFIER */
91 static int hf_logotypecertextn_info = -1;         /* LogotypeInfo */
92 static int hf_logotypecertextn_refStructHash = -1;  /* SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue */
93 static int hf_logotypecertextn_refStructHash_item = -1;  /* HashAlgAndValue */
94 static int hf_logotypecertextn_refStructURI = -1;  /* T_refStructURI */
95 static int hf_logotypecertextn_refStructURI_item = -1;  /* T_refStructURI_item */
96 static int hf_logotypecertextn_hashAlg = -1;      /* AlgorithmIdentifier */
97 static int hf_logotypecertextn_hashValue = -1;    /* OCTET_STRING */
98
99 /*--- End of included file: packet-logotypecertextn-hf.c ---*/
100 #line 47 "packet-logotypecertextn-template.c"
101
102 /* Initialize the subtree pointers */
103
104 /*--- Included file: packet-logotypecertextn-ett.c ---*/
105 #line 1 "packet-logotypecertextn-ett.c"
106 static gint ett_logotypecertextn_LogotypeExtn = -1;
107 static gint ett_logotypecertextn_SEQUENCE_OF_LogotypeInfo = -1;
108 static gint ett_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo = -1;
109 static gint ett_logotypecertextn_LogotypeInfo = -1;
110 static gint ett_logotypecertextn_LogotypeData = -1;
111 static gint ett_logotypecertextn_SEQUENCE_OF_LogotypeImage = -1;
112 static gint ett_logotypecertextn_SEQUENCE_OF_LogotypeAudio = -1;
113 static gint ett_logotypecertextn_LogotypeImage = -1;
114 static gint ett_logotypecertextn_LogotypeAudio = -1;
115 static gint ett_logotypecertextn_LogotypeDetails = -1;
116 static gint ett_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue = -1;
117 static gint ett_logotypecertextn_T_logotypeURI = -1;
118 static gint ett_logotypecertextn_LogotypeImageInfo = -1;
119 static gint ett_logotypecertextn_LogotypeImageResolution = -1;
120 static gint ett_logotypecertextn_LogotypeAudioInfo = -1;
121 static gint ett_logotypecertextn_OtherLogotypeInfo = -1;
122 static gint ett_logotypecertextn_LogotypeReference = -1;
123 static gint ett_logotypecertextn_T_refStructURI = -1;
124 static gint ett_logotypecertextn_HashAlgAndValue = -1;
125
126 /*--- End of included file: packet-logotypecertextn-ett.c ---*/
127 #line 50 "packet-logotypecertextn-template.c"
128
129
130
131 /*--- Included file: packet-logotypecertextn-fn.c ---*/
132 #line 1 "packet-logotypecertextn-fn.c"
133
134
135 static int
136 dissect_logotypecertextn_IA5String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
137   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
138                                             actx, tree, tvb, offset, hf_index,
139                                             NULL);
140
141   return offset;
142 }
143
144
145
146 static int
147 dissect_logotypecertextn_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
148   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
149                                        NULL);
150
151   return offset;
152 }
153
154
155 static const ber_sequence_t HashAlgAndValue_sequence[] = {
156   { &hf_logotypecertextn_hashAlg, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
157   { &hf_logotypecertextn_hashValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_OCTET_STRING },
158   { NULL, 0, 0, 0, NULL }
159 };
160
161 static int
162 dissect_logotypecertextn_HashAlgAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
163   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
164                                    HashAlgAndValue_sequence, hf_index, ett_logotypecertextn_HashAlgAndValue);
165
166   return offset;
167 }
168
169
170 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue_sequence_of[1] = {
171   { &hf_logotypecertextn_logotypeHash_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_HashAlgAndValue },
172 };
173
174 static int
175 dissect_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
176   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
177                                       SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue);
178
179   return offset;
180 }
181
182
183
184 static int
185 dissect_logotypecertextn_T_logotypeURI_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
186   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
187                                             actx, tree, tvb, offset, hf_index,
188                                             NULL);
189
190 #line 18 "logotypecertextn.cnf"
191            PROTO_ITEM_SET_URL(actx->created_item);
192
193
194   return offset;
195 }
196
197
198 static const ber_sequence_t T_logotypeURI_sequence_of[1] = {
199   { &hf_logotypecertextn_logotypeURI_item, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_logotypeURI_item },
200 };
201
202 static int
203 dissect_logotypecertextn_T_logotypeURI(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
204   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
205                                       T_logotypeURI_sequence_of, hf_index, ett_logotypecertextn_T_logotypeURI);
206
207   return offset;
208 }
209
210
211 static const ber_sequence_t LogotypeDetails_sequence[] = {
212   { &hf_logotypecertextn_mediaType, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_IA5String },
213   { &hf_logotypecertextn_logotypeHash, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue },
214   { &hf_logotypecertextn_logotypeURI, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_logotypeURI },
215   { NULL, 0, 0, 0, NULL }
216 };
217
218 static int
219 dissect_logotypecertextn_LogotypeDetails(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
220   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
221                                    LogotypeDetails_sequence, hf_index, ett_logotypecertextn_LogotypeDetails);
222
223   return offset;
224 }
225
226
227 static const value_string logotypecertextn_LogotypeImageType_vals[] = {
228   {   0, "grayScale" },
229   {   1, "color" },
230   { 0, NULL }
231 };
232
233
234 static int
235 dissect_logotypecertextn_LogotypeImageType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
236   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
237                                                 NULL);
238
239   return offset;
240 }
241
242
243
244 static int
245 dissect_logotypecertextn_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
246   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
247                                                 NULL);
248
249   return offset;
250 }
251
252
253 static const value_string logotypecertextn_LogotypeImageResolution_vals[] = {
254   {   1, "numBits" },
255   {   2, "tableSize" },
256   { 0, NULL }
257 };
258
259 static const ber_choice_t LogotypeImageResolution_choice[] = {
260   {   1, &hf_logotypecertextn_numBits, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_INTEGER },
261   {   2, &hf_logotypecertextn_tableSize, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_INTEGER },
262   { 0, NULL, 0, 0, 0, NULL }
263 };
264
265 static int
266 dissect_logotypecertextn_LogotypeImageResolution(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
267   offset = dissect_ber_choice(actx, tree, tvb, offset,
268                                  LogotypeImageResolution_choice, hf_index, ett_logotypecertextn_LogotypeImageResolution,
269                                  NULL);
270
271   return offset;
272 }
273
274
275 static const ber_sequence_t LogotypeImageInfo_sequence[] = {
276   { &hf_logotypecertextn_type, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_LogotypeImageType },
277   { &hf_logotypecertextn_fileSize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
278   { &hf_logotypecertextn_xSize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
279   { &hf_logotypecertextn_ySize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
280   { &hf_logotypecertextn_resolution, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeImageResolution },
281   { &hf_logotypecertextn_language, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_IA5String },
282   { NULL, 0, 0, 0, NULL }
283 };
284
285 static int
286 dissect_logotypecertextn_LogotypeImageInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
287   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
288                                    LogotypeImageInfo_sequence, hf_index, ett_logotypecertextn_LogotypeImageInfo);
289
290   return offset;
291 }
292
293
294 static const ber_sequence_t LogotypeImage_sequence[] = {
295   { &hf_logotypecertextn_imageDetails, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeDetails },
296   { &hf_logotypecertextn_imageInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeImageInfo },
297   { NULL, 0, 0, 0, NULL }
298 };
299
300 static int
301 dissect_logotypecertextn_LogotypeImage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
302   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
303                                    LogotypeImage_sequence, hf_index, ett_logotypecertextn_LogotypeImage);
304
305   return offset;
306 }
307
308
309 static const ber_sequence_t SEQUENCE_OF_LogotypeImage_sequence_of[1] = {
310   { &hf_logotypecertextn_image_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeImage },
311 };
312
313 static int
314 dissect_logotypecertextn_SEQUENCE_OF_LogotypeImage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
315   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
316                                       SEQUENCE_OF_LogotypeImage_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_LogotypeImage);
317
318   return offset;
319 }
320
321
322 static const ber_sequence_t LogotypeAudioInfo_sequence[] = {
323   { &hf_logotypecertextn_fileSize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
324   { &hf_logotypecertextn_playTime, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
325   { &hf_logotypecertextn_channels, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
326   { &hf_logotypecertextn_sampleRate, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_INTEGER },
327   { &hf_logotypecertextn_language, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_IA5String },
328   { NULL, 0, 0, 0, NULL }
329 };
330
331 static int
332 dissect_logotypecertextn_LogotypeAudioInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
333   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
334                                    LogotypeAudioInfo_sequence, hf_index, ett_logotypecertextn_LogotypeAudioInfo);
335
336   return offset;
337 }
338
339
340 static const ber_sequence_t LogotypeAudio_sequence[] = {
341   { &hf_logotypecertextn_audioDetails, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeDetails },
342   { &hf_logotypecertextn_audioInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeAudioInfo },
343   { NULL, 0, 0, 0, NULL }
344 };
345
346 static int
347 dissect_logotypecertextn_LogotypeAudio(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
348   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
349                                    LogotypeAudio_sequence, hf_index, ett_logotypecertextn_LogotypeAudio);
350
351   return offset;
352 }
353
354
355 static const ber_sequence_t SEQUENCE_OF_LogotypeAudio_sequence_of[1] = {
356   { &hf_logotypecertextn_audio_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeAudio },
357 };
358
359 static int
360 dissect_logotypecertextn_SEQUENCE_OF_LogotypeAudio(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
361   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
362                                       SEQUENCE_OF_LogotypeAudio_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_LogotypeAudio);
363
364   return offset;
365 }
366
367
368 static const ber_sequence_t LogotypeData_sequence[] = {
369   { &hf_logotypecertextn_image, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_SEQUENCE_OF_LogotypeImage },
370   { &hf_logotypecertextn_audio, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_SEQUENCE_OF_LogotypeAudio },
371   { NULL, 0, 0, 0, NULL }
372 };
373
374 static int
375 dissect_logotypecertextn_LogotypeData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
376   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
377                                    LogotypeData_sequence, hf_index, ett_logotypecertextn_LogotypeData);
378
379   return offset;
380 }
381
382
383
384 static int
385 dissect_logotypecertextn_T_refStructURI_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
386   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
387                                             actx, tree, tvb, offset, hf_index,
388                                             NULL);
389
390 #line 21 "logotypecertextn.cnf"
391            PROTO_ITEM_SET_URL(actx->created_item);
392
393
394   return offset;
395 }
396
397
398 static const ber_sequence_t T_refStructURI_sequence_of[1] = {
399   { &hf_logotypecertextn_refStructURI_item, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_refStructURI_item },
400 };
401
402 static int
403 dissect_logotypecertextn_T_refStructURI(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
404   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
405                                       T_refStructURI_sequence_of, hf_index, ett_logotypecertextn_T_refStructURI);
406
407   return offset;
408 }
409
410
411 static const ber_sequence_t LogotypeReference_sequence[] = {
412   { &hf_logotypecertextn_refStructHash, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue },
413   { &hf_logotypecertextn_refStructURI, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_refStructURI },
414   { NULL, 0, 0, 0, NULL }
415 };
416
417 static int
418 dissect_logotypecertextn_LogotypeReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
419   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
420                                    LogotypeReference_sequence, hf_index, ett_logotypecertextn_LogotypeReference);
421
422   return offset;
423 }
424
425
426 static const value_string logotypecertextn_LogotypeInfo_vals[] = {
427   {   0, "direct" },
428   {   1, "indirect" },
429   { 0, NULL }
430 };
431
432 static const ber_choice_t LogotypeInfo_choice[] = {
433   {   0, &hf_logotypecertextn_direct, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_LogotypeData },
434   {   1, &hf_logotypecertextn_indirect, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_LogotypeReference },
435   { 0, NULL, 0, 0, 0, NULL }
436 };
437
438 static int
439 dissect_logotypecertextn_LogotypeInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
440   offset = dissect_ber_choice(actx, tree, tvb, offset,
441                                  LogotypeInfo_choice, hf_index, ett_logotypecertextn_LogotypeInfo,
442                                  NULL);
443
444   return offset;
445 }
446
447
448 static const ber_sequence_t SEQUENCE_OF_LogotypeInfo_sequence_of[1] = {
449   { &hf_logotypecertextn_communityLogos_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
450 };
451
452 static int
453 dissect_logotypecertextn_SEQUENCE_OF_LogotypeInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
454   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
455                                       SEQUENCE_OF_LogotypeInfo_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_LogotypeInfo);
456
457   return offset;
458 }
459
460
461
462 static int
463 dissect_logotypecertextn_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
464   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
465
466   return offset;
467 }
468
469
470 static const ber_sequence_t OtherLogotypeInfo_sequence[] = {
471   { &hf_logotypecertextn_logotypeType, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_OBJECT_IDENTIFIER },
472   { &hf_logotypecertextn_info, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
473   { NULL, 0, 0, 0, NULL }
474 };
475
476 static int
477 dissect_logotypecertextn_OtherLogotypeInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
478   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
479                                    OtherLogotypeInfo_sequence, hf_index, ett_logotypecertextn_OtherLogotypeInfo);
480
481   return offset;
482 }
483
484
485 static const ber_sequence_t SEQUENCE_OF_OtherLogotypeInfo_sequence_of[1] = {
486   { &hf_logotypecertextn_otherLogos_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_OtherLogotypeInfo },
487 };
488
489 static int
490 dissect_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
491   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
492                                       SEQUENCE_OF_OtherLogotypeInfo_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo);
493
494   return offset;
495 }
496
497
498 static const ber_sequence_t LogotypeExtn_sequence[] = {
499   { &hf_logotypecertextn_communityLogos, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_logotypecertextn_SEQUENCE_OF_LogotypeInfo },
500   { &hf_logotypecertextn_issuerLogo, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
501   { &hf_logotypecertextn_subjectLogo, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
502   { &hf_logotypecertextn_otherLogos, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo },
503   { NULL, 0, 0, 0, NULL }
504 };
505
506 static int
507 dissect_logotypecertextn_LogotypeExtn(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
508   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
509                                    LogotypeExtn_sequence, hf_index, ett_logotypecertextn_LogotypeExtn);
510
511   return offset;
512 }
513
514 /*--- PDUs ---*/
515
516 static void dissect_LogotypeExtn_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
517   asn1_ctx_t asn1_ctx;
518   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
519   dissect_logotypecertextn_LogotypeExtn(FALSE, tvb, 0, &asn1_ctx, tree, hf_logotypecertextn_LogotypeExtn_PDU);
520 }
521
522
523 /*--- End of included file: packet-logotypecertextn-fn.c ---*/
524 #line 53 "packet-logotypecertextn-template.c"
525
526
527 /*--- proto_register_logotypecertextn ----------------------------------------------*/
528 void proto_register_logotypecertextn(void) {
529
530   /* List of fields */
531   static hf_register_info hf[] = {
532
533 /*--- Included file: packet-logotypecertextn-hfarr.c ---*/
534 #line 1 "packet-logotypecertextn-hfarr.c"
535     { &hf_logotypecertextn_LogotypeExtn_PDU,
536       { "LogotypeExtn", "logotypecertextn.LogotypeExtn",
537         FT_NONE, BASE_NONE, NULL, 0,
538         "logotypecertextn.LogotypeExtn", HFILL }},
539     { &hf_logotypecertextn_communityLogos,
540       { "communityLogos", "logotypecertextn.communityLogos",
541         FT_UINT32, BASE_DEC, NULL, 0,
542         "logotypecertextn.SEQUENCE_OF_LogotypeInfo", HFILL }},
543     { &hf_logotypecertextn_communityLogos_item,
544       { "LogotypeInfo", "logotypecertextn.LogotypeInfo",
545         FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
546         "logotypecertextn.LogotypeInfo", HFILL }},
547     { &hf_logotypecertextn_issuerLogo,
548       { "issuerLogo", "logotypecertextn.issuerLogo",
549         FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
550         "logotypecertextn.LogotypeInfo", HFILL }},
551     { &hf_logotypecertextn_subjectLogo,
552       { "subjectLogo", "logotypecertextn.subjectLogo",
553         FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
554         "logotypecertextn.LogotypeInfo", HFILL }},
555     { &hf_logotypecertextn_otherLogos,
556       { "otherLogos", "logotypecertextn.otherLogos",
557         FT_UINT32, BASE_DEC, NULL, 0,
558         "logotypecertextn.SEQUENCE_OF_OtherLogotypeInfo", HFILL }},
559     { &hf_logotypecertextn_otherLogos_item,
560       { "OtherLogotypeInfo", "logotypecertextn.OtherLogotypeInfo",
561         FT_NONE, BASE_NONE, NULL, 0,
562         "logotypecertextn.OtherLogotypeInfo", HFILL }},
563     { &hf_logotypecertextn_direct,
564       { "direct", "logotypecertextn.direct",
565         FT_NONE, BASE_NONE, NULL, 0,
566         "logotypecertextn.LogotypeData", HFILL }},
567     { &hf_logotypecertextn_indirect,
568       { "indirect", "logotypecertextn.indirect",
569         FT_NONE, BASE_NONE, NULL, 0,
570         "logotypecertextn.LogotypeReference", HFILL }},
571     { &hf_logotypecertextn_image,
572       { "image", "logotypecertextn.image",
573         FT_UINT32, BASE_DEC, NULL, 0,
574         "logotypecertextn.SEQUENCE_OF_LogotypeImage", HFILL }},
575     { &hf_logotypecertextn_image_item,
576       { "LogotypeImage", "logotypecertextn.LogotypeImage",
577         FT_NONE, BASE_NONE, NULL, 0,
578         "logotypecertextn.LogotypeImage", HFILL }},
579     { &hf_logotypecertextn_audio,
580       { "audio", "logotypecertextn.audio",
581         FT_UINT32, BASE_DEC, NULL, 0,
582         "logotypecertextn.SEQUENCE_OF_LogotypeAudio", HFILL }},
583     { &hf_logotypecertextn_audio_item,
584       { "LogotypeAudio", "logotypecertextn.LogotypeAudio",
585         FT_NONE, BASE_NONE, NULL, 0,
586         "logotypecertextn.LogotypeAudio", HFILL }},
587     { &hf_logotypecertextn_imageDetails,
588       { "imageDetails", "logotypecertextn.imageDetails",
589         FT_NONE, BASE_NONE, NULL, 0,
590         "logotypecertextn.LogotypeDetails", HFILL }},
591     { &hf_logotypecertextn_imageInfo,
592       { "imageInfo", "logotypecertextn.imageInfo",
593         FT_NONE, BASE_NONE, NULL, 0,
594         "logotypecertextn.LogotypeImageInfo", HFILL }},
595     { &hf_logotypecertextn_audioDetails,
596       { "audioDetails", "logotypecertextn.audioDetails",
597         FT_NONE, BASE_NONE, NULL, 0,
598         "logotypecertextn.LogotypeDetails", HFILL }},
599     { &hf_logotypecertextn_audioInfo,
600       { "audioInfo", "logotypecertextn.audioInfo",
601         FT_NONE, BASE_NONE, NULL, 0,
602         "logotypecertextn.LogotypeAudioInfo", HFILL }},
603     { &hf_logotypecertextn_mediaType,
604       { "mediaType", "logotypecertextn.mediaType",
605         FT_STRING, BASE_NONE, NULL, 0,
606         "logotypecertextn.IA5String", HFILL }},
607     { &hf_logotypecertextn_logotypeHash,
608       { "logotypeHash", "logotypecertextn.logotypeHash",
609         FT_UINT32, BASE_DEC, NULL, 0,
610         "logotypecertextn.SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue", HFILL }},
611     { &hf_logotypecertextn_logotypeHash_item,
612       { "HashAlgAndValue", "logotypecertextn.HashAlgAndValue",
613         FT_NONE, BASE_NONE, NULL, 0,
614         "logotypecertextn.HashAlgAndValue", HFILL }},
615     { &hf_logotypecertextn_logotypeURI,
616       { "logotypeURI", "logotypecertextn.logotypeURI",
617         FT_UINT32, BASE_DEC, NULL, 0,
618         "logotypecertextn.T_logotypeURI", HFILL }},
619     { &hf_logotypecertextn_logotypeURI_item,
620       { "logotypeURI item", "logotypecertextn.logotypeURI_item",
621         FT_STRING, BASE_NONE, NULL, 0,
622         "logotypecertextn.T_logotypeURI_item", HFILL }},
623     { &hf_logotypecertextn_type,
624       { "type", "logotypecertextn.type",
625         FT_INT32, BASE_DEC, VALS(logotypecertextn_LogotypeImageType_vals), 0,
626         "logotypecertextn.LogotypeImageType", HFILL }},
627     { &hf_logotypecertextn_fileSize,
628       { "fileSize", "logotypecertextn.fileSize",
629         FT_INT32, BASE_DEC, NULL, 0,
630         "logotypecertextn.INTEGER", HFILL }},
631     { &hf_logotypecertextn_xSize,
632       { "xSize", "logotypecertextn.xSize",
633         FT_INT32, BASE_DEC, NULL, 0,
634         "logotypecertextn.INTEGER", HFILL }},
635     { &hf_logotypecertextn_ySize,
636       { "ySize", "logotypecertextn.ySize",
637         FT_INT32, BASE_DEC, NULL, 0,
638         "logotypecertextn.INTEGER", HFILL }},
639     { &hf_logotypecertextn_resolution,
640       { "resolution", "logotypecertextn.resolution",
641         FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeImageResolution_vals), 0,
642         "logotypecertextn.LogotypeImageResolution", HFILL }},
643     { &hf_logotypecertextn_language,
644       { "language", "logotypecertextn.language",
645         FT_STRING, BASE_NONE, NULL, 0,
646         "logotypecertextn.IA5String", HFILL }},
647     { &hf_logotypecertextn_numBits,
648       { "numBits", "logotypecertextn.numBits",
649         FT_INT32, BASE_DEC, NULL, 0,
650         "logotypecertextn.INTEGER", HFILL }},
651     { &hf_logotypecertextn_tableSize,
652       { "tableSize", "logotypecertextn.tableSize",
653         FT_INT32, BASE_DEC, NULL, 0,
654         "logotypecertextn.INTEGER", HFILL }},
655     { &hf_logotypecertextn_playTime,
656       { "playTime", "logotypecertextn.playTime",
657         FT_INT32, BASE_DEC, NULL, 0,
658         "logotypecertextn.INTEGER", HFILL }},
659     { &hf_logotypecertextn_channels,
660       { "channels", "logotypecertextn.channels",
661         FT_INT32, BASE_DEC, NULL, 0,
662         "logotypecertextn.INTEGER", HFILL }},
663     { &hf_logotypecertextn_sampleRate,
664       { "sampleRate", "logotypecertextn.sampleRate",
665         FT_INT32, BASE_DEC, NULL, 0,
666         "logotypecertextn.INTEGER", HFILL }},
667     { &hf_logotypecertextn_logotypeType,
668       { "logotypeType", "logotypecertextn.logotypeType",
669         FT_OID, BASE_NONE, NULL, 0,
670         "logotypecertextn.OBJECT_IDENTIFIER", HFILL }},
671     { &hf_logotypecertextn_info,
672       { "info", "logotypecertextn.info",
673         FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
674         "logotypecertextn.LogotypeInfo", HFILL }},
675     { &hf_logotypecertextn_refStructHash,
676       { "refStructHash", "logotypecertextn.refStructHash",
677         FT_UINT32, BASE_DEC, NULL, 0,
678         "logotypecertextn.SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue", HFILL }},
679     { &hf_logotypecertextn_refStructHash_item,
680       { "HashAlgAndValue", "logotypecertextn.HashAlgAndValue",
681         FT_NONE, BASE_NONE, NULL, 0,
682         "logotypecertextn.HashAlgAndValue", HFILL }},
683     { &hf_logotypecertextn_refStructURI,
684       { "refStructURI", "logotypecertextn.refStructURI",
685         FT_UINT32, BASE_DEC, NULL, 0,
686         "logotypecertextn.T_refStructURI", HFILL }},
687     { &hf_logotypecertextn_refStructURI_item,
688       { "refStructURI item", "logotypecertextn.refStructURI_item",
689         FT_STRING, BASE_NONE, NULL, 0,
690         "logotypecertextn.T_refStructURI_item", HFILL }},
691     { &hf_logotypecertextn_hashAlg,
692       { "hashAlg", "logotypecertextn.hashAlg",
693         FT_NONE, BASE_NONE, NULL, 0,
694         "x509af.AlgorithmIdentifier", HFILL }},
695     { &hf_logotypecertextn_hashValue,
696       { "hashValue", "logotypecertextn.hashValue",
697         FT_BYTES, BASE_HEX, NULL, 0,
698         "logotypecertextn.OCTET_STRING", HFILL }},
699
700 /*--- End of included file: packet-logotypecertextn-hfarr.c ---*/
701 #line 61 "packet-logotypecertextn-template.c"
702   };
703
704   /* List of subtrees */
705   static gint *ett[] = {
706
707 /*--- Included file: packet-logotypecertextn-ettarr.c ---*/
708 #line 1 "packet-logotypecertextn-ettarr.c"
709     &ett_logotypecertextn_LogotypeExtn,
710     &ett_logotypecertextn_SEQUENCE_OF_LogotypeInfo,
711     &ett_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo,
712     &ett_logotypecertextn_LogotypeInfo,
713     &ett_logotypecertextn_LogotypeData,
714     &ett_logotypecertextn_SEQUENCE_OF_LogotypeImage,
715     &ett_logotypecertextn_SEQUENCE_OF_LogotypeAudio,
716     &ett_logotypecertextn_LogotypeImage,
717     &ett_logotypecertextn_LogotypeAudio,
718     &ett_logotypecertextn_LogotypeDetails,
719     &ett_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue,
720     &ett_logotypecertextn_T_logotypeURI,
721     &ett_logotypecertextn_LogotypeImageInfo,
722     &ett_logotypecertextn_LogotypeImageResolution,
723     &ett_logotypecertextn_LogotypeAudioInfo,
724     &ett_logotypecertextn_OtherLogotypeInfo,
725     &ett_logotypecertextn_LogotypeReference,
726     &ett_logotypecertextn_T_refStructURI,
727     &ett_logotypecertextn_HashAlgAndValue,
728
729 /*--- End of included file: packet-logotypecertextn-ettarr.c ---*/
730 #line 66 "packet-logotypecertextn-template.c"
731   };
732
733   /* Register protocol */
734   proto_logotypecertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
735
736   /* Register fields and subtrees */
737   proto_register_field_array(proto_logotypecertextn, hf, array_length(hf));
738   proto_register_subtree_array(ett, array_length(ett));
739
740 }
741
742
743 /*--- proto_reg_handoff_logotypecertextn -------------------------------------------*/
744 void proto_reg_handoff_logotypecertextn(void) {
745
746 /*--- Included file: packet-logotypecertextn-dis-tab.c ---*/
747 #line 1 "packet-logotypecertextn-dis-tab.c"
748   register_ber_oid_dissector("1.3.6.1.5.5.7.1.12", dissect_LogotypeExtn_PDU, proto_logotypecertextn, "id-pe-logotype");
749   register_ber_oid_dissector("1.3.6.1.5.5.7.20.1", dissect_LogotypeExtn_PDU, proto_logotypecertextn, "id-pe-logo-loyalty");
750   register_ber_oid_dissector("1.3.6.1.5.5.7.20.2", dissect_LogotypeExtn_PDU, proto_logotypecertextn, "id-pe-logo-background");
751
752
753 /*--- End of included file: packet-logotypecertextn-dis-tab.c ---*/
754 #line 81 "packet-logotypecertextn-template.c"
755 }
756