make the implicit_tag parameter _U_ to get rid of some compiler warnings in those...
[obnox/wireshark/wip.git] / epan / dissectors / packet-x509sat.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
3 /* packet-x509sat.c                                                           */
4 /* ../../tools/asn2eth.py -X -b -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
5
6 /* Input file: packet-x509sat-template.c */
7 /* Include files: packet-x509sat-hf.c, packet-x509sat-ett.c, packet-x509sat-fn.c, packet-x509sat-hfarr.c, packet-x509sat-ettarr.c, packet-x509sat-val.h */
8
9 /* packet-x509sat.c
10  * Routines for X.509 Selected Attribute Types packet dissection
11  *
12  * $Id: packet-x509sat-template.c,v 1.2 2004/05/25 21:07:43 guy Exp $
13  *
14  * Ethereal - Network traffic analyzer
15  * By Gerald Combs <gerald@ethereal.com>
16  * Copyright 1998 Gerald Combs
17  *
18  * This program is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU General Public License
20  * as published by the Free Software Foundation; either version 2
21  * of the License, or (at your option) any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26  * GNU General Public License for more details.
27  *
28  * You should have received a copy of the GNU General Public License
29  * along with this program; if not, write to the Free Software
30  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31  */
32
33 #ifdef HAVE_CONFIG_H
34 # include "config.h"
35 #endif
36
37 #include <glib.h>
38 #include <epan/packet.h>
39 #include <epan/conversation.h>
40
41 #include <stdio.h>
42 #include <string.h>
43
44 #include "packet-ber.h"
45 #include "packet-x509sat.h"
46 #include "packet-x509if.h"
47
48 #define PNAME  "X.509 Selected Attribute Types"
49 #define PSNAME "X509SAT"
50 #define PFNAME "x509sat"
51
52 /* Initialize the protocol and registered fields */
53 int proto_x509sat = -1;
54 int hf_x509sat_countryName = -1;
55 int hf_x509sat_organizationName = -1;
56 int hf_x509sat_knowledgeInformation = -1;
57 int hf_x509sat_name = -1;
58 int hf_x509sat_commonName = -1;
59 int hf_x509sat_surname = -1;
60 int hf_x509sat_givenName = -1;
61 int hf_x509sat_initials = -1;
62 int hf_x509sat_generationQualifier = -1;
63 int hf_x509sat_pseudonym = -1;
64 int hf_x509sat_localityName = -1;
65 int hf_x509sat_collectiveLocalityName = -1;
66 int hf_x509sat_stateOrProvinceName = -1;
67 int hf_x509sat_collectiveStateOrProvinceName = -1;
68 int hf_x509sat_streetAddress = -1;
69 int hf_x509sat_collectiveStreetAddress = -1;
70 int hf_x509sat_houseIdentifier = -1;
71 int hf_x509sat_collectiveOrganizationName = -1;
72 int hf_x509sat_organizationalUnitName = -1;
73 int hf_x509sat_collectiveOrganizationalUnitName = -1;
74 int hf_x509sat_title = -1;
75 int hf_x509sat_description = -1;
76 int hf_x509sat_businessCategory = -1;
77 int hf_x509sat_postalCode = -1;
78 int hf_x509sat_collectivePostalCode = -1;
79 int hf_x509sat_postOfficeBox = -1;
80 int hf_x509sat_collectivePostOfficeBox = -1;
81 int hf_x509sat_physicalDeliveryOfficeName = -1;
82 int hf_x509sat_collectivePhysicalDeliveryOfficeName = -1;
83 int hf_x509sat_dmdName = -1;
84 int hf_x509sat_id_at_telexNumber = -1;
85 int hf_x509sat_id_at_collectiveTelexNumber = -1;
86 int hf_x509sat_id_at_telephoneNumber = -1;
87 int hf_x509sat_id_at_collectiveTelephoneNumber = -1;
88 /*aaa*/
89
90 /*--- Included file: packet-x509sat-hf.c ---*/
91
92 /* Do not modify this file.                                                   */
93 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
94 /* packet-x509sat-hf.c                                                        */
95 /* ../../tools/asn2eth.py -X -b -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
96
97 static int hf_x509sat_equality = -1;              /* AttributeType */
98 static int hf_x509sat_substrings = -1;            /* AttributeType */
99 static int hf_x509sat_greaterOrEqual = -1;        /* AttributeType */
100 static int hf_x509sat_lessOrEqual = -1;           /* AttributeType */
101 static int hf_x509sat_approximateMatch = -1;      /* AttributeType */
102 static int hf_x509sat_telexNumber = -1;           /* PrintableString */
103 static int hf_x509sat_countryCode = -1;           /* PrintableString */
104 static int hf_x509sat_answerback = -1;            /* PrintableString */
105
106 /*--- End of included file: packet-x509sat-hf.c ---*/
107
108
109 /* Initialize the subtree pointers */
110 static gint ett_x509sat_DirectoryString = -1;
111
112 /*--- Included file: packet-x509sat-ett.c ---*/
113
114 /* Do not modify this file.                                                   */
115 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
116 /* packet-x509sat-ett.c                                                       */
117 /* ../../tools/asn2eth.py -X -b -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
118
119 static gint ett_x509sat_CriteriaItem = -1;
120 static gint ett_x509sat_TelexNumber = -1;
121
122 /*--- End of included file: packet-x509sat-ett.c ---*/
123
124
125
126 /*--- Included file: packet-x509sat-fn.c ---*/
127
128 /* Do not modify this file.                                                   */
129 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
130 /* packet-x509sat-fn.c                                                        */
131 /* ../../tools/asn2eth.py -X -b -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
132
133 static int dissect_equality(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
134   return dissect_x509if_AttributeType(FALSE, tvb, offset, pinfo, tree, hf_x509sat_equality);
135 }
136 static int dissect_substrings(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
137   return dissect_x509if_AttributeType(FALSE, tvb, offset, pinfo, tree, hf_x509sat_substrings);
138 }
139 static int dissect_greaterOrEqual(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
140   return dissect_x509if_AttributeType(FALSE, tvb, offset, pinfo, tree, hf_x509sat_greaterOrEqual);
141 }
142 static int dissect_lessOrEqual(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
143   return dissect_x509if_AttributeType(FALSE, tvb, offset, pinfo, tree, hf_x509sat_lessOrEqual);
144 }
145 static int dissect_approximateMatch(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
146   return dissect_x509if_AttributeType(FALSE, tvb, offset, pinfo, tree, hf_x509sat_approximateMatch);
147 }
148
149 int
150 dissect_x509sat_UniqueIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
151   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
152                                  NULL, hf_index, -1,
153                                  NULL);
154
155   return offset;
156 }
157
158
159 static int
160 dissect_x509sat_CountryName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
161   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
162                                          pinfo, tree, tvb, offset, hf_index,
163                                          NULL);
164
165   return offset;
166 }
167
168
169 static const value_string CriteriaItem_vals[] = {
170   {   0, "equality" },
171   {   1, "substrings" },
172   {   2, "greaterOrEqual" },
173   {   3, "lessOrEqual" },
174   {   4, "approximateMatch" },
175   { 0, NULL }
176 };
177
178 static ber_choice CriteriaItem_choice[] = {
179   {   0, BER_CLASS_CON, 0, 0, dissect_equality },
180   {   1, BER_CLASS_CON, 1, 0, dissect_substrings },
181   {   2, BER_CLASS_CON, 2, 0, dissect_greaterOrEqual },
182   {   3, BER_CLASS_CON, 3, 0, dissect_lessOrEqual },
183   {   4, BER_CLASS_CON, 4, 0, dissect_approximateMatch },
184   { 0, 0, 0, 0, NULL }
185 };
186
187 static int
188 dissect_x509sat_CriteriaItem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
189   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
190                               CriteriaItem_choice, hf_index, ett_x509sat_CriteriaItem);
191
192   return offset;
193 }
194
195
196 static int
197 dissect_x509sat_TelephoneNumber(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
198   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
199                                          pinfo, tree, tvb, offset, hf_index,
200                                          NULL);
201
202   return offset;
203 }
204
205
206 static int
207 dissect_x509sat_PrintableString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
208   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
209                                          pinfo, tree, tvb, offset, hf_index,
210                                          NULL);
211
212   return offset;
213 }
214 static int dissect_telexNumber(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
215   return dissect_x509sat_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x509sat_telexNumber);
216 }
217 static int dissect_countryCode(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
218   return dissect_x509sat_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x509sat_countryCode);
219 }
220 static int dissect_answerback(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
221   return dissect_x509sat_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x509sat_answerback);
222 }
223
224 static ber_sequence TelexNumber_sequence[] = {
225   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_telexNumber },
226   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_countryCode },
227   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_answerback },
228   { 0, 0, 0, NULL }
229 };
230
231 static int
232 dissect_x509sat_TelexNumber(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
233   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
234                                 TelexNumber_sequence, hf_index, ett_x509sat_TelexNumber);
235
236   return offset;
237 }
238
239
240 /*--- End of included file: packet-x509sat-fn.c ---*/
241
242
243
244
245
246 static int DirectoryString_hf_index;
247
248 static int
249 dissect_printableString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
250   return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_PrintableString, 
251               pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
252 }
253 static int
254 dissect_universalString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
255   return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_UniversalString,
256               pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
257 }
258 static int
259 dissect_bmpString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
260   return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_BMPString,
261               pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
262 }
263 static int
264 dissect_uTF8String(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
265   return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_UTF8String,
266               pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
267 }
268
269 static const value_string DirectoryString_vals[] = {
270   {   0, "printableString" },
271   {   1, "universalString" },
272   {   2, "bmpString" },
273   {   3, "uTF8String" },
274   { 0, NULL }
275 };
276
277 static ber_choice DirectoryString_choice[] = {
278 /*XXX needs to add TeletexString */
279   {   0, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printableString },
280   {   1, BER_CLASS_UNI, BER_UNI_TAG_UniversalString, BER_FLAGS_NOOWNTAG, dissect_universalString },
281   {   2, BER_CLASS_UNI, BER_UNI_TAG_BMPString, BER_FLAGS_NOOWNTAG, dissect_bmpString },
282   {   3, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_uTF8String },
283   { 0, 0, 0, 0, NULL }
284 };
285
286 static int
287 dissect_x509sat_DirectoryString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
288   DirectoryString_hf_index = hf_index;
289   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
290                               DirectoryString_choice, -1, ett_x509sat_DirectoryString);
291
292   return offset;
293 }
294
295
296
297
298 static void
299 dissect_x509sat_countryName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
300 {
301         dissect_x509sat_CountryName(FALSE, tvb, 0, pinfo, tree, hf_x509sat_countryName);
302 }
303
304 static void
305 dissect_x509sat_organizationName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
306 {
307         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_organizationName);
308 }
309
310 static void
311 dissect_x509sat_knowledgeInformation_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
312 {
313         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_knowledgeInformation);
314 }
315
316 static void
317 dissect_x509sat_name_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
318 {
319         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_name);
320 }
321
322 static void
323 dissect_x509sat_commonName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
324 {
325         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_commonName);
326 }
327
328 static void
329 dissect_x509sat_surname_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
330 {
331         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_surname);
332 }
333
334 static void
335 dissect_x509sat_givenName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
336 {
337         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_givenName);
338 }
339
340 static void
341 dissect_x509sat_initials_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
342 {
343         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_initials);
344 }
345
346 static void
347 dissect_x509sat_generationQualifier_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
348 {
349         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_generationQualifier);
350 }
351
352 static void
353 dissect_x509sat_pseudonym_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
354 {
355         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_pseudonym);
356 }
357
358 static void
359 dissect_x509sat_localityName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
360 {
361         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_localityName);
362 }
363
364 static void
365 dissect_x509sat_collectiveLocalityName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
366 {
367         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectiveLocalityName);
368 }
369
370 static void
371 dissect_x509sat_stateOrProvinceName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
372 {
373         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_stateOrProvinceName);
374 }
375
376 static void
377 dissect_x509sat_collectiveStateOrProvinceName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
378 {
379         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectiveStateOrProvinceName);
380 }
381
382 static void
383 dissect_x509sat_streetAddress_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
384 {
385         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_streetAddress);
386 }
387
388 static void
389 dissect_x509sat_collectiveStreetAddress_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
390 {
391         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectiveStreetAddress);
392 }
393
394 static void
395 dissect_x509sat_houseIdentifier_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
396 {
397         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_houseIdentifier);
398 }
399
400 static void
401 dissect_x509sat_collectiveOrganizationName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
402 {
403         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectiveOrganizationName);
404 }
405
406 static void
407 dissect_x509sat_organizationalUnitName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
408 {
409         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_organizationalUnitName);
410 }
411
412 static void
413 dissect_x509sat_collectiveOrganizationalUnitName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
414 {
415         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectiveOrganizationalUnitName);
416 }
417
418 static void
419 dissect_x509sat_title_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
420 {
421         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_title);
422 }
423
424 static void
425 dissect_x509sat_description_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
426 {
427         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_description);
428 }
429
430 static void
431 dissect_x509sat_businessCategory_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
432 {
433         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_businessCategory);
434 }
435
436 static void
437 dissect_x509sat_postalCode_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
438 {
439         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_postalCode);
440 }
441
442 static void
443 dissect_x509sat_collectivePostalCode_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
444 {
445         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectivePostalCode);
446 }
447
448 static void
449 dissect_x509sat_postOfficeBox_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
450 {
451         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_postOfficeBox);
452 }
453
454 static void
455 dissect_x509sat_collectivePostOfficeBox_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
456 {
457         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectivePostOfficeBox);
458 }
459
460 static void
461 dissect_x509sat_physicalDeliveryOfficeName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
462 {
463         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_physicalDeliveryOfficeName);
464 }
465
466 static void
467 dissect_x509sat_collectivePhysicalDeliveryOfficeName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
468 {
469         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_collectivePhysicalDeliveryOfficeName);
470 }
471
472 static void
473 dissect_x509sat_dmdName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
474 {
475         dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_dmdName);
476 }
477
478
479 static void
480 dissect_x509sat_telexNumber_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
481 {
482         dissect_x509sat_TelexNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_id_at_telexNumber);
483 }
484
485 static void
486 dissect_x509sat_collectiveTelexNumber_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
487 {
488         dissect_x509sat_TelexNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_id_at_collectiveTelexNumber);
489 }
490
491 static void
492 dissect_x509sat_telephoneNumber_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
493 {
494         dissect_x509sat_TelephoneNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_id_at_telephoneNumber);
495 }
496
497 static void
498 dissect_x509sat_collectiveTelephoneNumber_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
499 {
500         dissect_x509sat_TelephoneNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_id_at_collectiveTelephoneNumber);
501 }
502 /*bbb*/
503
504 /*--- proto_register_x509sat ----------------------------------------------*/
505 void proto_register_x509sat(void) {
506
507   /* List of fields */
508   static hf_register_info hf[] = {
509     { &hf_x509sat_countryName,
510       { "countryName", "x509sat.countryName",
511         FT_STRING, BASE_NONE, NULL, 0,
512         "Country Name", HFILL }},
513     { &hf_x509sat_organizationName,
514       { "organizationName", "x509sat.organizationName",
515         FT_STRING, BASE_NONE, NULL, 0,
516         "Organization Name", HFILL }},
517     { &hf_x509sat_knowledgeInformation,
518       { "knowledgeInformation", "x509sat.knowledgeInformation",
519         FT_STRING, BASE_NONE, NULL, 0,
520         "knowledgeInformation", HFILL }},
521     { &hf_x509sat_name,
522       { "name", "x509sat.name",
523         FT_STRING, BASE_NONE, NULL, 0,
524         "name", HFILL }},
525     { &hf_x509sat_commonName,
526       { "commonName", "x509sat.commonName",
527         FT_STRING, BASE_NONE, NULL, 0,
528         "commonName", HFILL }},
529     { &hf_x509sat_surname,
530       { "surname", "x509sat.surname",
531         FT_STRING, BASE_NONE, NULL, 0,
532         "surname", HFILL }},
533     { &hf_x509sat_givenName,
534       { "givenName", "x509sat.givenName",
535         FT_STRING, BASE_NONE, NULL, 0,
536         "givenName", HFILL }},
537     { &hf_x509sat_initials,
538       { "initials", "x509sat.initials",
539         FT_STRING, BASE_NONE, NULL, 0,
540         "initials", HFILL }},
541     { &hf_x509sat_generationQualifier,
542       { "generationQualifier", "x509sat.generationQualifier",
543         FT_STRING, BASE_NONE, NULL, 0,
544         "generationQualifier", HFILL }},
545     { &hf_x509sat_pseudonym,
546       { "pseudonym", "x509sat.pseudonym",
547         FT_STRING, BASE_NONE, NULL, 0,
548         "pseudonym", HFILL }},
549     { &hf_x509sat_localityName,
550       { "localityName", "x509sat.localityName",
551         FT_STRING, BASE_NONE, NULL, 0,
552         "localityName", HFILL }},
553     { &hf_x509sat_collectiveLocalityName,
554       { "collectiveLocalityName", "x509sat.collectiveLocalityName",
555         FT_STRING, BASE_NONE, NULL, 0,
556         "collectiveLocalityName", HFILL }},
557     { &hf_x509sat_stateOrProvinceName,
558       { "stateOrProvinceName", "x509sat.stateOrProvinceName",
559         FT_STRING, BASE_NONE, NULL, 0,
560         "stateOrProvinceName", HFILL }},
561     { &hf_x509sat_collectiveStateOrProvinceName,
562       { "collectiveStateOrProvinceName", "x509sat.collectiveStateOrProvinceName",
563         FT_STRING, BASE_NONE, NULL, 0,
564         "collectiveStateOrProvinceName", HFILL }},
565     { &hf_x509sat_streetAddress,
566       { "streetAddress", "x509sat.streetAddress",
567         FT_STRING, BASE_NONE, NULL, 0,
568         "streetAddress", HFILL }},
569     { &hf_x509sat_collectiveStreetAddress,
570       { "collectiveStreetAddress", "x509sat.collectiveStreetAddress",
571         FT_STRING, BASE_NONE, NULL, 0,
572         "collectiveStreetAddress", HFILL }},
573     { &hf_x509sat_houseIdentifier,
574       { "houseIdentifier", "x509sat.houseIdentifier",
575         FT_STRING, BASE_NONE, NULL, 0,
576         "houseIdentifier", HFILL }},
577     { &hf_x509sat_collectiveOrganizationName,
578       { "collectiveOrganizationName", "x509sat.collectiveOrganizationName",
579         FT_STRING, BASE_NONE, NULL, 0,
580         "collectiveOrganizationName", HFILL }},
581     { &hf_x509sat_organizationalUnitName,
582       { "organizationalUnitName", "x509sat.organizationalUnitName",
583         FT_STRING, BASE_NONE, NULL, 0,
584         "organizationalUnitName", HFILL }},
585     { &hf_x509sat_collectiveOrganizationalUnitName,
586       { "collectiveOrganizationalUnitName", "x509sat.collectiveOrganizationalUnitName",
587         FT_STRING, BASE_NONE, NULL, 0,
588         "collectiveOrganizationalUnitName", HFILL }},
589     { &hf_x509sat_title,
590       { "title", "x509sat.title",
591         FT_STRING, BASE_NONE, NULL, 0,
592         "title", HFILL }},
593     { &hf_x509sat_description,
594       { "description", "x509sat.description",
595         FT_STRING, BASE_NONE, NULL, 0,
596         "description", HFILL }},
597     { &hf_x509sat_businessCategory,
598       { "businessCategory", "x509sat.businessCategory",
599         FT_STRING, BASE_NONE, NULL, 0,
600         "businessCategory", HFILL }},
601     { &hf_x509sat_postalCode,
602       { "postalCode", "x509sat.postalCode",
603         FT_STRING, BASE_NONE, NULL, 0,
604         "postalCode", HFILL }},
605     { &hf_x509sat_collectivePostalCode,
606       { "collectivePostalCode", "x509sat.collectivePostalCode",
607         FT_STRING, BASE_NONE, NULL, 0,
608         "collectivePostalCode", HFILL }},
609     { &hf_x509sat_postOfficeBox,
610       { "postOfficeBox", "x509sat.postOfficeBox",
611         FT_STRING, BASE_NONE, NULL, 0,
612         "postOfficeBox", HFILL }},
613     { &hf_x509sat_collectivePostOfficeBox,
614       { "collectivePostOfficeBox", "x509sat.collectivePostOfficeBox",
615         FT_STRING, BASE_NONE, NULL, 0,
616         "collectivePostOfficeBox", HFILL }},
617     { &hf_x509sat_physicalDeliveryOfficeName,
618       { "physicalDeliveryOfficeName", "x509sat.physicalDeliveryOfficeName",
619         FT_STRING, BASE_NONE, NULL, 0,
620         "physicalDeliveryOfficeName", HFILL }},
621     { &hf_x509sat_collectivePhysicalDeliveryOfficeName,
622       { "collectivePhysicalDeliveryOfficeName", "x509sat.collectivePhysicalDeliveryOfficeName",
623         FT_STRING, BASE_NONE, NULL, 0,
624         "collectivePhysicalDeliveryOfficeName", HFILL }},
625     { &hf_x509sat_dmdName,
626       { "dmdName", "x509sat.dmdName",
627         FT_STRING, BASE_NONE, NULL, 0,
628         "dmdName", HFILL }},
629     { &hf_x509sat_id_at_telexNumber,
630       { "telexNumber", "x509sat.id_at_telexNumber",
631         FT_NONE, BASE_NONE, NULL, 0,
632         "telexNumber", HFILL }},
633     { &hf_x509sat_id_at_collectiveTelexNumber,
634       { "collectiveTelexNumber", "x509sat.id_at_collectiveTelexNumber",
635         FT_NONE, BASE_NONE, NULL, 0,
636         "collectiveTelexNumber", HFILL }},
637     { &hf_x509sat_id_at_telephoneNumber,
638       { "telephoneNumber", "x509sat.id_at_telephoneNumber",
639         FT_STRING, BASE_NONE, NULL, 0,
640         "telephoneNumber", HFILL }},
641     { &hf_x509sat_id_at_collectiveTelephoneNumber,
642       { "collectiveTelephoneNumber", "x509sat.id_at_collectiveTelephoneNumber",
643         FT_STRING, BASE_NONE, NULL, 0,
644         "collectiveTelephoneNumber", HFILL }},
645 /*ccc*/
646
647 /*--- Included file: packet-x509sat-hfarr.c ---*/
648
649 /* Do not modify this file.                                                   */
650 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
651 /* packet-x509sat-hfarr.c                                                     */
652 /* ../../tools/asn2eth.py -X -b -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
653
654     { &hf_x509sat_equality,
655       { "equality", "x509sat.equality",
656         FT_NONE, BASE_NONE, NULL, 0,
657         "CriteriaItem/equality", HFILL }},
658     { &hf_x509sat_substrings,
659       { "substrings", "x509sat.substrings",
660         FT_NONE, BASE_NONE, NULL, 0,
661         "CriteriaItem/substrings", HFILL }},
662     { &hf_x509sat_greaterOrEqual,
663       { "greaterOrEqual", "x509sat.greaterOrEqual",
664         FT_NONE, BASE_NONE, NULL, 0,
665         "CriteriaItem/greaterOrEqual", HFILL }},
666     { &hf_x509sat_lessOrEqual,
667       { "lessOrEqual", "x509sat.lessOrEqual",
668         FT_NONE, BASE_NONE, NULL, 0,
669         "CriteriaItem/lessOrEqual", HFILL }},
670     { &hf_x509sat_approximateMatch,
671       { "approximateMatch", "x509sat.approximateMatch",
672         FT_NONE, BASE_NONE, NULL, 0,
673         "CriteriaItem/approximateMatch", HFILL }},
674     { &hf_x509sat_telexNumber,
675       { "telexNumber", "x509sat.telexNumber",
676         FT_STRING, BASE_NONE, NULL, 0,
677         "TelexNumber/telexNumber", HFILL }},
678     { &hf_x509sat_countryCode,
679       { "countryCode", "x509sat.countryCode",
680         FT_STRING, BASE_NONE, NULL, 0,
681         "TelexNumber/countryCode", HFILL }},
682     { &hf_x509sat_answerback,
683       { "answerback", "x509sat.answerback",
684         FT_STRING, BASE_NONE, NULL, 0,
685         "TelexNumber/answerback", HFILL }},
686
687 /*--- End of included file: packet-x509sat-hfarr.c ---*/
688
689   };
690
691   /* List of subtrees */
692   static gint *ett[] = {
693     &ett_x509sat_DirectoryString,
694
695 /*--- Included file: packet-x509sat-ettarr.c ---*/
696
697 /* Do not modify this file.                                                   */
698 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
699 /* packet-x509sat-ettarr.c                                                    */
700 /* ../../tools/asn2eth.py -X -b -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
701
702     &ett_x509sat_CriteriaItem,
703     &ett_x509sat_TelexNumber,
704
705 /*--- End of included file: packet-x509sat-ettarr.c ---*/
706
707   };
708
709   /* Register protocol */
710   proto_x509sat = proto_register_protocol(PNAME, PSNAME, PFNAME);
711
712   /* Register fields and subtrees */
713   proto_register_field_array(proto_x509sat, hf, array_length(hf));
714   proto_register_subtree_array(ett, array_length(ett));
715
716 }
717
718
719 /*--- proto_reg_handoff_x509sat -------------------------------------------*/
720 void proto_reg_handoff_x509sat(void) {
721         register_ber_oid_dissector("2.5.4.2", dissect_x509sat_knowledgeInformation_callback, proto_x509sat, "id-at-knowledgeInformation");
722         register_ber_oid_dissector("2.5.4.3", dissect_x509sat_commonName_callback, proto_x509sat, "id-at-commonName");
723         register_ber_oid_dissector("2.5.4.4", dissect_x509sat_surname_callback, proto_x509sat, "id-at-surname");
724         register_ber_oid_dissector("2.5.4.6", dissect_x509sat_countryName_callback, proto_x509sat, "id-at-countryName");
725         register_ber_oid_dissector("2.5.4.7", dissect_x509sat_localityName_callback, proto_x509sat, "id-at-localityName");
726         register_ber_oid_dissector("2.5.4.7.1", dissect_x509sat_collectiveLocalityName_callback, proto_x509sat, "id-at-collectiveLocalityName");
727         register_ber_oid_dissector("2.5.4.8", dissect_x509sat_stateOrProvinceName_callback, proto_x509sat, "id-at-stateOrProvinceName");
728         register_ber_oid_dissector("2.5.4.8.1", dissect_x509sat_collectiveStateOrProvinceName_callback, proto_x509sat, "id-at-collectiveStateOrProvinceName");
729         register_ber_oid_dissector("2.5.4.9", dissect_x509sat_streetAddress_callback, proto_x509sat, "id-at-streetAddress");
730         register_ber_oid_dissector("2.5.4.9.1", dissect_x509sat_collectiveStreetAddress_callback, proto_x509sat, "id-at-collectiveStreetAddress");
731         register_ber_oid_dissector("2.5.4.10", dissect_x509sat_organizationName_callback, proto_x509sat, "id-at-organizationName");
732         register_ber_oid_dissector("2.5.4.10.1", dissect_x509sat_collectiveOrganizationName_callback, proto_x509sat, "id-at-collectiveOrganizationName");
733         register_ber_oid_dissector("2.5.4.11", dissect_x509sat_organizationalUnitName_callback, proto_x509sat, "id-at-organizationalUnitName");
734         register_ber_oid_dissector("2.5.4.11.1", dissect_x509sat_collectiveOrganizationalUnitName_callback, proto_x509sat, "id-at-collectiveOrganizationalUnitName");
735         register_ber_oid_dissector("2.5.4.12", dissect_x509sat_title_callback, proto_x509sat, "id-at-title");
736         register_ber_oid_dissector("2.5.4.13", dissect_x509sat_description_callback, proto_x509sat, "id-at-description");
737         register_ber_oid_dissector("2.5.4.15", dissect_x509sat_businessCategory_callback, proto_x509sat, "id-at-businessCategory");
738         register_ber_oid_dissector("2.5.4.17", dissect_x509sat_postalCode_callback, proto_x509sat, "id-at-postalCode");
739         register_ber_oid_dissector("2.5.4.17.1", dissect_x509sat_collectivePostalCode_callback, proto_x509sat, "id-at-collectivePostalCode");
740         register_ber_oid_dissector("2.5.4.18", dissect_x509sat_postOfficeBox_callback, proto_x509sat, "id-at-postOfficeBox");
741         register_ber_oid_dissector("2.5.4.18.1", dissect_x509sat_collectivePostOfficeBox_callback, proto_x509sat, "id-at-collectivePostOfficeBox");
742         register_ber_oid_dissector("2.5.4.19", dissect_x509sat_physicalDeliveryOfficeName_callback, proto_x509sat, "id-at-physicalDeliveryOfficeName");
743         register_ber_oid_dissector("2.5.4.19.1", dissect_x509sat_collectivePhysicalDeliveryOfficeName_callback, proto_x509sat, "id-at-collectivePhysicalDeliveryOfficeName");
744         register_ber_oid_dissector("2.5.4.20", dissect_x509sat_telephoneNumber_callback, proto_x509sat, "id-at-telephoneNumber");
745         register_ber_oid_dissector("2.5.4.20.1", dissect_x509sat_collectiveTelephoneNumber_callback, proto_x509sat, "id-at-collectiveTelephoneNumber");
746         register_ber_oid_dissector("2.5.4.21", dissect_x509sat_telexNumber_callback, proto_x509sat, "id-at-telexNumber");
747         register_ber_oid_dissector("2.5.4.21.1", dissect_x509sat_collectiveTelexNumber_callback, proto_x509sat, "id-at-collectiveTelexNumber");
748         register_ber_oid_dissector("2.5.4.41", dissect_x509sat_name_callback, proto_x509sat, "id-at-name");
749         register_ber_oid_dissector("2.5.4.42", dissect_x509sat_givenName_callback, proto_x509sat, "id-at-givenName");
750         register_ber_oid_dissector("2.5.4.43", dissect_x509sat_initials_callback, proto_x509sat, "id-at-initials");
751         register_ber_oid_dissector("2.5.4.44", dissect_x509sat_generationQualifier_callback, proto_x509sat, "id-at-generationQualifier");
752         register_ber_oid_dissector("2.5.4.51", dissect_x509sat_houseIdentifier_callback, proto_x509sat, "id-at-houseIdentifier");
753         register_ber_oid_dissector("2.5.4.54", dissect_x509sat_dmdName_callback, proto_x509sat, "id-at-dmdName");
754         register_ber_oid_dissector("2.5.4.65", dissect_x509sat_pseudonym_callback, proto_x509sat, "id-at-pseudonym");
755
756 /*ddd*/
757 }
758
759
760