iPXE
Data Structures | Macros | Typedefs | Functions
p80211hdr.h File Reference
#include <wlan/wlan_compat.h>

Go to the source code of this file.

Data Structures

struct  p80211_hdr_a3
 
struct  p80211_hdr_a4
 
union  p80211_hdr
 

Macros

#define _P80211HDR_H
 
#define WLAN_ADDR_LEN   6
 
#define WLAN_CRC_LEN   4
 
#define WLAN_BSSID_LEN   6
 
#define WLAN_BSS_TS_LEN   8
 
#define WLAN_HDR_A3_LEN   24
 
#define WLAN_HDR_A4_LEN   30
 
#define WLAN_SSID_MAXLEN   32
 
#define WLAN_DATA_MAXLEN   2312
 
#define WLAN_A3FR_MAXLEN   (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)
 
#define WLAN_A4FR_MAXLEN   (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)
 
#define WLAN_BEACON_FR_MAXLEN   (WLAN_HDR_A3_LEN + 334)
 
#define WLAN_ATIM_FR_MAXLEN   (WLAN_HDR_A3_LEN + 0)
 
#define WLAN_DISASSOC_FR_MAXLEN   (WLAN_HDR_A3_LEN + 2)
 
#define WLAN_ASSOCREQ_FR_MAXLEN   (WLAN_HDR_A3_LEN + 48)
 
#define WLAN_ASSOCRESP_FR_MAXLEN   (WLAN_HDR_A3_LEN + 16)
 
#define WLAN_REASSOCREQ_FR_MAXLEN   (WLAN_HDR_A3_LEN + 54)
 
#define WLAN_REASSOCRESP_FR_MAXLEN   (WLAN_HDR_A3_LEN + 16)
 
#define WLAN_PROBEREQ_FR_MAXLEN   (WLAN_HDR_A3_LEN + 44)
 
#define WLAN_PROBERESP_FR_MAXLEN   (WLAN_HDR_A3_LEN + 78)
 
#define WLAN_AUTHEN_FR_MAXLEN   (WLAN_HDR_A3_LEN + 261)
 
#define WLAN_DEAUTHEN_FR_MAXLEN   (WLAN_HDR_A3_LEN + 2)
 
#define WLAN_WEP_NKEYS   4
 
#define WLAN_WEP_MAXKEYLEN   13
 
#define WLAN_CHALLENGE_IE_LEN   130
 
#define WLAN_CHALLENGE_LEN   128
 
#define WLAN_WEP_IV_LEN   4
 
#define WLAN_WEP_ICV_LEN   4
 
#define WLAN_FTYPE_MGMT   0x00
 
#define WLAN_FTYPE_CTL   0x01
 
#define WLAN_FTYPE_DATA   0x02
 
#define WLAN_FSTYPE_ASSOCREQ   0x00
 
#define WLAN_FSTYPE_ASSOCRESP   0x01
 
#define WLAN_FSTYPE_REASSOCREQ   0x02
 
#define WLAN_FSTYPE_REASSOCRESP   0x03
 
#define WLAN_FSTYPE_PROBEREQ   0x04
 
#define WLAN_FSTYPE_PROBERESP   0x05
 
#define WLAN_FSTYPE_BEACON   0x08
 
#define WLAN_FSTYPE_ATIM   0x09
 
#define WLAN_FSTYPE_DISASSOC   0x0a
 
#define WLAN_FSTYPE_AUTHEN   0x0b
 
#define WLAN_FSTYPE_DEAUTHEN   0x0c
 
#define WLAN_FSTYPE_BLOCKACKREQ   0x8
 
#define WLAN_FSTYPE_BLOCKACK   0x9
 
#define WLAN_FSTYPE_PSPOLL   0x0a
 
#define WLAN_FSTYPE_RTS   0x0b
 
#define WLAN_FSTYPE_CTS   0x0c
 
#define WLAN_FSTYPE_ACK   0x0d
 
#define WLAN_FSTYPE_CFEND   0x0e
 
#define WLAN_FSTYPE_CFENDCFACK   0x0f
 
#define WLAN_FSTYPE_DATAONLY   0x00
 
