Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titlenetworkconfiguration IDL
collapsetrue
[
    GarbageCollected
    Constructor(DOMString ifName)
] interface NetworkInterface {
    attribute DOMString type; // values: wifi, ethernet, modem
    NetworkInterfaceConfig defaultConfig();
    Promise <dynamic> getConfig(); // Promise will be resolved as WifiInterfaceConfig, ModemInterfaceConfig, EthernetInterfaceConfig
    Promise <void> applyConfig(NetworkInterfaceConfig config);
    [type == "ethernet"] Promise <LLDPNeighborInformation> getNeighborInformation();
    [type == "ethernet"] Promise <void> enableLeds();
    [type == "wifi"] Promise <WifiAccessPointList> scan();
};

interface WifiAccessPointList {
    attribute DOMString essId;
    attribute DOMString bssId;
    attribute long signal;
};

interface LLDPNeighborInformation {
    // Information is directly converted from LLDP.
};

interface NetworkInterfaceConfig {
    attribute long metric;
    [optional = CONFIG_DHCP_SERVER] attribute DHCPServerConfig dhcpServerConfig;
    attribute DOMStringList dnsServerList;
    attribute IPAddressList ipAddressList;
    attribute long inboundShaperRate;
    attribute long mtu;
    [optional = CONFIG_VLAN] attribute DOMIntegerList vlanIdList;
    attribute DOMString clientIdentifier;
    attribute DOMString domain;
};

[optional = CONFIG_DIALUP] interface DialUpInterfaceConfig : public NetworkInterfaceConfig {
    attribute DOMString user;
    attribute DOMString password;
    attribute DOMString number;
    attribute DOMString initString;
};

interface DHCPServerConfig {
    attribute DOMString start;
    attribute DOMString end;
};

interface IPAddress {
    attribute DOMString family;
    attribute DOMString address;
    attribute DOMString prefixnetmask;
	attribute DOMString gateway;
 	attribute DOMString netmaskbroadcast;
};

interface EthernetInterfaceConfig : public NetworkInterfaceConfig {
    attribute DOMString securityMode;
    attribute DOMString identity;
    attribute DOMString eapTlsOptions;
    attribute DOMString caCertificates;
    attribute DOMString clientCertificate;
    attribute DOMString privateKey;
};

interface WifiInterfaceConfig : public NetworkInterfaceConfig{
    attribute DOMString essId;
    attribute DOMString passphrase;
    attribute DOMString obfuscatedPassphrase;
    attribute DOMString country;
    attribute DOMString securityMode;
    attribute DOMString identity;
    attribute DOMString eapTlsOptions;
    attribute DOMString caCertificates;
    attribute DOMString clientCertificate;
    attribute DOMString privateKey;
    [optional = CONFIG_WIFI_AP] attribute bool accessPointMode;
    [optional = CONFIG_WIFI_AP] attribute long accessPointFrequency;
};

...

This interface contains settings related to the DHCP server on the WiFi access point. This interface is only applicable if the player is using WiFi access-point mode.

  • [DOMString] start: The beginning of the range of offered IP addresses
  • [DOMString] end: The end of the range of offered IP addresses

...

  • [DOMString] family: The IP configuration ("IPv4" or "IPv6").
  • [DOMString] address: The IP address
  • [DOMString] prefixnetmask: The network prefixnetmask
  • [DOMString] netmaskgateway: The netmaskgateway
  • [DOMString] broadcast: The broadcast address

LLDPNeighborInformation

This interface contains location information received from the network infrastructure using the LLDP-MED protocol.

...