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>
43 #include "packet-ber.h"
44 #include "packet-wlancertextn.h"
45 #include "packet-x509af.h"
46 #include "packet-x509ce.h"
47 #include "packet-x509sat.h"
49 #define PNAME "Wlan Certificate Extension"
50 #define PSNAME "WLANCERTEXTN"
51 #define PFNAME "wlancertextn"
53 /* Initialize the protocol and registered fields */
54 static int proto_wlancertextn = -1;
56 /*--- Included file: packet-wlancertextn-hf.c ---*/
57 #line 1 "packet-wlancertextn-hf.c"
58 static int hf_wlancertextn_SSIDList_PDU = -1; /* SSIDList */
59 static int hf_wlancertextn_SSIDList_item = -1; /* SSID */
61 /*--- End of included file: packet-wlancertextn-hf.c ---*/
62 #line 48 "packet-wlancertextn-template.c"
64 /* Initialize the subtree pointers */
66 /*--- Included file: packet-wlancertextn-ett.c ---*/
67 #line 1 "packet-wlancertextn-ett.c"
68 static gint ett_wlancertextn_SSIDList = -1;
70 /*--- End of included file: packet-wlancertextn-ett.c ---*/
71 #line 51 "packet-wlancertextn-template.c"
74 /*--- Included file: packet-wlancertextn-fn.c ---*/
75 #line 1 "packet-wlancertextn-fn.c"
79 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_) {
80 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
87 static const ber_sequence_t SSIDList_sequence_of[1] = {
88 { &hf_wlancertextn_SSIDList_item, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_wlancertextn_SSID },
92 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_) {
93 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
94 SSIDList_sequence_of, hf_index, ett_wlancertextn_SSIDList);
101 static void dissect_SSIDList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
103 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
104 dissect_wlancertextn_SSIDList(FALSE, tvb, 0, &asn1_ctx, tree, hf_wlancertextn_SSIDList_PDU);
108 /*--- End of included file: packet-wlancertextn-fn.c ---*/
109 #line 53 "packet-wlancertextn-template.c"
112 /*--- proto_register_wlancertextn ----------------------------------------------*/
113 void proto_register_wlancertextn(void) {
116 static hf_register_info hf[] = {
118 /*--- Included file: packet-wlancertextn-hfarr.c ---*/
119 #line 1 "packet-wlancertextn-hfarr.c"
120 { &hf_wlancertextn_SSIDList_PDU,
121 { "SSIDList", "wlancertextn.SSIDList",
122 FT_UINT32, BASE_DEC, NULL, 0,
123 "wlancertextn.SSIDList", HFILL }},
124 { &hf_wlancertextn_SSIDList_item,
125 { "SSID", "wlancertextn.SSID",
126 FT_BYTES, BASE_NONE, NULL, 0,
127 "wlancertextn.SSID", HFILL }},
129 /*--- End of included file: packet-wlancertextn-hfarr.c ---*/
130 #line 61 "packet-wlancertextn-template.c"
133 /* List of subtrees */
134 static gint *ett[] = {
136 /*--- Included file: packet-wlancertextn-ettarr.c ---*/
137 #line 1 "packet-wlancertextn-ettarr.c"
138 &ett_wlancertextn_SSIDList,
140 /*--- End of included file: packet-wlancertextn-ettarr.c ---*/
141 #line 66 "packet-wlancertextn-template.c"
144 /* Register protocol */
145 proto_wlancertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
147 /* Register fields and subtrees */
148 proto_register_field_array(proto_wlancertextn, hf, array_length(hf));
149 proto_register_subtree_array(ett, array_length(ett));
154 /*--- proto_reg_handoff_wlancertextn -------------------------------------------*/
155 void proto_reg_handoff_wlancertextn(void) {
157 /*--- Included file: packet-wlancertextn-dis-tab.c ---*/
158 #line 1 "packet-wlancertextn-dis-tab.c"
159 register_ber_oid_dissector("1.3.6.1.5.5.7.1.13", dissect_SSIDList_PDU, proto_wlancertextn, "id-pe-wlanSSID");
160 register_ber_oid_dissector("1.3.6.1.5.5.7.10.6", dissect_SSIDList_PDU, proto_wlancertextn, "id-aca-wlanSSID");
163 /*--- End of included file: packet-wlancertextn-dis-tab.c ---*/
164 #line 81 "packet-wlancertextn-template.c"
165 oid_add_from_string("id-kp-eapOverPPP","1.3.6.1.5.5.7.3.13");
166 oid_add_from_string("id-kp-eapOverLAN","1.3.6.1.5.5.7.3.14");