NetworkManager/libnm-glib
Pantelis Koukousoulas 8039dd30d8 adsl: add libnm-glib and nmcli code
For the finale, this is the libnm-glib and nmcli part of the support,
with this you can now make a full pppoatm connection from NetworkManager
by configuring it in system scope in a keyfile.

As an example, here is mine:
(password and username snipped for obvious reasons)

[connection]
id=MYISP
uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc1e
type=adsl
timestamp=1304621332

[adsl]
username=user@myisp.com
password=mypassword
vpi=8
vci=35
encapsulation=vcmux
protocol=pppoa

[ipv6]
method=ignore

[ipv4]
method=auto

Extract from logs:
NetworkManager[29155]: <info> Activation (ueagle-atm0) starting connection 'MYISP'
NetworkManager[29155]: <info> (ueagle-atm0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[29155]: <info> (ueagle-atm0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) successful.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[29155]: <info> (ueagle-atm0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[29155]: <info> starting PPP connection
NetworkManager[29155]: <debug> [1304671146.590156] [nm-ppp-manager.c:1047] nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock nodefaultroute user user@myisp.com plugin pppoatm.so 8.35 noipdefault noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam /org/freedesktop/NetworkManager/PPP/0 plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
NetworkManager[29155]: <info> pppd started with pid 29175
NetworkManager[29155]: <debug> [1304671146.591235] [NetworkManagerUtils.c:816] nm_utils_get_proc_sys_net_value(): (ueagle-atm0): error reading /proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to open file '/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or directory
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) complete.
Plugin pppoatm.so loaded.
Plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so loaded.
** Message: nm-ppp-plugin: (plugin_init): initializing
** Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
NetworkManager[29155]: <debug> [1304671146.612937] [nm-udev-manager.c:621] handle_uevent(): UDEV event: action 'add' subsys 'net' device 'ppp0'
NetworkManager[29155]: <debug> [1304671146.613134] [nm-udev-manager.c:525] net_add(): ignoring interface with type 512
NetworkManager[29155]: <debug> [1304671146.617308] [nm-netlink-monitor.c:117] link_msg_handler(): netlink link message: iface idx 35 flags 0x1090
Using interface ppp0
Connect: ppp0 <--> 8.35
** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
** Message: nm-ppp-plugin: (nm_phasechange): status 6 / phase 'authenticate'
** Message: nm-ppp-plugin: (get_credentials): passwd-hook, requesting credentials...
NetworkManager[29155]: <debug> [1304671149.639511] [nm-agent-manager.c:1044] nm_agent_manager_get_secrets(): Secrets requested for connection /org/freedesktop/NetworkManager/Settings/0 (adsl)
NetworkManager[29155]: <debug> [1304671149.639684] [nm-settings-connection.c:717] nm_settings_connection_get_secrets(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets requested flags 0x1 hint 'password'
NetworkManager[29155]: <debug> [1304671149.640950] [nm-agent-manager.c:959] get_start(): (0x9b4ad10/adsl) system settings secrets sufficient
NetworkManager[29155]: <debug> [1304671149.641332] [nm-settings-connection.c:573] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) existing secrets returned
NetworkManager[29155]: <debug> [1304671149.641541] [nm-settings-connection.c:579] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets request completed
NetworkManager[29155]: <debug> [1304671149.643074] [nm-settings-connection.c:618] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) new agent secrets processed
** Message: nm-ppp-plugin: (get_credentials): got credentials from NetworkManager
PAP authentication succeeded
** Message: nm-ppp-plugin: (nm_phasechange): status 8 / phase 'network'
local  IP address 94.70.90.201
remote IP address 80.106.108.12
primary   DNS address 195.170.0.1
secondary DNS address 195.170.2.2
** Message: nm-ppp-plugin: (nm_phasechange): status 9 / phase 'running'
** Message: nm-ppp-plugin: (nm_ip_up): ip-up event
** Message: nm-ppp-plugin: (nm_ip_up): sending Ip4Config to NetworkManager...
NetworkManager[29155]: <debug> [1304671150.607440] [nm-netlink-monitor.c:117] link_msg_handler(): netlink link message: iface idx 35 flags 0x110D1
NetworkManager[29155]: <info> PPP manager(IP Config Get) reply received.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) started...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) started...
NetworkManager[29155]: <debug> [1304671150.608918] [nm-system.c:222] sync_addresses(): (ppp0): syncing addresses (family 2)
NetworkManager[29155]: <info> (ueagle-atm0): device state change: ip-config -> activated (reason 'none') [70 100 0]
NetworkManager[29155]: <info> Policy set 'MYISP' (ppp0) as default for IPv4 routing and DNS.
NetworkManager[29155]: <info> Activation (ueagle-atm0) successful, device activated.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) complete.

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
2012-05-18 15:42:56 -05:00
..
tests build: fix srcdir != builddir for new generated headers 2012-02-22 16:27:28 -06:00
libnm-glib-test.c wifi: make wireless-helper.h private to src/ 2011-11-09 21:28:02 -06:00
libnm-glib-vpn.pc.in release: bump version to 0.9.0 2011-08-22 20:33:07 -05:00
libnm-glib-vpn.ver libnm-glib-vpn: add some helpers for auth dialogs 2011-02-10 18:48:32 -06:00
libnm-glib.pc.in release: bump version to 0.9.0 2011-08-22 20:33:07 -05:00
libnm-glib.ver adsl: add libnm-glib and nmcli code 2012-05-18 15:42:56 -05:00
libnm_glib.c libnm-glib: rename some internal symbols in legacy compat library 2011-05-05 12:33:49 -05:00
libnm_glib.h libnm-glib: deprecate original libnm_glib bits 2010-03-10 09:18:08 -08:00
Makefile.am adsl: add libnm-glib and nmcli code 2012-05-18 15:42:56 -05:00
nm-access-point.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-access-point.h libnm-glib: add *_connection_valid() utility functions 2011-04-25 17:07:38 -05:00
nm-active-connection.c libnm-glib: NULL out priv fields on dispose() 2012-04-23 16:09:58 -04:00
nm-active-connection.h bonding: export path of master device property over DBUS 2012-01-25 11:12:43 -06:00
nm-client.c libnm-glib: add "object-creation-failed" signal to NMObject 2012-04-25 16:39:17 +02:00
nm-client.h libnm-glib: nm_client_new_async, fix up NMClient asynchrony issues 2012-02-03 10:33:43 -06:00
nm-device-adsl.c adsl: add libnm-glib and nmcli code 2012-05-18 15:42:56 -05:00
nm-device-adsl.h adsl: add libnm-glib and nmcli code 2012-05-18 15:42:56 -05:00
nm-device-bond.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-bond.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-bt.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-bt.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-ethernet.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-ethernet.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-infiniband.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-infiniband.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-modem.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-modem.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-olpc-mesh.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-olpc-mesh.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-private.h libnm-glib: ensure nm_device_set_device_type() stays private 2012-03-12 14:33:51 -05:00
nm-device-vlan.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-vlan.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-wifi.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-wifi.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device-wimax.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-device-wimax.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-device.c adsl: add libnm-glib and nmcli code 2012-05-18 15:42:56 -05:00
nm-device.h libnm-glib: add errors to device classes and nm_device_connection_compatible() 2012-03-16 09:54:36 +01:00
nm-dhcp4-config.c libnm-glib: more ensure_inited() fixing 2012-03-28 09:06:12 -04:00
nm-dhcp4-config.h libnm-glib: add class padding for future expansion 2009-09-30 09:21:32 -07:00
nm-dhcp6-config.c libnm-glib: more ensure_inited() fixing 2012-03-28 09:06:12 -04:00
nm-dhcp6-config.h libnm-glib: add NMDHCP6Config class 2010-01-15 12:40:19 -08:00
nm-ip4-config.c libnm-glib: more ensure_inited() fixing 2012-03-28 09:06:12 -04:00
nm-ip4-config.h libnm-glib: remove deprecated nm_ip4_config_get_hostname() function 2011-03-10 11:48:22 -06:00
nm-ip6-config.c libnm-glib: more ensure_inited() fixing 2012-03-28 09:06:12 -04:00
nm-ip6-config.h libnm-glib: add class padding for future expansion 2009-09-30 09:21:32 -07:00
nm-object-cache.c libnm-glib: ensure object cache is cleared when NM stops (bgo #674473) 2012-04-23 17:10:14 -05:00
nm-object-cache.h libnm-glib: ensure object cache is cleared when NM stops (bgo #674473) 2012-04-23 17:10:14 -05:00
nm-object-private.h libnm-glib: nm_client_new_async, fix up NMClient asynchrony issues 2012-02-03 10:33:43 -06:00
nm-object.c libnm-glib: add "object-creation-failed" signal to NMObject 2012-04-25 16:39:17 +02:00
nm-object.h libnm-glib: add "object-creation-failed" signal to NMObject 2012-04-25 16:39:17 +02:00
nm-remote-connection-private.h libnm-glib: handle initially invisible connections correctly 2011-02-12 22:00:30 -06:00
nm-remote-connection.c libnm-glib: NULL out priv fields on dispose() 2012-04-23 16:09:58 -04:00
nm-remote-connection.h secrets: simplify GetSecrets call flow 2011-01-26 10:17:07 -06:00
nm-remote-settings.c libnm-glib: NULL out priv fields on dispose() 2012-04-23 16:09:58 -04:00
nm-remote-settings.h Fix names of error enum values 2012-03-12 15:29:52 -04:00
nm-secret-agent.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-secret-agent.h libnm-glib: add 'registered' property for NMSecretAgent 2012-03-19 13:24:28 -05:00
nm-types-private.h libnm-glib: add NMIP6Config object that proxies device's IP6 config 2009-08-20 11:30:52 -05:00
nm-types.c libnm-glib: pre-emptively avoid some -Wshadow errors 2012-02-02 12:30:35 -06:00
nm-types.h Use glib-mkenums to generate enum types 2012-02-15 11:42:15 -05:00
nm-vpn-connection.c libnm-glib: more ensure_inited() fixing 2012-03-28 09:06:12 -04:00
nm-vpn-connection.h libnm-glib: documentation fixes 2011-03-10 12:35:43 -06:00
nm-vpn-plugin-ui-interface.c libnm-glib: VPN delete and save secrets operations are no longer used 2011-07-13 13:00:16 -05:00
nm-vpn-plugin-ui-interface.h libnm-glib: VPN delete and save secrets operations are no longer used 2011-07-13 13:00:16 -05:00
nm-vpn-plugin-utils.c libnm-glib-vpn: add some helpers for auth dialogs 2011-02-10 18:48:32 -06:00
nm-vpn-plugin-utils.h libnm-glib-vpn: add some helpers for auth dialogs 2011-02-10 18:48:32 -06:00
nm-vpn-plugin.c libnm-glib: NULL out priv fields on dispose() 2012-04-23 16:09:58 -04:00
nm-vpn-plugin.h Fix names of error enum values 2012-03-12 15:29:52 -04:00
nm-wimax-nsp.c libnm-glib: fix build on older glib without g_clear_object() 2012-04-27 15:04:29 -05:00
nm-wimax-nsp.h libnm-glib: add *_connection_valid() utility functions 2011-04-25 17:07:38 -05:00