HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-wlancertextn.c
blob8c080e6ec30a33516538c53c8e202885eb4dec96
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-wlancertextn.c */
4 /* ../../tools/asn2wrs.py -b -p wlancertextn -c ./wlancertextn.cnf -s ./packet-wlancertextn-template -D . -O ../../epan/dissectors WLANCERTEXTN.asn */
6 /* Input file: packet-wlancertextn-template.c */
8 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
9 /* packet-wlancertextn.c
10 * Routines for Wireless Certificate Extension (RFC3770)
11 * Ronnie Sahlberg 2005
13 * $Id$
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34 #include "config.h"
36 #include <glib.h>
37 #include <epan/packet.h>
38 #include <epan/oids.h>
39 #include <epan/asn1.h>
41 #include "packet-ber.h"
42 #include "packet-wlancertextn.h"
43 #include "packet-x509af.h"
44 #include "packet-x509ce.h"
45 #include "packet-x509sat.h"
47 #define PNAME "Wlan Certificate Extension"
48 #define PSNAME "WLANCERTEXTN"
49 #define PFNAME "wlancertextn"
51 void proto_register_wlancertextn(void);
52 void proto_reg_handoff_wlancertextn(void);
54 /* Initialize the protocol and registered fields */
55 static int proto_wlancertextn = -1;
57 /*--- Included file: packet-wlancertextn-hf.c ---*/
58 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-hf.c"
59 static int hf_wlancertextn_SSIDList_PDU = -1; /* SSIDList */
60 static int hf_wlancertextn_SSIDList_item = -1; /* SSID */
62 /*--- End of included file: packet-wlancertextn-hf.c ---*/
63 #line 49 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
65 /* Initialize the subtree pointers */
67 /*--- Included file: packet-wlancertextn-ett.c ---*/
68 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-ett.c"
69 static gint ett_wlancertextn_SSIDList = -1;
71 /*--- End of included file: packet-wlancertextn-ett.c ---*/
72 #line 52 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
75 /*--- Included file: packet-wlancertextn-fn.c ---*/
76 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-fn.c"
79 static int
80 dissect_wlancertextn_SSID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
81 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
82 NULL);
84 return offset;
88 static const ber_sequence_t SSIDList_sequence_of[1] = {
89 { &hf_wlancertextn_SSIDList_item, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_wlancertextn_SSID },
92 static int
93 dissect_wlancertextn_SSIDList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
94 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
95 SSIDList_sequence_of, hf_index, ett_wlancertextn_SSIDList);
97 return offset;
100 /*--- PDUs ---*/
102 static void dissect_SSIDList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
103 asn1_ctx_t asn1_ctx;
104 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
105 dissect_wlancertextn_SSIDList(FALSE, tvb, 0, &asn1_ctx, tree, hf_wlancertextn_SSIDList_PDU);
109 /*--- End of included file: packet-wlancertextn-fn.c ---*/
110 #line 54 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
113 /*--- proto_register_wlancertextn ----------------------------------------------*/
114 void proto_register_wlancertextn(void) {
116 /* List of fields */
117 static hf_register_info hf[] = {
119 /*--- Included file: packet-wlancertextn-hfarr.c ---*/
120 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-hfarr.c"
121 { &hf_wlancertextn_SSIDList_PDU,
122 { "SSIDList", "wlancertextn.SSIDList",
123 FT_UINT32, BASE_DEC, NULL, 0,
124 NULL, HFILL }},
125 { &hf_wlancertextn_SSIDList_item,
126 { "SSID", "wlancertextn.SSID",
127 FT_BYTES, BASE_NONE, NULL, 0,
128 NULL, HFILL }},
130 /*--- End of included file: packet-wlancertextn-hfarr.c ---*/
131 #line 62 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
134 /* List of subtrees */
135 static gint *ett[] = {
137 /*--- Included file: packet-wlancertextn-ettarr.c ---*/
138 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-ettarr.c"
139 &ett_wlancertextn_SSIDList,
141 /*--- End of included file: packet-wlancertextn-ettarr.c ---*/
142 #line 67 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
145 /* Register protocol */
146 proto_wlancertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
148 /* Register fields and subtrees */
149 proto_register_field_array(proto_wlancertextn, hf, array_length(hf));
150 proto_register_subtree_array(ett, array_length(ett));
155 /*--- proto_reg_handoff_wlancertextn -------------------------------------------*/
156 void proto_reg_handoff_wlancertextn(void) {
158 /*--- Included file: packet-wlancertextn-dis-tab.c ---*/
159 #line 1 "../../asn1/wlancertextn/packet-wlancertextn-dis-tab.c"
160 register_ber_oid_dissector("1.3.6.1.5.5.7.1.13", dissect_SSIDList_PDU, proto_wlancertextn, "id-pe-wlanSSID");
161 register_ber_oid_dissector("1.3.6.1.5.5.7.10.6", dissect_SSIDList_PDU, proto_wlancertextn, "id-aca-wlanSSID");
164 /*--- End of included file: packet-wlancertextn-dis-tab.c ---*/
165 #line 82 "../../asn1/wlancertextn/packet-wlancertextn-template.c"
166 oid_add_from_string("id-kp-eapOverPPP","1.3.6.1.5.5.7.3.13");
167 oid_add_from_string("id-kp-eapOverLAN","1.3.6.1.5.5.7.3.14");