Difference between revisions of "Network Management"

From WebOS Internals
Jump to navigation Jump to search
(Added the methods to firewall and netroute)
 
(2 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 68: Line 72:
 
   "networkTechnology": String (e.g. "wifi")
 
   "networkTechnology": String (e.g. "wifi")
 
   "domainsOnIfDns": [ "domain", "domain" ]
 
   "domainsOnIfDns": [ "domain", "domain" ]
   "networkUsage": [ "other" ]
+
   "networkUsage": [ "other","internet","mms","browser","email","im","downloadable","corporate","private","tethered" ]
   "ipv4": { "ip": "0x1301a8c0", "netmask": "0x00ffffff", "gateway": "0x0101a8c0", "dns": [ "0x0101a8c0" ] }
+
   "ipv4": { "ip": "0x1301a8c0", "netmask": "0x00ffffff", "gateway": "0x0101a8c0", "dns": [ "0x0101a8c0" ], "additionalIfRoutes": [ { "ip":"","netmask":"","gateway":"" }, ... ] }
  "additionalIfRoutes": (don't know syntax yet)
 
 
   "networkScope": String (e.g. "wan")
 
   "networkScope": String (e.g. "wan")
  
Line 77: Line 80:
 
To connect OpenVPN:
 
To connect OpenVPN:
  
1) Change cscotun to tun in /etc/pmnetconfig/funcs
+
1) Use dev cscotun0 and dev-type tun in the openvpn config
2) Change cscotun to tun in /etc/pmnetconfig/if-up and change the -ne 8 to -ne 4
 
  
luna-send -n 1 palm://com.palm.netroute/addNetIf '{ "ifName": "tun0", "networkTechnology": "vpn", "networkScope": "wan", "ipv4": { "ip": "openvpn-addr", "netmask": "0xffffffff", "dns": [ "openvpn-dns" ] }, "networkUsage": [ "other" ], "domainsOnIfDns": [ "domain.com" ] }'
+
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" ] }'