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