networkstatus
The networkstatus component provides access to the current networking status of the player. It provides the current state as opposed to the intended configuration. For example, the current IP addresses assigned to network interfaces can be retrieved from networkstatus when the player is configured to use DHCP. This component can be used to determine the actual IP addresses and other network settings that are currently active.
networkstatus IDL
[
Constructor()
] interface NetworkStatus {
Promise<NetworkHostStatus> getHostStatus();
Promise<DiagnosticWebServerStatus> getDiagnosticWebServerStatus();
Promise<RemoteLoginStatus> getRemoteLoginStatus();
Promise<NetworkInterfaceStatus> getInterfaceStatus(string interfaceName);
Promise<WifiInterfaceStatus> getInterfaceWifiStatus(string interfaceName);
Promise<Array<string>> getPresentNetworkInterfaces();
Promise<Array<NetworkStatusRoute>> getRoutes(string protocol); // "IPv4" or "IPv6"
};
interface NetworkHostStatus {
attribute string hostName;
attribute string mDnsHostName;
attribute Array<string> domainSearchPath;
attribute Array<string> domainNameServers;
attribute Array<string> timeServers;
attribute string? proxy;
attribute Array<string>? proxyBypass;
attribute string? crashUrl;
attribute string? errorUrl;
attribute string? recoveryUrl;
};
interface DiagnosticWebServerStatus {
attribute short? port;
};
interface RemoteLoginStatus {
attribute unsigned short? telnetPort; // Not present if not enabled
attribute unsigned short? sshPort; // Not present if not enabled
};
interface NetworkInterfaceStatus {
attribute string? type;
attribute bool present; // Interface is actually present (e.g. WiFi may be configured but removed)
attribute string presentStatus;
attribute bool? hasLink;
attribute string? macAddress;
attribute bool? isVlan; // This interface is itself a VLAN
attribute short? vlanTag;
attribute string? parentInterface; // The underlying physical interface for a VLAN
attribute Array<short>? vlanChildTagList; // VLANs on this interface. Includes zero for untagged.
attribute Array<NetworkStatusIpAddress>? ipAddressList; // Includes all IPv4 and IPv6 addresses
attribute long? inboundShaperRate;
attribute Array<string>? domainSearchPath;
attribute Array<string>? domainNameServers;
};
interface NetworkStatusIpAddress {
attribute string family; // "IPv4" or "IPv6"
attribute string scope;
attribute string? address; // "172.30.1.30" or "fd44:d8b8:cab5:cb01::19"
attribute string? netmask; // IPv4 only
attribute string? broadcast; // IPv4 only
attribute int? prefixLength; // IPv4 and IPv6
attribute string? cidr; // Address with prefix length in CIDR notation
};
interface WifiInterfaceStatus {
attribute string mode; // "AP" or "STA"
attribute bool? connected; // (Not present in AP mode.)
attribute string? essid;
attribute string? bssid; // (Not present in AP mode.)
attribute string? frequency; // In MHz to match other APIs
attribute int? signalStrength; // In dBm
};
interface NetworkStatusRoute {
attribute string destination; // or "default"
attribute string? source;
attribute int metric;
attribute Array<NextHops> nextHops;
};
interface NetworkStatusNextHop {
attribute string? gateway;
attribute string? interface;
}
ON THIS PAGE
Object Creation
To create a networkstatus component, load the @brightsign/networkstatus module using the require()
method.
const NetworkStatus = require("@brightsign/networkstatus");
let networkStatus = new NetworkStatus();
NetworkStatus
getHostStatus()
Promise<NetworkHostStatus> getHostStatus()
Returns information about the network status of the player as a whole.
getDiagnosticWebServerStatus()
Returns information about the status of the diagnostic web server.
getRemoteLoginStatus()
Returns information about the status of the player related to remote shell access.
getInterfaceStatus()
Returns information about the current status of the specified network interface.
getInterfaceWifiStatus()
Returns information about the current WiFi status of the specified wireless network interface.
getPresentNetworkInterfaces()
Returns an array containing the names of all the external network interfaces present on the player. Does not include the loopback interface.
getRoutes()
Returns an array of the current network routes for the specified protocol.
NetworkHostStatus
hostName
string: The player's current host name.mDnsHostName
string: The player's current Multicast DNS host name. This will usually be the player's host name with ".local" on the end, but can differ if there are conflicts on the local network.domainSearchPath
Array<string>: A list of suffices that will be applied to unqualified domain names when looking them up in DNS. This is the combination of the search paths for all active network interfaces.domainNameServers
Array<string>: A list of the current DNS servers that will be consulted when performing name look ups. This is the combination of all the DNS servers for all active network interfaces.timeServers
Array<string>: A list of the current time servers that will be used to set the player's clock. Currently this will contain either zero or one entry, but it may contain more in the future.proxy
string optional: The currently active network proxy server, if any.proxyBypass
Array<string> optional: A list of host name suffices for which the proxy will be bypassed (IP addresses cannot be used)crashUrl
string optional: The URL to which player crash dumps will be posted, if any.errorUrl
string optional: The URL to which BrightScript errors will be posted, if any.recoveryUrl
string optional: The URL which will be consulted to determine whether the player should enter recovery, if any.
DiagnosticWebServerStatus
port
short optional: The port number that the web server will be run on. If the web server is disabled then this attribute will not be present.
RemoteLoginStatus
telnetPort
unsigned short optional: The port number that the player will listen to telnet connections on. If telnet is not enabled then this attribute will not be present.sshPort
unsigned short optional: The port number that the player will listen for secure shell connections on. If ssh is not enabled then this attribute will not be present.
NetworkInterfaceStatus
type
string optional: If the interface is present, this attribute will contain "Wired", "WiFi", "Dialup" or "Unknown". Note that some USB network devices may appear to the BrightSign player to be of one type when they are actually a different type. For example, some broadband modems appear as "Wired" Ethernet devices.present
bool: Indicates whether the specified network interface is currently present on the player.presentStatus
string: Provides extra human-readable information explaining why the interface is not present. For example, a VLAN interface may not have been enabled on its corresponding physical interface.hasLink
bool optional: Indicates whether the network interface currently has linkmacAddress
string optional: Contains the hardware MAC address for network interfaces that have one.isVlan
bool optional: Indicates whether this network interface is a VLAN on another lower network interface.vlanTag
short optional: If this interface is a VLAN, this attribute contains the tag value that will be used on the lower interface.parentInterface
string optional: If this interface is a VLAN, this attribute contains the name of the lower interface that packets will be sent on.vlanChildTagList
Array<short> optional: If this network interface has VLAN interfaces running above it then this array contains all of their tag values. The special tag value of zero indicates that this interface is also used itself untagged.ipAddressList
Array<NetworkStatusIpAddress> optional: A list of all IPv4 and IPv6 addresses assigned to this network interface.inboundShaperRate
long optional: If an inbound bandwidth shaper is enabled for this interface, this attribute contains the rate in bits per second.domainSearchPath
Array<string> optional: A list of suffices that this network interface contributes to the host configuration when this network interface is active. See NetworkHostStatus.domainNameServers
Array<string> optional: A list of DNS servers that this network interface contributes to the host configuration when this network interface is active. See NetworkHostStatus.
NetworkStatusIpAddress
family
string: Contains the address family: "IPv4" or "IPv6"scope
string: Mainly useful for IPv6 addresses, this attribute indicates the scope of the address. Possible values are "global", "site", "link", "host" and "nowhere".address
string optional: The actual address as a string.netmask
string optional: For IPv4 addresses only this attribute contains the prefix length expressed as a traditional netmask.broadcast
string optional: For IPv4 addresses only this attribute contains the network broadcast address.prefixLength
int optional: For IPv4 and IPv6 addresses this attribute contains the number of bits of the address that are used to identify the network.cidr
string optional: For IPv4 and IPv6 addresses this attribute contains the address and prefix length in classless inter-domain routing (CIDR) syntax: address/prefix.
WifiInterfaceStatus
mode
string: Indicates which mode the WiFi interface is currently in. When in "AP" mode the interface is acting as a wireless access point for other wireless devices to connect to. In "STA" mode the interface is acting as a client to another wireless access point.connected
bool optional: If the interface is in "STA" mode, indicates whether the interface is connected to an access point. In "AP" mode this attribute is not present.essid
string optional: If the interface is in "STA" mode, indicates the ESSID of the AP that the interface is connected to. In "AP" mode, indicates the ESSID that the wireless interface is advertising for clients to connect to.bssid
string optional: If the interface is in "STA" mode, indicates the BSSID of the AP that the interface is connected to. In "AP" mode this attribute is not present.frequency
string optional: The frequency that the wireless interface radio is currently using, in MHz.signalStrength
int optional: The current signal strength, in dBm.
NetworkStatusRoute
destination
string: The route destination or "default" for the default route.metric
int: The priority for the route. Lower priority routes are preferred.nextHops
Array<NextHops>: A list of where packets subject to this route will be sent next. This list currently contains only one element.
NetworkStatusNextHop
gateway
string optional: The address to which packets will be sent.interface
string optional: The network interface on which packets will be sent.