Because none of the attributes are assigned until after the DeviceAdded
signal is emitted, the signal appears with invalid properties. For now,
move the netdev structure fill-out into the if statement.
If the netdev attributes can change, then these need to be handled
separately and appropriate signals to be sent.
The "Add support for client tracking of HWSIM_CMD_CREATE_RADIO"
task is done. The patch to kernel mac80211_hwsim kernel module
was submitted and it was added to mac80211-next tree 09 Oct 2014
in commit "e9ed49bf4c2c"
The new attribute causes the radio to be removed if the hwsim process
dies. This is the default behaviour. If user calls the binary with -k
option, then the radio is kept after hwsim quits.
This requires kernel support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE
attribute.
Lowering priority of HWSIM_ATTR_RADIO_ID task as we get the radio
id in error code field. If we really want to create a new attribute
for the radio id, then the TODO entry is still valid.
When a new radio is created, the kernel returns the new radio id
in the error code. If the error < 0, then that means a real error
and other values are used as a radio id.
When a radio is destroyed, the error code 0 means a success and
other values indicate an error.
Send a RTM_DELLINK for the interface in use if it was created by iwmon.
As the main loop needs to be running when sending RTM_DELLINK, add a
timeout function for quitting the main loop.
On startup, request a list of interfaces via netlink. Find out whether
an interface of type nlmon exists and use it if it has all the needed
flags set. The default name of the interface is 'nlmon', which can be
changed from the command line. If the interface name is in use and is
not an nlmon type, print out an error message and exit.