2005-07-16 01:04:36 +00:00
|
|
|
/* Do not modify this file. */
|
2006-05-24 12:24:54 +00:00
|
|
|
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
|
2007-10-31 21:24:16 +00:00
|
|
|
/* packet-wlancertextn.c */
|
2009-05-16 22:07:03 +00:00
|
|
|
/* ../../tools/asn2wrs.py -b -p wlancertextn -c ./wlancertextn.cnf -s ./packet-wlancertextn-template -D . WLANCERTEXTN.asn */
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
/* Input file: packet-wlancertextn-template.c */
|
|
|
|
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-template.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
/* packet-wlancertextn.c
|
|
|
|
* Routines for Wireless Certificate Extension (RFC3770)
|
|
|
|
* Ronnie Sahlberg 2005
|
|
|
|
*
|
2005-08-02 05:39:45 +00:00
|
|
|
* $Id$
|
2005-07-16 01:04:36 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-07-16 01:04:36 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <epan/packet.h>
|
2007-08-25 01:14:24 +00:00
|
|
|
#include <epan/oids.h>
|
2007-05-13 20:58:29 +00:00
|
|
|
#include <epan/asn1.h>
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
#include "packet-ber.h"
|
|
|
|
#include "packet-wlancertextn.h"
|
|
|
|
#include "packet-x509af.h"
|
|
|
|
#include "packet-x509ce.h"
|
|
|
|
#include "packet-x509sat.h"
|
|
|
|
|
|
|
|
#define PNAME "Wlan Certificate Extension"
|
|
|
|
#define PSNAME "WLANCERTEXTN"
|
|
|
|
#define PFNAME "wlancertextn"
|
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
2009-10-11 16:24:29 +00:00
|
|
|
static int proto_wlancertextn = -1;
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
/*--- Included file: packet-wlancertextn-hf.c ---*/
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-hf.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
static int hf_wlancertextn_SSIDList_PDU = -1; /* SSIDList */
|
|
|
|
static int hf_wlancertextn_SSIDList_item = -1; /* SSID */
|
|
|
|
|
|
|
|
/*--- End of included file: packet-wlancertextn-hf.c ---*/
|
2010-04-07 16:54:29 +00:00
|
|
|
#line 48 "packet-wlancertextn-template.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
|
|
|
|
/*--- Included file: packet-wlancertextn-ett.c ---*/
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-ett.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
static gint ett_wlancertextn_SSIDList = -1;
|
|
|
|
|
|
|
|
/*--- End of included file: packet-wlancertextn-ett.c ---*/
|
2010-04-07 16:54:29 +00:00
|
|
|
#line 51 "packet-wlancertextn-template.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*--- Included file: packet-wlancertextn-fn.c ---*/
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-fn.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
static int
|
2007-05-13 20:58:29 +00:00
|
|
|
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_) {
|
2007-05-15 05:49:43 +00:00
|
|
|
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
|
2005-07-16 01:04:36 +00:00
|
|
|
NULL);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2005-09-02 05:43:49 +00:00
|
|
|
|
2007-11-04 22:18:59 +00:00
|
|
|
static const ber_sequence_t SSIDList_sequence_of[1] = {
|
|
|
|
{ &hf_wlancertextn_SSIDList_item, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_wlancertextn_SSID },
|
2005-07-16 01:04:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static int
|
2007-05-13 20:58:29 +00:00
|
|
|
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_) {
|
2007-11-04 22:18:59 +00:00
|
|
|
offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
|
|
|
|
SSIDList_sequence_of, hf_index, ett_wlancertextn_SSIDList);
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--- PDUs ---*/
|
|
|
|
|
2007-03-21 10:22:22 +00:00
|
|
|
static void dissect_SSIDList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
|
2007-05-13 20:58:29 +00:00
|
|
|
asn1_ctx_t asn1_ctx;
|
|
|
|
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
|
|
|
dissect_wlancertextn_SSIDList(FALSE, tvb, 0, &asn1_ctx, tree, hf_wlancertextn_SSIDList_PDU);
|
2005-07-16 01:04:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--- End of included file: packet-wlancertextn-fn.c ---*/
|
2010-04-07 16:54:29 +00:00
|
|
|
#line 53 "packet-wlancertextn-template.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*--- proto_register_wlancertextn ----------------------------------------------*/
|
|
|
|
void proto_register_wlancertextn(void) {
|
|
|
|
|
|
|
|
/* List of fields */
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
|
|
|
|
/*--- Included file: packet-wlancertextn-hfarr.c ---*/
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-hfarr.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
{ &hf_wlancertextn_SSIDList_PDU,
|
|
|
|
{ "SSIDList", "wlancertextn.SSIDList",
|
2005-09-02 05:43:49 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
2006-08-16 05:58:39 +00:00
|
|
|
"wlancertextn.SSIDList", HFILL }},
|
2005-07-16 01:04:36 +00:00
|
|
|
{ &hf_wlancertextn_SSIDList_item,
|
2009-05-16 22:07:03 +00:00
|
|
|
{ "SSID", "wlancertextn.SSID",
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
2006-08-16 05:58:39 +00:00
|
|
|
"wlancertextn.SSID", HFILL }},
|
2005-07-16 01:04:36 +00:00
|
|
|
|
|
|
|
/*--- End of included file: packet-wlancertextn-hfarr.c ---*/
|
2010-04-07 16:54:29 +00:00
|
|
|
#line 61 "packet-wlancertextn-template.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* List of subtrees */
|
|
|
|
static gint *ett[] = {
|
|
|
|
|
|
|
|
/*--- Included file: packet-wlancertextn-ettarr.c ---*/
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-ettarr.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
&ett_wlancertextn_SSIDList,
|
|
|
|
|
|
|
|
/*--- End of included file: packet-wlancertextn-ettarr.c ---*/
|
2010-04-07 16:54:29 +00:00
|
|
|
#line 66 "packet-wlancertextn-template.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Register protocol */
|
|
|
|
proto_wlancertextn = proto_register_protocol(PNAME, PSNAME, PFNAME);
|
|
|
|
|
|
|
|
/* Register fields and subtrees */
|
|
|
|
proto_register_field_array(proto_wlancertextn, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--- proto_reg_handoff_wlancertextn -------------------------------------------*/
|
|
|
|
void proto_reg_handoff_wlancertextn(void) {
|
|
|
|
|
|
|
|
/*--- Included file: packet-wlancertextn-dis-tab.c ---*/
|
2005-12-08 23:29:21 +00:00
|
|
|
#line 1 "packet-wlancertextn-dis-tab.c"
|
2005-07-16 01:04:36 +00:00
|
|
|
register_ber_oid_dissector("1.3.6.1.5.5.7.1.13", dissect_SSIDList_PDU, proto_wlancertextn, "id-pe-wlanSSID");
|
|
|
|
register_ber_oid_dissector("1.3.6.1.5.5.7.10.6", dissect_SSIDList_PDU, proto_wlancertextn, "id-aca-wlanSSID");
|
|
|
|
|
|
|
|
|
|
|
|
/*--- End of included file: packet-wlancertextn-dis-tab.c ---*/
|
2010-04-07 16:54:29 +00:00
|
|
|
#line 81 "packet-wlancertextn-template.c"
|
2007-10-31 21:24:16 +00:00
|
|
|
oid_add_from_string("id-kp-eapOverPPP","1.3.6.1.5.5.7.3.13");
|
|
|
|
oid_add_from_string("id-kp-eapOverLAN","1.3.6.1.5.5.7.3.14");
|
2005-07-16 01:04:36 +00:00
|
|
|
}
|
|
|
|
|