1.\" $OpenBSD: ieee80211_crypto.9,v 1.6 2015/11/23 17:53:57 jmc Exp $ 2.\" 3.\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org> 4.\" Copyright (c) 2004 Darron Broad <darron@kewl.org> 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" $FreeBSD: src/share/man/man9/ieee80211_crypto.9,v 1.2 2004/07/07 12:59:39 ru Exp $ 29.\" $Id: ieee80211_crypto.9,v 1.6 2015/11/23 17:53:57 jmc Exp $ 30.\" 31.Dd $Mdocdate: November 23 2015 $ 32.Dt IEEE80211_CRYPTO_ATTACH 9 33.Os 34.Sh NAME 35.Nm ieee80211_crypto_attach , ieee80211_crypto_detach , ieee80211_wep_crypt 36.Nd 802.11 WEP encryption functions 37.Sh SYNOPSIS 38.Ft void 39.Fn ieee80211_crypto_attach "struct ifnet *ifp" 40.Ft void 41.Fn ieee80211_crypto_detach "struct ifnet *ifp" 42.Ft struct mbuf * 43.Fn ieee80211_wep_crypt "struct ifnet *ifp" "struct mbuf *m0" "int txflag" 44.Sh DESCRIPTION 45These functions provide software encryption support 46for 802.11 device drivers. 47.Pp 48.\" 49The 50.Fn ieee80211_crypto_attach 51function initializes crypto support for the interface 52.Fa ifp , 53and sets the initialization vector (IV) for WEP encryption to 54a random number derived from a secure PRNG. 55.Pp 56.\" 57The 58.Fn ieee80211_crypto_detach 59function frees data structures associated with crypto support 60for the interface 61.Fa ifp . 62.Pp 63.\" 64The 65.Fn ieee80211_wep_crypt 66function runs the appropriate WEP encryption algorithm over the 802.11 67encapsulated frame held in the mbuf chain 68.Fa m0 , 69for transmission or reception on the interface 70.Fa ifp . 71The 72.Fa txflag 73argument specifies whether the frame is being received or transmitted. 74A value of 0 indicates that the frame is being received and should 75therefore be decrypted; a non-zero value indicates that the frame 76is being transmitted 77and should be encrypted. 78.\" 79.Sh IMPLEMENTATION NOTES 80The 81.Fn ieee80211_wep_crypt 82function stores its IV in the interface's embedded 83.Vt struct ieee80211com 84instance. 85.Sh SEE ALSO 86.Xr ieee80211 9 87.Sh HISTORY 88The 89.Nm ieee80211 90series of functions first appeared in 91.Nx 1.5 , 92and were later ported to 93.Fx 4.6 94and 95.Ox 3.6 . 96.Sh AUTHORS 97.An -nosplit 98This man page was written by 99.An Bruce M. Simpson Aq Mt bms@FreeBSD.org 100and 101.An Darron Broad Aq Mt darron@kewl.org . 102