#define WLAN_FSTYPE_DATA_CFACK   0x01
 
#define WLAN_FSTYPE_DATA_CFPOLL   0x02
 
#define WLAN_FSTYPE_DATA_CFACK_CFPOLL   0x03
 
#define WLAN_FSTYPE_NULL   0x04
 
#define WLAN_FSTYPE_CFACK   0x05
 
#define WLAN_FSTYPE_CFPOLL   0x06
 
#define WLAN_FSTYPE_CFACK_CFPOLL   0x07
 
#define WLAN_GET_FC_PVER(n)   (((uint16_t)(n)) & (BIT0 | BIT1))
 
#define WLAN_GET_FC_FTYPE(n)   ((((uint16_t)(n)) & (BIT2 | BIT3)) >> 2)
 
#define WLAN_GET_FC_FSTYPE(n)   ((((uint16_t)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
 
#define WLAN_GET_FC_TODS(n)   ((((uint16_t)(n)) & (BIT8)) >> 8)
 
#define WLAN_GET_FC_FROMDS(n)   ((((uint16_t)(n)) & (BIT9)) >> 9)
 
#define WLAN_GET_FC_MOREFRAG(n)   ((((uint16_t)(n)) & (BIT10)) >> 10)
 
#define WLAN_GET_FC_RETRY(n)   ((((uint16_t)(n)) & (BIT11)) >> 11)
 
#define WLAN_GET_FC_PWRMGT(n)   ((((uint16_t)(n)) & (BIT12)) >> 12)
 
#define WLAN_GET_FC_MOREDATA(n)   ((((uint16_t)(n)) & (BIT13)) >> 13)
 
#define WLAN_GET_FC_ISWEP(n)   ((((uint16_t)(n)) & (BIT14)) >> 14)
 
#define WLAN_GET_FC_ORDER(n)   ((((uint16_t)(n)) & (BIT15)) >> 15)
 
#define WLAN_SET_FC_PVER(n)   ((uint16_t)(n))
 
#define WLAN_SET_FC_FTYPE(n)   (((uint16_t)(n)) << 2)
 
#define WLAN_SET_FC_FSTYPE(n)   (((uint16_t)(n)) << 4)
 
#define WLAN_SET_FC_TODS(n)   (((uint16_t)(n)) << 8)
 
#define WLAN_SET_FC_FROMDS(n)   (((uint16_t)(n)) << 9)
 
#define WLAN_SET_FC_MOREFRAG(n)   (((uint16_t)(n)) << 10)
 
#define WLAN_SET_FC_RETRY(n)   (((uint16_t)(n)) << 11)
 
#define WLAN_SET_FC_PWRMGT(n)   (((uint16_t)(n)) << 12)
 
#define WLAN_SET_FC_MOREDATA(n)   (((uint16_t)(n)) << 13)
 
#define WLAN_SET_FC_ISWEP(n)   (((uint16_t)(n)) << 14)
 
#define WLAN_SET_FC_ORDER(n)   (((uint16_t)(n)) << 15)
 
#define WLAN_GET_SEQ_FRGNUM(n)   (((uint16_t)(n)) & (BIT0|BIT1|BIT2|BIT3))
 
#define WLAN_GET_SEQ_SEQNUM(n)   ((((uint16_t)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
 
#define WLAN_HDR_A3_DATAP(p)   (((uint8_t*)(p)) + WLAN_HDR_A3_LEN)
 
#define WLAN_HDR_A4_DATAP(p)   (((uint8_t*)(p)) + WLAN_HDR_A4_LEN)
 
#define DOT11_RATE5_ISBASIC_GET(r)   (((uint8_t)(r)) & BIT7)
 
#define WLAN_CTL_FRAMELEN(fstype)
 
#define WLAN_FCS_LEN   4
 

Typedefs

typedef uint8_t wlan_bss_ts_t[WLAN_BSS_TS_LEN]
 
typedef struct p80211_hdr_a3 p80211_hdr_a3_t
 
typedef struct p80211_hdr_a4 p80211_hdr_a4_t
 
typedef union p80211_hdr p80211_hdr_t
 

Functions

 FILE_LICENCE (GPL2_ONLY)
 
