Module netlink.nl80211.interface
Wireless interface management.
An nl80211 object over the "nl80211"
generic netlink family: create an instance with netlink.nl80211.interface()
then list, add and delete wireless interfaces; the underlying socket is
closed by close() (or the to-be-closed __close). All methods block and
require a sleepable runtime.
See also:
Class interface
| interface:add (opts) | Adds a virtual interface to a wiphy. |
| interface:del (opts) | Deletes a virtual interface. |
| interface:list () | Lists the wireless interfaces known to the kernel. |
| interface:new ([o]) | Creates a new interface object. |
Class interface
- interface:add (opts)
-
Adds a virtual interface to a wiphy.
Parameters:
- opts
table
interface parameters: wiphy (radio index, from
netlink.nl80211.wiphy),
nameandiftype(annl80211.iftype).
Returns:
-
integer
the new interface's
ifindex.Raises:
on a netlink error (e.g. the name is taken or the iftype unsupported). - opts
table
interface parameters: wiphy (radio index, from
netlink.nl80211.wiphy),
- interface:del (opts)
-
Deletes a virtual interface.
Parameters:
- opts
table
interface parameters:
ifindex.
Raises:
on a netlink error. - opts
table
interface parameters:
- interface:list ()
-
Lists the wireless interfaces known to the kernel.
Returns:
-
table
list of
{ifindex, name, wiphy, iftype, mac}tables (macis 6 raw bytes). - interface:new ([o])
-
Creates a new interface object.
Parameters:
- o table an initial object table. (optional)
Returns:
-
interface
the new interface object.
See also: