• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiNetwork

Class Summary

Extends:
  • ToiEventTarget

This interface represents a logical network. A logical network encapsulates a network interface and settings used to configure the network interface and the system's network related properties such as DNS and routes.

Technical Preview:

This interface is a TECHNICAL PREVIEW, it may change.
  • Methods
  • Members
  • Types
  • Events

Method Summary

applySettings ( callbacks , settings )  → operation Apply the provided settings.
getConnectedAccessPointInfo ( )  → apInfo

Returns the currently connected access point.

getNetworkInfo ( )  → networkInfo Returns the current network info.
getSettings ( )  → settings

Returns the network settings.

scanWifi ( callbacks , ssid )  → operation

This asynchronous method is used to scan for available APs.

Inherited Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Type Definitions

ToiAddressAcquisitionMethod (Type: enum)

The IP address acquisition method.

  • ADDRESS_ACQUISITION_DHCP
  • ADDRESS_ACQUISITION_DHCP_IPV4
  • ADDRESS_ACQUISITION_DHCP_IPV6
  • ADDRESS_ACQUISITION_NONE
ToiAddressScope (Type: enum)

Specifies the address scope where this network's IP address is valid.

  • ADDRESS_SCOPE_GLOBAL
  • ADDRESS_SCOPE_HOST
  • ADDRESS_SCOPE_LINK
  • ADDRESS_SCOPE_SITE
ToiDeviceFeature (Type: enum)

Specifies the availability of a particular feature for a device.

  • DEVICE_FEATURE_AUTO_NEGOTIATE
  • DEVICE_FEATURE_FLOW_CONTROL
  • DEVICE_FEATURE_JUMBO_PACKET
  • DEVICE_FEATURE_WAKE_ON_LAN
ToiDuplexMode (Type: enum)

Specifies whether the device can handle full- or half-duplex mode.

  • DUPLEX_MODE_FULL
  • DUPLEX_MODE_HALF
  • DUPLEX_MODE_UNKNOWN
ToiInterfaceType (Type: enum)
  • INTERFACE_TYPE_ETHERNET
  • INTERFACE_TYPE_WIFI
ToiIpVersion (Type: enum)

Specifies the IP version.

  • IP_VERSION_V4
  • IP_VERSION_V6
ToiNameServer (Type: string)

DNS name server IP address.

ToiSearchPath (Type: string)

Desired domain search path.

ToiState (Type: enum)

Specifies the network state.

  • STATE_DISABLED
  • STATE_FAILED
  • STATE_READY
  • STATE_WAITING
ToiWifiAuthenticationType (Type: enum)

WiFi authentication types.

  • WIFI_AUTHENTICATION_TYPE_OPEN
  • WIFI_AUTHENTICATION_TYPE_SHARED
  • WIFI_AUTHENTICATION_TYPE_UNSUPPORTED
  • WIFI_AUTHENTICATION_TYPE_WPA2_PSK
  • WIFI_AUTHENTICATION_TYPE_WPA_PSK
  • WIFI_AUTHENTICATION_TYPE_WPS
ToiWifiBand (Type: enum)

Wi-Fi radio band.

  • WIFI_BAND_2G
  • WIFI_BAND_5G
ToiWifiEncryptionType (Type: enum)

WiFi encryption methods.

  • WIFI_ENCRYPTION_TYPE_AES_CCMP
  • WIFI_ENCRYPTION_TYPE_NONE
  • WIFI_ENCRYPTION_TYPE_TKIP
  • WIFI_ENCRYPTION_TYPE_UNSUPPORTED
  • WIFI_ENCRYPTION_TYPE_WEP
ToiWifiEvent (Type: enum)

WiFi events.

  • WIFI_CONNECTED
  • WIFI_CONNECTING
  • WIFI_DISCONNECTED
  • WIFI_FAILED_AP_AUTH
  • WIFI_FAILED_AP_UNAVAILABLE
  • WIFI_FAILED_INTERNAL
  • WIFI_FAILED_WPS_CONNECTION_TIMEOUT
  • WIFI_FAILED_WPS_MULTIPLE_AP_ACTIVE
  • WIFI_WPS_HANDSHAKE_COMPLETED
  • WIFI_WPS_PAIRING
  • WIFI_WPS_SCANNING_COMPLETED
ToiWifiMode (Type: enum)

WiFi modes.

  • WIFI_MODE_802_11A
  • WIFI_MODE_802_11AC
  • WIFI_MODE_802_11B
  • WIFI_MODE_802_11G
  • WIFI_MODE_802_11N
  • WIFI_MODE_AUTO

Events

  • ON_NETWORK_INFO_CHANGED
  • ON_WIFI_CHANGED

Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

Inherited From:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

The JavaScript function that will receive events.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.

applySettings ( callbacks , settings )  → operation

This function will apply the provided network settings. It is possible to omit optional properties in which case those settings will remain unchanged. This method may fail and throw an exception if the provided settings does not lie within the network's capabilities. Besides this the function will always succeed. Waiting for the asynchonous callback does not guarantee that any settings have been applied.

Note that a network's settings are applied in many other places besides calls to this function, for example when the box is booting or when link status changes. Because of this the network's state is the only safe way to detect failures to apply the settings since it may depend on external factors.

Parameters:

Name Type Description
callbacks AsyncCallback

Object with callback functions for the asynchronous operation. No result is produced by this method, so callbacks.onResult() will not be invoked..

settings ToiNetwork.ToiSettings

A set of network settings to apply.

Throws:

ToiInvalidArgumentException

Raised if an invalid operation identifier passed or if the provided settings does not lie within the network's capabilities.

Returns:

operation The asynchronous operation created by the function.

Type: ToiAsynchronousOperation
getConnectedAccessPointInfo ( )  → apInfo

Returns the currently connected access point.

Throws:

ToiInvalidPreconditionException

Raised if the WiFi interface is not enabled or if WiFi device is not up.

Returns:

Access point information.

Type: ToiNetwork.ToiWifiAccessPointInfo
getNetworkInfo ( )  → networkInfo

This function will return the current status of the network.

Returns:

The current network info.

Type: ToiNetwork.ToiInformation
getSettings ( )  → settings

Returns the network settings.

Returns:

The current network settings for this network.

Type: ToiNetwork.ToiSettings
removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

The JavaScript function that was previously added as an event listener.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.

scanWifi ( callbacks , ssid )  → operation

This asynchronous method is used to scan for available APs.

Parameters:

Name Type Description
callbacks AsyncCallback

Object with callback functions for the asynchronous operation. callbacks.onResult() will be invoked with a parameter of type Array.<ToiNetwork.ToiWifiAccessPointInfo> when the operation completes.

ssid string

The network name to scan for. In case of an empty string all APs will be passively scanned. Otherwise the STB will perform an active scan using the supplied SSID. This is useful when the AP isn't broadcasting the SSID.

Throws:

ToiInvalidArgumentException

Raised if an invalid operation identifier passed.

ToiBusyException

Raised if a scan already in progress.

ToiInvalidPreconditionException

Raised if the WiFi interface is not enabled or if WiFi device is not up.

Returns:

operation The asynchronous operation created by the function.

Type: ToiAsynchronousOperation

Members

ON_NETWORK_INFO_CHANGED (Type: ToiNetworkNetworkInfoChangedEvent) (value = 4500) (static, constant)

This is an Event identifier for ToiNetworkNetworkInfoChangedEvent.

Called when the network's info changes.

This constant can be also be accessed from toi.consts.ToiNetwork.ON_NETWORK_INFO_CHANGED.
ON_WIFI_CHANGED (Type: ToiNetworkWifiChangedEvent) (value = 4501) (static, constant)

This is an Event identifier for ToiNetworkWifiChangedEvent.

Called when something happens to the wifi network.

This constant can be also be accessed from toi.consts.ToiNetwork.ON_WIFI_CHANGED.
ADDRESS_ACQUISITION_DHCP (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 1) (static, constant)

Acquires both IPv4 and IPv6 addresses via DHCP.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_DHCP.
ADDRESS_ACQUISITION_DHCP_IPV4 (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 2) (static, constant)

Acquires only IPv4 address via DHCP.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_DHCP_IPV4.
ADDRESS_ACQUISITION_DHCP_IPV6 (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 3) (static, constant)

Acquires only IPv6 address via DHCP.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_DHCP_IPV6.
ADDRESS_ACQUISITION_NONE (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 0) (static, constant)

Disables any automatic address acquisition and instead uses static settings.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_NONE.
ADDRESS_SCOPE_GLOBAL (Type: ToiNetwork.ToiAddressScope) (value = 3) (static, constant)

The address is globally valid.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_GLOBAL.
ADDRESS_SCOPE_HOST (Type: ToiNetwork.ToiAddressScope) (value = 0) (static, constant)

The address is only valid on this host.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_HOST.
ADDRESS_SCOPE_LINK (Type: ToiNetwork.ToiAddressScope) (value = 1) (static, constant)

The address is only valid for use on the local network.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_LINK.
ADDRESS_SCOPE_SITE (Type: ToiNetwork.ToiAddressScope) (value = 2) (static, constant)

(IPV6 only) The address is only valid for use on this site. (Deprecated in rfc4291, should be treated as global).

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_SITE.
DEVICE_FEATURE_AUTO_NEGOTIATE (Type: ToiNetwork.ToiDeviceFeature) (value = 4) (static, constant)

Indicates whether the auto negotiate enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_AUTO_NEGOTIATE.
DEVICE_FEATURE_FLOW_CONTROL (Type: ToiNetwork.ToiDeviceFeature) (value = 1) (static, constant)

Indicates whether the flow control enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_FLOW_CONTROL.
DEVICE_FEATURE_JUMBO_PACKET (Type: ToiNetwork.ToiDeviceFeature) (value = 2) (static, constant)

Indicates whether the jumbo packet enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_JUMBO_PACKET.
DEVICE_FEATURE_WAKE_ON_LAN (Type: ToiNetwork.ToiDeviceFeature) (value = 8) (static, constant)

Indicates whether the WOL feature is enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_WAKE_ON_LAN.
DUPLEX_MODE_FULL (Type: ToiNetwork.ToiDuplexMode) (value = 2) (static, constant)

Specifies full duplex mode.

This constant can be also be accessed from toi.consts.ToiNetwork.DUPLEX_MODE_FULL.
DUPLEX_MODE_HALF (Type: ToiNetwork.ToiDuplexMode) (value = 1) (static, constant)

Specifies half duplex mode.

This constant can be also be accessed from toi.consts.ToiNetwork.DUPLEX_MODE_HALF.
DUPLEX_MODE_UNKNOWN (Type: ToiNetwork.ToiDuplexMode) (value = 0) (static, constant)

Specifies that the duplex mode is unknown.

This constant can be also be accessed from toi.consts.ToiNetwork.DUPLEX_MODE_UNKNOWN.
INTERFACE_TYPE_ETHERNET (Type: ToiNetwork.ToiInterfaceType) (value = 0) (static, constant)

The interface is of ethernet type.

This constant can be also be accessed from toi.consts.ToiNetwork.INTERFACE_TYPE_ETHERNET.
INTERFACE_TYPE_WIFI (Type: ToiNetwork.ToiInterfaceType) (value = 1) (static, constant)

The interface is of WiFi type.

This constant can be also be accessed from toi.consts.ToiNetwork.INTERFACE_TYPE_WIFI.
IP_VERSION_V4 (Type: ToiNetwork.ToiIpVersion) (value = 0) (static, constant)

IP version 4, implies the InterNetwork address family.

This constant can be also be accessed from toi.consts.ToiNetwork.IP_VERSION_V4.
IP_VERSION_V6 (Type: ToiNetwork.ToiIpVersion) (value = 1) (static, constant)

IP version 6, implies the InterNetwork6 address family.

This constant can be also be accessed from toi.consts.ToiNetwork.IP_VERSION_V6.
STATE_DISABLED (Type: ToiNetwork.ToiState) (value = 0) (static, constant)

The network is not available. For Ethernet, it could be that the cable is disconnected or the link is down. For WiFi, it could be disconnected and there is no credential stored.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_DISABLED.
STATE_FAILED (Type: ToiNetwork.ToiState) (value = 2) (static, constant)

The network failed. This may happen when no access point is found or no DHCP server is found for dynamic configuration.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_FAILED.
STATE_READY (Type: ToiNetwork.ToiState) (value = 3) (static, constant)

The network has been successfully configured and is ready to use.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_READY.
STATE_WAITING (Type: ToiNetwork.ToiState) (value = 1) (static, constant)

The network is active and is waiting for dynamic configuration or is currently connecting to a WiFi access point.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_WAITING.
WIFI_AUTHENTICATION_TYPE_OPEN (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 1) (static, constant)

Designates the open authentication method.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_OPEN.
WIFI_AUTHENTICATION_TYPE_SHARED (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 2) (static, constant)

Designates the shared authentication method. Deprecated in 802.11-2012 and should only be used for backward compatibility.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_SHARED.
WIFI_AUTHENTICATION_TYPE_UNSUPPORTED (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 0) (static, constant)

Designates an unsupported authentication method.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_UNSUPPORTED.
WIFI_AUTHENTICATION_TYPE_WPA2_PSK (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 8) (static, constant)

Designates WPA2 authentication with a pre-shared key. Can be combined with ToiNetwork.WIFI_ENCRYPTION_TYPE_TKIP or ToiNetwork.WIFI_ENCRYPTION_TYPE_AES_CCMP.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_WPA2_PSK.
WIFI_AUTHENTICATION_TYPE_WPA_PSK (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 4) (static, constant)

Designates WPA authentication with a pre-shared key. Can be combined with ToiNetwork.WIFI_ENCRYPTION_TYPE_TKIP or ToiNetwork.WIFI_ENCRYPTION_TYPE_AES_CCMP.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_WPA_PSK.
WIFI_AUTHENTICATION_TYPE_WPS (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 16) (static, constant)

Designates WPS authentication. Encryption type is ignored with this type of authentication.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_WPS.
WIFI_BAND_2G (Type: ToiNetwork.ToiWifiBand) (value = 0) (static, constant)

Designates the 2.4 GHz band.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_BAND_2G.
WIFI_BAND_5G (Type: ToiNetwork.ToiWifiBand) (value = 1) (static, constant)

Designates the 5 GHz band.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_BAND_5G.
WIFI_CONNECTED (Type: ToiNetwork.ToiWifiEvent) (value = 4) (static, constant)

Wi-Fi link to the AP is established.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_CONNECTED.
WIFI_CONNECTING (Type: ToiNetwork.ToiWifiEvent) (value = 3) (static, constant)

Wi-Fi adapter is connecting to the AP.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_CONNECTING.
WIFI_DISCONNECTED (Type: ToiNetwork.ToiWifiEvent) (value = 5) (static, constant)

Wi-Fi link is lost.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_DISCONNECTED.
WIFI_ENCRYPTION_TYPE_AES_CCMP (Type: ToiNetwork.ToiWifiEncryptionType) (value = 8) (static, constant)

Designates AES CCMP style encryption.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_AES_CCMP.
WIFI_ENCRYPTION_TYPE_NONE (Type: ToiNetwork.ToiWifiEncryptionType) (value = 1) (static, constant)

Encryption not used.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_NONE.
WIFI_ENCRYPTION_TYPE_TKIP (Type: ToiNetwork.ToiWifiEncryptionType) (value = 4) (static, constant)

Designates TKIP style encryption.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_TKIP.
WIFI_ENCRYPTION_TYPE_UNSUPPORTED (Type: ToiNetwork.ToiWifiEncryptionType) (value = 0) (static, constant)

Designates an unsupported encryption method.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_UNSUPPORTED.
WIFI_ENCRYPTION_TYPE_WEP (Type: ToiNetwork.ToiWifiEncryptionType) (value = 2) (static, constant)

Designates WEP style encryption. Only available together with ToiNetwork.WIFI_AUTHENTICATION_TYPE_SHARED.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_WEP.
WIFI_FAILED_AP_AUTH (Type: ToiNetwork.ToiWifiEvent) (value = 6) (static, constant)

Wi-Fi connect failed, bad authentication.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_AP_AUTH.
WIFI_FAILED_AP_UNAVAILABLE (Type: ToiNetwork.ToiWifiEvent) (value = 7) (static, constant)

Wi-Fi connect failed, AP unavailable.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_AP_UNAVAILABLE.
WIFI_FAILED_INTERNAL (Type: ToiNetwork.ToiWifiEvent) (value = 8) (static, constant)

