xref: /freebsd/sys/net80211/ieee80211_crypto.h (revision 1a1e1d21577c0db8e20222539c3d665ae9224c1b)
11a1e1d21SSam Leffler /*-
21a1e1d21SSam Leffler  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
31a1e1d21SSam Leffler  * All rights reserved.
41a1e1d21SSam Leffler  *
51a1e1d21SSam Leffler  * Redistribution and use in source and binary forms, with or without
61a1e1d21SSam Leffler  * modification, are permitted provided that the following conditions
71a1e1d21SSam Leffler  * are met:
81a1e1d21SSam Leffler  * 1. Redistributions of source code must retain the above copyright
91a1e1d21SSam Leffler  *    notice, this list of conditions and the following disclaimer.
101a1e1d21SSam Leffler  * 2. Redistributions in binary form must reproduce the above copyright
111a1e1d21SSam Leffler  *    notice, this list of conditions and the following disclaimer in the
121a1e1d21SSam Leffler  *    documentation and/or other materials provided with the distribution.
131a1e1d21SSam Leffler  *
141a1e1d21SSam Leffler  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
151a1e1d21SSam Leffler  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
161a1e1d21SSam Leffler  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
171a1e1d21SSam Leffler  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
181a1e1d21SSam Leffler  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
191a1e1d21SSam Leffler  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
201a1e1d21SSam Leffler  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
211a1e1d21SSam Leffler  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
221a1e1d21SSam Leffler  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
231a1e1d21SSam Leffler  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
241a1e1d21SSam Leffler  * SUCH DAMAGE.
251a1e1d21SSam Leffler  *
261a1e1d21SSam Leffler  * $FreeBSD$
271a1e1d21SSam Leffler  */
281a1e1d21SSam Leffler #ifndef _NET80211_IEEE80211_CRYPTO_H_
291a1e1d21SSam Leffler #define _NET80211_IEEE80211_CRYPTO_H_
301a1e1d21SSam Leffler 
311a1e1d21SSam Leffler /*
321a1e1d21SSam Leffler  * 802.11 protocol crypto-related definitions.
331a1e1d21SSam Leffler  */
341a1e1d21SSam Leffler #define	IEEE80211_KEYBUF_SIZE	16
351a1e1d21SSam Leffler 
361a1e1d21SSam Leffler struct ieee80211_wepkey {
371a1e1d21SSam Leffler 	int			wk_len;
381a1e1d21SSam Leffler 	u_int8_t		wk_key[IEEE80211_KEYBUF_SIZE];
391a1e1d21SSam Leffler };
401a1e1d21SSam Leffler 
411a1e1d21SSam Leffler extern	void ieee80211_crypto_attach(struct ifnet *);
421a1e1d21SSam Leffler extern	void ieee80211_crypto_detach(struct ifnet *);
431a1e1d21SSam Leffler extern	struct mbuf *ieee80211_wep_crypt(struct ifnet *, struct mbuf *, int);
441a1e1d21SSam Leffler #endif /* _NET80211_IEEE80211_CRYPTO_H_ */
45