From Clemens Auer:
[obnox/wireshark/wip.git] / asn1 / ns_cert_exts / packet-ns_cert_exts-template.c
1 /* packet-ns_cert_exts.c
2  * Routines for NetScape Certificate Extensions packet dissection
3  *   Ronnie Sahlberg 2004
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifdef HAVE_CONFIG_H
27 # include "config.h"
28 #endif
29
30 #include <glib.h>
31 #include <epan/packet.h>
32
33 #include "packet-ber.h"
34
35 #define PNAME  "NetScape Certificate Extensions"
36 #define PSNAME "NS_CERT_EXTS"
37 #define PFNAME "ns_cert_exts"
38
39 /* Initialize the protocol and registered fields */
40 static int proto_ns_cert_exts = -1;
41 #include "packet-ns_cert_exts-hf.c"
42
43 /* Initialize the subtree pointers */
44 #include "packet-ns_cert_exts-ett.c"
45
46 #include "packet-ns_cert_exts-fn.c"
47
48
49 /*--- proto_register_ns_cert_exts -------------------------------------------*/
50 void proto_register_ns_cert_exts(void) {
51
52   /* List of fields */
53   static hf_register_info hf[] = {
54 #include "packet-ns_cert_exts-hfarr.c"
55   };
56
57   /* List of subtrees */
58   static gint *ett[] = {
59 #include "packet-ns_cert_exts-ettarr.c"
60   };
61
62   /* Register protocol */
63   proto_ns_cert_exts = proto_register_protocol(PNAME, PSNAME, PFNAME);
64
65   /* Register fields and subtrees */
66   proto_register_field_array(proto_ns_cert_exts, hf, array_length(hf));
67   proto_register_subtree_array(ett, array_length(ett));
68
69 }
70
71
72 /*--- proto_reg_handoff_ns_cert_exts ---------------------------------------*/
73 void proto_reg_handoff_ns_cert_exts(void) {
74 #include "packet-ns_cert_exts-dis-tab.c"
75 }
76