Wi-Fi connect failed due to internal error.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_INTERNAL.
WIFI_FAILED_WPS_CONNECTION_TIMEOUT (Type: ToiNetwork.ToiWifiEvent) (value = 10) (static, constant)

Wi-Fi connect failed, time out.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_WPS_CONNECTION_TIMEOUT.
WIFI_FAILED_WPS_MULTIPLE_AP_ACTIVE (Type: ToiNetwork.ToiWifiEvent) (value = 9) (static, constant)

Wi-Fi connect failed, several APs with WPS active at the same time.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_WPS_MULTIPLE_AP_ACTIVE.
WIFI_MODE_802_11A (Type: ToiNetwork.ToiWifiMode) (value = 1) (static, constant)

802.11A

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11A.
WIFI_MODE_802_11AC (Type: ToiNetwork.ToiWifiMode) (value = 16) (static, constant)

802.11AC

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11AC.
WIFI_MODE_802_11B (Type: ToiNetwork.ToiWifiMode) (value = 2) (static, constant)

802.11B

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11B.
WIFI_MODE_802_11G (Type: ToiNetwork.ToiWifiMode) (value = 4) (static, constant)

802.11G

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11G.
WIFI_MODE_802_11N (Type: ToiNetwork.ToiWifiMode) (value = 8) (static, constant)

802.11N

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11N.
WIFI_MODE_AUTO (Type: ToiNetwork.ToiWifiMode) (value = 32) (static, constant)

Automatic choice of mode.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_AUTO.
WIFI_WPS_HANDSHAKE_COMPLETED (Type: ToiNetwork.ToiWifiEvent) (value = 2) (static, constant)

Wi-Fi adapter has finished handshake operation.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_WPS_HANDSHAKE_COMPLETED.
WIFI_WPS_PAIRING (Type: ToiNetwork.ToiWifiEvent) (value = 0) (static, constant)

Wi-Fi adapter is in pairing mode.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_WPS_PAIRING.
WIFI_WPS_SCANNING_COMPLETED (Type: ToiNetwork.ToiWifiEvent) (value = 1) (static, constant)

Wi-Fi adapter has finished scan operation.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_WPS_SCANNING_COMPLETED.
ToiCapabilities (Type: struct) (static)

Specifies a network's capabilities.

Struct fields

Name Description
hasIpv6

IPv6 support.

Type: boolean
hasWifi

Indicates if the network has access to a Wi-Fi enabled device.

Type: boolean
isConfigurable

A configurable network allows changes to its settings.

Type: boolean
isIpRequired

Indicates that at least one IP address is required, static or dynamic. Address acquisition set to none and no static IP addresses are not allowed.

Type: boolean
maxAddressEntries

Maximum number of IP address entries.

Type: number
maxDnsEntries

Maximum number of DNS entries.

Type: number
maxRouteEntries

Maximum number of route entries (i.e. default gateways).

Type: number

ToiDhcpInfo (Type: struct) (static)

Specifies DHCP related information about a network.

Struct fields

Name Description
leaseRemainingTime

Remaining time in seconds of the IP address lease.

Type: number
leaseTime

IP address lease time in seconds.

Type: number
renewalAttemptCount

Number of renewal attempts.

Type: number
renewalSuccessCount

Number of successful renewal attempts.

Type: number
serverIpAddress
[optional]

IP address of DHCP server.

Type: string

ToiDnsInfo (Type: struct) (static)

Specifies static DNS info for a network.

Struct fields

Name Description
nameServers

A list of DNS name server IP addresses (strings). This can be both IPv4 and IPv6 addresses.

Type: Array.<ToiNetwork.ToiNameServer>
searchPaths

A list of DNS search paths (strings). Note that search paths settings are not persistent across reboots.

Type: Array.<ToiNetwork.ToiSearchPath>

ToiInformation (Type: struct) (static)

Describes the current status of the network.

Struct fields

Name Description
capabilities

Specifies the network's capabilities. This determines if and how the network can be configured and used.

Type: ToiNetwork.ToiCapabilities
dnsInfo

The current dns info.

Type: ToiNetwork.ToiDnsInfo
interfaceInfo

The current interface info, such as IP address, statistics and more.

Type: ToiNetwork.ToiInterfaceInfo
routes

The network's routes.

Type: Array.<ToiNetwork.ToiRoute>
state

The current network state indicating if the network is ready to be used or not.

Type: ToiNetwork.ToiState

ToiInterfaceInfo (Type: struct) (static)

Struct fields

Name Description
duplexMode

Specifies the duplex mode used by the device.

Type: ToiNetwork.ToiDuplexMode
features

A bit mask defined in ToiNetwork.ToiDeviceFeature specifying which features are available on the device.

Type: number
hasLink

Indicates whether or not the interface has link.

Type: boolean
ipAddresses

IP addresses associated with this interface.

Type: Array.<ToiNetwork.ToiIpAddressInfo>
linkSpeed

The negotiated link speed in MBit/s.

Type: number
mac

The hardware address (MAC).

Type: string
name

The interface's name.

Type: string
statistics

The interface statistics.

Type: ToiNetwork.ToiInterfaceStatistics
type

The interface type, ethernet or WiFi.

Type: ToiNetwork.ToiInterfaceType
wifiInfo
[optional]

Wi-Fi specific interface information.

Type: ToiNetwork.ToiInterfaceWifiInfo

ToiInterfaceStatistics (Type: struct) (static)

Network interface statistics.

Struct fields

Name Description
broadcastPacketsReceived

The total number of broadcast packets received on the device (IPv4 only).

Type: number
broadcastPacketsSent

The total number of broadcast packets transmitted out of the device (IPv4 only).

Type: number
bytesReceived

The total number of bytes received on the device.

Type: number
bytesSent

The total number of bytes transmitted out of the device.

Type: number
connectivityLossCount

The count of phy layer loss since last reboot.

Type: number
discardPacketsReceived

The total number of unicast packets received on the device.

Type: number
discardPacketsSent

The total number of discard packets transmitted out of the device.

Type: number
errorsReceived

The total number of packets that could not be received on the device by the higher-layer protocol, because of errors.

Type: number
errorsSent

The total number of packets that could not be transmitted out of the device, because of errors.

Type: number
multicastPacketsReceived

The total number of multicast packets received on the device.

Type: number
multicastPacketsSent

The total number of multicast packets transmitted out of the device.

Type: number
packetsReceived

The total number of packets received on the device.

Type: number
packetsSent

The total number of packets transmitted out of the device.

Type: number
unicastPacketsReceived

The total number of unicast packets received on the device.

Type: number
unicastPacketsSent

The total number of unicast packets transmitted out of the device.

Type: number
unknownProtoPacketsReceived

The total number of packets received on the device which are discarded because of an unknown or unsupported protocol.

Type: number

ToiInterfaceWifiInfo (Type: struct) (static)

Struct fields

Name Description
channelBandwidth

Max Channel bandwidth

Type: number
regulatoryDomain

The regulatory domain used by the interface.

Type: string
wifiStatistics

Wi-Fi related interface statistics.

Type: ToiNetwork.ToiInterfaceWifiStatistics

ToiInterfaceWifiStatistics (Type: struct) (static)

Struct fields

Name Description
measuredRate

Measured bit rate at the WiFi interface in Mb/s.

Type: number
retransmissionCount

Number of retransmissions. Not necessarily the same as the number of dropped packets which is an IP metric.

Type: number
signalNoiseRatio

Signal-to-noise ratio in tenths of a dB, i.e. the value 251 means 25.1 dB. When the receiver does not have channel lock this value is -1.

Type: number

ToiIpAddress (Type: struct) (static)

Describes an IP network address used for a network's static IP settings.

Struct fields

Name Description
ipAddress

An IPv4 or IPv6 address (not including netmask/routing prefix).

Type: string
label
[optional]

An address label used to identify the address. This label will be appended to the real interface address label after the interface's name.

Type: string
netmask

A netmask to use for subnetting. Can be specified using either the dot-decimal or CIDR notation (ie. 255.255.255.0 or /24).

Type: string

ToiIpAddressInfo (Type: struct) (static)

Specifies an IP address. This can be an IP assigned by a DHCP server in which case the DHCP client status can be retrieved from this structure.

Struct fields

Name Description
addressScope

The address scope of the address of this network. This controls where this address is valid.

Type: ToiNetwork.ToiAddressScope
dhcpInfo
[optional]

