1*ff66a890SHiten Pandya.\" 2*ff66a890SHiten Pandya.\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org> 3*ff66a890SHiten Pandya.\" Copyright (c) 2004 Darron Broad <darron@kewl.org> 4*ff66a890SHiten Pandya.\" All rights reserved. 5*ff66a890SHiten Pandya.\" 6*ff66a890SHiten Pandya.\" Redistribution and use in source and binary forms, with or without 7*ff66a890SHiten Pandya.\" modification, are permitted provided that the following conditions 8*ff66a890SHiten Pandya.\" are met: 9*ff66a890SHiten Pandya.\" 1. Redistributions of source code must retain the above copyright 10*ff66a890SHiten Pandya.\" notice, this list of conditions and the following disclaimer. 11*ff66a890SHiten Pandya.\" 2. Redistributions in binary form must reproduce the above copyright 12*ff66a890SHiten Pandya.\" notice, this list of conditions and the following disclaimer in the 13*ff66a890SHiten Pandya.\" documentation and/or other materials provided with the distribution. 14*ff66a890SHiten Pandya.\" 15*ff66a890SHiten Pandya.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16*ff66a890SHiten Pandya.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*ff66a890SHiten Pandya.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*ff66a890SHiten Pandya.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*ff66a890SHiten Pandya.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*ff66a890SHiten Pandya.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21*ff66a890SHiten Pandya.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*ff66a890SHiten Pandya.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*ff66a890SHiten Pandya.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*ff66a890SHiten Pandya.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*ff66a890SHiten Pandya.\" SUCH DAMAGE. 26*ff66a890SHiten Pandya.\" 27*ff66a890SHiten Pandya.\" $FreeBSD$ 28*ff66a890SHiten Pandya.\" $DragonFly: src/share/man/man9/ieee80211_output.9,v 1.1 2004/07/27 14:50:56 hmp Exp $ 29*ff66a890SHiten Pandya.\" $Id: ieee80211_output.9,v 1.2 2004/07/07 12:59:39 ru Exp $ 30*ff66a890SHiten Pandya.\" 31*ff66a890SHiten Pandya.Dd March 2, 2004 32*ff66a890SHiten Pandya.Dt IEEE80211_OUTPUT 9 33*ff66a890SHiten Pandya.Os 34*ff66a890SHiten Pandya.Sh NAME 35*ff66a890SHiten Pandya.Nm ieee80211_encap , ieee80211_add_rates , 36*ff66a890SHiten Pandya.Nm ieee80211_add_xrates , ieee80211_send_mgmt 37*ff66a890SHiten Pandya.Nd software 802.11 stack output functions 38*ff66a890SHiten Pandya.Sh SYNOPSIS 39*ff66a890SHiten Pandya.In net80211/ieee80211_var.h 40*ff66a890SHiten Pandya.In net80211/ieee80211_proto.h 41*ff66a890SHiten Pandya.Ft struct mbuf * 42*ff66a890SHiten Pandya.Fo ieee80211_encap 43*ff66a890SHiten Pandya.Fa "struct ifnet *ifp" "struct mbuf *m" "struct ieee80211_node **pni" 44*ff66a890SHiten Pandya.Fc 45*ff66a890SHiten Pandya.Ft u_int8_t * 46*ff66a890SHiten Pandya.Fn ieee80211_add_rates "u_int8_t *frm" "const struct ieee80211_rateset *rs" 47*ff66a890SHiten Pandya.Ft u_int8_t * 48*ff66a890SHiten Pandya.Fn ieee80211_add_xrates "u_int8_t *frm" "const struct ieee80211_rateset *rs" 49*ff66a890SHiten Pandya.Ft int 50*ff66a890SHiten Pandya.Fo ieee80211_send_mgmt 51*ff66a890SHiten Pandya.Fa "struct ieee80211com *ic" "struct ieee80211_node *ni" "int type" "int arg" 52*ff66a890SHiten Pandya.Fc 53*ff66a890SHiten Pandya.Sh DESCRIPTION 54*ff66a890SHiten PandyaThese functions handle the encapsulation and transmission of 802.11 frames 55*ff66a890SHiten Pandyawithin the software 802.11 stack. 56*ff66a890SHiten Pandya.Pp 57*ff66a890SHiten PandyaThe 58*ff66a890SHiten Pandya.Fn ieee80211_encap 59*ff66a890SHiten Pandyafunction encapsulates an outbound data frame contained within the 60*ff66a890SHiten Pandyambuf chain 61*ff66a890SHiten Pandya.Fa m 62*ff66a890SHiten Pandyafrom the interface 63*ff66a890SHiten Pandya.Fa ifp . 64*ff66a890SHiten PandyaThe argument 65*ff66a890SHiten Pandya.Fa *pni 66*ff66a890SHiten Pandyais a reference to the destination node. 67*ff66a890SHiten Pandya.Pp 68*ff66a890SHiten PandyaIf the function is successful, the mbuf chain is updated with the 69*ff66a890SHiten Pandya802.11 frame header prepended, and a pointer to the head of the chain 70*ff66a890SHiten Pandyais returned. 71*ff66a890SHiten PandyaIf an error occurs, 72*ff66a890SHiten Pandya.Dv NULL 73*ff66a890SHiten Pandyawill be returned, and 74*ff66a890SHiten Pandya.Fa *pni 75*ff66a890SHiten Pandyais also set to 76*ff66a890SHiten Pandya.Dv NULL . 77*ff66a890SHiten PandyaThe caller is responsible for freeing the node reference if 78*ff66a890SHiten Pandya.Fa *pni 79*ff66a890SHiten Pandyais 80*ff66a890SHiten Pandya.Pf non- Dv NULL 81*ff66a890SHiten Pandyaon return. 82*ff66a890SHiten PandyaThe convention is that 83*ff66a890SHiten Pandya.Va ic_bss 84*ff66a890SHiten Pandyais not reference counted; the caller is responsible for maintaining this 85*ff66a890SHiten Pandyareference count. 86*ff66a890SHiten Pandya.Pp 87*ff66a890SHiten Pandya.\" 88*ff66a890SHiten PandyaThe 89*ff66a890SHiten Pandya.Fn ieee80211_add_rates 90*ff66a890SHiten Pandyautility function is used to add the rate set element 91*ff66a890SHiten Pandya.Fa *rs 92*ff66a890SHiten Pandyato the frame 93*ff66a890SHiten Pandya.Fa frm . 94*ff66a890SHiten PandyaA pointer to the location in the buffer after the addition of the rate set 95*ff66a890SHiten Pandyais returned. 96*ff66a890SHiten PandyaIt is typically used when constructing management frames from within the 97*ff66a890SHiten Pandyasoftware 802.11 stack. 98*ff66a890SHiten Pandya.Pp 99*ff66a890SHiten Pandya.\" 100*ff66a890SHiten PandyaThe 101*ff66a890SHiten Pandya.Fn ieee80211_add_xrates 102*ff66a890SHiten Pandyautility function is used to add the extended rate set element 103*ff66a890SHiten Pandya.Fa *rs 104*ff66a890SHiten Pandyato the frame 105*ff66a890SHiten Pandya.Fa frm . 106*ff66a890SHiten PandyaA pointer to the location in the buffer after the addition of the rate set 107*ff66a890SHiten Pandyais returned. 108*ff66a890SHiten PandyaIt is typically used when constructing management frames from within the 109*ff66a890SHiten Pandyasoftware 802.11 stack in 802.11g mode. 110*ff66a890SHiten Pandya.Pp 111*ff66a890SHiten Pandya.\" 112*ff66a890SHiten PandyaThe 113*ff66a890SHiten Pandya.Fn ieee80211_send_mgmt 114*ff66a890SHiten Pandyafunction transmits a management frame on the interface 115*ff66a890SHiten Pandya.Fa ic 116*ff66a890SHiten Pandyato the destination node 117*ff66a890SHiten Pandya.Fa ni 118*ff66a890SHiten Pandyaof type 119*ff66a890SHiten Pandya.Fa type . 120*ff66a890SHiten Pandya.Pp 121*ff66a890SHiten PandyaThe argument 122*ff66a890SHiten Pandya.Fa arg 123*ff66a890SHiten Pandyaspecifies either a sequence number for authentication operations, 124*ff66a890SHiten Pandyaa status code for [re]association operations, 125*ff66a890SHiten Pandyaor a reason for deauthentication and deassociation operations. 126*ff66a890SHiten Pandya.Pp 127*ff66a890SHiten PandyaNodes other than 128*ff66a890SHiten Pandya.Va ic_bss 129*ff66a890SHiten Pandyahave their reference count incremented to reflect their use for an 130*ff66a890SHiten Pandyaindeterminate amount of time. 131*ff66a890SHiten PandyaThis reference is freed when the function returns. 132*ff66a890SHiten Pandya.Pp 133*ff66a890SHiten PandyaThe function returns 0 if successful; if temporary buffer space is not 134*ff66a890SHiten Pandyaavailable, the function returns 135*ff66a890SHiten Pandya.Er ENOMEM . 136*ff66a890SHiten Pandya.\" 137*ff66a890SHiten Pandya.Sh SEE ALSO 138*ff66a890SHiten Pandya.Xr ieee80211 9 , 139*ff66a890SHiten Pandya.Xr ifnet 9 140*ff66a890SHiten Pandya.Sh HISTORY 141*ff66a890SHiten PandyaThe 142*ff66a890SHiten Pandya.Nm ieee80211 143*ff66a890SHiten Pandyaseries of functions first appeared in 144*ff66a890SHiten Pandya.Nx 1.5 , 145*ff66a890SHiten Pandyaand were later ported to 146*ff66a890SHiten Pandya.Fx 4.6 . 147*ff66a890SHiten Pandya.Sh AUTHORS 148*ff66a890SHiten Pandya.An -nosplit 149*ff66a890SHiten PandyaThis man page was written by 150*ff66a890SHiten Pandya.An Bruce M. Simpson Aq bms@FreeBSD.org 151*ff66a890SHiten Pandyaand 152*ff66a890SHiten Pandya.An Darron Broad Aq darron@kewl.org . 153