1 /* Do not modify this file. */
2 /* It is created 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 . WLANCERTEXTN.asn */
6 /* Input file: packet-wlancertextn-template.c */
8 #line 1 "packet-wlancertextn-template.c"
9 /* packet-wlancertextn.c
10 * Routines for Wireless Certificate Extension (RFC3770)
11 * Ronnie Sahlberg 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include <epan/oids.h>
41 #include <epan/asn1.h>
46 #include "packet-ber.h"
47 #include "packet-wlancertextn.h"
48 #include "packet-x509af.h"
49 #include "packet-x509ce.h"
50 #include "packet-x509sat.h"
52 #define PNAME "Wlan Certificate Extension"
53 #define PSNAME "WLANCERTEXTN"
54 #define PFNAME "wlancertextn"
56 /* Initialize the protocol and registered fields */
57 int proto_wlancertextn = -1;
59 /*--- Included file: packet-wlancertextn-hf.c ---*/
60 #line 1 "packet-wlancertextn-hf.c"
61 static int hf_wlancertextn_SSIDList_PDU = -1; /* SSIDList */
62 static int hf_wlancertextn_SSIDList_item = -1; /* SSID */
64 /*--- End of included file: packet-wlancertextn-hf.c ---*/
65 #line 51 "packet-wlancertextn-template.c"
67 /* Initialize the subtree pointers */
69 /*--- Included file: packet-wlancertextn-ett.c ---*/
70 #line 1 "packet-wlancertextn-ett.c"
71 static gint ett_wlancertextn_SSIDList = -1;
73 /*--- End of included file: packet-wlancertextn-ett.c ---*/
74 #line 54 "packet-wlancertextn-template.c"
77 /*--- Included file: packet-wlancertextn-fn.c ---*/
78 #line 1 "packet-wlancertextn-fn.c"
82 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_) {
83 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
90 static const ber_sequence_t SSIDList_sequence_of[1] = {
91 { &hf_wlancertextn_SSIDList_item, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_wlancertextn_SSID },
95 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_) {
96 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
97 SSIDList_sequence_of, hf_index, ett_wlancertextn_SSIDList);
104 static void dissect_SSIDList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
106 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
107 dissect_wlancertextn_SSIDList(FALSE, tvb, 0, &asn1_ctx, tree, hf_wlancertextn_SSIDList_PDU);
111 /*--- End of included file: packet-wlancertextn-fn.c ---*/
112 #line 56 "packet-wlancertextn-template.c"
115 /*--- proto_register_wlancertextn ----------------------------------------------*/
116 void proto_register_wlancertextn(void) {
119 static hf_register_info hf[] = {
121 /*--- Included file: packet-wlancertextn-hfarr.c ---*/
122 #line 1 "packet-wlancertextn-hfarr.c"
123 { &hf_wlancertextn_SSIDList_PDU,
124 { "SSIDList", "wlancertextn.SSIDList",
125 FT_UINT32, BASE_DEC, NULL, 0,
126 "wlancertextn.SSIDList", HFILL }},
127 { &hf_wlancertextn_SSIDList_item,
128 { "SSID", "wlancertextn.SSID",
129 FT_BYTES, BASE_NONE, NULL, 0,
130 "wlancertextn.SSID", HFILL }},
132 /*--- End of included file: packet-wlancertextn-hfarr.c ---*/
133 #line 64 "packet-wlancertextn-template.c"
136 /* List of subtrees */
137 static gint *ett[] = {
139 /*--- Included file: packet-wlancertextn-ettarr.c ---*/
140 #line 1 "packet-wlancertextn-ettarr.c"
141 &ett_wlancertextn_SSIDList,
143 /*--- End of included file: packet-wlancertextn-ettarr.c ---*/
144 #line 69 "packet-wlancertextn-template.c"
147 /* Register protocol */
148 proto_wlancertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
150 /* Register fields and subtrees */
151 proto_register_field_array(proto_wlancertextn, hf, array_length(hf));
152 proto_register_subtree_array(ett, array_length(ett));
157 /*--- proto_reg_handoff_wlancertextn -------------------------------------------*/
158 void proto_reg_handoff_wlancertextn(void) {
160 /*--- Included file: packet-wlancertextn-dis-tab.c ---*/
161 #line 1 "packet-wlancertextn-dis-tab.c"
162 register_ber_oid_dissector("1.3.6.1.5.5.7.1.13", dissect_SSIDList_PDU, proto_wlancertextn, "id-pe-wlanSSID");
163 register_ber_oid_dissector("1.3.6.1.5.5.7.10.6", dissect_SSIDList_PDU, proto_wlancertextn, "id-aca-wlanSSID");
166 /*--- End of included file: packet-wlancertextn-dis-tab.c ---*/
167 #line 84 "packet-wlancertextn-template.c"
168 oid_add_from_string("id-kp-eapOverPPP","1.3.6.1.5.5.7.3.13");
169 oid_add_from_string("id-kp-eapOverLAN","1.3.6.1.5.5.7.3.14");