The current status of the DHCP client. If this IP was not acquired by DHCP this value will be undefined.

Type: ToiNetwork.ToiDhcpInfo
ipAddress

The IP address.

Type: string
ipVersion

The IP address version.

Type: ToiNetwork.ToiIpVersion
netmask

The netmask.

Type: string

ToiRoute (Type: struct) (static)

This data type defines a default network route.

Struct fields

Name Description
gateway

The IP address of the gateway. This can be either a IPv4 or IPv6 address.

Type: string

ToiSettings (Type: struct) (static)

This data type contains permanent network settings used to configure the underlying network interface and network related tables and tools.

Struct fields

Name Description
addressAcquisitionMethod
[optional]

The acquisition method specifies how network addresses are acquired. They are usually acquired from a DHCP server which includes IP address, DNS paths and default gateway.

Type: ToiNetwork.ToiAddressAcquisitionMethod
staticSettings
[optional]

The network may contain static configuration, not obtained from a DHCP server. This includes static IP addresses, DNS and routing information such as default gateway. Note that static settings can be used together with DHCP.

Type: ToiNetwork.ToiStaticSettings
wifiSettings
[optional]

The WiFi settings property includes WiFi related settings only applicable for networks using a WiFi network interface adapter.

Type: ToiNetwork.ToiWifiSettings

ToiStaticSettings (Type: struct) (static)

This data type specifies all the available static settings for a network. Note that WiFi settings are only applicable for networks using a WiFi network interface.

Link local addresses are assigned automatically to interfaces and should not be provided manually.

Struct fields

Name Description
dnsInfo
[optional]

Static DNS info to use for this network. Note that this is used in combination with any dns information obtained from a DHCP server. Also note that this setting is not persistent across reboots in this technical preview, this behavior may change in the future.

Type: ToiNetwork.ToiDnsInfo
ipAddresses
[optional]

Specifies a set of IP addresses to associate with the network's network interface. Usually only one address is required if DHCP is not used.

Type: Array.<ToiNetwork.ToiIpAddress>
routes
[optional]

Static routes for this network. Used to specify default gateways. Note that routes are not persistent across reboots in this technical preview, this behaviour may change in the future.

Type: Array.<ToiNetwork.ToiRoute>

ToiWifiAccessPointInfo (Type: struct) (static)

Wi-Fi access point information.

Struct fields

Name Description
authentication

Authentication used by the AP.

Type: ToiNetwork.ToiWifiAuthenticationType
band

The radio band used by this access point.

Type: ToiNetwork.ToiWifiBand
bssid

The BSSID of the access point.

Type: string
channel

The channel used by the access point.

Type: number
encryption

Encryption used by the AP.

Type: ToiNetwork.ToiWifiEncryptionType
isRcpiEnabled

Denotes if received channel power indicator (RCPI) measurements can be provided.

Type: boolean
isRssiEnabled

Denotes if received signal strength indicator (RSSI) measurements can be provided.

Type: boolean
isWpsEnabled

Denotes whether the AP can handle WPS.

Type: boolean
mode

WiFi mode currently used by the AP.

Type: ToiNetwork.ToiWifiMode
rcpi

RCPI. The value will range between -110 dBm to 0 dBm in increments of 0.5dBm.

Type: double
rssi

RSSI. Note very carefully that this value is vendor specific.

Type: double
ssid

The SSID of the access point.

Type: string

ToiWifiSettings (Type: struct) (static)

Wi-Fi settings. The network will automatically reconnect to the access point if these settings are changed.

Struct fields

Name Description
authenticationType

Authentication type to use when connecting to the AP.

Type: ToiNetwork.ToiWifiAuthenticationType
bssid
[optional]

The BSSID of the AP to connect to.

Type: string
encryptionType
[optional]

Encryption to use when connecting to the AP. This value can be omitted when using WPS.

Type: ToiNetwork.ToiWifiEncryptionType
presharedKey
[optional]

Preshared key to use when connecting to the AP. This value can be omitted when using WPS.

Type: string
ssid
[optional]

The SSID of the AP to connect to if BSSID is omitted. Note that multiple APs can have the same SSID in which case the AP with the best signal is chosen.

Type: string

5.0.1

Copyright (c) 2016 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.