Difference between revisions of "Network Management"

From WebOS Internals
Jump to navigation Jump to search
(Added the methods to firewall and netroute)
 
(5 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
  Public bus:
 
  Public bus:
 
  com.palm.firewall
 
  com.palm.firewall
 +
  palm://com.palm.firewall/ctrl
 +
  palm://com.palm.firewall/portCtrl
 
  com.palm.netroute
 
  com.palm.netroute
 +
  palm://com.palm.netroute/addNetIf
 +
  palm://com.palm.netroute/removeNetIf
 
  com.palm.bridge
 
  com.palm.bridge
 
  com.palm.nettools
 
  com.palm.nettools
Line 61: Line 65:
  
 
  /etc/pmnetconfig/if-down
 
  /etc/pmnetconfig/if-down
 +
 +
palm://com.palm.netroute/addNetIf { "ifName": "ppp0", "networkTechnology": "cellular", "networkScope": "wan", "ipv4": { "ip": "0x707e1178", "netmask": "0x000000ff", "gateway": "0x4040400a", "dns": [ "0x844351ca", "0x43c102cb" ] }, "networkUsage": [ "internet" ] }
 +
 +
palm://com.palm.netroute/addNetIf
 +
  "ifName":String (e.g. "eth0", "ppp0", "tun0")
 +
  "networkTechnology": String (e.g. "wifi")
 +
  "domainsOnIfDns": [ "domain", "domain" ]
 +
  "networkUsage": [ "other","internet","mms","browser","email","im","downloadable","corporate","private","tethered" ]
 +
  "ipv4": { "ip": "0x1301a8c0", "netmask": "0x00ffffff", "gateway": "0x0101a8c0", "dns": [ "0x0101a8c0" ], "additionalIfRoutes": [ { "ip":"","netmask":"","gateway":"" }, ... ] }
 +
  "networkScope": String (e.g. "wan")
 +
 +
networkTechnology string causes
 +
 +
To connect OpenVPN:
 +
 +
1) Use dev cscotun0 and dev-type tun in the openvpn config
 +
 +
luna-send -n 1 palm://com.palm.netroute/addNetIf '{ "ifName": "cscotun0", "networkTechnology": "vpn", "networkScope": "wan", "ipv4": { "ip": "openvpn-addr", "netmask": "0xffffffff", "dns": [ "openvpn-dns" ] }, "networkUsage": [ "other" ], "domainsOnIfDns": [ "domain.com" ] }'

Latest revision as of 20:04, 18 January 2010

There are lots of undocumented DBUS services for network management.

Let's use this page to document them.

Public bus:
com.palm.firewall
  palm://com.palm.firewall/ctrl
  palm://com.palm.firewall/portCtrl
com.palm.netroute
  palm://com.palm.netroute/addNetIf
  palm://com.palm.netroute/removeNetIf
com.palm.bridge
com.palm.nettools
com.palm.connectionmanager
Private bus:
com.palm.firewall
com.palm.wan
com.palm.bluetooth
com.palm.wifi.supplicant
com.palm.netroute
com.palm.bridge
com.palm.nettools
com.palm.connectionmanager
com.palm.wifi


PmNetConfigManager is the main service executable. It starts com.palm.firewall, com.palm.netroute, com.palm.bridge, com.palm.nettools and com.palm.connectionmanager.

palm://com.palm.netroute/addNetIf { "ifName": "eth0", "networkTechnology": "wifi", "networkScope": "wan", "ipv4": { "ip": "0x1301a8c0", "netmask": "0x00ffffff", "gateway": "0x0101a8c0", "dns": [ "0x0101a8c0" ] }, "networkUsage": [ "other" ] }
CMINTERFACE=eth0
CMNETWORKTECHTYPE=wifi
CMSERVICES=0
CMIPADDR=192.168.1.19 
CMNETMASK=255.255.255.0 
CMNETADDR=192.168.1.0 
CMBRDADDR=192.168.1.255 
CMPREFIXLEN=24 
CMDNSSERVERS=192.168.1.1 
CMDNSDOMAINS= 
CMROUTES= 
CMDEFGW=192.168.1.1 
/etc/pmnetconfig/if-up
palm://com.palm.netroute/removeNetIf { "ifName": "eth0" }
palm://com.palm.netroute/removeNetIf { "ifName": "tun0" }
CMINTERFACE=tun0 
CMNETWORKTECHTYPE=vpn 
CMSERVICES=0 
CMIPADDR=192.168.1.19 
CMNETMASK=255.255.255.0 
CMNETADDR=192.168.1.0 
CMBRDADDR=192.168.1.255 
CMPREFIXLEN=24 
CMDNSSERVERS=192.168.1.1 
CMDNSDOMAINS= 
CMROUTES= 
CMDEFGW=192.168.1.1 
CMINTERFACENEXT=eth0 
CMDNSSERVERSNEXT=192.168.1.1 
/etc/pmnetconfig/if-down
palm://com.palm.netroute/addNetIf { "ifName": "ppp0", "networkTechnology": "cellular", "networkScope": "wan", "ipv4": { "ip": "0x707e1178", "netmask": "0x000000ff", "gateway": "0x4040400a", "dns": [ "0x844351ca", "0x43c102cb" ] }, "networkUsage": [ "internet" ] }
palm://com.palm.netroute/addNetIf
 "ifName":String (e.g. "eth0", "ppp0", "tun0")
 "networkTechnology": String (e.g. "wifi")
 "domainsOnIfDns": [ "domain", "domain" ]
 "networkUsage": [ "other","internet","mms","browser","email","im","downloadable","corporate","private","tethered" ]
 "ipv4": { "ip": "0x1301a8c0", "netmask": "0x00ffffff", "gateway": "0x0101a8c0", "dns": [ "0x0101a8c0" ], "additionalIfRoutes": [ { "ip":"","netmask":"","gateway":"" }, ... ] }
 "networkScope": String (e.g. "wan")

networkTechnology string causes

To connect OpenVPN:

1) Use dev cscotun0 and dev-type tun in the openvpn config

luna-send -n 1 palm://com.palm.netroute/addNetIf '{ "ifName": "cscotun0", "networkTechnology": "vpn", "networkScope": "wan", "ipv4": { "ip": "openvpn-addr", "netmask": "0xffffffff", "dns": [ "openvpn-dns" ] }, "networkUsage": [ "other" ], "domainsOnIfDns": [ "domain.com" ] }'