Renamed x411 to p1, x420 to p22 and s4406 to p772 to be consistent
[obnox/wireshark/wip.git] / asn1 / x509sat / packet-x509sat-template.c
1 /* packet-x509sat.c
2  * Routines for X.509 Selected Attribute Types 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/oids.h>
33 #include <epan/asn1.h>
34
35 #include "packet-ber.h"
36 #include "packet-p1.h"
37 #include "packet-x509sat.h"
38 #include "packet-x509if.h"
39
40 #define PNAME  "X.509 Selected Attribute Types"
41 #define PSNAME "X509SAT"
42 #define PFNAME "x509sat"
43
44 /* Initialize the protocol and registered fields */
45 static int proto_x509sat = -1;
46 #include "packet-x509sat-hf.c"
47
48 /* Initialize the subtree pointers */
49 #include "packet-x509sat-ett.c"
50
51 #include "packet-x509sat-fn.c"
52
53
54 /*--- proto_register_x509sat ----------------------------------------------*/
55 void proto_register_x509sat(void) {
56
57   /* List of fields */
58   static hf_register_info hf[] = {
59 #include "packet-x509sat-hfarr.c"
60   };
61
62   /* List of subtrees */
63   static gint *ett[] = {
64 #include "packet-x509sat-ettarr.c"
65   };
66
67   /* Register protocol */
68   proto_x509sat = proto_register_protocol(PNAME, PSNAME, PFNAME);
69
70   /* Register fields and subtrees */
71   proto_register_field_array(proto_x509sat, hf, array_length(hf));
72   proto_register_subtree_array(ett, array_length(ett));
73
74 #include "packet-x509sat-syn-reg.c"
75
76 }
77
78
79 /*--- proto_reg_handoff_x509sat -------------------------------------------*/
80 void proto_reg_handoff_x509sat(void) {
81 #include "packet-x509sat-dis-tab.c"
82
83   /* OBJECT CLASSES */
84
85   oid_add_from_string("top","2.5.6.0");
86   oid_add_from_string("alias","2.5.6.1");
87   oid_add_from_string("country","2.5.6.2");
88   oid_add_from_string("locality","2.5.6.3");
89   oid_add_from_string("organization","2.5.6.4");
90   oid_add_from_string("organizationalUnit","2.5.6.5");
91   oid_add_from_string("person","2.5.6.6");
92   oid_add_from_string("organizationalPerson","2.5.6.7");
93   oid_add_from_string("organizationalRole","2.5.6.8");
94   oid_add_from_string("groupOfNames","2.5.6.9");
95   oid_add_from_string("residentialPerson","2.5.6.10");
96   oid_add_from_string("applicationProcess","2.5.6.11");
97   oid_add_from_string("applicationEntity","2.5.6.12");
98   oid_add_from_string("dSA","2.5.6.13");
99   oid_add_from_string("device","2.5.6.14");
100   oid_add_from_string("strongAuthenticationUser","2.5.6.15");
101   oid_add_from_string("certificationAuthority","2.5.6.16");
102   oid_add_from_string("certificationAuthorityV2","2.5.6.16.2");
103   oid_add_from_string("groupOfUniqueNames","2.5.6.17");
104   oid_add_from_string("userSecurityInformation","2.5.6.18");
105   oid_add_from_string("cRLDistributionPoint","2.5.6.19");
106   oid_add_from_string("dmd","2.5.6.20");
107   oid_add_from_string("pkiUser","2.5.6.21");
108   oid_add_from_string("pkiCA","2.5.6.22");
109   
110   oid_add_from_string("parent","2.5.6.28");
111   oid_add_from_string("child","2.5.6.29");
112
113   /* RFC 2247 */
114   oid_add_from_string("dcObject","1.3.6.1.4.1.1446.344");
115   oid_add_from_string("domain","0.9.2342.19200300.100.4.13");
116
117 }
118
119
120