/** * Exposes the nl80211 interface on top of the Generic Protocol layer * @module */ /// import { EventEmitter } from 'events'; import { RawNetlinkSocketOptions } from '../raw'; import { NetlinkSocketOptions, RequestOptions } from '../netlink'; import { Commands, Message } from './structs'; import { GenericNetlinkSocketOptions, GenericNetlinkSocket, GenericNetlinkSendOptions } from '../genl/genl'; import { genl } from '..'; export declare const NL80211_GENL_NAME = "nl80211"; export declare enum Nl80211MulticastGroups { CONFIG = "config", SCAN = "scan", REG = "regulatory", MLME = "mlme", VENDOR = "vendor", NAN = "nan", TESTMODE = "testmode" } export declare const NL80211_EDMG_BW_CONFIG_MIN = 4; export declare const NL80211_EDMG_BW_CONFIG_MAX = 15; export declare const NL80211_EDMG_CHANNELS_MIN = 1; export declare const NL80211_EDMG_CHANNELS_MAX = 60; export declare const NL80211_WIPHY_NAME_MAXLEN = 64; export declare const NL80211_MAX_SUPP_RATES = 32; export declare const NL80211_MAX_SUPP_HT_RATES = 77; export declare const NL80211_MAX_SUPP_REG_RULES = 128; export declare const NL80211_TKIP_DATA_OFFSET_ENCR_KEY = 0; export declare const NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY = 16; export declare const NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY = 24; export declare const NL80211_HT_CAPABILITY_LEN = 26; export declare const NL80211_VHT_CAPABILITY_LEN = 12; export declare const NL80211_HE_MIN_CAPABILITY_LEN = 16; export declare const NL80211_HE_MAX_CAPABILITY_LEN = 54; export declare const NL80211_MAX_NR_CIPHER_SUITES = 5; export declare const NL80211_MAX_NR_AKM_SUITES = 2; export declare const NL80211_MIN_REMAIN_ON_CHANNEL_TIME = 10; /** default RSSI threshold for scan results if none specified. */ export declare const NL80211_SCAN_RSSI_THOLD_OFF = -300; export declare const NL80211_CQM_TXE_MAX_INTVL = 1800; export interface Nl80211SocketOptions { } export interface Nl80211SendOptions extends GenericNetlinkSendOptions { } export declare class Nl80211Socket extends EventEmitter { readonly socket: GenericNetlinkSocket; private readonly familyId; private readonly version; constructor(socket: GenericNetlinkSocket, familyData: genl.Message, options?: Nl80211SocketOptions); private _receive; send(cmd: Commands, msg: Message, options?: Nl80211SendOptions): number; request(cmd: Commands, msg?: Message, options?: Nl80211SendOptions & RequestOptions): Promise; getPhys(): Promise>; getInterfaces(): Promise>; newInterface(wiphy: Message['wiphy'], ifname: Message['ifname'], iftype: Message['iftype'], attrs?: Message, options?: Nl80211SendOptions & RequestOptions): Promise; delInterface(ifindex: Message['ifindex'], attrs?: Message, options?: Nl80211SendOptions & RequestOptions): Promise; } export declare function createNl80211(options?: Nl80211SocketOptions & GenericNetlinkSocketOptions & NetlinkSocketOptions & RawNetlinkSocketOptions): Promise;