static uint16_t p80211_headerlen (uint16_t fctl)
 

Macro Definition Documentation

◆ _P80211HDR_H

#define _P80211HDR_H

Definition at line 63 of file p80211hdr.h.

◆ WLAN_ADDR_LEN

#define WLAN_ADDR_LEN   6

Definition at line 80 of file p80211hdr.h.

◆ WLAN_CRC_LEN

#define WLAN_CRC_LEN   4

Definition at line 81 of file p80211hdr.h.

◆ WLAN_BSSID_LEN

#define WLAN_BSSID_LEN   6

Definition at line 82 of file p80211hdr.h.

◆ WLAN_BSS_TS_LEN

#define WLAN_BSS_TS_LEN   8

Definition at line 83 of file p80211hdr.h.

◆ WLAN_HDR_A3_LEN

#define WLAN_HDR_A3_LEN   24

Definition at line 84 of file p80211hdr.h.

◆ WLAN_HDR_A4_LEN

#define WLAN_HDR_A4_LEN   30

Definition at line 85 of file p80211hdr.h.

◆ WLAN_SSID_MAXLEN

#define WLAN_SSID_MAXLEN   32

Definition at line 86 of file p80211hdr.h.

◆ WLAN_DATA_MAXLEN

#define WLAN_DATA_MAXLEN   2312

Definition at line 87 of file p80211hdr.h.

◆ WLAN_A3FR_MAXLEN

#define WLAN_A3FR_MAXLEN   (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)

Definition at line 88 of file p80211hdr.h.

◆ WLAN_A4FR_MAXLEN

#define WLAN_A4FR_MAXLEN   (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)

Definition at line 89 of file p80211hdr.h.

◆ WLAN_BEACON_FR_MAXLEN

#define WLAN_BEACON_FR_MAXLEN   (WLAN_HDR_A3_LEN + 334)

Definition at line 90 of file p80211hdr.h.

◆ WLAN_ATIM_FR_MAXLEN

#define WLAN_ATIM_FR_MAXLEN   (WLAN_HDR_A3_LEN + 0)

Definition at line 91 of file p80211hdr.h.

◆ WLAN_DISASSOC_FR_MAXLEN

#define WLAN_DISASSOC_FR_MAXLEN   (WLAN_HDR_A3_LEN + 2)

Definition at line 92 of file p80211hdr.h.

◆ WLAN_ASSOCREQ_FR_MAXLEN

#define WLAN_ASSOCREQ_FR_MAXLEN   (WLAN_HDR_A3_LEN + 48)

Definition at line 93 of file p80211hdr.h.

◆ WLAN_ASSOCRESP_FR_MAXLEN

#define WLAN_ASSOCRESP_FR_MAXLEN   (WLAN_HDR_A3_LEN + 16)

Definition at line 94 of file p80211hdr.h.

◆ WLAN_REASSOCREQ_FR_MAXLEN

#define WLAN_REASSOCREQ_FR_MAXLEN   (WLAN_HDR_A3_LEN + 54)

Definition at line 95 of file p80211hdr.h.

◆ WLAN_REASSOCRESP_FR_MAXLEN

#define WLAN_REASSOCRESP_FR_MAXLEN   (WLAN_HDR_A3_LEN + 16)

Definition at line 96 of file p80211hdr.h.

◆ WLAN_PROBEREQ_FR_MAXLEN

#define WLAN_PROBEREQ_FR_MAXLEN   (WLAN_HDR_A3_LEN + 44)

Definition at line 97 of file p80211hdr.h.

◆ WLAN_PROBERESP_FR_MAXLEN

#define WLAN_PROBERESP_FR_MAXLEN   (WLAN_HDR_A3_LEN + 78)

Definition at line 98 of file p80211hdr.h.

◆ WLAN_AUTHEN_FR_MAXLEN

#define WLAN_AUTHEN_FR_MAXLEN   (WLAN_HDR_A3_LEN + 261)

Definition at line 99 of file p80211hdr.h.

◆ WLAN_DEAUTHEN_FR_MAXLEN

#define WLAN_DEAUTHEN_FR_MAXLEN   (WLAN_HDR_A3_LEN + 2)

