Lunatik

netlink.nl80211.stationModule

Station management.

An nl80211 object over the "nl80211" generic netlink family: create an instance with netlink.nl80211.station() then add, delete, authorize and list the stations of an AP interface; the underlying socket is closed by close() (or the to-be-closed __close). All methods block and require a sleepable runtime.

See also

Class station

station:__call ([pid]) Opens a session, calling the class: netlink.nl80211.station([pid]).
station:add (opts) Adds a station to an AP interface.
station:del (opts) Removes a station from an AP interface.
station:list (opts) Lists the stations of an AP interface.
station:new ([o]) Wraps a table in the class, or derives a class from it.
station:set (opts) Sets a station’s authorized state, opening or closing its controlled port.

Class station in detail

station:__call ([pid])
Opens a session, calling the class: netlink.nl80211.station([pid]).

Parameters

  • pid integer a task whose network namespace the object reaches, which holds the wiphys and interfaces nl80211 answers for; the initial network namespace when absent. (optional)

Returns

    station a new station object; nil and "ESRCH" if no task has that pid, or the task has exited.

Raises

EOPNOTSUPP on a kernel whose sockets cannot hold a namespace of their own, or ENOENT when the nl80211 family is not registered.

See also

station:add (opts)
Adds a station to an AP interface.

Parameters

  • opts table station parameters: ifindex, mac, aid, listen_interval (in beacon intervals) and supported_rates (raw rate bytes).

Raises

on a netlink error.
station:del (opts)
Removes a station from an AP interface.

Parameters

  • opts table station parameters: ifindex and mac.

Raises

on a netlink error.
station:list (opts)
Lists the stations of an AP interface.

Parameters

  • opts table list options: ifindex, the AP interface.

Returns

    table list of {mac} tables.
station:new ([o])
Wraps a table in the class, or derives a class from it. It opens no socket: calling the class does, netlink.nl80211.station().

Parameters

  • o table an initial object table. (optional)

Returns

    station the wrapped table or the derived class.

See also

station:set (opts)
Sets a station’s authorized state, opening or closing its controlled port.

Parameters

  • opts table station parameters: ifindex, mac and authorized.

Raises

on a netlink error.