/pps/services/networking/control

The Network Manager service listens for commands on this control object

Publishers
Network Manager; any app
Subscribers
Network Manager; any app
Note: This object is a server object, designed to process requests from individual clients and deliver the results to the clients that issued the requests. For more information, see the "Server objects" subsection.

Message/response format

Commands sent to the /pps/services/networking/control object are of the form:

msg::command_string\nid::ID_number\ndat:json:{JSON_data}

Responses always reflect the command_string and ID_number that were sent in the message, along with any errors:

res::command_string\nid::ID_number\ndat:json:{JSON_data}\nerr::error_description

Commands

The control object accepts these commands:

net_connected
Informs Network Manager of a network link becoming available. Contains the connected interface and specified networking parameters. The interface value is that given by the ifconfig utility.
net_disconnected
Informs Network Manager that the specified interface was disconnected.
net_disconnecting
Informs Network Manager of an imminent shutdown of the specified interface, allowing clients to clean up gracefully before the interface is torn down.
Note: Network Manager publishes a notice of the impending shutdown to the appropriate /pps/services/networking/all/interfaces/interface object.
net_dyn
Supplies Network Manager with dynamic configuration data. The response will contain the err attribute on error and will be empty on success.

The following table shows the command format:

msg:: id:: dat:json:
net_connected Number ["interface"{"parameter":"value", ...}]
net_disconnected Number interface
net_disconnecting Number ["interface"|"interface",{"deadline":milliseconds}]
net_dyn Number ["interface",{"gateway":"addr","nameservers":["addr","addr"],"searchdomains":"domain"}]

Networking parameters

Parameter Description
ftpproxy IPv4 FTP proxy.
ftpproxy6 IPv6 FTP proxy.
htpproxy IPv4 HTTP proxy.
htpproxy6 IPv6 HTTP proxy.
httpsroxy IPv4 HTTPS proxy.
httpsproxy6 IPv6 HTTPS proxy.
manual Possible values:
  • yes—if set, these settings apply:
    • ip_address=
    • gateway=
    • netmask=
    • nameservers=
    • searchdomains=
  • no—if set, these settings apply:
    • dhcp=on|off|auto
    • dhcp6=on|off|auto
manual6 Possible values:
  • yes—if set, these settings apply:
    • ip6_address=
    • ip6_netmask=
type The type of network interface. Possible values:
  • bb (any BlackBerry Bridge BIS-B/BES-B or BBIO HTTP proxy connection)
  • bluetooth_dun (any Bluetooth tethering interface)
  • cellular (any cellular network interface)
  • usb (any direct USB cable to a PC or Mac)
  • vpn (any VPN tunnel)
  • wifi (any wireless network interface)
  • wired (any wired Ethernet interface)

Requesting a ping or traceroute

You can send ping or traceroute networking commands in the dat attribute. The reply will contain the err attribute on error and will be empty on success.

For example, a client can write:
msg::cmd
id::5
dat::ping -n -c4 10.42.116.1