Definition at line 100 of file p80211hdr.h.

◆ WLAN_WEP_NKEYS

#define WLAN_WEP_NKEYS   4

Definition at line 101 of file p80211hdr.h.

◆ WLAN_WEP_MAXKEYLEN

#define WLAN_WEP_MAXKEYLEN   13

Definition at line 102 of file p80211hdr.h.

◆ WLAN_CHALLENGE_IE_LEN

#define WLAN_CHALLENGE_IE_LEN   130

Definition at line 103 of file p80211hdr.h.

◆ WLAN_CHALLENGE_LEN

#define WLAN_CHALLENGE_LEN   128

Definition at line 104 of file p80211hdr.h.

◆ WLAN_WEP_IV_LEN

#define WLAN_WEP_IV_LEN   4

Definition at line 105 of file p80211hdr.h.

◆ WLAN_WEP_ICV_LEN

#define WLAN_WEP_ICV_LEN   4

Definition at line 106 of file p80211hdr.h.

◆ WLAN_FTYPE_MGMT

#define WLAN_FTYPE_MGMT   0x00

Definition at line 110 of file p80211hdr.h.

◆ WLAN_FTYPE_CTL

#define WLAN_FTYPE_CTL   0x01

Definition at line 111 of file p80211hdr.h.

◆ WLAN_FTYPE_DATA

#define WLAN_FTYPE_DATA   0x02

Definition at line 112 of file p80211hdr.h.

◆ WLAN_FSTYPE_ASSOCREQ

#define WLAN_FSTYPE_ASSOCREQ   0x00

Definition at line 116 of file p80211hdr.h.

◆ WLAN_FSTYPE_ASSOCRESP

#define WLAN_FSTYPE_ASSOCRESP   0x01

Definition at line 117 of file p80211hdr.h.

◆ WLAN_FSTYPE_REASSOCREQ

#define WLAN_FSTYPE_REASSOCREQ   0x02

Definition at line 118 of file p80211hdr.h.

◆ WLAN_FSTYPE_REASSOCRESP

#define WLAN_FSTYPE_REASSOCRESP   0x03

Definition at line 119 of file p80211hdr.h.

◆ WLAN_FSTYPE_PROBEREQ

#define WLAN_FSTYPE_PROBEREQ   0x04

Definition at line 120 of file p80211hdr.h.

◆ WLAN_FSTYPE_PROBERESP

#define WLAN_FSTYPE_PROBERESP   0x05

Definition at line 121 of file p80211hdr.h.

◆ WLAN_FSTYPE_BEACON

#define WLAN_FSTYPE_BEACON   0x08

Definition at line 122 of file p80211hdr.h.

◆ WLAN_FSTYPE_ATIM

#define WLAN_FSTYPE_ATIM   0x09

Definition at line 123 of file p80211hdr.h.

◆ WLAN_FSTYPE_DISASSOC

#define WLAN_FSTYPE_DISASSOC   0x0a

Definition at line 124 of file p80211hdr.h.

◆ WLAN_FSTYPE_AUTHEN

#define WLAN_FSTYPE_AUTHEN   0x0b

Definition at line 125 of file p80211hdr.h.

◆ WLAN_FSTYPE_DEAUTHEN

#define WLAN_FSTYPE_DEAUTHEN   0x0c

Definition at line 126 of file p80211hdr.h.

◆ WLAN_FSTYPE_BLOCKACKREQ

#define WLAN_FSTYPE_BLOCKACKREQ   0x8

Definition at line 129 of file p80211hdr.h.

◆ WLAN_FSTYPE_BLOCKACK

#define WLAN_FSTYPE_BLOCKACK   0x9

Definition at line 130 of file p80211hdr.h.

◆ WLAN_FSTYPE_PSPOLL

#define WLAN_FSTYPE_PSPOLL   0x0a

Definition at line 131 of file p80211hdr.h.

◆ WLAN_FSTYPE_RTS

#define WLAN_FSTYPE_RTS   0x0b

Definition at line 132 of file p80211hdr.h.

◆ WLAN_FSTYPE_CTS

#define WLAN_FSTYPE_CTS   0x0c

