FreeBSD kernel WLAN code
ieee80211_input.h File Reference
#include <sys/endian.h>
Include dependency graph for ieee80211_input.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IEEE80211_VERIFY_ELEMENT(__elem, __maxlen, _action)
 
#define IEEE80211_VERIFY_LENGTH(_len, _minlen, _action)
 
#define IEEE80211_VERIFY_SSID(_ni, _ssid, _action)
 
#define SEQ_LEQ(a, b)   ((int)((a)-(b)) <= 0)
 
#define SEQ_EQ(a, b)   ((int)((a)-(b)) == 0)
 
#define SEQNO(a)   ((a) >> IEEE80211_SEQ_SEQ_SHIFT)
 
#define FRAGNO(a)   ((a) & IEEE80211_SEQ_FRAG_MASK)
 

Functions

static __inline int iswpaoui (const uint8_t *frm)
 
static __inline int iswmeoui (const uint8_t *frm)
 
static __inline int iswmeparam (const uint8_t *frm)
 
static __inline int iswmeinfo (const uint8_t *frm)
 
static __inline int isatherosoui (const uint8_t *frm)
 
static __inline int istdmaoui (const uint8_t *frm)
 
static __inline int ishtcapoui (const uint8_t *frm)
 
static __inline int ishtinfooui (const uint8_t *frm)
 
static __inline int ieee80211_check_rxseq_amsdu (const struct ieee80211_rx_stats *rxs)
 
static __inline int ieee80211_check_rxseq_amsdu_more (const struct ieee80211_rx_stats *rxs)
 
static __inline int ieee80211_check_rxseq (struct ieee80211_node *ni, struct ieee80211_frame *wh, uint8_t *bssid, const struct ieee80211_rx_stats *rxs)
 
void ieee80211_deliver_data (struct ieee80211vap *, struct ieee80211_node *, struct mbuf *)
 
struct mbuf * ieee80211_defrag (struct ieee80211_node *, struct mbuf *, int, int)
 
struct mbuf * ieee80211_realign (struct ieee80211vap *, struct mbuf *, size_t)
 
struct mbuf * ieee80211_decap (struct ieee80211vap *, struct mbuf *, int, uint8_t)
 
struct mbuf * ieee80211_decap1 (struct mbuf *, int *)
 
int ieee80211_setup_rates (struct ieee80211_node *ni, const uint8_t *rates, const uint8_t *xrates, int flags)
 
void ieee80211_send_error (struct ieee80211_node *, const uint8_t mac[IEEE80211_ADDR_LEN], int subtype, int arg)
 
int ieee80211_alloc_challenge (struct ieee80211_node *)
 
int ieee80211_parse_beacon (struct ieee80211_node *, struct mbuf *, struct ieee80211_channel *, struct ieee80211_scanparams *)
 
int ieee80211_parse_action (struct ieee80211_node *, struct mbuf *)
 

Macro Definition Documentation

◆ FRAGNO

#define FRAGNO (   a)    ((a) & IEEE80211_SEQ_FRAG_MASK)

◆ IEEE80211_VERIFY_ELEMENT

#define IEEE80211_VERIFY_ELEMENT (   __elem,
  __maxlen,
  _action 
)
Value:
do { \
if ((__elem) == NULL) { \
IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID, \
wh, NULL, "%s", "no " #__elem ); \
vap->iv_stats.is_rx_elem_missing++; \
_action; \
} else if ((__elem)[1] > (__maxlen)) { \
IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID, \
wh, NULL, "bad " #__elem " len %d", (__elem)[1]); \
vap->iv_stats.is_rx_elem_toobig++; \
_action; \
} \
} while (0)
#define IEEE80211_MSG_ELEMID

Definition at line 33 of file ieee80211_input.h.

◆ IEEE80211_VERIFY_LENGTH

#define IEEE80211_VERIFY_LENGTH (   _len,
  _minlen,
  _action 
)
Value:
do { \
if ((_len) < (_minlen)) { \
IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID, \
wh, NULL, "ie too short, got %d, expected %d", \
(_len), (_minlen)); \
vap->iv_stats.is_rx_elem_toosmall++; \
_action; \
} \
} while (0)

Definition at line 47 of file ieee80211_input.h.

◆ IEEE80211_VERIFY_SSID

#define IEEE80211_VERIFY_SSID (   _ni,
  _ssid,
  _action 
)
Value:
do { \
if ((_ssid)[1] != 0 && \
((_ssid)[1] != (_ni)->ni_esslen || \
memcmp((_ssid) + 2, (_ni)->ni_essid, (_ssid)[1]) != 0)) { \
vap->iv_stats.is_rx_ssidmismatch++; \
_action; \
} \
} while (0)

Definition at line 74 of file ieee80211_input.h.

◆ SEQ_EQ

#define SEQ_EQ (   a,
 
)    ((int)((a)-(b)) == 0)

◆ SEQ_LEQ

