📄 ieee80211_var.h
字号:
#define IEEE80211_FEXT_UAPSD 0x00000010 /* CONF: enable U-APSD */#define IEEE80211_FEXT_SLEEP 0x00000020 /* STATUS: sleeping */#define IEEE80211_FEXT_EOSPDROP 0x00000040 /* drop uapsd EOSP frames for test */#define IEEE80211_FEXT_MARKDFS 0x00000080 /* Enable marking of dfs interference */#define IEEE80211_FEXT_REGCLASS 0x00000100 /* CONF: send regclassids in country ie */#define IEEE80211_FEXT_ERPUPDATE 0x00000200 /* STATUS: update ERP element */#define IEEE80211_FEXT_SWBMISS 0x00000400 /* CONF: use software beacon timer */#define IEEE80211_FEXT_DROPUNENC_EAPOL 0x00000800 /* CONF: drop unencrypted eapol frames */#define IEEE80211_FEXT_APPIE_UPDATE 0x00001000 /* STATE: beacon APP IE updated */#define IEEE80211_COM_UAPSD_ENABLE(_ic) ((_ic)->ic_flags_ext |= IEEE80211_FEXT_UAPSD)#define IEEE80211_COM_UAPSD_DISABLE(_ic) ((_ic)->ic_flags_ext &= ~IEEE80211_FEXT_UAPSD)#define IEEE80211_COM_UAPSD_ENABLED(_ic) ((_ic)->ic_flags_ext & IEEE80211_FEXT_UAPSD)#define IEEE80211_COM_GOTOSLEEP(_ic) ((_ic)->ic_flags_ext |= IEEE80211_FEXT_GOTOSLEEP)#define IEEE80211_COM_WAKEUP(_ic) ((_ic)->ic_flags_ext &= ~IEEE80211_FEXT_SLEEP)#define IEEE80211_COM_IS_SLEEPING(_ic) ((_ic)->ic_flags_ext & IEEE80211_FEXT_SLEEP)#define IEEE80211_VAP_UAPSD_ENABLE(_v) ((_v)->iv_flags_ext |= IEEE80211_FEXT_UAPSD)#define IEEE80211_VAP_UAPSD_DISABLE(_v) ((_v)->iv_flags_ext &= ~IEEE80211_FEXT_UAPSD)#define IEEE80211_VAP_UAPSD_ENABLED(_v) ((_v)->iv_flags_ext & IEEE80211_FEXT_UAPSD)#define IEEE80211_VAP_GOTOSLEEP(_v) ((_v)->iv_flags_ext |= IEEE80211_FEXT_SLEEP)#define IEEE80211_VAP_WAKEUP(_v) ((_v)->iv_flags_ext &= ~IEEE80211_FEXT_SLEEP)#define IEEE80211_VAP_IS_SLEEPING(_v) ((_v)->iv_flags_ext & IEEE80211_FEXT_SLEEP)#define IEEE80211_VAP_EOSPDROP_ENABLE(_v) ((_v)->iv_flags_ext |= IEEE80211_FEXT_EOSPDROP)#define IEEE80211_VAP_EOSPDROP_DISABLE(_v) ((_v)->iv_flags_ext &= ~IEEE80211_FEXT_EOSPDROP)#define IEEE80211_VAP_EOSPDROP_ENABLED(_v) ((_v)->iv_flags_ext & IEEE80211_FEXT_EOSPDROP)#define IEEE80211_VAP_DROPUNENC_EAPOL_ENABLE(_v) ((_v)->iv_flags_ext |= IEEE80211_FEXT_DROPUNENC_EAPOL)#define IEEE80211_VAP_DROPUNENC_EAPOL_DISABLE(_v) ((_v)->iv_flags_ext &= ~IEEE80211_FEXT_DROPUNENC_EAPOL)#define IEEE80211_VAP_DROPUNENC_EAPOL(_v) ((_v)->iv_flags_ext & IEEE80211_FEXT_DROPUNENC_EAPOL)/* ic_caps */#define IEEE80211_C_WEP 0x00000001 /* CAPABILITY: WEP available */#define IEEE80211_C_TKIP 0x00000002 /* CAPABILITY: TKIP available */#define IEEE80211_C_AES 0x00000004 /* CAPABILITY: AES OCB avail */#define IEEE80211_C_AES_CCM 0x00000008 /* CAPABILITY: AES CCM avail */#define IEEE80211_C_CKIP 0x00000020 /* CAPABILITY: CKIP available */#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF avail */#define IEEE80211_C_TURBOP 0x00000080 /* CAPABILITY: ATH Turbo avail*/#define IEEE80211_C_IBSS 0x00000100 /* CAPABILITY: IBSS available */#define IEEE80211_C_PMGT 0x00000200 /* CAPABILITY: Power mgmt */#define IEEE80211_C_HOSTAP 0x00000400 /* CAPABILITY: HOSTAP avail */#define IEEE80211_C_AHDEMO 0x00000800 /* CAPABILITY: Old Adhoc Demo */#define IEEE80211_C_SWRETRY 0x00001000 /* CAPABILITY: sw tx retry */#define IEEE80211_C_TXPMGT 0x00002000 /* CAPABILITY: tx power mgmt */#define IEEE80211_C_SHSLOT 0x00004000 /* CAPABILITY: short slottime */#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short preamble */#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */#define IEEE80211_C_TKIPMIC 0x00020000 /* CAPABILITY: TKIP MIC avail */#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */#define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/#define IEEE80211_C_BURST 0x02000000 /* CAPABILITY: frame bursting */#define IEEE80211_C_WME 0x04000000 /* CAPABILITY: WME avail */#define IEEE80211_C_WDS 0x08000000 /* CAPABILITY: 4-addr support */#define IEEE80211_C_WME_TKIPMIC 0x10000000 /* CAPABILITY: TKIP MIC for QoS frame */#define IEEE80211_C_BGSCAN 0x20000000 /* CAPABILITY: bg scanning */#define IEEE80211_C_UAPSD 0x40000000 /* CAPABILITY: UAPSD *//* XXX protection/barker? */#define IEEE80211_C_CRYPTO 0x0000002f /* CAPABILITY: crypto alg's *//* Atheros ABOLT definitions */#define IEEE80211_ABOLT_TURBO_G 0x01 /* Legacy Turbo G */#define IEEE80211_ABOLT_TURBO_PRIME 0x02 /* Turbo Prime */#define IEEE80211_ABOLT_COMPRESSION 0x04 /* Compression */#define IEEE80211_ABOLT_FAST_FRAME 0x08 /* Fast Frames */#define IEEE80211_ABOLT_BURST 0x10 /* Bursting */#define IEEE80211_ABOLT_WME_ELE 0x20 /* WME based cwmin/max/burst tuning */#define IEEE80211_ABOLT_XR 0x40 /* XR */#define IEEE80211_ABOLT_AR 0x80 /* AR switches out based on adjaced non-turbo traffic *//* Atheros Advanced Capabilities ABOLT definition */#define IEEE80211_ABOLT_ADVCAP (IEEE80211_ABOLT_TURBO_PRIME | \ IEEE80211_ABOLT_COMPRESSION | \ IEEE80211_ABOLT_FAST_FRAME | \ IEEE80211_ABOLT_XR | \ IEEE80211_ABOLT_AR | \ IEEE80211_ABOLT_BURST | \ IEEE80211_ABOLT_WME_ELE)/* check if a capability was negotiated for use */#define IEEE80211_ATH_CAP(vap, ni, bit) \ ((ni)->ni_ath_flags & (vap)->iv_ath_cap & (bit))/* flags to VAP create function */#define IEEE80211_VAP_XR 0x10000 /* create a XR VAP without registering net device with OS */int ieee80211_ifattach(struct ieee80211com *);void ieee80211_ifdetach(struct ieee80211com *);int ieee80211_vap_setup(struct ieee80211com *, struct net_device *, const char *, int, int, int);int ieee80211_vap_attach(struct ieee80211vap *, ifm_change_cb_t, ifm_stat_cb_t);void ieee80211_vap_detach(struct ieee80211vap *);void ieee80211_mark_dfs(struct ieee80211com *, struct ieee80211_channel *);void ieee80211_dfs_test_return(struct ieee80211com *, u_int8_t);void ieee80211_announce(struct ieee80211com *);void ieee80211_announce_channels(struct ieee80211com *);int ieee80211_media_change(struct net_device *);void ieee80211_media_status(struct net_device *, struct ifmediareq *);int ieee80211_rate2media(struct ieee80211com*, int, enum ieee80211_phymode);int ieee80211_media2rate(int);u_int ieee80211_mhz2ieee(u_int, u_int);u_int ieee80211_chan2ieee(struct ieee80211com *, const struct ieee80211_channel *);u_int ieee80211_ieee2mhz(u_int, u_int);struct ieee80211_channel *ieee80211_find_channel(struct ieee80211com *, int, int);int ieee80211_setmode(struct ieee80211com *, enum ieee80211_phymode);void ieee80211_reset_erp(struct ieee80211com *, enum ieee80211_phymode);enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *);void ieee80211_build_countryie(struct ieee80211com *);int ieee80211_media_setup(struct ieee80211com *, struct ifmedia *, u_int32_t, ifm_change_cb_t, ifm_stat_cb_t);/* * Key update synchronization methods. XXX should not be visible. */static __inline voidieee80211_key_update_begin(struct ieee80211vap *vap){ vap->iv_key_update_begin(vap);}static __inline voidieee80211_key_update_end(struct ieee80211vap *vap){ vap->iv_key_update_end(vap);}/* * XXX these need to be here for IEEE80211_F_DATAPAD *//* * Return the space occupied by the 802.11 header and any * padding required by the driver. This works for a * management or data frame. */static __inline intieee80211_hdrspace(struct ieee80211com *ic, const void *data){ int size = ieee80211_hdrsize(data); if (ic->ic_flags & IEEE80211_F_DATAPAD) size = roundup(size, sizeof(u_int32_t)); return size;}/* * Like ieee80211_hdrspace, but handles any type of frame. */static __inline intieee80211_anyhdrspace(struct ieee80211com *ic, const void *data){ int size = ieee80211_anyhdrsize(data); if (ic->ic_flags & IEEE80211_F_DATAPAD) size = roundup(size, sizeof(u_int32_t)); return size;}#define IEEE80211_MSG_DEBUG 0x40000000 /* IFF_DEBUG equivalent */#define IEEE80211_MSG_DUMPPKTS 0x20000000 /* IFF_LINK2 equivalent */#define IEEE80211_MSG_CRYPTO 0x10000000 /* crypto work */#define IEEE80211_MSG_INPUT 0x08000000 /* input handling */#define IEEE80211_MSG_XRATE 0x04000000 /* rate set handling */#define IEEE80211_MSG_ELEMID 0x02000000 /* element id parsing */#define IEEE80211_MSG_NODE 0x01000000 /* node handling */#define IEEE80211_MSG_ASSOC 0x00800000 /* association handling */#define IEEE80211_MSG_AUTH 0x00400000 /* authentication handling */#define IEEE80211_MSG_SCAN 0x00200000 /* scanning */#define IEEE80211_MSG_OUTPUT 0x00100000 /* output handling */#define IEEE80211_MSG_STATE 0x00080000 /* state machine */#define IEEE80211_MSG_POWER 0x00040000 /* power save handling */#define IEEE80211_MSG_DOT1X 0x00020000 /* 802.1x authenticator */#define IEEE80211_MSG_DOT1XSM 0x00010000 /* 802.1x state machine */#define IEEE80211_MSG_RADIUS 0x00008000 /* 802.1x radius client */#define IEEE80211_MSG_RADDUMP 0x00004000 /* dump 802.1x radius packets */#define IEEE80211_MSG_RADKEYS 0x00002000 /* dump 802.1x keys */#define IEEE80211_MSG_WPA 0x00001000 /* WPA/RSN protocol */#define IEEE80211_MSG_ACL 0x00000800 /* ACL handling */#define IEEE80211_MSG_WME 0x00000400 /* WME protocol */#define IEEE80211_MSG_SUPG 0x00000200 /* SUPERG */#define IEEE80211_MSG_DOTH 0x00000100 /* 11.h */#define IEEE80211_MSG_INACT 0x00000080 /* inactivity handling */#define IEEE80211_MSG_ROAM 0x00000040 /* sta-mode roaming */#define IEEE80211_MSG_ANY 0xffffffff /* anything */#ifdef IEEE80211_DEBUG#define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m))#define IEEE80211_DPRINTF(_vap, _m, _fmt, ...) do { \ if (ieee80211_msg(_vap, _m)) \ ieee80211_note(_vap, _fmt, __VA_ARGS__); \} while (0)#define IEEE80211_NOTE(_vap, _m, _ni, _fmt, ...) do { \ if (ieee80211_msg(_vap, _m)) \ ieee80211_note_mac(_vap, (_ni)->ni_macaddr, _fmt, __VA_ARGS__);\} while (0)#define IEEE80211_NOTE_MAC(_vap, _m, _mac, _fmt, ...) do { \ if (ieee80211_msg(_vap, _m)) \ ieee80211_note_mac(_vap, _mac, _fmt, __VA_ARGS__); \} while (0)#define IEEE80211_NOTE_FRAME(_vap, _m, _wh, _fmt, ...) do { \ if (ieee80211_msg(_vap, _m)) \ ieee80211_note_frame(_vap, _wh, _fmt, __VA_ARGS__); \} while (0)void ieee80211_note(struct ieee80211vap *, const char *, ...);void ieee80211_note_mac(struct ieee80211vap *, const u_int8_t mac[IEEE80211_ADDR_LEN], const char *, ...);void ieee80211_note_frame(struct ieee80211vap *, const struct ieee80211_frame *, const char *, ...);#define ieee80211_msg_debug(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_DEBUG)#define ieee80211_msg_dumppkts(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_DUMPPKTS)#define ieee80211_msg_input(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_INPUT)#define ieee80211_msg_radius(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_RADIUS)#define ieee80211_msg_dumpradius(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_RADDUMP)#define ieee80211_msg_dumpradkeys(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_RADKEYS)#define ieee80211_msg_scan(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_SCAN)#define ieee80211_msg_assoc(_vap) \ ieee80211_msg(_vap, IEEE80211_MSG_ASSOC)#else /* IEEE80211_DEBUG */#define IEEE80211_DPRINTF(_vap, _m, _fmt, ...)#define IEEE80211_NOTE(_vap, _m, _wh, _fmt, ...)#define IEEE80211_NOTE_FRAME(_vap, _m, _wh, _fmt, ...)#define IEEE80211_NOTE_MAC(_vap, _m, _mac, _fmt, ...)#endif /* IEEE80211_DEBUG */#endif /* _NET80211_IEEE80211_VAR_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -