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