WifiManager.setStaticIpMode()

by 3 contributors:

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

This API is available on Firefox OS for internal applications only.

Summary

The setStaticIpMod method is used to define a static or dynamic (if the network has a DHCP server) IP address for the device on a given network.

Syntax

var request = navigator.mozWifiManager.setStaticIpMode(param);

Parameters

param
A configuration object with the following properties:
  • enabled : A boolean requesting if the static IP mode must be turned on (true) or off (false). If it's turned off and the current WiFi network is DHCP enabled, the device will get a dynamic IP.
  • ipaddr : A string representing the IP address of the device in the dotted quad format.
  • proxy :  A string representing the proxy server address (if any, otherwise an empty string).
  • maskLength : A number representing the length of the network mask.
  • gateway : A string representing a gateway address (if any, otherwise an empty string).
  • dns1 : A string representing the first DNS server address.
  • dns2 : A string representing the second DNS server address.

Returns

It returns a DOMRequest to handle the success or error of the operation.

Specification

Not part of any specification.

See also

Document Tags and Contributors

Contributors to this page: teoli, kscarfone, Jeremie
Last updated by: teoli,