d1a5de13e0a6275dffc985d59d9f94c5c997e069
[obnox/wireshark/wip.git] / asn1 / wlancertextn / packet-wlancertextn-template.c
1 /* packet-wlancertextn.c
2  * Routines for Wireless Certificate Extension (RFC3770)
3  *  Ronnie Sahlberg 2005
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/conversation.h>
33
34 #include <stdio.h>
35 #include <string.h>
36
37 #include "packet-ber.h"
38 #include "packet-wlancertextn.h"
39 #include "packet-x509af.h"
40 #include "packet-x509ce.h"
41 #include "packet-x509sat.h"
42
43 #define PNAME  "Wlan Certificate Extension"
44 #define PSNAME "WLANCERTEXTN"
45 #define PFNAME "wlancertextn"
46
47 /* Initialize the protocol and registered fields */
48 int proto_wlancertextn = -1;
49 #include "packet-wlancertextn-hf.c"
50
51 /* Initialize the subtree pointers */
52 #include "packet-wlancertextn-ett.c"
53
54 #include "packet-wlancertextn-fn.c"
55
56
57 /*--- proto_register_wlancertextn ----------------------------------------------*/
58 void proto_register_wlancertextn(void) {
59
60   /* List of fields */
61   static hf_register_info hf[] = {
62 #include "packet-wlancertextn-hfarr.c"
63   };
64
65   /* List of subtrees */
66   static gint *ett[] = {
67 #include "packet-wlancertextn-ettarr.c"
68   };
69
70   /* Register protocol */
71   proto_wlancertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
72
73   /* Register fields and subtrees */
74   proto_register_field_array(proto_wlancertextn, hf, array_length(hf));
75   proto_register_subtree_array(ett, array_length(ett));
76
77 }
78
79
80 /*--- proto_reg_handoff_wlancertextn -------------------------------------------*/
81 void proto_reg_handoff_wlancertextn(void) {
82 #include "packet-wlancertextn-dis-tab.c"
83   register_ber_oid_name("1.3.6.1.5.5.7.3.13","id-kp-eapOverPPP");
84   register_ber_oid_name("1.3.6.1.5.5.7.3.14","id-kp-eapOverLAN");
85 }
86