diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-07-16 01:04:36 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-07-16 01:04:36 +0000 |
commit | ee55c8a608d5ac803b0dd700d1ca80a32056da28 (patch) | |
tree | 78ec7a6c9cacbad396a204a63c431dce97d5db4d /asn1 | |
parent | aef7edb1d10de3f1482e31e2ec12d1906a545277 (diff) | |
download | wireshark-ee55c8a608d5ac803b0dd700d1ca80a32056da28.tar.gz wireshark-ee55c8a608d5ac803b0dd700d1ca80a32056da28.tar.bz2 wireshark-ee55c8a608d5ac803b0dd700d1ca80a32056da28.zip |
new protocol
RFC3770 Wlan Certificate Extensions
svn path=/trunk/; revision=14935
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/wlancertextn/Makefile | 16 | ||||
-rw-r--r-- | asn1/wlancertextn/Makefile.nmake | 41 | ||||
-rw-r--r-- | asn1/wlancertextn/WLANCERTEXTN.asn | 93 | ||||
-rw-r--r-- | asn1/wlancertextn/packet-wlancertextn-template.c | 86 | ||||
-rw-r--r-- | asn1/wlancertextn/packet-wlancertextn-template.h | 32 | ||||
-rw-r--r-- | asn1/wlancertextn/wlancertextn.cnf | 23 |
6 files changed, 291 insertions, 0 deletions
diff --git a/asn1/wlancertextn/Makefile b/asn1/wlancertextn/Makefile new file mode 100644 index 0000000000..e51e9730dd --- /dev/null +++ b/asn1/wlancertextn/Makefile @@ -0,0 +1,16 @@ +# $Id: Makefile 13071 2005-01-16 10:19:21Z guy $ + +DISSECTOR_FILES=packet-wlancertextn.c packet-wlancertextn.h + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +$(DISSECTOR_FILES): ../../tools/asn2eth.py WLANCERTEXTN.asn packet-wlancertextn-template.c packet-wlancertextn-template.h wlancertextn.cnf + python ../../tools/asn2eth.py -X -b -e -p wlancertextn -c wlancertextn.cnf -s packet-wlancertextn-template WLANCERTEXTN.asn + +clean: + rm -f parsetab.py $(DISSECTOR_FILES) + +copy_files: generate_dissector + cp $(DISSECTOR_FILES) ../../epan/dissectors diff --git a/asn1/wlancertextn/Makefile.nmake b/asn1/wlancertextn/Makefile.nmake new file mode 100644 index 0000000000..88c348999b --- /dev/null +++ b/asn1/wlancertextn/Makefile.nmake @@ -0,0 +1,41 @@ +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake 13077 2005-01-16 23:26:02Z lroland $ + +include ../../config.nmake + +UNIX2DOS=$(PERL) ../../tools/unix2dos.pl + +PROTOCOL_NAME=wlancertextn +DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +$(DISSECTOR_FILES): ../../tools/asn2eth.py WLANCERTEXTN.asn packet-wlancertextn-template.c packet-wlancertextn-template.h wlancertextn.cnf +!IFDEF PYTHON + $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c wlancertextn.cnf -s packet-wlancertextn-template WLANCERTEXTN.asn +!ELSE + @echo Error: You need Python to use asn2eth.py + @exit 1 +!ENDIF + +clean: + rm -f parsetab.py $(DISSECTOR_FILES) + +# Fix EOL in generated dissectors. Cygwin's python generates files with +# mixed EOL styles, which can't be commited to the SVN repository. +# Stuff included from template and "cnf" files has "\r\n" on windows, while +# the generated stuff has "\n". + +fix_eol: generate_dissector + move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp + move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp + $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c + $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h + del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp + +copy_files: generate_dissector fix_eol + xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y + xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y diff --git a/asn1/wlancertextn/WLANCERTEXTN.asn b/asn1/wlancertextn/WLANCERTEXTN.asn new file mode 100644 index 0000000000..52bda2c963 --- /dev/null +++ b/asn1/wlancertextn/WLANCERTEXTN.asn @@ -0,0 +1,93 @@ +-- ASN definitions taken from RFC3770 +-- Copyright notice from RFC3770 follows below +-- +-- RFC 3770 PPP and WLAN May 2004 +-- +-- 10. Full Copyright Statement +-- +-- Copyright (C) The Internet Society (2004). This document is subject +-- to the rights, licenses and restrictions contained in BCP 78, and +-- except as set forth therein, the authors retain all their rights. +-- +-- This document and the information contained herein are provided on an +-- "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS +-- OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET +-- ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE +-- INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED +-- WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +-- +-- Intellectual Property +-- +-- The IETF takes no position regarding the validity or scope of any +-- Intellectual Property Rights or other rights that might be claimed to +-- pertain to the implementation or use of the technology described in +-- this document or the extent to which any license under such rights +-- might or might not be available; nor does it represent that it has +-- made any independent effort to identify any such rights. Information +-- on the procedures with respect to rights in RFC documents can be +-- found in BCP 78 and BCP 79. +-- +-- Copies of IPR disclosures made to the IETF Secretariat and any +-- assurances of licenses to be made available, or the result of an +-- attempt made to obtain a general license or permission for the use of +-- such proprietary rights by implementers or users of this +-- specification can be obtained from the IETF on-line IPR repository at +-- http://www.ietf.org/ipr. +-- +-- The IETF invites any interested party to bring to its attention any +-- copyrights, patents or patent applications, or other proprietary +-- rights that may cover technology that may be required to implement +-- this standard. Please address the information to the IETF at ietf- +-- ipr@ietf.org. +-- +-- Acknowledgement +-- +-- Funding for the RFC Editor function is currently provided by the +-- Internet Society. +-- + + + WLANCertExtn + { iso(1) identified-organization(3) dod(6) internet(1) + security(5) mechanisms(5) pkix(7) id-mod(0) + id-mod-wlan-extns(24) } + + DEFINITIONS IMPLICIT TAGS ::= + BEGIN + + -- OID Arcs + + id-pe OBJECT IDENTIFIER ::= + { iso(1) identified-organization(3) dod(6) internet(1) + security(5) mechanisms(5) pkix(7) 1 } + + id-kp OBJECT IDENTIFIER ::= + { iso(1) identified-organization(3) dod(6) internet(1) + security(5) mechanisms(5) pkix(7) 3 } + + id-aca OBJECT IDENTIFIER ::= + { iso(1) identified-organization(3) dod(6) internet(1) + security(5) mechanisms(5) pkix(7) 10 } + + -- Extended Key Usage Values + + id-kp-eapOverPPP OBJECT IDENTIFIER ::= { id-kp 13 } + + id-kp-eapOverLAN OBJECT IDENTIFIER ::= { id-kp 14 } + + + -- Wireless LAN SSID Extension + + id-pe-wlanSSID OBJECT IDENTIFIER ::= { id-pe 13 } + + SSIDList ::= SEQUENCE SIZE (1..MAX) OF SSID + + SSID ::= OCTET STRING (SIZE (1..32)) + + -- Wireless LAN SSID Attribute Certificate Attribute + -- Uses same syntax as the certificate extension: SSIDList + + id-aca-wlanSSID OBJECT IDENTIFIER ::= { id-aca 6 } + + END diff --git a/asn1/wlancertextn/packet-wlancertextn-template.c b/asn1/wlancertextn/packet-wlancertextn-template.c new file mode 100644 index 0000000000..3dcd04b0e5 --- /dev/null +++ b/asn1/wlancertextn/packet-wlancertextn-template.c @@ -0,0 +1,86 @@ +/* packet-wlancertextn.c + * Routines for Wireless Certificate Extension (RFC3770) + * Ronnie Sahlberg 2005 + * + * $Id: packet-wlancertextn-template.c 12434 2004-10-29 12:11:42Z sahlberg $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * 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> +#include <epan/conversation.h> + +#include <stdio.h> +#include <string.h> + +#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 */ +int proto_wlancertextn = -1; +#include "packet-wlancertextn-hf.c" + +/* Initialize the subtree pointers */ +#include "packet-wlancertextn-ett.c" + +#include "packet-wlancertextn-fn.c" + + +/*--- proto_register_wlancertextn ----------------------------------------------*/ +void proto_register_wlancertextn(void) { + + /* List of fields */ + static hf_register_info hf[] = { +#include "packet-wlancertextn-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { +#include "packet-wlancertextn-ettarr.c" + }; + + /* 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) { +#include "packet-wlancertextn-dis-tab.c" + register_ber_oid_name("1.3.6.1.5.5.7.3.13","id-kp-eapOverPPP"); + register_ber_oid_name("1.3.6.1.5.5.7.3.14","id-kp-eapOverLAN"); +} + diff --git a/asn1/wlancertextn/packet-wlancertextn-template.h b/asn1/wlancertextn/packet-wlancertextn-template.h new file mode 100644 index 0000000000..8cfb3c4342 --- /dev/null +++ b/asn1/wlancertextn/packet-wlancertextn-template.h @@ -0,0 +1,32 @@ +/* packet-wlancertextn.h + * Routines for Wireless Certificate Extensions (RFC3770) packet dissection + * Ronnie Sahlberg 2005 + * + * $Id: packet-wlancertextn-template.h 12573 2004-11-22 03:36:26Z sahlberg $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * 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. + */ + +#ifndef PACKET_WLANCERTEXTN_H +#define PACKET_WLANCERTEXTN_H + +/*#include "packet-wlancertextn-exp.h"*/ + +#endif /* PACKET_WLANCERTEXTN_H */ + diff --git a/asn1/wlancertextn/wlancertextn.cnf b/asn1/wlancertextn/wlancertextn.cnf new file mode 100644 index 0000000000..d89c0849a0 --- /dev/null +++ b/asn1/wlancertextn/wlancertextn.cnf @@ -0,0 +1,23 @@ +# WlanCertExtn.cnf +# WlanCertExtn conformation file + +# $Id: WlanCertExtn.cnf 12434 2004-10-29 12:11:42Z sahlberg $ + +#.MODULE_IMPORT + +#.EXPORTS + +#.REGISTER + +SSIDList B "1.3.6.1.5.5.7.1.13" "id-pe-wlanSSID" +SSIDList B "1.3.6.1.5.5.7.10.6" "id-aca-wlanSSID" + +#.NO_EMIT + +#.TYPE_RENAME + +#.FIELD_RENAME + +#.END + + |