Definition at line 133 of file p80211hdr.h.

◆ WLAN_FSTYPE_ACK

#define WLAN_FSTYPE_ACK   0x0d

Definition at line 134 of file p80211hdr.h.

◆ WLAN_FSTYPE_CFEND

#define WLAN_FSTYPE_CFEND   0x0e

Definition at line 135 of file p80211hdr.h.

◆ WLAN_FSTYPE_CFENDCFACK

#define WLAN_FSTYPE_CFENDCFACK   0x0f

Definition at line 136 of file p80211hdr.h.

◆ WLAN_FSTYPE_DATAONLY

#define WLAN_FSTYPE_DATAONLY   0x00

Definition at line 139 of file p80211hdr.h.

◆ WLAN_FSTYPE_DATA_CFACK

#define WLAN_FSTYPE_DATA_CFACK   0x01

Definition at line 140 of file p80211hdr.h.

◆ WLAN_FSTYPE_DATA_CFPOLL

#define WLAN_FSTYPE_DATA_CFPOLL   0x02

Definition at line 141 of file p80211hdr.h.

◆ WLAN_FSTYPE_DATA_CFACK_CFPOLL

#define WLAN_FSTYPE_DATA_CFACK_CFPOLL   0x03

Definition at line 142 of file p80211hdr.h.

◆ WLAN_FSTYPE_NULL

#define WLAN_FSTYPE_NULL   0x04

Definition at line 143 of file p80211hdr.h.

◆ WLAN_FSTYPE_CFACK

#define WLAN_FSTYPE_CFACK   0x05

Definition at line 144 of file p80211hdr.h.

◆ WLAN_FSTYPE_CFPOLL

#define WLAN_FSTYPE_CFPOLL   0x06

Definition at line 145 of file p80211hdr.h.

◆ WLAN_FSTYPE_CFACK_CFPOLL

#define WLAN_FSTYPE_CFACK_CFPOLL   0x07

Definition at line 146 of file p80211hdr.h.

◆ WLAN_GET_FC_PVER

#define WLAN_GET_FC_PVER (   n)    (((uint16_t)(n)) & (BIT0 | BIT1))

Definition at line 171 of file p80211hdr.h.

◆ WLAN_GET_FC_FTYPE

#define WLAN_GET_FC_FTYPE (   n)    ((((uint16_t)(n)) & (BIT2 | BIT3)) >> 2)

Definition at line 172 of file p80211hdr.h.

◆ WLAN_GET_FC_FSTYPE

#define WLAN_GET_FC_FSTYPE (   n)    ((((uint16_t)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)

Definition at line 173 of file p80211hdr.h.

◆ WLAN_GET_FC_TODS

#define WLAN_GET_FC_TODS (   n)    ((((uint16_t)(n)) & (BIT8)) >> 8)

Definition at line 174 of file p80211hdr.h.

◆ WLAN_GET_FC_FROMDS

#define WLAN_GET_FC_FROMDS (   n)    ((((uint16_t)(n)) & (BIT9)) >> 9)

Definition at line 175 of file p80211hdr.h.

◆ WLAN_GET_FC_MOREFRAG

#define WLAN_GET_FC_MOREFRAG (   n)    ((((uint16_t)(n)) & (BIT10)) >> 10)

Definition at line 176 of file p80211hdr.h.

◆ WLAN_GET_FC_RETRY

#define WLAN_GET_FC_RETRY (   n)    ((((uint16_t)(n)) & (BIT11)) >> 11)

Definition at line 177 of file p80211hdr.h.

◆ WLAN_GET_FC_PWRMGT

#define WLAN_GET_FC_PWRMGT (   n)    ((((uint16_t)(n)) & (BIT12)) >> 12)

Definition at line 178 of file p80211hdr.h.

◆ WLAN_GET_FC_MOREDATA

#define WLAN_GET_FC_MOREDATA (   n)    ((((uint16_t)(n)) & (BIT13)) >> 13)

Definition at line 179 of file p80211hdr.h.

◆ WLAN_GET_FC_ISWEP

#define WLAN_GET_FC_ISWEP (   n)    ((((uint16_t)(n)) & (BIT14)) >> 14)

