xref: /dragonfly/share/man/man9/ieee80211_crypto.9 (revision 6fb88001)
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.\" $DragonFly: src/share/man/man9/ieee80211_crypto.9,v 1.2 2005/08/05 22:35:10 swildner Exp $
29.\" $Id: ieee80211_crypto.9,v 1.2 2004/07/07 12:59:39 ru Exp $
30.\"
31.Dd March 2, 2004
32.Dt IEEE80211_CRYPTO 9
33.Os
34.Sh NAME
35.Nm ieee80211_crypto_attach ,
36.Nm ieee80211_crypto_detach ,
37.Nm ieee80211_wep_crypt
38.Nd 802.11 WEP encryption functions
39.Sh SYNOPSIS
40.Ft void
41.Fn ieee80211_crypto_attach "struct ifnet *ifp"
42.Ft void
43.Fn ieee80211_crypto_detach "struct ifnet *ifp"
44.Ft struct mbuf *
45.Fn ieee80211_wep_crypt "struct ifnet *ifp" "struct mbuf *m0" "int txflag"
46.Sh DESCRIPTION
47These functions provide software encryption support
48for 802.11 device drivers.
49.Pp
50.\"
51The
52.Fn ieee80211_crypto_attach
53function initializes crypto support for the interface
54.Fa ifp ,
55and sets the initialization vector (IV) for WEP encryption to
56a random number derived from a secure PRNG.
57.Pp
58.\"
59The
60.Fn ieee80211_crypto_detach
61function frees data structures associated with crypto support
62for the interface
63.Fa ifp .
64.Pp
65.\"
66The
67.Fn ieee80211_wep_crypt
68function runs the appropriate WEP encryption algorithm over the 802.11
69encapsulated frame held in the mbuf chain
70.Fa m0 ,
71for transmission or reception on the interface
72.Fa ifp .
73The
74.Fa txflag
75argument specifies whether the frame is being received or transmitted.
76A value of 0 indicates that the frame is being received and should
77therefore be decrypted; a non-zero value indicates that the frame
78is being transmitted
79and should be encrypted.
80.\"
81.Sh IMPLEMENTATION NOTES
82The
83.Fn ieee80211_wep_crypt
84function stores its IV in the interface's embedded
85.Vt struct ieee80211com
86instance.
87.Sh SEE ALSO
88.Xr awi 4 ,
89.Xr wi 4 ,
90.Xr arc4random 9 ,
91.Xr ieee80211 9 ,
92.Xr ifnet 9
93.Sh HISTORY
94The
95.Nm ieee80211
96series of functions first appeared in
97.Nx 1.5 ,
98and were later ported to
99.Fx 4.6 .
100.Sh AUTHORS
101.An -nosplit
102This man page was written by
103.An Bruce M. Simpson Aq bms@FreeBSD.org
104and
105.An Darron Broad Aq darron@kewl.org .
106