aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_freebsd.h
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2006-07-26 03:15:16 +0000
committerSam Leffler <sam@FreeBSD.org>2006-07-26 03:15:16 +0000
commit246b5467621a60ed54345fa216639d5e16929ec1 (patch)
treeca8efdf26c24c239c9b30781c67e05b973c8d260 /sys/net80211/ieee80211_freebsd.h
parentcbd038e73856d664a594ab99a4e79ed5231922ff (diff)
downloadsrc-246b5467621a60ed54345fa216639d5e16929ec1.tar.gz
src-246b5467621a60ed54345fa216639d5e16929ec1.zip
add support for 802.11 packet injection via bpf
Together with: Andrea Bittau <a.bittau@cs.ucl.ac.uk> Reviewed by: arch@ MFC after: 1 month
Notes
Notes: svn path=/head/; revision=160690
Diffstat (limited to 'sys/net80211/ieee80211_freebsd.h')
-rw-r--r--sys/net80211/ieee80211_freebsd.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h
index 70a40c19af29..9fc23e507a6f 100644
--- a/sys/net80211/ieee80211_freebsd.h
+++ b/sys/net80211/ieee80211_freebsd.h
@@ -225,4 +225,37 @@ struct ieee80211_michael_event {
#define RTM_IEEE80211_MICHAEL 107 /* Michael MIC failure detected */
#define RTM_IEEE80211_REJOIN 108 /* station re-associate (ap mode) */
+/*
+ * Structure prepended to raw packets sent through the bpf
+ * interface when set to DLT_IEEE802_11_RADIO. This allows
+ * user applications to specify pretty much everything in
+ * an Atheros tx descriptor. XXX need to generalize.
+ *
+ * XXX cannot be more than 14 bytes as it is copied to a sockaddr's
+ * XXX sa_data area.
+ */
+struct ieee80211_bpf_params {
+ uint8_t ibp_vers; /* version */
+#define IEEE80211_BPF_VERSION 0
+ uint8_t ibp_len; /* header length in bytes */
+ uint8_t ibp_flags;
+#define IEEE80211_BPF_SHORTPRE 0x01 /* tx with short preamble */
+#define IEEE80211_BPF_NOACK 0x02 /* tx with no ack */
+#define IEEE80211_BPF_CRYPTO 0x04 /* tx with h/w encryption */
+#define IEEE80211_BPF_FCS 0x10 /* frame incldues FCS */
+#define IEEE80211_BPF_DATAPAD 0x20 /* frame includes data padding */
+#define IEEE80211_BPF_RTS 0x40 /* tx with RTS/CTS */
+#define IEEE80211_BPF_CTS 0x80 /* tx with CTS only */
+ uint8_t ibp_pri; /* WME/WMM AC+tx antenna */
+ uint8_t ibp_try0; /* series 1 try count */
+ uint8_t ibp_rate0; /* series 1 IEEE tx rate */
+ uint8_t ibp_power; /* tx power (device units) */
+ uint8_t ibp_ctsrate; /* IEEE tx rate for CTS */
+ uint8_t ibp_try1; /* series 2 try count */
+ uint8_t ibp_rate1; /* series 2 IEEE tx rate */
+ uint8_t ibp_try2; /* series 3 try count */
+ uint8_t ibp_rate2; /* series 3 IEEE tx rate */
+ uint8_t ibp_try3; /* series 4 try count */
+ uint8_t ibp_rate3; /* series 4 IEEE tx rate */
+};
#endif /* _NET80211_IEEE80211_FREEBSD_H_ */