Definition at line 180 of file p80211hdr.h.

◆ WLAN_GET_FC_ORDER

#define WLAN_GET_FC_ORDER (   n)    ((((uint16_t)(n)) & (BIT15)) >> 15)

Definition at line 181 of file p80211hdr.h.

◆ WLAN_SET_FC_PVER

#define WLAN_SET_FC_PVER (   n)    ((uint16_t)(n))

Definition at line 183 of file p80211hdr.h.

◆ WLAN_SET_FC_FTYPE

#define WLAN_SET_FC_FTYPE (   n)    (((uint16_t)(n)) << 2)

Definition at line 184 of file p80211hdr.h.

◆ WLAN_SET_FC_FSTYPE

#define WLAN_SET_FC_FSTYPE (   n)    (((uint16_t)(n)) << 4)

Definition at line 185 of file p80211hdr.h.

◆ WLAN_SET_FC_TODS

#define WLAN_SET_FC_TODS (   n)    (((uint16_t)(n)) << 8)

Definition at line 186 of file p80211hdr.h.

◆ WLAN_SET_FC_FROMDS

#define WLAN_SET_FC_FROMDS (   n)    (((uint16_t)(n)) << 9)

Definition at line 187 of file p80211hdr.h.

◆ WLAN_SET_FC_MOREFRAG

#define WLAN_SET_FC_MOREFRAG (   n)    (((uint16_t)(n)) << 10)

Definition at line 188 of file p80211hdr.h.

◆ WLAN_SET_FC_RETRY

#define WLAN_SET_FC_RETRY (   n)    (((uint16_t)(n)) << 11)

Definition at line 189 of file p80211hdr.h.

◆ WLAN_SET_FC_PWRMGT

#define WLAN_SET_FC_PWRMGT (   n)    (((uint16_t)(n)) << 12)

Definition at line 190 of file p80211hdr.h.

◆ WLAN_SET_FC_MOREDATA

#define WLAN_SET_FC_MOREDATA (   n)    (((uint16_t)(n)) << 13)

Definition at line 191 of file p80211hdr.h.

◆ WLAN_SET_FC_ISWEP

#define WLAN_SET_FC_ISWEP (   n)    (((uint16_t)(n)) << 14)

Definition at line 192 of file p80211hdr.h.

◆ WLAN_SET_FC_ORDER

#define WLAN_SET_FC_ORDER (   n)    (((uint16_t)(n)) << 15)

Definition at line 193 of file p80211hdr.h.

◆ WLAN_GET_SEQ_FRGNUM

#define WLAN_GET_SEQ_FRGNUM (   n)    (((uint16_t)(n)) & (BIT0|BIT1|BIT2|BIT3))

Definition at line 206 of file p80211hdr.h.

◆ WLAN_GET_SEQ_SEQNUM

#define WLAN_GET_SEQ_SEQNUM (   n)    ((((uint16_t)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)

Definition at line 207 of file p80211hdr.h.

◆ WLAN_HDR_A3_DATAP

#define WLAN_HDR_A3_DATAP (   p)    (((uint8_t*)(p)) + WLAN_HDR_A3_LEN)

Definition at line 213 of file p80211hdr.h.

◆ WLAN_HDR_A4_DATAP

#define WLAN_HDR_A4_DATAP (   p)    (((uint8_t*)(p)) + WLAN_HDR_A4_LEN)

Definition at line 214 of file p80211hdr.h.

◆ DOT11_RATE5_ISBASIC_GET

#define DOT11_RATE5_ISBASIC_GET (   r)    (((uint8_t)(r)) & BIT7)

Definition at line 216 of file p80211hdr.h.

◆ WLAN_CTL_FRAMELEN

