epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-logotypecertextn.c
blob0fa4c243e010693483dbf7119a8bc899b3ba1191
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-logotypecertextn.c */
4 /* asn2wrs.py -b -q -L -p logotypecertextn -c ./logotypecertextn.cnf -s ./packet-logotypecertextn-template -D . -O ../.. LogotypeCertExtn.asn */
6 /* packet-logotypecertextn.c
7 * Routines for RFC3709 Logotype Certificate Extensions packet dissection
8 * Ronnie Sahlberg 2004
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include "config.h"
19 #include <epan/packet.h>
20 #include <wsutil/array.h>
22 #include "packet-ber.h"
23 #include "packet-logotypecertextn.h"
24 #include "packet-x509af.h"
26 #define PNAME "Logotype Certificate Extensions"
27 #define PSNAME "LogotypeCertExtn"
28 #define PFNAME "logotypecertextn"
30 void proto_register_logotypecertextn(void);
31 void proto_reg_handoff_logotypecertextn(void);
33 /* Initialize the protocol and registered fields */
34 static int proto_logotypecertextn;
35 static int hf_logotypecertextn_LogotypeExtn_PDU; /* LogotypeExtn */
36 static int hf_logotypecertextn_communityLogos; /* SEQUENCE_OF_LogotypeInfo */
37 static int hf_logotypecertextn_communityLogos_item; /* LogotypeInfo */
38 static int hf_logotypecertextn_issuerLogo; /* LogotypeInfo */
39 static int hf_logotypecertextn_subjectLogo; /* LogotypeInfo */
40 static int hf_logotypecertextn_otherLogos; /* SEQUENCE_OF_OtherLogotypeInfo */
41 static int hf_logotypecertextn_otherLogos_item; /* OtherLogotypeInfo */
42 static int hf_logotypecertextn_direct; /* LogotypeData */
43 static int hf_logotypecertextn_indirect; /* LogotypeReference */
44 static int hf_logotypecertextn_image; /* SEQUENCE_OF_LogotypeImage */
45 static int hf_logotypecertextn_image_item; /* LogotypeImage */
46 static int hf_logotypecertextn_audio; /* SEQUENCE_OF_LogotypeAudio */
47 static int hf_logotypecertextn_audio_item; /* LogotypeAudio */
48 static int hf_logotypecertextn_imageDetails; /* LogotypeDetails */
49 static int hf_logotypecertextn_imageInfo; /* LogotypeImageInfo */
50 static int hf_logotypecertextn_audioDetails; /* LogotypeDetails */
51 static int hf_logotypecertextn_audioInfo; /* LogotypeAudioInfo */
52 static int hf_logotypecertextn_mediaType; /* IA5String */
53 static int hf_logotypecertextn_logotypeHash; /* SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue */
54 static int hf_logotypecertextn_logotypeHash_item; /* HashAlgAndValue */
55 static int hf_logotypecertextn_logotypeURI; /* T_logotypeURI */
56 static int hf_logotypecertextn_logotypeURI_item; /* T_logotypeURI_item */
57 static int hf_logotypecertextn_type; /* LogotypeImageType */
58 static int hf_logotypecertextn_fileSize; /* INTEGER */
59 static int hf_logotypecertextn_xSize; /* INTEGER */
60 static int hf_logotypecertextn_ySize; /* INTEGER */
61 static int hf_logotypecertextn_resolution; /* LogotypeImageResolution */
62 static int hf_logotypecertextn_language; /* IA5String */
63 static int hf_logotypecertextn_numBits; /* INTEGER */
64 static int hf_logotypecertextn_tableSize; /* INTEGER */
65 static int hf_logotypecertextn_playTime; /* INTEGER */
66 static int hf_logotypecertextn_channels; /* INTEGER */
67 static int hf_logotypecertextn_sampleRate; /* INTEGER */
68 static int hf_logotypecertextn_logotypeType; /* OBJECT_IDENTIFIER */
69 static int hf_logotypecertextn_info; /* LogotypeInfo */
70 static int hf_logotypecertextn_refStructHash; /* SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue */
71 static int hf_logotypecertextn_refStructHash_item; /* HashAlgAndValue */
72 static int hf_logotypecertextn_refStructURI; /* T_refStructURI */
73 static int hf_logotypecertextn_refStructURI_item; /* T_refStructURI_item */
74 static int hf_logotypecertextn_hashAlg; /* AlgorithmIdentifier */
75 static int hf_logotypecertextn_hashValue; /* OCTET_STRING */
77 /* Initialize the subtree pointers */
78 static int ett_logotypecertextn_LogotypeExtn;
79 static int ett_logotypecertextn_SEQUENCE_OF_LogotypeInfo;
80 static int ett_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo;
81 static int ett_logotypecertextn_LogotypeInfo;
82 static int ett_logotypecertextn_LogotypeData;
83 static int ett_logotypecertextn_SEQUENCE_OF_LogotypeImage;
84 static int ett_logotypecertextn_SEQUENCE_OF_LogotypeAudio;
85 static int ett_logotypecertextn_LogotypeImage;
86 static int ett_logotypecertextn_LogotypeAudio;
87 static int ett_logotypecertextn_LogotypeDetails;
88 static int ett_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue;
89 static int ett_logotypecertextn_T_logotypeURI;
90 static int ett_logotypecertextn_LogotypeImageInfo;
91 static int ett_logotypecertextn_LogotypeImageResolution;
92 static int ett_logotypecertextn_LogotypeAudioInfo;
93 static int ett_logotypecertextn_OtherLogotypeInfo;
94 static int ett_logotypecertextn_LogotypeReference;
95 static int ett_logotypecertextn_T_refStructURI;
96 static int ett_logotypecertextn_HashAlgAndValue;
101 static int
102 dissect_logotypecertextn_IA5String(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
103 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
104 actx, tree, tvb, offset, hf_index,
105 NULL);
107 return offset;
112 static int
113 dissect_logotypecertextn_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
114 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
115 NULL);
117 return offset;
121 static const ber_sequence_t HashAlgAndValue_sequence[] = {
122 { &hf_logotypecertextn_hashAlg, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
123 { &hf_logotypecertextn_hashValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_OCTET_STRING },
124 { NULL, 0, 0, 0, NULL }
127 static int
128 dissect_logotypecertextn_HashAlgAndValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
129 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
130 HashAlgAndValue_sequence, hf_index, ett_logotypecertextn_HashAlgAndValue);
132 return offset;
136 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue_sequence_of[1] = {
137 { &hf_logotypecertextn_logotypeHash_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_HashAlgAndValue },
140 static int
141 dissect_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
142 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
143 SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue);
145 return offset;
150 static int
151 dissect_logotypecertextn_T_logotypeURI_item(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
152 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
153 actx, tree, tvb, offset, hf_index,
154 NULL);
156 proto_item_set_url(actx->created_item);
158 return offset;
162 static const ber_sequence_t T_logotypeURI_sequence_of[1] = {
163 { &hf_logotypecertextn_logotypeURI_item, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_logotypeURI_item },
166 static int
167 dissect_logotypecertextn_T_logotypeURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
168 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
169 T_logotypeURI_sequence_of, hf_index, ett_logotypecertextn_T_logotypeURI);
171 return offset;
175 static const ber_sequence_t LogotypeDetails_sequence[] = {
176 { &hf_logotypecertextn_mediaType, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_IA5String },
177 { &hf_logotypecertextn_logotypeHash, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue },
178 { &hf_logotypecertextn_logotypeURI, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_logotypeURI },
179 { NULL, 0, 0, 0, NULL }
182 static int
183 dissect_logotypecertextn_LogotypeDetails(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
184 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
185 LogotypeDetails_sequence, hf_index, ett_logotypecertextn_LogotypeDetails);
187 return offset;
191 static const value_string logotypecertextn_LogotypeImageType_vals[] = {
192 { 0, "grayScale" },
193 { 1, "color" },
194 { 0, NULL }
198 static int
199 dissect_logotypecertextn_LogotypeImageType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
200 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
201 NULL);
203 return offset;
208 static int
209 dissect_logotypecertextn_INTEGER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
210 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
211 NULL);
213 return offset;
217 static const value_string logotypecertextn_LogotypeImageResolution_vals[] = {
218 { 1, "numBits" },
219 { 2, "tableSize" },
220 { 0, NULL }
223 static const ber_choice_t LogotypeImageResolution_choice[] = {
224 { 1, &hf_logotypecertextn_numBits, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_INTEGER },
225 { 2, &hf_logotypecertextn_tableSize, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_INTEGER },
226 { 0, NULL, 0, 0, 0, NULL }
229 static int
230 dissect_logotypecertextn_LogotypeImageResolution(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
231 offset = dissect_ber_choice(actx, tree, tvb, offset,
232 LogotypeImageResolution_choice, hf_index, ett_logotypecertextn_LogotypeImageResolution,
233 NULL);
235 return offset;
239 static const ber_sequence_t LogotypeImageInfo_sequence[] = {
240 { &hf_logotypecertextn_type, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_LogotypeImageType },
241 { &hf_logotypecertextn_fileSize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
242 { &hf_logotypecertextn_xSize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
243 { &hf_logotypecertextn_ySize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
244 { &hf_logotypecertextn_resolution, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeImageResolution },
245 { &hf_logotypecertextn_language, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_IA5String },
246 { NULL, 0, 0, 0, NULL }
249 static int
250 dissect_logotypecertextn_LogotypeImageInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
251 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
252 LogotypeImageInfo_sequence, hf_index, ett_logotypecertextn_LogotypeImageInfo);
254 return offset;
258 static const ber_sequence_t LogotypeImage_sequence[] = {
259 { &hf_logotypecertextn_imageDetails, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeDetails },
260 { &hf_logotypecertextn_imageInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeImageInfo },
261 { NULL, 0, 0, 0, NULL }
264 static int
265 dissect_logotypecertextn_LogotypeImage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
266 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
267 LogotypeImage_sequence, hf_index, ett_logotypecertextn_LogotypeImage);
269 return offset;
273 static const ber_sequence_t SEQUENCE_OF_LogotypeImage_sequence_of[1] = {
274 { &hf_logotypecertextn_image_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeImage },
277 static int
278 dissect_logotypecertextn_SEQUENCE_OF_LogotypeImage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
279 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
280 SEQUENCE_OF_LogotypeImage_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_LogotypeImage);
282 return offset;
286 static const ber_sequence_t LogotypeAudioInfo_sequence[] = {
287 { &hf_logotypecertextn_fileSize, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
288 { &hf_logotypecertextn_playTime, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
289 { &hf_logotypecertextn_channels, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_INTEGER },
290 { &hf_logotypecertextn_sampleRate, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_INTEGER },
291 { &hf_logotypecertextn_language, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_IA5String },
292 { NULL, 0, 0, 0, NULL }
295 static int
296 dissect_logotypecertextn_LogotypeAudioInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
297 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
298 LogotypeAudioInfo_sequence, hf_index, ett_logotypecertextn_LogotypeAudioInfo);
300 return offset;
304 static const ber_sequence_t LogotypeAudio_sequence[] = {
305 { &hf_logotypecertextn_audioDetails, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeDetails },
306 { &hf_logotypecertextn_audioInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeAudioInfo },
307 { NULL, 0, 0, 0, NULL }
310 static int
311 dissect_logotypecertextn_LogotypeAudio(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
312 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
313 LogotypeAudio_sequence, hf_index, ett_logotypecertextn_LogotypeAudio);
315 return offset;
319 static const ber_sequence_t SEQUENCE_OF_LogotypeAudio_sequence_of[1] = {
320 { &hf_logotypecertextn_audio_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_LogotypeAudio },
323 static int
324 dissect_logotypecertextn_SEQUENCE_OF_LogotypeAudio(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
325 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
326 SEQUENCE_OF_LogotypeAudio_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_LogotypeAudio);
328 return offset;
332 static const ber_sequence_t LogotypeData_sequence[] = {
333 { &hf_logotypecertextn_image, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_SEQUENCE_OF_LogotypeImage },
334 { &hf_logotypecertextn_audio, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_logotypecertextn_SEQUENCE_OF_LogotypeAudio },
335 { NULL, 0, 0, 0, NULL }
338 static int
339 dissect_logotypecertextn_LogotypeData(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
340 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
341 LogotypeData_sequence, hf_index, ett_logotypecertextn_LogotypeData);
343 return offset;
348 static int
349 dissect_logotypecertextn_T_refStructURI_item(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
350 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
351 actx, tree, tvb, offset, hf_index,
352 NULL);
354 proto_item_set_url(actx->created_item);
356 return offset;
360 static const ber_sequence_t T_refStructURI_sequence_of[1] = {
361 { &hf_logotypecertextn_refStructURI_item, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_refStructURI_item },
364 static int
365 dissect_logotypecertextn_T_refStructURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
366 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
367 T_refStructURI_sequence_of, hf_index, ett_logotypecertextn_T_refStructURI);
369 return offset;
373 static const ber_sequence_t LogotypeReference_sequence[] = {
374 { &hf_logotypecertextn_refStructHash, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue },
375 { &hf_logotypecertextn_refStructURI, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_T_refStructURI },
376 { NULL, 0, 0, 0, NULL }
379 static int
380 dissect_logotypecertextn_LogotypeReference(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
381 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
382 LogotypeReference_sequence, hf_index, ett_logotypecertextn_LogotypeReference);
384 return offset;
388 static const value_string logotypecertextn_LogotypeInfo_vals[] = {
389 { 0, "direct" },
390 { 1, "indirect" },
391 { 0, NULL }
394 static const ber_choice_t LogotypeInfo_choice[] = {
395 { 0, &hf_logotypecertextn_direct, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_LogotypeData },
396 { 1, &hf_logotypecertextn_indirect, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_logotypecertextn_LogotypeReference },
397 { 0, NULL, 0, 0, 0, NULL }
400 static int
401 dissect_logotypecertextn_LogotypeInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
402 offset = dissect_ber_choice(actx, tree, tvb, offset,
403 LogotypeInfo_choice, hf_index, ett_logotypecertextn_LogotypeInfo,
404 NULL);
406 return offset;
410 static const ber_sequence_t SEQUENCE_OF_LogotypeInfo_sequence_of[1] = {
411 { &hf_logotypecertextn_communityLogos_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
414 static int
415 dissect_logotypecertextn_SEQUENCE_OF_LogotypeInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
416 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
417 SEQUENCE_OF_LogotypeInfo_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_LogotypeInfo);
419 return offset;
424 static int
425 dissect_logotypecertextn_OBJECT_IDENTIFIER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
426 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
428 return offset;
432 static const ber_sequence_t OtherLogotypeInfo_sequence[] = {
433 { &hf_logotypecertextn_logotypeType, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_OBJECT_IDENTIFIER },
434 { &hf_logotypecertextn_info, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
435 { NULL, 0, 0, 0, NULL }
438 static int
439 dissect_logotypecertextn_OtherLogotypeInfo(bool 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_sequence(implicit_tag, actx, tree, tvb, offset,
441 OtherLogotypeInfo_sequence, hf_index, ett_logotypecertextn_OtherLogotypeInfo);
443 return offset;
447 static const ber_sequence_t SEQUENCE_OF_OtherLogotypeInfo_sequence_of[1] = {
448 { &hf_logotypecertextn_otherLogos_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_logotypecertextn_OtherLogotypeInfo },
451 static int
452 dissect_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
453 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
454 SEQUENCE_OF_OtherLogotypeInfo_sequence_of, hf_index, ett_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo);
456 return offset;
460 static const ber_sequence_t LogotypeExtn_sequence[] = {
461 { &hf_logotypecertextn_communityLogos, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_logotypecertextn_SEQUENCE_OF_LogotypeInfo },
462 { &hf_logotypecertextn_issuerLogo, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
463 { &hf_logotypecertextn_subjectLogo, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_logotypecertextn_LogotypeInfo },
464 { &hf_logotypecertextn_otherLogos, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo },
465 { NULL, 0, 0, 0, NULL }
468 static int
469 dissect_logotypecertextn_LogotypeExtn(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
470 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
471 LogotypeExtn_sequence, hf_index, ett_logotypecertextn_LogotypeExtn);
473 return offset;
476 /*--- PDUs ---*/
478 static int dissect_LogotypeExtn_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
479 int offset = 0;
480 asn1_ctx_t asn1_ctx;
481 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
482 offset = dissect_logotypecertextn_LogotypeExtn(false, tvb, offset, &asn1_ctx, tree, hf_logotypecertextn_LogotypeExtn_PDU);
483 return offset;
488 /*--- proto_register_logotypecertextn ----------------------------------------------*/
489 void proto_register_logotypecertextn(void) {
491 /* List of fields */
492 static hf_register_info hf[] = {
493 { &hf_logotypecertextn_LogotypeExtn_PDU,
494 { "LogotypeExtn", "logotypecertextn.LogotypeExtn_element",
495 FT_NONE, BASE_NONE, NULL, 0,
496 NULL, HFILL }},
497 { &hf_logotypecertextn_communityLogos,
498 { "communityLogos", "logotypecertextn.communityLogos",
499 FT_UINT32, BASE_DEC, NULL, 0,
500 "SEQUENCE_OF_LogotypeInfo", HFILL }},
501 { &hf_logotypecertextn_communityLogos_item,
502 { "LogotypeInfo", "logotypecertextn.LogotypeInfo",
503 FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
504 NULL, HFILL }},
505 { &hf_logotypecertextn_issuerLogo,
506 { "issuerLogo", "logotypecertextn.issuerLogo",
507 FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
508 "LogotypeInfo", HFILL }},
509 { &hf_logotypecertextn_subjectLogo,
510 { "subjectLogo", "logotypecertextn.subjectLogo",
511 FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
512 "LogotypeInfo", HFILL }},
513 { &hf_logotypecertextn_otherLogos,
514 { "otherLogos", "logotypecertextn.otherLogos",
515 FT_UINT32, BASE_DEC, NULL, 0,
516 "SEQUENCE_OF_OtherLogotypeInfo", HFILL }},
517 { &hf_logotypecertextn_otherLogos_item,
518 { "OtherLogotypeInfo", "logotypecertextn.OtherLogotypeInfo_element",
519 FT_NONE, BASE_NONE, NULL, 0,
520 NULL, HFILL }},
521 { &hf_logotypecertextn_direct,
522 { "direct", "logotypecertextn.direct_element",
523 FT_NONE, BASE_NONE, NULL, 0,
524 "LogotypeData", HFILL }},
525 { &hf_logotypecertextn_indirect,
526 { "indirect", "logotypecertextn.indirect_element",
527 FT_NONE, BASE_NONE, NULL, 0,
528 "LogotypeReference", HFILL }},
529 { &hf_logotypecertextn_image,
530 { "image", "logotypecertextn.image",
531 FT_UINT32, BASE_DEC, NULL, 0,
532 "SEQUENCE_OF_LogotypeImage", HFILL }},
533 { &hf_logotypecertextn_image_item,
534 { "LogotypeImage", "logotypecertextn.LogotypeImage_element",
535 FT_NONE, BASE_NONE, NULL, 0,
536 NULL, HFILL }},
537 { &hf_logotypecertextn_audio,
538 { "audio", "logotypecertextn.audio",
539 FT_UINT32, BASE_DEC, NULL, 0,
540 "SEQUENCE_OF_LogotypeAudio", HFILL }},
541 { &hf_logotypecertextn_audio_item,
542 { "LogotypeAudio", "logotypecertextn.LogotypeAudio_element",
543 FT_NONE, BASE_NONE, NULL, 0,
544 NULL, HFILL }},
545 { &hf_logotypecertextn_imageDetails,
546 { "imageDetails", "logotypecertextn.imageDetails_element",
547 FT_NONE, BASE_NONE, NULL, 0,
548 "LogotypeDetails", HFILL }},
549 { &hf_logotypecertextn_imageInfo,
550 { "imageInfo", "logotypecertextn.imageInfo_element",
551 FT_NONE, BASE_NONE, NULL, 0,
552 "LogotypeImageInfo", HFILL }},
553 { &hf_logotypecertextn_audioDetails,
554 { "audioDetails", "logotypecertextn.audioDetails_element",
555 FT_NONE, BASE_NONE, NULL, 0,
556 "LogotypeDetails", HFILL }},
557 { &hf_logotypecertextn_audioInfo,
558 { "audioInfo", "logotypecertextn.audioInfo_element",
559 FT_NONE, BASE_NONE, NULL, 0,
560 "LogotypeAudioInfo", HFILL }},
561 { &hf_logotypecertextn_mediaType,
562 { "mediaType", "logotypecertextn.mediaType",
563 FT_STRING, BASE_NONE, NULL, 0,
564 "IA5String", HFILL }},
565 { &hf_logotypecertextn_logotypeHash,
566 { "logotypeHash", "logotypecertextn.logotypeHash",
567 FT_UINT32, BASE_DEC, NULL, 0,
568 "SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue", HFILL }},
569 { &hf_logotypecertextn_logotypeHash_item,
570 { "HashAlgAndValue", "logotypecertextn.HashAlgAndValue_element",
571 FT_NONE, BASE_NONE, NULL, 0,
572 NULL, HFILL }},
573 { &hf_logotypecertextn_logotypeURI,
574 { "logotypeURI", "logotypecertextn.logotypeURI",
575 FT_UINT32, BASE_DEC, NULL, 0,
576 NULL, HFILL }},
577 { &hf_logotypecertextn_logotypeURI_item,
578 { "logotypeURI item", "logotypecertextn.logotypeURI_item",
579 FT_STRING, BASE_NONE, NULL, 0,
580 NULL, HFILL }},
581 { &hf_logotypecertextn_type,
582 { "type", "logotypecertextn.type",
583 FT_INT32, BASE_DEC, VALS(logotypecertextn_LogotypeImageType_vals), 0,
584 "LogotypeImageType", HFILL }},
585 { &hf_logotypecertextn_fileSize,
586 { "fileSize", "logotypecertextn.fileSize",
587 FT_INT32, BASE_DEC, NULL, 0,
588 "INTEGER", HFILL }},
589 { &hf_logotypecertextn_xSize,
590 { "xSize", "logotypecertextn.xSize",
591 FT_INT32, BASE_DEC, NULL, 0,
592 "INTEGER", HFILL }},
593 { &hf_logotypecertextn_ySize,
594 { "ySize", "logotypecertextn.ySize",
595 FT_INT32, BASE_DEC, NULL, 0,
596 "INTEGER", HFILL }},
597 { &hf_logotypecertextn_resolution,
598 { "resolution", "logotypecertextn.resolution",
599 FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeImageResolution_vals), 0,
600 "LogotypeImageResolution", HFILL }},
601 { &hf_logotypecertextn_language,
602 { "language", "logotypecertextn.language",
603 FT_STRING, BASE_NONE, NULL, 0,
604 "IA5String", HFILL }},
605 { &hf_logotypecertextn_numBits,
606 { "numBits", "logotypecertextn.numBits",
607 FT_INT32, BASE_DEC, NULL, 0,
608 "INTEGER", HFILL }},
609 { &hf_logotypecertextn_tableSize,
610 { "tableSize", "logotypecertextn.tableSize",
611 FT_INT32, BASE_DEC, NULL, 0,
612 "INTEGER", HFILL }},
613 { &hf_logotypecertextn_playTime,
614 { "playTime", "logotypecertextn.playTime",
615 FT_INT32, BASE_DEC, NULL, 0,
616 "INTEGER", HFILL }},
617 { &hf_logotypecertextn_channels,
618 { "channels", "logotypecertextn.channels",
619 FT_INT32, BASE_DEC, NULL, 0,
620 "INTEGER", HFILL }},
621 { &hf_logotypecertextn_sampleRate,
622 { "sampleRate", "logotypecertextn.sampleRate",
623 FT_INT32, BASE_DEC, NULL, 0,
624 "INTEGER", HFILL }},
625 { &hf_logotypecertextn_logotypeType,
626 { "logotypeType", "logotypecertextn.logotypeType",
627 FT_OID, BASE_NONE, NULL, 0,
628 "OBJECT_IDENTIFIER", HFILL }},
629 { &hf_logotypecertextn_info,
630 { "info", "logotypecertextn.info",
631 FT_UINT32, BASE_DEC, VALS(logotypecertextn_LogotypeInfo_vals), 0,
632 "LogotypeInfo", HFILL }},
633 { &hf_logotypecertextn_refStructHash,
634 { "refStructHash", "logotypecertextn.refStructHash",
635 FT_UINT32, BASE_DEC, NULL, 0,
636 "SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue", HFILL }},
637 { &hf_logotypecertextn_refStructHash_item,
638 { "HashAlgAndValue", "logotypecertextn.HashAlgAndValue_element",
639 FT_NONE, BASE_NONE, NULL, 0,
640 NULL, HFILL }},
641 { &hf_logotypecertextn_refStructURI,
642 { "refStructURI", "logotypecertextn.refStructURI",
643 FT_UINT32, BASE_DEC, NULL, 0,
644 NULL, HFILL }},
645 { &hf_logotypecertextn_refStructURI_item,
646 { "refStructURI item", "logotypecertextn.refStructURI_item",
647 FT_STRING, BASE_NONE, NULL, 0,
648 NULL, HFILL }},
649 { &hf_logotypecertextn_hashAlg,
650 { "hashAlg", "logotypecertextn.hashAlg_element",
651 FT_NONE, BASE_NONE, NULL, 0,
652 "AlgorithmIdentifier", HFILL }},
653 { &hf_logotypecertextn_hashValue,
654 { "hashValue", "logotypecertextn.hashValue",
655 FT_BYTES, BASE_NONE, NULL, 0,
656 "OCTET_STRING", HFILL }},
659 /* List of subtrees */
660 static int *ett[] = {
661 &ett_logotypecertextn_LogotypeExtn,
662 &ett_logotypecertextn_SEQUENCE_OF_LogotypeInfo,
663 &ett_logotypecertextn_SEQUENCE_OF_OtherLogotypeInfo,
664 &ett_logotypecertextn_LogotypeInfo,
665 &ett_logotypecertextn_LogotypeData,
666 &ett_logotypecertextn_SEQUENCE_OF_LogotypeImage,
667 &ett_logotypecertextn_SEQUENCE_OF_LogotypeAudio,
668 &ett_logotypecertextn_LogotypeImage,
669 &ett_logotypecertextn_LogotypeAudio,
670 &ett_logotypecertextn_LogotypeDetails,
671 &ett_logotypecertextn_SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue,
672 &ett_logotypecertextn_T_logotypeURI,
673 &ett_logotypecertextn_LogotypeImageInfo,
674 &ett_logotypecertextn_LogotypeImageResolution,
675 &ett_logotypecertextn_LogotypeAudioInfo,
676 &ett_logotypecertextn_OtherLogotypeInfo,
677 &ett_logotypecertextn_LogotypeReference,
678 &ett_logotypecertextn_T_refStructURI,
679 &ett_logotypecertextn_HashAlgAndValue,
682 /* Register protocol */
683 proto_logotypecertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
685 /* Register fields and subtrees */
686 proto_register_field_array(proto_logotypecertextn, hf, array_length(hf));
687 proto_register_subtree_array(ett, array_length(ett));
692 /*--- proto_reg_handoff_logotypecertextn -------------------------------------------*/
693 void proto_reg_handoff_logotypecertextn(void) {
694 register_ber_oid_dissector("1.3.6.1.5.5.7.1.12", dissect_LogotypeExtn_PDU, proto_logotypecertextn, "id-pe-logotype");
695 register_ber_oid_dissector("1.3.6.1.5.5.7.20.1", dissect_LogotypeExtn_PDU, proto_logotypecertextn, "id-pe-logo-loyalty");
696 register_ber_oid_dissector("1.3.6.1.5.5.7.20.2", dissect_LogotypeExtn_PDU, proto_logotypecertextn, "id-pe-logo-background");