name change
[metze/wireshark/wip.git] / asn1 / ess / packet-ess-template.c
1 /* packet-ess.c
2  * Routines for RFC2634 Extended Security Services 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 <stdio.h>
34 #include <string.h>
35
36 #include "packet-ber.h"
37 #include "packet-ess.h"
38 #include "packet-cms.h"
39 #include "packet-x509ce.h"
40 #include "packet-x509af.h"
41
42 #define PNAME  "Extended Security Services"
43 #define PSNAME "ESS"
44 #define PFNAME "ess"
45
46 /* Initialize the protocol and registered fields */
47 static int proto_ess = -1;
48 static int hf_ess_SecurityCategory_type_OID = -1;
49 #include "packet-ess-hf.c"
50
51 /* Initialize the subtree pointers */
52 #include "packet-ess-ett.c"
53
54 static const char *object_identifier_id;
55
56 #include "packet-ess-fn.c"
57
58
59 /*--- proto_register_ess ----------------------------------------------*/
60 void proto_register_ess(void) {
61
62   /* List of fields */
63   static hf_register_info hf[] = {
64     { &hf_ess_SecurityCategory_type_OID, 
65       { "type", "ess.type_OID", FT_STRING, BASE_NONE, NULL, 0,
66         "Type of Security Category", HFILL }},
67 #include "packet-ess-hfarr.c"
68   };
69
70   /* List of subtrees */
71   static gint *ett[] = {
72 #include "packet-ess-ettarr.c"
73   };
74
75   /* Register protocol */
76   proto_ess = proto_register_protocol(PNAME, PSNAME, PFNAME);
77
78   /* Register fields and subtrees */
79   proto_register_field_array(proto_ess, hf, array_length(hf));
80   proto_register_subtree_array(ett, array_length(ett));
81
82 }
83
84
85 /*--- proto_reg_handoff_ess -------------------------------------------*/
86 void proto_reg_handoff_ess(void) {
87 #include "packet-ess-dis-tab.c"
88 }
89