11a1e1d21SSam Leffler /*- 27535e66aSSam Leffler * Copyright (c) 2001 Atsushi Onoe 31a1e1d21SSam Leffler * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 41a1e1d21SSam Leffler * All rights reserved. 51a1e1d21SSam Leffler * 61a1e1d21SSam Leffler * Redistribution and use in source and binary forms, with or without 71a1e1d21SSam Leffler * modification, are permitted provided that the following conditions 81a1e1d21SSam Leffler * are met: 91a1e1d21SSam Leffler * 1. Redistributions of source code must retain the above copyright 101a1e1d21SSam Leffler * notice, this list of conditions and the following disclaimer. 111a1e1d21SSam Leffler * 2. Redistributions in binary form must reproduce the above copyright 121a1e1d21SSam Leffler * notice, this list of conditions and the following disclaimer in the 131a1e1d21SSam Leffler * documentation and/or other materials provided with the distribution. 147535e66aSSam Leffler * 3. The name of the author may not be used to endorse or promote products 157535e66aSSam Leffler * derived from this software without specific prior written permission. 161a1e1d21SSam Leffler * 177535e66aSSam Leffler * Alternatively, this software may be distributed under the terms of the 187535e66aSSam Leffler * GNU General Public License ("GPL") version 2 as published by the Free 197535e66aSSam Leffler * Software Foundation. 207535e66aSSam Leffler * 217535e66aSSam Leffler * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 227535e66aSSam Leffler * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 237535e66aSSam Leffler * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 247535e66aSSam Leffler * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 257535e66aSSam Leffler * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 267535e66aSSam Leffler * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 277535e66aSSam Leffler * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 287535e66aSSam Leffler * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 297535e66aSSam Leffler * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 307535e66aSSam Leffler * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311a1e1d21SSam Leffler * 321a1e1d21SSam Leffler * $FreeBSD$ 331a1e1d21SSam Leffler */ 341a1e1d21SSam Leffler #ifndef _NET80211_IEEE80211_CRYPTO_H_ 351a1e1d21SSam Leffler #define _NET80211_IEEE80211_CRYPTO_H_ 361a1e1d21SSam Leffler 371a1e1d21SSam Leffler /* 381a1e1d21SSam Leffler * 802.11 protocol crypto-related definitions. 391a1e1d21SSam Leffler */ 401a1e1d21SSam Leffler #define IEEE80211_KEYBUF_SIZE 16 411a1e1d21SSam Leffler 421a1e1d21SSam Leffler struct ieee80211_wepkey { 431a1e1d21SSam Leffler int wk_len; 441a1e1d21SSam Leffler u_int8_t wk_key[IEEE80211_KEYBUF_SIZE]; 451a1e1d21SSam Leffler }; 461a1e1d21SSam Leffler 471a1e1d21SSam Leffler extern void ieee80211_crypto_attach(struct ifnet *); 481a1e1d21SSam Leffler extern void ieee80211_crypto_detach(struct ifnet *); 491a1e1d21SSam Leffler extern struct mbuf *ieee80211_wep_crypt(struct ifnet *, struct mbuf *, int); 501a1e1d21SSam Leffler #endif /* _NET80211_IEEE80211_CRYPTO_H_ */ 51