#include <epan/conversation.h> and/or #include <epan/emem.h> not req'd ...
[obnox/wireshark/wip.git] / asn1 / pkixcrmf / packet-crmf-template.c
1 /* packet-crmf.c
2  * Routines for RFC2511 Certificate Request Message Format 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 #include <epan/asn1.h>
33
34 #include <stdio.h>
35 #include <string.h>
36
37 #include "packet-ber.h"
38 #include "packet-crmf.h"
39 #include "packet-cms.h"
40 #include "packet-pkix1explicit.h"
41 #include "packet-pkix1implicit.h"
42
43 #define PNAME  "Certificate Request Message Format"
44 #define PSNAME "CRMF"
45 #define PFNAME "crmf"
46
47 /* Initialize the protocol and registered fields */
48 int proto_crmf = -1;
49 static int hf_crmf_type_oid = -1;
50 #include "packet-crmf-hf.c"
51
52 /* Initialize the subtree pointers */
53 #include "packet-crmf-ett.c"
54
55 static const char *object_identifier_id;
56
57 #include "packet-crmf-fn.c"
58
59
60 /*--- proto_register_crmf ----------------------------------------------*/
61 void proto_register_crmf(void) {
62
63   /* List of fields */
64   static hf_register_info hf[] = {
65     { &hf_crmf_type_oid,
66       { "Type", "crmf.type.oid",
67         FT_STRING, BASE_NONE, NULL, 0,
68         "Type of AttributeTypeAndValue", HFILL }},
69 #include "packet-crmf-hfarr.c"
70   };
71
72   /* List of subtrees */
73   static gint *ett[] = {
74 #include "packet-crmf-ettarr.c"
75   };
76
77   /* Register protocol */
78   proto_crmf = proto_register_protocol(PNAME, PSNAME, PFNAME);
79
80   /* Register fields and subtrees */
81   proto_register_field_array(proto_crmf, hf, array_length(hf));
82   proto_register_subtree_array(ett, array_length(ett));
83
84 }
85
86
87 /*--- proto_reg_handoff_crmf -------------------------------------------*/
88 void proto_reg_handoff_crmf(void) {
89 #include "packet-crmf-dis-tab.c"
90 }
91