xref: /freebsd/tools/tools/net80211/wlaninject/README (revision 069ac184)
1
2This tool generates raw 802.11 frames.  The resulting frame will
3depend on the capabilities of the hardware.  Some hardware mangles
4the 802.11 header [e.g. wi] other hardware does not [e.g. ath].
5This tool does not deal with layers above 802.11.  A payload from
6a file must be supplied if, for example, IP data needs to be sent.
7
8Refer to the usage for a complete list of options.  Here, the most
9relevant will be described.  There are three types of switches:
10
11physical layer	Physical parameters for transmission
12		[such as iface and chan].
13802.11 header	Fields in the 802.11 header.
14802.11 body	The payload of the 802.11 frame.  This includes
15		management information elements.
16
17Interesting physical layer options.
18-----------------------------------
19-i The network interface to use to TX; defaults to ath0.
20-c The channel to TX on; defaults to 1.
21-N Mark transmitted frames such that no ACK is expected. In practice,
22   this will disable any retransmission done by the card.  This
23   way, you are sure that a single copy of your packet will be TXed.
24-V Verify that the packet you TXed did indeed fly in the air as
25   expected.  This is done by sniffing on a second network interface
26   and comparing the received frame to what was sent.  This option
27   is especially useful because some cards mangle 802.11 header
28   fields such as duration and fragment numbers.
29-W The WME AC to use for transmission.  Symbolic names are used:
30	ac_be, be	best effort
31	ac_bk, bk	background
32	ac_vi, vi	video
33	ac_vo, vo	voice
34-X The rate to use for transmission; defaults to 1Mbps.
35-P The txpower to use; defaults to the maximum permitted by the driver.
36
37Interesting 802.11 header options.
38----------------------------------
39-t The 802.11 frame type.  Symbolic names are:
40	mgt	Management frame
41	ctl	Control frame
42	data	Data frame
43   Otherwise the numerical type must be supplied.
44-s The 802.11 frame subtype.  At this point, the length of the 802.11 header
45   will be calculated.  Symbolic names are:
46	preq, probereq	Probe Request
47	auth		Authenticate
48	areq, assocreq	Association Request
49	data		Data
50   Otherwise the numerical subtype must be supplied.
51-4 The 4th MAC addr used for WDS.  Make sure you specify this before
52   -s so the header length is calculated correctly.
53-l Override the length of the packet.  This is useful for sending
54   truncated packets.
55-b Specify a file which will be used as a payload inside the 802.11
56   frame.  The length should be calculated automatically correctly.
57
58Interesting 802.11 payload options.
59-----------------------------------
60This is mainly used for management frames.  For data frames, -b
61would typically be used.
62
63-e Add an information element.  You can supply multiple -e options,
64   but make sure you add them in the expected order.  The format
65   of the information element is a list of 2 digit hex numbers.
66   That is, 010203...  The first hexdigit is the type of the IE.
67   Therefore, 00616161 should correspond to the SSID IE of 'aaa'.
68   The length is calculated automatically---you do not need to
69   supply it.
70-S Add an SSID IE with the data specified in ascii; e.g. -S 'aaa'
71   is the equivalent of -e 0061616161.
72-R Add an IE of 11b supported rates.
73
74Examples:
75---------
76
77wlaninject -t data -s data -i ral0 -V ath0 -m -n 1 -f 1
78
79Transmit a data frame on ral0 and verify the transmission on ath0.
80The frame is sent with sequence number 1, fragment number 1, and
81the MoreFrag bit marked in the 802.11 header.
82