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:

Returns:

    integer the new interface's ifindex.

Raises:

on a netlink error (e.g. the name is taken or the iftype unsupported).
interface:del (opts)
Deletes a virtual interface.

Parameters:

  • opts table interface parameters: ifindex.

Raises:

on a netlink error.
interface:list ()
Lists the wireless interfaces known to the kernel.

Returns:

    table list of {ifindex, name, wiphy, iftype, mac} tables (mac is 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:

generated by LDoc 1.5.0 Last updated 2026-09-05 12:27:44