name change
[obnox/wireshark/wip.git] / asn1 / pkixproxy / packet-pkixproxy-template.c
1 /* packet-pkixproxy.c
2  * Routines for RFC3820 PKIXProxy 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-pkixproxy.h"
38
39 #define PNAME  "PKIXProxy (RFC3820)"
40 #define PSNAME "PKIXPROXY"
41 #define PFNAME "pkixproxy"
42
43 /* Initialize the protocol and registered fields */
44 static int proto_pkixproxy = -1;
45 #include "packet-pkixproxy-hf.c"
46
47 /* Initialize the subtree pointers */
48 #include "packet-pkixproxy-ett.c"
49
50 #include "packet-pkixproxy-fn.c"
51
52
53 /*--- proto_register_pkixproxy ----------------------------------------------*/
54 void proto_register_pkixproxy(void) {
55
56   /* List of fields */
57   static hf_register_info hf[] = {
58 #include "packet-pkixproxy-hfarr.c"
59   };
60
61   /* List of subtrees */
62   static gint *ett[] = {
63 #include "packet-pkixproxy-ettarr.c"
64   };
65
66   /* Register protocol */
67   proto_pkixproxy = proto_register_protocol(PNAME, PSNAME, PFNAME);
68
69   /* Register fields and subtrees */
70   proto_register_field_array(proto_pkixproxy, hf, array_length(hf));
71   proto_register_subtree_array(ett, array_length(ett));
72
73 }
74
75
76 /*--- proto_reg_handoff_pkixproxy -------------------------------------------*/
77 void proto_reg_handoff_pkixproxy(void) {
78 #include "packet-pkixproxy-dis-tab.c"
79   register_ber_oid_name("1.3.6.1.5.5.7.21.0", "id-ppl-anyLanguage");
80   register_ber_oid_name("1.3.6.1.5.5.7.21.1", "id-ppl-inheritAll");
81   register_ber_oid_name("1.3.6.1.5.5.7.21.2", "id-ppl-independent");
82 }
83