xref: /netbsd/share/man/man9/ieee80211_output.9 (revision 6550d01e)
1.\" $NetBSD: ieee80211_output.9,v 1.4 2006/09/17 12:15:20 wiz 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_output.9,v 1.2 2004/07/07 12:59:39 ru Exp $
29.\"
30.Dd September 12, 2006
31.Dt IEEE80211_OUTPUT 9
32.Os
33.Sh NAME
34.Nm ieee80211_encap , ieee80211_add_rates ,
35.Nm ieee80211_add_xrates , ieee80211_send_mgmt
36.Nd software 802.11 stack output functions
37.Sh SYNOPSIS
38.In net80211/ieee80211_var.h
39.In net80211/ieee80211_proto.h
40.Ft struct mbuf *
41.Fo ieee80211_encap
42.Fa "struct ieee80211com *ic" "struct mbuf *m" "struct ieee80211_node *ni"
43.Fc
44.Ft u_int8_t *
45.Fn ieee80211_add_rates "u_int8_t *frm" "const struct ieee80211_rateset *rs"
46.Ft u_int8_t *
47.Fn ieee80211_add_xrates "u_int8_t *frm" "const struct ieee80211_rateset *rs"
48.Ft int
49.Fo ieee80211_send_mgmt
50.Fa "struct ieee80211com *ic" "struct ieee80211_node *ni" "int type" "int arg"
51.Fc
52.Sh DESCRIPTION
53These functions handle the encapsulation and transmission of 802.11 frames
54within the software 802.11 stack.
55.Pp
56The
57.Fn ieee80211_encap
58function encapsulates an outbound data frame contained within the
59mbuf chain
60.Fa m
61from the interface
62.Fa ic .
63The argument
64.Fa ni
65is a reference to the destination node.
66.Pp
67If the function is successful, the mbuf chain is updated with the
68802.11 frame header prepended, and a pointer to the head of the chain
69is returned.
70If an error occurs,
71.Dv NULL
72is returned.
73.Pp
74.\"
75The
76.Fn ieee80211_add_rates
77utility function is used to add the rate set element
78.Fa *rs
79to the frame
80.Fa frm .
81A pointer to the location in the buffer after the addition of the rate set
82is returned.
83It is typically used when constructing management frames from within the
84software 802.11 stack.
85.Pp
86.\"
87The
88.Fn ieee80211_add_xrates
89utility function is used to add the extended rate set element
90.Fa *rs
91to the frame
92.Fa frm .
93A pointer to the location in the buffer after the addition of the rate set
94is returned.
95It is typically used when constructing management frames from within the
96software 802.11 stack in 802.11g mode.
97.Pp
98.\"
99The
100.Fn ieee80211_send_mgmt
101function transmits a management frame on the interface
102.Fa ic
103to the destination node
104.Fa ni
105of type
106.Fa type .
107.Pp
108The argument
109.Fa arg
110specifies either a sequence number for authentication operations,
111a status code for [re]association operations,
112or a reason for deauthentication and deassociation operations.
113.Pp
114Nodes other than
115.Va ic_bss
116have their reference count incremented to reflect their use for an
117indeterminate amount of time.
118This reference is freed when the function returns.
119.Pp
120The function returns 0 if successful; if temporary buffer space is not
121available, the function returns
122.Er ENOMEM .
123.\"
124.Sh SEE ALSO
125.Xr ieee80211 9
126.Sh HISTORY
127The
128.Nm ieee80211
129series of functions first appeared in
130.Nx 1.5 ,
131and were later ported to
132.Fx 4.6 .
133.Sh AUTHORS
134.An -nosplit
135This man page was written by
136.An Bruce M. Simpson Aq bms@FreeBSD.org
137and
138.An Darron Broad Aq darron@kewl.org .
139