/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _SYS_NET80211_PROTO_H
#define _SYS_NET80211_PROTO_H
/*
* 802.11 protocol definitions
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Size of an ACK control frame in bytes.
*/
/*
* The formation of some management frames requires guidance to
* deal with legacy clients. When the client is identified as
* "legacy 11b" this parameter can be passed in the arg param of a
* IEEE80211_SEND_MGMT call.
*/
/*
* Protocol Physical Layer
*/
/* XXX not really a mode; there are really multiple PHY's */
enum ieee80211_phymode {
};
enum ieee80211_phytype {
};
enum ieee80211_opmode {
};
/*
* 802.11g protection mode.
*/
enum ieee80211_protmode {
};
/*
* generic definitions for IEEE 802.11 frames
*/
#pragma pack(1)
struct ieee80211_frame {
/* possibly followed by addr4[IEEE80211_ADDR_LEN]; */
/* see below */
};
struct ieee80211_qosframe {
/* possibly followed by addr4[IEEE80211_ADDR_LEN]; */
/* see below */
};
struct ieee80211_qoscntl {
};
struct ieee80211_frame_addr4 {
};
struct ieee80211_qosframe_addr4 {
};
/* Start part(LLC and SNAP) of payload of IEEE80211 frame */
struct ieee80211_llc {
/* LLC */
/* SNAP */
};
/*
* Management Notification Frame
*/
struct ieee80211_mnf {
};
/*
* Control frames.
*/
struct ieee80211_frame_min {
/* FCS */
};
struct ieee80211_frame_rts {
/* FCS */
};
struct ieee80211_frame_cts {
/* FCS */
};
struct ieee80211_frame_ack {
/* FCS */
};
struct ieee80211_frame_pspoll {
/* FCS */
};
/* FCS */
};
struct ieee80211_frame_bar {
/* FCS */
};
struct ieee80211_tim_ie {
};
/*
*/
struct ieee80211_ie_wpa {
};
/*
* WME AC parameter field
*/
struct ieee80211_wme_acparams {
};
/*
* WME Parameter Element
*/
struct ieee80211_wme_param {
};
/*
* WME/802.11e information element.
*/
struct ieee80211_wme_info {
};
/*
* WME/802.11e Tspec Element
*/
struct ieee80211_wme_tspec {
};
/*
* 802.11n Management Action Frames
*/
/* generic frame format */
struct ieee80211_action {
};
/* HT - recommended transmission channel width */
struct ieee80211_action_ht_txchwidth {
};
struct ieee80211_action_ht_mimopowersave {
};
/* BA - ADDBA request */
struct ieee80211_action_ba_addbarequest {
};
/* BA - ADDBA response */
struct ieee80211_action_ba_addbaresponse {
};
/* BA - DELBA */
struct ieee80211_action_ba_delba {
};
struct ieee80211_ba_request {
};
/*
* 802.11n HT Capability IE
* NB: these reflect D1.10
*/
struct ieee80211_ie_htcap {
};
/*
* 802.11n HT Information IE
*/
struct ieee80211_ie_htinfo {
};
#pragma pack()
#define IEEE80211_FC0_VERSION_SHIFT 0
/* for TYPE_MGT */
/* for TYPE_CTL */
/* for TYPE_DATA (bit combination) */
#define IEEE80211_SEQ_FRAG_SHIFT 0
#define IEEE80211_SEQ_SUB(a, b) \
#define IEEE80211_SEQ_BA_BEFORE(a, b) \
/* Length of management frame variable-length components in bytes */
/* bit 8 is reserved */
/* does frame have QoS sequence control data */
0)
#define IEEE80211_MNF_SETUP_REQ 0
#define IEEE80211_A_HT_TXCHWIDTH_20 0
/* bits 2-7 reserved */
/* Block Ack actions */
/* Block Ack Parameter Set */
/* Block Ack Sequence Control */
#define IEEE80211_BASEQ_FRAG_S 0
/* Delayed Block Ack Parameter Set */
/* BAR Control */
/* HT capability flags (ht_cap) */
/* NB: SMPS value 2 is reserved */
/* HT parameters (hc_param) */
#define IEEE80211_HTCAP_MAXRXAMPDU_S 0
#define IEEE80211_HTCAP_MAXRXAMPDU_8K 0
/* HT extended capabilities (hc_extcap) */
/* bits 3-7 reserved */
/* reverse direction responder */
/* bits 12-15 reserved */
/* byte1 */
#define IEEE80211_HTINFO_2NDCHAN_S 0
/* NB: 2 is reserved */
/* XXX add rest */
/* bytes 2+3 */
#define IEEE80211_HTINFO_OPMODE_S 0
/* bits 5-15 reserved */
/* bytes 4+5 */
/* byte5 */
#define IEEE80211_HTINFO_BASIC_STBCMCS_S 0
/*
* Length of management frame information elements containing
* a variable-length component is:
* element_id(1 byte) + length(1 byte) + component(variable bytes)
*/
/*
* time stamp[8] + beacon interval[2] + capability[2]
*/
/*
* Minimal length of authentication frame elements
* algorithm[2] + sequence[2] + status[2]
*/
/*
* Minimal length of association response frame elements
* capability[2] + status[2] + association ID[2]
*/
/* bits 8-9 are reserved */
/* bit 12 is reserved */
/* bits 14-15 are reserved */
/*
* Management information element payloads.
*/
enum {
/* 17-31 reserved for challenge text extension */
/* 128-129 proprietary elements used by Agere chipsets */
};
/* EPR information element flags */
enum {
};
enum {
};
/*
* Reason codes
*
* Unlisted codes are reserved
*/
enum {
};
/*
* Status codes
*
* Unlisted codes are reserved and unused
*/
enum {
};
/*
* 802.11i defines an extended IV for use with non-WEP ciphers.
* When the EXTIV bit is set in the key id byte an additional
* 4 bytes immediately follow the IV for TKIP. For CCMP the
* EXTIV bit is likewise set but the 8 bytes represent the
* CCMP header rather than IV+extended-IV.
*/
/*
* Maximum acceptable MTU is defined by 802.11
* Min is arbitrarily chosen > IEEE80211_MIN_LEN.
*/
#define IEEE80211_MAX_LEN \
(sizeof (struct ieee80211_frame_addr4) + \
#define IEEE80211_ACK_LEN \
(sizeof (struct ieee80211_frame_ack) + IEEE80211_CRC_LEN)
#define IEEE80211_MIN_LEN \
(sizeof (struct ieee80211_frame_min) + IEEE80211_CRC_LEN)
/*
* The 802.11 spec says at most 2007 stations may be
* associated at once. For most AP's this is way more
* than is feasible so we use a default of 128. This
* user configuration.
*/
/*
* RTS frame length parameters. The default is specified in
* the 802.11 spec as 512; we treat it as implementation-dependent
* so it's defined in ieee80211_var.h. The max may be wrong
* for jumbo frames.
*/
/*
* TX fragmentation parameters. As above for RTS, we treat
* default as implementation-dependent so define it elsewhere.
*/
/* flags for ieee80211_fix_rate() */
/*
* Beacon frames constructed by ieee80211_beacon_alloc
* have the following structure filled in so drivers
* can update the frame later w/ minimal overhead.
*/
struct ieee80211_beacon_offsets {
};
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NET80211_PROTO_H */