📄 users-guide.tex
字号:
used mainly by \mytt{hostapd}.\subsubsection{\mytt{mcastcipher} - Set Group Key Cipher}\argdesc{1}{0}{N/A}{No}This command sets the group key (multicast) cipher. This command isused mainly by \mytt{hostapd}. See the \mytt{driver\_madwifi.c} filein \mytt{hostapd} for details on the use of this command.\subsubsection{\mytt{get\_mcastcipher} - Get Group Key Cipher}\argdesc{0}{1}{N/A}{No}This command returns the current group key cipher. This command isused mainly by \mytt{hostapd}.\subsubsection{\mytt{ucastciphers} - Set Pairwise Unicast Key Ciphers}\argdesc{1}{0}{N/A}{No}This command sets the pairwise unicast key cipher. Each bit positionindicates a supported WPA pairwise cipher. The bitmask anddefinitions are defined in \mytt{hostapd}. This command is used mainlyby \mytt{hostapd}. See the \mytt{driver\_madwifi.c} file in\mytt{hostapd} for details on the use of this command.\subsubsection{\mytt{get\_ucastciphers} - Get Pairwise Unicast Key Ciphers}\argdesc{0}{1}{N/A}{No}This command returns the current pairwise unicast key ciphers. Thiscommand is used mainly by \mytt{hostapd}.\subsubsection{\mytt{ucastcipher} - Set Unicast Cipher}\argdesc{1}{0}{N/A}{No}This command sets the unicast key cipher. Currently not used.\subsubsection{\mytt{get\_ucastcipher} - Get Current Unicast cipher}\argdesc{0}{1}{N/A}{No}This command returns the current unicast key cipher. Currently notused.\subsubsection{\mytt{ucastkeylen} - Set Unicast Key Length}\argdesc{1}{0}{13}{No}This command sets the length of the unicast key. A single parameter issupplied which is the desired length of the unicast key. The desiredlength must be a positive number less than 16. Currently not used.\begin{example} To set the unicast key length on \mytt{ath0} to 10, the following command is used: \bv \cmd{iwpriv ath0 ucastkeylen 10} \ev\end{example}\subsubsection{\mytt{get\_ucastkeylen} - Get Current Unicast Key Length}\argdesc{0}{1}{N/A}{No}This command returns the current unicast key length. Currently notused.\begin{example} The following command returns the current unicast key length being used on \mytt{ath0}. \bv \cmd{iwpriv ath0 get\_ucastkeylen}\\ \mytt{ath0\hspace{32pt}get\_ucastkeylen:13} \ev\end{example}\subsubsection{\mytt{keymgtalgs} - Select Key Management Algorithm}\argdesc{1}{0}{3}{Yes if WPA/WPA2 is enabled}This command selects the key management algorithm used. A singleparameter is passed into the driver indicating which algorithm to use.Table~\ref{tab:keymgtalgs} lists the parameter value and thecorresponding algorithm. This command is used by \mytt{hostapd}and \mytt{wpa\_supplicant}.\begin{table} \centering \begin{tabular}{|l|l|} \hline Parameter & Algorithm \\ \hline 0 & No WPA Algorithm\\ 1 & WEP Algorithm \\ 2 & WPA TKIP Algorithm \\ 3 & WPA CCMP Algorithm \\ \hline \end{tabular} \caption{Key Management Algorithms} \label{tab:keymgtalgs}\end{table}\begin{example} To set the key management algorithm to ??? on \mytt{ath0}, the following command is used: \bv \cmd{iwpriv ath0 keymgtalgs 2} \ev\end{example}\subsubsection{\mytt{get\_keymgtalgs} - Get Current Key Management Algorithm}\argdesc{0}{1}{N/A}{No}This command returns the current key management algorithm. The valuereturned corresponds to the key management algorithm as dictated byTable~\ref{tab:keymgtalgs}.\begin{example} The following command returns the current key management algorithm being used on \mytt{ath0}. \bv \cmd{iwpriv ath0 get\_keymgtalgs}\\ \mytt{ath0\hspace{32pt}get\_keymgtalgs:3} \ev\end{example}\subsubsection{\mytt{rsncaps} - Set ???}\argdesc{1}{0}{??}{Yes if WPA/WPA2 is enabled}This commands sets ???.\begin{example} The following command sets the ??? of \mytt{ath0} to XX: \bv \cmd{iwpriv ath0 rsncaps XX} \ev\end{example}\subsubsection{\mytt{get\_rsncaps} - Get Current ???}\argdesc{0}{1}{N/A}{No}This command returns the current value of ???.\begin{example} The following command returns the current value of ??? on \mytt{ath0}. \bv \cmd{iwpriv ath0 get\_rsncaps}\\ \mytt{ath0\hspace{32pt}get\_rsncaps:0} \ev\end{example}\subsubsection{\mytt{hostroaming} - Set Roaming Mode}\argdesc{1}{0}{Auto}{No}This command sets the roaming mode which is effectively who controlsthe operation (state transitions) of the 802.11 state machine whenrunning as a station. Stations are either controlled by the driver(typically when management frames are processed by the hardware), thehost (auto/normal operation of the 802.11 layer), or explicitlythrough ioctl requests when applications such as\mytt{wpa\_supplicant} want control. A single argument is passed tothe driver indicating the desired roaming mode.Table~\ref{tab:roaming} lists the arguments and corresponding roamingmodes.\begin{table}[h*] \centering \begin{tabular}{|l|l|l|} \hline Argument & Roaming Mode & Description \\ \hline 0 & Device & Driver/hardware control \\ 1 & Auto & 802.11 layer control \\ 2 & Manual & ioctl/application control \\ \hline \end{tabular} \caption{Roaming Mode Arguments} \label{tab:roaming}\end{table}\begin{example} The following command sets the roaming mode to Auto on \mytt{ath0}. \bv \cmd{iwpriv ath0 hostroaming 1} \ev\end{example}\subsubsection{\mytt{get\_hostroaming} - Get Roaming Mode}\argdesc{0}{1}{N/A}{No}This command returns the roaming mode of the device. The returnedvalue corresponds to the modes given in Table~\ref{tab:roaming}.\begin{example} The following command returns the roaming mode of \mytt{ath0}: \bv \cmd{iwpriv ath0 get\_hostroaming}\\ \mytt{ath0\hspace{32pt}get\_hostroaming:1} \ev\end{example}\subsubsection{\mytt{privacy} - Enable/Disable Privacy}\argdesc{1}{0}{Disabled}{No}This command enables or disables privacy on the device. Passing avalue of 1 enables privacy. Passing a value of 0 disables privacy.\begin{example} The following command enables privacy on \mytt{ath0}: \bv \cmd{iwpriv ath0 privacy 1} \ev\end{example}\subsubsection{\mytt{get\_privacy} - Get Privacy Status}\argdesc{0}{1}{N/A}{No}This command returns the privacy status on the device. A value of 1indicates privacy is enabled. A value of 0 indicates privacy isdisabled.\begin{example} The following command returns the privacy status on \mytt{ath0}: \bv \cmd{iwpriv ath0 get\_privacy}\\ \mytt{ath0\hspace{32pt}get\_privacy:0} \ev\end{example}\subsubsection{\mytt{dropunencrypted} - Enable/Disable Dropping of Unencrypted non-PAE frames}\argdesc{1}{0}{Disabled}{No}This command enables or disables dropping of unencrypted non-PAEframes received. Passing a value of 1 enables dropping of unencryptednon-PAE frames. Passing a value of 0 disables dropping of unencryptednon-PAE frames.\begin{example} The following command enables dropping of unencrypted non-PAE frames on \mytt{ath0}: \bv \cmd{iwpriv ath0 dropunencrypted 1} \ev\end{example}\subsubsection{\mytt{get\_dropunencry} - Get Status of Dropping of Unencrypted non-PAE frames}\argdesc{0}{1}{N/A}{No}This command returns whether the device is dropping unencryptednon-PAE frames. A value of 1 indicates that unencrypted non-PAEframes are being dropped. A value of 0 indicates that unencryptednon-PAE frames are not being dropped.\begin{example} The following command returns whether \mytt{ath0} is dropping unencrypted non-PAE frames: \bv \cmd{iwpriv ath0 get\_dropunencry}\\ \mytt{ath0\hspace{32pt}get\_dropunencry:0} \ev\end{example}\subsubsection{\mytt{get\_wpa} - Get WPA/WPA2 Support}\argdesc{0}{1}{N/A}{No}This command gets the current status of WPA/WPA2 support in the driver.\begin{example} The following command retrieves the status of WPA/WPA2 support in the driver: \bv \cmd{iwpriv ath0 get\_wpa}\\ \mytt{ath0\hspace{32pt}get\_wpa:0} \ev\end{example}\subsubsection{\mytt{countermeasures} - Enable/Disable WPA/WPA2 Countermeasures}\argdesc{1}{0}{Disabled}{No}This command enables or disables WPA/WPA2 countermeasures. Passing avalue of 1 enables countermeasures if WPA or WPA2 are enabled.Passing a value of 0 disables countermeasures.\begin{example} The following command enables WPA/WPA2 countermeasures in the driver: \bv \cmd{iwpriv ath0 countermeasures 1} \ev\end{example}\subsubsection{\mytt{get\_countermeas} - Get Status of WPA/WPA2 Countermeasures}\argdesc{1}{0}{Disabled}{No}This command returns the status of WPA/WPA2 countermeasure support.A value of 1 indicates WPA/WPA2 countermeasures are enabled.A value of 0 indicates WPA/WPA2 countermeasures are disabled.\begin{example} The following command retrieves the status of WPA/WPA2 countermeasures in the driver: \bv \cmd{iwpriv ath0 get\_countermeas}\\ \mytt{ath0\hspace{32pt}get\_countermeas:0} \ev\end{example}\subsubsection{\mytt{get\_driver\_caps} - Get Driver Capabilities}\argdesc{0}{1}{N/A}{No}This command gets the current driver capabilities. The bitmask ofcapabilities can be found in the file \mytt{net80211/ieee80211\_var.h}.\begin{example} The following command retrieves the capabilities of the driver \bv \cmd{iwpriv ath0 get\_driver\_caps}\\ \mytt{ath0\hspace{32pt}get\_driver\_caps:126018575}\ev\end{example}\subsubsection{\mytt{addmac} - Add MAC address to ACL list}\argdesc{1}{0}{N/A}{No}This command takes a single argument which is the MAC address to beadded to the ACL list.\begin{example} The following command adds the MAC address 00:03:7F:03:A0:0C to the ACL list. \bv \cmd{iwpriv ath0 add\_mac 00:03:7f:03:a0:0c} \ev\end{example}\subsubsection{\mytt{delmac} - Delete MAC address to ACL list}\argdesc{1}{0}{N/A}{No}This command takes a single argument which is the MAC address to bedeleted from the ACL list.\begin{example} The following command deletes the MAC address 00:03:7F:03:A0:0C from the ACL list. \bv \cmd{iwpriv ath0 del\_mac 00:03:7F:03:A0:0C} \ev\end{example}\subsubsection{\mytt{maccmd} - Set or Modify the MAC/ACL Handling}\argdesc{1}{0}{N/A}{No}This command takes a single argument which describes the action onewishes to take on the MAC/ACL list. MAC addresses can beadded/deleted from the ACL list using the \mytt{addmac} and\mytt{delmac} commands. Table~\ref{tab:maccmd} gives the commands andtheir associated actions.\begin{table}[h*] \centering \begin{tabular}{|l|l|} \hline Argument & Action \\ \hline 0 & No ACL checking is performed \\ 1 & Only allow ACLs in the ACL list \\ 2 & Only deny ACLs in the ACL list \\ 3 & Flush the ACL database \\ 4 & Remove the ACL policy \\ \hline \end{tabular} \caption{ACL Commands} \label{tab:maccmd}\end{table}\begin{example} The following command denies traffic to all MAC addresses in the ACL list on \mytt{ath0}. \bv \cmd{iwpriv ath0 maccmd 2} \ev\end{example}\subsubsection{\mytt{kickmac} - Disassociate an associated station}\argdesc{1}{0}{N/A}{No}This command takes a single argument which is the MAC address of a currently associated client. The client is immediately sent a disassociateframe (with an unspecified reason). There is nothing to prevent theclient from immediately reassociating. If you are wishing to permanentlyremove a client from the access point you will need to also make use of the \mytt{maccmd}, \mytt{addmac} and \mytt{delmac} commands to configure the appropriate ACL entries.\begin{example} The following command immediately disassociates the client with MAC address 00:03:7f:03:42:3f. \bv \cmd{iwpriv ath0 kickmac 00:03:7f:03:42:3f} \ev\end{example}\subsubsection{\mytt{wmm} - WMM Support Enable/Disable}\argdesc{1}{0}{Enabled}{Yes}This command enables or disables WMM support. Passing a value of 1 tothe driver enables WMM. Passing a value of 0 to the driver disablesWMM. By default, WMM is enabled.\begin{example} The following command disables WMM support on \mytt{ath0}. \bv \cmd{iwpriv ath0 wmm 0} \ev\end{example}\subsubsection{\mytt{get\_wmm} - Get WMM Support}\argdesc{0}{1}{N/A}{No}This command returns whether WMM support is enabled or disabled in thedriver.\begin{example}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -