2014-10-03 12:39:12 +02:00
|
|
|
|
|
|
|
Wireless monitor
|
|
|
|
================
|
|
|
|
|
|
|
|
Netlink monitor interface is created if it does not exist
|
|
|
|
|
|
|
|
The iwmon utility automates netlink monitor creation by by using RTNL
|
|
|
|
to find an existing netlink monitor interface, and in case it does not
|
|
|
|
exist, create a new one. By default the netlink monitor interface is
|
|
|
|
named 'nlmon'. Another name can be given with the '--interface'
|
|
|
|
command line option.
|
|
|
|
|
|
|
|
Once iwmon terminates, the netlink monitor interface is removed (in
|
|
|
|
case iwmon created it).
|
2014-10-09 13:04:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
HWSIM
|
|
|
|
=====
|
|
|
|
|
|
|
|
The radio id from kernel mac80211_hwsim module is parsed properly in
|
|
|
|
hwsim. The radio id is not returned as HWSIM_ATTR_RADIO_ID but instead
|
|
|
|
it is returned in error message. If the error code > 0, then that means
|
|
|
|
the radio id. If the error code < 0, then that indicates a real error.
|
2014-10-10 09:47:20 +02:00
|
|
|
|
|
|
|
The hwsim uses new HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE flag attribute to
|
|
|
|
tell the kernel that when the hwsim process dies, the radios it created
|
|
|
|
should be removed. For testing tools it is beneficial if the newly
|
|
|
|
created radio could be bound to the lifetime of the netlink socket.
|
2014-10-13 19:55:44 +02:00
|
|
|
Alternatively, using the hwsim '-k (--keep)' command line option instructs
|
|
|
|
hwsim to not destroy the created radio automatically.
|
2014-10-31 14:42:41 +01:00
|
|
|
|
|
|
|
The hwsim is using HWSIM_CMD_NEW_RADIO to create a new radio. When the
|
|
|
|
radio has been created, the kernel will return the used radio id and
|
|
|
|
parameters in a HWSIM_CMD_NEW_RADIO multicast event that is sent in
|
|
|
|
"config" netlink multicast group. The command HWSIM_CMD_DEL_RADIO is sent
|
|
|
|
by kernel when a hwsim radio is deleted. In this case the deleted
|
|
|
|
radio id is sent to "config" netlink multicast group.
|
2014-11-13 07:55:47 +01:00
|
|
|
|
|
|
|
hwsim can list radios by sending a HWSIM_CMD_GET_RADIO with the attribute
|
|
|
|
HWSIM_ATTR_RADIO_ID containing the desired radio id. If no radio id is
|
|
|
|
given on the command line, a dump of all radios is requested from the
|
|
|
|
kernel. The attributes returned are identical to those sent to the
|
|
|
|
'config' multicast group when creating a radio.
|