Home | History | Annotate | Line # | Download | only in net80211
ieee80211_xauth.c revision 1.3.6.2
      1  1.3.6.2  skrll /*-
      2  1.3.6.2  skrll  * Copyright (c) 2004 Video54 Technologies, Inc.
      3  1.3.6.2  skrll  * Copyright (c) 2004-2005 Sam Leffler, Errno Consulting
      4  1.3.6.2  skrll  * All rights reserved.
      5  1.3.6.2  skrll  *
      6  1.3.6.2  skrll  * Redistribution and use in source and binary forms, with or without
      7  1.3.6.2  skrll  * modification, are permitted provided that the following conditions
      8  1.3.6.2  skrll  * are met:
      9  1.3.6.2  skrll  * 1. Redistributions of source code must retain the above copyright
     10  1.3.6.2  skrll  *    notice, this list of conditions and the following disclaimer.
     11  1.3.6.2  skrll  * 2. Redistributions in binary form must reproduce the above copyright
     12  1.3.6.2  skrll  *    notice, this list of conditions and the following disclaimer in the
     13  1.3.6.2  skrll  *    documentation and/or other materials provided with the distribution.
     14  1.3.6.2  skrll  * 3. The name of the author may not be used to endorse or promote products
     15  1.3.6.2  skrll  *    derived from this software without specific prior written permission.
     16  1.3.6.2  skrll  *
     17  1.3.6.2  skrll  * Alternatively, this software may be distributed under the terms of the
     18  1.3.6.2  skrll  * GNU General Public License ("GPL") version 2 as published by the Free
     19  1.3.6.2  skrll  * Software Foundation.
     20  1.3.6.2  skrll  *
     21  1.3.6.2  skrll  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     22  1.3.6.2  skrll  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     23  1.3.6.2  skrll  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     24  1.3.6.2  skrll  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     25  1.3.6.2  skrll  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     26  1.3.6.2  skrll  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27  1.3.6.2  skrll  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28  1.3.6.2  skrll  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29  1.3.6.2  skrll  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     30  1.3.6.2  skrll  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  1.3.6.2  skrll  */
     32  1.3.6.2  skrll 
     33  1.3.6.2  skrll #include <sys/cdefs.h>
     34  1.3.6.2  skrll #ifdef __FreeBSD__
     35  1.3.6.2  skrll __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_xauth.c,v 1.2 2004/12/31 22:42:38 sam Exp $");
     36  1.3.6.2  skrll #endif
     37  1.3.6.2  skrll #ifdef __NetBSD__
     38  1.3.6.2  skrll __KERNEL_RCSID(0, "$NetBSD: ieee80211_xauth.c,v 1.3.6.2 2005/11/10 14:10:51 skrll Exp $");
     39  1.3.6.2  skrll #endif
     40  1.3.6.2  skrll 
     41  1.3.6.2  skrll /*
     42  1.3.6.2  skrll  * External authenticator placeholder module.
     43  1.3.6.2  skrll  *
     44  1.3.6.2  skrll  * This support is optional; it is only used when the 802.11 layer's
     45  1.3.6.2  skrll  * authentication mode is set to use 802.1x or WPA is enabled separately
     46  1.3.6.2  skrll  * (for WPA-PSK).  If compiled as a module this code does not need
     47  1.3.6.2  skrll  * to be present unless 802.1x/WPA is in use.
     48  1.3.6.2  skrll  *
     49  1.3.6.2  skrll  * The authenticator hooks into the 802.11 layer.  At present we use none
     50  1.3.6.2  skrll  * of the available callbacks--the user mode authenticator process works
     51  1.3.6.2  skrll  * entirely from messages about stations joining and leaving.
     52  1.3.6.2  skrll  */
     53  1.3.6.2  skrll #include <sys/param.h>
     54  1.3.6.2  skrll #include <sys/kernel.h>
     55  1.3.6.2  skrll #include <sys/systm.h>
     56  1.3.6.2  skrll #include <sys/mbuf.h>
     57  1.3.6.2  skrll 
     58  1.3.6.2  skrll #include <sys/socket.h>
     59  1.3.6.2  skrll 
     60  1.3.6.2  skrll #include <net/if.h>
     61  1.3.6.2  skrll #include <net/if_media.h>
     62  1.3.6.2  skrll #include <net/if_ether.h>
     63  1.3.6.2  skrll #include <net/route.h>
     64  1.3.6.2  skrll 
     65  1.3.6.2  skrll #include <net80211/ieee80211_var.h>
     66  1.3.6.2  skrll 
     67  1.3.6.2  skrll /*
     68  1.3.6.2  skrll  * One module handles everything for now.  May want
     69  1.3.6.2  skrll  * to split things up for embedded applications.
     70  1.3.6.2  skrll  */
     71  1.3.6.2  skrll static const struct ieee80211_authenticator xauth = {
     72  1.3.6.2  skrll 	.ia_name	= "external",
     73  1.3.6.2  skrll 	.ia_attach	= NULL,
     74  1.3.6.2  skrll 	.ia_detach	= NULL,
     75  1.3.6.2  skrll 	.ia_node_join	= NULL,
     76  1.3.6.2  skrll 	.ia_node_leave	= NULL,
     77  1.3.6.2  skrll };
     78