#define WLAN_CTL_FRAMELEN (   fstype)
Value:
(\
(fstype) == WLAN_FSTYPE_BLOCKACKREQ ? 24 : \
(fstype) == WLAN_FSTYPE_BLOCKACK ? 152 : \
(fstype) == WLAN_FSTYPE_PSPOLL ? 20 : \
(fstype) == WLAN_FSTYPE_RTS ? 20 : \
(fstype) == WLAN_FSTYPE_CTS ? 14 : \
(fstype) == WLAN_FSTYPE_ACK ? 14 : \
(fstype) == WLAN_FSTYPE_CFEND ? 20 : \
(fstype) == WLAN_FSTYPE_CFENDCFACK ? 20 : 4)
#define WLAN_FSTYPE_BLOCKACKREQ
Definition: p80211hdr.h:129
#define WLAN_FSTYPE_CFEND
Definition: p80211hdr.h:135
#define WLAN_FSTYPE_ACK
Definition: p80211hdr.h:134
#define WLAN_FSTYPE_CFENDCFACK
Definition: p80211hdr.h:136
#define WLAN_FSTYPE_CTS
Definition: p80211hdr.h:133
#define WLAN_FSTYPE_BLOCKACK
Definition: p80211hdr.h:130
#define WLAN_FSTYPE_PSPOLL
Definition: p80211hdr.h:131
#define WLAN_FSTYPE_RTS
Definition: p80211hdr.h:132

Definition at line 263 of file p80211hdr.h.

◆ WLAN_FCS_LEN

#define WLAN_FCS_LEN   4

Definition at line 273 of file p80211hdr.h.

Typedef Documentation

◆ wlan_bss_ts_t

typedef uint8_t wlan_bss_ts_t[WLAN_BSS_TS_LEN]

Definition at line 222 of file p80211hdr.h.

◆ p80211_hdr_a3_t

◆ p80211_hdr_a4_t

◆ p80211_hdr_t

typedef union p80211_hdr p80211_hdr_t

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_ONLY  )

◆ p80211_headerlen()

static uint16_t p80211_headerlen ( uint16_t  fctl)
inlinestatic

Definition at line 276 of file p80211hdr.h.

277 {
278  uint16_t hdrlen = 0;
279 
280  switch ( WLAN_GET_FC_FTYPE(fctl) ) {
281  case WLAN_FTYPE_MGMT:
282  hdrlen = WLAN_HDR_A3_LEN;
283  break;
284  case WLAN_FTYPE_DATA:
285  hdrlen = WLAN_HDR_A3_LEN;
286  if ( WLAN_GET_FC_TODS(fctl) && WLAN_GET_FC_FROMDS(fctl) ) {
287  hdrlen += WLAN_ADDR_LEN;
288  }
289  break;
290  case WLAN_FTYPE_CTL:
291  hdrlen = WLAN_CTL_FRAMELEN(WLAN_GET_FC_FSTYPE(fctl)) -
292  WLAN_FCS_LEN;
293  break;
294  default:
295  hdrlen = WLAN_HDR_A3_LEN;
296  }
297 
298  return hdrlen;
299 }
unsigned short uint16_t
Definition: stdint.h:11
#define WLAN_HDR_A3_LEN
Definition: p80211hdr.h:84
#define WLAN_FTYPE_DATA
Definition: p80211hdr.h:112
#define WLAN_FTYPE_CTL
Definition: p80211hdr.h:111
#define WLAN_ADDR_LEN
Definition: p80211hdr.h:80
#define WLAN_GET_FC_TODS(n)
Definition: p80211hdr.h:174
#define WLAN_GET_FC_FROMDS(n)
Definition: p80211hdr.h:175
#define WLAN_FCS_LEN
Definition: p80211hdr.h:273
#define WLAN_CTL_FRAMELEN(fstype)
Definition: p80211hdr.h:263
#define WLAN_GET_FC_FTYPE(n)
Definition: p80211hdr.h:172
#define WLAN_GET_FC_FSTYPE(n)
Definition: p80211hdr.h:173
#define WLAN_FTYPE_MGMT
Definition: p80211hdr.h:110

References WLAN_ADDR_LEN, WLAN_CTL_FRAMELEN, WLAN_FCS_LEN, WLAN_FTYPE_CTL, WLAN_FTYPE_DATA, WLAN_FTYPE_MGMT, WLAN_GET_FC_FROMDS, WLAN_GET_FC_FSTYPE, WLAN_GET_FC_FTYPE, WLAN_GET_FC_TODS, and WLAN_HDR_A3_LEN.