#define SEQ_LEQ (   a,
 
)    ((int)((a)-(b)) <= 0)

◆ SEQNO

#define SEQNO (   a)    ((a) >> IEEE80211_SEQ_SEQ_SHIFT)

Function Documentation

◆ ieee80211_alloc_challenge()

int ieee80211_alloc_challenge ( struct ieee80211_node ni)

◆ ieee80211_check_rxseq()

◆ ieee80211_check_rxseq_amsdu()

static __inline int ieee80211_check_rxseq_amsdu ( const struct ieee80211_rx_stats rxs)
static

Definition at line 137 of file ieee80211_input.h.

References ieee80211_rx_stats::c_pktflags, and IEEE80211_RX_F_AMSDU.

Referenced by ampdu_rx_add_slot(), ieee80211_ampdu_reorder(), and ieee80211_check_rxseq().

Here is the caller graph for this function:

◆ ieee80211_check_rxseq_amsdu_more()

static __inline int ieee80211_check_rxseq_amsdu_more ( const struct ieee80211_rx_stats rxs)
static

Definition at line 150 of file ieee80211_input.h.

References ieee80211_rx_stats::c_pktflags, IEEE80211_RX_F_AMSDU, and IEEE80211_RX_F_AMSDU_MORE.

Referenced by ampdu_rx_add_slot(), ieee80211_ampdu_reorder(), and ieee80211_check_rxseq().

Here is the caller graph for this function:

◆ ieee80211_decap()

◆ ieee80211_decap1()

struct mbuf * ieee80211_decap1 ( struct mbuf *  m,
int *  framelen 
)

Definition at line 380 of file ieee80211_input.c.

References FF_LLC_SIZE.

Referenced by ieee80211_decap_amsdu().

Here is the caller graph for this function:

◆ ieee80211_defrag()

◆ ieee80211_deliver_data()

void ieee80211_deliver_data ( struct ieee80211vap vap,
struct ieee80211_node ni,
struct mbuf *  m 
)

◆ ieee80211_parse_action()

◆ ieee80211_parse_beacon()

int ieee80211_parse_beacon ( struct ieee80211_node ni,
struct mbuf *  m,
struct ieee80211_channel rxchan,
struct ieee80211_scanparams scan 
)

Definition at line 516 of file ieee80211_input.c.

References ieee80211_scanparams::ath, ieee80211_scanparams::bchan, ieee80211_scanparams::bintval, ieee80211_scanparams::capinfo, ieee80211_scanparams::chan, ieee80211_scanparams::country, ieee80211_scanparams::csa, ieee80211_scanparams::erp, ieee80211_scanparams::fhdwell, ieee80211_scanparams::fhindex, ieee80211_scanparams::htcap, ieee80211_scanparams::htinfo, ieee80211com::ic_phytype, IEEE80211_BINTVAL_MAX, IEEE80211_BPARSE_BADIELEN, IEEE80211_BPARSE_BINTVAL_INVALID, IEEE80211_BPARSE_CSA_INVALID, IEEE80211_BPARSE_OFFCHAN, IEEE80211_BPARSE_RATES_INVALID, IEEE80211_BPARSE_SSID_INVALID, IEEE80211_BPARSE_XRATES_INVALID, ieee80211_chan2ieee(), IEEE80211_DISCARD, IEEE80211_DISCARD_IE, IEEE80211_ELEMID_APCHANREP, IEEE80211_ELEMID_BSSLOAD, IEEE80211_ELEMID_CFPARMS, IEEE80211_ELEMID_COUNTRY, IEEE80211_ELEMID_CSA, IEEE80211_ELEMID_DSPARMS, IEEE80211_ELEMID_ERP, IEEE80211_ELEMID_EXTCAP, IEEE80211_ELEMID_FHPARMS, IEEE80211_ELEMID_HTCAP, IEEE80211_ELEMID_HTINFO, IEEE80211_ELEMID_IBSSPARMS, IEEE80211_ELEMID_MESHCONF, IEEE80211_ELEMID_MESHID, IEEE80211_ELEMID_PWRCNSTR, IEEE80211_ELEMID_QUIET, IEEE80211_ELEMID_RATES, IEEE80211_ELEMID_RSN, IEEE80211_ELEMID_SSID, IEEE80211_ELEMID_TIM, IEEE80211_ELEMID_VENDOR, IEEE80211_ELEMID_VHT_CAP, IEEE80211_ELEMID_VHT_OPMODE, IEEE80211_ELEMID_XRATES, IEEE80211_FH_CHAN, IEEE80211_FHT_HTCOMPAT, IEEE80211_MSG_ELEMID, IEEE80211_MSG_INPUT, IEEE80211_NWID_LEN, IEEE80211_RATE_MAXSIZE, IEEE80211_T_FH, IEEE80211_VERIFY_ELEMENT, IEEE80211_VERIFY_LENGTH, ieee80211_scanparams::ies, ieee80211_scanparams::ies_len, ieee80211_stats::is_rx_badbintval, ieee80211_stats::is_rx_chanmismatch, ieee80211_stats::is_rx_elem_toobig, ieee80211_stats::is_rx_elem_unknown, isatherosoui(), ishtcapoui(), ishtinfooui(), istdmaoui(), iswmeinfo(), iswmeparam(), iswpaoui(), ieee80211vap::iv_flags_ht, ieee80211vap::iv_stats, ieee80211_scanparams::meshconf, ieee80211_scanparams::meshid, ieee80211_node::ni_ic, ieee80211_node::ni_vap, ieee80211_scanparams::quiet, ieee80211_scanparams::rates, ieee80211_scanparams::rsn, ieee80211_scanparams::ssid, ieee80211_scanparams::status, ieee80211_scanparams::tdma, ieee80211_scanparams::tim, ieee80211_scanparams::timoff, ieee80211_scanparams::tstamp, ieee80211_scanparams::vhtcap, ieee80211_scanparams::vhtopmode, ieee80211_scanparams::wme, ieee80211_scanparams::wpa, and ieee80211_scanparams::xrates.

