97b932cb1555b5408c98185e0502c5d569c291ea
[obnox/wireshark/wip.git] / asn1 / pkix1implicit / packet-pkix1implicit-template.c
1 /* packet-pkix1implicit.c
2  * Routines for PKIX1Implitic packet dissection
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifdef HAVE_CONFIG_H
26 # include "config.h"
27 #endif
28
29 #include <glib.h>
30 #include <epan/packet.h>
31 #include <epan/conversation.h>
32
33 #include <stdio.h>
34 #include <string.h>
35
36 #include "packet-ber.h"
37 #include "packet-pkix1implicit.h"
38 #include "packet-pkix1explicit.h"
39 #include "packet-x509ce.h"
40
41 #define PNAME  "PKIX1Implitit"
42 #define PSNAME "PKIX1IMPLICIT"
43 #define PFNAME "pkix1implicit"
44
45 /* Initialize the protocol and registered fields */
46 static int proto_pkix1implicit = -1;
47 #include "packet-pkix1implicit-hf.c"
48
49 /* Initialize the subtree pointers */
50 #include "packet-pkix1implicit-ett.c"
51
52
53 int
54 dissect_pkix1implicit_ReasonFlags(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
55   offset = dissect_x509ce_ReasonFlags(implicit_tag, tvb, offset, pinfo, tree, hf_index);
56
57   return offset;
58 }
59 int
60 dissect_pkix1implicit_GeneralName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
61   offset = dissect_x509ce_GeneralName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
62
63   return offset;
64 }
65
66 #include "packet-pkix1implicit-fn.c"
67
68
69 /*--- proto_register_pkix1implicit ----------------------------------------------*/
70 void proto_register_pkix1implicit(void) {
71
72   /* List of fields */
73   static hf_register_info hf[] = {
74 #include "packet-pkix1implicit-hfarr.c"
75   };
76
77   /* List of subtrees */
78   static gint *ett[] = {
79 #include "packet-pkix1implicit-ettarr.c"
80   };
81
82   /* Register protocol */
83   proto_pkix1implicit = proto_register_protocol(PNAME, PSNAME, PFNAME);
84
85   /* Register fields and subtrees */
86   proto_register_field_array(proto_pkix1implicit, hf, array_length(hf));
87   proto_register_subtree_array(ett, array_length(ett));
88
89 }
90
91
92 /*--- proto_reg_handoff_pkix1implicit -------------------------------------------*/
93 void proto_reg_handoff_pkix1implicit(void) {
94 #include "packet-pkix1implicit-dis-tab.c"
95 }
96