Update Free Software Foundation address.
[metze/wireshark/wip.git] / asn1 / pkix1implicit / packet-pkix1implicit-template.c
1 /* packet-pkix1implicit.c
2  * Routines for PKIX1Implitic packet dissection
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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
32 #include <epan/asn1.h>
33 #include "packet-ber.h"
34 #include "packet-pkix1implicit.h"
35 #include "packet-pkix1explicit.h"
36 #include "packet-x509ce.h"
37
38 #define PNAME  "PKIX1Implitit"
39 #define PSNAME "PKIX1IMPLICIT"
40 #define PFNAME "pkix1implicit"
41
42 /* Initialize the protocol and registered fields */
43 static int proto_pkix1implicit = -1;
44 #include "packet-pkix1implicit-hf.c"
45
46 /* Initialize the subtree pointers */
47 #include "packet-pkix1implicit-ett.c"
48
49
50 int
51 dissect_pkix1implicit_ReasonFlags(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
52   offset = dissect_x509ce_ReasonFlags(implicit_tag, tvb, offset, actx, tree, hf_index);
53
54   return offset;
55 }
56 int
57 dissect_pkix1implicit_GeneralName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
58   offset = dissect_x509ce_GeneralName(implicit_tag, tvb, offset, actx, tree, hf_index);
59
60   return offset;
61 }
62
63 #include "packet-pkix1implicit-fn.c"
64
65
66 /*--- proto_register_pkix1implicit ----------------------------------------------*/
67 void proto_register_pkix1implicit(void) {
68
69   /* List of fields */
70   static hf_register_info hf[] = {
71 #include "packet-pkix1implicit-hfarr.c"
72   };
73
74   /* List of subtrees */
75   static gint *ett[] = {
76 #include "packet-pkix1implicit-ettarr.c"
77   };
78
79   /* Register protocol */
80   proto_pkix1implicit = proto_register_protocol(PNAME, PSNAME, PFNAME);
81
82   /* Register fields and subtrees */
83   proto_register_field_array(proto_pkix1implicit, hf, array_length(hf));
84   proto_register_subtree_array(ett, array_length(ett));
85
86 }
87
88
89 /*--- proto_reg_handoff_pkix1implicit -------------------------------------------*/
90 void proto_reg_handoff_pkix1implicit(void) {
91 #include "packet-pkix1implicit-dis-tab.c"
92 }
93