Referenced by adhoc_recv_mgmt(), hostap_recv_mgmt(), mesh_recv_mgmt(), and sta_recv_mgmt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee80211_realign()

struct mbuf * ieee80211_realign ( struct ieee80211vap vap,
struct mbuf *  m,
size_t  align 
)

Definition at line 517 of file ieee80211_freebsd.c.

References IEEE80211_DISCARD, IEEE80211_MSG_ANY, ieee80211_stats::is_rx_badalign, and ieee80211vap::iv_stats.

Referenced by ieee80211_decap(), and mesh_decap().

Here is the caller graph for this function:

◆ ieee80211_send_error()

void ieee80211_send_error ( struct ieee80211_node ni,
const uint8_t  mac[IEEE80211_ADDR_LEN],
int  subtype,
int  arg 
)

◆ ieee80211_setup_rates()

int ieee80211_setup_rates ( struct ieee80211_node ni,
const uint8_t *  rates,
const uint8_t *  xrates,
int  flags 
)

◆ isatherosoui()

static __inline int isatherosoui ( const uint8_t *  frm)
static

Definition at line 113 of file ieee80211_input.h.

References ATH_OUI, and ATH_OUI_TYPE.

Referenced by hostap_recv_mgmt(), ieee80211_ies_expand(), and ieee80211_parse_beacon().

Here is the caller graph for this function:

◆ ishtcapoui()

static __inline int ishtcapoui ( const uint8_t *  frm)
static

Definition at line 125 of file ieee80211_input.h.

References BCM_OUI, and BCM_OUI_HTCAP.

Referenced by hostap_recv_mgmt(), ieee80211_parse_beacon(), and sta_recv_mgmt().

Here is the caller graph for this function:

◆ ishtinfooui()

static __inline int ishtinfooui ( const uint8_t *  frm)
static

Definition at line 131 of file ieee80211_input.h.

References BCM_OUI, and BCM_OUI_HTINFO.

Referenced by ieee80211_parse_beacon(), and sta_recv_mgmt().

Here is the caller graph for this function:

◆ istdmaoui()

static __inline int istdmaoui ( const uint8_t *  frm)
static

Definition at line 119 of file ieee80211_input.h.

References TDMA_OUI, and TDMA_OUI_TYPE.

Referenced by ieee80211_ies_expand(), and ieee80211_parse_beacon().

Here is the caller graph for this function:

◆ iswmeinfo()

static __inline int iswmeinfo ( const uint8_t *  frm)
static

Definition at line 106 of file ieee80211_input.h.

References WME_INFO_OUI_SUBTYPE, WME_OUI, and WME_OUI_TYPE.

Referenced by hostap_recv_mgmt(), and ieee80211_parse_beacon().

Here is the caller graph for this function:

◆ iswmeoui()

static __inline int iswmeoui ( const uint8_t *  frm)
static

Definition at line 93 of file ieee80211_input.h.

References WME_OUI, and WME_OUI_TYPE.

Referenced by ieee80211_ies_expand(), and sta_recv_mgmt().

Here is the caller graph for this function:

◆ iswmeparam()

static __inline int iswmeparam ( const uint8_t *  frm)
static

Definition at line 99 of file ieee80211_input.h.

References WME_OUI, WME_OUI_TYPE, and WME_PARAM_OUI_SUBTYPE.

Referenced by ieee80211_parse_beacon().

Here is the caller graph for this function:

◆ iswpaoui()

static __inline int iswpaoui ( const uint8_t *  frm)
static

Definition at line 87 of file ieee80211_input.h.

References WPA_OUI, and WPA_OUI_TYPE.

Referenced by hostap_recv_mgmt(), ieee80211_ies_expand(), and ieee80211_parse_beacon().

Here is the caller graph for this function: