Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace network

Index

Type aliases

TWlanIndex

TWlanIndex: 0 | 1 | 2 | 3

Functions

Const getConfiguration

  • getConfiguration(instance?: Got): Promise<undefined | { dns: { primary: string; secondary: string }; externalIp: string; gateway: string; interfaceName: string; isManualDnsSet: boolean; isManualMacSet: boolean; isManualMtuSet: boolean; isPasswordDisabled: boolean; isPrivateIpAllowed: boolean; mac: string; mtu: string | number; subnetMask: string; wanMode: EWanMode; wanName: string } | { dns: undefined; externalIp: undefined; gateway: undefined; interfaceName: string; isManualDnsSet: undefined; isManualMacSet: undefined; isManualMtuSet: undefined; isPasswordDisabled: undefined; isPrivateIpAllowed: undefined; mac: undefined; mtu: undefined; subnetMask: undefined; wanMode: EWanMode; wanName: string }>
  • Get router network configuration

    Parameters

    • instance: Got = defaults.instance

      The got instance to use

    Returns Promise<undefined | { dns: { primary: string; secondary: string }; externalIp: string; gateway: string; interfaceName: string; isManualDnsSet: boolean; isManualMacSet: boolean; isManualMtuSet: boolean; isPasswordDisabled: boolean; isPrivateIpAllowed: boolean; mac: string; mtu: string | number; subnetMask: string; wanMode: EWanMode; wanName: string } | { dns: undefined; externalIp: undefined; gateway: undefined; interfaceName: string; isManualDnsSet: undefined; isManualMacSet: undefined; isManualMtuSet: undefined; isPasswordDisabled: undefined; isPrivateIpAllowed: undefined; mac: undefined; mtu: undefined; subnetMask: undefined; wanMode: EWanMode; wanName: string }>

    The network configuration with its type which is included in .wanMode

Const getConnectedMacAddresses

  • getConnectedMacAddresses(instance?: Got): Promise<{ ip: string; mac: string }[]>
  • Get connected clients' IP and mac address

    Parameters

    • instance: Got = defaults.instance

      The got instance to use

    Returns Promise<{ ip: string; mac: string }[]>

    The array of connected IP and Mac address

Const getWlanConfiguration

  • getWlanConfiguration(instance?: Got, bandType?: EWlanBandType, wlanIndex?: TWlanIndex): Promise<{ activeSpecificationIdentifier: string; actualChannelWidth: string; bandType: EWlanBandType; beaconInterval: number; centralChannel: string; channelWidth: string; controlChannel: string; country: string; encryption: string; enterprise: { encryption: string }; index: string | TWlanIndex; isBroadcasting: boolean; isChannelDisabled: boolean; isDfsSensoredChannel: boolean; isEnterprisePolicyEnabled: boolean; isLdpcEnabled: boolean; isOnline: boolean; password: string; radius: { address: string; password: string; port: string }; ssid: string; txPower: number; uiIndex: string | TWlanIndex }>
  • Get wireless configuration

    Parameters

    • instance: Got = defaults.instance

      The got instance to use

    • bandType: EWlanBandType = EWlanBandType.W2

      The band type of wireless LAN

    • wlanIndex: TWlanIndex = 0

      The index of hosted wlan, 0 for default network, and 1 to 3 for guest networks

    Returns Promise<{ activeSpecificationIdentifier: string; actualChannelWidth: string; bandType: EWlanBandType; beaconInterval: number; centralChannel: string; channelWidth: string; controlChannel: string; country: string; encryption: string; enterprise: { encryption: string }; index: string | TWlanIndex; isBroadcasting: boolean; isChannelDisabled: boolean; isDfsSensoredChannel: boolean; isEnterprisePolicyEnabled: boolean; isLdpcEnabled: boolean; isOnline: boolean; password: string; radius: { address: string; password: string; port: string }; ssid: string; txPower: number; uiIndex: string | TWlanIndex }>

    The wireless configuration

Const getWlanOptions

  • getWlanOptions(instance?: Got): Promise<{ channelWidths: { bandType: EWlanBandType; identifier: string; text: string }[]; specs: { bandType: EWlanBandType; identifier: string; text: string }[] }>
  • Get wireless LAN specification tags

    Parameters

    • instance: Got = defaults.instance

      The got instance to use

    Returns Promise<{ channelWidths: { bandType: EWlanBandType; identifier: string; text: string }[]; specs: { bandType: EWlanBandType; identifier: string; text: string }[] }>

    The available wireless LAN specification tags

Const getWpsStatus

  • getWpsStatus(instance?: Got): Promise<{ 2.4GHz: { dfs: { scanTimeLeft: number; status: undefined | string }; isOnline: boolean; wps: { activeTimeLeft: number; status: undefined | string } }; 5GHz: { dfs: { scanTimeLeft: number; status: undefined | string }; isOnline: boolean; wps: { activeTimeLeft: number; status: undefined | string } } }>
  • Get WPS and DFS status of WLANs

    Parameters

    • instance: Got = defaults.instance

      The got instance to use

    Returns Promise<{ 2.4GHz: { dfs: { scanTimeLeft: number; status: undefined | string }; isOnline: boolean; wps: { activeTimeLeft: number; status: undefined | string } }; 5GHz: { dfs: { scanTimeLeft: number; status: undefined | string }; isOnline: boolean; wps: { activeTimeLeft: number; status: undefined | string } } }>

    The WPS and DFS status

Const setWpsStatus

  • setWpsStatus(instance?: Got, bandType: EWlanBandType, action: "start" | "stop"): Promise<boolean>
  • Send WPS action request

    Parameters

    • instance: Got = defaults.instance

      The got instance to use

    • bandType: EWlanBandType

      The band type to send WPS request

    • action: "start" | "stop"

      The action

    Returns Promise<boolean>

    True if status code is 200

Generated using TypeDoc