summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-03-24 01:37:02 +0100
committerMichael Biebl <biebl@debian.org>2012-03-24 01:37:02 +0100
commitde06e5715e780baade318f3490ac7a4c9ce84e32 (patch)
tree23fbc3fafc12072476eff98bee60100eb54c29db
parentb436a68a20ff3114ded32a7a3d70cdd4954039f9 (diff)
Imported Upstream version 0.9.4.0upstream/0.9.4.0
-rw-r--r--Makefile.am14
-rw-r--r--Makefile.glib169
-rw-r--r--Makefile.in23
-rw-r--r--NEWS42
-rw-r--r--TODO181
-rwxr-xr-xbuild-aux/ltmain.sh2
-rw-r--r--callouts/Makefile.am4
-rw-r--r--callouts/Makefile.in13
-rw-r--r--callouts/tests/Makefile.am2
-rw-r--r--callouts/tests/Makefile.in11
-rw-r--r--cli/Makefile.in9
-rw-r--r--cli/src/Makefile.am4
-rw-r--r--cli/src/Makefile.in37
-rw-r--r--cli/src/common.c360
-rw-r--r--cli/src/common.h39
-rw-r--r--cli/src/connections.c1053
-rw-r--r--cli/src/devices.c466
-rw-r--r--cli/src/nmcli.h30
-rw-r--r--cli/src/settings.c416
-rw-r--r--cli/src/settings.h40
-rw-r--r--cli/src/utils.c132
-rw-r--r--cli/src/utils.h6
-rw-r--r--config.h.in15
-rwxr-xr-xconfigure616
-rw-r--r--configure.ac163
-rw-r--r--data/Makefile.in9
-rw-r--r--data/NetworkManager.service.in4
-rw-r--r--docs/Makefile.in9
-rw-r--r--docs/api/Makefile.am2
-rw-r--r--docs/api/Makefile.in11
-rw-r--r--docs/api/generate-settings-spec.c6
-rw-r--r--docs/api/html/NetworkManager.devhelp228
-rw-r--r--docs/api/html/index.html32
-rw-r--r--docs/api/html/ix01.html2
-rw-r--r--docs/api/html/ref-migrating.html72
-rw-r--r--docs/api/html/ref-settings.html227
-rw-r--r--docs/api/html/spec.html111
-rw-r--r--docs/api/migrating-to-09.xml14
-rw-r--r--docs/api/settings-spec.xml173
-rw-r--r--docs/api/spec.html111
-rw-r--r--docs/api/version.xml2
-rw-r--r--docs/libnm-glib/Makefile.am1
-rw-r--r--docs/libnm-glib/Makefile.in10
-rw-r--r--docs/libnm-glib/html/NMAccessPoint.html38
-rw-r--r--docs/libnm-glib/html/NMActiveConnection.html61
-rw-r--r--docs/libnm-glib/html/NMClient.html93
-rw-r--r--docs/libnm-glib/html/NMDHCP4Config.html8
-rw-r--r--docs/libnm-glib/html/NMDHCP6Config.html8
-rw-r--r--docs/libnm-glib/html/NMDevice.html73
-rw-r--r--docs/libnm-glib/html/NMDeviceBt.html8
-rw-r--r--docs/libnm-glib/html/NMDeviceEthernet.html8
-rw-r--r--docs/libnm-glib/html/NMDeviceModem.html8
-rw-r--r--docs/libnm-glib/html/NMDeviceWifi.html8
-rw-r--r--docs/libnm-glib/html/NMDeviceWimax.html8
-rw-r--r--docs/libnm-glib/html/NMIP4Config.html8
-rw-r--r--docs/libnm-glib/html/NMIP6Config.html8
-rw-r--r--docs/libnm-glib/html/NMObject.html8
-rw-r--r--docs/libnm-glib/html/NMRemoteConnection.html17
-rw-r--r--docs/libnm-glib/html/NMRemoteSettings.html100
-rw-r--r--docs/libnm-glib/html/NMSecretAgent.html171
-rw-r--r--docs/libnm-glib/html/NMVPNConnection.html39
-rw-r--r--docs/libnm-glib/html/NMWimaxNsp.html8
-rw-r--r--docs/libnm-glib/html/api-index-full.html376
-rw-r--r--docs/libnm-glib/html/ch02.html2
-rw-r--r--docs/libnm-glib/html/index.html2
-rw-r--r--docs/libnm-glib/html/index.sgml33
-rw-r--r--docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html18
-rw-r--r--docs/libnm-glib/html/libnm-glib.devhelp215
-rw-r--r--docs/libnm-glib/html/object-tree.html4
-rw-r--r--docs/libnm-glib/libnm-glib-sections.txt205
-rw-r--r--docs/libnm-glib/libnm-glib.types8
-rw-r--r--docs/libnm-glib/tmpl/libnm_glib.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-access-point.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-active-connection.sgml28
-rw-r--r--docs/libnm-glib/tmpl/nm-client.sgml24
-rw-r--r--docs/libnm-glib/tmpl/nm-device-bond.sgml93
-rw-r--r--docs/libnm-glib/tmpl/nm-device-bt.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-device-ethernet.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-device-infiniband-bindings.sgml29
-rw-r--r--docs/libnm-glib/tmpl/nm-device-infiniband.sgml93
-rw-r--r--docs/libnm-glib/tmpl/nm-device-modem.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml114
-rw-r--r--docs/libnm-glib/tmpl/nm-device-vlan.sgml114
-rw-r--r--docs/libnm-glib/tmpl/nm-device-wifi.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-device-wimax.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-device.sgml26
-rw-r--r--docs/libnm-glib/tmpl/nm-dhcp4-config.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-dhcp6-config.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-exported-connection-bindings.sgml213
-rw-r--r--docs/libnm-glib/tmpl/nm-exported-connection-glue.sgml247
-rw-r--r--docs/libnm-glib/tmpl/nm-glib-enum-types.sgml22
-rw-r--r--docs/libnm-glib/tmpl/nm-glib-marshal.sgml22
-rw-r--r--docs/libnm-glib/tmpl/nm-ip4-config.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-ip6-config.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-object.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-remote-connection.sgml7
-rw-r--r--docs/libnm-glib/tmpl/nm-remote-settings.sgml30
-rw-r--r--docs/libnm-glib/tmpl/nm-secret-agent-glue.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-secret-agent.sgml14
-rw-r--r--docs/libnm-glib/tmpl/nm-settings-system-bindings.sgml120
-rw-r--r--docs/libnm-glib/tmpl/nm-types.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-vpn-connection.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml22
-rw-r--r--docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-vpn-plugin.sgml2
-rw-r--r--docs/libnm-glib/tmpl/nm-wimax-nsp.sgml2
-rw-r--r--docs/libnm-util/Makefile.in9
-rw-r--r--docs/libnm-util/html/NMConnection.html157
-rw-r--r--docs/libnm-util/html/NMSetting.html124
-rw-r--r--docs/libnm-util/html/NMSetting8021x.html277
-rw-r--r--docs/libnm-util/html/NMSettingBluetooth.html17
-rw-r--r--docs/libnm-util/html/NMSettingCdma.html23
-rw-r--r--docs/libnm-util/html/NMSettingConnection.html230
-rw-r--r--docs/libnm-util/html/NMSettingGsm.html55
-rw-r--r--docs/libnm-util/html/NMSettingIP4Config.html19
-rw-r--r--docs/libnm-util/html/NMSettingIP6Config.html118
-rw-r--r--docs/libnm-util/html/NMSettingOlpcMesh.html15
-rw-r--r--docs/libnm-util/html/NMSettingPPP.html17
-rw-r--r--docs/libnm-util/html/NMSettingPPPOE.html23
-rw-r--r--docs/libnm-util/html/NMSettingSerial.html17
-rw-r--r--docs/libnm-util/html/NMSettingVPN.html70
-rw-r--r--docs/libnm-util/html/NMSettingWimax.html15
-rw-r--r--docs/libnm-util/html/NMSettingWired.html15
-rw-r--r--docs/libnm-util/html/NMSettingWireless.html19
-rw-r--r--docs/libnm-util/html/NMSettingWirelessSecurity.html59
-rw-r--r--docs/libnm-util/html/api-index-full.html548
-rw-r--r--docs/libnm-util/html/ch01.html2
-rw-r--r--docs/libnm-util/html/index.sgml97
-rw-r--r--docs/libnm-util/html/libnm-util-nm-utils.html178
-rw-r--r--docs/libnm-util/html/libnm-util.devhelp285
-rw-r--r--docs/libnm-util/html/object-tree.html19
-rw-r--r--docs/libnm-util/libnm-util-sections.txt280
-rw-r--r--docs/libnm-util/libnm-util.types19
-rw-r--r--docs/libnm-util/tmpl/libnm-util-unused.sgml260
-rw-r--r--docs/libnm-util/tmpl/nm-connection.sgml54
-rw-r--r--docs/libnm-util/tmpl/nm-setting-8021x.sgml72
-rw-r--r--docs/libnm-util/tmpl/nm-setting-adsl.sgml262
-rw-r--r--docs/libnm-util/tmpl/nm-setting-bluetooth.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-bond.sgml228
-rw-r--r--docs/libnm-util/tmpl/nm-setting-cdma.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-connection.sgml118
-rw-r--r--docs/libnm-util/tmpl/nm-setting-gsm.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-infiniband.sgml143
-rw-r--r--docs/libnm-util/tmpl/nm-setting-ip4-config.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-ip6-config.sgml40
-rw-r--r--docs/libnm-util/tmpl/nm-setting-olpc-mesh.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-ppp.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-pppoe.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-private.sgml2
-rw-r--r--docs/libnm-util/tmpl/nm-setting-serial.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-vlan.sgml270
-rw-r--r--docs/libnm-util/tmpl/nm-setting-vpn.sgml27
-rw-r--r--docs/libnm-util/tmpl/nm-setting-wimax.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-wired.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-wireless-security.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting-wireless.sgml9
-rw-r--r--docs/libnm-util/tmpl/nm-setting.sgml20
-rw-r--r--docs/libnm-util/tmpl/nm-utils-enum-types.sgml22
-rw-r--r--docs/libnm-util/tmpl/nm-utils.sgml58
-rw-r--r--examples/C/Makefile.in9
-rw-r--r--examples/C/glib/Makefile.am27
-rw-r--r--examples/C/glib/Makefile.in72
-rw-r--r--examples/C/glib/list-connections-libnm-glib.c2
-rw-r--r--examples/C/glib/monitor-nm-running-GDBus.c92
-rw-r--r--examples/C/glib/monitor-nm-running-dbus-glib.c125
-rw-r--r--examples/C/glib/monitor-nm-state-GDBus.c138
-rw-r--r--examples/C/qt/Makefile.am22
-rw-r--r--examples/C/qt/Makefile.in58
-rw-r--r--examples/C/qt/monitor-nm-running.cpp89
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/Makefile.in11
-rw-r--r--examples/python/Makefile.in9
-rw-r--r--examples/ruby/Makefile.am4
-rw-r--r--examples/ruby/Makefile.in482
-rwxr-xr-xexamples/ruby/add-connection.rb86
-rwxr-xr-xexamples/ruby/get-basic-nm-info.rb51
-rwxr-xr-xexamples/ruby/list-devices.rb85
-rw-r--r--examples/shell/Makefile.am3
-rw-r--r--examples/shell/Makefile.in481
-rwxr-xr-xexamples/shell/get-hostname.sh45
-rwxr-xr-xexamples/shell/nm-logging.sh46
-rw-r--r--include/Makefile.am1
-rw-r--r--include/Makefile.in10
-rw-r--r--include/NetworkManager.h54
-rw-r--r--include/NetworkManagerVPN.h3
-rw-r--r--include/nm-glib-compat.h15
-rw-r--r--include/nm-version.h2
-rw-r--r--initscript/Arch/Makefile.in9
-rw-r--r--initscript/Debian/Makefile.in9
-rw-r--r--initscript/Gentoo/Makefile.in9
-rw-r--r--initscript/Makefile.in9
-rw-r--r--initscript/Mandriva/Makefile.in9
-rw-r--r--initscript/Mandriva/networkmanager.in1
-rw-r--r--initscript/RedHat/Makefile.in9
-rw-r--r--initscript/SUSE/Makefile.in9
-rw-r--r--initscript/Slackware/Makefile.in9
-rw-r--r--initscript/linexa/Makefile.in9
-rw-r--r--initscript/paldo/Makefile.in9
-rw-r--r--introspection/Makefile.am3
-rw-r--r--introspection/Makefile.in12
-rw-r--r--introspection/all.xml.in3
-rw-r--r--introspection/nm-active-connection.xml3
-rw-r--r--introspection/nm-device-bond.xml27
-rw-r--r--introspection/nm-device-infiniband.xml27
-rw-r--r--introspection/nm-device-vlan.xml33
-rw-r--r--introspection/nm-device.xml62
-rw-r--r--libnm-glib/Makefile.am132
-rw-r--r--libnm-glib/Makefile.in307
-rw-r--r--libnm-glib/libnm-glib-test.c2
-rw-r--r--libnm-glib/libnm-glib.ver48
-rw-r--r--libnm-glib/nm-access-point.c179
-rw-r--r--libnm-glib/nm-active-connection.c336
-rw-r--r--libnm-glib/nm-active-connection.h2
-rw-r--r--libnm-glib/nm-client.c782
-rw-r--r--libnm-glib/nm-client.h9
-rw-r--r--libnm-glib/nm-dbus-utils.c215
-rw-r--r--libnm-glib/nm-dbus-utils.h57
-rw-r--r--libnm-glib/nm-device-bond.c300
-rw-r--r--libnm-glib/nm-device-bond.h82
-rw-r--r--libnm-glib/nm-device-bt.c141
-rw-r--r--libnm-glib/nm-device-bt.h23
-rw-r--r--libnm-glib/nm-device-ethernet.c156
-rw-r--r--libnm-glib/nm-device-ethernet.h21
-rw-r--r--libnm-glib/nm-device-infiniband.c310
-rw-r--r--libnm-glib/nm-device-infiniband.h84
-rw-r--r--libnm-glib/nm-device-modem.c118
-rw-r--r--libnm-glib/nm-device-modem.h19
-rw-r--r--libnm-glib/nm-device-olpc-mesh.c333
-rw-r--r--libnm-glib/nm-device-olpc-mesh.h84
-rw-r--r--libnm-glib/nm-device-private.h12
-rw-r--r--libnm-glib/nm-device-vlan.c338
-rw-r--r--libnm-glib/nm-device-vlan.h86
-rw-r--r--libnm-glib/nm-device-wifi.c340
-rw-r--r--libnm-glib/nm-device-wifi.h27
-rw-r--r--libnm-glib/nm-device-wimax.c339
-rw-r--r--libnm-glib/nm-device-wimax.h21
-rw-r--r--libnm-glib/nm-device.c786
-rw-r--r--libnm-glib/nm-device.h13
-rw-r--r--libnm-glib/nm-dhcp4-config.c55
-rw-r--r--libnm-glib/nm-dhcp6-config.c55
-rw-r--r--libnm-glib/nm-glib-enum-types.c367
-rw-r--r--libnm-glib/nm-glib-enum-types.h47
-rw-r--r--libnm-glib/nm-glib-marshal.c167
-rw-r--r--libnm-glib/nm-glib-marshal.h36
-rw-r--r--libnm-glib/nm-ip4-config.c157
-rw-r--r--libnm-glib/nm-ip6-config.c123
-rw-r--r--libnm-glib/nm-object-cache.c14
-rw-r--r--libnm-glib/nm-object-cache.h2
-rw-r--r--libnm-glib/nm-object-private.h105
-rw-r--r--libnm-glib/nm-object.c1096
-rw-r--r--libnm-glib/nm-remote-connection.c223
-rw-r--r--libnm-glib/nm-remote-settings.c430
-rw-r--r--libnm-glib/nm-remote-settings.h18
-rw-r--r--libnm-glib/nm-secret-agent.c77
-rw-r--r--libnm-glib/nm-secret-agent.h82
-rw-r--r--libnm-glib/nm-types.c22
-rw-r--r--libnm-glib/nm-types.h2
-rw-r--r--libnm-glib/nm-vpn-connection.c89
-rw-r--r--libnm-glib/nm-vpn-enum-types.c61
-rw-r--r--libnm-glib/nm-vpn-enum-types.h21
-rw-r--r--libnm-glib/nm-vpn-plugin.c28
-rw-r--r--libnm-glib/nm-vpn-plugin.h19
-rw-r--r--libnm-glib/nm-wimax-nsp.c75
-rw-r--r--libnm-glib/tests/Makefile.am2
-rw-r--r--libnm-glib/tests/Makefile.in11
-rw-r--r--libnm-util/Makefile.am20
-rw-r--r--libnm-util/Makefile.in100
-rw-r--r--libnm-util/libnm-util.ver67
-rw-r--r--libnm-util/nm-connection.c172
-rw-r--r--libnm-util/nm-connection.h21
-rw-r--r--libnm-util/nm-setting-8021x.c154
-rw-r--r--libnm-util/nm-setting-8021x.h24
-rw-r--r--libnm-util/nm-setting-bluetooth.c21
-rw-r--r--libnm-util/nm-setting-bluetooth.h11
-rw-r--r--libnm-util/nm-setting-bond.c663
-rw-r--r--libnm-util/nm-setting-bond.h107
-rw-r--r--libnm-util/nm-setting-cdma.c25
-rw-r--r--libnm-util/nm-setting-cdma.h11
-rw-r--r--libnm-util/nm-setting-connection.c216
-rw-r--r--libnm-util/nm-setting-connection.h29
-rw-r--r--libnm-util/nm-setting-gsm.c33
-rw-r--r--libnm-util/nm-setting-gsm.h11
-rw-r--r--libnm-util/nm-setting-infiniband.c291
-rw-r--r--libnm-util/nm-setting-infiniband.h81
-rw-r--r--libnm-util/nm-setting-ip4-config.c27
-rw-r--r--libnm-util/nm-setting-ip4-config.h11
-rw-r--r--libnm-util/nm-setting-ip6-config.c81
-rw-r--r--libnm-util/nm-setting-ip6-config.h34
-rw-r--r--libnm-util/nm-setting-olpc-mesh.c23
-rw-r--r--libnm-util/nm-setting-olpc-mesh.h9
-rw-r--r--libnm-util/nm-setting-ppp.c25
-rw-r--r--libnm-util/nm-setting-ppp.h11
-rw-r--r--libnm-util/nm-setting-pppoe.c25
-rw-r--r--libnm-util/nm-setting-pppoe.h11
-rw-r--r--libnm-util/nm-setting-serial.c25
-rw-r--r--libnm-util/nm-setting-serial.h11
-rw-r--r--libnm-util/nm-setting-vlan.c728
-rw-r--r--libnm-util/nm-setting-vlan.h144
-rw-r--r--libnm-util/nm-setting-vpn.c59
-rw-r--r--libnm-util/nm-setting-vpn.h11
-rw-r--r--libnm-util/nm-setting-wimax.c23
-rw-r--r--libnm-util/nm-setting-wimax.h9
-rw-r--r--libnm-util/nm-setting-wired.c23
-rw-r--r--libnm-util/nm-setting-wired.h9
-rw-r--r--libnm-util/nm-setting-wireless-security.c31
-rw-r--r--libnm-util/nm-setting-wireless-security.h17
-rw-r--r--libnm-util/nm-setting-wireless.c29
-rw-r--r--libnm-util/nm-setting-wireless.h13
-rw-r--r--libnm-util/nm-setting.c42
-rw-r--r--libnm-util/nm-setting.h16
-rw-r--r--libnm-util/nm-utils-enum-types.c759
-rw-r--r--libnm-util/nm-utils-enum-types.h85
-rw-r--r--libnm-util/nm-utils.c202
-rw-r--r--libnm-util/nm-utils.h16
-rw-r--r--libnm-util/tests/Makefile.am4
-rw-r--r--libnm-util/tests/Makefile.in13
-rw-r--r--libnm-util/tests/certs/Makefile.in9
-rw-r--r--libnm-util/tests/test-general.c78
-rw-r--r--libnm-util/tests/test-secrets.c4
-rw-r--r--m4/compiler_warnings.m48
-rw-r--r--man/Makefile.in9
-rw-r--r--man/NetworkManager.conf.520
-rw-r--r--man/NetworkManager.conf.5.in20
-rw-r--r--marshallers/Makefile.am27
-rw-r--r--marshallers/nm-marshal-main.c2
-rw-r--r--marshallers/nm-marshal.list30
-rw-r--r--po/LINGUAS1
-rw-r--r--po/POTFILES.in5
-rw-r--r--po/cs.po1612
-rw-r--r--po/hu.po1755
-rw-r--r--po/ml.po2021
-rw-r--r--po/pl.po1398
-rw-r--r--po/pt_BR.po2594
-rw-r--r--po/sl.po1730
-rw-r--r--po/tr.po2129
-rw-r--r--po/uk.po1588
-rw-r--r--policy/Makefile.in9
-rw-r--r--policy/org.freedesktop.NetworkManager.policy72
-rw-r--r--src/Makefile.am80
-rw-r--r--src/Makefile.in481
-rw-r--r--src/NetworkManagerUtils.c82
-rw-r--r--src/NetworkManagerUtils.h16
-rw-r--r--src/backends/Makefile.am7
-rw-r--r--src/backends/Makefile.in22
-rw-r--r--src/backends/NetworkManagerArch.c34
-rw-r--r--src/backends/NetworkManagerDebian.c30
-rw-r--r--src/backends/NetworkManagerExherbo.c32
-rw-r--r--src/backends/NetworkManagerFrugalware.c29
-rw-r--r--src/backends/NetworkManagerGeneric.c64
-rw-r--r--src/backends/NetworkManagerGeneric.h15
-rw-r--r--src/backends/NetworkManagerGentoo.c38
-rw-r--r--src/backends/NetworkManagerLinexa.c29
-rw-r--r--src/backends/NetworkManagerMandriva.c30
-rw-r--r--src/backends/NetworkManagerPaldo.c36
-rw-r--r--src/backends/NetworkManagerPardus.c29
-rw-r--r--src/backends/NetworkManagerRedHat.c30
-rw-r--r--src/backends/NetworkManagerSlackware.c29
-rw-r--r--src/backends/NetworkManagerSuSE.c36
-rw-r--r--src/backends/nm-backend.h (renamed from include/wireless-helper.h)22
-rw-r--r--src/bluez-manager/Makefile.am9
-rw-r--r--src/bluez-manager/Makefile.in20
-rw-r--r--src/bluez-manager/nm-bluez-manager.c7
-rw-r--r--src/dhcp-manager/Makefile.am7
-rw-r--r--src/dhcp-manager/Makefile.in18
-rw-r--r--src/dhcp-manager/nm-dhcp-dhclient-utils.c4
-rw-r--r--src/dhcp-manager/nm-dhcp-manager.c18
-rw-r--r--src/dhcp-manager/nm-dhcp-manager.h10
-rw-r--r--src/dhcp-manager/tests/Makefile.am2
-rw-r--r--src/dhcp-manager/tests/Makefile.in11
-rw-r--r--src/dns-manager/Makefile.am4
-rw-r--r--src/dns-manager/Makefile.in13
-rw-r--r--src/dns-manager/nm-dns-bind.c2
-rw-r--r--src/dns-manager/nm-dns-dnsmasq.c7
-rw-r--r--src/dns-manager/nm-dns-manager.c4
-rw-r--r--src/dnsmasq-manager/Makefile.in9
-rw-r--r--src/firewall-manager/Makefile.am23
-rw-r--r--src/firewall-manager/Makefile.in (renamed from marshallers/Makefile.in)98
-rw-r--r--src/firewall-manager/nm-firewall-manager.c327
-rw-r--r--src/firewall-manager/nm-firewall-manager.h73
-rw-r--r--src/generated/Makefile.am77
-rw-r--r--src/generated/Makefile.in697
-rw-r--r--src/generated/nm-enum-types.c913
-rw-r--r--src/generated/nm-enum-types.h89
-rw-r--r--src/generated/nm-marshal.c705
-rw-r--r--src/generated/nm-marshal.h151
-rw-r--r--src/ip6-manager/Makefile.am7
-rw-r--r--src/ip6-manager/Makefile.in18
-rw-r--r--src/ip6-manager/nm-ip6-manager.c63
-rw-r--r--src/logging/Makefile.in9
-rw-r--r--src/logging/nm-logging.c28
-rw-r--r--src/logging/nm-logging.h9
-rw-r--r--src/main.c175
-rw-r--r--src/modem-manager/Makefile.am9
-rw-r--r--src/modem-manager/Makefile.in19
-rw-r--r--src/modem-manager/nm-modem-cdma.c55
-rw-r--r--src/modem-manager/nm-modem-cdma.h6
-rw-r--r--src/modem-manager/nm-modem-gsm.c167
-rw-r--r--src/modem-manager/nm-modem-gsm.h6
-rw-r--r--src/modem-manager/nm-modem-manager.c106
-rw-r--r--src/modem-manager/nm-modem.c189
-rw-r--r--src/modem-manager/nm-modem.h10
-rw-r--r--src/nm-activation-request.c318
-rw-r--r--src/nm-activation-request.h32
-rw-r--r--src/nm-active-connection.c320
-rw-r--r--src/nm-active-connection.h78
-rw-r--r--src/nm-config.c93
-rw-r--r--src/nm-config.h10
-rw-r--r--src/nm-connectivity.c368
-rw-r--r--src/nm-connectivity.h66
-rw-r--r--src/nm-device-bond.c569
-rw-r--r--src/nm-device-bond.h65
-rw-r--r--src/nm-device-bt.c157
-rw-r--r--src/nm-device-bt.h8
-rw-r--r--src/nm-device-ethernet.c970
-rw-r--r--src/nm-device-ethernet.h17
-rw-r--r--src/nm-device-factory.h91
-rw-r--r--src/nm-device-infiniband.c517
-rw-r--r--src/nm-device-infiniband.h66
-rw-r--r--src/nm-device-interface.c433
-rw-r--r--src/nm-device-interface.h158
-rw-r--r--src/nm-device-modem.c78
-rw-r--r--src/nm-device-olpc-mesh.c308
-rw-r--r--src/nm-device-olpc-mesh.h7
-rw-r--r--src/nm-device-private.h41
-rw-r--r--src/nm-device-vlan.c803
-rw-r--r--src/nm-device-vlan.h67
-rw-r--r--src/nm-device-wifi.c1205
-rw-r--r--src/nm-device-wifi.h14
-rw-r--r--src/nm-device-wired.c595
-rw-r--r--src/nm-device-wired.h59
-rw-r--r--src/nm-device.c3159
-rw-r--r--src/nm-device.h137
-rw-r--r--src/nm-ip6-config.c19
-rw-r--r--src/nm-manager-auth.c2
-rw-r--r--src/nm-manager.c1387
-rw-r--r--src/nm-manager.h35
-rw-r--r--src/nm-netlink-compat.c137
-rw-r--r--src/nm-netlink-compat.h78
-rw-r--r--src/nm-netlink-monitor.c122
-rw-r--r--src/nm-netlink-monitor.h5
-rw-r--r--src/nm-netlink-utils.c109
-rw-r--r--src/nm-netlink-utils.h16
-rw-r--r--src/nm-policy.c215
-rw-r--r--src/nm-properties-changed-signal.c5
-rw-r--r--src/nm-session-monitor-ck.c (renamed from src/nm-session-monitor.c)137
-rw-r--r--src/nm-session-monitor-null.c171
-rw-r--r--src/nm-session-monitor-systemd.c251
-rw-r--r--src/nm-session-utils.c79
-rw-r--r--src/nm-session-utils.h41
-rw-r--r--src/nm-system.c832
-rw-r--r--src/nm-system.h37
-rw-r--r--src/nm-udev-manager.c209
-rw-r--r--src/nm-udev-manager.h7
-rw-r--r--src/nm-wifi-ap.c53
-rw-r--r--src/nm-wifi-ap.h8
-rw-r--r--src/org.freedesktop.NetworkManager.conf (renamed from src/NetworkManager.conf)0
-rw-r--r--src/ppp-manager/Makefile.am9
-rw-r--r--src/ppp-manager/Makefile.in20
-rw-r--r--src/ppp-manager/nm-ppp-manager.c16
-rw-r--r--src/settings/Makefile.am9
-rw-r--r--src/settings/Makefile.in20
-rw-r--r--src/settings/nm-agent-manager.c45
-rw-r--r--src/settings/nm-agent-manager.h10
-rw-r--r--src/settings/nm-settings-connection.c20
-rw-r--r--src/settings/nm-settings-connection.h4
-rw-r--r--src/settings/nm-settings-error.c50
-rw-r--r--src/settings/nm-settings-error.h36
-rw-r--r--src/settings/nm-settings.c229
-rw-r--r--src/settings/nm-settings.h3
-rw-r--r--src/settings/nm-system-config-interface.h2
-rw-r--r--src/settings/plugins/Makefile.in9
-rw-r--r--src/settings/plugins/ifcfg-rh/Makefile.am7
-rw-r--r--src/settings/plugins/ifcfg-rh/Makefile.in22
-rw-r--r--src/settings/plugins/ifcfg-rh/common.h11
-rw-r--r--src/settings/plugins/ifcfg-rh/plugin.c4
-rw-r--r--src/settings/plugins/ifcfg-rh/reader.c834
-rw-r--r--src/settings/plugins/ifcfg-rh/reader.h2
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.am3
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.in15
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am9
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in18
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-main5
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave4
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband8
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface11
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-device4
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-vlanid6
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-219
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-22
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c1245
-rw-r--r--src/settings/plugins/ifcfg-rh/utils.c99
-rw-r--r--src/settings/plugins/ifcfg-rh/utils.h9
-rw-r--r--src/settings/plugins/ifcfg-rh/writer.c276
-rw-r--r--src/settings/plugins/ifcfg-suse/Makefile.in9
-rw-r--r--src/settings/plugins/ifcfg-suse/plugin.c4
-rw-r--r--src/settings/plugins/ifnet/Makefile.am16
-rw-r--r--src/settings/plugins/ifnet/Makefile.in25
-rw-r--r--src/settings/plugins/ifnet/connection_parser.c89
-rw-r--r--src/settings/plugins/ifnet/net_parser.c169
-rw-r--r--src/settings/plugins/ifnet/net_parser.h4
-rw-r--r--src/settings/plugins/ifnet/net_utils.c169
-rw-r--r--src/settings/plugins/ifnet/net_utils.h1
-rw-r--r--src/settings/plugins/ifnet/plugin.c85
-rw-r--r--src/settings/plugins/ifnet/plugin.h2
-rw-r--r--src/settings/plugins/ifnet/tests/Makefile.in9
-rw-r--r--src/settings/plugins/ifnet/tests/net11
-rw-r--r--src/settings/plugins/ifnet/tests/test_all.c43
-rw-r--r--src/settings/plugins/ifnet/tests/wpa_supplicant.conf7
-rw-r--r--src/settings/plugins/ifnet/wpa_parser.c19
-rw-r--r--src/settings/plugins/ifnet/wpa_parser.h5
-rw-r--r--src/settings/plugins/ifupdown/Makefile.in9
-rw-r--r--src/settings/plugins/ifupdown/interface_parser.c13
-rw-r--r--src/settings/plugins/ifupdown/interface_parser.h3
-rw-r--r--src/settings/plugins/ifupdown/parser.c315
-rw-r--r--src/settings/plugins/ifupdown/plugin.c49
-rw-r--r--src/settings/plugins/ifupdown/tests/Makefile.am2
-rw-r--r--src/settings/plugins/ifupdown/tests/Makefile.in11
-rw-r--r--src/settings/plugins/ifupdown/tests/test-ifupdown.c391
-rw-r--r--src/settings/plugins/ifupdown/tests/test17-wired-static-verify-ip45
-rw-r--r--src/settings/plugins/keyfile/Makefile.am4
-rw-r--r--src/settings/plugins/keyfile/Makefile.in13
-rw-r--r--src/settings/plugins/keyfile/plugin.c54
-rw-r--r--src/settings/plugins/keyfile/plugin.h4
-rw-r--r--src/settings/plugins/keyfile/reader.c89
-rw-r--r--src/settings/plugins/keyfile/tests/Makefile.am2
-rw-r--r--src/settings/plugins/keyfile/tests/Makefile.in11
-rw-r--r--src/settings/plugins/keyfile/tests/keyfiles/Makefile.am3
-rw-r--r--src/settings/plugins/keyfile/tests/keyfiles/Makefile.in12
-rw-r--r--src/settings/plugins/keyfile/tests/keyfiles/Test_InfiniBand_Connection13
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c207
-rw-r--r--src/settings/plugins/keyfile/writer.c40
-rw-r--r--src/settings/tests/Makefile.am1
-rw-r--r--src/settings/tests/Makefile.in10
-rw-r--r--src/supplicant-manager/Makefile.am6
-rw-r--r--src/supplicant-manager/Makefile.in16
-rw-r--r--src/supplicant-manager/nm-supplicant-config.c105
-rw-r--r--src/supplicant-manager/nm-supplicant-config.h8
-rw-r--r--src/supplicant-manager/nm-supplicant-interface.c353
-rw-r--r--src/supplicant-manager/nm-supplicant-interface.h26
-rw-r--r--src/supplicant-manager/nm-supplicant-manager.c2
-rw-r--r--src/supplicant-manager/nm-supplicant-settings-verify.c34
-rw-r--r--src/supplicant-manager/nm-supplicant-settings-verify.h3
-rw-r--r--src/supplicant-manager/tests/Makefile.am2
-rw-r--r--src/supplicant-manager/tests/Makefile.in11
-rw-r--r--src/tests/Makefile.am2
-rw-r--r--src/tests/Makefile.in11
-rw-r--r--src/tests/test-wifi-ap-utils.c8
-rw-r--r--src/vpn-manager/Makefile.am13
-rw-r--r--src/vpn-manager/Makefile.in34
-rw-r--r--src/vpn-manager/nm-vpn-connection-base.c209
-rw-r--r--src/vpn-manager/nm-vpn-connection-base.h57
-rw-r--r--src/vpn-manager/nm-vpn-connection.c91
-rw-r--r--src/vpn-manager/nm-vpn-connection.h9
-rw-r--r--src/vpn-manager/nm-vpn-manager.c38
-rw-r--r--src/vpn-manager/nm-vpn-manager.h23
-rw-r--r--src/wifi/Makefile.am31
-rw-r--r--src/wifi/Makefile.in665
-rw-r--r--src/wifi/wifi-utils-nl80211.c819
-rw-r--r--src/wifi/wifi-utils-nl80211.h30
-rw-r--r--src/wifi/wifi-utils-private.h74
-rw-r--r--src/wifi/wifi-utils-wext.c663
-rw-r--r--src/wifi/wifi-utils-wext.h30
-rw-r--r--src/wifi/wifi-utils.c213
-rw-r--r--src/wifi/wifi-utils.h72
-rw-r--r--src/wimax/Makefile.am21
-rw-r--r--src/wimax/Makefile.in190
-rw-r--r--src/wimax/nm-device-wimax.c111
-rw-r--r--src/wimax/nm-device-wimax.h8
-rw-r--r--src/wimax/nm-wimax-factory.c58
-rw-r--r--src/wimax/nm-wimax-nsp.c2
-rw-r--r--src/wpa.c455
-rw-r--r--src/wpa.h38
-rw-r--r--test/Makefile.am4
-rw-r--r--test/Makefile.in13
-rw-r--r--test/nm-tool.c2
-rw-r--r--tools/Makefile.am2
-rw-r--r--tools/Makefile.in11
-rwxr-xr-xtools/glib-mkenums570
579 files changed, 55104 insertions, 17707 deletions
diff --git a/Makefile.am b/Makefile.am
index c128368ce..bcd403bd9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
+include $(GLIB_MAKEFILE)
+
SUBDIRS = \
- marshallers \
include \
libnm-util \
libnm-glib \
@@ -22,14 +23,16 @@ EXTRA_DIST = \
NetworkManager.pc.in \
intltool-extract.in \
intltool-merge.in \
- intltool-update.in
+ intltool-update.in \
+ Makefile.glib
DISTCHECK_CONFIGURE_FLAGS = \
--with-tests=yes \
--with-docs=yes \
--enable-more-warnings=yes \
--with-udev-dir=$$dc_install_base/lib/udev \
- --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
+ --with-wext=no
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
@@ -38,3 +41,8 @@ pkgconfig_DATA = NetworkManager.pc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+CLEANFILES = cscope.in.out cscope.out cscope.po.out
+
+.PHONY: cscope
+cscope:
+ cscope -b -q -R -Iinclude -ssrc -slibnm-glib -slibnm-util -scli/src;
diff --git a/Makefile.glib b/Makefile.glib
new file mode 100644
index 000000000..951ce6f83
--- /dev/null
+++ b/Makefile.glib
@@ -0,0 +1,169 @@
+# -*- Mode: makefile -*-
+#
+# Work-in-progress...
+# See https://bugzilla.gnome.org/show_bug.cgi?id=654395
+
+_GLIB_CLEANFILES =
+_GLIB_DISTCLEANFILES =
+
+_GLIB_V_GEN = $(_glib_v_gen_$(V))
+_glib_v_gen_ = $(_glib_v_gen_$(AM_DEFAULT_VERBOSITY))
+_glib_v_gen_0 = @echo " GEN " $(subst .stamp,,$@);
+
+
+### glib-genmarshal
+
+_GLIB_MARSHAL_GENERATED = $(subst .h,,$(filter %marshal.h,$(GLIB_GENERATED)))
+
+_glib_marshal_prefix = $(subst marshal,,$(subst _marshal,,$(subst -,_,$(notdir $(1)))))_marshal
+_glib_marshal_sources_var = $(subst -,_,$(notdir $(1)))_sources
+_glib_marshal_sources = $(filter-out %.h,$(filter-out $(GLIB_GENERATED),$($(_glib_marshal_sources_var))))
+
+define _glib_make_genmarshal_rules
+$(if $(_glib_marshal_sources),,$(error Need to define $(_glib_marshal_sources_var) for $(1).[ch]))
+
+$(1).list.stamp: $(_glib_marshal_sources)
+ $$(_GLIB_V_GEN) LC_ALL=C sed -ne 's/.*_$(_glib_marshal_prefix)_\([_A-Z]*\).*/\1/p' $$^ | sort -u | sed -e 's/__/:/' -e 's/_/,/g' > $(1).list.tmp && \
+ (cmp -s $(1).list.tmp $(1).list || cp $(1).list.tmp $(1).list) && \
+ rm -f $(1).list.tmp && \
+ echo timestamp > $$@
+
+$(1).list: $(1).list.stamp
+ @true
+
+$(1).h: $(1).list
+ $$(_GLIB_V_GEN) $$(GLIB_GENMARSHAL) \
+ --prefix=_$(_glib_marshal_prefix) --header \
+ $$(GLIB_GENMARSHAL_H_FLAGS) \
+ $$($(_glib_marshal_prefix)_GENMARSHAL_H_FLAGS) \
+ $$< > $$@.tmp && \
+ mv $$@.tmp $$@
+
+$(1).c: $(1).list
+ $$(_GLIB_V_GEN) (echo "#include \"$$(subst .c,.h,$$(@F))\""; $$(GLIB_GENMARSHAL) \
+ --prefix=_$(_glib_marshal_prefix) --body \
+ $$(GLIB_GENMARSHAL_C_FLAGS) \
+ $$($(_glib_marshal_prefix)_GENMARSHAL_C_FLAGS) \
+ $$< ) > $$@.tmp && \
+ mv $$@.tmp $$@
+
+_GLIB_CLEANFILES += $(1).list.stamp $(1).list
+_GLIB_DISTCLEANFILES += $(1).h $(1).c
+endef
+
+$(foreach f,$(_GLIB_MARSHAL_GENERATED),$(eval $(call _glib_make_genmarshal_rules,$f)))
+
+
+### glib-mkenums
+
+_GLIB_ENUM_TYPES_GENERATED = $(subst .h,,$(filter %enum-types.h %enumtypes.h,$(GLIB_GENERATED)))
+
+_glib_enum_types_prefix = $(subst -,_,$(notdir $(1)))
+_glib_enum_types_guard = __$(shell LC_ALL=C echo $(_glib_enum_types_prefix) | tr 'a-z' 'A-Z')_H__
+_glib_enum_types_sources_var = $(_glib_enum_types_prefix)_sources
+_glib_enum_types_sources = $(filter-out $(GLIB_GENERATED),$($(_glib_enum_types_sources_var)))
+_glib_enum_types_h_sources = $(filter %.h,$(_glib_enum_types_sources))
+
+define _glib_make_mkenums_rules
+$(if $(_glib_enum_types_sources),,$(error Need to define $(_glib_enum_types_sources_var) for $(1).[ch]))
+
+$(1).h.stamp: $(_glib_enum_types_h_sources)
+ $$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \
+ --fhead "/* Generated by glib-mkenums. Do not edit */\n\n#ifndef $(_glib_enum_types_guard)\n#define $(_glib_enum_types_guard)\n\n" \
+ $$(GLIB_MKENUMS_H_FLAGS) \
+ $$($(_glib_enum_types_prefix)_MKENUMS_H_FLAGS) \
+ --fhead "#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* $(_glib_enum_types_guard) */" \
+ $$^ > $(1).h.tmp && \
+ (cmp -s $(1).h.tmp $(1).h || cp $(1).h.tmp $(1).h) && \
+ rm -f $(1).h.tmp && \
+ echo timestamp > $$@
+
+$(1).h: $(1).h.stamp
+ @true
+
+$(1).c.stamp: $(_glib_enum_types_h_sources)
+ $$(_GLIB_V_GEN) $$(GLIB_MKENUMS) \
+ --fhead "/* Generated by glib-mkenums. Do not edit */\n\n#include \"$(notdir $(1)).h\"\n" \
+ $$(GLIB_MKENUMS_C_FLAGS) \
+ $$($(_glib_enum_types_prefix)_MKENUMS_C_FLAGS) \
+ --fhead "$$(foreach f,$$(^F),\n#include \"$$(f)\")\n\n" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n\n if (g_once_init_enter (&g_define_type_id__volatile))\n {\n static const G@Type@Value values[] = {\n" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },\n" \
+ --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id =\n g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n\n return g_define_type_id__volatile;\n}\n" \
+ $$^ > $(1).c.tmp && \
+ (cmp -s $(1).c.tmp $(1).c || cp $(1).c.tmp $(1).c) && \
+ rm -f $(1).c.tmp && \
+ echo timestamp > $$@
+
+$(1).c: $(1).c.stamp
+ @true
+
+_GLIB_CLEANFILES += $(1).h.stamp $(1).c.stamp
+_GLIB_DISTCLEANFILES += $(1).h $(1).c $(1).h.stamp $(1).c.stamp
+endef
+
+$(foreach f,$(_GLIB_ENUM_TYPES_GENERATED),$(eval $(call _glib_make_mkenums_rules,$f)))
+
+
+### glib-compile-schemas
+
+_GLIB_ENUMS_XML_GENERATED = $(filter %.enums.xml,$(GLIB_GENERATED))
+_GLIB_GSETTINGS_SCHEMA_FILES = $(filter %.gschema.xml,$(gsettingsschema_DATA))
+_GLIB_GSETTINGS_VALID_FILES = $(subst .xml,.valid,$(_GLIB_GSETTINGS_SCHEMA_FILES))
+
+_glib_enums_xml_prefix = $(subst .,_,$(notdir $(1)))
+_glib_enums_xml_sources_var = $(_glib_enums_xml_prefix)_sources
+_glib_enums_xml_sources = $(filter-out $(GLIB_GENERATED),$($(_glib_enums_xml_sources_var)))
+_glib_enums_xml_namespace = $(subst .enums.xml,,$(notdir $(1)))
+
+define _glib_make_enums_xml_rule
+$(if $(_glib_enums_xml_sources),,$(error Need to define $(_glib_enums_xml_sources_var) for $(1)))
+
+$(1): $(_glib_enums_xml_sources)
+ $$(_GLIB_V_GEN) $$(GLIB_MKENUMS) --comments '<!-- @comment@ -->' --fhead "<schemalist>" --vhead " <@type@ id='$(_glib_enums_xml_namespace).@EnumName@'>" --vprod " <value nick='@valuenick@' value='@valuenum@'/>" --vtail " </@type@>" --ftail "</schemalist>" $$^ > $$@.tmp && mv $$@.tmp $$@
+endef
+
+_GLIB_V_CHECK = $(_glib_v_check_$(V))
+_glib_v_check_ = $(_glib_v_check_$(AM_DEFAULT_VERBOSITY))
+_glib_v_check_0 = @echo " CHECK " $(subst .valid,.xml,$@);
+
+define _glib_make_schema_validate_rule
+$(subst .xml,.valid,$(1)): $(_GLIB_ENUMS_XML_GENERATED) $(1)
+ $$(_GLIB_V_CHECK) $$(GLIB_COMPILE_SCHEMAS) --strict --dry-run $$(addprefix --schema-file=,$$^) && touch $$@
+endef
+
+define _glib_make_schema_rules
+all-am: $(_GLIB_GSETTINGS_VALID_FILES)
+
+install-data-am: glib-install-schemas-hook
+
+glib-install-schemas-hook: install-gsettingsschemaDATA
+ @test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || (echo $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir))
+
+uninstall-am: glib-uninstall-schemas-hook
+
+glib-uninstall-schemas-hook: uninstall-gsettingsschemaDATA
+ @test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || (echo $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir))
+
+.PHONY: glib-install-schemas-hook glib-uninstall-schemas-hook
+endef
+
+_GLIB_CLEANFILES += $(_GLIB_ENUMS_XML_GENERATED) $(_GLIB_GSETTINGS_VALID_FILES)
+
+$(foreach f,$(_GLIB_ENUMS_XML_GENERATED),$(eval $(call _glib_make_enums_xml_rule,$f)))
+$(foreach f,$(_GLIB_GSETTINGS_SCHEMA_FILES),$(eval $(call _glib_make_schema_validate_rule,$f)))
+$(if $(_GLIB_GSETTINGS_SCHEMA_FILES),$(eval $(_glib_make_schema_rules)))
+
+
+### Cleanup
+.PHONY: clean-glib distclean-glib
+
+clean-am: clean-glib
+clean-glib:
+ $(if $(strip $(_GLIB_CLEANFILES)),-rm -f $(_GLIB_CLEANFILES))
+
+distclean-am: distclean-glib
+distclean-glib:
+ $(if $(strip $(_GLIB_DISTCLEANFILES)),-rm -f $(_GLIB_DISTCLEANFILES))
diff --git a/Makefile.in b/Makefile.in
index fd04cc7aa..b87cf8aa5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -190,6 +190,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -244,11 +246,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -259,6 +265,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -298,6 +305,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -362,7 +371,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = \
- marshallers \
include \
libnm-util \
libnm-glib \
@@ -385,19 +393,22 @@ EXTRA_DIST = \
NetworkManager.pc.in \
intltool-extract.in \
intltool-merge.in \
- intltool-update.in
+ intltool-update.in \
+ Makefile.glib
DISTCHECK_CONFIGURE_FLAGS = \
--with-tests=yes \
--with-docs=yes \
--enable-more-warnings=yes \
--with-udev-dir=$$dc_install_base/lib/udev \
- --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
+ --with-wext=no
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = NetworkManager.pc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+CLEANFILES = cscope.in.out cscope.out cscope.po.out
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -819,6 +830,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -918,6 +930,11 @@ uninstall-am: uninstall-pkgconfigDATA
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-pkgconfigDATA
+include $(GLIB_MAKEFILE)
+
+.PHONY: cscope
+cscope:
+ cscope -b -q -R -Iinclude -ssrc -slibnm-glib -slibnm-util -scli/src;
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/NEWS b/NEWS
index 31f24506d..096869b4c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,50 @@
==============================================
+NetworkManager-0.9.4
+Overview of changes since NetworkManager-0.9.2
+==============================================
+
+This is a new stable release of NetworkManager. Notable changes include:
+
+* Better handling of WiFi devices via nl80211 when available (instead of WEXT)
+* IP configuration is now non-blocking; waiting for IPv6 RA no longer blocks
+ the device from activating if IPv4 is ready and vice versa
+* Addded support for firewall "zones" via FirewallD
+* Added basic support for bonded interfaces
+* WiFi connections are no longer locked to a specific MAC address if they are
+ "locally administered" addresses (ie, 02:::::)
+* New state change reasons have been added for mobile broadband PIN errors
+* Agent-owned secrets are now sent to agents for newly created connections
+* Support for non-UTF8-encoded 802.1x passwords has been added
+* libnm-glib now fetches some properties more aggressively (like active
+ connections, access points, etc)
+* Added basic support for IP-over-Infiniband interfaces
+* Added support for device plugins and converted WiMAX support to a plugin for
+ easier packaging and simpler dependencies
+* Added support for VLAN interfaces
+* Added support for 802.1x EAP-FAST authentication
+* Added non-blocking mode and API to libnm-glib
+* Linux Wireless Extensions (WEXT) support can be disabled at configure time
+ with --with-wext=no
+* IPv6 Privacy Extensions are now enabled by default for new connections
+* Support for checking Internet connectivity has been added
+* The ifnet system config plugin rewrites config files less often
+* A bug causing IPv6 address assignment to fail on newer kernels with libnl3
+ has been fixed
+* Fix a bug in the ifcfg-rh plugin with backticks in WPA passphrases
+* Ensure connections that cannot be stored are ignored by the ifnet plugin
+* Enable out-of-the-box IPv6 connectivity by allowing IPv4 to fail if IPv6 succeeds
+* Allow proxying of DNSSEC data when using the dnsmasq local caching nameserver plugin
+* Add support for multiple domain names sent from VPN plugins
+* Removed support for WiFi Ad-Hoc WPA connections due to kernel bugs
+
+
+==============================================
NetworkManager-0.9.2
Overview of changes since NetworkManager-0.9.0
==============================================
+This is a new stable release of NetworkManager. Notable changes include:
+
* Support for libnl2 and libnl3 and various memory leak fixes
* Bug fixes for the ifnet config plugin
* Ensure IPv6 link-local DNS servers work correctly in the dnsmasq DNS plugin
diff --git a/TODO b/TODO
index 3b8438acf..2348b3c62 100644
--- a/TODO
+++ b/TODO
@@ -1,16 +1,30 @@
So you're interested in hacking on NetworkManager? Here's some cool
stuff you could do...
-* Internet Connectivity Detection
-
-This feature would consist of attempting to make an HTTP request to a known
-DNS address and compare the response to a well-known string, like Windows does.
-This feature and the server address should be configurable via an option in the
-/etc/NetworkManager/NetworkManager.conf config file.
-
-Once the device has successfully gotten an IPv4 or IPv6 address, it should
-enter the state NM_DEVICE_STATE_IP_CHECK, where this HTTP request would be
-performed. After the check was done, the device would set a property in
+* Internet Connectivity Detection Enhancements
+
+Current connectivity checking is global, while what we really want is to check
+connectivity per-interface and update the global state based on the composite
+of each device's state. Unfortunately that requires two things:
+
+1) latest libsoup and glib for using libsoup connection state signals, which
+ allow us to set socket options before the actual connection is made; here
+ we'd bind the socket to the specific IP address of the interface we're
+ using, and possibly set SO_BINDTODEVICE as well
+2) setting /proc/sys/net/ipv4/conf/<iface>/rp_filter to "2" which tells the
+ kernel to route the incoming and outgoing packet properly even though the
+ interface may not have the necessary routes
+
+The first is the largest obstacle, but ideally we implement this and enable it
+when we have the required glib and libsoup versions available. One other
+complication is that this checking should be done during the
+NM_DEVICE_STATE_IP_CHECK phase (along with other operations like WiFi hotspot
+auto-login) while the current checks are done globally in nm-manager.c, so
+keeping both code paths might be complex.
+
+But ideally, once the device has successfully gotten an IPv4 or IPv6 address, it
+should enter the state NM_DEVICE_STATE_IP_CHECK, where a connectivity check is
+started. After the check returns, the device would set a property in
NMDevicePrivate to indicate whether Internet access was successful or not, and
advance to the NM_DEVICE_STATE_ACTIVATED state.
@@ -19,10 +33,6 @@ nm_manager_update_state() function, would query this property and set
NM_STATE_CONNECTED_LOCAL, NM_STATE_CONNECTED_SITE, or NM_STATE_CONNECTED_GLOBAL
based on it and the device's state.
-Ideally this feature would not require linking to an HTTP library like libcurl,
-but would use open-coded simple HTTP or libsoup for the request. The request
-must be done asynchronously, of course.
-
* ADSL support
@@ -41,24 +51,6 @@ attribute from the sysfs directory for the ATM interface on 2.6.38.8 and later
kernels).
-* Convert WEXT code to nl80211
-
-There's still some WEXT code in NetworkManager for signal strength reporting,
-mode, frequency, BSSID, etc. This should all get converted to nl80211 code,
-possibly using libnl as a base. It's not particularly hard, but some
-investigation on how to talk to netlink and how to use nl80211 and netlink
-attributes will need to be done. Tools like 'iw' already do much of this work,
-but we *cannot* copy & paste code from them since the 'iw' license is not
-compatible with NetworkManager's GPL license. For exmaple, the following code
-does the job, but should be reworked a bit to use the internal synchronous
-netlink connection from src/nm-netlink-manager.c instead of doing the
-netlink communication on its own with genl_connect() and such:
-
-http://mail.gnome.org/archives/networkmanager-list/2009-September/msg00214.html
-
-The same approach should be taken for signal strength reporting, etc.
-
-
* Real Access Point mode support
Now that NetworkManager requires wpa_supplicant 0.7.x or later, we can add
@@ -440,63 +432,6 @@ that handle different system proxy handlers. Some of the proxy handlers are:
GNOME/KDE: how do these desktop environments retrieve proxy configuration?
-* Bridging and Bonding Support
-
-The largest complication here is that NetworkManager normally operates on
-physical interfaces, while bridging and bonding involve tying multiple physical
-interfaces together into a logical interface. This has interesting implications
-for the D-Bus API and the NM device model. The first complication is that
-we may need to do 802.1x port authentication on an interface before it can
-communicate with the other side of the link, and those credentials may be
-different for each interface; thus we may need to do separate 802.1x
-operations on each interface that is part of a bridge/bond before adding each
-one to the master bridge/bond interface.
-
-In this way bridge/bond interfaces may be treated the same way as NetworkManager
-treats VPN interfaces already; one or more physical interface NMConnections must
-be activated before the master bridge/bond interface's NMConnection can be
-activated, though this all happens internally.
-
-To enable bridging and bonding in the NMConnection itself, we should create
-new NMSettingBridge and NMSettingBond classes that contain information specific
-to each. Both settings would contain a 'components' property with an
-'array of string' type which would contain the UUIDs of the Connections of
-physical interfaces that compose the bridge or bond. Thus NetworkManager would
-have the necessary information to tie lower-level interface configuration
-(802.1x, MTU, MAC address locking, duplex mode, speed, etc) to each physical
-interface that will be part of the bridge/bond, configure the interface with
-it, and then configure the master bridge/bond interface at upper layers using
-configuration specific for the bridge/bond interface (like IP details). Thus
-for a single active bridge, two or more NMConnections would be activated; one
-for each physical interface component of the bridge/bond, and one for the master
-bridge/bond interface itself.
-
-NMSettingBridge would contain at least the following keys:
-
- components: (array of string) UUIDs of component connections
- stp: (boolean) on to enable STP, off to disable
-
-NMSettingBond would contain at least the following keys:
-
- components: (array of string) UUIDs of component connections
- mode: (string) one of "balance-rr", "active-backup", "balance-xor",
- "broadcast", "802.3ad", "balance-tlb", or "balance-alb"
- monitor-interval: (uint) Specifies link monitoring interval (in milliseconds);
- NM will always enable netlink carrier monitoring if this
- value is non-zero so this property only affects speed and
- duplex checking
-
-In the future we may consider adding other bonding parameters like "up-delay"
-and "down-delay".
-
-Then we'd add a 'component' (boolean) property to NMSettingConnection to
-indicate that the component interface connections were in fact components of
-a bridge or bond and shouldn't be automatically started by NetworkManager or
-displayed as separate connections in the user interface.
-
-TO BE CONTINUED
-
-
* Better Tablet/Mobile Behavior
There are a few components to this:
@@ -547,71 +482,3 @@ Consequently the same behavior should be used when a better connection becomes
available. This behavior should be suspended when special connections like
Internet Connection Sharing ones are started, where clearly the priorities
are different (ie, for Mobile Hotspot 3G > WiFi).
-
-
-* IP over Infiniband (IPoIB)
-
-These interfaces are similar to Ethernet interfaces with a few distinct
-differences:
-
- 1) they have 64-bit MAC addresses (GUIDs in Infiniband parlance)
- 2) DHCP clients need to be modified to handle IPoIB
- 3) they have a different ARP type and different L2 options
-
-By default the interfaces do not have IP capability, but they gain that
-capability when certain kernel modules (ib_ipoib.ko) are loaded, which causes
-the IP-capable interface is created. The IP-capable interfaces apparently have
-ARPHRD_INFINIBAND set, which is likely what NM should use to identify them.
-
-One outstanding question is whether NM should (a) detect all Infiniband
-interfaces and load ib_ipoib.ko only when there is a defined NMConnection for
-an Infiniband interface, or (b) whether NM should automatically load ib_ipoib.ko
-for every Infiniband interface, or (c) whether NM should only manage Infiniband
-interfaces that already have associated IP-capable interfaces (ie, something
-else is responsible for loading ib_ipoib.ko). Depending on our implementation,
-(a) might not be possible, because if IPoIB connections are treated similar to
-plain Ethernet connections, we may not have any information about whether a
-specific NMConnection is Infiniband other than the MAC address.
-
-It turns out that on some distros other components (like system services) may
-load ib_ipoib.ko for us. For exmaple, the 'rdma' package on Fedora/RHEL systems
-contains /etc/rc.d/init.d/rdma which uses values in /etc/rdma/rdma.conf to load
-ib_ipoib.ko at system startup if the user has requested it via IPOIB_LOAD=yes.
-For the time being, if the some other component of the system loads IP for us,
-NetworkManager should probably still recognize the Infiniband interface, but
-leave it in unmanaged mode if there is no available IPoIB interface associated
-with the Infiniband one. i.e. for now, NM should not automatically load
-ib_ipoib.ko.
-
-The second question is whether to fold IPoIB support into the NMDeviceEthernet
-class as was done for s390 network interfaces, or whether to create a subclass
-of NMDevice:
-
-1) extend NMDeviceEthernet: this would involve loosening the assumption that
-hardware addresses (the 'hw-address'/'perm-hw-address' properties of
-NMDeviceEthernet and the 'mac-address'/'cloned-mac-address' properties of
-NMSettingWired) are 48 bits wide and instead can be either 48 or 64 bits wide.
-
-2) create a new NMDevice subclass for Infiniband devices tailored to Infiniband
-specific behavior and attributes. This would be a lot more code since we'd have
-to duplicate much of what NMDeviceEthernet already does, plus add the
-Infiniband device class to libnm-glib. This also would be the least invasive
-from an API standpoint since the existing API would be unchanged, except for
-the addition of a new value in the NMDeviceType enum, which clients should
-ignore if they don't understand it. (Need to coordinate additions to this enum
-between 0.8.x and 0.9.x since 0.9.x has more device types, but we want to make
-sure new device types get the same number for both branches).
-
-For Infiniband specific options we could either fold them into NMSettingEthernet
-or create a new NMSettingInfiniband class. Current Infiniband specific options
-are partitions/P_Keys, datagram vs. connected mode, and MTU. The default MTU
-varies with the 'mode'; for datagram it is currently 2044, while for connected
-mode it is currently 65520. Given that we only have 2 IB-specific options
-we should probably just fold them into NMSettingEthernet similar to what was
-done for s390-specific options.
-
-For some general (and also Red Hat/Fedora specific) information see:
-
-http://tools.ietf.org/html/rfc4392
-http://rhkernel.org/#RHEL6+2.6.32-71.18.2.el6/Documentation/infiniband/ipoib.txt
-
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index aa5624c81..78cf01752 100755
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -8050,7 +8050,7 @@ EOF
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
- *) func_apped perm_rpath " $libdir" ;;
+ *) func_append perm_rpath " $libdir" ;;
esac
fi
done
diff --git a/callouts/Makefile.am b/callouts/Makefile.am
index 4a1ea7ca5..616278592 100644
--- a/callouts/Makefile.am
+++ b/callouts/Makefile.am
@@ -58,7 +58,9 @@ nm_dispatcher_action_SOURCES = \
nm_dispatcher_action_CPPFLAGS = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
$(DBUS_CFLAGS) \
$(GLIB_CFLAGS) \
-DG_DISABLE_DEPRECATED \
@@ -83,7 +85,9 @@ libtest_dispatcher_envp_la_SOURCES = \
libtest_dispatcher_envp_la_CPPFLAGS = \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/callouts/Makefile.in b/callouts/Makefile.in
index 1cef470ca..4b46ce2ab 100644
--- a/callouts/Makefile.in
+++ b/callouts/Makefile.in
@@ -234,6 +234,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -288,11 +290,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -303,6 +309,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -342,6 +349,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -456,7 +465,9 @@ nm_dispatcher_action_SOURCES = \
nm_dispatcher_action_CPPFLAGS = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
$(DBUS_CFLAGS) \
$(GLIB_CFLAGS) \
-DG_DISABLE_DEPRECATED \
@@ -478,7 +489,9 @@ libtest_dispatcher_envp_la_SOURCES = \
libtest_dispatcher_envp_la_CPPFLAGS = \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/callouts/tests/Makefile.am b/callouts/tests/Makefile.am
index 6a46b629f..93d3fae7f 100644
--- a/callouts/tests/Makefile.am
+++ b/callouts/tests/Makefile.am
@@ -1,6 +1,8 @@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I${top_builddir}/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/callouts
noinst_PROGRAMS = \
diff --git a/callouts/tests/Makefile.in b/callouts/tests/Makefile.in
index eac990b1f..1d71988da 100644
--- a/callouts/tests/Makefile.in
+++ b/callouts/tests/Makefile.in
@@ -143,6 +143,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -197,11 +199,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -212,6 +218,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -251,6 +258,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,7 +325,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I${top_builddir}/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/callouts
diff --git a/cli/Makefile.in b/cli/Makefile.in
index c3de35f3a..46ab67336 100644
--- a/cli/Makefile.in
+++ b/cli/Makefile.in
@@ -147,6 +147,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -201,11 +203,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -216,6 +222,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -255,6 +262,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index f49d0127a..ec62bfeae 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -4,10 +4,14 @@ bin_PROGRAMS = \
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-glib
nmcli_SOURCES = \
+ common.c \
+ common.h \
connections.c \
connections.h \
devices.c \
diff --git a/cli/src/Makefile.in b/cli/src/Makefile.in
index def0b2869..ea5214e54 100644
--- a/cli/src/Makefile.in
+++ b/cli/src/Makefile.in
@@ -57,9 +57,10 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_nmcli_OBJECTS = nmcli-connections.$(OBJEXT) nmcli-devices.$(OBJEXT) \
- nmcli-network-manager.$(OBJEXT) nmcli-settings.$(OBJEXT) \
- nmcli-nmcli.$(OBJEXT) nmcli-utils.$(OBJEXT)
+am_nmcli_OBJECTS = nmcli-common.$(OBJEXT) nmcli-connections.$(OBJEXT) \
+ nmcli-devices.$(OBJEXT) nmcli-network-manager.$(OBJEXT) \
+ nmcli-settings.$(OBJEXT) nmcli-nmcli.$(OBJEXT) \
+ nmcli-utils.$(OBJEXT)
nmcli_OBJECTS = $(am_nmcli_OBJECTS)
am__DEPENDENCIES_1 =
nmcli_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -144,6 +145,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -198,11 +201,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -213,6 +220,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -252,6 +260,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -318,10 +328,14 @@ top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-glib
nmcli_SOURCES = \
+ common.c \
+ common.h \
connections.c \
connections.h \
devices.c \
@@ -434,6 +448,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmcli-common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmcli-connections.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmcli-devices.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nmcli-network-manager.Po@am__quote@
@@ -468,6 +483,22 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+nmcli-common.o: common.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nmcli_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nmcli-common.o -MD -MP -MF $(DEPDIR)/nmcli-common.Tpo -c -o nmcli-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nmcli-common.Tpo $(DEPDIR)/nmcli-common.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common.c' object='nmcli-common.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nmcli_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nmcli-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c
+
+nmcli-common.obj: common.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nmcli_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nmcli-common.obj -MD -MP -MF $(DEPDIR)/nmcli-common.Tpo -c -o nmcli-common.obj `if test -f 'common.c'; then $(CYGPATH_W) 'common.c'; else $(CYGPATH_W) '$(srcdir)/common.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nmcli-common.Tpo $(DEPDIR)/nmcli-common.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common.c' object='nmcli-common.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nmcli_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nmcli-common.obj `if test -f 'common.c'; then $(CYGPATH_W) 'common.c'; else $(CYGPATH_W) '$(srcdir)/common.c'; fi`
+
nmcli-connections.o: connections.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nmcli_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nmcli-connections.o -MD -MP -MF $(DEPDIR)/nmcli-connections.Tpo -c -o nmcli-connections.o `test -f 'connections.c' || echo '$(srcdir)/'`connections.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nmcli-connections.Tpo $(DEPDIR)/nmcli-connections.Po
diff --git a/cli/src/common.c b/cli/src/common.c
new file mode 100644
index 000000000..e9a5d7600
--- /dev/null
+++ b/cli/src/common.c
@@ -0,0 +1,360 @@
+/*
+ * nmcli - command-line tool for controlling NetworkManager
+ * Common functions and data shared between files.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2012 Red Hat, Inc.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include "common.h"
+#include "utils.h"
+
+/* Available fields for IPv4 group */
+static NmcOutputField nmc_fields_ip4_config[] = {
+ {"GROUP", N_("GROUP"), 15, NULL, 0}, /* 0 */
+ {"ADDRESS", N_("ADDRESS"), 68, NULL, 0}, /* 1 */
+ {"ROUTE", N_("ROUTE"), 68, NULL, 0}, /* 2 */
+ {"DNS", N_("DNS"), 35, NULL, 0}, /* 3 */
+ {"DOMAIN", N_("DOMAIN"), 35, NULL, 0}, /* 4 */
+ {"WINS", N_("WINS"), 20, NULL, 0}, /* 5 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_IP4_CONFIG_ALL "GROUP,ADDRESS,ROUTE,DNS,DOMAIN,WINS"
+
+/* Available fields for DHCPv4 group */
+static NmcOutputField nmc_fields_dhcp4_config[] = {
+ {"GROUP", N_("GROUP"), 15, NULL, 0}, /* 0 */
+ {"OPTION", N_("OPTION"), 80, NULL, 0}, /* 1 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_DHCP4_CONFIG_ALL "GROUP,OPTION"
+
+/* Available fields for IPv6 group */
+static NmcOutputField nmc_fields_ip6_config[] = {
+ {"GROUP", N_("GROUP"), 15, NULL, 0}, /* 0 */
+ {"ADDRESS", N_("ADDRESS"), 95, NULL, 0}, /* 1 */
+ {"ROUTE", N_("ROUTE"), 95, NULL, 0}, /* 2 */
+ {"DNS", N_("DNS"), 60, NULL, 0}, /* 3 */
+ {"DOMAIN", N_("DOMAIN"), 35, NULL, 0}, /* 4 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_IP6_CONFIG_ALL "GROUP,ADDRESS,ROUTE,DNS,DOMAIN"
+
+/* Available fields for DHCPv6 group */
+static NmcOutputField nmc_fields_dhcp6_config[] = {
+ {"GROUP", N_("GROUP"), 15, NULL, 0}, /* 0 */
+ {"OPTION", N_("OPTION"), 80, NULL, 0}, /* 1 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_DHCP6_CONFIG_ALL "GROUP,OPTION"
+
+
+gboolean
+print_ip4_config (NMIP4Config *cfg4, NmCli *nmc, const char *group_prefix)
+{
+ GSList *list, *iter;
+ const GArray *array;
+ const GPtrArray *ptr_array;
+ char **addr_arr = NULL;
+ char **route_arr = NULL;
+ char **dns_arr = NULL;
+ char **domain_arr = NULL;
+ char **wins_arr = NULL;
+ int i = 0;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ if (cfg4 == NULL)
+ return FALSE;
+
+ nmc->allowed_fields = nmc_fields_ip4_config;
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_IP4_CONFIG_ALL, nmc->allowed_fields, NULL);
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
+
+ /* addresses */
+ list = (GSList *) nm_ip4_config_get_addresses (cfg4);
+ addr_arr = g_new (char *, g_slist_length (list) + 1);
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ NMIP4Address *addr = (NMIP4Address *) iter->data;
+ guint32 prefix;
+ char *ip_str, *gw_str;
+
+ ip_str = nmc_ip4_address_as_string (nm_ip4_address_get_address (addr), NULL);
+ prefix = nm_ip4_address_get_prefix (addr);
+ gw_str = nmc_ip4_address_as_string (nm_ip4_address_get_gateway (addr), NULL);
+
+ addr_arr[i++] = g_strdup_printf ("ip = %s/%u, gw = %s", ip_str, prefix, gw_str);
+ g_free (ip_str);
+ g_free (gw_str);
+ }
+ addr_arr[i] = NULL;
+
+ /* routes */
+ list = (GSList *) nm_ip4_config_get_routes (cfg4);
+ route_arr = g_new (char *, g_slist_length (list) + 1);
+ i = 0;
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ NMIP4Route *route = (NMIP4Route *) iter->data;
+ guint32 prefix, metric;
+ char *dest_str, *nexthop_str;
+
+ dest_str = nmc_ip4_address_as_string (nm_ip4_route_get_dest (route), NULL);
+ nexthop_str = nmc_ip4_address_as_string (nm_ip4_route_get_next_hop (route), NULL);
+ prefix = nm_ip4_route_get_prefix (route);
+ metric = nm_ip4_route_get_metric (route);
+
+ route_arr[i++] = g_strdup_printf ("dst = %s/%u, nh = %s, mt = %u", dest_str, prefix, nexthop_str, metric);
+ g_free (dest_str);
+ g_free (nexthop_str);
+ }
+ route_arr[i] = NULL;
+
+ /* DNS */
+ array = nm_ip4_config_get_nameservers (cfg4);
+ if (array) {
+ dns_arr = g_new (char *, array->len + 1);
+ for (i = 0; i < array->len; i++)
+ dns_arr[i] = nmc_ip4_address_as_string (g_array_index (array, guint32, i), NULL);
+
+ dns_arr[i] = NULL;
+ }
+
+ /* domains */
+ ptr_array = nm_ip4_config_get_domains (cfg4);
+ if (ptr_array) {
+ domain_arr = g_new (char *, ptr_array->len + 1);
+ for (i = 0; i < ptr_array->len; i++)
+ domain_arr[i] = g_ptr_array_index (ptr_array, i);
+
+ domain_arr[i] = NULL;
+ }
+
+ /* WINS */
+ array = nm_ip4_config_get_wins_servers (cfg4);
+ if (array) {
+ wins_arr = g_new (char *, array->len + 1);
+ for (i = 0; i < array->len; i++)
+ wins_arr[i] = nmc_ip4_address_as_string (g_array_index (array, guint32, i), NULL);
+
+ wins_arr[i] = NULL;
+ }
+
+ set_val_str (nmc->allowed_fields, 0, group_prefix);
+ set_val_arr (nmc->allowed_fields, 1, (const char **) addr_arr);
+ set_val_arr (nmc->allowed_fields, 2, (const char **) route_arr);
+ set_val_arr (nmc->allowed_fields, 3, (const char **) dns_arr);
+ set_val_arr (nmc->allowed_fields, 4, (const char **) domain_arr);
+ set_val_arr (nmc->allowed_fields, 5, (const char **) wins_arr);
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_strfreev (addr_arr);
+ g_strfreev (route_arr);
+ g_strfreev (dns_arr);
+ g_free (domain_arr);
+ g_strfreev (wins_arr);
+
+ return TRUE;
+}
+
+gboolean
+print_ip6_config (NMIP6Config *cfg6, NmCli *nmc, const char *group_prefix)
+{
+ GSList *list, *iter;
+ const GPtrArray *ptr_array;
+ char **addr_arr = NULL;
+ char **route_arr = NULL;
+ char **dns_arr = NULL;
+ char **domain_arr = NULL;
+ int i = 0;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ if (cfg6 == NULL)
+ return FALSE;
+
+ nmc->allowed_fields = nmc_fields_ip6_config;
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_IP6_CONFIG_ALL, nmc->allowed_fields, NULL);
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
+
+ /* addresses */
+ list = (GSList *) nm_ip6_config_get_addresses (cfg6);
+ addr_arr = g_new (char *, g_slist_length (list) + 1);
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ NMIP6Address *addr = (NMIP6Address *) iter->data;
+ guint32 prefix;
+ char *ip_str, *gw_str;
+
+ ip_str = nmc_ip6_address_as_string (nm_ip6_address_get_address (addr), NULL);
+ prefix = nm_ip6_address_get_prefix (addr);
+ gw_str = nmc_ip6_address_as_string (nm_ip6_address_get_gateway (addr), NULL);
+
+ addr_arr[i++] = g_strdup_printf ("ip = %s/%u, gw = %s", ip_str, prefix, gw_str);
+ g_free (ip_str);
+ g_free (gw_str);
+ }
+ addr_arr[i] = NULL;
+
+ /* routes */
+ list = (GSList *) nm_ip6_config_get_routes (cfg6);
+ route_arr = g_new (char *, g_slist_length (list) + 1);
+ i = 0;
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ NMIP6Route *route = (NMIP6Route *) iter->data;
+ guint32 prefix, metric;
+ char *dest_str, *nexthop_str;
+
+ dest_str = nmc_ip6_address_as_string (nm_ip6_route_get_dest (route), NULL);
+ nexthop_str = nmc_ip6_address_as_string (nm_ip6_route_get_next_hop (route), NULL);
+ prefix = nm_ip6_route_get_prefix (route);
+ metric = nm_ip6_route_get_metric (route);
+
+ route_arr[i++] = g_strdup_printf ("dst = %s/%u, nh = %s, mt = %u", dest_str, prefix, nexthop_str, metric);
+ g_free (dest_str);
+ g_free (nexthop_str);
+ }
+ route_arr[i] = NULL;
+
+ /* DNS */
+ list = (GSList *) nm_ip6_config_get_nameservers (cfg6);
+ dns_arr = g_new (char *, g_slist_length (list) + 1);
+ i = 0;
+ for (iter = list; iter; iter = g_slist_next (iter))
+ dns_arr[i++] = nmc_ip6_address_as_string (iter->data, NULL);
+
+ dns_arr[i] = NULL;
+
+ /* domains */
+ ptr_array = nm_ip6_config_get_domains (cfg6);
+ if (ptr_array) {
+ domain_arr = g_new (char *, ptr_array->len + 1);
+ for (i = 0; i < ptr_array->len; i++)
+ domain_arr[i] = g_ptr_array_index (ptr_array, i);
+
+ domain_arr[i] = NULL;
+ }
+
+ set_val_str (nmc->allowed_fields, 0, group_prefix);
+ set_val_arr (nmc->allowed_fields, 1, (const char **) addr_arr);
+ set_val_arr (nmc->allowed_fields, 2, (const char **) route_arr);
+ set_val_arr (nmc->allowed_fields, 3, (const char **) dns_arr);
+ set_val_arr (nmc->allowed_fields, 4, (const char **) domain_arr);
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_strfreev (addr_arr);
+ g_strfreev (route_arr);
+ g_strfreev (dns_arr);
+ g_free (domain_arr);
+
+ return TRUE;
+}
+
+gboolean
+print_dhcp4_config (NMDHCP4Config *dhcp4, NmCli *nmc, const char *group_prefix)
+{
+ GHashTable *table;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ if (dhcp4 == NULL)
+ return FALSE;
+
+ table = nm_dhcp4_config_get_options (dhcp4);
+ if (table) {
+ GHashTableIter table_iter;
+ gpointer key, value;
+ char **options_arr = NULL;
+ int i = 0;
+
+ nmc->allowed_fields = nmc_fields_dhcp4_config;
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DHCP4_CONFIG_ALL, nmc->allowed_fields, NULL);
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
+
+ options_arr = g_new (char *, g_hash_table_size (table) + 1);
+ g_hash_table_iter_init (&table_iter, table);
+ while (g_hash_table_iter_next (&table_iter, &key, &value))
+ options_arr[i++] = g_strdup_printf ("%s = %s", (char *) key, (char *) value);
+ options_arr[i] = NULL;
+
+ set_val_str (nmc->allowed_fields, 0, group_prefix);
+ set_val_arr (nmc->allowed_fields, 1, (const char **) options_arr);
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_strfreev (options_arr);
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean
+print_dhcp6_config (NMDHCP6Config *dhcp6, NmCli *nmc, const char *group_prefix)
+{
+ GHashTable *table;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ if (dhcp6 == NULL)
+ return FALSE;
+
+ table = nm_dhcp6_config_get_options (dhcp6);
+ if (table) {
+ GHashTableIter table_iter;
+ gpointer key, value;
+ char **options_arr = NULL;
+ int i = 0;
+
+ nmc->allowed_fields = nmc_fields_dhcp6_config;
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DHCP6_CONFIG_ALL, nmc->allowed_fields, NULL);
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
+
+ options_arr = g_new (char *, g_hash_table_size (table) + 1);
+ g_hash_table_iter_init (&table_iter, table);
+ while (g_hash_table_iter_next (&table_iter, &key, &value))
+ options_arr[i++] = g_strdup_printf ("%s = %s", (char *) key, (char *) value);
+ options_arr[i] = NULL;
+
+ set_val_str (nmc->allowed_fields, 0, group_prefix);
+ set_val_arr (nmc->allowed_fields, 1, (const char **) options_arr);
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_strfreev (options_arr);
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
diff --git a/cli/src/common.h b/cli/src/common.h
new file mode 100644
index 000000000..85015a9f5
--- /dev/null
+++ b/cli/src/common.h
@@ -0,0 +1,39 @@
+/*
+ * nmcli - command-line tool for controlling NetworkManager
+ * Common functions and data shared between files.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2012 Red Hat, Inc.
+ */
+
+#ifndef NMC_COMMON_H
+#define NMC_COMMON_H
+
+#include <glib.h>
+
+#include <nm-ip4-config.h>
+#include <nm-ip6-config.h>
+#include <nm-dhcp4-config.h>
+#include <nm-dhcp6-config.h>
+
+#include "nmcli.h"
+
+gboolean print_ip4_config (NMIP4Config *cfg4, NmCli *nmc, const char *group_prefix);
+gboolean print_ip6_config (NMIP6Config *cfg6, NmCli *nmc, const char *group_prefix);
+gboolean print_dhcp4_config (NMDHCP4Config *dhcp4, NmCli *nmc, const char *group_prefix);
+gboolean print_dhcp6_config (NMDHCP6Config *dhcp6, NmCli *nmc, const char *group_prefix);
+
+#endif /* NMC_COMMON_H */
diff --git a/cli/src/connections.c b/cli/src/connections.c
index 7d4fffc05..ea5211f5b 100644
--- a/cli/src/connections.c
+++ b/cli/src/connections.c
@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 - 2011 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
#include "config.h"
@@ -32,17 +32,6 @@
#include <netinet/ether.h>
#include <nm-client.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-pppoe.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-cdma.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-olpc-mesh.h>
-#if WITH_WIMAX
-#include <nm-setting-wimax.h>
-#endif
#include <nm-device-ethernet.h>
#include <nm-device-wifi.h>
#if WITH_WIMAX
@@ -50,29 +39,20 @@
#endif
#include <nm-device-modem.h>
#include <nm-device-bt.h>
-//#include <nm-device-olpc-mesh.h>
+#include <nm-device-olpc-mesh.h>
+#include <nm-device-infiniband.h>
+#include <nm-device-bond.h>
+#include <nm-device-vlan.h>
#include <nm-remote-settings.h>
#include <nm-vpn-connection.h>
+#include <nm-utils.h>
#include "utils.h"
+#include "common.h"
#include "settings.h"
#include "connections.h"
-/* Available fields for 'con status' */
-static NmcOutputField nmc_fields_con_status[] = {
- {"NAME", N_("NAME"), 25, NULL, 0}, /* 0 */
- {"UUID", N_("UUID"), 38, NULL, 0}, /* 1 */
- {"DEVICES", N_("DEVICES"), 10, NULL, 0}, /* 2 */
- {"DEFAULT", N_("DEFAULT"), 8, NULL, 0}, /* 3 */
- {"SPEC-OBJECT", N_("SPEC-OBJECT"), 10, NULL, 0}, /* 4 */
- {"VPN", N_("VPN"), 5, NULL, 0}, /* 5 */
- {"DBUS-PATH", N_("DBUS-PATH"), 51, NULL, 0}, /* 6 */
- {NULL, NULL, 0, NULL, 0}
-};
-#define NMC_FIELDS_CON_STATUS_ALL "NAME,UUID,DEVICES,DEFAULT,VPN,DBUS-PATH,SPEC-OBJECT"
-#define NMC_FIELDS_CON_STATUS_COMMON "NAME,UUID,DEVICES,DEFAULT,VPN"
-
/* Available fields for 'con list' */
static NmcOutputField nmc_fields_con_list[] = {
{"NAME", N_("NAME"), 25, NULL, 0}, /* 0 */
@@ -88,7 +68,6 @@ static NmcOutputField nmc_fields_con_list[] = {
#define NMC_FIELDS_CON_LIST_ALL "NAME,UUID,TYPE,TIMESTAMP,TIMESTAMP-REAL,AUTOCONNECT,READONLY,DBUS-PATH"
#define NMC_FIELDS_CON_LIST_COMMON "NAME,UUID,TYPE,TIMESTAMP-REAL"
-
/* Helper macro to define fields */
#define SETTING_FIELD(setting, width) { setting, N_(setting), width, NULL, 0 }
@@ -110,6 +89,9 @@ static NmcOutputField nmc_fields_settings_names[] = {
SETTING_FIELD (NM_SETTING_OLPC_MESH_SETTING_NAME, 0), /* 13 */
SETTING_FIELD (NM_SETTING_VPN_SETTING_NAME, 0), /* 14 */
SETTING_FIELD (NM_SETTING_WIMAX_SETTING_NAME, 0), /* 15 */
+ SETTING_FIELD (NM_SETTING_INFINIBAND_SETTING_NAME, 0), /* 16 */
+ SETTING_FIELD (NM_SETTING_BOND_SETTING_NAME, 0), /* 17 */
+ SETTING_FIELD (NM_SETTING_VLAN_SETTING_NAME, 0), /* 18 */
{NULL, NULL, 0, NULL, 0}
};
#define NMC_FIELDS_SETTINGS_NAMES_ALL_X NM_SETTING_CONNECTION_SETTING_NAME","\
@@ -126,7 +108,10 @@ static NmcOutputField nmc_fields_settings_names[] = {
NM_SETTING_CDMA_SETTING_NAME","\
NM_SETTING_BLUETOOTH_SETTING_NAME","\
NM_SETTING_OLPC_MESH_SETTING_NAME","\
- NM_SETTING_VPN_SETTING_NAME
+ NM_SETTING_VPN_SETTING_NAME","\
+ NM_SETTING_INFINIBAND_SETTING_NAME","\
+ NM_SETTING_BOND_SETTING_NAME","\
+ NM_SETTING_VLAN_SETTING_NAME
#if WITH_WIMAX
#define NMC_FIELDS_SETTINGS_NAMES_ALL NMC_FIELDS_SETTINGS_NAMES_ALL_X","\
NM_SETTING_WIMAX_SETTING_NAME
@@ -135,6 +120,54 @@ static NmcOutputField nmc_fields_settings_names[] = {
#endif
+/* Available fields for 'con status' */
+static NmcOutputField nmc_fields_con_status[] = {
+ {"GROUP", N_("GROUP"), 9, NULL, 0}, /* 0 */ /* used only for 'GENERAL' group listing */
+ {"NAME", N_("NAME"), 25, NULL, 0}, /* 1 */
+ {"UUID", N_("UUID"), 38, NULL, 0}, /* 2 */
+ {"DEVICES", N_("DEVICES"), 10, NULL, 0}, /* 3 */
+ {"STATE", N_("STATE"), 12, NULL, 0}, /* 4 */
+ {"DEFAULT", N_("DEFAULT"), 8, NULL, 0}, /* 5 */
+ {"DEFAULT6", N_("DEFAULT6"), 9, NULL, 0}, /* 6 */
+ {"SPEC-OBJECT", N_("SPEC-OBJECT"), 10, NULL, 0}, /* 7 */
+ {"VPN", N_("VPN"), 5, NULL, 0}, /* 8 */
+ {"DBUS-PATH", N_("DBUS-PATH"), 51, NULL, 0}, /* 9 */
+ {"CON-PATH", N_("CON-PATH"), 44, NULL, 0}, /* 10 */
+ {"ZONE", N_("ZONE"), 15, NULL, 0}, /* 11 */
+ {"MASTER-PATH", N_("MASTER-PATH"), 44, NULL, 0}, /* 12 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_CON_STATUS_ALL "NAME,UUID,DEVICES,STATE,DEFAULT,DEFAULT6,VPN,ZONE,DBUS-PATH,CON-PATH,SPEC-OBJECT,MASTER-PATH"
+#define NMC_FIELDS_CON_STATUS_COMMON "NAME,UUID,DEVICES,DEFAULT,VPN,MASTER-PATH"
+
+/* Available fields for 'con status id/uuid/path <con>' */
+static NmcOutputField nmc_fields_status_details_groups[] = {
+ {"GENERAL", N_("GENERAL"), 9, NULL, 0}, /* 0 */
+ {"IP", N_("IP"), 5, NULL, 0}, /* 1 */
+ {"VPN", N_("VPN"), 5, NULL, 0}, /* 2 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_CON_STATUS_DETAILS_ALL "GENERAL,IP,VPN"
+
+/* GENERAL group is the same as nmc_fields_con_status */
+#define NMC_FIELDS_CON_STATUS_DETAILS_GENERAL_ALL "GROUP,"NMC_FIELDS_CON_STATUS_ALL
+
+/* IP group is handled by common.c */
+
+/* Available fields for VPN group */
+static NmcOutputField nmc_fields_status_details_vpn[] = {
+ {"GROUP", N_("GROUP"), 9, NULL, 0}, /* 0 */
+ {"TYPE", N_("TYPE"), 15, NULL, 0}, /* 1 */
+ {"USERNAME", N_("USERNAME"), 15, NULL, 0}, /* 2 */
+ {"GATEWAY", N_("GATEWAY"), 25, NULL, 0}, /* 3 */
+ {"BANNER", N_("BANNER"), 120, NULL, 0}, /* 4 */
+ {"VPN-STATE", N_("VPN-STATE"), 40, NULL, 0}, /* 5 */
+ {"CFG", N_("CFG"), 120, NULL, 0}, /* 6 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_CON_STATUS_DETAILS_VPN_ALL "GROUP,TYPE,USERNAME,GATEWAY,BANNER,VPN-STATE,CFG"
+
+
typedef struct {
NmCli *nmc;
int argc;
@@ -153,7 +186,7 @@ usage (void)
_("Usage: nmcli con { COMMAND | help }\n"
" COMMAND := { list | status | up | down | delete }\n\n"
" list [id <id> | uuid <id>]\n"
- " status\n"
+ " status [id <id> | uuid <id> | path <path>]\n"
#if WITH_WIMAX
" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--nowait] [--timeout <timeout>]\n"
#else
@@ -183,7 +216,6 @@ quit (void)
static gboolean
nmc_connection_detail (NMConnection *connection, NmCli *nmc)
{
- NMSetting *setting;
GError *error = NULL;
GArray *print_settings_array;
int i;
@@ -229,135 +261,135 @@ nmc_connection_detail (NMConnection *connection, NmCli *nmc)
was_output = FALSE;
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[0].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
- if (setting) {
- setting_connection_details (setting, nmc);
+ NMSettingConnection *s_con = nm_connection_get_setting_connection (connection);
+ if (s_con) {
+ setting_connection_details (s_con, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[1].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
- if (setting) {
- setting_wired_details (setting, nmc);
+ NMSettingWired *s_wired = nm_connection_get_setting_wired (connection);
+ if (s_wired) {
+ setting_wired_details (s_wired, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[2].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
- if (setting) {
- setting_802_1X_details (setting, nmc);
+ NMSetting8021x *s_8021X = nm_connection_get_setting_802_1x (connection);
+ if (s_8021X) {
+ setting_802_1X_details (s_8021X, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[3].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
- if (setting) {
- setting_wireless_details (setting, nmc);
+ NMSettingWireless *s_wireless = nm_connection_get_setting_wireless (connection);
+ if (s_wireless) {
+ setting_wireless_details (s_wireless, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[4].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
- if (setting) {
- setting_wireless_security_details (setting, nmc);
+ NMSettingWirelessSecurity *s_wsec = nm_connection_get_setting_wireless_security (connection);
+ if (s_wsec) {
+ setting_wireless_security_details (s_wsec, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[5].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- if (setting) {
- setting_ip4_config_details (setting, nmc);
+ NMSettingIP4Config *s_ip4 = nm_connection_get_setting_ip4_config (connection);
+ if (s_ip4) {
+ setting_ip4_config_details (s_ip4, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[6].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
- if (setting) {
- setting_ip6_config_details (setting, nmc);
+ NMSettingIP6Config *s_ip6 = nm_connection_get_setting_ip6_config (connection);
+ if (s_ip6) {
+ setting_ip6_config_details (s_ip6, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[7].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL);
- if (setting) {
- setting_serial_details (setting, nmc);
+ NMSettingSerial *s_serial = nm_connection_get_setting_serial (connection);
+ if (s_serial) {
+ setting_serial_details (s_serial, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[8].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
- if (setting) {
- setting_ppp_details (setting, nmc);
+ NMSettingPPP *s_ppp = nm_connection_get_setting_ppp (connection);
+ if (s_ppp) {
+ setting_ppp_details (s_ppp, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[9].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE);
- if (setting) {
- setting_pppoe_details (setting, nmc);
+ NMSettingPPPOE *s_pppoe = nm_connection_get_setting_pppoe (connection);
+ if (s_pppoe) {
+ setting_pppoe_details (s_pppoe, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[10].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM);
- if (setting) {
- setting_gsm_details (setting, nmc);
+ NMSettingGsm *s_gsm = nm_connection_get_setting_gsm (connection);
+ if (s_gsm) {
+ setting_gsm_details (s_gsm, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[11].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA);
- if (setting) {
- setting_cdma_details (setting, nmc);
+ NMSettingCdma *s_cdma = nm_connection_get_setting_cdma (connection);
+ if (s_cdma) {
+ setting_cdma_details (s_cdma, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[12].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH);
- if (setting) {
- setting_bluetooth_details (setting, nmc);
+ NMSettingBluetooth *s_bluetooth = nm_connection_get_setting_bluetooth (connection);
+ if (s_bluetooth) {
+ setting_bluetooth_details (s_bluetooth, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[13].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH);
- if (setting) {
- setting_olpc_mesh_details (setting, nmc);
+ NMSettingOlpcMesh *s_olpc_mesh = nm_connection_get_setting_olpc_mesh (connection);
+ if (s_olpc_mesh) {
+ setting_olpc_mesh_details (s_olpc_mesh, nmc);
was_output = TRUE;
continue;
}
}
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[14].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
- if (setting) {
- setting_vpn_details (setting, nmc);
+ NMSettingVPN *s_vpn = nm_connection_get_setting_vpn (connection);
+ if (s_vpn) {
+ setting_vpn_details (s_vpn, nmc);
was_output = TRUE;
continue;
}
@@ -365,14 +397,41 @@ nmc_connection_detail (NMConnection *connection, NmCli *nmc)
#if WITH_WIMAX
if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[15].name)) {
- setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIMAX);
- if (setting) {
- setting_wimax_details (setting, nmc);
+ NMSettingWimax *s_wimax = nm_connection_get_setting_wimax (connection);
+ if (s_wimax) {
+ setting_wimax_details (s_wimax, nmc);
was_output = TRUE;
continue;
}
}
#endif
+
+ if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[16].name)) {
+ NMSettingInfiniband *s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (s_infiniband) {
+ setting_infiniband_details (s_infiniband, nmc);
+ was_output = TRUE;
+ continue;
+ }
+ }
+
+ if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[17].name)) {
+ NMSettingBond *s_bond = nm_connection_get_setting_bond (connection);
+ if (s_bond) {
+ setting_bond_details (s_bond, nmc);
+ was_output = TRUE;
+ continue;
+ }
+ }
+
+ if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[18].name)) {
+ NMSettingVlan *s_vlan = nm_connection_get_setting_vlan (connection);
+ if (s_vlan) {
+ setting_vlan_details (s_vlan, nmc);
+ was_output = TRUE;
+ continue;
+ }
+ }
}
if (print_settings_array)
@@ -544,19 +603,77 @@ error:
return nmc->return_value;
}
-static void
-show_active_connection (gpointer data, gpointer user_data)
+static const char *
+active_connection_state_to_string (NMActiveConnectionState state)
{
- NMActiveConnection *active = NM_ACTIVE_CONNECTION (data);
- NmCli *nmc = (NmCli *) user_data;
- GSList *con_list, *iter;
+ switch (state) {
+ case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
+ return _("activating");
+ case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
+ return _("activated");
+ case NM_ACTIVE_CONNECTION_STATE_DEACTIVATING:
+ return _("deactivating");
+ case NM_ACTIVE_CONNECTION_STATE_UNKNOWN:
+ default:
+ return _("unknown");
+ }
+}
+
+static const char *
+vpn_connection_state_to_string (NMVPNConnectionState state)
+{
+ switch (state) {
+ case NM_VPN_CONNECTION_STATE_PREPARE:
+ return _("VPN connecting (prepare)");
+ case NM_VPN_CONNECTION_STATE_NEED_AUTH:
+ return _("VPN connecting (need authentication)");
+ case NM_VPN_CONNECTION_STATE_CONNECT:
+ return _("VPN connecting");
+ case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
+ return _("VPN connecting (getting IP configuration)");
+ case NM_VPN_CONNECTION_STATE_ACTIVATED:
+ return _("VPN connected");
+ case NM_VPN_CONNECTION_STATE_FAILED:
+ return _("VPN connection failed");
+ case NM_VPN_CONNECTION_STATE_DISCONNECTED:
+ return _("VPN disconnected");
+ default:
+ return _("unknown");
+ }
+}
+
+static NMConnection *
+get_connection_for_active (const GSList *con_list, NMActiveConnection *active)
+{
+ const GSList *iter;
+ const char *path;
+
+ path = nm_active_connection_get_connection (active);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ for (iter = con_list; iter; iter = g_slist_next (iter)) {
+ NMConnection *candidate = NM_CONNECTION (iter->data);
+
+ if (strcmp (nm_connection_get_path (candidate), path) == 0)
+ return candidate;
+ }
+ return NULL;
+}
+
+static gboolean
+fill_in_fields_con_status (NMActiveConnection *active, GSList *con_list)
+{
+ GSList *iter;
const char *active_path;
NMSettingConnection *s_con;
const GPtrArray *devices;
GString *dev_str;
+ NMActiveConnectionState state;
int i;
+ gboolean success = FALSE;
active_path = nm_active_connection_get_connection (active);
+ state = nm_active_connection_get_state (active);
/* Get devices of the active connection */
dev_str = g_string_new (NULL);
@@ -570,7 +687,6 @@ show_active_connection (gpointer data, gpointer user_data)
if (dev_str->len > 0)
g_string_truncate (dev_str, dev_str->len - 1); /* Cut off last ',' */
- con_list = nmc->system_connections;
for (iter = con_list; iter; iter = g_slist_next (iter)) {
NMConnection *connection = (NMConnection *) iter->data;
const char *con_path = nm_connection_get_path (connection);
@@ -580,410 +696,432 @@ show_active_connection (gpointer data, gpointer user_data)
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con != NULL);
- /* Obtain field values */
- nmc->allowed_fields[0].value = nm_setting_connection_get_id (s_con);
- nmc->allowed_fields[1].value = nm_setting_connection_get_uuid (s_con);
- nmc->allowed_fields[2].value = dev_str->str;
- nmc->allowed_fields[3].value = nm_active_connection_get_default (active) ? _("yes") : _("no");
- nmc->allowed_fields[4].value = nm_active_connection_get_specific_object (active);
- nmc->allowed_fields[5].value = NM_IS_VPN_CONNECTION (active) ? _("yes") : _("no");
- nmc->allowed_fields[6].value = nm_object_get_path (NM_OBJECT (active));
-
- nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */
- print_fields (nmc->print_fields, nmc->allowed_fields);
+ /* Fill field values */
+ nmc_fields_con_status[0].value = nmc_fields_status_details_groups[0].name;
+ nmc_fields_con_status[1].value = nm_setting_connection_get_id (s_con);
+ nmc_fields_con_status[2].value = nm_setting_connection_get_uuid (s_con);
+ nmc_fields_con_status[3].value = dev_str->str;
+ nmc_fields_con_status[4].value = active_connection_state_to_string (state);
+ nmc_fields_con_status[5].value = nm_active_connection_get_default (active) ? _("yes") : _("no");
+ nmc_fields_con_status[6].value = nm_active_connection_get_default6 (active) ? _("yes") : _("no");
+ nmc_fields_con_status[7].value = nm_active_connection_get_specific_object (active);
+ nmc_fields_con_status[8].value = NM_IS_VPN_CONNECTION (active) ? _("yes") : _("no");
+ nmc_fields_con_status[9].value = nm_object_get_path (NM_OBJECT (active));
+ nmc_fields_con_status[10].value = nm_active_connection_get_connection (active);
+ nmc_fields_con_status[11].value = nm_setting_connection_get_zone (s_con);
+ nmc_fields_con_status[12].value = nm_active_connection_get_master (active);
+
+ success = TRUE;
break;
}
}
- g_string_free (dev_str, TRUE);
+ /* Just free GString here, the char array has to be freed after printing
+ * (by free_fields_con_status()) */
+ g_string_free (dev_str, FALSE);
+ return success;
}
-static NMCResultCode
-do_connections_status (NmCli *nmc, int argc, char **argv)
+static void
+free_fields_con_status (void)
{
- const GPtrArray *active_cons;
- GError *error = NULL;
- char *fields_str;
- char *fields_all = NMC_FIELDS_CON_STATUS_ALL;
- char *fields_common = NMC_FIELDS_CON_STATUS_COMMON;
- guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
- guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
- guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
-
- nmc->should_wait = FALSE;
-
- if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0)
- fields_str = fields_common;
- else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0)
- fields_str = fields_all;
- else
- fields_str = nmc->required_fields;
+ /* Just DEVICES string was dynamically allocated */
+ g_free ((char *) nmc_fields_con_status[3].value);
+ nmc_fields_con_status[3].value = NULL;
+}
- nmc->allowed_fields = nmc_fields_con_status;
- nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &error);
+static void
+show_active_connection (gpointer data, gpointer user_data)
+{
+ NMActiveConnection *active = NM_ACTIVE_CONNECTION (data);
+ NmCli *nmc = (NmCli *) user_data;
- if (error) {
- if (error->code == 0)
- g_string_printf (nmc->return_text, _("Error: 'con status': %s"), error->message);
- else
- g_string_printf (nmc->return_text, _("Error: 'con status': %s; allowed fields: %s"), error->message, NMC_FIELDS_CON_STATUS_ALL);
- g_error_free (error);
- nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
- goto error;
- }
+ fill_in_fields_con_status (active, nmc->system_connections);
- if (!nmc_is_nm_running (nmc, &error)) {
- if (error) {
- g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), error->message);
- nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
- g_error_free (error);
- } else {
- g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
- nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING;
- }
- goto error;
- }
-
- /* Print headers */
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES;
- nmc->print_fields.header_name = _("Active connections");
+ nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */
print_fields (nmc->print_fields, nmc->allowed_fields);
- nmc->get_client (nmc);
- active_cons = nm_client_get_active_connections (nmc->client);
- if (active_cons && active_cons->len)
- g_ptr_array_foreach ((GPtrArray *) active_cons, show_active_connection, (gpointer) nmc);
-
-error:
- return nmc->return_value;
+ free_fields_con_status ();
}
-/* --------------------
- * These function should be moved to libnm-glib in the end.
- */
-static gboolean
-check_ethernet_compatible (NMDeviceEthernet *device, NMConnection *connection, GError **error)
+static NMActiveConnection *
+find_active_connection (const GPtrArray *active_cons, const GSList *cons,
+ const char *filter_type, const char *filter_val)
{
+ int i;
+ const char *s_path, *a_path;
+ const char *id;
+ const char *uuid;
+ NMConnection *con;
NMSettingConnection *s_con;
- NMSettingWired *s_wired;
- const char *connection_type;
- gboolean is_pppoe = FALSE;
-
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
-
- connection_type = nm_setting_connection_get_connection_type (s_con);
- if ( strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME)
- && strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a wired or PPPoE connection.");
- return FALSE;
- }
- if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME))
- is_pppoe = TRUE;
-
- s_wired = nm_connection_get_setting_wired (connection);
- /* Wired setting is optional for PPPoE */
- if (!is_pppoe && !s_wired) {
- g_set_error (error, 0, 0,
- "The connection was not a valid wired connection.");
- return FALSE;
- }
-
- if (s_wired) {
- const GByteArray *mac;
- const char *device_mac_str;
- struct ether_addr *device_mac = NULL;
-
- device_mac_str = nm_device_ethernet_get_permanent_hw_address (device);
- if (device_mac_str)
- device_mac = ether_aton (device_mac_str);
- if (!device_mac) {
- g_set_error (error, 0, 0, "Invalid device MAC address.");
- return FALSE;
- }
+ for (i = 0; active_cons && (i < active_cons->len); i++) {
+ NMActiveConnection *candidate = g_ptr_array_index (active_cons, i);
- mac = nm_setting_wired_get_mac_address (s_wired);
- if (mac && memcmp (mac->data, device_mac->ether_addr_octet, ETH_ALEN)) {
- g_set_error (error, 0, 0,
- "The connection's MAC address did not match this device.");
- return FALSE;
+ s_path = nm_active_connection_get_connection (candidate);
+ a_path = nm_object_get_path (NM_OBJECT (candidate));
+ uuid = nm_active_connection_get_uuid (candidate);
+
+ con = get_connection_for_active (cons, candidate);
+ s_con = nm_connection_get_setting_connection (con);
+ g_assert (s_con != NULL);
+ id = nm_setting_connection_get_id (s_con);
+
+ if (filter_type) {
+ if ( (strcmp (filter_type, "id") == 0 && strcmp (filter_val, id) == 0)
+ || (strcmp (filter_type, "uuid") == 0 && strcmp (filter_val, uuid) == 0)
+ || (strcmp (filter_type, "path") == 0 && strcmp (filter_val, s_path) == 0)
+ || (strcmp (filter_type, "path") == 0 && strcmp (filter_val, a_path) == 0)) {
+ return candidate;
+ }
}
}
+ return NULL;
+}
- // FIXME: check bitrate against device capabilities
+typedef struct {
+ char **array;
+ guint32 idx;
+} FillVPNDataInfo;
- return TRUE;
+static void
+fill_vpn_data_item (const char *key, const char *value, gpointer user_data)
+{
+ FillVPNDataInfo *info = (FillVPNDataInfo *) user_data;
+
+ info->array[info->idx++] = g_strdup_printf ("%s = %s", key, value);
}
-static gboolean
-check_wifi_compatible (NMDeviceWifi *device, NMConnection *connection, GError **error)
+// FIXME: The same or similar code for VPN info appears also in nm-applet (applet-dialogs.c),
+// and in gnome-control-center as well. It could probably be shared somehow.
+static char *
+get_vpn_connection_type (NMConnection *connection)
{
- NMSettingConnection *s_con;
- NMSettingWireless *s_wireless;
+ const char *type, *p;
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
+ /* The service type is in form of "org.freedesktop.NetworkManager.vpnc".
+ * Extract end part after last dot, e.g. "vpnc"
+ */
+ type = nm_setting_vpn_get_service_type (nm_connection_get_setting_vpn (connection));
+ p = strrchr (type, '.');
+ return g_strdup (p ? p + 1 : type);
+}
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRELESS_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a WiFi connection.");
- return FALSE;
- }
+/* VPN parameters can be found at:
+ * http://git.gnome.org/browse/network-manager-openvpn/tree/src/nm-openvpn-service.h
+ * http://git.gnome.org/browse/network-manager-vpnc/tree/src/nm-vpnc-service.h
+ * http://git.gnome.org/browse/network-manager-pptp/tree/src/nm-pptp-service.h
+ * http://git.gnome.org/browse/network-manager-openconnect/tree/src/nm-openconnect-service.h
+ * http://git.gnome.org/browse/network-manager-openswan/tree/src/nm-openswan-service.h
+ * See also 'properties' directory in these plugins.
+ */
+static const gchar *
+find_vpn_gateway_key (const char *vpn_type)
+{
+ if (g_strcmp0 (vpn_type, "openvpn") == 0) return "remote";
+ if (g_strcmp0 (vpn_type, "vpnc") == 0) return "IPSec gateway";
+ if (g_strcmp0 (vpn_type, "pptp") == 0) return "gateway";
+ if (g_strcmp0 (vpn_type, "openconnect") == 0) return "gateway";
+ if (g_strcmp0 (vpn_type, "openswan") == 0) return "right";
+ return "";
+}
- s_wireless = nm_connection_get_setting_wireless (connection);
- if (!s_wireless) {
- g_set_error (error, 0, 0,
- "The connection was not a valid WiFi connection.");
- return FALSE;
- }
+static const gchar *
+find_vpn_username_key (const char *vpn_type)
+{
+ if (g_strcmp0 (vpn_type, "openvpn") == 0) return "username";
+ if (g_strcmp0 (vpn_type, "vpnc") == 0) return "Xauth username";
+ if (g_strcmp0 (vpn_type, "pptp") == 0) return "user";
+ if (g_strcmp0 (vpn_type, "openconnect") == 0) return "username";
+ if (g_strcmp0 (vpn_type, "openswan") == 0) return "leftxauthusername";
+ return "";
+}
- if (s_wireless) {
- const GByteArray *mac;
- const char *device_mac_str;
- struct ether_addr *device_mac = NULL;
+enum VpnDataItem {
+ VPN_DATA_ITEM_GATEWAY,
+ VPN_DATA_ITEM_USERNAME
+};
- device_mac_str = nm_device_wifi_get_permanent_hw_address (device);
- if (device_mac_str)
- device_mac = ether_aton (device_mac_str);
- if (!device_mac) {
- g_set_error (error, 0, 0, "Invalid device MAC address.");
- return FALSE;
- }
+static const gchar *
+get_vpn_data_item (NMConnection *connection, enum VpnDataItem vpn_data_item)
+{
+ const char *key;
+ char *type = get_vpn_connection_type (connection);
- mac = nm_setting_wireless_get_mac_address (s_wireless);
- if (mac && memcmp (mac->data, device_mac->ether_addr_octet, ETH_ALEN)) {
- g_set_error (error, 0, 0,
- "The connection's MAC address did not match this device.");
- return FALSE;
- }
+ switch (vpn_data_item) {
+ case VPN_DATA_ITEM_GATEWAY:
+ key = find_vpn_gateway_key (type);
+ break;
+ case VPN_DATA_ITEM_USERNAME:
+ key = find_vpn_username_key (type);
+ break;
+ default:
+ key = "";
+ break;
}
+ g_free (type);
- // FIXME: check channel/freq/band against bands the hardware supports
- // FIXME: check encryption against device capabilities
- // FIXME: check bitrate against device capabilities
-
- return TRUE;
+ return nm_setting_vpn_get_data_item (nm_connection_get_setting_vpn (connection), key);
}
+/* FIXME end */
static gboolean
-check_bt_compatible (NMDeviceBt *device, NMConnection *connection, GError **error)
+nmc_active_connection_detail (NMActiveConnection *acon, NmCli *nmc)
{
- NMSettingConnection *s_con;
- NMSettingBluetooth *s_bt;
- const GByteArray *array;
- char *str;
- const char *device_hw_str;
- int addr_match = FALSE;
- const char *bt_type_str;
- guint32 bt_type, bt_capab;
-
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ GError *error = NULL;
+ GArray *print_groups;
+ int i;
+ char *fields_str;
+ char *fields_all = NMC_FIELDS_CON_STATUS_DETAILS_ALL;
+ char *fields_common = NMC_FIELDS_CON_STATUS_DETAILS_ALL;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+ gboolean was_output = FALSE;
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
+ if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0)
+ fields_str = fields_common;
+ else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0)
+ fields_str = fields_all;
+ else
+ fields_str = nmc->required_fields;
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_BLUETOOTH_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a Bluetooth connection.");
+ print_groups = parse_output_fields (fields_str, nmc_fields_status_details_groups, &error);
+ if (error) {
+ if (error->code == 0)
+ g_string_printf (nmc->return_text, _("Error: 'con status': %s"), error->message);
+ else
+ g_string_printf (nmc->return_text, _("Error: 'con status': %s; allowed fields: %s"), error->message, NMC_FIELDS_CON_STATUS_DETAILS_ALL);
+ g_error_free (error);
+ nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
return FALSE;
}
- s_bt = nm_connection_get_setting_bluetooth (connection);
- if (!s_bt) {
- g_set_error (error, 0, 0,
- "The connection was not a valid Bluetooth connection.");
- return FALSE;
- }
+ nmc->allowed_fields = nmc_fields_status_details_groups;
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ONLY;
+ nmc->print_fields.header_name = _("Active connection details");
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_CON_STATUS_DETAILS_ALL, nmc->allowed_fields, NULL);
+ print_fields (nmc->print_fields, nmc->allowed_fields);
- array = nm_setting_bluetooth_get_bdaddr (s_bt);
- if (!array || (array->len != ETH_ALEN)) {
- g_set_error (error, 0, 0,
- "The connection did not contain a valid Bluetooth address.");
- return FALSE;
- }
+ /* Loop through the groups and print them. */
+ for (i = 0; i < print_groups->len; i++) {
+ int group_idx = g_array_index (print_groups, int, i);
- bt_type_str = nm_setting_bluetooth_get_connection_type (s_bt);
- g_assert (bt_type_str);
+ if (nmc->print_output != NMC_PRINT_TERSE && !nmc->multiline_output && was_output)
+ printf ("\n"); /* Empty line */
- bt_type = NM_BT_CAPABILITY_NONE;
- if (!strcmp (bt_type_str, NM_SETTING_BLUETOOTH_TYPE_DUN))
- bt_type = NM_BT_CAPABILITY_DUN;
- else if (!strcmp (bt_type_str, NM_SETTING_BLUETOOTH_TYPE_PANU))
- bt_type = NM_BT_CAPABILITY_NAP;
+ was_output = FALSE;
- bt_capab = nm_device_bt_get_capabilities (device);
- if (!(bt_type & bt_capab)) {
- g_set_error (error, 0, 0,
- "The connection was not compatible with the device's capabilities.");
- return FALSE;
- }
+ /* GENERAL */
+ if (strcasecmp (nmc_fields_status_details_groups[group_idx].name, nmc_fields_status_details_groups[0].name) == 0) {
+ nmc->allowed_fields = nmc_fields_con_status;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_CON_STATUS_DETAILS_GENERAL_ALL, nmc->allowed_fields, NULL);
- device_hw_str = nm_device_bt_get_hw_address (device);
+ /* Print field names */
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ print_fields (nmc->print_fields, nmc->allowed_fields);
- str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
- array->data[0], array->data[1], array->data[2],
- array->data[3], array->data[4], array->data[5]);
- addr_match = !strcmp (device_hw_str, str);
- g_free (str);
+ /* Fill in values */
+ fill_in_fields_con_status (acon, nmc->system_connections);
- return addr_match;
-}
+ /* and print them */
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields);
-#if 0
-static gboolean
-check_olpc_mesh_compatible (NMDeviceOlpcMesh *device, NMConnection *connection, GError **error)
-{
- NMSettingConnection *s_con;
- NMSettingOlpcMesh *s_mesh;
+ free_fields_con_status ();
+ was_output = TRUE;
+ }
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ /* IP */
+ if (strcasecmp (nmc_fields_status_details_groups[group_idx].name, nmc_fields_status_details_groups[1].name) == 0) {
+ const GPtrArray *devices;
+ int j;
+
+ devices = nm_active_connection_get_devices (acon);
+ for (j = 0; devices && (j < devices->len); j++) {
+ gboolean b1 = FALSE, b2 = FALSE, b3 = FALSE, b4 = FALSE;
+ NMDevice *device = g_ptr_array_index (devices, j);
+ NMIP4Config *cfg4 = nm_device_get_ip4_config (device);
+ NMIP6Config *cfg6 = nm_device_get_ip6_config (device);
+ NMDHCP4Config *dhcp4 = nm_device_get_dhcp4_config (device);
+ NMDHCP6Config *dhcp6 = nm_device_get_dhcp6_config (device);
+
+ b1 = print_ip4_config (cfg4, nmc, "IP4");
+ b2 = print_dhcp4_config (dhcp4, nmc, "DHCP4");
+ b3 = print_ip6_config (cfg6, nmc, "IP6");
+ b4 = print_dhcp6_config (dhcp6, nmc, "DHCP6");
+ was_output = was_output || b1 || b2 || b3 || b4;
+ }
+ }
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
+ /* VPN */
+ if (NM_IS_VPN_CONNECTION (acon) &&
+ strcasecmp (nmc_fields_status_details_groups[group_idx].name, nmc_fields_status_details_groups[2].name) == 0) {
+ NMConnection *con;
+ NMSettingConnection *s_con;
+ NMSettingVPN *s_vpn;
+ NMVPNConnectionState vpn_state;
+ char *type_str, *banner_str, *vpn_state_str;
+ const char *username = NULL;
+ char **vpn_data_array = NULL;
+ guint32 items_num;
+
+ con = get_connection_for_active (nmc->system_connections, acon);
+
+ s_con = nm_connection_get_setting_connection (con);
+ g_assert (s_con != NULL);
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_OLPC_MESH_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a Mesh connection.");
- return FALSE;
- }
+ nmc->allowed_fields = nmc_fields_status_details_vpn;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_CON_STATUS_DETAILS_VPN_ALL, nmc->allowed_fields, NULL);
- s_mesh = nm_connection_get_setting_olpc_mesh (connection);
- if (!s_mesh) {
- g_set_error (error, 0, 0,
- "The connection was not a valid Mesh connection.");
- return FALSE;
+ /* Print field names */
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ print_fields (nmc->print_fields, nmc->allowed_fields);
+
+ s_vpn = nm_connection_get_setting_vpn (con);
+ if (s_vpn) {
+ items_num = nm_setting_vpn_get_num_data_items (s_vpn);
+ if (items_num > 0) {
+ FillVPNDataInfo info;
+
+ vpn_data_array = g_new (char *, items_num + 1);
+ info.array = vpn_data_array;
+ info.idx = 0;
+ nm_setting_vpn_foreach_data_item (s_vpn, &fill_vpn_data_item, &info);
+ vpn_data_array[items_num] = NULL;
+ }
+ username = nm_setting_vpn_get_user_name (s_vpn);
+ }
+
+ type_str = get_vpn_connection_type (con);
+ banner_str = g_strescape (nm_vpn_connection_get_banner (NM_VPN_CONNECTION (acon)), "");
+ vpn_state = nm_vpn_connection_get_vpn_state (NM_VPN_CONNECTION (acon));
+ vpn_state_str = g_strdup_printf ("%d - %s", vpn_state, vpn_connection_state_to_string (vpn_state));
+
+ /* Print values */
+ set_val_str (nmc->allowed_fields, 0, nmc_fields_status_details_groups[2].name);
+ set_val_str (nmc->allowed_fields, 1, type_str);
+ set_val_str (nmc->allowed_fields, 2, username ? username : get_vpn_data_item (con, VPN_DATA_ITEM_USERNAME));
+ set_val_str (nmc->allowed_fields, 3, get_vpn_data_item (con, VPN_DATA_ITEM_GATEWAY));
+ set_val_str (nmc->allowed_fields, 4, banner_str);
+ set_val_str (nmc->allowed_fields, 5, vpn_state_str);
+ set_val_arr (nmc->allowed_fields, 6, (const char **) vpn_data_array);
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields);
+
+ g_free (type_str);
+ g_free (banner_str);
+ g_free (vpn_state_str);
+ g_strfreev (vpn_data_array);
+ was_output = TRUE;
+ }
}
+ if (print_groups)
+ g_array_free (print_groups, FALSE);
+
return TRUE;
}
-#endif
-#if WITH_WIMAX
-static gboolean
-check_wimax_compatible (NMDeviceWimax *device, NMConnection *connection, GError **error)
+static NMCResultCode
+do_connections_status (NmCli *nmc, int argc, char **argv)
{
- NMSettingConnection *s_con;
- NMSettingWimax *s_wimax;
- const GByteArray *mac;
- const char *device_mac_str;
- struct ether_addr *device_mac = NULL;
-
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
-
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIMAX_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a WiMAX connection.");
- return FALSE;
- }
+ const GPtrArray *active_cons;
+ GError *err = NULL;
+ GError *err1 = NULL;
- s_wimax = nm_connection_get_setting_wimax (connection);
- if (!s_wimax) {
- g_set_error (error, 0, 0,
- "The connection was not a valid WiMAX connection.");
- return FALSE;
- }
+ nmc->should_wait = FALSE;
- device_mac_str = nm_device_wimax_get_hw_address (device);
- if (device_mac_str)
- device_mac = ether_aton (device_mac_str);
- if (!device_mac) {
- g_set_error (error, 0, 0, "Invalid device MAC address.");
- return FALSE;
+ if (!nmc_is_nm_running (nmc, &err)) {
+ if (err) {
+ g_string_printf (nmc->return_text, _("Error: Can't find out if NetworkManager is running: %s."), err->message);
+ nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
+ g_error_free (err);
+ } else {
+ g_string_printf (nmc->return_text, _("Error: NetworkManager is not running."));
+ nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING;
+ }
+ goto error;
}
- mac = nm_setting_wimax_get_mac_address (s_wimax);
- if (mac && memcmp (mac->data, device_mac->ether_addr_octet, ETH_ALEN)) {
- g_set_error (error, 0, 0,
- "The connection's MAC address did not match this device.");
- return FALSE;
- }
+ /* Get active connections */
+ nmc->get_client (nmc);
+ active_cons = nm_client_get_active_connections (nmc->client);
- return TRUE;
-}
-#endif
+ if (argc == 0) {
+ char *fields_str;
+ char *fields_all = NMC_FIELDS_CON_STATUS_ALL;
+ char *fields_common = NMC_FIELDS_CON_STATUS_COMMON;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0)
+ fields_str = fields_common;
+ else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0)
+ fields_str = fields_all;
+ else
+ fields_str = nmc->required_fields;
-static gboolean
-check_modem_compatible (NMDeviceModem *device, NMConnection *connection, GError **error)
-{
- NMSettingConnection *s_con;
- NMSettingGsm *s_gsm;
- NMSettingCdma *s_cdma;
- NMDeviceModemCapabilities caps = NM_DEVICE_MODEM_CAPABILITY_NONE;
+ nmc->allowed_fields = nmc_fields_con_status + 1 ;
+ nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &err1);
+ if (err1)
+ goto error;
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ /* Print headers */
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES;
+ nmc->print_fields.header_name = _("Active connections");
+ print_fields (nmc->print_fields, nmc->allowed_fields);
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
+ if (active_cons && active_cons->len)
+ g_ptr_array_foreach ((GPtrArray *) active_cons, show_active_connection, (gpointer) nmc);
+ } else {
+ while (argc > 0) {
+ if ( strcmp (*argv, "id") == 0
+ || strcmp (*argv, "uuid") == 0
+ || strcmp (*argv, "path") == 0) {
+ const char *selector = *argv;
+ NMActiveConnection *acon;
- /* Figure out what the modem supports */
- caps = nm_device_modem_get_current_capabilities (device);
- if (caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) {
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_GSM_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a GSM connection.");
- return FALSE;
- }
+ if (next_arg (&argc, &argv) != 0) {
+ g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv);
+ nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
+ return nmc->return_value;
+ }
+ if (!nmc->mode_specified)
+ nmc->multiline_output = TRUE; /* multiline mode is default for 'con status id|uuid|path' */
- s_gsm = nm_connection_get_setting_gsm (connection);
- if (!s_gsm) {
- g_set_error (error, 0, 0,
- "The connection was not a valid GSM connection.");
- return FALSE;
- }
- } else if (caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO) {
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_CDMA_SETTING_NAME)) {
- g_set_error (error, 0, 0,
- "The connection was not a CDMA connection.");
- return FALSE;
- }
+ acon = find_active_connection (active_cons, nmc->system_connections, selector, *argv);
+ if (acon) {
+ nmc_active_connection_detail (acon, nmc);
+ } else {
+ g_string_printf (nmc->return_text, _("Error: '%s' is not an active connection."), *argv);
+ nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
+ }
+ break;
+ } else {
+ g_string_printf (nmc->return_text, _("Error: unknown parameter: %s"), *argv);
+ nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
+ }
- s_cdma = nm_connection_get_setting_cdma (connection);
- if (!s_cdma) {
- g_set_error (error, 0, 0,
- "The connection was not a valid CDMA connection.");
- return FALSE;
+ argc--;
+ argv++;
}
}
- return TRUE;
-}
-
-static gboolean
-nm_device_is_connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
-{
- g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
- g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
-
- if (NM_IS_DEVICE_ETHERNET (device))
- return check_ethernet_compatible (NM_DEVICE_ETHERNET (device), connection, error);
- else if (NM_IS_DEVICE_WIFI (device))
- return check_wifi_compatible (NM_DEVICE_WIFI (device), connection, error);
- else if (NM_IS_DEVICE_BT (device))
- return check_bt_compatible (NM_DEVICE_BT (device), connection, error);
-// else if (NM_IS_DEVICE_OLPC_MESH (device))
-// return check_olpc_mesh_compatible (NM_DEVICE_OLPC_MESH (device), connection, error);
-#if WITH_WIMAX
- else if (NM_IS_DEVICE_WIMAX (device))
- return check_wimax_compatible (NM_DEVICE_WIMAX (device), connection, error);
-#endif
- else if (NM_IS_DEVICE_MODEM (device))
- return check_modem_compatible (NM_DEVICE_MODEM (device), connection, error);
-
- g_set_error (error, 0, 0, "unhandled device type '%s'", G_OBJECT_TYPE_NAME (device));
- return FALSE;
+error:
+ if (err1) {
+ if (err1->code == 0)
+ g_string_printf (nmc->return_text, _("Error: 'con status': %s"), err1->message);
+ else
+ g_string_printf (nmc->return_text, _("Error: 'con status': %s; allowed fields: %s"), err1->message, NMC_FIELDS_CON_STATUS_ALL);
+ g_error_free (err1);
+ nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
+ }
+ return nmc->return_value;
}
-/* -------------------- */
-
static NMActiveConnection *
get_default_active_connection (NmCli *nmc, NMDevice **device)
{
@@ -1095,11 +1233,11 @@ find_device_for_connection (NmCli *nmc,
if (iface) {
const char *dev_iface = nm_device_get_iface (dev);
if ( !strcmp (dev_iface, iface)
- && nm_device_is_connection_compatible (dev, connection, NULL)) {
+ && nm_device_connection_compatible (dev, connection, NULL)) {
found_device = dev;
}
} else {
- if (nm_device_is_connection_compatible (dev, connection, NULL)) {
+ if (nm_device_connection_compatible (dev, connection, NULL)) {
found_device = dev;
}
}
@@ -1158,45 +1296,6 @@ find_device_for_connection (NmCli *nmc,
}
static const char *
-active_connection_state_to_string (NMActiveConnectionState state)
-{
- switch (state) {
- case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
- return _("activating");
- case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
- return _("activated");
- case NM_ACTIVE_CONNECTION_STATE_DEACTIVATING:
- return _("deactivating");
- case NM_ACTIVE_CONNECTION_STATE_UNKNOWN:
- default:
- return _("unknown");
- }
-}
-
-static const char *
-vpn_connection_state_to_string (NMVPNConnectionState state)
-{
- switch (state) {
- case NM_VPN_CONNECTION_STATE_PREPARE:
- return _("VPN connecting (prepare)");
- case NM_VPN_CONNECTION_STATE_NEED_AUTH:
- return _("VPN connecting (need authentication)");
- case NM_VPN_CONNECTION_STATE_CONNECT:
- return _("VPN connecting");
- case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
- return _("VPN connecting (getting IP configuration)");
- case NM_VPN_CONNECTION_STATE_ACTIVATED:
- return _("VPN connected");
- case NM_VPN_CONNECTION_STATE_FAILED:
- return _("VPN connection failed");
- case NM_VPN_CONNECTION_STATE_DISCONNECTED:
- return _("VPN disconnected");
- default:
- return _("unknown");
- }
-}
-
-static const char *
vpn_connection_state_reason_to_string (NMVPNConnectionStateReason reason)
{
switch (reason) {
@@ -1341,6 +1440,7 @@ do_connection_up (NmCli *nmc, int argc, char **argv)
gboolean id_specified = FALSE;
gboolean wait = TRUE;
GError *error = NULL;
+ gboolean is_virtual = FALSE;
/* Set default timeout for connection activation. It can take quite a long time.
* Using 90 seconds.
@@ -1444,9 +1544,13 @@ do_connection_up (NmCli *nmc, int argc, char **argv)
g_assert (s_con);
con_type = nm_setting_connection_get_connection_type (s_con);
- device_found = find_device_for_connection (nmc, connection, iface, ap, nsp, &device, &spec_object, &error);
+ if ( nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME)
+ || nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME))
+ is_virtual = TRUE;
- if (!device_found) {
+ device_found = find_device_for_connection (nmc, connection, iface, ap, nsp, &device, &spec_object, &error);
+ /* Virtual connection may not have their interfaces created yet */
+ if (!device_found && !is_virtual) {
if (error)
g_string_printf (nmc->return_text, _("Error: No suitable device found: %s."), error->message);
else
@@ -1563,6 +1667,27 @@ error:
return nmc->return_value;
}
+static void
+delete_cb (NMRemoteConnection *con, GError *err, gpointer user_data)
+{
+ NmCli *nmc = (NmCli *) user_data;
+
+ if (err) {
+ g_string_printf (nmc->return_text, _("Error: Connection deletion failed: %s"), err->message);
+ nmc->return_value = NMC_RESULT_ERROR_CON_DEL;
+ }
+ quit ();
+}
+
+static void
+connection_removed_cb (NMRemoteConnection *con, gpointer user_data)
+{
+ NmCli *nmc = (NmCli *) user_data;
+
+ nmc->return_value = NMC_RESULT_SUCCESS;
+ quit ();
+}
+
static NMCResultCode
do_connection_delete (NmCli *nmc, int argc, char **argv)
{
@@ -1571,8 +1696,6 @@ do_connection_delete (NmCli *nmc, int argc, char **argv)
const char *id = NULL;
GError *error = NULL;
- nmc->should_wait = FALSE;
-
while (argc > 0) {
if (strcmp (*argv, "id") == 0 || strcmp (*argv, "uuid") == 0) {
selector = *argv;
@@ -1616,10 +1739,22 @@ do_connection_delete (NmCli *nmc, int argc, char **argv)
goto error;
}
+ /* We need to wait a bit so that nmcli's permissions can be queried.
+ * We will exit either on "Removed" signal or when D-Bus return (error)
+ * message is received.
+ */
+ nmc->should_wait = TRUE;
+
+ /* Connect to "Removed" signal to be able to exit when connection was removed */
+ g_signal_connect (connection, NM_REMOTE_CONNECTION_REMOVED, G_CALLBACK (connection_removed_cb), nmc);
+
/* Delete the connection */
- nm_remote_connection_delete (NM_REMOTE_CONNECTION (connection), NULL, NULL);
+ nm_remote_connection_delete (NM_REMOTE_CONNECTION (connection), delete_cb, nmc);
+
+ return nmc->return_value;
error:
+ nmc->should_wait = FALSE;
return nmc->return_value;
}
diff --git a/cli/src/devices.c b/cli/src/devices.c
index 500d2341b..0b1b6d6e4 100644
--- a/cli/src/devices.c
+++ b/cli/src/devices.c
@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 - 2011 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
#include "config.h"
@@ -24,10 +24,6 @@
#include <stdlib.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include <glib.h>
#include <glib/gi18n.h>
@@ -37,10 +33,13 @@
#include <nm-device-wifi.h>
#include <nm-device-modem.h>
#include <nm-device-bt.h>
-//#include <nm-device-olpc-mesh.h>
+#include <nm-device-olpc-mesh.h>
#if WITH_WIMAX
#include <nm-device-wimax.h>
#endif
+#include <nm-device-infiniband.h>
+#include <nm-device-bond.h>
+#include <nm-device-vlan.h>
#include <nm-utils.h>
#include <nm-setting-ip4-config.h>
#include <nm-setting-ip6-config.h>
@@ -56,8 +55,10 @@
#if WITH_WIMAX
#include <nm-setting-wimax.h>
#endif
+#include <nm-setting-infiniband.h>
#include "utils.h"
+#include "common.h"
#include "devices.h"
@@ -82,32 +83,40 @@ static NmcOutputField nmc_fields_dev_list_sections[] = {
{"WIRED-PROPERTIES", N_("WIRED-PROPERTIES"), 0, NULL, 0}, /* 4 */
{"WIMAX-PROPERTIES", N_("WIMAX-PROPERTIES"), 0, NULL, 0}, /* 5 */
{"NSP", N_("NSP"), 0, NULL, 0}, /* 6 */
- {"IP4-SETTINGS", N_("IP4-SETTINGS"), 0, NULL, 0}, /* 7 */
- {"IP4-DNS", N_("IP4-DNS"), 0, NULL, 0}, /* 8 */
- {"IP6-SETTINGS", N_("IP6-SETTINGS"), 0, NULL, 0}, /* 9 */
- {"IP6-DNS", N_("IP6-DNS"), 0, NULL, 0}, /* 10 */
+ {"IP4", N_("IP4"), 0, NULL, 0}, /* 7 */
+ {"DHCP4", N_("DHCP4"), 0, NULL, 0}, /* 8 */
+ {"IP6", N_("IP6"), 0, NULL, 0}, /* 9 */
+ {"DHCP6", N_("DHCP6"), 0, NULL, 0}, /* 10 */
{NULL, NULL, 0, NULL, 0}
};
#if WITH_WIMAX
-#define NMC_FIELDS_DEV_LIST_SECTIONS_ALL "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,WIMAX-PROPERTIES,NSP,IP4-SETTINGS,IP4-DNS,IP6-SETTINGS,IP6-DNS"
-#define NMC_FIELDS_DEV_LIST_SECTIONS_COMMON "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,WIMAX-PROPERTIES,NSP,IP4-SETTINGS,IP4-DNS,IP6-SETTINGS,IP6-DNS"
+#define NMC_FIELDS_DEV_LIST_SECTIONS_ALL "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,WIMAX-PROPERTIES,NSP,IP4,DHCP4,IP6,DHCP6"
+#define NMC_FIELDS_DEV_LIST_SECTIONS_COMMON "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,WIMAX-PROPERTIES,NSP,IP4,DHCP4,IP6,DHCP6"
#else
-#define NMC_FIELDS_DEV_LIST_SECTIONS_ALL "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,IP4-SETTINGS,IP4-DNS,IP6-SETTINGS,IP6-DNS"
-#define NMC_FIELDS_DEV_LIST_SECTIONS_COMMON "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,IP4-SETTINGS,IP4-DNS,IP6-SETTINGS,IP6-DNS"
+#define NMC_FIELDS_DEV_LIST_SECTIONS_ALL "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,IP4,DHCP4,IP6,DHCP6"
+#define NMC_FIELDS_DEV_LIST_SECTIONS_COMMON "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,IP4,DHCP4,IP6,DHCP6"
#endif
/* Available fields for 'dev list' - GENERAL part */
static NmcOutputField nmc_fields_dev_list_general[] = {
- {"NAME", N_("NAME"), 10, NULL, 0}, /* 0 */
- {"DEVICE", N_("DEVICE"), 10, NULL, 0}, /* 1 */
- {"TYPE", N_("TYPE"), 17, NULL, 0}, /* 2 */
- {"DRIVER", N_("DRIVER"), 10, NULL, 0}, /* 3 */
- {"HWADDR", N_("HWADDR"), 19, NULL, 0}, /* 4 */
- {"STATE", N_("STATE"), 14, NULL, 0}, /* 5 */
- {NULL, NULL, 0, NULL, 0}
+ {"NAME", N_("NAME"), 10, NULL, 0}, /* 0 */
+ {"DEVICE", N_("DEVICE"), 10, NULL, 0}, /* 1 */
+ {"TYPE", N_("TYPE"), 17, NULL, 0}, /* 2 */
+ {"VENDOR", N_("VENDOR"), 20, NULL, 0}, /* 3 */
+ {"PRODUCT", N_("PRODUCT"), 50, NULL, 0}, /* 4 */
+ {"DRIVER", N_("DRIVER"), 9, NULL, 0}, /* 5 */
+ {"HWADDR", N_("HWADDR"), 19, NULL, 0}, /* 6 */
+ {"STATE", N_("STATE"), 14, NULL, 0}, /* 7 */
+ {"REASON", N_("REASON"), 25, NULL, 0}, /* 8 */
+ {"UDI", N_("UDI"), 64, NULL, 0}, /* 9 */
+ {"IP-IFACE", N_("IP-IFACE"), 10, NULL, 0}, /* 10 */
+ {"NM-MANAGED", N_("NM-MANAGED"), 15, NULL, 0}, /* 11 */
+ {"FIRMWARE-MISSING", N_("FIRMWARE-MISSING"), 18, NULL, 0}, /* 12 */
+ {"CONNECTION", N_("CONNECTION"), 51, NULL, 0}, /* 13 */
+ {NULL, NULL, 0, NULL, 0}
};
-#define NMC_FIELDS_DEV_LIST_GENERAL_ALL "NAME,DEVICE,TYPE,DRIVER,HWADDR,STATE"
-#define NMC_FIELDS_DEV_LIST_GENERAL_COMMON "NAME,DEVICE,TYPE,DRIVER,HWADDR,STATE"
+#define NMC_FIELDS_DEV_LIST_GENERAL_ALL "NAME,DEVICE,TYPE,VENDOR,PRODUCT,DRIVER,HWADDR,STATE,REASON,UDI,IP-IFACE,NM-MANAGED,FIRMWARE-MISSING,CONNECTION"
+#define NMC_FIELDS_DEV_LIST_GENERAL_COMMON "NAME,DEVICE,TYPE,VENDOR,PRODUCT,DRIVER,HWADDR,STATE"
/* Available fields for 'dev list' - CAPABILITIES part */
static NmcOutputField nmc_fields_dev_list_cap[] = {
@@ -157,46 +166,6 @@ static NmcOutputField nmc_fields_dev_list_wimax_prop[] = {
#define NMC_FIELDS_DEV_LIST_WIMAX_PROP_COMMON "NAME,CTR-FREQ,RSSI,CINR,TX-POW,BSID"
#endif
-/* Available fields for 'dev list' - IPv4 settings part */
-static NmcOutputField nmc_fields_dev_list_ip4_settings[] = {
- {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */
- {"ADDRESS", N_("ADDRESS"), 15, NULL, 0}, /* 1 */
- {"PREFIX", N_("PREFIX"), 20, NULL, 0}, /* 2 */
- {"GATEWAY", N_("GATEWAY"), 20, NULL, 0}, /* 3 */
- {NULL, NULL, 0, NULL, 0}
-};
-#define NMC_FIELDS_DEV_LIST_IP4_SETTINGS_ALL "NAME,ADDRESS,PREFIX,GATEWAY"
-#define NMC_FIELDS_DEV_LIST_IP4_SETTINGS_COMMON "NAME,ADDRESS,PREFIX,GATEWAY"
-
-/* Available fields for 'dev list' - IPv6 settings part */
-static NmcOutputField nmc_fields_dev_list_ip6_settings[] = {
- {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */
- {"ADDRESS", N_("ADDRESS"), 15, NULL, 0}, /* 1 */
- {"PREFIX", N_("PREFIX"), 20, NULL, 0}, /* 2 */
- {"GATEWAY", N_("GATEWAY"), 20, NULL, 0}, /* 3 */
- {NULL, NULL, 0, NULL, 0}
-};
-#define NMC_FIELDS_DEV_LIST_IP6_SETTINGS_ALL "NAME,ADDRESS,PREFIX,GATEWAY"
-#define NMC_FIELDS_DEV_LIST_IP6_SETTINGS_COMMON "NAME,ADDRESS,PREFIX,GATEWAY"
-
-/* Available fields for 'dev list' - IPv4 settings DNS part */
-static NmcOutputField nmc_fields_dev_list_ip4_dns[] = {
- {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */
- {"DNS", N_("DNS"), 17, NULL, 0}, /* 1 */
- {NULL, NULL, 0, NULL, 0}
-};
-#define NMC_FIELDS_DEV_LIST_IP4_DNS_ALL "NAME,DNS"
-#define NMC_FIELDS_DEV_LIST_IP4_DNS_COMMON "NAME,DNS"
-
-/* Available fields for 'dev list' - IPv6 settings DNS part */
-static NmcOutputField nmc_fields_dev_list_ip6_dns[] = {
- {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */
- {"DNS", N_("DNS"), 17, NULL, 0}, /* 1 */
- {NULL, NULL, 0, NULL, 0}
-};
-#define NMC_FIELDS_DEV_LIST_IP6_DNS_ALL "NAME,DNS"
-#define NMC_FIELDS_DEV_LIST_IP6_DNS_COMMON "NAME,DNS"
-
/* Available fields for 'dev wifi list' */
static NmcOutputField nmc_fields_dev_wifi_list[] = {
{"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */
@@ -299,6 +268,167 @@ device_state_to_string (NMDeviceState state)
}
}
+static const char *
+device_reason_to_string (NMDeviceStateReason reason)
+{
+ switch (reason) {
+ case NM_DEVICE_STATE_REASON_NONE:
+ return _("No reason given");
+
+ case NM_DEVICE_STATE_REASON_UNKNOWN:
+ return _("Unknown error");
+
+ case NM_DEVICE_STATE_REASON_NOW_MANAGED:
+ return _("Device is now managed");
+
+ case NM_DEVICE_STATE_REASON_NOW_UNMANAGED:
+ return _("Device is now unmanaged");
+
+ case NM_DEVICE_STATE_REASON_CONFIG_FAILED:
+ return _("The device could not be readied for configuration");
+
+ case NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE:
+ return _("IP configuration could not be reserved (no available address, timeout, etc)");
+
+ case NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED:
+ return _("The IP configuration is no longer valid");
+
+ case NM_DEVICE_STATE_REASON_NO_SECRETS:
+ return _("Secrets were required, but not provided");
+
+ case NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT:
+ return _("802.1X supplicant disconnected");
+
+ case NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED:
+ return _("802.1X supplicant configuration failed");
+
+ case NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED:
+ return _("802.1X supplicant failed");
+
+ case NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT:
+ return _("802.1X supplicant took too long to authenticate");
+
+ case NM_DEVICE_STATE_REASON_PPP_START_FAILED:
+ return _("PPP service failed to start");
+
+ case NM_DEVICE_STATE_REASON_PPP_DISCONNECT:
+ return _("PPP service disconnected");
+
+ case NM_DEVICE_STATE_REASON_PPP_FAILED:
+ return _("PPP failed");
+
+ case NM_DEVICE_STATE_REASON_DHCP_START_FAILED:
+ return _("DHCP client failed to start");
+
+ case NM_DEVICE_STATE_REASON_DHCP_ERROR:
+ return _("DHCP client error");
+
+ case NM_DEVICE_STATE_REASON_DHCP_FAILED:
+ return _("DHCP client failed");
+
+ case NM_DEVICE_STATE_REASON_SHARED_START_FAILED:
+ return _("Shared connection service failed to start");
+
+ case NM_DEVICE_STATE_REASON_SHARED_FAILED:
+ return _("Shared connection service failed");
+
+ case NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED:
+ return _("AutoIP service failed to start");
+
+ case NM_DEVICE_STATE_REASON_AUTOIP_ERROR:
+ return _("AutoIP service error");
+
+ case NM_DEVICE_STATE_REASON_AUTOIP_FAILED:
+ return _("AutoIP service failed");
+
+ case NM_DEVICE_STATE_REASON_MODEM_BUSY:
+ return _("The line is busy");
+
+ case NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE:
+ return _("No dial tone");
+
+ case NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER:
+ return _("No carrier could be established");
+
+ case NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT:
+ return _("The dialing request timed out");
+
+ case NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED:
+ return _("The dialing attempt failed");
+
+ case NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED:
+ return _("Modem initialization failed");
+
+ case NM_DEVICE_STATE_REASON_GSM_APN_FAILED:
+ return _("Failed to select the specified APN");
+
+ case NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING:
+ return _("Not searching for networks");
+
+ case NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED:
+ return _("Network registration denied");
+
+ case NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT:
+ return _("Network registration timed out");
+
+ case NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED:
+ return _("Failed to register with the requested network");
+
+ case NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED:
+ return _("PIN check failed");
+
+ case NM_DEVICE_STATE_REASON_FIRMWARE_MISSING:
+ return _("Necessary firmware for the device may be missing");
+
+ case NM_DEVICE_STATE_REASON_REMOVED:
+ return _("The device was removed");
+
+ case NM_DEVICE_STATE_REASON_SLEEPING:
+ return _("NetworkManager went to sleep");
+
+ case NM_DEVICE_STATE_REASON_CONNECTION_REMOVED:
+ return _("The device's active connection disappeared");
+
+ case NM_DEVICE_STATE_REASON_USER_REQUESTED:
+ return _("Device disconnected by user or client");
+
+ case NM_DEVICE_STATE_REASON_CARRIER:
+ return _("Carrier/link changed");
+
+ case NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED:
+ return _("The device's existing connection was assumed");
+
+ case NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE:
+ return _("The supplicant is now available");
+
+ case NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND:
+ return _("The modem could not be found");
+
+ case NM_DEVICE_STATE_REASON_BT_FAILED:
+ return _("The Bluetooth connection failed or timed out");
+
+ case NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED:
+ return _("GSM Modem's SIM card not inserted");
+
+ case NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED:
+ return _("GSM Modem's SIM PIN required");
+
+ case NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED:
+ return _("GSM Modem's SIM PUK required");
+
+ case NM_DEVICE_STATE_REASON_GSM_SIM_WRONG:
+ return _("GSM Modem's SIM wrong");
+
+ case NM_DEVICE_STATE_REASON_INFINIBAND_MODE:
+ return _("InfiniBand device does not support connected mode");
+
+ case NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED:
+ return _("A dependency of the connection failed");
+ default:
+ return _("Unknown");
+ }
+}
+
/* Convert device type to string. Use setting names strings to match with
* connection type names.
*/
@@ -321,12 +451,18 @@ device_type_to_string (NMDevice *device)
return _("Unknown");
case NM_DEVICE_TYPE_BT:
return NM_SETTING_BLUETOOTH_SETTING_NAME;
-// case NM_DEVICE_TYPE_OLPC_MESH:
-// return NM_SETTING_OLPC_MESH_SETTING_NAME;
+ case NM_DEVICE_TYPE_OLPC_MESH:
+ return NM_SETTING_OLPC_MESH_SETTING_NAME;
#if WITH_WIMAX
case NM_DEVICE_TYPE_WIMAX:
return NM_SETTING_WIMAX_SETTING_NAME;
#endif
+ case NM_DEVICE_TYPE_INFINIBAND:
+ return NM_SETTING_INFINIBAND_SETTING_NAME;
+ case NM_DEVICE_TYPE_BOND:
+ return NM_SETTING_BOND_SETTING_NAME;
+ case NM_DEVICE_TYPE_VLAN:
+ return NM_SETTING_VLAN_SETTING_NAME;
default:
return _("Unknown");
}
@@ -374,46 +510,6 @@ ap_wpa_rsn_flags_to_string (NM80211ApSecurityFlags flags)
return ret_str;
}
-static gchar *
-ip4_address_as_string (guint32 ip)
-{
- struct in_addr tmp_addr;
- char buf[INET_ADDRSTRLEN+1];
-
- memset (&buf, '\0', sizeof (buf));
- tmp_addr.s_addr = ip;
-
- if (inet_ntop (AF_INET, &tmp_addr, buf, INET_ADDRSTRLEN)) {
- return g_strdup (buf);
- } else {
- g_warning (_("%s: error converting IP4 address 0x%X"),
- __func__, ntohl (tmp_addr.s_addr));
- return NULL;
- }
-}
-
-static gchar *
-ip6_address_as_string (const struct in6_addr *ip)
-{
- char buf[INET6_ADDRSTRLEN];
-
- memset (&buf, '\0', sizeof (buf));
-
- if (inet_ntop (AF_INET6, ip, buf, INET6_ADDRSTRLEN)) {
- return g_strdup (buf);
- } else {
- int j;
- GString *ip6_str = g_string_new (NULL);
- g_string_append_printf (ip6_str, "%02X", ip->s6_addr[0]);
- for (j = 1; j < 16; j++)
- g_string_append_printf (ip6_str, " %02X", ip->s6_addr[j]);
- g_warning ("%s: error converting IP6 address %s",
- __func__, ip6_str->str);
- g_string_free (ip6_str, TRUE);
- return NULL;
- }
-}
-
typedef struct {
NmCli *nmc;
int index;
@@ -572,13 +668,15 @@ show_device_info (gpointer data, gpointer user_data)
NmCli *nmc = (NmCli *) user_data;
GError *error = NULL;
APInfo *info;
- char *tmp;
const char *hwaddr = NULL;
NMDeviceState state = NM_DEVICE_STATE_UNKNOWN;
+ NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
NMDeviceCapabilities caps;
+ NMActiveConnection *acon;
guint32 speed;
char *speed_str = NULL;
- const GArray *array;
+ char *state_str = NULL;
+ char *reason_str = NULL;
GArray *sections_array;
int k;
char *fields_str;
@@ -623,7 +721,7 @@ show_device_info (gpointer data, gpointer user_data)
was_output = FALSE;
- state = nm_device_get_state (device);
+ state = nm_device_get_state_reason (device, &reason);
/* section GENERAL */
if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[0].name)) {
@@ -640,16 +738,36 @@ show_device_info (gpointer data, gpointer user_data)
else if (NM_IS_DEVICE_WIMAX (device))
hwaddr = nm_device_wimax_get_hw_address (NM_DEVICE_WIMAX (device));
#endif
+ else if (NM_IS_DEVICE_INFINIBAND (device))
+ hwaddr = nm_device_infiniband_get_hw_address (NM_DEVICE_INFINIBAND (device));
+ else if (NM_IS_DEVICE_BOND (device))
+ hwaddr = nm_device_bond_get_hw_address (NM_DEVICE_BOND (device));
+ else if (NM_IS_DEVICE_VLAN (device))
+ hwaddr = nm_device_vlan_get_hw_address (NM_DEVICE_VLAN (device));
+
+ state_str = g_strdup_printf ("%d (%s)", state, device_state_to_string (state));
+ reason_str = g_strdup_printf ("%d (%s)", reason, device_reason_to_string (reason));
nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[0].name; /* "GENERAL"*/
nmc->allowed_fields[1].value = nm_device_get_iface (device);
nmc->allowed_fields[2].value = device_type_to_string (device);
- nmc->allowed_fields[3].value = nm_device_get_driver (device) ? nm_device_get_driver (device) : _("(unknown)");
- nmc->allowed_fields[4].value = hwaddr ? hwaddr : _("unknown)");
- nmc->allowed_fields[5].value = device_state_to_string (state);
+ nmc->allowed_fields[3].value = nm_device_get_vendor (device);
+ nmc->allowed_fields[4].value = nm_device_get_product (device);
+ nmc->allowed_fields[5].value = nm_device_get_driver (device) ? nm_device_get_driver (device) : _("(unknown)");
+ nmc->allowed_fields[6].value = hwaddr ? hwaddr : _("(unknown)");
+ nmc->allowed_fields[7].value = state_str;
+ nmc->allowed_fields[8].value = reason_str;
+ nmc->allowed_fields[9].value = nm_device_get_udi (device);
+ nmc->allowed_fields[10].value = nm_device_get_ip_iface (device);
+ nmc->allowed_fields[11].value = nm_device_get_managed (device) ? _("yes") : _("no");
+ nmc->allowed_fields[12].value = nm_device_get_firmware_missing (device) ? _("yes") : _("no");
+ nmc->allowed_fields[13].value = (acon = nm_device_get_active_connection (device)) ?
+ nm_object_get_path (NM_OBJECT (acon)) : _("not connected");
nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+ g_free (state_str);
+ g_free (reason_str);
was_output = TRUE;
}
@@ -823,124 +941,28 @@ show_device_info (gpointer data, gpointer user_data)
}
#endif
- /* IP Setup info */
+ /* IP configuration info */
if (state == NM_DEVICE_STATE_ACTIVATED) {
NMIP4Config *cfg4 = nm_device_get_ip4_config (device);
NMIP6Config *cfg6 = nm_device_get_ip6_config (device);
- GSList *iter;
+ NMDHCP4Config *dhcp4 = nm_device_get_dhcp4_config (device);
+ NMDHCP6Config *dhcp6 = nm_device_get_dhcp6_config (device);
- /* IP4-SETTINGS */
- if (cfg4 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[7].name)) {
- nmc->allowed_fields = nmc_fields_dev_list_ip4_settings;
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
- nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_IP4_SETTINGS_ALL, nmc->allowed_fields, NULL);
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
-
- for (iter = (GSList *) nm_ip4_config_get_addresses (cfg4); iter; iter = g_slist_next (iter)) {
- NMIP4Address *addr = (NMIP4Address *) iter->data;
- guint32 prefix = nm_ip4_address_get_prefix (addr);
- char *tmp2;
- char *addr_str, *prefix_str, *gateway_str;
-
- addr_str = ip4_address_as_string (nm_ip4_address_get_address (addr));
-
- tmp2 = ip4_address_as_string (nm_utils_ip4_prefix_to_netmask (prefix));
- prefix_str = g_strdup_printf ("%d (%s)", prefix, tmp2);
- g_free (tmp2);
-
- gateway_str = ip4_address_as_string (nm_ip4_address_get_gateway (addr));
-
- nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[7].name; /* "IP4-SETTINGS" */
- nmc->allowed_fields[1].value = addr_str;
- nmc->allowed_fields[2].value = prefix_str;
- nmc->allowed_fields[3].value = gateway_str;
-
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
- g_free (addr_str);
- g_free (prefix_str);
- g_free (gateway_str);
- }
- was_output = TRUE;
- }
- /* IP4-DNS */
- if (cfg4 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[8].name)) {
- array = nm_ip4_config_get_nameservers (cfg4);
- if (array) {
- int i;
-
- nmc->allowed_fields = nmc_fields_dev_list_ip4_dns;
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
- nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_IP4_DNS_ALL, nmc->allowed_fields, NULL);
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
-
- for (i = 0; i < array->len; i++) {
- char *dns_name = g_strdup_printf ("%s%d", nmc_fields_dev_list_sections[8].name, i+1);
- tmp = ip4_address_as_string (g_array_index (array, guint32, i));
- nmc->allowed_fields[0].value = dns_name; /* "IP4-DNS<num>" */
- nmc->allowed_fields[1].value = tmp;
-
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
- g_free (tmp);
- g_free (dns_name);
- }
- }
- was_output = TRUE;
- }
-
- /* IP6-SETTINGS */
- if (cfg6 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[9].name)) {
- nmc->allowed_fields = nmc_fields_dev_list_ip6_settings;
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
- nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_IP6_SETTINGS_ALL, nmc->allowed_fields, NULL);
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
-
- for (iter = (GSList *) nm_ip6_config_get_addresses (cfg6); iter; iter = g_slist_next (iter)) {
- NMIP6Address *addr = (NMIP6Address *) iter->data;
- guint32 prefix = nm_ip6_address_get_prefix (addr);
- char *addr_str, *prefix_str, *gateway_str;
-
- addr_str = ip6_address_as_string (nm_ip6_address_get_address (addr));
+ /* IP4 */
+ if (cfg4 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[7].name))
+ was_output = print_ip4_config (cfg4, nmc, nmc_fields_dev_list_sections[7].name);
- prefix_str = g_strdup_printf ("%d", prefix);
- gateway_str = ip6_address_as_string (nm_ip6_address_get_gateway (addr));
+ /* DHCP4 */
+ if (dhcp4 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[8].name))
+ was_output = print_dhcp4_config (dhcp4, nmc, nmc_fields_dev_list_sections[8].name);
- nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[9].name; /* "IP6-SETTINGS" */
- nmc->allowed_fields[1].value = addr_str;
- nmc->allowed_fields[2].value = prefix_str;
- nmc->allowed_fields[3].value = gateway_str;
+ /* IP6 */
+ if (cfg6 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[9].name))
+ was_output = print_ip6_config (cfg6, nmc, nmc_fields_dev_list_sections[9].name);
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
- g_free (addr_str);
- g_free (prefix_str);
- g_free (gateway_str);
- }
- was_output = TRUE;
- }
- /* IP6-DNS */
- if (cfg6 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[10].name)) {
- int i = 1;
- nmc->allowed_fields = nmc_fields_dev_list_ip6_dns;
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
- nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_IP6_DNS_ALL, nmc->allowed_fields, NULL);
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */
-
- for (iter = (GSList *) nm_ip6_config_get_nameservers (cfg6); iter; iter = g_slist_next (iter)) {
- char *dns_name = g_strdup_printf ("%s%d", nmc_fields_dev_list_sections[10].name, i++);
-
- tmp = ip6_address_as_string (iter->data);
- nmc->allowed_fields[0].value = dns_name; /* "IP6-DNS<num>" */
- nmc->allowed_fields[1].value = tmp;
-
- nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
- print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
- g_free (tmp);
- g_free (dns_name);
- }
- was_output = TRUE;
- }
+ /* DHCP6 */
+ if (dhcp6 && !strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[10].name))
+ was_output = print_dhcp6_config (dhcp6, nmc, nmc_fields_dev_list_sections[10].name);
}
}
diff --git a/cli/src/nmcli.h b/cli/src/nmcli.h
index 90091b365..9ffa42edb 100644
--- a/cli/src/nmcli.h
+++ b/cli/src/nmcli.h
@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 - 2011 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
#ifndef NMC_NMCLI_H
@@ -48,11 +48,14 @@ typedef enum {
/* Error in device disconnect */
NMC_RESULT_ERROR_DEV_DISCONNECT = 6,
+ /* Error in connection deletion */
+ NMC_RESULT_ERROR_CON_DEL = 7,
+
/* NetworkManager is not running */
- NMC_RESULT_ERROR_NM_NOT_RUNNING = 7,
+ NMC_RESULT_ERROR_NM_NOT_RUNNING = 8,
/* nmcli and NetworkManager versions mismatch */
- NMC_RESULT_ERROR_VERSIONS_MISMATCH = 8
+ NMC_RESULT_ERROR_VERSIONS_MISMATCH = 9
} NMCResultCode;
typedef enum {
@@ -62,23 +65,26 @@ typedef enum {
} NMCPrintOutput;
/* === Output fields === */
+/* Flags for NmcOutputField */
+#define NMC_OF_FLAG_ARRAY 0x00000001 /* 'value' is an NULL-terminated array rather then a single string */
+
typedef struct {
const char *name; /* Field's name */
const char *name_l10n; /* Field's name for translation */
int width; /* Width in screen columns */
- const char *value; /* Value of current field */
+ const void *value; /* Value of current field - char* or char** */
guint32 flags; /* Flags */
} NmcOutputField;
/* Flags for NmcPrintFields */
-#define NMC_PF_FLAG_MULTILINE 0x00000001 /* Multiline output instead of tabular */
-#define NMC_PF_FLAG_TERSE 0x00000002 /* Terse output mode */
-#define NMC_PF_FLAG_PRETTY 0x00000004 /* Pretty output mode */
-#define NMC_PF_FLAG_MAIN_HEADER_ADD 0x00000008 /* Print main header in addition to values/field names */
-#define NMC_PF_FLAG_MAIN_HEADER_ONLY 0x00000010 /* Print main header only */
-#define NMC_PF_FLAG_FIELD_NAMES 0x00000020 /* Print field names instead of values */
-#define NMC_PF_FLAG_ESCAPE 0x00000040 /* Escape column separator and '\' */
-#define NMC_PF_FLAG_SECTION_PREFIX 0x00000080 /* Use the first value as section prefix for the other field names - just in multiline */
+#define NMC_PF_FLAG_MULTILINE 0x00000001 /* Multiline output instead of tabular */
+#define NMC_PF_FLAG_TERSE 0x00000002 /* Terse output mode */
+#define NMC_PF_FLAG_PRETTY 0x00000004 /* Pretty output mode */
+#define NMC_PF_FLAG_MAIN_HEADER_ADD 0x00000008 /* Print main header in addition to values/field names */
+#define NMC_PF_FLAG_MAIN_HEADER_ONLY 0x00000010 /* Print main header only */
+#define NMC_PF_FLAG_FIELD_NAMES 0x00000020 /* Print field names instead of values */
+#define NMC_PF_FLAG_ESCAPE 0x00000040 /* Escape column separator and '\' */
+#define NMC_PF_FLAG_SECTION_PREFIX 0x00000080 /* Use the first value as section prefix for the other field names - just in multiline */
typedef struct {
GArray *indices; /* Array of field indices to the array of allowed fields */
diff --git a/cli/src/settings.c b/cli/src/settings.c
index ccbe95891..bf422920a 100644
--- a/cli/src/settings.c
+++ b/cli/src/settings.c
@@ -14,11 +14,13 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 - 2011 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
#include "config.h"
+#include "net/if_arp.h"
+
#include <glib.h>
#include <glib/gi18n.h>
#include <libnm-util/nm-utils.h>
@@ -88,34 +90,36 @@ static NmcOutputField nmc_fields_setting_8021X[] = {
SETTING_FIELD (NM_SETTING_802_1X_EAP, 10), /* 1 */
SETTING_FIELD (NM_SETTING_802_1X_IDENTITY, 15), /* 2 */
SETTING_FIELD (NM_SETTING_802_1X_ANONYMOUS_IDENTITY, 15), /* 3 */
- SETTING_FIELD (NM_SETTING_802_1X_CA_CERT, 10), /* 4 */
- SETTING_FIELD (NM_SETTING_802_1X_CA_PATH, 10), /* 5 */
- SETTING_FIELD (NM_SETTING_802_1X_SUBJECT_MATCH, 10), /* 6 */
- SETTING_FIELD (NM_SETTING_802_1X_ALTSUBJECT_MATCHES, 10), /* 7 */
- SETTING_FIELD (NM_SETTING_802_1X_CLIENT_CERT, 10), /* 8 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPVER, 10), /* 9 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPLABEL, 10), /* 10 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING, 10), /* 11 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTH, 10), /* 12 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTHEAP, 10), /* 13 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_CERT, 20), /* 14 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_PATH, 20), /* 15 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_SUBJECT_MATCH, 10), /* 16 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_ALTSUBJECT_MATCHES, 10), /* 17 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CLIENT_CERT, 20), /* 18 */
- SETTING_FIELD (NM_SETTING_802_1X_PASSWORD, 10), /* 19 */
- SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY, 15), /* 20 */
- SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, 20), /* 21 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, 20), /* 22 */
- SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, 20), /* 23 */
- SETTING_FIELD (NM_SETTING_802_1X_PIN, 8), /* 24 */
- SETTING_FIELD (NM_SETTING_802_1X_SYSTEM_CA_CERTS, 17), /* 25 */
+ SETTING_FIELD (NM_SETTING_802_1X_PAC_FILE, 15), /* 4 */
+ SETTING_FIELD (NM_SETTING_802_1X_CA_CERT, 10), /* 5 */
+ SETTING_FIELD (NM_SETTING_802_1X_CA_PATH, 10), /* 6 */
+ SETTING_FIELD (NM_SETTING_802_1X_SUBJECT_MATCH, 10), /* 7 */
+ SETTING_FIELD (NM_SETTING_802_1X_ALTSUBJECT_MATCHES, 10), /* 8 */
+ SETTING_FIELD (NM_SETTING_802_1X_CLIENT_CERT, 10), /* 9 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPVER, 10), /* 10 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPLABEL, 10), /* 11 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING, 10), /* 12 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTH, 10), /* 13 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTHEAP, 10), /* 14 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_CERT, 20), /* 15 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_PATH, 20), /* 16 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_SUBJECT_MATCH, 10), /* 17 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_ALTSUBJECT_MATCHES, 10), /* 18 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CLIENT_CERT, 20), /* 19 */
+ SETTING_FIELD (NM_SETTING_802_1X_PASSWORD, 10), /* 20 */
+ SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY, 15), /* 21 */
+ SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, 20), /* 22 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, 20), /* 23 */
+ SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, 20), /* 24 */
+ SETTING_FIELD (NM_SETTING_802_1X_PIN, 8), /* 25 */
+ SETTING_FIELD (NM_SETTING_802_1X_SYSTEM_CA_CERTS, 17), /* 26 */
{NULL, NULL, 0, NULL, 0}
};
#define NMC_FIELDS_SETTING_802_1X_ALL "name"","\
NM_SETTING_802_1X_EAP","\
NM_SETTING_802_1X_IDENTITY","\
NM_SETTING_802_1X_ANONYMOUS_IDENTITY","\
+ NM_SETTING_802_1X_PAC_FILE","\
NM_SETTING_802_1X_CA_CERT","\
NM_SETTING_802_1X_CA_PATH","\
NM_SETTING_802_1X_SUBJECT_MATCH","\
@@ -438,6 +442,52 @@ static NmcOutputField nmc_fields_setting_wimax[] = {
NM_SETTING_WIMAX_NETWORK_NAME
#define NMC_FIELDS_SETTING_WIMAX_COMMON NMC_FIELDS_SETTING_WIMAX_ALL
+/* Available fields for NM_SETTING_INFINIBAND_SETTING_NAME */
+static NmcOutputField nmc_fields_setting_infiniband[] = {
+ SETTING_FIELD ("name", 12), /* 0 */
+ SETTING_FIELD (NM_SETTING_INFINIBAND_MAC_ADDRESS, 61), /* 1 */
+ SETTING_FIELD (NM_SETTING_INFINIBAND_MTU, 6), /* 2 */
+ SETTING_FIELD (NM_SETTING_INFINIBAND_TRANSPORT_MODE, 12), /* 3 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_SETTING_INFINIBAND_ALL "name"","\
+ NM_SETTING_INFINIBAND_MAC_ADDRESS","\
+ NM_SETTING_INFINIBAND_MTU","\
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE
+#define NMC_FIELDS_SETTING_INFINIBAND_COMMON NMC_FIELDS_SETTING_INFINIBAND_ALL
+
+/* Available fields for NM_SETTING_BOND_SETTING_NAME */
+static NmcOutputField nmc_fields_setting_bond[] = {
+ SETTING_FIELD ("name", 8), /* 0 */
+ SETTING_FIELD (NM_SETTING_BOND_INTERFACE_NAME, 15), /* 1 */
+ SETTING_FIELD (NM_SETTING_BOND_OPTIONS, 30), /* 2 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_SETTING_BOND_ALL "name"","\
+ NM_SETTING_BOND_INTERFACE_NAME","\
+ NM_SETTING_BOND_OPTIONS
+#define NMC_FIELDS_SETTING_BOND_COMMON NMC_FIELDS_SETTING_BOND_ALL
+
+/* Available fields for NM_SETTING_VLAN_SETTING_NAME */
+static NmcOutputField nmc_fields_setting_vlan[] = {
+ SETTING_FIELD ("name", 6), /* 0 */
+ SETTING_FIELD (NM_SETTING_VLAN_INTERFACE_NAME, 15), /* 1 */
+ SETTING_FIELD (NM_SETTING_VLAN_PARENT, 8), /* 2 */
+ SETTING_FIELD (NM_SETTING_VLAN_ID, 6), /* 3 */
+ SETTING_FIELD (NM_SETTING_VLAN_FLAGS, 45), /* 4 */
+ SETTING_FIELD (NM_SETTING_VLAN_INGRESS_PRIORITY_MAP, 22), /* 5 */
+ SETTING_FIELD (NM_SETTING_VLAN_EGRESS_PRIORITY_MAP, 22), /* 6 */
+ {NULL, NULL, 0, NULL, 0}
+};
+#define NMC_FIELDS_SETTING_VLAN_ALL "name"","\
+ NM_SETTING_VLAN_INTERFACE_NAME","\
+ NM_SETTING_VLAN_PARENT","\
+ NM_SETTING_VLAN_ID","\
+ NM_SETTING_VLAN_FLAGS","\
+ NM_SETTING_VLAN_INGRESS_PRIORITY_MAP","\
+ NM_SETTING_VLAN_EGRESS_PRIORITY_MAP
+#define NMC_FIELDS_SETTING_VLAN_COMMON NMC_FIELDS_SETTING_VLAN_ALL
+
static char *
wep_key_type_to_string (NMWepKeyType type)
@@ -519,10 +569,57 @@ allowed_bands_to_string (guint32 bands)
return g_string_free (band_str, FALSE);
}
+static char *
+vlan_flags_to_string (guint32 flags)
+{
+ GString *flag_str;
+
+ if (flags == 0)
+ return g_strdup (_("0 (NONE)"));
+
+ flag_str = g_string_new (NULL);
+ g_string_printf (flag_str, "%d (", flags);
+
+ if (flags & NM_VLAN_FLAG_REORDER_HEADERS)
+ g_string_append (flag_str, _("REORDER_HEADERS, "));
+ if (flags & NM_VLAN_FLAG_GVRP)
+ g_string_append (flag_str, _("GVRP, "));
+ if (flags & NM_VLAN_FLAG_LOOSE_BINDING)
+ g_string_append (flag_str, _("LOOSE_BINDING, "));
+
+ if (flag_str->str[flag_str->len-1] == '(')
+ g_string_assign (flag_str, _("unknown"));
+ else
+ g_string_truncate (flag_str, flag_str->len-2); /* chop off trailing ', ' */
+
+ g_string_append_c (flag_str, ')');
+
+ return g_string_free (flag_str, FALSE);
+}
+
+static char *
+vlan_priorities_to_string (NMSettingVlan *s_vlan, NMVlanPriorityMap map)
+{
+ GString *priorities;
+ int i;
+
+ priorities = g_string_new (NULL);
+ for (i = 0; i < nm_setting_vlan_get_num_priorities (s_vlan, map); i++) {
+ guint32 from, to;
+
+ nm_setting_vlan_get_priority (s_vlan, map, i, &from, &to);
+ g_string_append_printf (priorities, "%d:%d,", from, to);
+ }
+ g_string_truncate (priorities, priorities->len-1); /* chop off trailing ',' */
+
+ return g_string_free (priorities, FALSE);
+}
+
+/*----------------------------------------------------------------------------*/
+
gboolean
-setting_connection_details (NMSetting *setting, NmCli *nmc)
+setting_connection_details (NMSettingConnection *s_con, NmCli *nmc)
{
- NMSettingConnection *s_con;
guint64 timestamp;
char *timestamp_str;
const char *perm_item;
@@ -533,8 +630,7 @@ setting_connection_details (NMSetting *setting, NmCli *nmc)
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), FALSE);
- s_con = (NMSettingConnection *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_CONNECTION (s_con), FALSE);
nmc->allowed_fields = nmc_fields_setting_connection;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_CONNECTION_ALL, nmc->allowed_fields, NULL);
@@ -572,9 +668,8 @@ setting_connection_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_wired_details (NMSetting *setting, NmCli *nmc)
+setting_wired_details (NMSettingWired *s_wired, NmCli *nmc)
{
- NMSettingWired *s_wired;
const GByteArray *mac;
const GSList *iter;
const GPtrArray *s390_channels;
@@ -585,8 +680,7 @@ setting_wired_details (NMSetting *setting, NmCli *nmc)
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_WIRED (setting), FALSE);
- s_wired = (NMSettingWired *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_WIRED (s_wired), FALSE);
nmc->allowed_fields = nmc_fields_setting_wired;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIRED_ALL, nmc->allowed_fields, NULL);
@@ -597,10 +691,10 @@ setting_wired_details (NMSetting *setting, NmCli *nmc)
mtu_str = g_strdup_printf ("%d", nm_setting_wired_get_mtu (s_wired));
mac = nm_setting_wired_get_mac_address (s_wired);
if (mac)
- device_mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]);
+ device_mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_ETHER);
mac = nm_setting_wired_get_cloned_mac_address (s_wired);
if (mac)
- cloned_mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]);
+ cloned_mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_ETHER);
mac_blacklist_s = g_string_new (NULL);
iter = nm_setting_wired_get_mac_address_blacklist (s_wired);
@@ -653,9 +747,8 @@ setting_wired_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_802_1X_details (NMSetting *setting, NmCli *nmc)
+setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc)
{
- NMSetting8021x *s_8021X;
NMSetting8021xCKScheme scheme;
GString *eap_str, *alt_sub_match, *phase2_alt_sub_match;
char *ca_cert_str = NULL, *client_cert_str = NULL, *phase2_ca_cert_str = NULL;
@@ -665,8 +758,7 @@ setting_802_1X_details (NMSetting *setting, NmCli *nmc)
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE);
- s_8021X = (NMSetting8021x *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_802_1X (s_8021X), FALSE);
nmc->allowed_fields = nmc_fields_setting_8021X;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_802_1X_ALL, nmc->allowed_fields, NULL);
@@ -729,28 +821,29 @@ setting_802_1X_details (NMSetting *setting, NmCli *nmc)
nmc->allowed_fields[1].value = eap_str->str;
nmc->allowed_fields[2].value = nm_setting_802_1x_get_identity (s_8021X);
nmc->allowed_fields[3].value = nm_setting_802_1x_get_anonymous_identity (s_8021X);
- nmc->allowed_fields[4].value = ca_cert_str;
- nmc->allowed_fields[5].value = nm_setting_802_1x_get_ca_path (s_8021X);
- nmc->allowed_fields[6].value = nm_setting_802_1x_get_subject_match (s_8021X);
- nmc->allowed_fields[7].value = alt_sub_match->str;
- nmc->allowed_fields[8].value = client_cert_str;
- nmc->allowed_fields[9].value = nm_setting_802_1x_get_phase1_peapver (s_8021X);
- nmc->allowed_fields[10].value = nm_setting_802_1x_get_phase1_peaplabel (s_8021X);
- nmc->allowed_fields[11].value = nm_setting_802_1x_get_phase1_fast_provisioning (s_8021X);
- nmc->allowed_fields[12].value = nm_setting_802_1x_get_phase2_auth (s_8021X);
- nmc->allowed_fields[13].value = nm_setting_802_1x_get_phase2_autheap (s_8021X);
- nmc->allowed_fields[14].value = phase2_ca_cert_str;
- nmc->allowed_fields[15].value = nm_setting_802_1x_get_phase2_ca_path (s_8021X);
- nmc->allowed_fields[16].value = nm_setting_802_1x_get_phase2_subject_match (s_8021X);
- nmc->allowed_fields[17].value = phase2_alt_sub_match->str;
- nmc->allowed_fields[18].value = phase2_client_cert_str;
- nmc->allowed_fields[19].value = nm_setting_802_1x_get_password (s_8021X);
- nmc->allowed_fields[20].value = private_key_str;
- nmc->allowed_fields[21].value = nm_setting_802_1x_get_private_key_password (s_8021X);
- nmc->allowed_fields[22].value = phase2_private_key_str;
- nmc->allowed_fields[23].value = nm_setting_802_1x_get_phase2_private_key_password (s_8021X);
- nmc->allowed_fields[24].value = nm_setting_802_1x_get_pin (s_8021X);
- nmc->allowed_fields[25].value = nm_setting_802_1x_get_system_ca_certs (s_8021X) ? _("yes") : _("no");
+ nmc->allowed_fields[4].value = nm_setting_802_1x_get_pac_file (s_8021X);
+ nmc->allowed_fields[5].value = ca_cert_str;
+ nmc->allowed_fields[6].value = nm_setting_802_1x_get_ca_path (s_8021X);
+ nmc->allowed_fields[7].value = nm_setting_802_1x_get_subject_match (s_8021X);
+ nmc->allowed_fields[8].value = alt_sub_match->str;
+ nmc->allowed_fields[9].value = client_cert_str;
+ nmc->allowed_fields[10].value = nm_setting_802_1x_get_phase1_peapver (s_8021X);
+ nmc->allowed_fields[11].value = nm_setting_802_1x_get_phase1_peaplabel (s_8021X);
+ nmc->allowed_fields[12].value = nm_setting_802_1x_get_phase1_fast_provisioning (s_8021X);
+ nmc->allowed_fields[13].value = nm_setting_802_1x_get_phase2_auth (s_8021X);
+ nmc->allowed_fields[14].value = nm_setting_802_1x_get_phase2_autheap (s_8021X);
+ nmc->allowed_fields[15].value = phase2_ca_cert_str;
+ nmc->allowed_fields[16].value = nm_setting_802_1x_get_phase2_ca_path (s_8021X);
+ nmc->allowed_fields[17].value = nm_setting_802_1x_get_phase2_subject_match (s_8021X);
+ nmc->allowed_fields[18].value = phase2_alt_sub_match->str;
+ nmc->allowed_fields[19].value = phase2_client_cert_str;
+ nmc->allowed_fields[20].value = nm_setting_802_1x_get_password (s_8021X);
+ nmc->allowed_fields[21].value = private_key_str;
+ nmc->allowed_fields[22].value = nm_setting_802_1x_get_private_key_password (s_8021X);
+ nmc->allowed_fields[23].value = phase2_private_key_str;
+ nmc->allowed_fields[24].value = nm_setting_802_1x_get_phase2_private_key_password (s_8021X);
+ nmc->allowed_fields[25].value = nm_setting_802_1x_get_pin (s_8021X);
+ nmc->allowed_fields[26].value = nm_setting_802_1x_get_system_ca_certs (s_8021X) ? _("yes") : _("no");
nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
@@ -769,9 +862,8 @@ setting_802_1X_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_wireless_details (NMSetting *setting, NmCli *nmc)
+setting_wireless_details (NMSettingWireless *s_wireless, NmCli *nmc)
{
- NMSettingWireless *s_wireless;
int i;
const GByteArray *ssid, *bssid, *mac;
char *ssid_str, *channel_str, *rate_str, *tx_power_str, *mtu_str;
@@ -782,8 +874,7 @@ setting_wireless_details (NMSetting *setting, NmCli *nmc)
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), FALSE);
- s_wireless = (NMSettingWireless *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_WIRELESS (s_wireless), FALSE);
nmc->allowed_fields = nmc_fields_setting_wireless;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIRELESS_ALL, nmc->allowed_fields, NULL);
@@ -796,15 +887,15 @@ setting_wireless_details (NMSetting *setting, NmCli *nmc)
rate_str = g_strdup_printf ("%d", nm_setting_wireless_get_rate (s_wireless));
bssid = nm_setting_wireless_get_bssid (s_wireless);
if (bssid)
- bssid_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", bssid->data[0], bssid->data[1], bssid->data[2], bssid->data[3], bssid->data[4], bssid->data[5]);
+ bssid_str = nm_utils_hwaddr_ntoa (bssid->data, ARPHRD_ETHER);
tx_power_str = g_strdup_printf ("%d", nm_setting_wireless_get_tx_power (s_wireless));
mtu_str = g_strdup_printf ("%d", nm_setting_wireless_get_mtu (s_wireless));
mac = nm_setting_wireless_get_mac_address (s_wireless);
if (mac)
- device_mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]);
+ device_mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_ETHER);
mac = nm_setting_wireless_get_cloned_mac_address (s_wireless);
if (mac)
- cloned_mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]);
+ cloned_mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_ETHER);
mac_blacklist = g_string_new (NULL);
iter = nm_setting_wireless_get_mac_address_blacklist (s_wireless);
@@ -854,9 +945,8 @@ setting_wireless_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_wireless_security_details (NMSetting *setting, NmCli *nmc)
+setting_wireless_security_details (NMSettingWirelessSecurity *s_wireless_sec, NmCli *nmc)
{
- NMSettingWirelessSecurity *s_wireless_sec;
int i;
char *wep_tx_keyidx_str, *wep_key_type_str;
GString *protos, *pairwises, *groups;
@@ -864,8 +954,7 @@ setting_wireless_security_details (NMSetting *setting, NmCli *nmc)
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_WIRELESS_SECURITY (setting), FALSE);
- s_wireless_sec = (NMSettingWirelessSecurity *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_WIRELESS_SECURITY (s_wireless_sec), FALSE);
nmc->allowed_fields = nmc_fields_setting_wireless_security;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL, nmc->allowed_fields, NULL);
@@ -922,17 +1011,15 @@ setting_wireless_security_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_ip4_config_details (NMSetting *setting, NmCli *nmc)
+setting_ip4_config_details (NMSettingIP4Config *s_ip4, NmCli *nmc)
{
- NMSettingIP4Config *s_ip4;
GString *dns_str, *dns_search_str, *addr_str, *route_str;
int i, num;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE);
- s_ip4 = (NMSettingIP4Config *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (s_ip4), FALSE);
nmc->allowed_fields = nmc_fields_setting_ip4_config;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_IP4_CONFIG_ALL, nmc->allowed_fields, NULL);
@@ -1058,17 +1145,15 @@ setting_ip4_config_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_ip6_config_details (NMSetting *setting, NmCli *nmc)
+setting_ip6_config_details (NMSettingIP6Config *s_ip6, NmCli *nmc)
{
- NMSettingIP6Config *s_ip6;
GString *dns_str, *dns_search_str, *addr_str, *route_str;
int i, num;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_IP6_CONFIG (setting), FALSE);
- s_ip6 = (NMSettingIP6Config *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_IP6_CONFIG (s_ip6), FALSE);
nmc->allowed_fields = nmc_fields_setting_ip6_config;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_IP6_CONFIG_ALL, nmc->allowed_fields, NULL);
@@ -1191,16 +1276,14 @@ setting_ip6_config_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_serial_details (NMSetting *setting, NmCli *nmc)
+setting_serial_details (NMSettingSerial *s_serial, NmCli *nmc)
{
- NMSettingSerial *s_serial;
char *baud_str, *bits_str, *parity_str, *stopbits_str, *send_delay_str;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_SERIAL (setting), FALSE);
- s_serial = (NMSettingSerial *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_SERIAL (s_serial), FALSE);
nmc->allowed_fields = nmc_fields_setting_serial;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_SERIAL_ALL, nmc->allowed_fields, NULL);
@@ -1233,16 +1316,14 @@ setting_serial_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_ppp_details (NMSetting *setting, NmCli *nmc)
+setting_ppp_details (NMSettingPPP *s_ppp, NmCli *nmc)
{
- NMSettingPPP *s_ppp;
char *baud_str, *mru_str, *mtu_str, *lcp_echo_failure_str, *lcp_echo_interval_str;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_PPP (setting), FALSE);
- s_ppp = (NMSettingPPP *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_PPP (s_ppp), FALSE);
nmc->allowed_fields = nmc_fields_setting_ppp;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_PPP_ALL, nmc->allowed_fields, NULL);
@@ -1288,15 +1369,13 @@ setting_ppp_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_pppoe_details (NMSetting *setting, NmCli *nmc)
+setting_pppoe_details (NMSettingPPPOE *s_pppoe, NmCli *nmc)
{
- NMSettingPPPOE *s_pppoe;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_PPPOE (setting), FALSE);
- s_pppoe = (NMSettingPPPOE *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_PPPOE (s_pppoe), FALSE);
nmc->allowed_fields = nmc_fields_setting_pppoe;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_PPPOE_ALL, nmc->allowed_fields, NULL);
@@ -1315,16 +1394,14 @@ setting_pppoe_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_gsm_details (NMSetting *setting, NmCli *nmc)
+setting_gsm_details (NMSettingGsm *s_gsm, NmCli *nmc)
{
- NMSettingGsm *s_gsm;
char *network_type_str, *allowed_bands_str;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_GSM (setting), FALSE);
- s_gsm = (NMSettingGsm *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_GSM (s_gsm), FALSE);
nmc->allowed_fields = nmc_fields_setting_gsm;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_GSM_ALL, nmc->allowed_fields, NULL);
@@ -1355,15 +1432,13 @@ setting_gsm_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_cdma_details (NMSetting *setting, NmCli *nmc)
+setting_cdma_details (NMSettingCdma *s_cdma, NmCli *nmc)
{
- NMSettingCdma *s_cdma;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_CDMA (setting), FALSE);
- s_cdma = (NMSettingCdma *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_CDMA (s_cdma), FALSE);
nmc->allowed_fields = nmc_fields_setting_cdma;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_CDMA_ALL, nmc->allowed_fields, NULL);
@@ -1382,17 +1457,15 @@ setting_cdma_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_bluetooth_details (NMSetting *setting, NmCli *nmc)
+setting_bluetooth_details (NMSettingBluetooth *s_bluetooth, NmCli *nmc)
{
- NMSettingBluetooth *s_bluetooth;
const GByteArray *bdaddr;
char *bdaddr_str = NULL;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_BLUETOOTH (setting), FALSE);
- s_bluetooth = (NMSettingBluetooth *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_BLUETOOTH (s_bluetooth), FALSE);
nmc->allowed_fields = nmc_fields_setting_bluetooth;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_BLUETOOTH_ALL, nmc->allowed_fields, NULL);
@@ -1401,8 +1474,8 @@ setting_bluetooth_details (NMSetting *setting, NmCli *nmc)
bdaddr = nm_setting_bluetooth_get_bdaddr (s_bluetooth);
if (bdaddr)
- bdaddr_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", bdaddr->data[0], bdaddr->data[1], bdaddr->data[2],
- bdaddr->data[3], bdaddr->data[4], bdaddr->data[5]);
+ bdaddr_str = nm_utils_hwaddr_ntoa (bdaddr->data, ARPHRD_ETHER);
+
nmc->allowed_fields[0].value = NM_SETTING_BLUETOOTH_SETTING_NAME;
nmc->allowed_fields[1].value = bdaddr_str;
nmc->allowed_fields[2].value = nm_setting_bluetooth_get_connection_type (s_bluetooth);
@@ -1416,17 +1489,15 @@ setting_bluetooth_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_olpc_mesh_details (NMSetting *setting, NmCli *nmc)
+setting_olpc_mesh_details (NMSettingOlpcMesh *s_olpc_mesh, NmCli *nmc)
{
- NMSettingOlpcMesh *s_olpc_mesh;
const GByteArray *ssid, *dhcp_anycast;
char *ssid_str, *channel_str, *dhcp_anycast_str = NULL;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_OLPC_MESH (setting), FALSE);
- s_olpc_mesh = (NMSettingOlpcMesh *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_OLPC_MESH (s_olpc_mesh), FALSE);
nmc->allowed_fields = nmc_fields_setting_olpc_mesh;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_OLPC_MESH_ALL, nmc->allowed_fields, NULL);
@@ -1438,8 +1509,8 @@ setting_olpc_mesh_details (NMSetting *setting, NmCli *nmc)
channel_str = g_strdup_printf ("%d", nm_setting_olpc_mesh_get_channel (s_olpc_mesh));
dhcp_anycast = nm_setting_olpc_mesh_get_dhcp_anycast_address (s_olpc_mesh);
if (dhcp_anycast)
- dhcp_anycast_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", dhcp_anycast->data[0], dhcp_anycast->data[1], dhcp_anycast->data[2],
- dhcp_anycast->data[3], dhcp_anycast->data[4], dhcp_anycast->data[5]);
+ dhcp_anycast_str = nm_utils_hwaddr_ntoa (dhcp_anycast->data, ARPHRD_ETHER);
+
nmc->allowed_fields[0].value = NM_SETTING_OLPC_MESH_SETTING_NAME;
nmc->allowed_fields[1].value = ssid_str;
nmc->allowed_fields[2].value = channel_str;
@@ -1467,16 +1538,14 @@ vpn_data_item (const char *key, const char *value, gpointer user_data)
}
gboolean
-setting_vpn_details (NMSetting *setting, NmCli *nmc)
+setting_vpn_details (NMSettingVPN *s_vpn, NmCli *nmc)
{
- NMSettingVPN *s_vpn;
GString *data_item_str, *secret_str;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_VPN (setting), FALSE);
- s_vpn = (NMSettingVPN *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_VPN (s_vpn), FALSE);
nmc->allowed_fields = nmc_fields_setting_vpn;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_VPN_ALL, nmc->allowed_fields, NULL);
@@ -1504,17 +1573,15 @@ setting_vpn_details (NMSetting *setting, NmCli *nmc)
}
gboolean
-setting_wimax_details (NMSetting *setting, NmCli *nmc)
+setting_wimax_details (NMSettingWimax *s_wimax, NmCli *nmc)
{
- NMSettingWimax *s_wimax;
const GByteArray *mac;
char *device_mac_str = NULL;
guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
- g_return_val_if_fail (NM_IS_SETTING_WIMAX (setting), FALSE);
- s_wimax = (NMSettingWimax *) setting;
+ g_return_val_if_fail (NM_IS_SETTING_WIMAX (s_wimax), FALSE);
nmc->allowed_fields = nmc_fields_setting_wimax;
nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIMAX_ALL, nmc->allowed_fields, NULL);
@@ -1523,7 +1590,7 @@ setting_wimax_details (NMSetting *setting, NmCli *nmc)
mac = nm_setting_wimax_get_mac_address (s_wimax);
if (mac)
- device_mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]);
+ device_mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_ETHER);
nmc->allowed_fields[0].value = NM_SETTING_WIMAX_SETTING_NAME;
nmc->allowed_fields[1].value = device_mac_str;
@@ -1537,3 +1604,114 @@ setting_wimax_details (NMSetting *setting, NmCli *nmc)
return TRUE;
}
+gboolean
+setting_infiniband_details (NMSettingInfiniband *s_infiniband, NmCli *nmc)
+{
+ const GByteArray *mac;
+ char *mtu_str, *mac_str = NULL;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ g_return_val_if_fail (NM_IS_SETTING_INFINIBAND (s_infiniband), FALSE);
+
+ nmc->allowed_fields = nmc_fields_setting_infiniband;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_INFINIBAND_ALL, nmc->allowed_fields, NULL);
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */
+
+ mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (mac)
+ mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_INFINIBAND);
+ mtu_str = g_strdup_printf ("%d", nm_setting_infiniband_get_mtu (s_infiniband));
+
+ nmc->allowed_fields[0].value = NM_SETTING_INFINIBAND_SETTING_NAME;
+ nmc->allowed_fields[1].value = mac_str;
+ nmc->allowed_fields[2].value = strcmp (mtu_str, "0") ? mtu_str : _("auto");
+ nmc->allowed_fields[3].value = nm_setting_infiniband_get_transport_mode (s_infiniband);
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_free (mac_str);
+ g_free (mtu_str);
+
+ return TRUE;
+}
+
+gboolean
+setting_bond_details (NMSettingBond *s_bond, NmCli *nmc)
+{
+ GString *bond_options_s;
+ int i;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ g_return_val_if_fail (NM_IS_SETTING_BOND (s_bond), FALSE);
+
+ nmc->allowed_fields = nmc_fields_setting_bond;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_BOND_ALL, nmc->allowed_fields, NULL);
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */
+
+ bond_options_s = g_string_new (NULL);
+ for (i = 0; i < nm_setting_bond_get_num_options (s_bond); i++) {
+ const char *key, *value;
+
+ nm_setting_bond_get_option (s_bond, i, &key, &value);
+ g_string_append_printf (bond_options_s, "%s=%s,", key, value);
+ }
+ g_string_truncate (bond_options_s, bond_options_s->len-1); /* chop off trailing ',' */
+
+ nmc->allowed_fields[0].value = NM_SETTING_BOND_SETTING_NAME;
+ nmc->allowed_fields[1].value = nm_setting_bond_get_interface_name (s_bond);
+ nmc->allowed_fields[2].value = bond_options_s->str;
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_string_free (bond_options_s, TRUE);
+
+ return TRUE;
+}
+
+gboolean
+setting_vlan_details (NMSettingVlan *s_vlan, NmCli *nmc)
+{
+ char *vlan_id_str, *vlan_flags_str, *vlan_ingress_prio_str, *vlan_egress_prio_str;
+ guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0;
+ guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0;
+ guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0;
+
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (s_vlan), FALSE);
+
+ nmc->allowed_fields = nmc_fields_setting_vlan;
+ nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_VLAN_ALL, nmc->allowed_fields, NULL);
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */
+
+ vlan_id_str = g_strdup_printf ("%d", nm_setting_vlan_get_id (s_vlan));
+ vlan_flags_str = vlan_flags_to_string (nm_setting_vlan_get_flags (s_vlan));
+ vlan_ingress_prio_str = vlan_priorities_to_string (s_vlan, NM_VLAN_INGRESS_MAP);
+ vlan_egress_prio_str = vlan_priorities_to_string (s_vlan, NM_VLAN_EGRESS_MAP);
+
+ nmc->allowed_fields[0].value = NM_SETTING_VLAN_SETTING_NAME;
+ nmc->allowed_fields[1].value = nm_setting_vlan_get_interface_name (s_vlan);
+ nmc->allowed_fields[2].value = nm_setting_vlan_get_parent (s_vlan);
+ nmc->allowed_fields[3].value = vlan_id_str;
+ nmc->allowed_fields[4].value = vlan_flags_str;
+ nmc->allowed_fields[5].value = vlan_ingress_prio_str;
+ nmc->allowed_fields[6].value = vlan_egress_prio_str;
+
+ nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX;
+ print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */
+
+ g_free (vlan_id_str);
+ g_free (vlan_flags_str);
+ g_free (vlan_ingress_prio_str);
+ g_free (vlan_egress_prio_str);
+
+ return TRUE;
+}
+
diff --git a/cli/src/settings.h b/cli/src/settings.h
index 4901bf272..964d6648f 100644
--- a/cli/src/settings.h
+++ b/cli/src/settings.h
@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
#ifndef NMC_SETTINGS_H
@@ -36,26 +36,32 @@
#include <nm-setting-olpc-mesh.h>
#include <nm-setting-vpn.h>
#include <nm-setting-wimax.h>
+#include <nm-setting-infiniband.h>
+#include <nm-setting-bond.h>
+#include <nm-setting-vlan.h>
#include "nmcli.h"
#include "utils.h"
-gboolean setting_connection_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_wired_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_802_1X_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_wireless_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_wireless_security_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_ip4_config_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_ip6_config_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_serial_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_ppp_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_pppoe_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_gsm_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_cdma_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_bluetooth_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_olpc_mesh_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_vpn_details (NMSetting *setting, NmCli *nmc);
-gboolean setting_wimax_details (NMSetting *setting, NmCli *nmc);
+gboolean setting_connection_details (NMSettingConnection *s_con, NmCli *nmc);
+gboolean setting_wired_details (NMSettingWired *s_wired, NmCli *nmc);
+gboolean setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc);
+gboolean setting_wireless_details (NMSettingWireless *s_wireless, NmCli *nmc);
+gboolean setting_wireless_security_details (NMSettingWirelessSecurity *s_wsec, NmCli *nmc);
+gboolean setting_ip4_config_details (NMSettingIP4Config *s_ip4, NmCli *nmc);
+gboolean setting_ip6_config_details (NMSettingIP6Config *s_ip6, NmCli *nmc);
+gboolean setting_serial_details (NMSettingSerial *s_serial, NmCli *nmc);
+gboolean setting_ppp_details (NMSettingPPP *s_ppp, NmCli *nmc);
+gboolean setting_pppoe_details (NMSettingPPPOE *s_pppoe, NmCli *nmc);
+gboolean setting_gsm_details (NMSettingGsm *s_gsm, NmCli *nmc);
+gboolean setting_cdma_details (NMSettingCdma *s_cdma, NmCli *nmc);
+gboolean setting_bluetooth_details (NMSettingBluetooth *s_bluetooth, NmCli *nmc);
+gboolean setting_olpc_mesh_details (NMSettingOlpcMesh *s_olpc_mesh, NmCli *nmc);
+gboolean setting_vpn_details (NMSettingVPN *s_vpn, NmCli *nmc);
+gboolean setting_wimax_details (NMSettingWimax *s_wimax, NmCli *nmc);
+gboolean setting_infiniband_details (NMSettingInfiniband *s_infiniband, NmCli *nmc);
+gboolean setting_bond_details (NMSettingBond *s_bond, NmCli *nmc);
+gboolean setting_vlan_details (NMSettingVlan *s_vlan, NmCli *nmc);
#endif /* NMC_SETTINGS_H */
diff --git a/cli/src/utils.c b/cli/src/utils.c
index c5637e4f9..24bc998c9 100644
--- a/cli/src/utils.c
+++ b/cli/src/utils.c
@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 - 2011 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
/* Generated configuration file */
@@ -23,6 +23,10 @@
#include <stdio.h>
#include <string.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include <glib.h>
#include <glib/gi18n.h>
#include <dbus/dbus-glib-bindings.h>
@@ -79,6 +83,60 @@ ssid_to_printable (const char *str, gsize len)
}
/*
+ * Converts IPv4 address from guint32 in network-byte order to text representation.
+ * Returns: text form of the IP or NULL (then error is set)
+ */
+char *
+nmc_ip4_address_as_string (guint32 ip, GError **error)
+{
+ struct in_addr tmp_addr;
+ char buf[INET_ADDRSTRLEN];
+
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ memset (&buf, '\0', sizeof (buf));
+ tmp_addr.s_addr = ip;
+
+ if (inet_ntop (AF_INET, &tmp_addr, buf, INET_ADDRSTRLEN)) {
+ return g_strdup (buf);
+ } else {
+ g_set_error (error, 0, 0, _("Error converting IP4 address '0x%X' to text form"),
+ ntohl (tmp_addr.s_addr));
+ return NULL;
+ }
+}
+
+/*
+ * Converts IPv6 address in in6_addr structure to text representation.
+ * Returns: text form of the IP or NULL (then error is set)
+ */
+char *
+nmc_ip6_address_as_string (const struct in6_addr *ip, GError **error)
+{
+ char buf[INET6_ADDRSTRLEN];
+
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ memset (&buf, '\0', sizeof (buf));
+
+ if (inet_ntop (AF_INET6, ip, buf, INET6_ADDRSTRLEN)) {
+ return g_strdup (buf);
+ } else {
+ if (error) {
+ int j;
+ GString *ip6_str = g_string_new (NULL);
+ g_string_append_printf (ip6_str, "%02X", ip->s6_addr[0]);
+ for (j = 1; j < 16; j++)
+ g_string_append_printf (ip6_str, " %02X", ip->s6_addr[j]);
+ g_set_error (error, 0, 0, _("Error converting IP6 address '%s' to text form"),
+ ip6_str->str);
+ g_string_free (ip6_str, TRUE);
+ }
+ return NULL;
+ }
+}
+
+/*
* Find out how many columns an UTF-8 string occupies on the screen
*/
int
@@ -96,6 +154,20 @@ nmc_string_screen_width (const char *start, const char *end)
return width;
}
+void
+set_val_str (NmcOutputField fields_array[], guint32 idx, const char *value)
+{
+ fields_array[idx].flags = 0;
+ fields_array[idx].value = value;
+}
+
+void
+set_val_arr (NmcOutputField fields_array[], guint32 idx, const char **value)
+{
+ fields_array[idx].flags = NMC_OF_FLAG_ARRAY;
+ fields_array[idx].value = value;
+}
+
/*
* Parse comma separated fields in 'fields_str' according to 'fields_array'.
* IN: 'field_str': comma-separated fields names
@@ -172,9 +244,8 @@ print_fields (const NmcPrintFields fields, const NmcOutputField field_values[])
int table_width = 0;
char *line = NULL;
char *indent_str;
- const char *value;
const char *not_set_str = _("not set");
- int i, idx;
+ int i;
gboolean multiline = fields.flags & NMC_PF_FLAG_MULTILINE;
gboolean terse = fields.flags & NMC_PF_FLAG_TERSE;
gboolean pretty = fields.flags & NMC_PF_FLAG_PRETTY;
@@ -213,14 +284,39 @@ print_fields (const NmcPrintFields fields, const NmcOutputField field_values[])
if (!main_header_only && !field_names) {
for (i = 0; i < fields.indices->len; i++) {
char *tmp;
- idx = g_array_index (fields.indices, int, i);
+ int idx = g_array_index (fields.indices, int, i);
+ guint32 value_is_array = field_values[idx].flags & NMC_OF_FLAG_ARRAY;
+
+ /* section prefix can't be an array */
+ g_assert (!value_is_array || !section_prefix || idx != 0);
+
if (section_prefix && idx == 0) /* The first field is section prefix */
continue;
- tmp = g_strdup_printf ("%s%s%s:", section_prefix ? field_values[0].value : "",
- section_prefix ? "." : "",
- _(field_values[idx].name_l10n));
- printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT, tmp, field_values[idx].value ? field_values[idx].value : not_set_str);
- g_free (tmp);
+
+ if (value_is_array) {
+ /* value is a null-terminated string array */
+ const char **p;
+ int j;
+
+ for (p = (const char **) field_values[idx].value, j = 1; p && *p; p++, j++) {
+ tmp = g_strdup_printf ("%s%s%s[%d]:", section_prefix ? (const char*) field_values[0].value : "",
+ section_prefix ? "." : "",
+ _(field_values[idx].name_l10n),
+ j);
+ printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT, tmp, *p ? *p : not_set_str);
+ g_free (tmp);
+ }
+ } else {
+ /* value is a string */
+ const char *hdr_name = (const char*) field_values[0].value;
+ const char *val = (const char*) field_values[idx].value;
+
+ tmp = g_strdup_printf ("%s%s%s:", section_prefix ? hdr_name : "",
+ section_prefix ? "." : "",
+ _(field_values[idx].name_l10n));
+ printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT, tmp, val ? val : not_set_str);
+ g_free (tmp);
+ }
}
if (pretty) {
line = g_strnfill (ML_HEADER_WIDTH, '-');
@@ -235,11 +331,16 @@ print_fields (const NmcPrintFields fields, const NmcOutputField field_values[])
str = g_string_new (NULL);
for (i = 0; i < fields.indices->len; i++) {
- idx = g_array_index (fields.indices, int, i);
+ int idx = g_array_index (fields.indices, int, i);
+ guint32 value_is_array = field_values[idx].flags & NMC_OF_FLAG_ARRAY;
+ char *value;
if (field_names)
value = _(field_values[idx].name_l10n);
else
- value = field_values[idx].value ? field_values[idx].value : not_set_str;
+ value = field_values[idx].value ?
+ (value_is_array ? g_strjoinv (" | ", (char **) field_values[idx].value) : (char *) field_values[idx].value) :
+ (char *) not_set_str;
+
if (terse) {
if (escape) {
const char *p = value;
@@ -250,18 +351,19 @@ print_fields (const NmcPrintFields fields, const NmcOutputField field_values[])
p++;
}
}
- else
+ else
g_string_append_printf (str, "%s", value);
g_string_append_c (str, ':'); /* Column separator */
} else {
width1 = strlen (value);
width2 = nmc_string_screen_width (value, NULL); /* Width of the string (in screen colums) */
- if (strlen (value) == 0)
- value = "--";
- g_string_append_printf (str, "%-*s", field_values[idx].width + width1 - width2, value);
+ g_string_append_printf (str, "%-*s", field_values[idx].width + width1 - width2, strlen (value) > 0 ? value : "--");
g_string_append_c (str, ' '); /* Column separator */
table_width += field_values[idx].width + width1 - width2 + 1;
}
+
+ if (value_is_array && field_values[idx].value && !field_values)
+ g_free (value);
}
/* Print the main table header */
diff --git a/cli/src/utils.h b/cli/src/utils.h
index 467054a28..a22ae144d 100644
--- a/cli/src/utils.h
+++ b/cli/src/utils.h
@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2010 - 2011 Red Hat, Inc.
+ * (C) Copyright 2010 - 2012 Red Hat, Inc.
*/
#ifndef NMC_UTILS_H
@@ -28,7 +28,11 @@
int matches (const char *cmd, const char *pattern);
int next_arg (int *argc, char ***argv);
char *ssid_to_printable (const char *str, gsize len);
+char *nmc_ip4_address_as_string (guint32 ip, GError **error);
+char *nmc_ip6_address_as_string (const struct in6_addr *ip, GError **error);
int nmc_string_screen_width (const char *start, const char *end);
+void set_val_str (NmcOutputField fields_array[], guint32 index, const char *value);
+void set_val_arr (NmcOutputField fields_array[], guint32 index, const char **value);
GArray *parse_output_fields (const char *fields_str, const NmcOutputField fields_array[], GError **error);
gboolean nmc_terse_option_check (NMCPrintOutput print_output, const char *fields, GError **error);
void print_fields (const NmcPrintFields fields, const NmcOutputField field_values[]);
diff --git a/config.h.in b/config.h.in
index 2a002e918..2bd16ce80 100644
--- a/config.h.in
+++ b/config.h.in
@@ -107,6 +107,12 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define if you have VLAN_FLAG_LOOSE_BINDING */
+#undef HAVE_VLAN_FLAG_LOOSE_BINDING
+
+/* Define if you have Linux Wireless Extensions support */
+#undef HAVE_WEXT
+
/* Define to path of iptables binary */
#undef IPTABLES_PATH
@@ -123,9 +129,6 @@
/* Define the distribution version string */
#undef NM_DIST_VERSION
-/* Define to disable use of ConsoleKit */
-#undef NO_CONSOLEKIT
-
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
@@ -171,6 +174,9 @@
/* Define if you have Frugalware */
#undef TARGET_FRUGALWARE
+/* Define for a general unknown Linux system */
+#undef TARGET_GENERIC
+
/* Define if you have Gentoo */
#undef TARGET_GENTOO
@@ -223,6 +229,9 @@
/* Version number of package */
#undef VERSION
+/* Define if you want connectivity checking support */
+#undef WITH_CONCHECK
+
/* Define if you have PolicyKit support */
#undef WITH_POLKIT
diff --git a/configure b/configure
index 7e31eb6eb..3663c6819 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for NetworkManager 0.9.2.0.
+# Generated by GNU Autoconf 2.68 for NetworkManager 0.9.4.0.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager>.
#
@@ -571,8 +571,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='NetworkManager'
PACKAGE_TARNAME='NetworkManager'
-PACKAGE_VERSION='0.9.2.0'
-PACKAGE_STRING='NetworkManager 0.9.2.0'
+PACKAGE_VERSION='0.9.4.0'
+PACKAGE_STRING='NetworkManager 0.9.4.0'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager'
PACKAGE_URL=''
@@ -634,6 +634,10 @@ HTML_DIR
GTKDOC_MKPDF
GTKDOC_REBASE
GTKDOC_CHECK
+WITH_CONCHECK_FALSE
+WITH_CONCHECK_TRUE
+LIBSOUP_LIBS
+LIBSOUP_CFLAGS
KERNEL_FIRMWARE_DIR
SYSTEM_CA_PATH
IPTABLES_PATH
@@ -645,7 +649,9 @@ PPPD_PLUGIN_DIR
WITH_PPP_FALSE
WITH_PPP_TRUE
DBUS_SYS_DIR
+GLIB_MKENUMS
GLIB_GENMARSHAL
+GLIB_MAKEFILE
WITH_GNUTLS_FALSE
WITH_GNUTLS_TRUE
WITH_NSS_FALSE
@@ -674,18 +680,25 @@ LIBNL1_LIBS
LIBNL1_CFLAGS
LIBNL2_LIBS
LIBNL2_CFLAGS
+LIBNL_GENL3_LIBS
+LIBNL_GENL3_CFLAGS
LIBNL_ROUTE3_LIBS
LIBNL_ROUTE3_CFLAGS
LIBNL3_LIBS
LIBNL3_CFLAGS
-WITH_CONSOLEKIT_FALSE
-WITH_CONSOLEKIT_TRUE
+SESSION_TRACKING_SYSTEMD_FALSE
+SESSION_TRACKING_SYSTEMD_TRUE
+SESSION_TRACKING_CK_FALSE
+SESSION_TRACKING_CK_TRUE
+SYSTEMD_LIBS
+SYSTEMD_CFLAGS
HAVE_SYSTEMD_FALSE
HAVE_SYSTEMD_TRUE
systemdsystemunitdir
UDEV_BASE_DIR
WITH_QT_FALSE
WITH_QT_TRUE
+MOC
QT_LIBS
QT_CFLAGS
HAVE_INTROSPECTION_FALSE
@@ -713,6 +726,8 @@ PKG_CONFIG_PATH
PKG_CONFIG
LIBDL
LIBM
+WITH_WEXT_FALSE
+WITH_WEXT_TRUE
TARGET_EXHERBO_FALSE
TARGET_EXHERBO_TRUE
TARGET_LINEXA_FALSE
@@ -737,6 +752,8 @@ TARGET_SUSE_FALSE
TARGET_SUSE_TRUE
TARGET_REDHAT_FALSE
TARGET_REDHAT_TRUE
+TARGET_GENERIC_FALSE
+TARGET_GENERIC_TRUE
WITH_DOCS_FALSE
WITH_DOCS_TRUE
GETTEXT_PACKAGE
@@ -927,11 +944,12 @@ with_libintl_prefix
with_docs
with_distro
with_dist_version
+with_wext
enable_introspection
enable_qt
with_udev_dir
with_systemdsystemunitdir
-with_ck
+with_session_tracking
enable_wimax
enable_polkit
with_crypto
@@ -945,6 +963,7 @@ with_iptables
with_system_ca_path
with_kernel_firmware_dir
enable_crashtrace
+enable_concheck
enable_more_warnings
with_html_dir
enable_gtk_doc
@@ -980,10 +999,14 @@ GIO_CFLAGS
GIO_LIBS
QT_CFLAGS
QT_LIBS
+SYSTEMD_CFLAGS
+SYSTEMD_LIBS
LIBNL3_CFLAGS
LIBNL3_LIBS
LIBNL_ROUTE3_CFLAGS
LIBNL_ROUTE3_LIBS
+LIBNL_GENL3_CFLAGS
+LIBNL_GENL3_LIBS
LIBNL2_CFLAGS
LIBNL2_LIBS
LIBNL1_CFLAGS
@@ -998,6 +1021,8 @@ NSS_CFLAGS
NSS_LIBS
GNUTLS_CFLAGS
GNUTLS_LIBS
+LIBSOUP_CFLAGS
+LIBSOUP_LIBS
GTKDOC_DEPS_CFLAGS
GTKDOC_DEPS_LIBS'
@@ -1542,7 +1567,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures NetworkManager 0.9.2.0 to adapt to many kinds of systems.
+\`configure' configures NetworkManager 0.9.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1612,7 +1637,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of NetworkManager 0.9.2.0:";;
+ short | recursive ) echo "Configuration of NetworkManager 0.9.4.0:";;
esac
cat <<\_ACEOF
@@ -1640,7 +1665,8 @@ Optional Features:
--enable-polkit enable PolicyKit support
--enable-ppp enable PPP/PPPoE support
--disable-crashtrace Disable GNU backtrace extensions
- --enable-more-warnings Maximum compiler warnings
+ --enable-concheck enable connectivity checking support
+ --enable-more-warnings Possible values: no/yes/error
--enable-gtk-doc use gtk-doc to build documentation [[default=no]]
--enable-gtk-doc-html build documentation in html format [[default=yes]]
--enable-gtk-doc-pdf build documentation in pdf format [[default=no]]
@@ -1664,11 +1690,13 @@ Optional Packages:
paldo, mandriva, pardus, linexa or exherbo
--with-dist-version=<NM-distribution-version>
Define the NM's distribution version string
+ --with-wext=yes Enable or disable Linux Wireless Extensions
--with-udev-dir=DIR where the udev base directory is
--with-systemdsystemunitdir=DIR
Directory for systemd service files
- --without-ck Build NetworkManager without ConsoleKit session
- tracking support
+ --with-session-tracking=systemd
+ Build NetworkManager with specific session tracking
+ support
--with-crypto=nss | gnutls
Cryptography library to use for certificate and key
operations
@@ -1723,6 +1751,10 @@ Some influential environment variables:
GIO_LIBS linker flags for GIO, overriding pkg-config
QT_CFLAGS C compiler flags for QT, overriding pkg-config
QT_LIBS linker flags for QT, overriding pkg-config
+ SYSTEMD_CFLAGS
+ C compiler flags for SYSTEMD, overriding pkg-config
+ SYSTEMD_LIBS
+ linker flags for SYSTEMD, overriding pkg-config
LIBNL3_CFLAGS
C compiler flags for LIBNL3, overriding pkg-config
LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config
@@ -1730,6 +1762,10 @@ Some influential environment variables:
C compiler flags for LIBNL_ROUTE3, overriding pkg-config
LIBNL_ROUTE3_LIBS
linker flags for LIBNL_ROUTE3, overriding pkg-config
+ LIBNL_GENL3_CFLAGS
+ C compiler flags for LIBNL_GENL3, overriding pkg-config
+ LIBNL_GENL3_LIBS
+ linker flags for LIBNL_GENL3, overriding pkg-config
LIBNL2_CFLAGS
C compiler flags for LIBNL2, overriding pkg-config
LIBNL2_LIBS linker flags for LIBNL2, overriding pkg-config
@@ -1750,6 +1786,10 @@ Some influential environment variables:
GNUTLS_CFLAGS
C compiler flags for GNUTLS, overriding pkg-config
GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
+ LIBSOUP_CFLAGS
+ C compiler flags for LIBSOUP, overriding pkg-config
+ LIBSOUP_LIBS
+ linker flags for LIBSOUP, overriding pkg-config
GTKDOC_DEPS_CFLAGS
C compiler flags for GTKDOC_DEPS, overriding pkg-config
GTKDOC_DEPS_LIBS
@@ -1821,7 +1861,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-NetworkManager configure 0.9.2.0
+NetworkManager configure 0.9.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2365,7 +2405,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by NetworkManager $as_me 0.9.2.0, which was
+It was created by NetworkManager $as_me 0.9.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3186,7 +3226,7 @@ fi
# Define the identity of the package.
PACKAGE='NetworkManager'
- VERSION='0.9.2.0'
+ VERSION='0.9.4.0'
cat >>confdefs.h <<_ACEOF
@@ -16313,8 +16353,8 @@ fi
NM_MAJOR_VERSION=0
NM_MINOR_VERSION=9
-NM_MICRO_VERSION=2
-NM_VERSION=0.9.2.0
+NM_MICRO_VERSION=4
+NM_VERSION=0.9.4.0
@@ -19573,7 +19613,7 @@ if test "z$with_distro" = "z"; then
exit 1
else
case $with_distro in
- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;;
+ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic) ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
@@ -19581,6 +19621,20 @@ else
esac
fi
+ if test x"$with_distro" = xgeneric; then
+ TARGET_GENERIC_TRUE=
+ TARGET_GENERIC_FALSE='#'
+else
+ TARGET_GENERIC_TRUE='#'
+ TARGET_GENERIC_FALSE=
+fi
+
+if test x"$with_distro" = xgeneric; then
+
+$as_echo "#define TARGET_GENERIC 1" >>confdefs.h
+
+fi
+
if test x"$with_distro" = xredhat; then
TARGET_REDHAT_TRUE=
TARGET_REDHAT_FALSE='#'
@@ -19765,8 +19819,66 @@ _ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux Wireless Extensions >= 18" >&5
-$as_echo_n "checking Linux Wireless Extensions >= 18... " >&6; }
+
+# Check whether --with-wext was given.
+if test "${with_wext+set}" = set; then :
+ withval=$with_wext; ac_with_wext=$withval
+else
+ ac_with_wext="yes"
+fi
+
+if test x"$ac_with_wext" = x"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel WEXT headers" >&5
+$as_echo_n "checking Linux kernel WEXT headers... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __user
+ #define __user
+ #endif
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #include <sys/socket.h>
+ #include <linux/wireless.h>
+int
+main ()
+{
+#ifndef IWEVGENIE
+ #error "not found"
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_have_iwevgenie=yes
+else
+ ac_have_iwevgenie=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_iwevgenie" >&5
+$as_echo "$ac_have_iwevgenie" >&6; }
+ if test "$ac_have_iwevgenie" = no; then
+ as_fn_error $? "Linux kernel development header linux/wireless.h not installed or not functional" "$LINENO" 5
+ fi
+
+$as_echo "#define HAVE_WEXT 1" >>confdefs.h
+
+else
+
+$as_echo "#define HAVE_WEXT 0" >>confdefs.h
+
+fi
+ if test x"${ac_with_wext}" = x"yes"; then
+ WITH_WEXT_TRUE=
+ WITH_WEXT_FALSE='#'
+else
+ WITH_WEXT_TRUE='#'
+ WITH_WEXT_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel nl80211 headers" >&5
+$as_echo_n "checking Linux kernel nl80211 headers... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __user
@@ -19775,28 +19887,61 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <sys/types.h>
#include <linux/types.h>
#include <sys/socket.h>
- #include <net/if.h>
- #include <wireless.h>
+ #include <linux/nl80211.h>
int
main ()
{
-#ifndef IWEVGENIE
- #error "not found"
+int a = NL80211_RATE_INFO_BITRATE;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_have_nl80211=yes
+else
+ ac_have_nl80211=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_nl80211" >&5
+$as_echo "$ac_have_nl80211" >&6; }
+if test "$ac_have_nl80211" = no; then
+ as_fn_error $? "Linux kernel development header linux/nl80211.h not installed or not functional" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel VLAN_FLAG_LOOSE_BINDING enum value" >&5
+$as_echo_n "checking Linux kernel VLAN_FLAG_LOOSE_BINDING enum value... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __user
+ #define __user
#endif
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #include <linux/if_vlan.h>
+int
+main ()
+{
+unsigned int a = VLAN_FLAG_LOOSE_BINDING;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ac_have_iwevgenie=yes
+ ac_have_vlan_flag_loose_binding=yes
else
- ac_have_iwevgenie=no
+ ac_have_vlan_flag_loose_binding=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_iwevgenie" >&5
-$as_echo "$ac_have_iwevgenie" >&6; }
-if test "$ac_have_iwevgenie" = no; then
- as_fn_error $? "wireless-tools or libiw development headers >= 28pre9 not installed or not functional" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_vlan_flag_loose_binding" >&5
+$as_echo "$ac_have_vlan_flag_loose_binding" >&6; }
+if test "$ac_have_vlan_flag_loose_binding" = yes; then
+
+$as_echo "#define HAVE_VLAN_FLAG_LOOSE_BINDING 1" >>confdefs.h
+
+else
+
+$as_echo "#define HAVE_VLAN_FLAG_LOOSE_BINDING 0" >>confdefs.h
+
fi
LIBM=
@@ -20790,6 +20935,51 @@ if (test "${enable_qt}" = "yes"); then
fi
+ # Check for moc-qt4 and if not found then moc
+ QT4_BINDIR=`$PKG_CONFIG Qt --variable bindir`
+ for ac_prog in moc-qt4 moc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MOC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MOC"; then
+ ac_cv_prog_MOC="$MOC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$QT4_BINDIR:$PATH"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MOC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MOC=$ac_cv_prog_MOC
+if test -n "$MOC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
+$as_echo "$MOC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$MOC" && break
+done
+
fi
if test "${enable_qt}" = "yes"; then
WITH_QT_TRUE=
@@ -20814,7 +21004,7 @@ else
fi
-# systemd
+# systemd unit support
# Check whether --with-systemdsystemunitdir was given.
if test "${with_systemdsystemunitdir+set}" = set; then :
@@ -20837,29 +21027,133 @@ fi
-# Check whether --with-ck was given.
-if test "${with_ck+set}" = set; then :
- withval=$with_ck;
+# Check whether --with-session-tracking was given.
+if test "${with_session_tracking+set}" = set; then :
+ withval=$with_session_tracking;
fi
- if test x"$with_ck" != xno; then
- WITH_CONSOLEKIT_TRUE=
- WITH_CONSOLEKIT_FALSE='#'
+if test "z$with_session_tracking" = "z"; then
+ # Default to ConsoleKit session tracking like we used before
+ with_session_tracking=ck
+fi
+
+case $with_session_tracking in
+ ck|none) ;;
+ systemd)
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
+$as_echo_n "checking for SYSTEMD... " >&6; }
+
+if test -n "$SYSTEMD_CFLAGS"; then
+ pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsystemd-login") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-login" 2>/dev/null`
else
- WITH_CONSOLEKIT_TRUE='#'
- WITH_CONSOLEKIT_FALSE=
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$SYSTEMD_LIBS"; then
+ pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsystemd-login") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-login" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
-no_ck=0
-if test x"$with_ck" = x"no"; then
- no_ck="1"
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- with_ck="yes"
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsystemd-login" 2>&1`
+ else
+ SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsystemd-login" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$SYSTEMD_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libsystemd-login) were not met:
+
+$SYSTEMD_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SYSTEMD_CFLAGS
+and SYSTEMD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SYSTEMD_CFLAGS
+and SYSTEMD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+
+else
+ SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
+ SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+ ;;
+ *)
+ as_fn_error $? "--with-session-tracking must be one of none, ck, systemd" "$LINENO" 5
+ ;;
+esac
+
+
+ if test "x$with_session_tracking" = "xck"; then
+ SESSION_TRACKING_CK_TRUE=
+ SESSION_TRACKING_CK_FALSE='#'
+else
+ SESSION_TRACKING_CK_TRUE='#'
+ SESSION_TRACKING_CK_FALSE=
+fi
+
+ if test "x$with_session_tracking" = "xsystemd"; then
+ SESSION_TRACKING_SYSTEMD_TRUE=
+ SESSION_TRACKING_SYSTEMD_FALSE='#'
+else
+ SESSION_TRACKING_SYSTEMD_TRUE='#'
+ SESSION_TRACKING_SYSTEMD_FALSE=
fi
-cat >>confdefs.h <<_ACEOF
-#define NO_CONSOLEKIT $no_ck
-_ACEOF
have_libnl="no"
@@ -21001,12 +21295,81 @@ else
$as_echo "yes" >&6; }
have_libnl_route3=yes
fi
-if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL_GENL3" >&5
+$as_echo_n "checking for LIBNL_GENL3... " >&6; }
+
+if test -n "$LIBNL_GENL3_CFLAGS"; then
+ pkg_cv_LIBNL_GENL3_CFLAGS="$LIBNL_GENL3_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBNL_GENL3_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBNL_GENL3_LIBS"; then
+ pkg_cv_LIBNL_GENL3_LIBS="$LIBNL_GENL3_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBNL_GENL3_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBNL_GENL3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-genl-3.0" 2>&1`
+ else
+ LIBNL_GENL3_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-genl-3.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBNL_GENL3_PKG_ERRORS" >&5
+
+ have_libnl_genl3=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_libnl_genl3=no
+else
+ LIBNL_GENL3_CFLAGS=$pkg_cv_LIBNL_GENL3_CFLAGS
+ LIBNL_GENL3_LIBS=$pkg_cv_LIBNL_GENL3_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libnl_genl3=yes
+fi
+if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes" -a "${have_libnl_genl3}" = "yes"); then
$as_echo "#define HAVE_LIBNL3 1" >>confdefs.h
- LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS"
- LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS"
+ LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS $LIBNL_GENL3_CFLAGS"
+ LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS $LIBNL_GENL3_LIBS"
libnl_version="3"
have_libnl="yes"
else
@@ -21893,8 +22256,12 @@ if test x"$ac_nss" = xno -a x"$ac_gnutls" = xno; then
as_fn_error $? "Could not find required development headers and libraries for '$ac_crypto'" "$LINENO" 5
fi
+GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
+
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
+GLIB_MKENUMS='$(top_srcdir)/tools/glib-mkenums'
+
# Check whether --with-dbus-sys-dir was given.
@@ -22225,11 +22592,110 @@ $as_echo "#define ENABLE_CRASHTRACE 1" >>confdefs.h
fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSOUP" >&5
+$as_echo_n "checking for LIBSOUP... " >&6; }
+
+if test -n "$LIBSOUP_CFLAGS"; then
+ pkg_cv_LIBSOUP_CFLAGS="$LIBSOUP_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.26\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.26") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBSOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4 >= 2.26" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBSOUP_LIBS"; then
+ pkg_cv_LIBSOUP_LIBS="$LIBSOUP_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.26\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.26") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBSOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4 >= 2.26" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBSOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsoup-2.4 >= 2.26" 2>&1`
+ else
+ LIBSOUP_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsoup-2.4 >= 2.26" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBSOUP_PKG_ERRORS" >&5
+
+ have_libsoup=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_libsoup=no
+else
+ LIBSOUP_CFLAGS=$pkg_cv_LIBSOUP_CFLAGS
+ LIBSOUP_LIBS=$pkg_cv_LIBSOUP_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libsoup=yes
+fi
+# Check whether --enable-concheck was given.
+if test "${enable_concheck+set}" = set; then :
+ enableval=$enable_concheck; enable_concheck=${enableval}
+else
+ enable_concheck=${have_libsoup}
+fi
+
+if (test "${enable_concheck}" = "yes"); then
+ if test x"$have_concheck" = x"no"; then
+ as_fn_error $? "Connectivity checking requires libsoup development headers" "$LINENO" 5
+ fi
+
+
+
+$as_echo "#define WITH_CONCHECK 1" >>confdefs.h
+
+else
+
+$as_echo "#define WITH_CONCHECK 0" >>confdefs.h
+
+fi
+ if test "${enable_concheck}" = "yes"; then
+ WITH_CONCHECK_TRUE=
+ WITH_CONCHECK_FALSE='#'
+else
+ WITH_CONCHECK_TRUE='#'
+ WITH_CONCHECK_FALSE=
+fi
+
+
# Check whether --enable-more-warnings was given.
if test "${enable_more_warnings+set}" = set; then :
enableval=$enable_more_warnings; set_more_warnings="$enableval"
else
- set_more_warnings=yes
+ set_more_warnings=error
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for more warnings" >&5
@@ -22274,7 +22740,9 @@ $as_echo "$has_option" >&6; }
unset SAVE_CFLAGS
done
unset option
- CFLAGS="$CFLAGS -Werror"
+ if test "x$set_more_warnings" = xerror; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -22627,7 +23095,7 @@ case $with_tests in
esac
-ac_config_files="$ac_config_files Makefile include/Makefile include/nm-version.h src/Makefile src/tests/Makefile marshallers/Makefile src/logging/Makefile src/dns-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile src/dhcp-manager/tests/Makefile src/ip6-manager/Makefile src/supplicant-manager/Makefile src/supplicant-manager/tests/Makefile src/ppp-manager/Makefile src/dnsmasq-manager/Makefile src/modem-manager/Makefile src/bluez-manager/Makefile src/settings/Makefile src/settings/plugins/Makefile src/settings/plugins/ifupdown/Makefile src/settings/plugins/ifupdown/tests/Makefile src/settings/plugins/ifnet/Makefile src/settings/plugins/ifnet/tests/Makefile src/settings/plugins/ifcfg-rh/Makefile src/settings/plugins/ifcfg-rh/tests/Makefile src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile src/settings/plugins/ifcfg-suse/Makefile src/settings/plugins/keyfile/Makefile src/settings/plugins/keyfile/tests/Makefile src/settings/plugins/keyfile/tests/keyfiles/Makefile src/settings/tests/Makefile src/wimax/Makefile src/backends/Makefile libnm-util/libnm-util.pc libnm-util/Makefile libnm-util/tests/Makefile libnm-util/tests/certs/Makefile libnm-glib/libnm-glib.pc libnm-glib/libnm-glib-vpn.pc libnm-glib/Makefile libnm-glib/tests/Makefile callouts/Makefile callouts/tests/Makefile tools/Makefile cli/Makefile cli/src/Makefile test/Makefile initscript/Makefile initscript/RedHat/Makefile initscript/RedHat/NetworkManager initscript/Gentoo/Makefile initscript/Gentoo/NetworkManager initscript/Debian/Makefile initscript/Debian/NetworkManager initscript/Slackware/Makefile initscript/Slackware/rc.networkmanager initscript/SUSE/Makefile initscript/SUSE/networkmanager initscript/Arch/Makefile initscript/Arch/networkmanager initscript/paldo/Makefile initscript/paldo/NetworkManager initscript/Mandriva/Makefile initscript/Mandriva/networkmanager initscript/linexa/Makefile initscript/linexa/networkmanager introspection/Makefile introspection/all.xml man/Makefile man/NetworkManager.8 man/NetworkManager.conf.5 man/nm-system-settings.conf.5 man/nm-tool.1 man/nm-online.1 man/nmcli.1 po/Makefile.in policy/Makefile data/Makefile docs/Makefile docs/api/Makefile docs/api/version.xml docs/libnm-glib/Makefile docs/libnm-util/Makefile NetworkManager.pc examples/Makefile examples/python/Makefile examples/C/Makefile examples/C/glib/Makefile examples/C/qt/Makefile"
+ac_config_files="$ac_config_files Makefile include/Makefile include/nm-version.h src/Makefile src/tests/Makefile src/generated/Makefile src/logging/Makefile src/dns-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile src/dhcp-manager/tests/Makefile src/ip6-manager/Makefile src/supplicant-manager/Makefile src/supplicant-manager/tests/Makefile src/ppp-manager/Makefile src/dnsmasq-manager/Makefile src/modem-manager/Makefile src/bluez-manager/Makefile src/wifi/Makefile src/firewall-manager/Makefile src/settings/Makefile src/settings/plugins/Makefile src/settings/plugins/ifupdown/Makefile src/settings/plugins/ifupdown/tests/Makefile src/settings/plugins/ifnet/Makefile src/settings/plugins/ifnet/tests/Makefile src/settings/plugins/ifcfg-rh/Makefile src/settings/plugins/ifcfg-rh/tests/Makefile src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile src/settings/plugins/ifcfg-suse/Makefile src/settings/plugins/keyfile/Makefile src/settings/plugins/keyfile/tests/Makefile src/settings/plugins/keyfile/tests/keyfiles/Makefile src/settings/tests/Makefile src/wimax/Makefile src/backends/Makefile libnm-util/libnm-util.pc libnm-util/Makefile libnm-util/tests/Makefile libnm-util/tests/certs/Makefile libnm-glib/libnm-glib.pc libnm-glib/libnm-glib-vpn.pc libnm-glib/Makefile libnm-glib/tests/Makefile callouts/Makefile callouts/tests/Makefile tools/Makefile cli/Makefile cli/src/Makefile test/Makefile initscript/Makefile initscript/RedHat/Makefile initscript/RedHat/NetworkManager initscript/Gentoo/Makefile initscript/Gentoo/NetworkManager initscript/Debian/Makefile initscript/Debian/NetworkManager initscript/Slackware/Makefile initscript/Slackware/rc.networkmanager initscript/SUSE/Makefile initscript/SUSE/networkmanager initscript/Arch/Makefile initscript/Arch/networkmanager initscript/paldo/Makefile initscript/paldo/NetworkManager initscript/Mandriva/Makefile initscript/Mandriva/networkmanager initscript/linexa/Makefile initscript/linexa/networkmanager introspection/Makefile introspection/all.xml man/Makefile man/NetworkManager.8 man/NetworkManager.conf.5 man/nm-system-settings.conf.5 man/nm-tool.1 man/nm-online.1 man/nmcli.1 po/Makefile.in policy/Makefile data/Makefile docs/Makefile docs/api/Makefile docs/api/version.xml docs/libnm-glib/Makefile docs/libnm-util/Makefile NetworkManager.pc examples/Makefile examples/shell/Makefile examples/python/Makefile examples/ruby/Makefile examples/C/Makefile examples/C/glib/Makefile examples/C/qt/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -22775,6 +23243,10 @@ if test -z "${WITH_DOCS_TRUE}" && test -z "${WITH_DOCS_FALSE}"; then
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${TARGET_GENERIC_TRUE}" && test -z "${TARGET_GENERIC_FALSE}"; then
+ as_fn_error $? "conditional \"TARGET_GENERIC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${TARGET_REDHAT_TRUE}" && test -z "${TARGET_REDHAT_FALSE}"; then
as_fn_error $? "conditional \"TARGET_REDHAT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -22823,6 +23295,10 @@ if test -z "${TARGET_EXHERBO_TRUE}" && test -z "${TARGET_EXHERBO_FALSE}"; then
as_fn_error $? "conditional \"TARGET_EXHERBO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WITH_WEXT_TRUE}" && test -z "${WITH_WEXT_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_WEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then
as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -22835,8 +23311,12 @@ if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then
as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${WITH_CONSOLEKIT_TRUE}" && test -z "${WITH_CONSOLEKIT_FALSE}"; then
- as_fn_error $? "conditional \"WITH_CONSOLEKIT\" was never defined.
+if test -z "${SESSION_TRACKING_CK_TRUE}" && test -z "${SESSION_TRACKING_CK_FALSE}"; then
+ as_fn_error $? "conditional \"SESSION_TRACKING_CK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SESSION_TRACKING_SYSTEMD_TRUE}" && test -z "${SESSION_TRACKING_SYSTEMD_FALSE}"; then
+ as_fn_error $? "conditional \"SESSION_TRACKING_SYSTEMD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_WIMAX_TRUE}" && test -z "${WITH_WIMAX_FALSE}"; then
@@ -22859,6 +23339,10 @@ if test -z "${WITH_PPP_TRUE}" && test -z "${WITH_PPP_FALSE}"; then
as_fn_error $? "conditional \"WITH_PPP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WITH_CONCHECK_TRUE}" && test -z "${WITH_CONCHECK_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_CONCHECK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -23292,7 +23776,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by NetworkManager $as_me 0.9.2.0, which was
+This file was extended by NetworkManager $as_me 0.9.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23358,7 +23842,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-NetworkManager config.status 0.9.2.0
+NetworkManager config.status 0.9.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -23880,7 +24364,7 @@ do
"include/nm-version.h") CONFIG_FILES="$CONFIG_FILES include/nm-version.h" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
- "marshallers/Makefile") CONFIG_FILES="$CONFIG_FILES marshallers/Makefile" ;;
+ "src/generated/Makefile") CONFIG_FILES="$CONFIG_FILES src/generated/Makefile" ;;
"src/logging/Makefile") CONFIG_FILES="$CONFIG_FILES src/logging/Makefile" ;;
"src/dns-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/dns-manager/Makefile" ;;
"src/vpn-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/vpn-manager/Makefile" ;;
@@ -23893,6 +24377,8 @@ do
"src/dnsmasq-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/dnsmasq-manager/Makefile" ;;
"src/modem-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/modem-manager/Makefile" ;;
"src/bluez-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/bluez-manager/Makefile" ;;
+ "src/wifi/Makefile") CONFIG_FILES="$CONFIG_FILES src/wifi/Makefile" ;;
+ "src/firewall-manager/Makefile") CONFIG_FILES="$CONFIG_FILES src/firewall-manager/Makefile" ;;
"src/settings/Makefile") CONFIG_FILES="$CONFIG_FILES src/settings/Makefile" ;;
"src/settings/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/settings/plugins/Makefile" ;;
"src/settings/plugins/ifupdown/Makefile") CONFIG_FILES="$CONFIG_FILES src/settings/plugins/ifupdown/Makefile" ;;
@@ -23961,7 +24447,9 @@ do
"docs/libnm-util/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libnm-util/Makefile" ;;
"NetworkManager.pc") CONFIG_FILES="$CONFIG_FILES NetworkManager.pc" ;;
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+ "examples/shell/Makefile") CONFIG_FILES="$CONFIG_FILES examples/shell/Makefile" ;;
"examples/python/Makefile") CONFIG_FILES="$CONFIG_FILES examples/python/Makefile" ;;
+ "examples/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES examples/ruby/Makefile" ;;
"examples/C/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/Makefile" ;;
"examples/C/glib/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/glib/Makefile" ;;
"examples/C/qt/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/qt/Makefile" ;;
@@ -25650,9 +26138,9 @@ else
fi
if test -n "${with_systemdsystemunitdir}"; then
- echo systemd support: ${with_systemdsystemunitdir}
+ echo systemd unit support: ${with_systemdsystemunitdir}
else
- echo systemd support: no
+ echo systemd unit support: no
fi
if test "${enable_polkit}" = "yes"; then
@@ -25661,11 +26149,7 @@ else
echo PolicyKit support: no
fi
-if test -n "${with_ck}"; then
- echo ConsoleKit support: ${with_ck}
-else
- echo ConsoleKit support: no
-fi
+ echo Session tracking: ${with_session_tracking}
if test "${enable_wimax}" = "yes"; then
echo WiMAX support: yes
@@ -25679,6 +26163,12 @@ else
echo PPP support: no
fi
+if test "${enable_concheck}" = "yes"; then
+ echo Connectivity checking support: yes
+else
+ echo Connectivity checking support: no
+fi
+
echo libnl version: ${libnl_version}
echo
diff --git a/configure.ac b/configure.ac
index 1822f84f4..ed66b3d8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.63])
dnl The NM version number
m4_define([nm_major_version], [0])
m4_define([nm_minor_version], [9])
-m4_define([nm_micro_version], [2])
+m4_define([nm_micro_version], [4])
m4_define([nm_nano_version], [0])
m4_define([nm_version],
[nm_major_version.nm_minor_version.nm_micro_version.nm_nano_version])
@@ -132,7 +132,7 @@ if test "z$with_distro" = "z"; then
exit 1
else
case $with_distro in
- redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;;
+ redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic) ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
@@ -140,6 +140,11 @@ else
esac
fi
+AM_CONDITIONAL(TARGET_GENERIC, test x"$with_distro" = xgeneric)
+if test x"$with_distro" = xgeneric; then
+ AC_DEFINE(TARGET_GENERIC, 1, [Define for a general unknown Linux system])
+fi
+
AM_CONDITIONAL(TARGET_REDHAT, test x"$with_distro" = xredhat)
if test x"$with_distro" = xredhat; then
AC_DEFINE(TARGET_REDHAT, 1, [Define if you have Fedora or RHEL])
@@ -208,7 +213,37 @@ if ! test x"$ac_distver" = x""; then
AC_DEFINE_UNQUOTED(NM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
fi
-AC_MSG_CHECKING([Linux Wireless Extensions >= 18])
+dnl
+dnl Default to using WEXT but allow it to be disabled
+dnl
+AC_ARG_WITH(wext, AS_HELP_STRING([--with-wext=yes], [Enable or disable Linux Wireless Extensions]), ac_with_wext=$withval, ac_with_wext="yes")
+if test x"$ac_with_wext" = x"yes"; then
+ AC_MSG_CHECKING([Linux kernel WEXT headers])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#ifndef __user
+ #define __user
+ #endif
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #include <sys/socket.h>
+ #include <linux/wireless.h>]],
+ [[#ifndef IWEVGENIE
+ #error "not found"
+ #endif]])],
+ [ac_have_iwevgenie=yes],
+ [ac_have_iwevgenie=no])
+ AC_MSG_RESULT($ac_have_iwevgenie)
+ if test "$ac_have_iwevgenie" = no; then
+ AC_MSG_ERROR(Linux kernel development header linux/wireless.h not installed or not functional)
+ fi
+ AC_DEFINE(HAVE_WEXT, 1, [Define if you have Linux Wireless Extensions support])
+else
+ AC_DEFINE(HAVE_WEXT, 0, [Define if you have Linux Wireless Extensions support])
+fi
+AM_CONDITIONAL(WITH_WEXT, test x"${ac_with_wext}" = x"yes")
+
+AC_MSG_CHECKING([Linux kernel nl80211 headers])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#ifndef __user
@@ -217,16 +252,35 @@ AC_COMPILE_IFELSE(
#include <sys/types.h>
#include <linux/types.h>
#include <sys/socket.h>
- #include <net/if.h>
- #include <wireless.h>]],
- [[#ifndef IWEVGENIE
- #error "not found"
- #endif]])],
- [ac_have_iwevgenie=yes],
- [ac_have_iwevgenie=no])
-AC_MSG_RESULT($ac_have_iwevgenie)
-if test "$ac_have_iwevgenie" = no; then
- AC_MSG_ERROR(wireless-tools or libiw development headers >= 28pre9 not installed or not functional)
+ #include <linux/nl80211.h>]],
+ [[int a = NL80211_RATE_INFO_BITRATE;]])],
+ [ac_have_nl80211=yes],
+ [ac_have_nl80211=no])
+AC_MSG_RESULT($ac_have_nl80211)
+if test "$ac_have_nl80211" = no; then
+ AC_MSG_ERROR(Linux kernel development header linux/nl80211.h not installed or not functional)
+fi
+
+dnl
+dnl Default to using WEXT but allow it to be disabled
+dnl
+AC_MSG_CHECKING([Linux kernel VLAN_FLAG_LOOSE_BINDING enum value])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#ifndef __user
+ #define __user
+ #endif
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #include <linux/if_vlan.h>]],
+ [[unsigned int a = VLAN_FLAG_LOOSE_BINDING;]])],
+ [ac_have_vlan_flag_loose_binding=yes],
+ [ac_have_vlan_flag_loose_binding=no])
+AC_MSG_RESULT($ac_have_vlan_flag_loose_binding)
+if test "$ac_have_vlan_flag_loose_binding" = yes; then
+ AC_DEFINE(HAVE_VLAN_FLAG_LOOSE_BINDING, 1, [Define if you have VLAN_FLAG_LOOSE_BINDING])
+else
+ AC_DEFINE(HAVE_VLAN_FLAG_LOOSE_BINDING, 0, [Define if you have VLAN_FLAG_LOOSE_BINDING])
fi
dnl
@@ -278,6 +332,9 @@ if (test "${enable_qt}" = "yes"); then
fi
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
+ # Check for moc-qt4 and if not found then moc
+ QT4_BINDIR=`$PKG_CONFIG Qt --variable bindir`
+ AC_CHECK_PROGS(MOC, [moc-qt4 moc],, [$QT4_BINDIR:$PATH])
fi
AM_CONDITIONAL(WITH_QT, test "${enable_qt}" = "yes")
@@ -290,7 +347,7 @@ else
fi
AC_SUBST(UDEV_BASE_DIR)
-# systemd
+# systemd unit support
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[],
@@ -300,26 +357,35 @@ if test "x$with_systemdsystemunitdir" != xno; then
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
-dnl
-dnl Disable ConsoleKit support
-dnl
-AC_ARG_WITH(ck, AS_HELP_STRING([--without-ck], [Build NetworkManager without ConsoleKit session tracking support]))
-AM_CONDITIONAL(WITH_CONSOLEKIT, test x"$with_ck" != xno)
-no_ck=0
-if test x"$with_ck" = x"no"; then
- no_ck="1"
-else
- with_ck="yes"
+AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd], [Build NetworkManager with specific session tracking support]))
+if test "z$with_session_tracking" = "z"; then
+ # Default to ConsoleKit session tracking like we used before
+ with_session_tracking=ck
fi
-AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
+
+case $with_session_tracking in
+ ck|none) ;;
+ systemd)
+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-login])
+ ;;
+ *)
+ AC_MSG_ERROR(--with-session-tracking must be one of [none, ck, systemd])
+ ;;
+esac
+AC_SUBST(SYSTEMD_CFLAGS)
+AC_SUBST(SYSTEMD_LIBS)
+AM_CONDITIONAL(SESSION_TRACKING_CK, test "x$with_session_tracking" = "xck")
+AM_CONDITIONAL(SESSION_TRACKING_SYSTEMD, test "x$with_session_tracking" = "xsystemd")
+
have_libnl="no"
PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
-if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then
+PKG_CHECK_MODULES(LIBNL_GENL3, libnl-genl-3.0, [have_libnl_genl3=yes], [have_libnl_genl3=no])
+if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes" -a "${have_libnl_genl3}" = "yes"); then
AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
- LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS"
- LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS"
+ LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS $LIBNL_GENL3_CFLAGS"
+ LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS $LIBNL_GENL3_LIBS"
libnl_version="3"
have_libnl="yes"
else
@@ -433,8 +499,12 @@ if test x"$ac_nss" = xno -a x"$ac_gnutls" = xno; then
AC_MSG_ERROR([Could not find required development headers and libraries for '$ac_crypto'])
fi
+GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
+AC_SUBST(GLIB_MAKEFILE)
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
+GLIB_MKENUMS='$(top_srcdir)/tools/glib-mkenums'
+AC_SUBST(GLIB_MKENUMS)
AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is]))
@@ -618,6 +688,21 @@ if test x"$enable_crashtrace" = xyes; then
AC_DEFINE(ENABLE_CRASHTRACE, 1, [Define if you have GNU backtrace extensions])
fi
+PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26], [have_libsoup=yes],[have_libsoup=no])
+AC_ARG_ENABLE(concheck, AS_HELP_STRING([--enable-concheck], [enable connectivity checking support]),
+ [enable_concheck=${enableval}], [enable_concheck=${have_libsoup}])
+if (test "${enable_concheck}" = "yes"); then
+ if test x"$have_concheck" = x"no"; then
+ AC_MSG_ERROR(Connectivity checking requires libsoup development headers)
+ fi
+ AC_SUBST(LIBSOUP_CFLAGS)
+ AC_SUBST(LIBSOUP_LIBS)
+ AC_DEFINE(WITH_CONCHECK, 1, [Define if you want connectivity checking support])
+else
+ AC_DEFINE(WITH_CONCHECK, 0, [Define if you want connectivity checking support])
+fi
+AM_CONDITIONAL(WITH_CONCHECK, test "${enable_concheck}" = "yes")
+
NM_COMPILER_WARNINGS
GTK_DOC_CHECK(1.0)
@@ -643,7 +728,7 @@ include/Makefile
include/nm-version.h
src/Makefile
src/tests/Makefile
-marshallers/Makefile
+src/generated/Makefile
src/logging/Makefile
src/dns-manager/Makefile
src/vpn-manager/Makefile
@@ -656,6 +741,8 @@ src/ppp-manager/Makefile
src/dnsmasq-manager/Makefile
src/modem-manager/Makefile
src/bluez-manager/Makefile
+src/wifi/Makefile
+src/firewall-manager/Makefile
src/settings/Makefile
src/settings/plugins/Makefile
src/settings/plugins/ifupdown/Makefile
@@ -724,7 +811,9 @@ docs/libnm-glib/Makefile
docs/libnm-util/Makefile
NetworkManager.pc
examples/Makefile
+examples/shell/Makefile
examples/python/Makefile
+examples/ruby/Makefile
examples/C/Makefile
examples/C/glib/Makefile
examples/C/qt/Makefile
@@ -751,9 +840,9 @@ else
fi
if test -n "${with_systemdsystemunitdir}"; then
- echo systemd support: ${with_systemdsystemunitdir}
+ echo systemd unit support: ${with_systemdsystemunitdir}
else
- echo systemd support: no
+ echo systemd unit support: no
fi
if test "${enable_polkit}" = "yes"; then
@@ -762,11 +851,7 @@ else
echo PolicyKit support: no
fi
-if test -n "${with_ck}"; then
- echo ConsoleKit support: ${with_ck}
-else
- echo ConsoleKit support: no
-fi
+ echo Session tracking: ${with_session_tracking}
if test "${enable_wimax}" = "yes"; then
echo WiMAX support: yes
@@ -780,6 +865,12 @@ else
echo PPP support: no
fi
+if test "${enable_concheck}" = "yes"; then
+ echo Connectivity checking support: yes
+else
+ echo Connectivity checking support: no
+fi
+
echo libnl version: ${libnl_version}
echo
diff --git a/data/Makefile.in b/data/Makefile.in
index 73947bd7c..44049fad3 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in
index bb169fb47..1198c1bad 100644
--- a/data/NetworkManager.service.in
+++ b/data/NetworkManager.service.in
@@ -8,6 +8,10 @@ Before=network.target
Type=dbus
BusName=org.freedesktop.NetworkManager
ExecStart=@sbindir@/NetworkManager --no-daemon
+# Suppress stderr to eliminate duplicated messages in syslog. NM calls openlog()
+# with LOG_PERROR when run in foreground. But systemd redirects stderr to
+# syslog by default, which results in logging each message twice.
+StandardError=null
[Install]
WantedBy=multi-user.target
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 651d76090..ab5c8c884 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -147,6 +147,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -201,11 +203,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -216,6 +222,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -255,6 +262,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am
index 276b4aefe..e061ec622 100644
--- a/docs/api/Makefile.am
+++ b/docs/api/Makefile.am
@@ -37,7 +37,7 @@ OTHER_FILES= \
GENERATED_FILES = spec.html settings-spec.xml
spec.html: $(XMLS) $(OTHER_FILES) html-build.stamp
- $(XSLTPROC) $(top_srcdir)/tools/doc-generator.xsl $(top_builddir)/introspection/all.xml > $@
+ $(XSLTPROC) --path "$(top_builddir)/introspection:$(top_srcdir)/introspection" $(top_srcdir)/tools/doc-generator.xsl $(top_builddir)/introspection/all.xml > $@
mkdir -p $(builddir)/html/
cp $@ $(builddir)/html/
diff --git a/docs/api/Makefile.in b/docs/api/Makefile.in
index cfb75153c..40f1784f5 100644
--- a/docs/api/Makefile.in
+++ b/docs/api/Makefile.in
@@ -151,6 +151,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -205,11 +207,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -220,6 +226,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -259,6 +266,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -742,7 +751,7 @@ uninstall-am: uninstall-local
@WITH_DOCS_TRUE@spec.html: $(XMLS) $(OTHER_FILES) html-build.stamp
-@WITH_DOCS_TRUE@ $(XSLTPROC) $(top_srcdir)/tools/doc-generator.xsl $(top_builddir)/introspection/all.xml > $@
+@WITH_DOCS_TRUE@ $(XSLTPROC) --path "$(top_builddir)/introspection:$(top_srcdir)/introspection" $(top_srcdir)/tools/doc-generator.xsl $(top_builddir)/introspection/all.xml > $@
@WITH_DOCS_TRUE@ mkdir -p $(builddir)/html/
@WITH_DOCS_TRUE@ cp $@ $(builddir)/html/
diff --git a/docs/api/generate-settings-spec.c b/docs/api/generate-settings-spec.c
index c37615b8e..7a540e3b4 100644
--- a/docs/api/generate-settings-spec.c
+++ b/docs/api/generate-settings-spec.c
@@ -46,6 +46,9 @@
#include <nm-setting-wired.h>
#include <nm-setting-wireless.h>
#include <nm-setting-wireless-security.h>
+#include <nm-setting-infiniband.h>
+#include <nm-setting-bond.h>
+#include <nm-setting-vlan.h>
#include <nm-utils.h>
@@ -54,15 +57,18 @@ typedef NMSetting* (*SettingNewFunc) (void);
static SettingNewFunc funcs[] = {
nm_setting_802_1x_new,
nm_setting_bluetooth_new,
+ nm_setting_bond_new,
nm_setting_cdma_new,
nm_setting_connection_new,
nm_setting_gsm_new,
+ nm_setting_infiniband_new,
nm_setting_ip4_config_new,
nm_setting_ip6_config_new,
nm_setting_olpc_mesh_new,
nm_setting_ppp_new,
nm_setting_pppoe_new,
nm_setting_serial_new,
+ nm_setting_vlan_new,
nm_setting_vpn_new,
nm_setting_wimax_new,
nm_setting_wired_new,
diff --git a/docs/api/html/NetworkManager.devhelp2 b/docs/api/html/NetworkManager.devhelp2
index b611186d9..ba5d51b32 100644
--- a/docs/api/html/NetworkManager.devhelp2
+++ b/docs/api/html/NetworkManager.devhelp2
@@ -4,23 +4,23 @@
<chapters>
<sub name="D-Bus API Reference" link="ref-dbus.html"/>
<sub name="Network Configuration Setting Specification" link="ref-settings.html">
- <sub name="Configuration Settings" link="ref-settings.html#id543085"/>
+ <sub name="Configuration Settings" link="ref-settings.html#id561824"/>
<sub name="Secret flag types" link="secrets-flags.html"/>
</sub>
<sub name="Migrating from NetworkManager 0.8 to NetworkManager 0.9" link="ref-migrating.html">
- <sub name="Architecture and D-Bus API Changes in 0.9" link="ref-migrating.html#id512495">
- <sub name="Elimination of the User Settings Service" link="ref-migrating.html#id526099"/>
- <sub name="User Secret Agents" link="ref-migrating.html#id524364"/>
- <sub name="Settings Service Interface Changes" link="ref-migrating.html#id537045"/>
- <sub name="Connection Object Interface Changes" link="ref-migrating.html#id535485"/>
- <sub name="Permissions Methods Consolidation" link="ref-migrating.html#id520721"/>
- <sub name="AddConnection Returns Object Path of New Connection" link="ref-migrating.html#id540760"/>
- <sub name="Support for WiMAX Devices" link="ref-migrating.html#id532887"/>
- <sub name="New Device States" link="ref-migrating.html#id470788"/>
- <sub name="New Active Connection State" link="ref-migrating.html#id550587"/>
- <sub name="Consolidated Modem Devices" link="ref-migrating.html#id553991"/>
- <sub name="Secret Property Flags" link="ref-migrating.html#id525705"/>
- <sub name="Deprecated Methods Removed" link="ref-migrating.html#id522193"/>
+ <sub name="Architecture and D-Bus API Changes in 0.9" link="ref-migrating.html#id489512">
+ <sub name="Elimination of the User Settings Service" link="ref-migrating.html#id564124"/>
+ <sub name="User Secret Agents" link="ref-migrating.html#id545754"/>
+ <sub name="Settings Service Interface Changes" link="ref-migrating.html#id541570"/>
+ <sub name="Connection Object Interface Changes" link="ref-migrating.html#id573230"/>
+ <sub name="Permissions Methods Consolidation" link="ref-migrating.html#id571106"/>
+ <sub name="AddConnection Returns Object Path of New Connection" link="ref-migrating.html#id562529"/>
+ <sub name="Support for WiMAX Devices" link="ref-migrating.html#id534191"/>
+ <sub name="New Device States" link="ref-migrating.html#id569872"/>
+ <sub name="New Active Connection State" link="ref-migrating.html#id529374"/>
+ <sub name="Consolidated Modem Devices" link="ref-migrating.html#id577250"/>
+ <sub name="Secret Property Flags" link="ref-migrating.html#id544444"/>
+ <sub name="Deprecated Methods Removed" link="ref-migrating.html#id540933"/>
</sub>
</sub>
<sub name="Index" link="ix01.html"/>
diff --git a/docs/api/html/index.html b/docs/api/html/index.html
index d0f347228..2c9b8d1b1 100644
--- a/docs/api/html/index.html
+++ b/docs/api/html/index.html
@@ -22,11 +22,11 @@
    <code class="email">&lt;<a class="email" href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>&gt;</code><br>
  </p></div></div>
</div></div></div>
-<div><p class="releaseinfo">Version 0.9.2.0
+<div><p class="releaseinfo">Version 0.9.4.0
</p></div>
<div><p class="copyright">Copyright © 2011 The NetworkManager Authors</p></div>
<div><div class="legalnotice">
-<a name="id472231"></a><p>
+<a name="id490970"></a><p>
Permission is granted to copy, distribute and/or modify this
document under the terms of the <em class="citetitle">GNU Free
Documentation License</em>, Version 1.1 or any later
@@ -61,25 +61,25 @@
<dt><span class="chapter"><a href="ref-dbus.html">D-Bus API Reference</a></span></dt>
<dt><span class="chapter"><a href="ref-settings.html">Network Configuration Setting Specification</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="ref-settings.html#id543085">Configuration Settings</a></span></dt>
+<dt><span class="section"><a href="ref-settings.html#id561824">Configuration Settings</a></span></dt>
<dt><span class="section"><a href="secrets-flags.html">Secret flag types</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="ref-migrating.html">Migrating from NetworkManager 0.8 to NetworkManager 0.9</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="ref-migrating.html#id512495">Architecture and D-Bus API Changes in 0.9</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id489512">Architecture and D-Bus API Changes in 0.9</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="ref-migrating.html#id526099">Elimination of the User Settings Service</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id524364">User Secret Agents</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id537045">Settings Service Interface Changes</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id535485">Connection Object Interface Changes</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id520721">Permissions Methods Consolidation</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id540760">AddConnection Returns Object Path of New Connection</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id532887">Support for WiMAX Devices</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id470788">New Device States</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id550587">New Active Connection State</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id553991">Consolidated Modem Devices</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id525705">Secret Property Flags</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id522193">Deprecated Methods Removed</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id564124">Elimination of the User Settings Service</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id545754">User Secret Agents</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id541570">Settings Service Interface Changes</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id573230">Connection Object Interface Changes</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id571106">Permissions Methods Consolidation</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id562529">AddConnection Returns Object Path of New Connection</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id534191">Support for WiMAX Devices</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id569872">New Device States</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id529374">New Active Connection State</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id577250">Consolidated Modem Devices</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id544444">Secret Property Flags</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id540933">Deprecated Methods Removed</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="index"><a href="ix01.html">Index</a></span></dt>
diff --git a/docs/api/html/ix01.html b/docs/api/html/ix01.html
index 1a38a76c8..5affd5c86 100644
--- a/docs/api/html/ix01.html
+++ b/docs/api/html/ix01.html
@@ -21,7 +21,7 @@
</tr></table>
<div class="index">
<div class="titlepage"><div><div><h2 class="title">
-<a name="id471201"></a>Index</h2></div></div></div>
+<a name="id489941"></a>Index</h2></div></div></div>
<div class="index"></div>
</div>
<div class="footer">
diff --git a/docs/api/html/ref-migrating.html b/docs/api/html/ref-migrating.html
index abc582480..56c6f912f 100644
--- a/docs/api/html/ref-migrating.html
+++ b/docs/api/html/ref-migrating.html
@@ -23,20 +23,20 @@
<div class="titlepage"><div><div><h2 class="title">
<a name="ref-migrating"></a>Migrating from NetworkManager 0.8 to NetworkManager 0.9</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="ref-migrating.html#id512495">Architecture and D-Bus API Changes in 0.9</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id489512">Architecture and D-Bus API Changes in 0.9</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="ref-migrating.html#id526099">Elimination of the User Settings Service</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id524364">User Secret Agents</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id537045">Settings Service Interface Changes</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id535485">Connection Object Interface Changes</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id520721">Permissions Methods Consolidation</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id540760">AddConnection Returns Object Path of New Connection</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id532887">Support for WiMAX Devices</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id470788">New Device States</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id550587">New Active Connection State</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id553991">Consolidated Modem Devices</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id525705">Secret Property Flags</a></span></dt>
-<dt><span class="section"><a href="ref-migrating.html#id522193">Deprecated Methods Removed</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id564124">Elimination of the User Settings Service</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id545754">User Secret Agents</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id541570">Settings Service Interface Changes</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id573230">Connection Object Interface Changes</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id571106">Permissions Methods Consolidation</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id562529">AddConnection Returns Object Path of New Connection</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id534191">Support for WiMAX Devices</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id569872">New Device States</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id529374">New Active Connection State</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id577250">Consolidated Modem Devices</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id544444">Secret Property Flags</a></span></dt>
+<dt><span class="section"><a href="ref-migrating.html#id540933">Deprecated Methods Removed</a></span></dt>
</dl></dd>
</dl></div>
<p>
@@ -50,14 +50,14 @@
</p>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id512495"></a>Architecture and D-Bus API Changes in 0.9</h2></div></div></div>
+<a name="id489512"></a>Architecture and D-Bus API Changes in 0.9</h2></div></div></div>
<p>
This section details the architectural and D-Bus API changes in
NetworkManager 0.9.
</p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id526099"></a>Elimination of the User Settings Service</h3></div></div></div>
+<a name="id564124"></a>Elimination of the User Settings Service</h3></div></div></div>
<p>
Previously there were two "settings services", or D-Bus services that
provided and saved network configuration information. NetworkManager
@@ -103,7 +103,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id524364"></a>User Secret Agents</h3></div></div></div>
+<a name="id545754"></a>User Secret Agents</h3></div></div></div>
<p>
Even with the elimination of the user settings service, in some cases it
is still desirable to store secrets in the user's session and not in
@@ -152,7 +152,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id537045"></a>Settings Service Interface Changes</h3></div></div></div>
+<a name="id541570"></a>Settings Service Interface Changes</h3></div></div></div>
<p>
With the elimination of the user settings service, the old
<code class="literal">org.freedesktop.NetworkManagerUserSettings</code> and
@@ -160,7 +160,8 @@
service names are no longer used. Instead NetworkManager provides the
settings service using its own D-Bus service name,
<code class="literal">org.freedesktop.NetworkManager</code>. The object path of
- the settings service remains unchanged.
+ the settings service has also changed to
+ <code class="literal">/org/freedesktop/NetworkManager/Settings</code>.
</p>
<p>
Additionally, the D-Bus interface of the settings service has changed
@@ -177,18 +178,19 @@
and <code class="literal">CanModify</code> properties.
</p>
<p>
- <span class="strong"><strong>Action:</strong></span> change the service name that
- your application uses to request system network settings to
- <code class="literal">org.freedesktop.NetworkManager</code>, and update the D-Bus
- interface that codes uses to talk to the settings service to
- <a class="ulink" href="spec.html#org.freedesktop.NetworkManager.Settings" target="_top">
+ <span class="strong"><strong>Action:</strong></span> change the service name and
+ object path that your application uses to request system network settings
+ to <code class="literal">org.freedesktop.NetworkManager</code> and
+ <code class="literal">/org/freedesktop/NetworkManager/Settings</code> respectively,
+ and update the D-Bus interface that codes uses to talk to the settings
+ service to <a class="ulink" href="spec.html#org.freedesktop.NetworkManager.Settings" target="_top">
<code class="literal">org.freedesktop.NetworkManager.Settings</code></a>.
Listen for hostname changes using the new interface name as well.
</p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id535485"></a>Connection Object Interface Changes</h3></div></div></div>
+<a name="id573230"></a>Connection Object Interface Changes</h3></div></div></div>
<p>
Consistent with the interface changes to the Settings object, the
Connection object's D-Bus interface has changed to
@@ -222,7 +224,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id520721"></a>Permissions Methods Consolidation</h3></div></div></div>
+<a name="id571106"></a>Permissions Methods Consolidation</h3></div></div></div>
<p>
Previously there were two D-Bus method calls to retrieve the list of
operations that a user client could perform, and two signals notifying
@@ -254,7 +256,7 @@
are now string-based permissions. The mapping is as follows:
</p>
<div class="table">
-<a name="id554278"></a><p class="title"><b>Table 17. </b></p>
+<a name="id559061"></a><p class="title"><b>Table 20. </b></p>
<div class="table-contents"><table border="1">
<colgroup>
<col>
@@ -305,7 +307,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id540760"></a>AddConnection Returns Object Path of New Connection</h3></div></div></div>
+<a name="id562529"></a>AddConnection Returns Object Path of New Connection</h3></div></div></div>
<p>
The <a class="ulink" href="spec.html#org.freedesktop.NetworkManager.Settings" target="_top">
<code class="literal">org.freedesktop.NetworkManager.Settings.AddConnection</code>
@@ -323,7 +325,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id532887"></a>Support for WiMAX Devices</h3></div></div></div>
+<a name="id534191"></a>Support for WiMAX Devices</h3></div></div></div>
<p>
NetworkManager now supports Intel WiMAX mobile broadband devices. A
corresponding device type (<code class="literal">NM_DEVICE_TYPE_WIMAX</code>) and
@@ -346,7 +348,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id470788"></a>New Device States</h3></div></div></div>
+<a name="id569872"></a>New Device States</h3></div></div></div>
<p>
A few <a class="ulink" href="spec.html#type-NM_DEVICE_STATE" target="_top">new device states</a>
have been added, and all device states have been renumbered for flexibility.
@@ -361,7 +363,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id550587"></a>New Active Connection State</h3></div></div></div>
+<a name="id529374"></a>New Active Connection State</h3></div></div></div>
<p>
Along with the new device states, an
<a class="ulink" href="spec.html#type-NM_ACTIVE_CONNECTION_STATE" target="_top">additional
@@ -377,7 +379,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id553991"></a>Consolidated Modem Devices</h3></div></div></div>
+<a name="id577250"></a>Consolidated Modem Devices</h3></div></div></div>
<p>
Many new mobile broadband devices support multiple access families, like
Qualcomm Gobi cards (CDMA/EVDO and GSM/UMTS), or multi-mode EVDO/LTE
@@ -413,7 +415,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id525705"></a>Secret Property Flags</h3></div></div></div>
+<a name="id544444"></a>Secret Property Flags</h3></div></div></div>
<p>
In the Connection object's configuration properties, each setting's secret
properties (like WiFi passphrases, or public key passwords, etc) now has
@@ -422,7 +424,7 @@
following values:
</p>
<div class="table">
-<a name="id525714"></a><p class="title"><b>Table 18. </b></p>
+<a name="id544453"></a><p class="title"><b>Table 21. </b></p>
<div class="table-contents"><table border="1">
<colgroup>
<col>
@@ -484,7 +486,7 @@
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="id522193"></a>Deprecated Methods Removed</h3></div></div></div>
+<a name="id540933"></a>Deprecated Methods Removed</h3></div></div></div>
<p>
A few methods and signals of the <code class="literal">org.freedesktop.NetworkManager</code>
interface deprecated in version 0.7 have been removed. All the
@@ -494,7 +496,7 @@
their replacements:
</p>
<div class="table">
-<a name="id522207"></a><p class="title"><b>Table 19. </b></p>
+<a name="id540947"></a><p class="title"><b>Table 22. </b></p>
<div class="table-contents"><table border="1">
<colgroup>
<col>
diff --git a/docs/api/html/ref-settings.html b/docs/api/html/ref-settings.html
index b17375855..7278b9580 100644
--- a/docs/api/html/ref-settings.html
+++ b/docs/api/html/ref-settings.html
@@ -23,7 +23,7 @@
<div class="titlepage"><div><div><h2 class="title">
<a name="ref-settings"></a>Network Configuration Setting Specification</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="ref-settings.html#id543085">Configuration Settings</a></span></dt>
+<dt><span class="section"><a href="ref-settings.html#id561824">Configuration Settings</a></span></dt>
<dt><span class="section"><a href="secrets-flags.html">Secret flag types</a></span></dt>
</dl></div>
<p>
@@ -35,11 +35,11 @@
</p>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id543085"></a>Configuration Settings</h2></div></div></div>
+<a name="id561824"></a>Configuration Settings</h2></div></div></div>
<p>
</p>
<div class="table">
-<a name="id520594"></a><p class="title"><b>Table 1. 802-1x setting</b></p>
+<a name="id543615"></a><p class="title"><b>Table 1. 802-1x setting</b></p>
<div class="table-contents"><table summary="802-1x setting" border="1">
<colgroup>
<col>
@@ -79,6 +79,12 @@
<td>Anonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS.</td>
</tr>
<tr>
+<td><pre class="screen">pac-file</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>UTF-8 encoded file path containing PAC for EAP-FAST.</td>
+</tr>
+<tr>
<td><pre class="screen">ca-cert</pre></td>
<td><pre class="screen">byte array</pre></td>
<td><pre class="screen">[]</pre></td>
@@ -181,6 +187,18 @@
<td>Flags indicating how to handle the 802.1x password. (see <a class="xref" href="secrets-flags.html" title="Secret flag types">the section called “Secret flag types”</a> for flag values)</td>
</tr>
<tr>
+<td><pre class="screen">password-raw</pre></td>
+<td><pre class="screen">byte array</pre></td>
+<td><pre class="screen">[]</pre></td>
+<td>Password used for EAP authentication methods as a byte array</td>
+</tr>
+<tr>
+<td><pre class="screen">password-raw-flags</pre></td>
+<td><pre class="screen">uint32</pre></td>
+<td><pre class="screen">0</pre></td>
+<td>Flags indicating how to handle the 802.1x password byte array. (see <a class="xref" href="secrets-flags.html" title="Secret flag types">the section called “Secret flag types”</a> for flag values)</td>
+</tr>
+<tr>
<td><pre class="screen">private-key</pre></td>
<td><pre class="screen">byte array</pre></td>
<td><pre class="screen">[]</pre></td>
@@ -228,7 +246,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id529209"></a><p class="title"><b>Table 2. bluetooth setting</b></p>
+<a name="id547978"></a><p class="title"><b>Table 2. bluetooth setting</b></p>
<div class="table-contents"><table summary="bluetooth setting" border="1">
<colgroup>
<col>
@@ -267,7 +285,46 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id529342"></a><p class="title"><b>Table 3. cdma setting</b></p>
+<a name="id548111"></a><p class="title"><b>Table 3. bond setting</b></p>
+<div class="table-contents"><table summary="bond setting" border="1">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>Key Name</th>
+<th>Value Type</th>
+<th>Default Value</th>
+<th>Value Description</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><pre class="screen">name</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen">bond</pre></td>
+<td>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</td>
+</tr>
+<tr>
+<td><pre class="screen">interface-name</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>The name of the virtual in-kernel bonding network interface</td>
+</tr>
+<tr>
+<td><pre class="screen">options</pre></td>
+<td><pre class="screen">dict of (string::string)</pre></td>
+<td><pre class="screen">[ ]</pre></td>
+<td>Dictionary of key/value pairs of bonding options. Both keys and values must be strings. Option names must contain only alphanumeric characters (ie, [a-zA-Z0-9]).</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p><br class="table-break">
+</p>
+<div class="table">
+<a name="id548244"></a><p class="title"><b>Table 4. cdma setting</b></p>
<div class="table-contents"><table summary="cdma setting" border="1">
<colgroup>
<col>
@@ -318,7 +375,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id529540"></a><p class="title"><b>Table 4. connection setting</b></p>
+<a name="id548442"></a><p class="title"><b>Table 5. connection setting</b></p>
<div class="table-contents"><table summary="connection setting" border="1">
<colgroup>
<col>
@@ -381,13 +438,31 @@
<td><pre class="screen">FALSE</pre></td>
<td>If TRUE, the connection is read-only and cannot be changed by the user or any other mechanism. This is normally set for system connections whose plugin cannot yet write updated connections back out.</td>
</tr>
+<tr>
+<td><pre class="screen">zone</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>The trust level of a the connection.Free form case-insensitive string (for example "Home", "Work", "Public"). NULL or unspecified zone means the connection will be placed in the default zone as defined by the firewall.</td>
+</tr>
+<tr>
+<td><pre class="screen">master</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>Interface name of the master device or UUID of the master connection</td>
+</tr>
+<tr>
+<td><pre class="screen">slave-type</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>Setting name describing the type of slave this connection is (ie, 'bond') or NULL if this connection is not a slave.</td>
+</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="table">
-<a name="id529841"></a><p class="title"><b>Table 5. gsm setting</b></p>
+<a name="id548833"></a><p class="title"><b>Table 6. gsm setting</b></p>
<div class="table-contents"><table summary="gsm setting" border="1">
<colgroup>
<col>
@@ -480,7 +555,52 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id530266"></a><p class="title"><b>Table 6. ipv4 setting</b></p>
+<a name="id578510"></a><p class="title"><b>Table 7. infiniband setting</b></p>
+<div class="table-contents"><table summary="infiniband setting" border="1">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>Key Name</th>
+<th>Value Type</th>
+<th>Default Value</th>
+<th>Value Description</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><pre class="screen">name</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen">infiniband</pre></td>
+<td>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</td>
+</tr>
+<tr>
+<td><pre class="screen">mac-address</pre></td>
+<td><pre class="screen">byte array</pre></td>
+<td><pre class="screen">[]</pre></td>
+<td>If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</td>
+</tr>
+<tr>
+<td><pre class="screen">mtu</pre></td>
+<td><pre class="screen">uint32</pre></td>
+<td><pre class="screen">0</pre></td>
+<td>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</td>
+</tr>
+<tr>
+<td><pre class="screen">transport-mode</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>The IPoIB transport mode. Either 'datagram' or 'connected'.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p><br class="table-break">
+</p>
+<div class="table">
+<a name="id578649"></a><p class="title"><b>Table 8. ipv4 setting</b></p>
<div class="table-contents"><table summary="ipv4 setting" border="1">
<colgroup>
<col>
@@ -570,7 +690,7 @@
<tr>
<td><pre class="screen">may-fail</pre></td>
<td><pre class="screen">boolean</pre></td>
-<td><pre class="screen">FALSE</pre></td>
+<td><pre class="screen">TRUE</pre></td>
<td>If TRUE, allow overall network configuration to proceed even if IPv4 configuration times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.</td>
</tr>
</tbody>
@@ -579,7 +699,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id559244"></a><p class="title"><b>Table 7. ipv6 setting</b></p>
+<a name="id579045"></a><p class="title"><b>Table 9. ipv6 setting</b></p>
<div class="table-contents"><table summary="ipv6 setting" border="1">
<colgroup>
<col>
@@ -654,13 +774,19 @@
<td><pre class="screen">TRUE</pre></td>
<td>If TRUE, allow overall network configuration to proceed even if IPv6 configuration times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv4-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv6 configuration fails but IPv4 configuration completes successfully.</td>
</tr>
+<tr>
+<td><pre class="screen">ip6-privacy</pre></td>
+<td><pre class="screen">int32</pre></td>
+<td><pre class="screen">-1</pre></td>
+<td>Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI-64. This enhances privacy, but could cause problems in some applications, on the other hand. The permitted values are: 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses).</td>
+</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="table">
-<a name="id559562"></a><p class="title"><b>Table 8. 802-11-olpc-mesh setting</b></p>
+<a name="id579392"></a><p class="title"><b>Table 10. 802-11-olpc-mesh setting</b></p>
<div class="table-contents"><table summary="802-11-olpc-mesh setting" border="1">
<colgroup>
<col>
@@ -705,7 +831,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id559700"></a><p class="title"><b>Table 9. ppp setting</b></p>
+<a name="id579530"></a><p class="title"><b>Table 11. ppp setting</b></p>
<div class="table-contents"><table summary="ppp setting" border="1">
<colgroup>
<col>
@@ -840,7 +966,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id560230"></a><p class="title"><b>Table 10. pppoe setting</b></p>
+<a name="id580187"></a><p class="title"><b>Table 12. pppoe setting</b></p>
<div class="table-contents"><table summary="pppoe setting" border="1">
<colgroup>
<col>
@@ -891,7 +1017,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id560395"></a><p class="title"><b>Table 11. serial setting</b></p>
+<a name="id580393"></a><p class="title"><b>Table 13. serial setting</b></p>
<div class="table-contents"><table summary="serial setting" border="1">
<colgroup>
<col>
@@ -948,7 +1074,70 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id560589"></a><p class="title"><b>Table 12. vpn setting</b></p>
+<a name="id580632"></a><p class="title"><b>Table 14. vlan setting</b></p>
+<div class="table-contents"><table summary="vlan setting" border="1">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>Key Name</th>
+<th>Value Type</th>
+<th>Default Value</th>
+<th>Value Description</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><pre class="screen">name</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen">vlan</pre></td>
+<td>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</td>
+</tr>
+<tr>
+<td><pre class="screen">interface-name</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>If given, specifies the kernel name of the VLAN interface. If not given, a default name will be constructed from the interface described by the parent interface and the 'id' property, ex 'eth2.1'. The parent interface may be given by the 'parent' property or by a hardware address property, eg the 'wired' or 'infiniband' settings' 'mac-address' property.</td>
+</tr>
+<tr>
+<td><pre class="screen">parent</pre></td>
+<td><pre class="screen">string</pre></td>
+<td><pre class="screen"></pre></td>
+<td>If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created. If this property is not specified, the connection must contain a hardware address in a hardware-specific setting, like the 'wired' or 'infiniband' settings' 'mac-address' property.</td>
+</tr>
+<tr>
+<td><pre class="screen">id</pre></td>
+<td><pre class="screen">uint32</pre></td>
+<td><pre class="screen">0</pre></td>
+<td>The VLAN indentifier the interface created by this connection should be assigned.</td>
+</tr>
+<tr>
+<td><pre class="screen">flags</pre></td>
+<td><pre class="screen">uint32</pre></td>
+<td><pre class="screen">0</pre></td>
+<td>One or more flags which control the behavior and features of the VLAN interface. Flags include reordering of output packet headers (0x01), use of the GVRP protocol (0x02), and loose binding of the interface to its master device's operating state (0x04).</td>
+</tr>
+<tr>
+<td><pre class="screen">ingress-priority-map</pre></td>
+<td><pre class="screen">array of string</pre></td>
+<td><pre class="screen">[]</pre></td>
+<td>For incoming packets, a list of mappings from 802.1p priorities to Linux SKB priorities. The mapping is given in the format 'from:to' where both 'from' and 'to' are unsigned integers, ie '7:3'.</td>
+</tr>
+<tr>
+<td><pre class="screen">egress-priority-map</pre></td>
+<td><pre class="screen">array of string</pre></td>
+<td><pre class="screen">[]</pre></td>
+<td>For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p priorities. The mapping is given in the format 'from:to' where both 'from' and 'to' are unsigned integers, ie '7:3'.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p><br class="table-break">
+</p>
+<div class="table">
+<a name="id580907"></a><p class="title"><b>Table 15. vpn setting</b></p>
<div class="table-contents"><table summary="vpn setting" border="1">
<colgroup>
<col>
@@ -999,7 +1188,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id560795"></a><p class="title"><b>Table 13. wimax setting</b></p>
+<a name="id581112"></a><p class="title"><b>Table 16. wimax setting</b></p>
<div class="table-contents"><table summary="wimax setting" border="1">
<colgroup>
<col>
@@ -1038,7 +1227,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id560933"></a><p class="title"><b>Table 14. 802-3-ethernet setting</b></p>
+<a name="id581251"></a><p class="title"><b>Table 17. 802-3-ethernet setting</b></p>
<div class="table-contents"><table summary="802-3-ethernet setting" border="1">
<colgroup>
<col>
@@ -1131,7 +1320,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id561374"></a><p class="title"><b>Table 15. 802-11-wireless setting</b></p>
+<a name="id581691"></a><p class="title"><b>Table 18. 802-11-wireless setting</b></p>
<div class="table-contents"><table summary="802-11-wireless setting" border="1">
<colgroup>
<col>
@@ -1236,7 +1425,7 @@
<p><br class="table-break">
</p>
<div class="table">
-<a name="id561883"></a><p class="title"><b>Table 16. 802-11-wireless-security setting</b></p>
+<a name="id582200"></a><p class="title"><b>Table 19. 802-11-wireless-security setting</b></p>
<div class="table-contents"><table summary="802-11-wireless-security setting" border="1">
<colgroup>
<col>
diff --git a/docs/api/html/spec.html b/docs/api/html/spec.html
index eb0a828bf..a75799e71 100644
--- a/docs/api/html/spec.html
+++ b/docs/api/html/spec.html
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.2.0</title><style type="text/css">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.4.0</title><style type="text/css">
body {
font-family: sans-serif;
@@ -98,7 +98,7 @@
margin-right: 4em;
}
- </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.2.0</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license">
+ </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.4.0</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license">
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -112,7 +112,7 @@ General Public License for more details.</p>
<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
-</div><h2>Interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul>
+</div><h2>Interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Infiniband">org.freedesktop.NetworkManager.Device.Infiniband</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bond">org.freedesktop.NetworkManager.Device.Bond</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Vlan">org.freedesktop.NetworkManager.Device.Vlan</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul>
<h1><a name="org.freedesktop.NetworkManager" id="org.freedesktop.NetworkManager"></a>org.freedesktop.NetworkManager</h1><h2>Methods:</h2><div class="method"><h3><a name="org.freedesktop.NetworkManager.GetDevices" id="org.freedesktop.NetworkManager.GetDevices">GetDevices</a> (
) &#8594;
@@ -477,6 +477,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
(<a xmlns="" href="#type-NM_DEVICE_STATE">NM_DEVICE_STATE</a>)
</dt><dd>
The current state of the device.
+ </dd><dt><code>StateReason</code> -
+ <code>(uu)</code> -
+ <code>(read)</code>
+ (<a xmlns="" href="#type-NM_DEVICE_STATE_REASON_STRUCT">NM_DEVICE_STATE_REASON_STRUCT</a>)
+ </dt><dd>
+ The current state and reason for changing to that state.
</dd><dt><code>ActiveConnection</code> -
<code>o</code> -
<code>(read)</code></dt><dd>
@@ -559,6 +565,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
The device is a modem supporting one or more of analog telephone,
CDMA/EVDO, GSM/UMTS/HSPA, or LTE standards to access a cellular or
wireline data network.
+ </dd><dt><code>NM_DEVICE_TYPE_INFINIBAND = 9</code></dt><dd>
+ The device is an IP-capable InfiniBand interface.
+ </dd><dt><code>NM_DEVICE_TYPE_BOND = 10</code></dt><dd>
+ The device is a bond master interface.
+ </dd><dt><code>NM_DEVICE_TYPE_VLAN = 11</code></dt><dd>
+ The device is a VLAN interface.
</dd></dl><h3><a name="type-NM_DEVICE_STATE_REASON" id="type-NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a></h3><dl><dt><code>NM_DEVICE_STATE_REASON_UNKNOWN = 0</code></dt><dd>
The reason for the device state change is unknown.
</dd><dt><code>NM_DEVICE_STATE_REASON_NONE = 1</code></dt><dd>
@@ -649,7 +661,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
The modem could not be found.
</dd><dt><code>NM_DEVICE_STATE_REASON_BT_FAILED = 44</code></dt><dd>
The Bluetooth connection timed out or failed.
- </dd></dl><h2>Sets of flags:</h2><h3 xmlns=""><a name="type-NM_DEVICE_CAP" id="type-NM_DEVICE_CAP">NM_DEVICE_CAP</a></h3><dl><dt><code>NM_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability.</dd><dt><code>NM_DEVICE_CAP_NM_SUPPORTED = 0x1</code></dt><dd>The device is supported by NetworkManager.</dd><dt><code>NM_DEVICE_CAP_CARRIER_DETECT = 0x2</code></dt><dd>The device supports carrier detection.</dd></dl>
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45</code></dt><dd>
+ GSM Modem's SIM Card not inserted.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46</code></dt><dd>
+ GSM Modem's SIM Pin required.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47</code></dt><dd>
+ GSM Modem's SIM Puk required.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48</code></dt><dd>
+ GSM Modem's SIM wrong
+ </dd><dt><code>NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49</code></dt><dd>
+ InfiniBand device does not support connected mode.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50</code></dt><dd>
+ A dependency of the connection failed.
+ </dd></dl><h2>Sets of flags:</h2><h3 xmlns=""><a name="type-NM_DEVICE_CAP" id="type-NM_DEVICE_CAP">NM_DEVICE_CAP</a></h3><dl><dt><code>NM_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability.</dd><dt><code>NM_DEVICE_CAP_NM_SUPPORTED = 0x1</code></dt><dd>The device is supported by NetworkManager.</dd><dt><code>NM_DEVICE_CAP_CARRIER_DETECT = 0x2</code></dt><dd>The device supports carrier detection.</dd></dl><h2>Structure types:</h2><div class="struct"><h3><a name="type-NM_DEVICE_STATE_REASON_STRUCT" id="type-NM_DEVICE_STATE_REASON_STRUCT">NM_DEVICE_STATE_REASON_STRUCT</a> - (
+ u: state, u: reason
+ )
+ </h3><div class="docstring"></div><p>Arrays of NM_DEVICE_STATE_REASON_STRUCT don't generally
+ make sense.</p><div><h4>Members</h4><dl><dt><code>state</code> -
+ <code>u</code>
+ (<a xmlns="" href="#type-NM_DEVICE_STATE">NM_DEVICE_STATE</a>)
+ </dt><dd>
+ The device state.
+ </dd><dt><code>reason</code> -
+ <code>u</code>
+ (<a xmlns="" href="#type-NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a>)
+ </dt><dd>
+ The reason for originally changing to the device state.
+ </dd></dl></div></div>
<h1><a name="org.freedesktop.NetworkManager.Device.Wired" id="org.freedesktop.NetworkManager.Device.Wired"></a>org.freedesktop.NetworkManager.Device.Wired</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Wired.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Wired.PropertiesChanged">PropertiesChanged</a> (
a{sv}: properties
@@ -897,6 +935,61 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Object path of the NSP currently used by the WiMax device.
</dd></dl>
+ <h1><a name="org.freedesktop.NetworkManager.Device.Infiniband" id="org.freedesktop.NetworkManager.Device.Infiniband"></a>org.freedesktop.NetworkManager.Device.Infiniband</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Infiniband.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Infiniband.PropertiesChanged">PropertiesChanged</a> (
+ a{sv}: properties
+ )</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
+ <code>a{sv}</code>
+ (<a xmlns="" href="#type-String_Variant_Map">String_Variant_Map</a>)
+ </dt><dd>
+ A dictionary mapping property names to variant boxed values
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>HwAddress</code> -
+ <code>s</code> -
+ <code>(read)</code></dt><dd>
+ Hardware address of the device.
+ </dd><dt><code>Carrier</code> -
+ <code>b</code> -
+ <code>(read)</code></dt><dd>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </dd></dl>
+
+ <h1><a name="org.freedesktop.NetworkManager.Device.Bond" id="org.freedesktop.NetworkManager.Device.Bond"></a>org.freedesktop.NetworkManager.Device.Bond</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Bond.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Bond.PropertiesChanged">PropertiesChanged</a> (
+ a{sv}: properties
+ )</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
+ <code>a{sv}</code>
+ (<a xmlns="" href="#type-String_Variant_Map">String_Variant_Map</a>)
+ </dt><dd>
+ A dictionary mapping property names to variant boxed values
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>HwAddress</code> -
+ <code>s</code> -
+ <code>(read)</code></dt><dd>
+ Hardware address of the device.
+ </dd><dt><code>Carrier</code> -
+ <code>b</code> -
+ <code>(read)</code></dt><dd>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </dd></dl>
+
+ <h1><a name="org.freedesktop.NetworkManager.Device.Vlan" id="org.freedesktop.NetworkManager.Device.Vlan"></a>org.freedesktop.NetworkManager.Device.Vlan</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Vlan.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Vlan.PropertiesChanged">PropertiesChanged</a> (
+ a{sv}: properties
+ )</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
+ <code>a{sv}</code>
+ (<a xmlns="" href="#type-String_Variant_Map">String_Variant_Map</a>)
+ </dt><dd>
+ A dictionary mapping property names to variant boxed values
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>HwAddress</code> -
+ <code>s</code> -
+ <code>(read)</code></dt><dd>
+ Hardware address of the device.
+ </dd><dt><code>Carrier</code> -
+ <code>b</code> -
+ <code>(read)</code></dt><dd>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </dd><dt><code>VlanId</code> -
+ <code>u</code> -
+ <code>(read)</code></dt><dd>
+ The VLAN ID of this VLAN interface.
+ </dd></dl>
+
<h1><a name="org.freedesktop.NetworkManager.WiMax.Nsp" id="org.freedesktop.NetworkManager.WiMax.Nsp"></a>org.freedesktop.NetworkManager.WiMax.Nsp</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.WiMax.Nsp.PropertiesChanged" id="org.freedesktop.NetworkManager.WiMax.Nsp.PropertiesChanged">PropertiesChanged</a> (
a{sv}: properties
)</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
@@ -1135,7 +1228,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<code>b</code> -
<code>(read)</code></dt><dd>Whether this active connection is the default IPv6 connection, i.e. whether it currently owns the default IPv6 route.</dd><dt><code>Vpn</code> -
<code>b</code> -
- <code>(read)</code></dt><dd>Whether this active connection is also a VPN connection.</dd></dl><h2>Enumerated types:</h2><h3><a name="type-NM_ACTIVE_CONNECTION_STATE" id="type-NM_ACTIVE_CONNECTION_STATE">NM_ACTIVE_CONNECTION_STATE</a></h3><dl><dt><code>NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0</code></dt><dd>
+ <code>(read)</code></dt><dd>Whether this active connection is also a VPN connection.</dd><dt><code>Master</code> -
+ <code>o</code> -
+ <code>(read)</code></dt><dd>The path to the master device if the connection is a slave.</dd></dl><h2>Enumerated types:</h2><h3><a name="type-NM_ACTIVE_CONNECTION_STATE" id="type-NM_ACTIVE_CONNECTION_STATE">NM_ACTIVE_CONNECTION_STATE</a></h3><dl><dt><code>NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0</code></dt><dd>
The active connection is in an unknown state.
</dd><dt><code>NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1</code></dt><dd>
The connection is activating.
@@ -1502,7 +1597,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<h2><a name="org.freedesktop.NetworkManager.VPN.Error.BadArguments" id="org.freedesktop.NetworkManager.VPN.Error.BadArguments"></a>org.freedesktop.NetworkManager.VPN.Error.BadArguments</h2>Invalid arguments were passed with the request. FIXME: too general.
<h2><a name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed" id="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"></a>org.freedesktop.NetworkManager.VPN.Error.LaunchFailed</h2>A binary providing the service failed to launch.
<h2><a name="org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid" id="org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid"></a>org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid</h2>The request could not be processed because the VPN connection settings were invalid.
-<h1>Index</h1><h2>Index of interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul><h2>Index of types</h2><ul><li><code><a href="#type-NM_802_11_AP_FLAGS">NM_802_11_AP_FLAGS</a></code>
+<h1>Index</h1><h2>Index of interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Infiniband">org.freedesktop.NetworkManager.Device.Infiniband</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bond">org.freedesktop.NetworkManager.Device.Bond</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Vlan">org.freedesktop.NetworkManager.Device.Vlan</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul><h2>Index of types</h2><ul><li><code><a href="#type-NM_802_11_AP_FLAGS">NM_802_11_AP_FLAGS</a></code>
- u</li><li><code><a href="#type-NM_802_11_AP_SEC">NM_802_11_AP_SEC</a></code>
- u</li><li><code><a href="#type-NM_802_11_DEVICE_CAP">NM_802_11_DEVICE_CAP</a></code>
- u</li><li><code><a href="#type-NM_802_11_MODE">NM_802_11_MODE</a></code>
@@ -1512,7 +1607,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
- u</li><li><code><a href="#type-NM_DEVICE_MODEM_CAPABILITIES">NM_DEVICE_MODEM_CAPABILITIES</a></code>
- u</li><li><code><a href="#type-NM_DEVICE_STATE">NM_DEVICE_STATE</a></code>
- u</li><li><code><a href="#type-NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a></code>
- - u</li><li><code><a href="#type-NM_DEVICE_TYPE">NM_DEVICE_TYPE</a></code>
+ - u</li><li><code><a href="#type-NM_DEVICE_STATE_REASON_STRUCT">NM_DEVICE_STATE_REASON_STRUCT</a></code>
+ - ( u, u )
+ </li><li><code><a href="#type-NM_DEVICE_TYPE">NM_DEVICE_TYPE</a></code>
- u</li><li><code><a href="#type-NM_SECRET_AGENT_GET_SECRETS_FLAGS">NM_SECRET_AGENT_GET_SECRETS_FLAGS</a></code>
- u</li><li><code><a href="#type-NM_STATE">NM_STATE</a></code>
- u</li><li><code><a href="#type-NM_VPN_CONNECTION_STATE">NM_VPN_CONNECTION_STATE</a></code>
diff --git a/docs/api/migrating-to-09.xml b/docs/api/migrating-to-09.xml
index 910c1369f..f282d6462 100644
--- a/docs/api/migrating-to-09.xml
+++ b/docs/api/migrating-to-09.xml
@@ -126,7 +126,8 @@
service names are no longer used. Instead NetworkManager provides the
settings service using its own D-Bus service name,
<literal>org.freedesktop.NetworkManager</literal>. The object path of
- the settings service remains unchanged.
+ the settings service has also changed to
+ <literal>/org/freedesktop/NetworkManager/Settings</literal>.
</para>
<para>
Additionally, the D-Bus interface of the settings service has changed
@@ -143,11 +144,12 @@
and <literal>CanModify</literal> properties.
</para>
<para>
- <emphasis role="strong">Action:</emphasis> change the service name that
- your application uses to request system network settings to
- <literal>org.freedesktop.NetworkManager</literal>, and update the D-Bus
- interface that codes uses to talk to the settings service to
- <ulink url="spec.html#org.freedesktop.NetworkManager.Settings">
+ <emphasis role="strong">Action:</emphasis> change the service name and
+ object path that your application uses to request system network settings
+ to <literal>org.freedesktop.NetworkManager</literal> and
+ <literal>/org/freedesktop/NetworkManager/Settings</literal> respectively,
+ and update the D-Bus interface that codes uses to talk to the settings
+ service to <ulink url="spec.html#org.freedesktop.NetworkManager.Settings">
<literal>org.freedesktop.NetworkManager.Settings</literal></ulink>.
Listen for hostname changes using the new interface name as well.
</para>
diff --git a/docs/api/settings-spec.xml b/docs/api/settings-spec.xml
index fd320b638..8d2757d92 100644
--- a/docs/api/settings-spec.xml
+++ b/docs/api/settings-spec.xml
@@ -41,6 +41,12 @@
<entry>Anonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS.</entry>
</row>
<row>
+ <entry><screen>pac-file</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>UTF-8 encoded file path containing PAC for EAP-FAST.</entry>
+ </row>
+ <row>
<entry><screen>ca-cert</screen></entry>
<entry><screen>byte array</screen></entry>
<entry><screen>[]</screen></entry>
@@ -143,6 +149,18 @@
<entry>Flags indicating how to handle the 802.1x password. (see <xref linkend="secrets-flags"/> for flag values)</entry>
</row>
<row>
+ <entry><screen>password-raw</screen></entry>
+ <entry><screen>byte array</screen></entry>
+ <entry><screen>[]</screen></entry>
+ <entry>Password used for EAP authentication methods as a byte array</entry>
+ </row>
+ <row>
+ <entry><screen>password-raw-flags</screen></entry>
+ <entry><screen>uint32</screen></entry>
+ <entry><screen>0</screen></entry>
+ <entry>Flags indicating how to handle the 802.1x password byte array. (see <xref linkend="secrets-flags"/> for flag values)</entry>
+ </row>
+ <row>
<entry><screen>private-key</screen></entry>
<entry><screen>byte array</screen></entry>
<entry><screen>[]</screen></entry>
@@ -221,6 +239,39 @@
</tgroup>
</table>
<table>
+ <title>bond setting</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Key Name</entry>
+ <entry>Value Type</entry>
+ <entry>Default Value</entry>
+ <entry>Value Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><screen>name</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen>bond</screen></entry>
+ <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry>
+ </row>
+ <row>
+ <entry><screen>interface-name</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>The name of the virtual in-kernel bonding network interface</entry>
+ </row>
+ <row>
+ <entry><screen>options</screen></entry>
+ <entry><screen>dict of (string::string)</screen></entry>
+ <entry><screen>[ ]</screen></entry>
+ <entry>Dictionary of key/value pairs of bonding options. Both keys and values must be strings. Option names must contain only alphanumeric characters (ie, [a-zA-Z0-9]).</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+<table>
<title>cdma setting</title>
<tgroup cols="4">
<thead>
@@ -325,6 +376,24 @@
<entry><screen>FALSE</screen></entry>
<entry>If TRUE, the connection is read-only and cannot be changed by the user or any other mechanism. This is normally set for system connections whose plugin cannot yet write updated connections back out.</entry>
</row>
+ <row>
+ <entry><screen>zone</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>The trust level of a the connection.Free form case-insensitive string (for example "Home", "Work", "Public"). NULL or unspecified zone means the connection will be placed in the default zone as defined by the firewall.</entry>
+ </row>
+ <row>
+ <entry><screen>master</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>Interface name of the master device or UUID of the master connection</entry>
+ </row>
+ <row>
+ <entry><screen>slave-type</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>Setting name describing the type of slave this connection is (ie, 'bond') or NULL if this connection is not a slave.</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -416,6 +485,45 @@
</tgroup>
</table>
<table>
+ <title>infiniband setting</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Key Name</entry>
+ <entry>Value Type</entry>
+ <entry>Default Value</entry>
+ <entry>Value Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><screen>name</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen>infiniband</screen></entry>
+ <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry>
+ </row>
+ <row>
+ <entry><screen>mac-address</screen></entry>
+ <entry><screen>byte array</screen></entry>
+ <entry><screen>[]</screen></entry>
+ <entry>If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</entry>
+ </row>
+ <row>
+ <entry><screen>mtu</screen></entry>
+ <entry><screen>uint32</screen></entry>
+ <entry><screen>0</screen></entry>
+ <entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</entry>
+ </row>
+ <row>
+ <entry><screen>transport-mode</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>The IPoIB transport mode. Either 'datagram' or 'connected'.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+<table>
<title>ipv4 setting</title>
<tgroup cols="4">
<thead>
@@ -502,7 +610,7 @@
<row>
<entry><screen>may-fail</screen></entry>
<entry><screen>boolean</screen></entry>
- <entry><screen>FALSE</screen></entry>
+ <entry><screen>TRUE</screen></entry>
<entry>If TRUE, allow overall network configuration to proceed even if IPv4 configuration times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.</entry>
</row>
</tbody>
@@ -580,6 +688,12 @@
<entry><screen>TRUE</screen></entry>
<entry>If TRUE, allow overall network configuration to proceed even if IPv6 configuration times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv4-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv6 configuration fails but IPv4 configuration completes successfully.</entry>
</row>
+ <row>
+ <entry><screen>ip6-privacy</screen></entry>
+ <entry><screen>int32</screen></entry>
+ <entry><screen>-1</screen></entry>
+ <entry>Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI-64. This enhances privacy, but could cause problems in some applications, on the other hand. The permitted values are: 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses).</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -848,6 +962,63 @@
</tgroup>
</table>
<table>
+ <title>vlan setting</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Key Name</entry>
+ <entry>Value Type</entry>
+ <entry>Default Value</entry>
+ <entry>Value Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><screen>name</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen>vlan</screen></entry>
+ <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry>
+ </row>
+ <row>
+ <entry><screen>interface-name</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>If given, specifies the kernel name of the VLAN interface. If not given, a default name will be constructed from the interface described by the parent interface and the 'id' property, ex 'eth2.1'. The parent interface may be given by the 'parent' property or by a hardware address property, eg the 'wired' or 'infiniband' settings' 'mac-address' property.</entry>
+ </row>
+ <row>
+ <entry><screen>parent</screen></entry>
+ <entry><screen>string</screen></entry>
+ <entry><screen></screen></entry>
+ <entry>If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created. If this property is not specified, the connection must contain a hardware address in a hardware-specific setting, like the 'wired' or 'infiniband' settings' 'mac-address' property.</entry>
+ </row>
+ <row>
+ <entry><screen>id</screen></entry>
+ <entry><screen>uint32</screen></entry>
+ <entry><screen>0</screen></entry>
+ <entry>The VLAN indentifier the interface created by this connection should be assigned.</entry>
+ </row>
+ <row>
+ <entry><screen>flags</screen></entry>
+ <entry><screen>uint32</screen></entry>
+ <entry><screen>0</screen></entry>
+ <entry>One or more flags which control the behavior and features of the VLAN interface. Flags include reordering of output packet headers (0x01), use of the GVRP protocol (0x02), and loose binding of the interface to its master device's operating state (0x04).</entry>
+ </row>
+ <row>
+ <entry><screen>ingress-priority-map</screen></entry>
+ <entry><screen>array of string</screen></entry>
+ <entry><screen>[]</screen></entry>
+ <entry>For incoming packets, a list of mappings from 802.1p priorities to Linux SKB priorities. The mapping is given in the format 'from:to' where both 'from' and 'to' are unsigned integers, ie '7:3'.</entry>
+ </row>
+ <row>
+ <entry><screen>egress-priority-map</screen></entry>
+ <entry><screen>array of string</screen></entry>
+ <entry><screen>[]</screen></entry>
+ <entry>For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p priorities. The mapping is given in the format 'from:to' where both 'from' and 'to' are unsigned integers, ie '7:3'.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+<table>
<title>vpn setting</title>
<tgroup cols="4">
<thead>
diff --git a/docs/api/spec.html b/docs/api/spec.html
index eb0a828bf..a75799e71 100644
--- a/docs/api/spec.html
+++ b/docs/api/spec.html
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.2.0</title><style type="text/css">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.4.0</title><style type="text/css">
body {
font-family: sans-serif;
@@ -98,7 +98,7 @@
margin-right: 4em;
}
- </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.2.0</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license">
+ </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.4.0</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license">
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -112,7 +112,7 @@ General Public License for more details.</p>
<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
-</div><h2>Interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul>
+</div><h2>Interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Infiniband">org.freedesktop.NetworkManager.Device.Infiniband</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bond">org.freedesktop.NetworkManager.Device.Bond</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Vlan">org.freedesktop.NetworkManager.Device.Vlan</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul>
<h1><a name="org.freedesktop.NetworkManager" id="org.freedesktop.NetworkManager"></a>org.freedesktop.NetworkManager</h1><h2>Methods:</h2><div class="method"><h3><a name="org.freedesktop.NetworkManager.GetDevices" id="org.freedesktop.NetworkManager.GetDevices">GetDevices</a> (
) &#8594;
@@ -477,6 +477,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
(<a xmlns="" href="#type-NM_DEVICE_STATE">NM_DEVICE_STATE</a>)
</dt><dd>
The current state of the device.
+ </dd><dt><code>StateReason</code> -
+ <code>(uu)</code> -
+ <code>(read)</code>
+ (<a xmlns="" href="#type-NM_DEVICE_STATE_REASON_STRUCT">NM_DEVICE_STATE_REASON_STRUCT</a>)
+ </dt><dd>
+ The current state and reason for changing to that state.
</dd><dt><code>ActiveConnection</code> -
<code>o</code> -
<code>(read)</code></dt><dd>
@@ -559,6 +565,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
The device is a modem supporting one or more of analog telephone,
CDMA/EVDO, GSM/UMTS/HSPA, or LTE standards to access a cellular or
wireline data network.
+ </dd><dt><code>NM_DEVICE_TYPE_INFINIBAND = 9</code></dt><dd>
+ The device is an IP-capable InfiniBand interface.
+ </dd><dt><code>NM_DEVICE_TYPE_BOND = 10</code></dt><dd>
+ The device is a bond master interface.
+ </dd><dt><code>NM_DEVICE_TYPE_VLAN = 11</code></dt><dd>
+ The device is a VLAN interface.
</dd></dl><h3><a name="type-NM_DEVICE_STATE_REASON" id="type-NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a></h3><dl><dt><code>NM_DEVICE_STATE_REASON_UNKNOWN = 0</code></dt><dd>
The reason for the device state change is unknown.
</dd><dt><code>NM_DEVICE_STATE_REASON_NONE = 1</code></dt><dd>
@@ -649,7 +661,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
The modem could not be found.
</dd><dt><code>NM_DEVICE_STATE_REASON_BT_FAILED = 44</code></dt><dd>
The Bluetooth connection timed out or failed.
- </dd></dl><h2>Sets of flags:</h2><h3 xmlns=""><a name="type-NM_DEVICE_CAP" id="type-NM_DEVICE_CAP">NM_DEVICE_CAP</a></h3><dl><dt><code>NM_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability.</dd><dt><code>NM_DEVICE_CAP_NM_SUPPORTED = 0x1</code></dt><dd>The device is supported by NetworkManager.</dd><dt><code>NM_DEVICE_CAP_CARRIER_DETECT = 0x2</code></dt><dd>The device supports carrier detection.</dd></dl>
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45</code></dt><dd>
+ GSM Modem's SIM Card not inserted.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46</code></dt><dd>
+ GSM Modem's SIM Pin required.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47</code></dt><dd>
+ GSM Modem's SIM Puk required.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48</code></dt><dd>
+ GSM Modem's SIM wrong
+ </dd><dt><code>NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49</code></dt><dd>
+ InfiniBand device does not support connected mode.
+ </dd><dt><code>NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50</code></dt><dd>
+ A dependency of the connection failed.
+ </dd></dl><h2>Sets of flags:</h2><h3 xmlns=""><a name="type-NM_DEVICE_CAP" id="type-NM_DEVICE_CAP">NM_DEVICE_CAP</a></h3><dl><dt><code>NM_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability.</dd><dt><code>NM_DEVICE_CAP_NM_SUPPORTED = 0x1</code></dt><dd>The device is supported by NetworkManager.</dd><dt><code>NM_DEVICE_CAP_CARRIER_DETECT = 0x2</code></dt><dd>The device supports carrier detection.</dd></dl><h2>Structure types:</h2><div class="struct"><h3><a name="type-NM_DEVICE_STATE_REASON_STRUCT" id="type-NM_DEVICE_STATE_REASON_STRUCT">NM_DEVICE_STATE_REASON_STRUCT</a> - (
+ u: state, u: reason
+ )
+ </h3><div class="docstring"></div><p>Arrays of NM_DEVICE_STATE_REASON_STRUCT don't generally
+ make sense.</p><div><h4>Members</h4><dl><dt><code>state</code> -
+ <code>u</code>
+ (<a xmlns="" href="#type-NM_DEVICE_STATE">NM_DEVICE_STATE</a>)
+ </dt><dd>
+ The device state.
+ </dd><dt><code>reason</code> -
+ <code>u</code>
+ (<a xmlns="" href="#type-NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a>)
+ </dt><dd>
+ The reason for originally changing to the device state.
+ </dd></dl></div></div>
<h1><a name="org.freedesktop.NetworkManager.Device.Wired" id="org.freedesktop.NetworkManager.Device.Wired"></a>org.freedesktop.NetworkManager.Device.Wired</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Wired.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Wired.PropertiesChanged">PropertiesChanged</a> (
a{sv}: properties
@@ -897,6 +935,61 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Object path of the NSP currently used by the WiMax device.
</dd></dl>
+ <h1><a name="org.freedesktop.NetworkManager.Device.Infiniband" id="org.freedesktop.NetworkManager.Device.Infiniband"></a>org.freedesktop.NetworkManager.Device.Infiniband</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Infiniband.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Infiniband.PropertiesChanged">PropertiesChanged</a> (
+ a{sv}: properties
+ )</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
+ <code>a{sv}</code>
+ (<a xmlns="" href="#type-String_Variant_Map">String_Variant_Map</a>)
+ </dt><dd>
+ A dictionary mapping property names to variant boxed values
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>HwAddress</code> -
+ <code>s</code> -
+ <code>(read)</code></dt><dd>
+ Hardware address of the device.
+ </dd><dt><code>Carrier</code> -
+ <code>b</code> -
+ <code>(read)</code></dt><dd>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </dd></dl>
+
+ <h1><a name="org.freedesktop.NetworkManager.Device.Bond" id="org.freedesktop.NetworkManager.Device.Bond"></a>org.freedesktop.NetworkManager.Device.Bond</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Bond.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Bond.PropertiesChanged">PropertiesChanged</a> (
+ a{sv}: properties
+ )</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
+ <code>a{sv}</code>
+ (<a xmlns="" href="#type-String_Variant_Map">String_Variant_Map</a>)
+ </dt><dd>
+ A dictionary mapping property names to variant boxed values
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>HwAddress</code> -
+ <code>s</code> -
+ <code>(read)</code></dt><dd>
+ Hardware address of the device.
+ </dd><dt><code>Carrier</code> -
+ <code>b</code> -
+ <code>(read)</code></dt><dd>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </dd></dl>
+
+ <h1><a name="org.freedesktop.NetworkManager.Device.Vlan" id="org.freedesktop.NetworkManager.Device.Vlan"></a>org.freedesktop.NetworkManager.Device.Vlan</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Vlan.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Vlan.PropertiesChanged">PropertiesChanged</a> (
+ a{sv}: properties
+ )</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
+ <code>a{sv}</code>
+ (<a xmlns="" href="#type-String_Variant_Map">String_Variant_Map</a>)
+ </dt><dd>
+ A dictionary mapping property names to variant boxed values
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>HwAddress</code> -
+ <code>s</code> -
+ <code>(read)</code></dt><dd>
+ Hardware address of the device.
+ </dd><dt><code>Carrier</code> -
+ <code>b</code> -
+ <code>(read)</code></dt><dd>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </dd><dt><code>VlanId</code> -
+ <code>u</code> -
+ <code>(read)</code></dt><dd>
+ The VLAN ID of this VLAN interface.
+ </dd></dl>
+
<h1><a name="org.freedesktop.NetworkManager.WiMax.Nsp" id="org.freedesktop.NetworkManager.WiMax.Nsp"></a>org.freedesktop.NetworkManager.WiMax.Nsp</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.WiMax.Nsp.PropertiesChanged" id="org.freedesktop.NetworkManager.WiMax.Nsp.PropertiesChanged">PropertiesChanged</a> (
a{sv}: properties
)</h3><div class="docstring"></div><div><h4>Parameters</h4><dl><dt><code>properties</code> -
@@ -1135,7 +1228,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<code>b</code> -
<code>(read)</code></dt><dd>Whether this active connection is the default IPv6 connection, i.e. whether it currently owns the default IPv6 route.</dd><dt><code>Vpn</code> -
<code>b</code> -
- <code>(read)</code></dt><dd>Whether this active connection is also a VPN connection.</dd></dl><h2>Enumerated types:</h2><h3><a name="type-NM_ACTIVE_CONNECTION_STATE" id="type-NM_ACTIVE_CONNECTION_STATE">NM_ACTIVE_CONNECTION_STATE</a></h3><dl><dt><code>NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0</code></dt><dd>
+ <code>(read)</code></dt><dd>Whether this active connection is also a VPN connection.</dd><dt><code>Master</code> -
+ <code>o</code> -
+ <code>(read)</code></dt><dd>The path to the master device if the connection is a slave.</dd></dl><h2>Enumerated types:</h2><h3><a name="type-NM_ACTIVE_CONNECTION_STATE" id="type-NM_ACTIVE_CONNECTION_STATE">NM_ACTIVE_CONNECTION_STATE</a></h3><dl><dt><code>NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0</code></dt><dd>
The active connection is in an unknown state.
</dd><dt><code>NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1</code></dt><dd>
The connection is activating.
@@ -1502,7 +1597,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<h2><a name="org.freedesktop.NetworkManager.VPN.Error.BadArguments" id="org.freedesktop.NetworkManager.VPN.Error.BadArguments"></a>org.freedesktop.NetworkManager.VPN.Error.BadArguments</h2>Invalid arguments were passed with the request. FIXME: too general.
<h2><a name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed" id="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"></a>org.freedesktop.NetworkManager.VPN.Error.LaunchFailed</h2>A binary providing the service failed to launch.
<h2><a name="org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid" id="org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid"></a>org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid</h2>The request could not be processed because the VPN connection settings were invalid.
-<h1>Index</h1><h2>Index of interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul><h2>Index of types</h2><ul><li><code><a href="#type-NM_802_11_AP_FLAGS">NM_802_11_AP_FLAGS</a></code>
+<h1>Index</h1><h2>Index of interfaces</h2><ul><li><code><a href="#org.freedesktop.NetworkManager">org.freedesktop.NetworkManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AccessPoint">org.freedesktop.NetworkManager.AccessPoint</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device">org.freedesktop.NetworkManager.Device</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wired">org.freedesktop.NetworkManager.Device.Wired</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Wireless">org.freedesktop.NetworkManager.Device.Wireless</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Modem">org.freedesktop.NetworkManager.Device.Modem</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bluetooth">org.freedesktop.NetworkManager.Device.Bluetooth</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.OlpcMesh">org.freedesktop.NetworkManager.Device.OlpcMesh</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.WiMax">org.freedesktop.NetworkManager.Device.WiMax</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Infiniband">org.freedesktop.NetworkManager.Device.Infiniband</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Bond">org.freedesktop.NetworkManager.Device.Bond</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Device.Vlan">org.freedesktop.NetworkManager.Device.Vlan</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.WiMax.Nsp">org.freedesktop.NetworkManager.WiMax.Nsp</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP4Config">org.freedesktop.NetworkManager.IP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.IP6Config">org.freedesktop.NetworkManager.IP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP4Config">org.freedesktop.NetworkManager.DHCP4Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.DHCP6Config">org.freedesktop.NetworkManager.DHCP6Config</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings">org.freedesktop.NetworkManager.Settings</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Settings.Connection">org.freedesktop.NetworkManager.Settings.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.Connection.Active">org.freedesktop.NetworkManager.Connection.Active</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.AgentManager">org.freedesktop.NetworkManager.AgentManager</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.SecretAgent">org.freedesktop.NetworkManager.SecretAgent</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Connection">org.freedesktop.NetworkManager.VPN.Connection</a></code></li><li><code><a href="#org.freedesktop.NetworkManager.VPN.Plugin">org.freedesktop.NetworkManager.VPN.Plugin</a></code></li></ul><h2>Index of types</h2><ul><li><code><a href="#type-NM_802_11_AP_FLAGS">NM_802_11_AP_FLAGS</a></code>
- u</li><li><code><a href="#type-NM_802_11_AP_SEC">NM_802_11_AP_SEC</a></code>
- u</li><li><code><a href="#type-NM_802_11_DEVICE_CAP">NM_802_11_DEVICE_CAP</a></code>
- u</li><li><code><a href="#type-NM_802_11_MODE">NM_802_11_MODE</a></code>
@@ -1512,7 +1607,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
- u</li><li><code><a href="#type-NM_DEVICE_MODEM_CAPABILITIES">NM_DEVICE_MODEM_CAPABILITIES</a></code>
- u</li><li><code><a href="#type-NM_DEVICE_STATE">NM_DEVICE_STATE</a></code>
- u</li><li><code><a href="#type-NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a></code>
- - u</li><li><code><a href="#type-NM_DEVICE_TYPE">NM_DEVICE_TYPE</a></code>
+ - u</li><li><code><a href="#type-NM_DEVICE_STATE_REASON_STRUCT">NM_DEVICE_STATE_REASON_STRUCT</a></code>
+ - ( u, u )
+ </li><li><code><a href="#type-NM_DEVICE_TYPE">NM_DEVICE_TYPE</a></code>
- u</li><li><code><a href="#type-NM_SECRET_AGENT_GET_SECRETS_FLAGS">NM_SECRET_AGENT_GET_SECRETS_FLAGS</a></code>
- u</li><li><code><a href="#type-NM_STATE">NM_STATE</a></code>
- u</li><li><code><a href="#type-NM_VPN_CONNECTION_STATE">NM_VPN_CONNECTION_STATE</a></code>
diff --git a/docs/api/version.xml b/docs/api/version.xml
index 594150e32..3544d2f06 100644
--- a/docs/api/version.xml
+++ b/docs/api/version.xml
@@ -1 +1 @@
-0.9.2.0
+0.9.4.0
diff --git a/docs/libnm-glib/Makefile.am b/docs/libnm-glib/Makefile.am
index dcca994b7..2057e3e95 100644
--- a/docs/libnm-glib/Makefile.am
+++ b/docs/libnm-glib/Makefile.am
@@ -30,7 +30,6 @@ CFILE_GLOB=$(top_srcdir)/libnm-glib/*.c
# Header files to ignore when scanning.
IGNORE_HFILES= \
- nm-dbus-utils.h \
nm-device-private.h \
nm-object-cache.h \
nm-object-private.h \
diff --git a/docs/libnm-glib/Makefile.in b/docs/libnm-glib/Makefile.in
index f8c948f33..828f78238 100644
--- a/docs/libnm-glib/Makefile.in
+++ b/docs/libnm-glib/Makefile.in
@@ -114,6 +114,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -168,11 +170,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -183,6 +189,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -222,6 +229,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,7 +325,6 @@ CFILE_GLOB = $(top_srcdir)/libnm-glib/*.c
# Header files to ignore when scanning.
IGNORE_HFILES = \
- nm-dbus-utils.h \
nm-device-private.h \
nm-object-cache.h \
nm-object-private.h \
diff --git a/docs/libnm-glib/html/NMAccessPoint.html b/docs/libnm-glib/html/NMAccessPoint.html
index 57efc51ff..4b43358c3 100644
--- a/docs/libnm-glib/html/NMAccessPoint.html
+++ b/docs/libnm-glib/html/NMAccessPoint.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMAccessPoint.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMAccessPoint.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMAccessPoint.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -80,6 +82,12 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.htm
</pre>
</div>
<div class="refsect1">
+<a name="NMAccessPoint.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMAccessPoint implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMAccessPoint.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMAccessPoint.html#NMAccessPoint--bssid" title='The "bssid" property'>bssid</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
@@ -211,7 +219,31 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.htm
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_access_point_connection_valid (<em class="parameter"><code><a class="link" href="NMAccessPoint.html" title="NMAccessPoint"><span class="type">NMAccessPoint</span></a> *ap</code></em>,
<em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
<p>
+Validates a given connection against a given WiFi access point to ensure that
+the connection may be activated with that AP. The connection must match the
+<em class="parameter"><code>ap</code></em>'s SSID, (if given) BSSID, and other attributes like security settings,
+channel, band, etc.
</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ap</code></em> :</span></p></td>
+<td>an <a class="link" href="NMAccessPoint.html" title="NMAccessPoint"><span class="type">NMAccessPoint</span></a> to validate <em class="parameter"><code>connection</code></em> against</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>an <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> to validate against <em class="parameter"><code>ap</code></em>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the connection may be activated with this WiFi AP,
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it cannot be.</td>
+</tr>
+</tbody>
+</table></div>
</div>
<hr>
<div class="refsect2">
@@ -224,6 +256,12 @@ return connections which may be activated with the access point. Any
returned connections will match the <em class="parameter"><code>ap</code></em>'s SSID and (if given) BSSID and
other attributes like security settings, channel, etc.
</p>
+<p>
+To obtain the list of connections that are compatible with this access point,
+use <a class="link" href="NMRemoteSettings.html#nm-remote-settings-list-connections" title="nm_remote_settings_list_connections ()"><code class="function">nm_remote_settings_list_connections()</code></a> and then filter the returned list
+for a given <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> using <a class="link" href="NMDevice.html#nm-device-filter-connections" title="nm_device_filter_connections ()"><code class="function">nm_device_filter_connections()</code></a> and finally
+filter that list with this function.
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
diff --git a/docs/libnm-glib/html/NMActiveConnection.html b/docs/libnm-glib/html/NMActiveConnection.html
index 15d628d7a..17ebafd43 100644
--- a/docs/libnm-glib/html/NMActiveConnection.html
+++ b/docs/libnm-glib/html/NMActiveConnection.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMActiveConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMActiveConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMActiveConnection.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -47,6 +49,7 @@
#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEFAULT:CAPS" title="NM_ACTIVE_CONNECTION_DEFAULT">NM_ACTIVE_CONNECTION_DEFAULT</a>
#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEFAULT6:CAPS" title="NM_ACTIVE_CONNECTION_DEFAULT6">NM_ACTIVE_CONNECTION_DEFAULT6</a>
#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEVICES:CAPS" title="NM_ACTIVE_CONNECTION_DEVICES">NM_ACTIVE_CONNECTION_DEVICES</a>
+#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-MASTER:CAPS" title="NM_ACTIVE_CONNECTION_MASTER">NM_ACTIVE_CONNECTION_MASTER</a>
#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-SPECIFIC-OBJECT:CAPS" title="NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT">NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT</a>
#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-STATE:CAPS" title="NM_ACTIVE_CONNECTION_STATE">NM_ACTIVE_CONNECTION_STATE</a>
#define <a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-UUID:CAPS" title="NM_ACTIVE_CONNECTION_UUID">NM_ACTIVE_CONNECTION_UUID</a>
@@ -54,6 +57,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMAct
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMActiveConnection.html#nm-active-connection-get-default" title="nm_active_connection_get_default ()">nm_active_connection_get_default</a> (<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMActiveConnection.html#nm-active-connection-get-default6" title="nm_active_connection_get_default6 ()">nm_active_connection_get_default6</a> (<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="NMActiveConnection.html#nm-active-connection-get-devices" title="nm_active_connection_get_devices ()">nm_active_connection_get_devices</a> (<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMActiveConnection.html#nm-active-connection-get-master" title="nm_active_connection_get_master ()">nm_active_connection_get_master</a> (<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMActiveConnection.html#nm-active-connection-get-specific-object" title="nm_active_connection_get_specific_object ()">nm_active_connection_get_specific_object</a>
(<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);
<span class="returnvalue">NMActiveConnectionState</span> <a class="link" href="NMActiveConnection.html#nm-active-connection-get-state" title="nm_active_connection_get_state ()">nm_active_connection_get_state</a> (<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);
@@ -72,14 +76,22 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMAct
</pre>
</div>
<div class="refsect1">
+<a name="NMActiveConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMActiveConnection implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMActiveConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMActiveConnection.html#NMActiveConnection--connection" title='The "connection" property'>connection</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
"<a class="link" href="NMActiveConnection.html#NMActiveConnection--default" title='The "default" property'>default</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
"<a class="link" href="NMActiveConnection.html#NMActiveConnection--default6" title='The "default6" property'>default6</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
"<a class="link" href="NMActiveConnection.html#NMActiveConnection--devices" title='The "devices" property'>devices</a>" <span class="type">NMObjectArray</span>* : Read
+ "<a class="link" href="NMActiveConnection.html#NMActiveConnection--master" title='The "master" property'>master</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
"<a class="link" href="NMActiveConnection.html#NMActiveConnection--specific-object" title='The "specific-object" property'>specific-object</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
"<a class="link" href="NMActiveConnection.html#NMActiveConnection--state" title='The "state" property'>state</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
+ "<a class="link" href="NMActiveConnection.html#NMActiveConnection--uuid" title='The "uuid" property'>uuid</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
</pre>
</div>
<div class="refsect1">
@@ -147,6 +159,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMAct
</div>
<hr>
<div class="refsect2">
+<a name="NM-ACTIVE-CONNECTION-MASTER:CAPS"></a><h3>NM_ACTIVE_CONNECTION_MASTER</h3>
+<pre class="programlisting">#define NM_ACTIVE_CONNECTION_MASTER "master"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-ACTIVE-CONNECTION-SPECIFIC-OBJECT:CAPS"></a><h3>NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT</h3>
<pre class="programlisting">#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object"
</pre>
@@ -266,6 +286,29 @@ This is the internal copy used by the connection, and must not be modified. <spa
</div>
<hr>
<div class="refsect2">
+<a name="nm-active-connection-get-master"></a><h3>nm_active_connection_get_master ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_active_connection_get_master (<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);</pre>
+<p>
+Gets the path to the master <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> of the connection.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>a <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the path of the master <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> of the <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a>.
+This is the internal string used by the connection, and must not be modified.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-active-connection-get-specific-object"></a><h3>nm_active_connection_get_specific_object ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * nm_active_connection_get_specific_object
(<em class="parameter"><code><a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> *connection</code></em>);</pre>
@@ -398,6 +441,15 @@ Whether the active connection is the default IPv6 one.
</div>
<hr>
<div class="refsect2">
+<a name="NMActiveConnection--master"></a><h3>The <code class="literal">"master"</code> property</h3>
+<pre class="programlisting"> "master" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read</pre>
+<p>
+The path of the master device if one exists.
+</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMActiveConnection--specific-object"></a><h3>The <code class="literal">"specific-object"</code> property</h3>
<pre class="programlisting"> "specific-object" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read</pre>
<p>
@@ -415,6 +467,15 @@ The state of the active connection.
<p>Allowed values: &lt;= 3</p>
<p>Default value: 0</p>
</div>
+<hr>
+<div class="refsect2">
+<a name="NMActiveConnection--uuid"></a><h3>The <code class="literal">"uuid"</code> property</h3>
+<pre class="programlisting"> "uuid" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read</pre>
+<p>
+The active connection's UUID
+</p>
+<p>Default value: NULL</p>
+</div>
</div>
</div>
<div class="footer">
diff --git a/docs/libnm-glib/html/NMClient.html b/docs/libnm-glib/html/NMClient.html
index 810153472..7133c4892 100644
--- a/docs/libnm-glib/html/NMClient.html
+++ b/docs/libnm-glib/html/NMClient.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMClient.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMClient.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMClient.properties" class="shortcut">Properties</a>
 | 
<a href="#NMClient.signals" class="shortcut">Signals</a>
@@ -98,8 +100,13 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCli
<span class="returnvalue">void</span> <a class="link" href="NMClient.html#nm-client-networking-set-enabled" title="nm_client_networking_set_enabled ()">nm_client_networking_set_enabled</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);
<a class="link" href="NMClient.html" title="NMClient"><span class="returnvalue">NMClient</span></a> * <a class="link" href="NMClient.html#nm-client-new" title="nm_client_new ()">nm_client_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span> <a class="link" href="NMClient.html#nm-client-new-async" title="nm_client_new_async ()">nm_client_new_async</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
+<a class="link" href="NMClient.html" title="NMClient"><span class="returnvalue">NMClient</span></a> * <a class="link" href="NMClient.html#nm-client-new-finish" title="nm_client_new_finish ()">nm_client_new_finish</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="NMClient.html#nm-client-sleep" title="nm_client_sleep ()">nm_client_sleep</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>,
- <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sleep</code></em>);
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sleep_</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMClient.html#nm-client-wimax-get-enabled" title="nm_client_wimax_get_enabled ()">nm_client_wimax_get_enabled</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMClient.html#nm-client-wimax-hardware-get-enabled" title="nm_client_wimax_hardware_get_enabled ()">nm_client_wimax_hardware_get_enabled</a>
(<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>);
@@ -125,6 +132,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCli
</pre>
</div>
<div class="refsect1">
+<a name="NMClient.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMClient implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMClient.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMClient.html#NMClient--active-connections" title='The "active-connections" property'>active-connections</a>" <span class="type">NMObjectArray</span>* : Read
@@ -734,6 +747,16 @@ all controlled interfaces are available for activation.
<p>
Creates a new <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a>.
</p>
+<p>
+Note that this will do blocking D-Bus calls to initialize the
+client. You can use <a class="link" href="NMClient.html#nm-client-new-async" title="nm_client_new_async ()"><code class="function">nm_client_new_async()</code></a> if you want to avoid
+that.
+</p>
+<p>
+NOTE: <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> provides information about devices and a mechanism to
+control them. To access and modify network configuration data, use the
+<a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="type">NMRemoteSettings</span></a> object.
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
@@ -745,9 +768,73 @@ Creates a new <a class="link" href="NMClient.html" title="NMClient"><span class=
</div>
<hr>
<div class="refsect2">
+<a name="nm-client-new-async"></a><h3>nm_client_new_async ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> nm_client_new_async (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
+<p>
+Creates a new <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> and begins asynchronously initializing it.
+<em class="parameter"><code>callback</code></em> will be called when it is done; use
+<a class="link" href="NMClient.html#nm-client-new-finish" title="nm_client_new_finish ()"><code class="function">nm_client_new_finish()</code></a> to get the result.
+</p>
+<p>
+NOTE: <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> provides information about devices and a mechanism to
+control them. To access and modify network configuration data, use the
+<a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="type">NMRemoteSettings</span></a> object.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
+<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
+<td>callback to call when the client is created</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td>data for <em class="parameter"><code>callback</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-client-new-finish"></a><h3>nm_client_new_finish ()</h3>
+<pre class="programlisting"><a class="link" href="NMClient.html" title="NMClient"><span class="returnvalue">NMClient</span></a> * nm_client_new_finish (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
+<p>
+Gets the result of an <a class="link" href="NMClient.html#nm-client-new-async" title="nm_client_new_async ()"><code class="function">nm_client_new_async()</code></a> call.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
+<td>a <a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> on error</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-client-sleep"></a><h3>nm_client_sleep ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> nm_client_sleep (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>,
- <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sleep</code></em>);</pre>
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sleep_</code></em>);</pre>
<p>
Deprecated; use <a class="link" href="NMClient.html#nm-client-networking-set-enabled" title="nm_client_networking_set_enabled ()"><code class="function">nm_client_networking_set_enabled()</code></a> instead.
</p>
@@ -760,7 +847,7 @@ Deprecated; use <a class="link" href="NMClient.html#nm-client-networking-set-ena
</td>
</tr>
<tr>
-<td><p><span class="term"><em class="parameter"><code>sleep</code></em> :</span></p></td>
+<td><p><span class="term"><em class="parameter"><code>sleep_</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to put the daemon to sleep</td>
</tr>
diff --git a/docs/libnm-glib/html/NMDHCP4Config.html b/docs/libnm-glib/html/NMDHCP4Config.html
index 902e6f06f..597e818df 100644
--- a/docs/libnm-glib/html/NMDHCP4Config.html
+++ b/docs/libnm-glib/html/NMDHCP4Config.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDHCP4Config.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDHCP4Config.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDHCP4Config.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -60,6 +62,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDHC
</pre>
</div>
<div class="refsect1">
+<a name="NMDHCP4Config.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDHCP4Config implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDHCP4Config.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDHCP4Config.html#NMDHCP4Config--options" title='The "options" property'>options</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>* : Read
diff --git a/docs/libnm-glib/html/NMDHCP6Config.html b/docs/libnm-glib/html/NMDHCP6Config.html
index 757e6cdfa..a6be2c669 100644
--- a/docs/libnm-glib/html/NMDHCP6Config.html
+++ b/docs/libnm-glib/html/NMDHCP6Config.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDHCP6Config.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDHCP6Config.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDHCP6Config.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -60,6 +62,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDHC
</pre>
</div>
<div class="refsect1">
+<a name="NMDHCP6Config.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDHCP6Config implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDHCP6Config.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDHCP6Config.html#NMDHCP6Config--options" title='The "options" property'>options</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>* : Read
diff --git a/docs/libnm-glib/html/NMDevice.html b/docs/libnm-glib/html/NMDevice.html
index 0ffed7998..e507f9e09 100644
--- a/docs/libnm-glib/html/NMDevice.html
+++ b/docs/libnm-glib/html/NMDevice.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDevice.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDevice.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDevice.properties" class="shortcut">Properties</a>
 | 
<a href="#NMDevice.signals" class="shortcut">Signals</a>
@@ -62,6 +64,7 @@
#define <a class="link" href="NMDevice.html#NM-DEVICE-MANAGED:CAPS" title="NM_DEVICE_MANAGED">NM_DEVICE_MANAGED</a>
#define <a class="link" href="NMDevice.html#NM-DEVICE-PRODUCT:CAPS" title="NM_DEVICE_PRODUCT">NM_DEVICE_PRODUCT</a>
#define <a class="link" href="NMDevice.html#NM-DEVICE-STATE:CAPS" title="NM_DEVICE_STATE">NM_DEVICE_STATE</a>
+#define <a class="link" href="NMDevice.html#NM-DEVICE-STATE-REASON:CAPS" title="NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a>
#define <a class="link" href="NMDevice.html#NM-DEVICE-UDI:CAPS" title="NM_DEVICE_UDI">NM_DEVICE_UDI</a>
#define <a class="link" href="NMDevice.html#NM-DEVICE-VENDOR:CAPS" title="NM_DEVICE_VENDOR">NM_DEVICE_VENDOR</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMDevice.html#nm-device-connection-valid" title="nm_device_connection_valid ()">nm_device_connection_valid</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>,
@@ -85,6 +88,8 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMDevice.html#nm-device-get-managed" title="nm_device_get_managed ()">nm_device_get_managed</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMDevice.html#nm-device-get-product" title="nm_device_get_product ()">nm_device_get_product</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>);
<span class="returnvalue">NMDeviceState</span> <a class="link" href="NMDevice.html#nm-device-get-state" title="nm_device_get_state ()">nm_device_get_state</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>);
+<span class="returnvalue">NMDeviceState</span> <a class="link" href="NMDevice.html#nm-device-get-state-reason" title="nm_device_get_state_reason ()">nm_device_get_state_reason</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>,
+ <em class="parameter"><code><span class="type">NMDeviceStateReason</span> *reason</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMDevice.html#nm-device-get-udi" title="nm_device_get_udi ()">nm_device_get_udi</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMDevice.html#nm-device-get-vendor" title="nm_device_get_vendor ()">nm_device_get_vendor</a> (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>);
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * <a class="link" href="NMDevice.html#nm-device-new" title="nm_device_new ()">nm_device_new</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a> *connection</code></em>,
@@ -102,14 +107,24 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
+----<a class="link" href="NMDeviceModem.html" title="NMDeviceModem">NMDeviceModem</a>
+----<a class="link" href="NMDeviceBt.html" title="NMDeviceBt">NMDeviceBt</a>
+----<a class="link" href="NMDeviceWimax.html" title="NMDeviceWimax">NMDeviceWimax</a>
+ +----NMDeviceOlpcMesh
+ +----NMDeviceInfiniband
+ +----NMDeviceBond
+ +----NMDeviceVlan
</pre>
</div>
<div class="refsect1">
+<a name="NMDevice.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDevice implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDevice.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDevice.html#NMDevice--active-connection" title='The "active-connection" property'>active-connection</a>" <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a>* : Read
"<a class="link" href="NMDevice.html#NMDevice--capabilities" title='The "capabilities" property'>capabilities</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
- "<a class="link" href="NMDevice.html#NMDevice--device-type" title='The "device-type" property'>device-type</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only
+ "<a class="link" href="NMDevice.html#NMDevice--device-type" title='The "device-type" property'>device-type</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
"<a class="link" href="NMDevice.html#NMDevice--dhcp4-config" title='The "dhcp4-config" property'>dhcp4-config</a>" <a class="link" href="NMDHCP4Config.html" title="NMDHCP4Config"><span class="type">NMDHCP4Config</span></a>* : Read
"<a class="link" href="NMDevice.html#NMDevice--dhcp6-config" title='The "dhcp6-config" property'>dhcp6-config</a>" <a class="link" href="NMDHCP6Config.html" title="NMDHCP6Config"><span class="type">NMDHCP6Config</span></a>* : Read
"<a class="link" href="NMDevice.html#NMDevice--driver" title='The "driver" property'>driver</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
@@ -121,6 +136,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
"<a class="link" href="NMDevice.html#NMDevice--managed" title='The "managed" property'>managed</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
"<a class="link" href="NMDevice.html#NMDevice--product" title='The "product" property'>product</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
"<a class="link" href="NMDevice.html#NMDevice--state" title='The "state" property'>state</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
+ "<a class="link" href="NMDevice.html#NMDevice--state-reason" title='The "state-reason" property'>state-reason</a>" <span class="type">GValueArray_guint+guint_*</span> : Read
"<a class="link" href="NMDevice.html#NMDevice--udi" title='The "udi" property'>udi</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
"<a class="link" href="NMDevice.html#NMDevice--vendor" title='The "vendor" property'>vendor</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
</pre>
@@ -156,8 +172,9 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
NMDeviceState old_state,
NMDeviceStateReason reason);
- gboolean (*connection_valid) (NMDevice *device,
- NMConnection *connection);
+ gboolean (*connection_compatible) (NMDevice *device,
+ NMConnection *connection,
+ GError **error);
/* Padding for future expansion */
void (*_reserved1) (void);
@@ -294,6 +311,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
</div>
<hr>
<div class="refsect2">
+<a name="NM-DEVICE-STATE-REASON:CAPS"></a><h3>NM_DEVICE_STATE_REASON</h3>
+<pre class="programlisting">#define NM_DEVICE_STATE_REASON "state-reason"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-DEVICE-UDI:CAPS"></a><h3>NM_DEVICE_UDI</h3>
<pre class="programlisting">#define NM_DEVICE_UDI "udi"
</pre>
@@ -388,7 +413,8 @@ is a WiFi device that supports only WEP encryption, the returned list will
contain any WiFi connections in <em class="parameter"><code>connections</code></em> that allow connection to
unencrypted or WEP-enabled SSIDs. The returned list will not contain
Ethernet, Bluetooth, WiFi WPA connections, or any other connection that is
-incompatible with the device.
+incompatible with the device. To get the full list of connections see
+<a class="link" href="NMRemoteSettings.html#nm-remote-settings-list-connections" title="nm_remote_settings_list_connections ()"><code class="function">nm_remote_settings_list_connections()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -741,6 +767,35 @@ Gets the current <a class="link" href="NMDevice.html" title="NMDevice"><span cla
</div>
<hr>
<div class="refsect2">
+<a name="nm-device-get-state-reason"></a><h3>nm_device_get_state_reason ()</h3>
+<pre class="programlisting"><span class="returnvalue">NMDeviceState</span> nm_device_get_state_reason (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>,
+ <em class="parameter"><code><span class="type">NMDeviceStateReason</span> *reason</code></em>);</pre>
+<p>
+Gets the current <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> state (return value) and the reason for entering
+the state (<em class="parameter"><code>reason</code></em> argument).
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
+<td>a <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>reason</code></em> :</span></p></td>
+<td>location to store reason (<span class="type">NMDeviceStateReason</span>), or NULL. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the current device state</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-device-get-udi"></a><h3>nm_device_get_udi ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * nm_device_get_udi (<em class="parameter"><code><a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> *device</code></em>);</pre>
<p>
@@ -836,7 +891,7 @@ The capabilities of the device.
<hr>
<div class="refsect2">
<a name="NMDevice--device-type"></a><h3>The <code class="literal">"device-type"</code> property</h3>
-<pre class="programlisting"> "device-type" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre>
+<pre class="programlisting"> "device-type" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read</pre>
<p>
The numeric type of the device.
</p>
@@ -941,6 +996,14 @@ The state of the device.
</div>
<hr>
<div class="refsect2">
+<a name="NMDevice--state-reason"></a><h3>The <code class="literal">"state-reason"</code> property</h3>
+<pre class="programlisting"> "state-reason" <span class="type">GValueArray_guint+guint_*</span> : Read</pre>
+<p>
+The state and reason of the device.
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMDevice--udi"></a><h3>The <code class="literal">"udi"</code> property</h3>
<pre class="programlisting"> "udi" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read</pre>
<p>
diff --git a/docs/libnm-glib/html/NMDeviceBt.html b/docs/libnm-glib/html/NMDeviceBt.html
index f69db8867..b41291a50 100644
--- a/docs/libnm-glib/html/NMDeviceBt.html
+++ b/docs/libnm-glib/html/NMDeviceBt.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDeviceBt.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDeviceBt.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDeviceBt.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -63,6 +65,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
</pre>
</div>
<div class="refsect1">
+<a name="NMDeviceBt.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDeviceBt implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDeviceBt.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDeviceBt.html#NMDeviceBt--bt-capabilities" title='The "bt-capabilities" property'>bt-capabilities</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
diff --git a/docs/libnm-glib/html/NMDeviceEthernet.html b/docs/libnm-glib/html/NMDeviceEthernet.html
index cdadb509a..786a58428 100644
--- a/docs/libnm-glib/html/NMDeviceEthernet.html
+++ b/docs/libnm-glib/html/NMDeviceEthernet.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDeviceEthernet.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDeviceEthernet.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDeviceEthernet.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -66,6 +68,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
</pre>
</div>
<div class="refsect1">
+<a name="NMDeviceEthernet.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDeviceEthernet implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDeviceEthernet.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDeviceEthernet.html#NMDeviceEthernet--carrier" title='The "carrier" property'>carrier</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
diff --git a/docs/libnm-glib/html/NMDeviceModem.html b/docs/libnm-glib/html/NMDeviceModem.html
index 0ab7408db..751da6e35 100644
--- a/docs/libnm-glib/html/NMDeviceModem.html
+++ b/docs/libnm-glib/html/NMDeviceModem.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDeviceModem.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDeviceModem.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDeviceModem.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -61,6 +63,12 @@
</pre>
</div>
<div class="refsect1">
+<a name="NMDeviceModem.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDeviceModem implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDeviceModem.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDeviceModem.html#NMDeviceModem--current-capabilities" title='The "current-capabilities" property'>current-capabilities</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
diff --git a/docs/libnm-glib/html/NMDeviceWifi.html b/docs/libnm-glib/html/NMDeviceWifi.html
index fe9c30212..f08d0b795 100644
--- a/docs/libnm-glib/html/NMDeviceWifi.html
+++ b/docs/libnm-glib/html/NMDeviceWifi.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDeviceWifi.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDeviceWifi.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDeviceWifi.properties" class="shortcut">Properties</a>
 | 
<a href="#NMDeviceWifi.signals" class="shortcut">Signals</a>
@@ -78,6 +80,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev
</pre>
</div>
<div class="refsect1">
+<a name="NMDeviceWifi.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDeviceWifi implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDeviceWifi.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDeviceWifi.html#NMDeviceWifi--active-access-point" title='The "active-access-point" property'>active-access-point</a>" <a class="link" href="NMAccessPoint.html" title="NMAccessPoint"><span class="type">NMAccessPoint</span></a>* : Read
diff --git a/docs/libnm-glib/html/NMDeviceWimax.html b/docs/libnm-glib/html/NMDeviceWimax.html
index 33bd25094..6daa921a1 100644
--- a/docs/libnm-glib/html/NMDeviceWimax.html
+++ b/docs/libnm-glib/html/NMDeviceWimax.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMDeviceWimax.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMDeviceWimax.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMDeviceWimax.properties" class="shortcut">Properties</a>
 | 
<a href="#NMDeviceWimax.signals" class="shortcut">Signals</a>
@@ -77,6 +79,12 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.
</pre>
</div>
<div class="refsect1">
+<a name="NMDeviceWimax.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMDeviceWimax implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMDeviceWimax.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMDeviceWimax.html#NMDeviceWimax--active-nsp" title='The "active-nsp" property'>active-nsp</a>" <a class="link" href="NMWimaxNsp.html" title="NMWimaxNsp"><span class="type">NMWimaxNsp</span></a>* : Read
diff --git a/docs/libnm-glib/html/NMIP4Config.html b/docs/libnm-glib/html/NMIP4Config.html
index 67a8f4fd9..b828b574b 100644
--- a/docs/libnm-glib/html/NMIP4Config.html
+++ b/docs/libnm-glib/html/NMIP4Config.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMIP4Config.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMIP4Config.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMIP4Config.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -66,6 +68,12 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GAr
</pre>
</div>
<div class="refsect1">
+<a name="NMIP4Config.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMIP4Config implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMIP4Config.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMIP4Config.html#NMIP4Config--addresses" title='The "addresses" property'>addresses</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read
diff --git a/docs/libnm-glib/html/NMIP6Config.html b/docs/libnm-glib/html/NMIP6Config.html
index 36385aad4..bc6c9d533 100644
--- a/docs/libnm-glib/html/NMIP6Config.html
+++ b/docs/libnm-glib/html/NMIP6Config.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMIP6Config.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMIP6Config.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMIP6Config.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -64,6 +66,12 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-L
</pre>
</div>
<div class="refsect1">
+<a name="NMIP6Config.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMIP6Config implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMIP6Config.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMIP6Config.html#NMIP6Config--addresses" title='The "addresses" property'>addresses</a>" <span class="type">NMIP6AddressObjectArray</span>* : Read
diff --git a/docs/libnm-glib/html/NMObject.html b/docs/libnm-glib/html/NMObject.html
index c336d4327..24bb42769 100644
--- a/docs/libnm-glib/html/NMObject.html
+++ b/docs/libnm-glib/html/NMObject.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMObject.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMObject.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMObject.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -66,6 +68,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMObj
</pre>
</div>
<div class="refsect1">
+<a name="NMObject.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMObject implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMObject.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMObject.html#NMObject--dbus-connection" title='The "dbus-connection" property'>dbus-connection</a>" <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a>* : Read / Write / Construct Only
diff --git a/docs/libnm-glib/html/NMRemoteConnection.html b/docs/libnm-glib/html/NMRemoteConnection.html
index a674fe2f7..531ab09d9 100644
--- a/docs/libnm-glib/html/NMRemoteConnection.html
+++ b/docs/libnm-glib/html/NMRemoteConnection.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMRemoteConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMRemoteConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMRemoteConnection.properties" class="shortcut">Properties</a>
 | 
<a href="#NMRemoteConnection.signals" class="shortcut">Signals</a>
@@ -80,10 +82,15 @@
</pre>
</div>
<div class="refsect1">
+<a name="NMRemoteConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMRemoteConnection implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMRemoteConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMRemoteConnection.html#NMRemoteConnection--bus" title='The "bus" property'>bus</a>" <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a>* : Write / Construct Only
- "<a class="link" href="NMRemoteConnection.html#NMRemoteConnection--init-result" title='The "init-result" property'>init-result</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read
</pre>
</div>
<div class="refsect1">
@@ -307,14 +314,6 @@ Creates a new object representing the remote connection.
<pre class="programlisting"> "bus" <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a>* : Write / Construct Only</pre>
<p>DBusGConnection.</p>
</div>
-<hr>
-<div class="refsect2">
-<a name="NMRemoteConnection--init-result"></a><h3>The <code class="literal">"init-result"</code> property</h3>
-<pre class="programlisting"> "init-result" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read</pre>
-<p>Initialization result (PRIVATE).</p>
-<p>Allowed values: &lt;= 2</p>
-<p>Default value: 0</p>
-</div>
</div>
<div class="refsect1">
<a name="NMRemoteConnection.signal-details"></a><h2>Signal Details</h2>
diff --git a/docs/libnm-glib/html/NMRemoteSettings.html b/docs/libnm-glib/html/NMRemoteSettings.html
index 558cec463..4ed57b089 100644
--- a/docs/libnm-glib/html/NMRemoteSettings.html
+++ b/docs/libnm-glib/html/NMRemoteSettings.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMRemoteSettings.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMRemoteSettings.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMRemoteSettings.properties" class="shortcut">Properties</a>
 | 
<a href="#NMRemoteSettings.signals" class="shortcut">Signals</a>
@@ -57,6 +59,7 @@ enum <a class="link" href="NMRemoteSettings.html#NMRemoteSettings
#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-BUS:CAPS" title="NM_REMOTE_SETTINGS_BUS">NM_REMOTE_SETTINGS_BUS</a>
#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-CAN-MODIFY:CAPS" title="NM_REMOTE_SETTINGS_CAN_MODIFY">NM_REMOTE_SETTINGS_CAN_MODIFY</a>
#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-CONNECTIONS-READ:CAPS" title="NM_REMOTE_SETTINGS_CONNECTIONS_READ">NM_REMOTE_SETTINGS_CONNECTIONS_READ</a>
+#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-ERROR:CAPS" title="NM_REMOTE_SETTINGS_ERROR">NM_REMOTE_SETTINGS_ERROR</a>
#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-HOSTNAME:CAPS" title="NM_REMOTE_SETTINGS_HOSTNAME">NM_REMOTE_SETTINGS_HOSTNAME</a>
#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-NEW-CONNECTION:CAPS" title="NM_REMOTE_SETTINGS_NEW_CONNECTION">NM_REMOTE_SETTINGS_NEW_CONNECTION</a>
#define <a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-SERVICE-RUNNING:CAPS" title="NM_REMOTE_SETTINGS_SERVICE_RUNNING">NM_REMOTE_SETTINGS_SERVICE_RUNNING</a>
@@ -73,6 +76,12 @@ enum <a class="link" href="NMRemoteSettings.html#NMRemoteSettings
<em class="parameter"><code>const <span class="type">char</span> *uuid</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="NMRemoteSettings.html#nm-remote-settings-list-connections" title="nm_remote_settings_list_connections ()">nm_remote_settings_list_connections</a> (<em class="parameter"><code><a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="type">NMRemoteSettings</span></a> *settings</code></em>);
<a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="returnvalue">NMRemoteSettings</span></a> * <a class="link" href="NMRemoteSettings.html#nm-remote-settings-new" title="nm_remote_settings_new ()">nm_remote_settings_new</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a> *bus</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-async" title="nm_remote_settings_new_async ()">nm_remote_settings_new_async</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a> *bus</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
+<a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="returnvalue">NMRemoteSettings</span></a> * <a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-finish" title="nm_remote_settings_new_finish ()">nm_remote_settings_new_finish</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMRemoteSettings.html#nm-remote-settings-save-hostname" title="nm_remote_settings_save_hostname ()">nm_remote_settings_save_hostname</a> (<em class="parameter"><code><a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="type">NMRemoteSettings</span></a> *settings</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *hostname</code></em>,
<em class="parameter"><code><a class="link" href="NMRemoteSettings.html#NMRemoteSettingsSaveHostnameFunc" title="NMRemoteSettingsSaveHostnameFunc ()"><span class="type">NMRemoteSettingsSaveHostnameFunc</span></a> callback</code></em>,
@@ -87,6 +96,12 @@ enum <a class="link" href="NMRemoteSettings.html#NMRemoteSettings
</pre>
</div>
<div class="refsect1">
+<a name="NMRemoteSettings.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMRemoteSettings implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMRemoteSettings.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMRemoteSettings.html#NMRemoteSettings--bus" title='The "bus" property'>bus</a>" <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a>* : Read / Write / Construct Only
@@ -154,9 +169,9 @@ enum <a class="link" href="NMRemoteSettings.html#NMRemoteSettings
<div class="refsect2">
<a name="NMRemoteSettingsError"></a><h3>enum NMRemoteSettingsError</h3>
<pre class="programlisting">typedef enum {
- NM_REMOTE_SETTINGS_ERROR_UNKNOWN = 0,
- NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED,
- NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE,
+ NM_REMOTE_SETTINGS_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED, /*&lt; nick=ConnectionRemoved &gt;*/
+ NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE, /*&lt; nick=ConnectionUnavailable &gt;*/
} NMRemoteSettingsError;
</pre>
<p>
@@ -220,6 +235,14 @@ Describes errors that may result from operations involving a <a class="link" hre
</div>
<hr>
<div class="refsect2">
+<a name="NM-REMOTE-SETTINGS-ERROR:CAPS"></a><h3>NM_REMOTE_SETTINGS_ERROR</h3>
+<pre class="programlisting">#define NM_REMOTE_SETTINGS_ERROR nm_remote_settings_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-REMOTE-SETTINGS-HOSTNAME:CAPS"></a><h3>NM_REMOTE_SETTINGS_HOSTNAME</h3>
<pre class="programlisting">#define NM_REMOTE_SETTINGS_HOSTNAME "hostname"
</pre>
@@ -390,6 +413,11 @@ using <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-L
<p>
Creates a new object representing the remote settings service.
</p>
+<p>
+Note that this will do blocking D-Bus calls to initialize the
+settings object. You can use <a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-async" title="nm_remote_settings_new_async ()"><code class="function">nm_remote_settings_new_async()</code></a> if you
+want to avoid that.
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
@@ -407,6 +435,72 @@ Creates a new object representing the remote settings service.
</div>
<hr>
<div class="refsect2">
+<a name="nm-remote-settings-new-async"></a><h3>nm_remote_settings_new_async ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> nm_remote_settings_new_async (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a> *bus</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
+<p>
+Creates a new object representing the remote settings service and
+begins asynchronously initializing it. <em class="parameter"><code>callback</code></em> will be called
+when it is done; use <a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-finish" title="nm_remote_settings_new_finish ()"><code class="function">nm_remote_settings_new_finish()</code></a> to get the
+result.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>bus</code></em> :</span></p></td>
+<td>a valid and connected D-Bus connection. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
+<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
+<td>callback to call when the settings object is created</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td>data for <em class="parameter"><code>callback</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-remote-settings-new-finish"></a><h3>nm_remote_settings_new_finish ()</h3>
+<pre class="programlisting"><a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="returnvalue">NMRemoteSettings</span></a> * nm_remote_settings_new_finish (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
+<p>
+Gets the result of an <a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-async" title="nm_remote_settings_new_async ()"><code class="function">nm_remote_settings_new_async()</code></a> call.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
+<td>a <a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="type">NMRemoteSettings</span></a> object, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> on error</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-remote-settings-save-hostname"></a><h3>nm_remote_settings_save_hostname ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_remote_settings_save_hostname (<em class="parameter"><code><a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings"><span class="type">NMRemoteSettings</span></a> *settings</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *hostname</code></em>,
diff --git a/docs/libnm-glib/html/NMSecretAgent.html b/docs/libnm-glib/html/NMSecretAgent.html
index c080405b1..f7254c2a0 100644
--- a/docs/libnm-glib/html/NMSecretAgent.html
+++ b/docs/libnm-glib/html/NMSecretAgent.html
@@ -61,6 +61,7 @@ enum <a class="link" href="NMSecretAgent.html#NMSecretAgentGetSec
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
#define <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-AUTO-REGISTER:CAPS" title="NM_SECRET_AGENT_AUTO_REGISTER">NM_SECRET_AGENT_AUTO_REGISTER</a>
+#define <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-ERROR:CAPS" title="NM_SECRET_AGENT_ERROR">NM_SECRET_AGENT_ERROR</a>
#define <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-IDENTIFIER:CAPS" title="NM_SECRET_AGENT_IDENTIFIER">NM_SECRET_AGENT_IDENTIFIER</a>
#define <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-REGISTRATION-RESULT:CAPS" title="NM_SECRET_AGENT_REGISTRATION_RESULT">NM_SECRET_AGENT_REGISTRATION_RESULT</a>
<span class="returnvalue">void</span> <a class="link" href="NMSecretAgent.html#nm-secret-agent-delete-secrets" title="nm_secret_agent_delete_secrets ()">nm_secret_agent_delete_secrets</a> (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
@@ -95,6 +96,7 @@ enum <a class="link" href="NMSecretAgent.html#NMSecretAgentGetSec
<pre class="synopsis">
"<a class="link" href="NMSecretAgent.html#NMSecretAgent--auto-register" title='The "auto-register" property'>auto-register</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
"<a class="link" href="NMSecretAgent.html#NMSecretAgent--identifier" title='The "identifier" property'>identifier</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
+ "<a class="link" href="NMSecretAgent.html#NMSecretAgent--registered" title='The "registered" property'>registered</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read
</pre>
</div>
<div class="refsect1">
@@ -197,18 +199,42 @@ enum <a class="link" href="NMSecretAgent.html#NMSecretAgentGetSec
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
+Called as a result of a request by NM to delete secrets. When the
+<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> subclass has finished deleting the secrets, this function
+should be called.
</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
+<td>the secret agent object</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the connection for which secrets were to be deleted</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>if the deleting secrets failed, give a descriptive error here</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td>caller-specific data to be passed to the function</td>
+</tr>
+</tbody>
+</table></div>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentError"></a><h3>enum NMSecretAgentError</h3>
<pre class="programlisting">typedef enum {
- NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED = 0,
- NM_SECRET_AGENT_ERROR_INVALID_CONNECTION,
- NM_SECRET_AGENT_ERROR_USER_CANCELED,
- NM_SECRET_AGENT_ERROR_AGENT_CANCELED,
- NM_SECRET_AGENT_ERROR_INTERNAL_ERROR,
- NM_SECRET_AGENT_ERROR_NO_SECRETS,
+ NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED = 0, /*&lt; nick=NotAuthorized &gt;*/
+ NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, /*&lt; nick=InvalidConnection &gt;*/
+ NM_SECRET_AGENT_ERROR_USER_CANCELED, /*&lt; nick=UserCanceled &gt;*/
+ NM_SECRET_AGENT_ERROR_AGENT_CANCELED, /*&lt; nick=AgentCanceled &gt;*/
+ NM_SECRET_AGENT_ERROR_INTERNAL_ERROR, /*&lt; nick=InternalError &gt;*/
+ NM_SECRET_AGENT_ERROR_NO_SECRETS, /*&lt; nick=NoSecrets &gt;*/
} NMSecretAgentError;
</pre>
<p>
@@ -263,7 +289,93 @@ is allowed.
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
+Called as a result of a request by NM to retrieve secrets. When the
+<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> subclass has finished retrieving secrets and is ready to
+return them, or to return an error, this function should be called with
+those secrets or the error.
+</p>
+<p>
+To easily create the hash table to return the WiFi PSK, you could do
+something like this:
</p>
+<div class="example">
+<a name="id667964"></a><p class="title"><b>Example 1. Creating a secrets hash</b></p>
+<div class="example-contents">
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16</pre></td>
+ <td class="listing_code"><pre class="programlisting"><span class="usertype">NMConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">secrets</span><span class="symbol">;</span>
+<span class="usertype">NMSettingWirelessSecurity</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">s_wsec</span><span class="symbol">;</span>
+<span class="usertype">GHashTable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">secrets_hash</span><span class="symbol">;</span>
+
+<span class="normal">secrets </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-new">nm_connection_new</a></span><span class="normal"> </span><span class="symbol">();</span>
+<span class="normal">s_wsec </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSettingWirelessSecurity.html">NMSettingWirelessSecurity</a> </span><span class="symbol">*)</span><span class="normal"> </span><span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSettingWirelessSecurity.html#nm-setting-wireless-security-new">nm_setting_wireless_security_new</a></span><span class="normal"> </span><span class="symbol">();</span>
+<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">s_wsec</span><span class="symbol">),</span>
+<span class="normal"> <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-PSK:CAPS">NM_SETTING_WIRELESS_SECURITY_PSK</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"my really cool PSK"</span><span class="symbol">,</span>
+<span class="normal"> <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
+<span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-add-setting">nm_connection_add_setting</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets</span><span class="symbol">,</span><span class="normal"> </span><span class="function">NM_SETTING</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">s_wsec</span><span class="symbol">));</span>
+<span class="normal">secrets_hash </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-to-hash">nm_connection_to_hash</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets</span><span class="symbol">);</span>
+
+<span class="symbol">(</span><span class="normal">call the NMSecretAgentGetSecretsFunc </span><span class="usertype">with</span><span class="normal"> secrets_hash</span><span class="symbol">)</span>
+
+<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets</span><span class="symbol">);</span>
+<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#g-hash-table-unref">g_hash_table_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets_hash</span><span class="symbol">);</span></pre></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+</div>
+<p><br class="example-break">
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
+<td>the secret agent object</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the connection for which secrets were requested</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>secrets</code></em> :</span></p></td>
+<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> containing
+the requested secrets in the same format as an <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> hash (as
+created by <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-to-hash"><code class="function">nm_connection_to_hash()</code></a> for example). Each key in <em class="parameter"><code>secrets</code></em>
+should be the name of a <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSetting.html"><span class="type">NMSetting</span></a> object (like "802-11-wireless-security")
+and each value should be a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>. The sub-hashes map string:<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
+where the string is the setting property name (like "psk") and the value
+is the secret. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 GLib.HashTable]</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>if the secrets request failed, give a descriptive error here</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td>caller-specific data to be passed to the function</td>
+</tr>
+</tbody>
+</table></div>
</div>
<hr>
<div class="refsect2">
@@ -273,7 +385,31 @@ is allowed.
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
+Called as a result of a request by NM to save secrets. When the
+<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> subclass has finished saving the secrets, this function
+should be called.
</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
+<td>the secret agent object</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the connection for which secrets were to be saved</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>if the saving secrets failed, give a descriptive error here</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td>caller-specific data to be passed to the function</td>
+</tr>
+</tbody>
+</table></div>
</div>
<hr>
<div class="refsect2">
@@ -285,6 +421,14 @@ is allowed.
</div>
<hr>
<div class="refsect2">
+<a name="NM-SECRET-AGENT-ERROR:CAPS"></a><h3>NM_SECRET_AGENT_ERROR</h3>
+<pre class="programlisting">#define NM_SECRET_AGENT_ERROR (nm_secret_agent_error_quark ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SECRET-AGENT-IDENTIFIER:CAPS"></a><h3>NM_SECRET_AGENT_IDENTIFIER</h3>
<pre class="programlisting">#define NM_SECRET_AGENT_IDENTIFIER "identifier"
</pre>
@@ -328,7 +472,7 @@ VFunc: delete_secrets
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
-<td>a callback, invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
+<td>a callback, to be invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
@@ -393,7 +537,7 @@ VFunc: get_secrets
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
-<td>a callback, invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
+<td>a callback, to be invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
@@ -461,7 +605,7 @@ VFunc: save_secrets
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
-<td>a callback, invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
+<td>a callback, to be invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
@@ -528,6 +672,15 @@ of 3 characters. An example valid identifier is 'org.gnome.nm-applet'
</p>
<p>Default value: NULL</p>
</div>
+<hr>
+<div class="refsect2">
+<a name="NMSecretAgent--registered"></a><h3>The <code class="literal">"registered"</code> property</h3>
+<pre class="programlisting"> "registered" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read</pre>
+<p>
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the agent is registered with NetworkManager, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.
+</p>
+<p>Default value: FALSE</p>
+</div>
</div>
<div class="refsect1">
<a name="NMSecretAgent.signal-details"></a><h2>Signal Details</h2>
diff --git a/docs/libnm-glib/html/NMVPNConnection.html b/docs/libnm-glib/html/NMVPNConnection.html
index 852ec461e..cd6d107e6 100644
--- a/docs/libnm-glib/html/NMVPNConnection.html
+++ b/docs/libnm-glib/html/NMVPNConnection.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMVPNConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMVPNConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMVPNConnection.properties" class="shortcut">Properties</a>
 | 
<a href="#NMVPNConnection.signals" class="shortcut">Signals</a>
@@ -63,6 +65,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMVPN
</pre>
</div>
<div class="refsect1">
+<a name="NMVPNConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMVPNConnection implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMVPNConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMVPNConnection.html#NMVPNConnection--banner" title='The "banner" property'>banner</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
@@ -132,14 +140,45 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMVPN
<a name="nm-vpn-connection-get-banner"></a><h3>nm_vpn_connection_get_banner ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * nm_vpn_connection_get_banner (<em class="parameter"><code><a class="link" href="NMVPNConnection.html" title="NMVPNConnection"><span class="type">NMVPNConnection</span></a> *vpn</code></em>);</pre>
<p>
+Gets the VPN login banner of the active <a class="link" href="NMVPNConnection.html" title="NMVPNConnection"><span class="type">NMVPNConnection</span></a>.
</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>vpn</code></em> :</span></p></td>
+<td>a <a class="link" href="NMVPNConnection.html" title="NMVPNConnection"><span class="type">NMVPNConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the VPN login banner of the VPN connection. This is the internal
+string used by the connection, and must not be modified.</td>
+</tr>
+</tbody>
+</table></div>
</div>
<hr>
<div class="refsect2">
<a name="nm-vpn-connection-get-vpn-state"></a><h3>nm_vpn_connection_get_vpn_state ()</h3>
<pre class="programlisting"><span class="returnvalue">NMVPNConnectionState</span> nm_vpn_connection_get_vpn_state (<em class="parameter"><code><a class="link" href="NMVPNConnection.html" title="NMVPNConnection"><span class="type">NMVPNConnection</span></a> *vpn</code></em>);</pre>
<p>
+Gets the current <a class="link" href="NMVPNConnection.html" title="NMVPNConnection"><span class="type">NMVPNConnection</span></a> state.
</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>vpn</code></em> :</span></p></td>
+<td>a <a class="link" href="NMVPNConnection.html" title="NMVPNConnection"><span class="type">NMVPNConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the VPN state of the active VPN connection.</td>
+</tr>
+</tbody>
+</table></div>
</div>
<hr>
<div class="refsect2">
diff --git a/docs/libnm-glib/html/NMWimaxNsp.html b/docs/libnm-glib/html/NMWimaxNsp.html
index aa69342a4..68a806931 100644
--- a/docs/libnm-glib/html/NMWimaxNsp.html
+++ b/docs/libnm-glib/html/NMWimaxNsp.html
@@ -27,6 +27,8 @@
 | 
<a href="#NMWimaxNsp.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
+ <a href="#NMWimaxNsp.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
+  | 
<a href="#NMWimaxNsp.properties" class="shortcut">Properties</a>
</td></tr>
</table>
@@ -67,6 +69,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMWim
</pre>
</div>
<div class="refsect1">
+<a name="NMWimaxNsp.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+NMWimaxNsp implements
+ <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a> and <a href="http://library.gnome.org/devel/gio/unstable/GAsyncInitable.html">GAsyncInitable</a>.</p>
+</div>
+<div class="refsect1">
<a name="NMWimaxNsp.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="NMWimaxNsp.html#NMWimaxNsp--name" title='The "name" property'>name</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read
diff --git a/docs/libnm-glib/html/api-index-full.html b/docs/libnm-glib/html/api-index-full.html
index 28ab92147..e07f804b7 100644
--- a/docs/libnm-glib/html/api-index-full.html
+++ b/docs/libnm-glib/html/api-index-full.html
@@ -207,6 +207,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMActiveConnection.html#NMActiveConnection--master" title='The "master" property'>NMActiveConnection:master</a>, object property in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMActiveConnection.html#NMActiveConnection--specific-object" title='The "specific-object" property'>NMActiveConnection:specific-object</a>, object property in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
</dt>
<dd></dd>
@@ -215,6 +219,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMActiveConnection.html#NMActiveConnection--uuid" title='The "uuid" property'>NMActiveConnection:uuid</a>, object property in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMActiveConnection.html#NMActiveConnectionClass" title="NMActiveConnectionClass">NMActiveConnectionClass</a>, struct in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
</dt>
<dd></dd>
@@ -251,6 +259,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMActiveConnection.html#nm-active-connection-get-master" title="nm_active_connection_get_master ()">nm_active_connection_get_master</a>, function in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMActiveConnection.html#nm-active-connection-get-specific-object" title="nm_active_connection_get_specific_object ()">nm_active_connection_get_specific_object</a>, function in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
</dt>
<dd></dd>
@@ -263,6 +275,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMActiveConnection.html#NM-ACTIVE-CONNECTION-MASTER:CAPS" title="NM_ACTIVE_CONNECTION_MASTER">NM_ACTIVE_CONNECTION_MASTER</a>, macro in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMActiveConnection.html#nm-active-connection-new" title="nm_active_connection_new ()">nm_active_connection_new</a>, function in <a class="link" href="NMActiveConnection.html" title="NMActiveConnection">NMActiveConnection</a>
</dt>
<dd></dd>
@@ -428,6 +444,14 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMClient.html#nm-client-new-async" title="nm_client_new_async ()">nm_client_new_async</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMClient.html#nm-client-new-finish" title="nm_client_new_finish ()">nm_client_new_finish</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMClient.html#nm-client-sleep" title="nm_client_sleep ()">nm_client_sleep</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a>
</dt>
<dd></dd>
@@ -501,6 +525,50 @@
<dd></dd>
<a name="idxD"></a><h3 class="title">D</h3>
<dt>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_Connection, macro in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_Connection_Secrets, macro in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_System, macro in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManager_Device_Infiniband, macro in nm-device-infiniband-bindings
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_BOOLEAN__POINTER_POINTER, function in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_NONE__BOXED_POINTER, macro in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_NONE__POINTER, macro in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_NONE__STRING_BOXED_BOOLEAN_POINTER, macro in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_VOID__BOXED_POINTER, function in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_VOID__POINTER, macro in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
+dbus_glib_marshal_nm_exported_connection_VOID__STRING_BOXED_BOOLEAN_POINTER, function in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
dbus_glib_marshal_nm_secret_agent_NONE__BOXED_BOXED_POINTER, macro in nm-secret-agent-glue
</dt>
<dd></dd>
@@ -525,10 +593,18 @@ dbus_glib_marshal_nm_secret_agent_VOID__BOXED_STRING_POINTER, function in nm-sec
</dt>
<dd></dd>
<dt>
+dbus_glib_nm_exported_connection_object_info, variable in nm-exported-connection-glue
+</dt>
+<dd></dd>
+<dt>
dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#dbus-g-proxy-begin-call">dbus_g_proxy_begin_call</a>, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDevice.html#NMDevice-struct" title="NMDevice">NMDevice</a>, struct in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
</dt>
<dd></dd>
@@ -593,6 +669,10 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMDevice.html#NMDevice--state-reason" title='The "state-reason" property'>NMDevice:state-reason</a>, object property in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDevice.html#NMDevice--udi" title='The "udi" property'>NMDevice:udi</a>, object property in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
</dt>
<dd></dd>
@@ -601,6 +681,22 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NMDeviceBond, struct in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+NMDeviceBond:carrier, object property in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+NMDeviceBond:hw-address, object property in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+NMDeviceBondClass, struct in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDeviceBt.html#NMDeviceBt-struct" title="NMDeviceBt">NMDeviceBt</a>, struct in <a class="link" href="NMDeviceBt.html" title="NMDeviceBt">NMDeviceBt</a>
</dt>
<dd></dd>
@@ -653,6 +749,22 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NMDeviceInfiniband, struct in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+NMDeviceInfiniband:carrier, object property in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+NMDeviceInfiniband:hw-address, object property in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+NMDeviceInfinibandClass, struct in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDeviceModem.html#NMDeviceModem-struct" title="NMDeviceModem">NMDeviceModem</a>, struct in <a class="link" href="NMDeviceModem.html" title="NMDeviceModem">NMDeviceModem</a>
</dt>
<dd></dd>
@@ -669,6 +781,46 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NMDeviceOlpcMesh, struct in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NMDeviceOlpcMesh:active-channel, object property in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NMDeviceOlpcMesh:companion, object property in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NMDeviceOlpcMesh:hw-address, object property in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NMDeviceOlpcMeshClass, struct in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NMDeviceVlan, struct in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+NMDeviceVlan:carrier, object property in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+NMDeviceVlan:hw-address, object property in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+NMDeviceVlan:vlan-id, object property in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+NMDeviceVlanClass, struct in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDeviceWifi.html#NMDeviceWifi-struct" title="NMDeviceWifi">NMDeviceWifi</a>, struct in <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi">NMDeviceWifi</a>
</dt>
<dd></dd>
@@ -757,6 +909,26 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NM_DEVICE_BOND_CARRIER, macro in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+nm_device_bond_get_carrier, function in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+nm_device_bond_get_hw_address, function in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+NM_DEVICE_BOND_HW_ADDRESS, macro in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
+nm_device_bond_new, function in NMDeviceBond
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDeviceBt.html#NM-DEVICE-BT-CAPABILITIES:CAPS" title="NM_DEVICE_BT_CAPABILITIES">NM_DEVICE_BT_CAPABILITIES</a>, macro in <a class="link" href="NMDeviceBt.html" title="NMDeviceBt">NMDeviceBt</a>
</dt>
<dd></dd>
@@ -913,6 +1085,10 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMDevice.html#nm-device-get-state-reason" title="nm_device_get_state_reason ()">nm_device_get_state_reason</a>, function in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDevice.html#nm-device-get-udi" title="nm_device_get_udi ()">nm_device_get_udi</a>, function in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
</dt>
<dd></dd>
@@ -921,6 +1097,26 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NM_DEVICE_INFINIBAND_CARRIER, macro in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_device_infiniband_get_carrier, function in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_device_infiniband_get_hw_address, function in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+NM_DEVICE_INFINIBAND_HW_ADDRESS, macro in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_device_infiniband_new, function in NMDeviceInfiniband
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDevice.html#NM-DEVICE-INTERFACE:CAPS" title="NM_DEVICE_INTERFACE">NM_DEVICE_INTERFACE</a>, macro in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
</dt>
<dd></dd>
@@ -961,6 +1157,34 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL, macro in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NM_DEVICE_OLPC_MESH_COMPANION, macro in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+nm_device_olpc_mesh_get_active_channel, function in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+nm_device_olpc_mesh_get_companion, function in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+nm_device_olpc_mesh_get_hw_address, function in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+NM_DEVICE_OLPC_MESH_HW_ADDRESS, macro in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
+nm_device_olpc_mesh_new, function in NMDeviceOlpcMesh
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDevice.html#NM-DEVICE-PRODUCT:CAPS" title="NM_DEVICE_PRODUCT">NM_DEVICE_PRODUCT</a>, macro in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
</dt>
<dd></dd>
@@ -969,6 +1193,10 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMDevice.html#NM-DEVICE-STATE-REASON:CAPS" title="NM_DEVICE_STATE_REASON">NM_DEVICE_STATE_REASON</a>, macro in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDevice.html#NM-DEVICE-UDI:CAPS" title="NM_DEVICE_UDI">NM_DEVICE_UDI</a>, macro in <a class="link" href="NMDevice.html" title="NMDevice">NMDevice</a>
</dt>
<dd></dd>
@@ -977,6 +1205,34 @@ dbus_glib_nm_secret_agent_object_info, variable in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+NM_DEVICE_VLAN_CARRIER, macro in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+nm_device_vlan_get_carrier, function in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+nm_device_vlan_get_hw_address, function in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+nm_device_vlan_get_vlan_id, function in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+NM_DEVICE_VLAN_HW_ADDRESS, macro in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+nm_device_vlan_new, function in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
+NM_DEVICE_VLAN_VLAN_ID, macro in NMDeviceVlan
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMDeviceWifi.html#NM-DEVICE-WIFI-ACTIVE-ACCESS-POINT:CAPS" title="NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT">NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT</a>, macro in <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi">NMDeviceWifi</a>
</dt>
<dd></dd>
@@ -1403,6 +1659,102 @@ g_marshal_value_peek_variant, macro in nm-secret-agent-glue
<a class="link" href="NMObject.html#nm-object-get-path" title="nm_object_get_path ()">nm_object_get_path</a>, function in <a class="link" href="NMObject.html" title="NMObject">NMObject</a>
</dt>
<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_delete, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_delete_async, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_delete_async_callback, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_delete_reply, user_function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_get_settings, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_get_settings_async, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_get_settings_async_callback, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_get_settings_reply, user_function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_async, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_async_callback, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_reply, user_function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_update, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_update_async, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_update_async_callback, function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_Connection_update_reply, user_function in nm-exported-connection-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_get_permissions, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_get_permissions_async, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_get_permissions_async_callback, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_get_permissions_reply, user_function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_save_hostname, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_save_hostname_async, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_save_hostname_async_callback, function in nm-settings-system-bindings
+</dt>
+<dd></dd>
+<dt>
+org_freedesktop_NetworkManagerSettings_System_save_hostname_reply, user_function in nm-settings-system-bindings
+</dt>
+<dd></dd>
<a name="idxR"></a><h3 class="title">R</h3>
<dt>
<a class="link" href="NMRemoteConnection.html#NMRemoteConnection-struct" title="NMRemoteConnection">NMRemoteConnection</a>, struct in <a class="link" href="NMRemoteConnection.html" title="NMRemoteConnection">NMRemoteConnection</a>
@@ -1425,10 +1777,6 @@ g_marshal_value_peek_variant, macro in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMRemoteConnection.html#NMRemoteConnection--init-result" title='The "init-result" property'>NMRemoteConnection:init-result</a>, object property in <a class="link" href="NMRemoteConnection.html" title="NMRemoteConnection">NMRemoteConnection</a>
-</dt>
-<dd></dd>
-<dt>
<a class="link" href="NMRemoteConnection.html#NMRemoteConnectionClass" title="NMRemoteConnectionClass">NMRemoteConnectionClass</a>, struct in <a class="link" href="NMRemoteConnection.html" title="NMRemoteConnection">NMRemoteConnection</a>
</dt>
<dd></dd>
@@ -1529,6 +1877,10 @@ g_marshal_value_peek_variant, macro in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-ERROR:CAPS" title="NM_REMOTE_SETTINGS_ERROR">NM_REMOTE_SETTINGS_ERROR</a>, macro in <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings">NMRemoteSettings</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMRemoteSettings.html#nm-remote-settings-error-quark" title="nm_remote_settings_error_quark ()">nm_remote_settings_error_quark</a>, function in <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings">NMRemoteSettings</a>
</dt>
<dd></dd>
@@ -1553,10 +1905,18 @@ g_marshal_value_peek_variant, macro in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-async" title="nm_remote_settings_new_async ()">nm_remote_settings_new_async</a>, function in <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings">NMRemoteSettings</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMRemoteSettings.html#NM-REMOTE-SETTINGS-NEW-CONNECTION:CAPS" title="NM_REMOTE_SETTINGS_NEW_CONNECTION">NM_REMOTE_SETTINGS_NEW_CONNECTION</a>, macro in <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings">NMRemoteSettings</a>
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMRemoteSettings.html#nm-remote-settings-new-finish" title="nm_remote_settings_new_finish ()">nm_remote_settings_new_finish</a>, function in <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings">NMRemoteSettings</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMRemoteSettings.html#nm-remote-settings-save-hostname" title="nm_remote_settings_save_hostname ()">nm_remote_settings_save_hostname</a>, function in <a class="link" href="NMRemoteSettings.html" title="NMRemoteSettings">NMRemoteSettings</a>
</dt>
<dd></dd>
@@ -1582,6 +1942,10 @@ g_marshal_value_peek_variant, macro in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSecretAgent.html#NMSecretAgent--registered" title='The "registered" property'>NMSecretAgent:registered</a>, object property in <a class="link" href="NMSecretAgent.html" title="NMSecretAgent">NMSecretAgent</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSecretAgent.html#NMSecretAgentClass" title="NMSecretAgentClass">NMSecretAgentClass</a>, struct in <a class="link" href="NMSecretAgent.html" title="NMSecretAgent">NMSecretAgent</a>
</dt>
<dd></dd>
@@ -1614,6 +1978,10 @@ g_marshal_value_peek_variant, macro in nm-secret-agent-glue
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-ERROR:CAPS" title="NM_SECRET_AGENT_ERROR">NM_SECRET_AGENT_ERROR</a>, macro in <a class="link" href="NMSecretAgent.html" title="NMSecretAgent">NMSecretAgent</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSecretAgent.html#nm-secret-agent-error-quark" title="nm_secret_agent_error_quark ()">nm_secret_agent_error_quark</a>, function in <a class="link" href="NMSecretAgent.html" title="NMSecretAgent">NMSecretAgent</a>
</dt>
<dd></dd>
diff --git a/docs/libnm-glib/html/ch02.html b/docs/libnm-glib/html/ch02.html
index ed4607b27..72bb7148d 100644
--- a/docs/libnm-glib/html/ch02.html
+++ b/docs/libnm-glib/html/ch02.html
@@ -21,7 +21,7 @@
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
-<a name="id340481"></a>libnm-glib API Reference</h2></div></div></div>
+<a name="id582896"></a>libnm-glib API Reference</h2></div></div></div>
<div class="toc"><dl>
<dt>
<span class="refentrytitle"><a href="NMClient.html">NMClient</a></span><span class="refpurpose"></span>
diff --git a/docs/libnm-glib/html/index.html b/docs/libnm-glib/html/index.html
index 70270f387..e81d55c84 100644
--- a/docs/libnm-glib/html/index.html
+++ b/docs/libnm-glib/html/index.html
@@ -29,7 +29,7 @@
</p></div>
<div><p class="copyright">Copyright © 2011 The NetworkManager Authors</p></div>
<div><div class="legalnotice">
-<a name="id310883"></a><p>
+<a name="id553298"></a><p>
Permission is granted to copy, distribute and/or modify this
document under the terms of the <em class="citetitle">GNU Free
Documentation License</em>, Version 1.1 or any later
diff --git a/docs/libnm-glib/html/index.sgml b/docs/libnm-glib/html/index.sgml
index 3df60aeb1..5f5404f76 100644
--- a/docs/libnm-glib/html/index.sgml
+++ b/docs/libnm-glib/html/index.sgml
@@ -2,6 +2,7 @@
<ANCHOR id="NMClient" href="libnm-glib/NMClient.html">
<ANCHOR id="NMClient.synopsis" href="libnm-glib/NMClient.html#NMClient.synopsis">
<ANCHOR id="NMClient.object-hierarchy" href="libnm-glib/NMClient.html#NMClient.object-hierarchy">
+<ANCHOR id="NMClient.implemented-interfaces" href="libnm-glib/NMClient.html#NMClient.implemented-interfaces">
<ANCHOR id="NMClient.properties" href="libnm-glib/NMClient.html#NMClient.properties">
<ANCHOR id="NMClient.signals" href="libnm-glib/NMClient.html#NMClient.signals">
<ANCHOR id="NMClient.description" href="libnm-glib/NMClient.html#NMClient.description">
@@ -37,6 +38,8 @@
<ANCHOR id="nm-client-networking-get-enabled" href="libnm-glib/NMClient.html#nm-client-networking-get-enabled">
<ANCHOR id="nm-client-networking-set-enabled" href="libnm-glib/NMClient.html#nm-client-networking-set-enabled">
<ANCHOR id="nm-client-new" href="libnm-glib/NMClient.html#nm-client-new">
+<ANCHOR id="nm-client-new-async" href="libnm-glib/NMClient.html#nm-client-new-async">
+<ANCHOR id="nm-client-new-finish" href="libnm-glib/NMClient.html#nm-client-new-finish">
<ANCHOR id="nm-client-sleep" href="libnm-glib/NMClient.html#nm-client-sleep">
<ANCHOR id="nm-client-wimax-get-enabled" href="libnm-glib/NMClient.html#nm-client-wimax-get-enabled">
<ANCHOR id="nm-client-wimax-hardware-get-enabled" href="libnm-glib/NMClient.html#nm-client-wimax-hardware-get-enabled">
@@ -66,6 +69,7 @@
<ANCHOR id="NMActiveConnection" href="libnm-glib/NMActiveConnection.html">
<ANCHOR id="NMActiveConnection.synopsis" href="libnm-glib/NMActiveConnection.html#NMActiveConnection.synopsis">
<ANCHOR id="NMActiveConnection.object-hierarchy" href="libnm-glib/NMActiveConnection.html#NMActiveConnection.object-hierarchy">
+<ANCHOR id="NMActiveConnection.implemented-interfaces" href="libnm-glib/NMActiveConnection.html#NMActiveConnection.implemented-interfaces">
<ANCHOR id="NMActiveConnection.properties" href="libnm-glib/NMActiveConnection.html#NMActiveConnection.properties">
<ANCHOR id="NMActiveConnection.description" href="libnm-glib/NMActiveConnection.html#NMActiveConnection.description">
<ANCHOR id="NMActiveConnection.details" href="libnm-glib/NMActiveConnection.html#NMActiveConnection.details">
@@ -75,6 +79,7 @@
<ANCHOR id="NM-ACTIVE-CONNECTION-DEFAULT:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEFAULT:CAPS">
<ANCHOR id="NM-ACTIVE-CONNECTION-DEFAULT6:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEFAULT6:CAPS">
<ANCHOR id="NM-ACTIVE-CONNECTION-DEVICES:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEVICES:CAPS">
+<ANCHOR id="NM-ACTIVE-CONNECTION-MASTER:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-MASTER:CAPS">
<ANCHOR id="NM-ACTIVE-CONNECTION-SPECIFIC-OBJECT:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-SPECIFIC-OBJECT:CAPS">
<ANCHOR id="NM-ACTIVE-CONNECTION-STATE:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-STATE:CAPS">
<ANCHOR id="NM-ACTIVE-CONNECTION-UUID:CAPS" href="libnm-glib/NMActiveConnection.html#NM-ACTIVE-CONNECTION-UUID:CAPS">
@@ -82,6 +87,7 @@
<ANCHOR id="nm-active-connection-get-default" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-default">
<ANCHOR id="nm-active-connection-get-default6" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-default6">
<ANCHOR id="nm-active-connection-get-devices" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-devices">
+<ANCHOR id="nm-active-connection-get-master" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-master">
<ANCHOR id="nm-active-connection-get-specific-object" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-specific-object">
<ANCHOR id="nm-active-connection-get-state" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-state">
<ANCHOR id="nm-active-connection-get-uuid" href="libnm-glib/NMActiveConnection.html#nm-active-connection-get-uuid">
@@ -91,11 +97,14 @@
<ANCHOR id="NMActiveConnection--default" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--default">
<ANCHOR id="NMActiveConnection--default6" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--default6">
<ANCHOR id="NMActiveConnection--devices" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--devices">
+<ANCHOR id="NMActiveConnection--master" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--master">
<ANCHOR id="NMActiveConnection--specific-object" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--specific-object">
<ANCHOR id="NMActiveConnection--state" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--state">
+<ANCHOR id="NMActiveConnection--uuid" href="libnm-glib/NMActiveConnection.html#NMActiveConnection--uuid">
<ANCHOR id="NMDevice" href="libnm-glib/NMDevice.html">
<ANCHOR id="NMDevice.synopsis" href="libnm-glib/NMDevice.html#NMDevice.synopsis">
<ANCHOR id="NMDevice.object-hierarchy" href="libnm-glib/NMDevice.html#NMDevice.object-hierarchy">
+<ANCHOR id="NMDevice.implemented-interfaces" href="libnm-glib/NMDevice.html#NMDevice.implemented-interfaces">
<ANCHOR id="NMDevice.properties" href="libnm-glib/NMDevice.html#NMDevice.properties">
<ANCHOR id="NMDevice.signals" href="libnm-glib/NMDevice.html#NMDevice.signals">
<ANCHOR id="NMDevice.description" href="libnm-glib/NMDevice.html#NMDevice.description">
@@ -117,6 +126,7 @@
<ANCHOR id="NM-DEVICE-MANAGED:CAPS" href="libnm-glib/NMDevice.html#NM-DEVICE-MANAGED:CAPS">
<ANCHOR id="NM-DEVICE-PRODUCT:CAPS" href="libnm-glib/NMDevice.html#NM-DEVICE-PRODUCT:CAPS">
<ANCHOR id="NM-DEVICE-STATE:CAPS" href="libnm-glib/NMDevice.html#NM-DEVICE-STATE:CAPS">
+<ANCHOR id="NM-DEVICE-STATE-REASON:CAPS" href="libnm-glib/NMDevice.html#NM-DEVICE-STATE-REASON:CAPS">
<ANCHOR id="NM-DEVICE-UDI:CAPS" href="libnm-glib/NMDevice.html#NM-DEVICE-UDI:CAPS">
<ANCHOR id="NM-DEVICE-VENDOR:CAPS" href="libnm-glib/NMDevice.html#NM-DEVICE-VENDOR:CAPS">
<ANCHOR id="nm-device-connection-valid" href="libnm-glib/NMDevice.html#nm-device-connection-valid">
@@ -136,6 +146,7 @@
<ANCHOR id="nm-device-get-managed" href="libnm-glib/NMDevice.html#nm-device-get-managed">
<ANCHOR id="nm-device-get-product" href="libnm-glib/NMDevice.html#nm-device-get-product">
<ANCHOR id="nm-device-get-state" href="libnm-glib/NMDevice.html#nm-device-get-state">
+<ANCHOR id="nm-device-get-state-reason" href="libnm-glib/NMDevice.html#nm-device-get-state-reason">
<ANCHOR id="nm-device-get-udi" href="libnm-glib/NMDevice.html#nm-device-get-udi">
<ANCHOR id="nm-device-get-vendor" href="libnm-glib/NMDevice.html#nm-device-get-vendor">
<ANCHOR id="nm-device-new" href="libnm-glib/NMDevice.html#nm-device-new">
@@ -154,6 +165,7 @@
<ANCHOR id="NMDevice--managed" href="libnm-glib/NMDevice.html#NMDevice--managed">
<ANCHOR id="NMDevice--product" href="libnm-glib/NMDevice.html#NMDevice--product">
<ANCHOR id="NMDevice--state" href="libnm-glib/NMDevice.html#NMDevice--state">
+<ANCHOR id="NMDevice--state-reason" href="libnm-glib/NMDevice.html#NMDevice--state-reason">
<ANCHOR id="NMDevice--udi" href="libnm-glib/NMDevice.html#NMDevice--udi">
<ANCHOR id="NMDevice--vendor" href="libnm-glib/NMDevice.html#NMDevice--vendor">
<ANCHOR id="NMDevice.signal-details" href="libnm-glib/NMDevice.html#NMDevice.signal-details">
@@ -161,6 +173,7 @@
<ANCHOR id="NMDeviceEthernet" href="libnm-glib/NMDeviceEthernet.html">
<ANCHOR id="NMDeviceEthernet.synopsis" href="libnm-glib/NMDeviceEthernet.html#NMDeviceEthernet.synopsis">
<ANCHOR id="NMDeviceEthernet.object-hierarchy" href="libnm-glib/NMDeviceEthernet.html#NMDeviceEthernet.object-hierarchy">
+<ANCHOR id="NMDeviceEthernet.implemented-interfaces" href="libnm-glib/NMDeviceEthernet.html#NMDeviceEthernet.implemented-interfaces">
<ANCHOR id="NMDeviceEthernet.properties" href="libnm-glib/NMDeviceEthernet.html#NMDeviceEthernet.properties">
<ANCHOR id="NMDeviceEthernet.description" href="libnm-glib/NMDeviceEthernet.html#NMDeviceEthernet.description">
<ANCHOR id="NMDeviceEthernet.details" href="libnm-glib/NMDeviceEthernet.html#NMDeviceEthernet.details">
@@ -183,6 +196,7 @@
<ANCHOR id="NMDeviceWifi" href="libnm-glib/NMDeviceWifi.html">
<ANCHOR id="NMDeviceWifi.synopsis" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.synopsis">
<ANCHOR id="NMDeviceWifi.object-hierarchy" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.object-hierarchy">
+<ANCHOR id="NMDeviceWifi.implemented-interfaces" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.implemented-interfaces">
<ANCHOR id="NMDeviceWifi.properties" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.properties">
<ANCHOR id="NMDeviceWifi.signals" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.signals">
<ANCHOR id="NMDeviceWifi.description" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.description">
@@ -217,6 +231,7 @@
<ANCHOR id="NMDeviceModem" href="libnm-glib/NMDeviceModem.html">
<ANCHOR id="NMDeviceModem.synopsis" href="libnm-glib/NMDeviceModem.html#NMDeviceModem.synopsis">
<ANCHOR id="NMDeviceModem.object-hierarchy" href="libnm-glib/NMDeviceModem.html#NMDeviceModem.object-hierarchy">
+<ANCHOR id="NMDeviceModem.implemented-interfaces" href="libnm-glib/NMDeviceModem.html#NMDeviceModem.implemented-interfaces">
<ANCHOR id="NMDeviceModem.properties" href="libnm-glib/NMDeviceModem.html#NMDeviceModem.properties">
<ANCHOR id="NMDeviceModem.description" href="libnm-glib/NMDeviceModem.html#NMDeviceModem.description">
<ANCHOR id="NMDeviceModem.details" href="libnm-glib/NMDeviceModem.html#NMDeviceModem.details">
@@ -232,6 +247,7 @@
<ANCHOR id="NMDeviceBt" href="libnm-glib/NMDeviceBt.html">
<ANCHOR id="NMDeviceBt.synopsis" href="libnm-glib/NMDeviceBt.html#NMDeviceBt.synopsis">
<ANCHOR id="NMDeviceBt.object-hierarchy" href="libnm-glib/NMDeviceBt.html#NMDeviceBt.object-hierarchy">
+<ANCHOR id="NMDeviceBt.implemented-interfaces" href="libnm-glib/NMDeviceBt.html#NMDeviceBt.implemented-interfaces">
<ANCHOR id="NMDeviceBt.properties" href="libnm-glib/NMDeviceBt.html#NMDeviceBt.properties">
<ANCHOR id="NMDeviceBt.description" href="libnm-glib/NMDeviceBt.html#NMDeviceBt.description">
<ANCHOR id="NMDeviceBt.details" href="libnm-glib/NMDeviceBt.html#NMDeviceBt.details">
@@ -251,6 +267,7 @@
<ANCHOR id="NMDeviceWimax" href="libnm-glib/NMDeviceWimax.html">
<ANCHOR id="NMDeviceWimax.synopsis" href="libnm-glib/NMDeviceWimax.html#NMDeviceWimax.synopsis">
<ANCHOR id="NMDeviceWimax.object-hierarchy" href="libnm-glib/NMDeviceWimax.html#NMDeviceWimax.object-hierarchy">
+<ANCHOR id="NMDeviceWimax.implemented-interfaces" href="libnm-glib/NMDeviceWimax.html#NMDeviceWimax.implemented-interfaces">
<ANCHOR id="NMDeviceWimax.properties" href="libnm-glib/NMDeviceWimax.html#NMDeviceWimax.properties">
<ANCHOR id="NMDeviceWimax.signals" href="libnm-glib/NMDeviceWimax.html#NMDeviceWimax.signals">
<ANCHOR id="NMDeviceWimax.description" href="libnm-glib/NMDeviceWimax.html#NMDeviceWimax.description">
@@ -288,6 +305,7 @@
<ANCHOR id="NMWimaxNsp" href="libnm-glib/NMWimaxNsp.html">
<ANCHOR id="NMWimaxNsp.synopsis" href="libnm-glib/NMWimaxNsp.html#NMWimaxNsp.synopsis">
<ANCHOR id="NMWimaxNsp.object-hierarchy" href="libnm-glib/NMWimaxNsp.html#NMWimaxNsp.object-hierarchy">
+<ANCHOR id="NMWimaxNsp.implemented-interfaces" href="libnm-glib/NMWimaxNsp.html#NMWimaxNsp.implemented-interfaces">
<ANCHOR id="NMWimaxNsp.properties" href="libnm-glib/NMWimaxNsp.html#NMWimaxNsp.properties">
<ANCHOR id="NMWimaxNsp.description" href="libnm-glib/NMWimaxNsp.html#NMWimaxNsp.description">
<ANCHOR id="NMWimaxNsp.details" href="libnm-glib/NMWimaxNsp.html#NMWimaxNsp.details">
@@ -310,6 +328,7 @@
<ANCHOR id="NMAccessPoint" href="libnm-glib/NMAccessPoint.html">
<ANCHOR id="NMAccessPoint.synopsis" href="libnm-glib/NMAccessPoint.html#NMAccessPoint.synopsis">
<ANCHOR id="NMAccessPoint.object-hierarchy" href="libnm-glib/NMAccessPoint.html#NMAccessPoint.object-hierarchy">
+<ANCHOR id="NMAccessPoint.implemented-interfaces" href="libnm-glib/NMAccessPoint.html#NMAccessPoint.implemented-interfaces">
<ANCHOR id="NMAccessPoint.properties" href="libnm-glib/NMAccessPoint.html#NMAccessPoint.properties">
<ANCHOR id="NMAccessPoint.description" href="libnm-glib/NMAccessPoint.html#NMAccessPoint.description">
<ANCHOR id="NMAccessPoint.details" href="libnm-glib/NMAccessPoint.html#NMAccessPoint.details">
@@ -352,6 +371,7 @@
<ANCHOR id="NMIP4Config" href="libnm-glib/NMIP4Config.html">
<ANCHOR id="NMIP4Config.synopsis" href="libnm-glib/NMIP4Config.html#NMIP4Config.synopsis">
<ANCHOR id="NMIP4Config.object-hierarchy" href="libnm-glib/NMIP4Config.html#NMIP4Config.object-hierarchy">
+<ANCHOR id="NMIP4Config.implemented-interfaces" href="libnm-glib/NMIP4Config.html#NMIP4Config.implemented-interfaces">
<ANCHOR id="NMIP4Config.properties" href="libnm-glib/NMIP4Config.html#NMIP4Config.properties">
<ANCHOR id="NMIP4Config.description" href="libnm-glib/NMIP4Config.html#NMIP4Config.description">
<ANCHOR id="NMIP4Config.details" href="libnm-glib/NMIP4Config.html#NMIP4Config.details">
@@ -377,6 +397,7 @@
<ANCHOR id="NMIP6Config" href="libnm-glib/NMIP6Config.html">
<ANCHOR id="NMIP6Config.synopsis" href="libnm-glib/NMIP6Config.html#NMIP6Config.synopsis">
<ANCHOR id="NMIP6Config.object-hierarchy" href="libnm-glib/NMIP6Config.html#NMIP6Config.object-hierarchy">
+<ANCHOR id="NMIP6Config.implemented-interfaces" href="libnm-glib/NMIP6Config.html#NMIP6Config.implemented-interfaces">
<ANCHOR id="NMIP6Config.properties" href="libnm-glib/NMIP6Config.html#NMIP6Config.properties">
<ANCHOR id="NMIP6Config.description" href="libnm-glib/NMIP6Config.html#NMIP6Config.description">
<ANCHOR id="NMIP6Config.details" href="libnm-glib/NMIP6Config.html#NMIP6Config.details">
@@ -399,6 +420,7 @@
<ANCHOR id="NMDHCP4Config" href="libnm-glib/NMDHCP4Config.html">
<ANCHOR id="NMDHCP4Config.synopsis" href="libnm-glib/NMDHCP4Config.html#NMDHCP4Config.synopsis">
<ANCHOR id="NMDHCP4Config.object-hierarchy" href="libnm-glib/NMDHCP4Config.html#NMDHCP4Config.object-hierarchy">
+<ANCHOR id="NMDHCP4Config.implemented-interfaces" href="libnm-glib/NMDHCP4Config.html#NMDHCP4Config.implemented-interfaces">
<ANCHOR id="NMDHCP4Config.properties" href="libnm-glib/NMDHCP4Config.html#NMDHCP4Config.properties">
<ANCHOR id="NMDHCP4Config.description" href="libnm-glib/NMDHCP4Config.html#NMDHCP4Config.description">
<ANCHOR id="NMDHCP4Config.details" href="libnm-glib/NMDHCP4Config.html#NMDHCP4Config.details">
@@ -413,6 +435,7 @@
<ANCHOR id="NMDHCP6Config" href="libnm-glib/NMDHCP6Config.html">
<ANCHOR id="NMDHCP6Config.synopsis" href="libnm-glib/NMDHCP6Config.html#NMDHCP6Config.synopsis">
<ANCHOR id="NMDHCP6Config.object-hierarchy" href="libnm-glib/NMDHCP6Config.html#NMDHCP6Config.object-hierarchy">
+<ANCHOR id="NMDHCP6Config.implemented-interfaces" href="libnm-glib/NMDHCP6Config.html#NMDHCP6Config.implemented-interfaces">
<ANCHOR id="NMDHCP6Config.properties" href="libnm-glib/NMDHCP6Config.html#NMDHCP6Config.properties">
<ANCHOR id="NMDHCP6Config.description" href="libnm-glib/NMDHCP6Config.html#NMDHCP6Config.description">
<ANCHOR id="NMDHCP6Config.details" href="libnm-glib/NMDHCP6Config.html#NMDHCP6Config.details">
@@ -427,6 +450,7 @@
<ANCHOR id="NMObject" href="libnm-glib/NMObject.html">
<ANCHOR id="NMObject.synopsis" href="libnm-glib/NMObject.html#NMObject.synopsis">
<ANCHOR id="NMObject.object-hierarchy" href="libnm-glib/NMObject.html#NMObject.object-hierarchy">
+<ANCHOR id="NMObject.implemented-interfaces" href="libnm-glib/NMObject.html#NMObject.implemented-interfaces">
<ANCHOR id="NMObject.properties" href="libnm-glib/NMObject.html#NMObject.properties">
<ANCHOR id="NMObject.description" href="libnm-glib/NMObject.html#NMObject.description">
<ANCHOR id="NMObject.details" href="libnm-glib/NMObject.html#NMObject.details">
@@ -442,6 +466,7 @@
<ANCHOR id="NMRemoteConnection" href="libnm-glib/NMRemoteConnection.html">
<ANCHOR id="NMRemoteConnection.synopsis" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.synopsis">
<ANCHOR id="NMRemoteConnection.object-hierarchy" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.object-hierarchy">
+<ANCHOR id="NMRemoteConnection.implemented-interfaces" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.implemented-interfaces">
<ANCHOR id="NMRemoteConnection.properties" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.properties">
<ANCHOR id="NMRemoteConnection.signals" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.signals">
<ANCHOR id="NMRemoteConnection.description" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.description">
@@ -459,7 +484,6 @@
<ANCHOR id="nm-remote-connection-new" href="libnm-glib/NMRemoteConnection.html#nm-remote-connection-new">
<ANCHOR id="NMRemoteConnection.property-details" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.property-details">
<ANCHOR id="NMRemoteConnection--bus" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection--bus">
-<ANCHOR id="NMRemoteConnection--init-result" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection--init-result">
<ANCHOR id="NMRemoteConnection.signal-details" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection.signal-details">
<ANCHOR id="NMRemoteConnection-removed" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection-removed">
<ANCHOR id="NMRemoteConnection-updated" href="libnm-glib/NMRemoteConnection.html#NMRemoteConnection-updated">
@@ -467,6 +491,7 @@
<ANCHOR id="NMRemoteSettings" href="libnm-glib/NMRemoteSettings.html">
<ANCHOR id="NMRemoteSettings.synopsis" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.synopsis">
<ANCHOR id="NMRemoteSettings.object-hierarchy" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.object-hierarchy">
+<ANCHOR id="NMRemoteSettings.implemented-interfaces" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.implemented-interfaces">
<ANCHOR id="NMRemoteSettings.properties" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.properties">
<ANCHOR id="NMRemoteSettings.signals" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.signals">
<ANCHOR id="NMRemoteSettings.description" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.description">
@@ -482,6 +507,7 @@
<ANCHOR id="NM-REMOTE-SETTINGS-BUS:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-BUS:CAPS">
<ANCHOR id="NM-REMOTE-SETTINGS-CAN-MODIFY:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-CAN-MODIFY:CAPS">
<ANCHOR id="NM-REMOTE-SETTINGS-CONNECTIONS-READ:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-CONNECTIONS-READ:CAPS">
+<ANCHOR id="NM-REMOTE-SETTINGS-ERROR:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-ERROR:CAPS">
<ANCHOR id="NM-REMOTE-SETTINGS-HOSTNAME:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-HOSTNAME:CAPS">
<ANCHOR id="NM-REMOTE-SETTINGS-NEW-CONNECTION:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-NEW-CONNECTION:CAPS">
<ANCHOR id="NM-REMOTE-SETTINGS-SERVICE-RUNNING:CAPS" href="libnm-glib/NMRemoteSettings.html#NM-REMOTE-SETTINGS-SERVICE-RUNNING:CAPS">
@@ -491,6 +517,8 @@
<ANCHOR id="nm-remote-settings-get-connection-by-uuid" href="libnm-glib/NMRemoteSettings.html#nm-remote-settings-get-connection-by-uuid">
<ANCHOR id="nm-remote-settings-list-connections" href="libnm-glib/NMRemoteSettings.html#nm-remote-settings-list-connections">
<ANCHOR id="nm-remote-settings-new" href="libnm-glib/NMRemoteSettings.html#nm-remote-settings-new">
+<ANCHOR id="nm-remote-settings-new-async" href="libnm-glib/NMRemoteSettings.html#nm-remote-settings-new-async">
+<ANCHOR id="nm-remote-settings-new-finish" href="libnm-glib/NMRemoteSettings.html#nm-remote-settings-new-finish">
<ANCHOR id="nm-remote-settings-save-hostname" href="libnm-glib/NMRemoteSettings.html#nm-remote-settings-save-hostname">
<ANCHOR id="NMRemoteSettings.property-details" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings.property-details">
<ANCHOR id="NMRemoteSettings--bus" href="libnm-glib/NMRemoteSettings.html#NMRemoteSettings--bus">
@@ -522,6 +550,7 @@
<ANCHOR id="NMSecretAgentGetSecretsFunc" href="libnm-glib/NMSecretAgent.html#NMSecretAgentGetSecretsFunc">
<ANCHOR id="NMSecretAgentSaveSecretsFunc" href="libnm-glib/NMSecretAgent.html#NMSecretAgentSaveSecretsFunc">
<ANCHOR id="NM-SECRET-AGENT-AUTO-REGISTER:CAPS" href="libnm-glib/NMSecretAgent.html#NM-SECRET-AGENT-AUTO-REGISTER:CAPS">
+<ANCHOR id="NM-SECRET-AGENT-ERROR:CAPS" href="libnm-glib/NMSecretAgent.html#NM-SECRET-AGENT-ERROR:CAPS">
<ANCHOR id="NM-SECRET-AGENT-IDENTIFIER:CAPS" href="libnm-glib/NMSecretAgent.html#NM-SECRET-AGENT-IDENTIFIER:CAPS">
<ANCHOR id="NM-SECRET-AGENT-REGISTRATION-RESULT:CAPS" href="libnm-glib/NMSecretAgent.html#NM-SECRET-AGENT-REGISTRATION-RESULT:CAPS">
<ANCHOR id="nm-secret-agent-delete-secrets" href="libnm-glib/NMSecretAgent.html#nm-secret-agent-delete-secrets">
@@ -533,11 +562,13 @@
<ANCHOR id="NMSecretAgent.property-details" href="libnm-glib/NMSecretAgent.html#NMSecretAgent.property-details">
<ANCHOR id="NMSecretAgent--auto-register" href="libnm-glib/NMSecretAgent.html#NMSecretAgent--auto-register">
<ANCHOR id="NMSecretAgent--identifier" href="libnm-glib/NMSecretAgent.html#NMSecretAgent--identifier">
+<ANCHOR id="NMSecretAgent--registered" href="libnm-glib/NMSecretAgent.html#NMSecretAgent--registered">
<ANCHOR id="NMSecretAgent.signal-details" href="libnm-glib/NMSecretAgent.html#NMSecretAgent.signal-details">
<ANCHOR id="NMSecretAgent-registration-result" href="libnm-glib/NMSecretAgent.html#NMSecretAgent-registration-result">
<ANCHOR id="NMVPNConnection" href="libnm-glib/NMVPNConnection.html">
<ANCHOR id="NMVPNConnection.synopsis" href="libnm-glib/NMVPNConnection.html#NMVPNConnection.synopsis">
<ANCHOR id="NMVPNConnection.object-hierarchy" href="libnm-glib/NMVPNConnection.html#NMVPNConnection.object-hierarchy">
+<ANCHOR id="NMVPNConnection.implemented-interfaces" href="libnm-glib/NMVPNConnection.html#NMVPNConnection.implemented-interfaces">
<ANCHOR id="NMVPNConnection.properties" href="libnm-glib/NMVPNConnection.html#NMVPNConnection.properties">
<ANCHOR id="NMVPNConnection.signals" href="libnm-glib/NMVPNConnection.html#NMVPNConnection.signals">
<ANCHOR id="NMVPNConnection.description" href="libnm-glib/NMVPNConnection.html#NMVPNConnection.description">
diff --git a/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html b/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html
index d6ecdc559..a8f13163b 100644
--- a/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html
+++ b/docs/libnm-glib/html/libnm-glib-NMVPNPlugin.html
@@ -123,15 +123,15 @@ enum <a class="link" href="libnm-glib-NMVPNPlugin.html#NMVPNPlugi
<div class="refsect2">
<a name="NMVPNPluginError"></a><h3>enum NMVPNPluginError</h3>
<pre class="programlisting">typedef enum {
- NM_VPN_PLUGIN_ERROR_GENERAL,
- NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS,
- NM_VPN_PLUGIN_ERROR_ALREADY_STARTED,
- NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS,
- NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED,
- NM_VPN_PLUGIN_ERROR_WRONG_STATE,
- NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
- NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
- NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
+ NM_VPN_PLUGIN_ERROR_GENERAL, /*&lt; nick=General &gt;*/
+ NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, /*&lt; nick=StartingInProgress &gt;*/
+ NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, /*&lt; nick=AlreadyStarted &gt;*/
+ NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, /*&lt; nick=StoppingInProgress &gt;*/
+ NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, /*&lt; nick=AlreadyStopped &gt;*/
+ NM_VPN_PLUGIN_ERROR_WRONG_STATE, /*&lt; nick=WrongState &gt;*/
+ NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, /*&lt; nick=BadArguments &gt;*/
+ NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, /*&lt; nick=LaunchFailed &gt;*/
+ NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, /*&lt; nick=ConnectionInvalid &gt;*/
} NMVPNPluginError;
</pre>
<p>
diff --git a/docs/libnm-glib/html/libnm-glib.devhelp2 b/docs/libnm-glib/html/libnm-glib.devhelp2
index 74226d528..edbb4a265 100644
--- a/docs/libnm-glib/html/libnm-glib.devhelp2
+++ b/docs/libnm-glib/html/libnm-glib.devhelp2
@@ -64,6 +64,8 @@
<keyword type="function" name="nm_client_networking_get_enabled ()" link="NMClient.html#nm-client-networking-get-enabled"/>
<keyword type="function" name="nm_client_networking_set_enabled ()" link="NMClient.html#nm-client-networking-set-enabled"/>
<keyword type="function" name="nm_client_new ()" link="NMClient.html#nm-client-new"/>
+ <keyword type="function" name="nm_client_new_async ()" link="NMClient.html#nm-client-new-async"/>
+ <keyword type="function" name="nm_client_new_finish ()" link="NMClient.html#nm-client-new-finish"/>
<keyword type="function" name="nm_client_sleep ()" link="NMClient.html#nm-client-sleep"/>
<keyword type="function" name="nm_client_wimax_get_enabled ()" link="NMClient.html#nm-client-wimax-get-enabled"/>
<keyword type="function" name="nm_client_wimax_hardware_get_enabled ()" link="NMClient.html#nm-client-wimax-hardware-get-enabled"/>
@@ -94,6 +96,7 @@
<keyword type="macro" name="NM_ACTIVE_CONNECTION_DEFAULT" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEFAULT:CAPS"/>
<keyword type="macro" name="NM_ACTIVE_CONNECTION_DEFAULT6" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEFAULT6:CAPS"/>
<keyword type="macro" name="NM_ACTIVE_CONNECTION_DEVICES" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-DEVICES:CAPS"/>
+ <keyword type="macro" name="NM_ACTIVE_CONNECTION_MASTER" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-MASTER:CAPS"/>
<keyword type="macro" name="NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-SPECIFIC-OBJECT:CAPS"/>
<keyword type="macro" name="NM_ACTIVE_CONNECTION_STATE" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-STATE:CAPS"/>
<keyword type="macro" name="NM_ACTIVE_CONNECTION_UUID" link="NMActiveConnection.html#NM-ACTIVE-CONNECTION-UUID:CAPS"/>
@@ -101,6 +104,7 @@
<keyword type="function" name="nm_active_connection_get_default ()" link="NMActiveConnection.html#nm-active-connection-get-default"/>
<keyword type="function" name="nm_active_connection_get_default6 ()" link="NMActiveConnection.html#nm-active-connection-get-default6"/>
<keyword type="function" name="nm_active_connection_get_devices ()" link="NMActiveConnection.html#nm-active-connection-get-devices"/>
+ <keyword type="function" name="nm_active_connection_get_master ()" link="NMActiveConnection.html#nm-active-connection-get-master"/>
<keyword type="function" name="nm_active_connection_get_specific_object ()" link="NMActiveConnection.html#nm-active-connection-get-specific-object"/>
<keyword type="function" name="nm_active_connection_get_state ()" link="NMActiveConnection.html#nm-active-connection-get-state"/>
<keyword type="function" name="nm_active_connection_get_uuid ()" link="NMActiveConnection.html#nm-active-connection-get-uuid"/>
@@ -109,8 +113,10 @@
<keyword type="property" name="The &quot;default&quot; property" link="NMActiveConnection.html#NMActiveConnection--default"/>
<keyword type="property" name="The &quot;default6&quot; property" link="NMActiveConnection.html#NMActiveConnection--default6"/>
<keyword type="property" name="The &quot;devices&quot; property" link="NMActiveConnection.html#NMActiveConnection--devices"/>
+ <keyword type="property" name="The &quot;master&quot; property" link="NMActiveConnection.html#NMActiveConnection--master"/>
<keyword type="property" name="The &quot;specific-object&quot; property" link="NMActiveConnection.html#NMActiveConnection--specific-object"/>
<keyword type="property" name="The &quot;state&quot; property" link="NMActiveConnection.html#NMActiveConnection--state"/>
+ <keyword type="property" name="The &quot;uuid&quot; property" link="NMActiveConnection.html#NMActiveConnection--uuid"/>
<keyword type="struct" name="NMDevice" link="NMDevice.html#NMDevice-struct"/>
<keyword type="struct" name="NMDeviceClass" link="NMDevice.html#NMDeviceClass"/>
<keyword type="function" name="NMDeviceDeactivateFn ()" link="NMDevice.html#NMDeviceDeactivateFn"/>
@@ -128,6 +134,7 @@
<keyword type="macro" name="NM_DEVICE_MANAGED" link="NMDevice.html#NM-DEVICE-MANAGED:CAPS"/>
<keyword type="macro" name="NM_DEVICE_PRODUCT" link="NMDevice.html#NM-DEVICE-PRODUCT:CAPS"/>
<keyword type="macro" name="NM_DEVICE_STATE" link="NMDevice.html#NM-DEVICE-STATE:CAPS"/>
+ <keyword type="macro" name="NM_DEVICE_STATE_REASON" link="NMDevice.html#NM-DEVICE-STATE-REASON:CAPS"/>
<keyword type="macro" name="NM_DEVICE_UDI" link="NMDevice.html#NM-DEVICE-UDI:CAPS"/>
<keyword type="macro" name="NM_DEVICE_VENDOR" link="NMDevice.html#NM-DEVICE-VENDOR:CAPS"/>
<keyword type="function" name="nm_device_connection_valid ()" link="NMDevice.html#nm-device-connection-valid"/>
@@ -147,6 +154,7 @@
<keyword type="function" name="nm_device_get_managed ()" link="NMDevice.html#nm-device-get-managed"/>
<keyword type="function" name="nm_device_get_product ()" link="NMDevice.html#nm-device-get-product"/>
<keyword type="function" name="nm_device_get_state ()" link="NMDevice.html#nm-device-get-state"/>
+ <keyword type="function" name="nm_device_get_state_reason ()" link="NMDevice.html#nm-device-get-state-reason"/>
<keyword type="function" name="nm_device_get_udi ()" link="NMDevice.html#nm-device-get-udi"/>
<keyword type="function" name="nm_device_get_vendor ()" link="NMDevice.html#nm-device-get-vendor"/>
<keyword type="function" name="nm_device_new ()" link="NMDevice.html#nm-device-new"/>
@@ -164,6 +172,7 @@
<keyword type="property" name="The &quot;managed&quot; property" link="NMDevice.html#NMDevice--managed"/>
<keyword type="property" name="The &quot;product&quot; property" link="NMDevice.html#NMDevice--product"/>
<keyword type="property" name="The &quot;state&quot; property" link="NMDevice.html#NMDevice--state"/>
+ <keyword type="property" name="The &quot;state-reason&quot; property" link="NMDevice.html#NMDevice--state-reason"/>
<keyword type="property" name="The &quot;udi&quot; property" link="NMDevice.html#NMDevice--udi"/>
<keyword type="property" name="The &quot;vendor&quot; property" link="NMDevice.html#NMDevice--vendor"/>
<keyword type="signal" name="The &quot;state-changed&quot; signal" link="NMDevice.html#NMDevice-state-changed"/>
@@ -372,7 +381,6 @@
<keyword type="function" name="nm_remote_connection_get_secrets ()" link="NMRemoteConnection.html#nm-remote-connection-get-secrets"/>
<keyword type="function" name="nm_remote_connection_new ()" link="NMRemoteConnection.html#nm-remote-connection-new"/>
<keyword type="property" name="The &quot;bus&quot; property" link="NMRemoteConnection.html#NMRemoteConnection--bus"/>
- <keyword type="property" name="The &quot;init-result&quot; property" link="NMRemoteConnection.html#NMRemoteConnection--init-result"/>
<keyword type="signal" name="The &quot;removed&quot; signal" link="NMRemoteConnection.html#NMRemoteConnection-removed"/>
<keyword type="signal" name="The &quot;updated&quot; signal" link="NMRemoteConnection.html#NMRemoteConnection-updated"/>
<keyword type="signal" name="The &quot;visible&quot; signal" link="NMRemoteConnection.html#NMRemoteConnection-visible"/>
@@ -384,6 +392,7 @@
<keyword type="macro" name="NM_REMOTE_SETTINGS_BUS" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-BUS:CAPS"/>
<keyword type="macro" name="NM_REMOTE_SETTINGS_CAN_MODIFY" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-CAN-MODIFY:CAPS"/>
<keyword type="macro" name="NM_REMOTE_SETTINGS_CONNECTIONS_READ" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-CONNECTIONS-READ:CAPS"/>
+ <keyword type="macro" name="NM_REMOTE_SETTINGS_ERROR" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-ERROR:CAPS"/>
<keyword type="macro" name="NM_REMOTE_SETTINGS_HOSTNAME" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-HOSTNAME:CAPS"/>
<keyword type="macro" name="NM_REMOTE_SETTINGS_NEW_CONNECTION" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-NEW-CONNECTION:CAPS"/>
<keyword type="macro" name="NM_REMOTE_SETTINGS_SERVICE_RUNNING" link="NMRemoteSettings.html#NM-REMOTE-SETTINGS-SERVICE-RUNNING:CAPS"/>
@@ -393,6 +402,8 @@
<keyword type="function" name="nm_remote_settings_get_connection_by_uuid ()" link="NMRemoteSettings.html#nm-remote-settings-get-connection-by-uuid"/>
<keyword type="function" name="nm_remote_settings_list_connections ()" link="NMRemoteSettings.html#nm-remote-settings-list-connections"/>
<keyword type="function" name="nm_remote_settings_new ()" link="NMRemoteSettings.html#nm-remote-settings-new"/>
+ <keyword type="function" name="nm_remote_settings_new_async ()" link="NMRemoteSettings.html#nm-remote-settings-new-async"/>
+ <keyword type="function" name="nm_remote_settings_new_finish ()" link="NMRemoteSettings.html#nm-remote-settings-new-finish"/>
<keyword type="function" name="nm_remote_settings_save_hostname ()" link="NMRemoteSettings.html#nm-remote-settings-save-hostname"/>
<keyword type="property" name="The &quot;bus&quot; property" link="NMRemoteSettings.html#NMRemoteSettings--bus"/>
<keyword type="property" name="The &quot;can-modify&quot; property" link="NMRemoteSettings.html#NMRemoteSettings--can-modify"/>
@@ -408,6 +419,7 @@
<keyword type="function" name="NMSecretAgentGetSecretsFunc ()" link="NMSecretAgent.html#NMSecretAgentGetSecretsFunc"/>
<keyword type="function" name="NMSecretAgentSaveSecretsFunc ()" link="NMSecretAgent.html#NMSecretAgentSaveSecretsFunc"/>
<keyword type="macro" name="NM_SECRET_AGENT_AUTO_REGISTER" link="NMSecretAgent.html#NM-SECRET-AGENT-AUTO-REGISTER:CAPS"/>
+ <keyword type="macro" name="NM_SECRET_AGENT_ERROR" link="NMSecretAgent.html#NM-SECRET-AGENT-ERROR:CAPS"/>
<keyword type="macro" name="NM_SECRET_AGENT_IDENTIFIER" link="NMSecretAgent.html#NM-SECRET-AGENT-IDENTIFIER:CAPS"/>
<keyword type="macro" name="NM_SECRET_AGENT_REGISTRATION_RESULT" link="NMSecretAgent.html#NM-SECRET-AGENT-REGISTRATION-RESULT:CAPS"/>
<keyword type="function" name="nm_secret_agent_delete_secrets ()" link="NMSecretAgent.html#nm-secret-agent-delete-secrets"/>
@@ -418,6 +430,7 @@
<keyword type="function" name="nm_secret_agent_unregister ()" link="NMSecretAgent.html#nm-secret-agent-unregister"/>
<keyword type="property" name="The &quot;auto-register&quot; property" link="NMSecretAgent.html#NMSecretAgent--auto-register"/>
<keyword type="property" name="The &quot;identifier&quot; property" link="NMSecretAgent.html#NMSecretAgent--identifier"/>
+ <keyword type="property" name="The &quot;registered&quot; property" link="NMSecretAgent.html#NMSecretAgent--registered"/>
<keyword type="signal" name="The &quot;registration-result&quot; signal" link="NMSecretAgent.html#NMSecretAgent-registration-result"/>
<keyword type="struct" name="NMVPNConnection" link="NMVPNConnection.html#NMVPNConnection-struct"/>
<keyword type="struct" name="NMVPNConnectionClass" link="NMVPNConnection.html#NMVPNConnectionClass"/>
diff --git a/docs/libnm-glib/html/object-tree.html b/docs/libnm-glib/html/object-tree.html
index 1da8b8e02..bbc781299 100644
--- a/docs/libnm-glib/html/object-tree.html
+++ b/docs/libnm-glib/html/object-tree.html
@@ -32,6 +32,10 @@
<a class="link" href="NMDeviceModem.html" title="NMDeviceModem">NMDeviceModem</a>
<a class="link" href="NMDeviceBt.html" title="NMDeviceBt">NMDeviceBt</a>
<a class="link" href="NMDeviceWimax.html" title="NMDeviceWimax">NMDeviceWimax</a>
+ NMDeviceOlpcMesh
+ NMDeviceInfiniband
+ NMDeviceBond
+ NMDeviceVlan
<a class="link" href="NMWimaxNsp.html" title="NMWimaxNsp">NMWimaxNsp</a>
<a class="link" href="NMAccessPoint.html" title="NMAccessPoint">NMAccessPoint</a>
<a class="link" href="NMIP4Config.html" title="NMIP4Config">NMIP4Config</a>
diff --git a/docs/libnm-glib/libnm-glib-sections.txt b/docs/libnm-glib/libnm-glib-sections.txt
index 7c517f3d9..25ba7b85e 100644
--- a/docs/libnm-glib/libnm-glib-sections.txt
+++ b/docs/libnm-glib/libnm-glib-sections.txt
@@ -50,6 +50,7 @@ NM_ACTIVE_CONNECTION_CONNECTION
NM_ACTIVE_CONNECTION_DEFAULT
NM_ACTIVE_CONNECTION_DEFAULT6
NM_ACTIVE_CONNECTION_DEVICES
+NM_ACTIVE_CONNECTION_MASTER
NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT
NM_ACTIVE_CONNECTION_STATE
NM_ACTIVE_CONNECTION_UUID
@@ -57,6 +58,7 @@ nm_active_connection_get_connection
nm_active_connection_get_default
nm_active_connection_get_default6
nm_active_connection_get_devices
+nm_active_connection_get_master
nm_active_connection_get_specific_object
nm_active_connection_get_state
nm_active_connection_get_uuid
@@ -105,6 +107,8 @@ nm_client_get_version
nm_client_networking_get_enabled
nm_client_networking_set_enabled
nm_client_new
+nm_client_new_async
+nm_client_new_finish
nm_client_sleep
nm_client_wimax_get_enabled
nm_client_wimax_hardware_get_enabled
@@ -145,6 +149,7 @@ NM_DEVICE_IP_INTERFACE
NM_DEVICE_MANAGED
NM_DEVICE_PRODUCT
NM_DEVICE_STATE
+NM_DEVICE_STATE_REASON
NM_DEVICE_UDI
NM_DEVICE_VENDOR
nm_device_connection_valid
@@ -164,6 +169,7 @@ nm_device_get_ip_iface
nm_device_get_managed
nm_device_get_product
nm_device_get_state
+nm_device_get_state_reason
nm_device_get_udi
nm_device_get_vendor
nm_device_new
@@ -178,6 +184,26 @@ nm_device_get_type
</SECTION>
<SECTION>
+<FILE>nm-device-bond</FILE>
+<TITLE>NMDeviceBond</TITLE>
+NMDeviceBond
+NMDeviceBondClass
+NM_DEVICE_BOND_CARRIER
+NM_DEVICE_BOND_HW_ADDRESS
+nm_device_bond_get_carrier
+nm_device_bond_get_hw_address
+nm_device_bond_new
+<SUBSECTION Standard>
+NM_DEVICE_BOND
+NM_DEVICE_BOND_CLASS
+NM_DEVICE_BOND_GET_CLASS
+NM_IS_DEVICE_BOND
+NM_IS_DEVICE_BOND_CLASS
+NM_TYPE_DEVICE_BOND
+nm_device_bond_get_type
+</SECTION>
+
+<SECTION>
<FILE>nm-device-bt</FILE>
<TITLE>NMDeviceBt</TITLE>
NMDeviceBt
@@ -224,6 +250,31 @@ nm_device_ethernet_get_type
</SECTION>
<SECTION>
+<FILE>nm-device-infiniband</FILE>
+<TITLE>NMDeviceInfiniband</TITLE>
+NMDeviceInfiniband
+NMDeviceInfinibandClass
+NM_DEVICE_INFINIBAND_CARRIER
+NM_DEVICE_INFINIBAND_HW_ADDRESS
+nm_device_infiniband_get_carrier
+nm_device_infiniband_get_hw_address
+nm_device_infiniband_new
+<SUBSECTION Standard>
+NM_DEVICE_INFINIBAND
+NM_DEVICE_INFINIBAND_CLASS
+NM_DEVICE_INFINIBAND_GET_CLASS
+NM_IS_DEVICE_INFINIBAND
+NM_IS_DEVICE_INFINIBAND_CLASS
+NM_TYPE_DEVICE_INFINIBAND
+nm_device_infiniband_get_type
+</SECTION>
+
+<SECTION>
+<FILE>nm-device-infiniband-bindings</FILE>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManager_Device_Infiniband
+</SECTION>
+
+<SECTION>
<FILE>nm-device-modem</FILE>
<TITLE>NMDeviceModem</TITLE>
NMDeviceModem
@@ -243,6 +294,50 @@ nm_device_modem_get_type
</SECTION>
<SECTION>
+<FILE>nm-device-olpc-mesh</FILE>
+<TITLE>NMDeviceOlpcMesh</TITLE>
+NMDeviceOlpcMesh
+NMDeviceOlpcMeshClass
+NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL
+NM_DEVICE_OLPC_MESH_COMPANION
+NM_DEVICE_OLPC_MESH_HW_ADDRESS
+nm_device_olpc_mesh_get_active_channel
+nm_device_olpc_mesh_get_companion
+nm_device_olpc_mesh_get_hw_address
+nm_device_olpc_mesh_new
+<SUBSECTION Standard>
+NM_DEVICE_OLPC_MESH
+NM_DEVICE_OLPC_MESH_CLASS
+NM_DEVICE_OLPC_MESH_GET_CLASS
+NM_IS_DEVICE_OLPC_MESH
+NM_IS_DEVICE_OLPC_MESH_CLASS
+NM_TYPE_DEVICE_OLPC_MESH
+nm_device_olpc_mesh_get_type
+</SECTION>
+
+<SECTION>
+<FILE>nm-device-vlan</FILE>
+<TITLE>NMDeviceVlan</TITLE>
+NMDeviceVlan
+NMDeviceVlanClass
+NM_DEVICE_VLAN_CARRIER
+NM_DEVICE_VLAN_HW_ADDRESS
+NM_DEVICE_VLAN_VLAN_ID
+nm_device_vlan_get_carrier
+nm_device_vlan_get_hw_address
+nm_device_vlan_get_vlan_id
+nm_device_vlan_new
+<SUBSECTION Standard>
+NM_DEVICE_VLAN
+NM_DEVICE_VLAN_CLASS
+NM_DEVICE_VLAN_GET_CLASS
+NM_IS_DEVICE_VLAN
+NM_IS_DEVICE_VLAN_CLASS
+NM_TYPE_DEVICE_VLAN
+nm_device_vlan_get_type
+</SECTION>
+
+<SECTION>
<FILE>nm-device-wifi</FILE>
<TITLE>NMDeviceWifi</TITLE>
NMDeviceWifi
@@ -341,6 +436,82 @@ nm_dhcp6_config_get_type
</SECTION>
<SECTION>
+<FILE>nm-exported-connection-bindings</FILE>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_Connection
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_Connection_Secrets
+dbus_g_proxy_begin_call
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_async
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_async_callback
+org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_reply
+org_freedesktop_NetworkManagerSettings_Connection_delete
+org_freedesktop_NetworkManagerSettings_Connection_delete_async
+org_freedesktop_NetworkManagerSettings_Connection_delete_async_callback
+org_freedesktop_NetworkManagerSettings_Connection_delete_reply
+org_freedesktop_NetworkManagerSettings_Connection_get_settings
+org_freedesktop_NetworkManagerSettings_Connection_get_settings_async
+org_freedesktop_NetworkManagerSettings_Connection_get_settings_async_callback
+org_freedesktop_NetworkManagerSettings_Connection_get_settings_reply
+org_freedesktop_NetworkManagerSettings_Connection_update
+org_freedesktop_NetworkManagerSettings_Connection_update_async
+org_freedesktop_NetworkManagerSettings_Connection_update_async_callback
+org_freedesktop_NetworkManagerSettings_Connection_update_reply
+</SECTION>
+
+<SECTION>
+<FILE>nm-exported-connection-glue</FILE>
+dbus_glib_marshal_nm_exported_connection_BOOLEAN__POINTER_POINTER
+dbus_glib_marshal_nm_exported_connection_NONE__BOXED_POINTER
+dbus_glib_marshal_nm_exported_connection_NONE__POINTER
+dbus_glib_marshal_nm_exported_connection_NONE__STRING_BOXED_BOOLEAN_POINTER
+dbus_glib_marshal_nm_exported_connection_VOID__BOXED_POINTER
+dbus_glib_marshal_nm_exported_connection_VOID__POINTER
+dbus_glib_marshal_nm_exported_connection_VOID__STRING_BOXED_BOOLEAN_POINTER
+dbus_glib_nm_exported_connection_object_info
+g_marshal_value_peek_boolean
+g_marshal_value_peek_boxed
+g_marshal_value_peek_char
+g_marshal_value_peek_double
+g_marshal_value_peek_enum
+g_marshal_value_peek_flags
+g_marshal_value_peek_float
+g_marshal_value_peek_int
+g_marshal_value_peek_int64
+g_marshal_value_peek_long
+g_marshal_value_peek_object
+g_marshal_value_peek_param
+g_marshal_value_peek_pointer
+g_marshal_value_peek_string
+g_marshal_value_peek_uchar
+g_marshal_value_peek_uint
+g_marshal_value_peek_uint64
+g_marshal_value_peek_ulong
+g_marshal_value_peek_variant
+</SECTION>
+
+<SECTION>
+<FILE>nm-glib-enum-types</FILE>
+<SUBSECTION Standard>
+NM_TYPE_CLIENT_PERMISSION
+NM_TYPE_CLIENT_PERMISSION_RESULT
+NM_TYPE_REMOTE_SETTINGS_ERROR
+NM_TYPE_SECRET_AGENT_ERROR
+NM_TYPE_SECRET_AGENT_GET_SECRETS_FLAGS
+NM_TYPE_WIMAX_NSP_NETWORK_TYPE
+nm_client_permission_get_type
+nm_client_permission_result_get_type
+nm_remote_settings_error_get_type
+nm_secret_agent_error_get_type
+nm_secret_agent_get_secrets_flags_get_type
+nm_wimax_nsp_network_type_get_type
+</SECTION>
+
+<SECTION>
+<FILE>nm-glib-marshal</FILE>
+
+</SECTION>
+
+<SECTION>
<FILE>nm-ip4-config</FILE>
<TITLE>NMIP4Config</TITLE>
NMIP4Config
@@ -444,6 +615,7 @@ NMRemoteSettingsSaveHostnameFunc
NM_REMOTE_SETTINGS_BUS
NM_REMOTE_SETTINGS_CAN_MODIFY
NM_REMOTE_SETTINGS_CONNECTIONS_READ
+NM_REMOTE_SETTINGS_ERROR
NM_REMOTE_SETTINGS_HOSTNAME
NM_REMOTE_SETTINGS_NEW_CONNECTION
NM_REMOTE_SETTINGS_SERVICE_RUNNING
@@ -453,17 +625,16 @@ nm_remote_settings_get_connection_by_path
nm_remote_settings_get_connection_by_uuid
nm_remote_settings_list_connections
nm_remote_settings_new
+nm_remote_settings_new_async
+nm_remote_settings_new_finish
nm_remote_settings_save_hostname
<SUBSECTION Standard>
NM_IS_REMOTE_SETTINGS
NM_IS_REMOTE_SETTINGS_CLASS
NM_REMOTE_SETTINGS
NM_REMOTE_SETTINGS_CLASS
-NM_REMOTE_SETTINGS_ERROR
NM_REMOTE_SETTINGS_GET_CLASS
NM_TYPE_REMOTE_SETTINGS
-NM_TYPE_REMOTE_SETTINGS_ERROR
-nm_remote_settings_error_get_type
nm_remote_settings_get_type
</SECTION>
@@ -478,6 +649,7 @@ NMSecretAgentGetSecretsFlags
NMSecretAgentGetSecretsFunc
NMSecretAgentSaveSecretsFunc
NM_SECRET_AGENT_AUTO_REGISTER
+NM_SECRET_AGENT_ERROR
NM_SECRET_AGENT_IDENTIFIER
NM_SECRET_AGENT_REGISTRATION_RESULT
nm_secret_agent_delete_secrets
@@ -491,11 +663,8 @@ NM_IS_SECRET_AGENT
NM_IS_SECRET_AGENT_CLASS
NM_SECRET_AGENT
NM_SECRET_AGENT_CLASS
-NM_SECRET_AGENT_ERROR
NM_SECRET_AGENT_GET_CLASS
NM_TYPE_SECRET_AGENT
-NM_TYPE_SECRET_AGENT_ERROR
-nm_secret_agent_error_get_type
nm_secret_agent_get_type
</SECTION>
@@ -530,6 +699,20 @@ g_marshal_value_peek_variant
</SECTION>
<SECTION>
+<FILE>nm-settings-system-bindings</FILE>
+DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_System
+dbus_g_proxy_begin_call
+org_freedesktop_NetworkManagerSettings_System_get_permissions
+org_freedesktop_NetworkManagerSettings_System_get_permissions_async
+org_freedesktop_NetworkManagerSettings_System_get_permissions_async_callback
+org_freedesktop_NetworkManagerSettings_System_get_permissions_reply
+org_freedesktop_NetworkManagerSettings_System_save_hostname
+org_freedesktop_NetworkManagerSettings_System_save_hostname_async
+org_freedesktop_NetworkManagerSettings_System_save_hostname_async_callback
+org_freedesktop_NetworkManagerSettings_System_save_hostname_reply
+</SECTION>
+
+<SECTION>
<FILE>nm-types</FILE>
<SUBSECTION Standard>
NM_TYPE_IP6_ADDRESS_ARRAY
@@ -569,6 +752,15 @@ nm_vpn_connection_get_type
</SECTION>
<SECTION>
+<FILE>nm-vpn-enum-types</FILE>
+<SUBSECTION Standard>
+NM_TYPE_VPN_PLUGIN_ERROR
+NM_TYPE_VPN_PLUGIN_UI_INTERFACE_PROP
+nm_vpn_plugin_error_get_type
+nm_vpn_plugin_ui_interface_prop_get_type
+</SECTION>
+
+<SECTION>
<FILE>nm-vpn-plugin</FILE>
<TITLE>NMVPNPlugin</TITLE>
NMVPNPlugin
@@ -588,7 +780,6 @@ nm_vpn_plugin_set_state
NM_IS_VPN_PLUGIN
NM_IS_VPN_PLUGIN_CLASS
NM_TYPE_VPN_PLUGIN
-NM_TYPE_VPN_PLUGIN_ERROR
NM_VPN_PLUGIN
NM_VPN_PLUGIN_CLASS
NM_VPN_PLUGIN_ERROR
diff --git a/docs/libnm-glib/libnm-glib.types b/docs/libnm-glib/libnm-glib.types
index 8f3eba736..9f6419d9f 100644
--- a/docs/libnm-glib/libnm-glib.types
+++ b/docs/libnm-glib/libnm-glib.types
@@ -6,6 +6,10 @@
#include <nm-device-modem.h>
#include <nm-device-bt.h>
#include <nm-device-wimax.h>
+#include <nm-device-olpc-mesh.h>
+#include <nm-device-infiniband.h>
+#include <nm-device-bond.h>
+#include <nm-device-vlan.h>
#include <nm-access-point.h>
#include <nm-ip4-config.h>
#include <nm-ip6-config.h>
@@ -25,6 +29,10 @@ nm_device_wifi_get_type
nm_device_modem_get_type
nm_device_bt_get_type
nm_device_wimax_get_type
+nm_device_olpc_mesh_get_type
+nm_device_infiniband_get_type
+nm_device_bond_get_type
+nm_device_vlan_get_type
nm_wimax_nsp_get_type
nm_access_point_get_type
nm_ip4_config_get_type
diff --git a/docs/libnm-glib/tmpl/libnm_glib.sgml b/docs/libnm-glib/tmpl/libnm_glib.sgml
index ed0710b9e..325e10cb5 100644
--- a/docs/libnm-glib/tmpl/libnm_glib.sgml
+++ b/docs/libnm-glib/tmpl/libnm_glib.sgml
@@ -9,13 +9,11 @@ libnm_glib
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-access-point.sgml b/docs/libnm-glib/tmpl/nm-access-point.sgml
index 41cade524..f869ab7c2 100644
--- a/docs/libnm-glib/tmpl/nm-access-point.sgml
+++ b/docs/libnm-glib/tmpl/nm-access-point.sgml
@@ -9,13 +9,11 @@ NMAccessPoint
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-active-connection.sgml b/docs/libnm-glib/tmpl/nm-active-connection.sgml
index dedfad8eb..5bbb6b3bc 100644
--- a/docs/libnm-glib/tmpl/nm-active-connection.sgml
+++ b/docs/libnm-glib/tmpl/nm-active-connection.sgml
@@ -9,13 +9,11 @@ NMActiveConnection
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -48,6 +46,11 @@ NMActiveConnection
</para>
+<!-- ##### ARG NMActiveConnection:master ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMActiveConnection:specific-object ##### -->
<para>
@@ -58,6 +61,11 @@ NMActiveConnection
</para>
+<!-- ##### ARG NMActiveConnection:uuid ##### -->
+<para>
+
+</para>
+
<!-- ##### STRUCT NMActiveConnectionClass ##### -->
<para>
@@ -99,6 +107,13 @@ NMActiveConnection
+<!-- ##### MACRO NM_ACTIVE_CONNECTION_MASTER ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT ##### -->
<para>
@@ -156,6 +171,15 @@ NMActiveConnection
@Returns:
+<!-- ##### FUNCTION nm_active_connection_get_master ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+
<!-- ##### FUNCTION nm_active_connection_get_specific_object ##### -->
<para>
diff --git a/docs/libnm-glib/tmpl/nm-client.sgml b/docs/libnm-glib/tmpl/nm-client.sgml
index b8d80874f..773592de6 100644
--- a/docs/libnm-glib/tmpl/nm-client.sgml
+++ b/docs/libnm-glib/tmpl/nm-client.sgml
@@ -9,13 +9,11 @@ NMClient
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -390,13 +388,33 @@ NMClient
@Returns:
+<!-- ##### FUNCTION nm_client_new_async ##### -->
+<para>
+
+</para>
+
+@cancellable:
+@callback:
+@user_data:
+
+
+<!-- ##### FUNCTION nm_client_new_finish ##### -->
+<para>
+
+</para>
+
+@result:
+@error:
+@Returns:
+
+
<!-- ##### FUNCTION nm_client_sleep ##### -->
<para>
</para>
@client:
-@sleep:
+@sleep_:
<!-- ##### FUNCTION nm_client_wimax_get_enabled ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-device-bond.sgml b/docs/libnm-glib/tmpl/nm-device-bond.sgml
new file mode 100644
index 000000000..d719184c5
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-device-bond.sgml
@@ -0,0 +1,93 @@
+<!-- ##### SECTION Title ##### -->
+NMDeviceBond
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMDeviceBond ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMDeviceBond:carrier ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMDeviceBond:hw-address ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMDeviceBondClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+@_reserved5:
+@_reserved6:
+
+<!-- ##### MACRO NM_DEVICE_BOND_CARRIER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_DEVICE_BOND_HW_ADDRESS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_device_bond_get_carrier ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_bond_get_hw_address ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_bond_new ##### -->
+<para>
+
+</para>
+
+@connection:
+@path:
+@Returns:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-device-bt.sgml b/docs/libnm-glib/tmpl/nm-device-bt.sgml
index 9f4ad2b76..bcf2d3c6a 100644
--- a/docs/libnm-glib/tmpl/nm-device-bt.sgml
+++ b/docs/libnm-glib/tmpl/nm-device-bt.sgml
@@ -9,13 +9,11 @@ NMDeviceBt
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-device-ethernet.sgml b/docs/libnm-glib/tmpl/nm-device-ethernet.sgml
index 2932ba068..b3620ab0a 100644
--- a/docs/libnm-glib/tmpl/nm-device-ethernet.sgml
+++ b/docs/libnm-glib/tmpl/nm-device-ethernet.sgml
@@ -9,13 +9,11 @@ NMDeviceEthernet
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-device-infiniband-bindings.sgml b/docs/libnm-glib/tmpl/nm-device-infiniband-bindings.sgml
new file mode 100644
index 000000000..094059876
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-device-infiniband-bindings.sgml
@@ -0,0 +1,29 @@
+<!-- ##### SECTION Title ##### -->
+nm-device-infiniband-bindings
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### MACRO DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManager_Device_Infiniband ##### -->
+<para>
+
+</para>
+
+
+
diff --git a/docs/libnm-glib/tmpl/nm-device-infiniband.sgml b/docs/libnm-glib/tmpl/nm-device-infiniband.sgml
new file mode 100644
index 000000000..bd2ef58eb
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-device-infiniband.sgml
@@ -0,0 +1,93 @@
+<!-- ##### SECTION Title ##### -->
+NMDeviceInfiniband
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMDeviceInfiniband ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMDeviceInfiniband:carrier ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMDeviceInfiniband:hw-address ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMDeviceInfinibandClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+@_reserved5:
+@_reserved6:
+
+<!-- ##### MACRO NM_DEVICE_INFINIBAND_CARRIER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_DEVICE_INFINIBAND_HW_ADDRESS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_device_infiniband_get_carrier ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_infiniband_get_hw_address ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_infiniband_new ##### -->
+<para>
+
+</para>
+
+@connection:
+@path:
+@Returns:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-device-modem.sgml b/docs/libnm-glib/tmpl/nm-device-modem.sgml
index 9d8555796..a67c47770 100644
--- a/docs/libnm-glib/tmpl/nm-device-modem.sgml
+++ b/docs/libnm-glib/tmpl/nm-device-modem.sgml
@@ -9,13 +9,11 @@ NMDeviceModem
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml b/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml
new file mode 100644
index 000000000..69e2cd52e
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml
@@ -0,0 +1,114 @@
+<!-- ##### SECTION Title ##### -->
+NMDeviceOlpcMesh
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMDeviceOlpcMesh ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMDeviceOlpcMesh:active-channel ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMDeviceOlpcMesh:companion ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMDeviceOlpcMesh:hw-address ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMDeviceOlpcMeshClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+@_reserved5:
+@_reserved6:
+
+<!-- ##### MACRO NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_DEVICE_OLPC_MESH_COMPANION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_DEVICE_OLPC_MESH_HW_ADDRESS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_device_olpc_mesh_get_active_channel ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_olpc_mesh_get_companion ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_olpc_mesh_get_hw_address ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_olpc_mesh_new ##### -->
+<para>
+
+</para>
+
+@connection:
+@path:
+@Returns:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-device-vlan.sgml b/docs/libnm-glib/tmpl/nm-device-vlan.sgml
new file mode 100644
index 000000000..5d38d1116
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-device-vlan.sgml
@@ -0,0 +1,114 @@
+<!-- ##### SECTION Title ##### -->
+NMDeviceVlan
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMDeviceVlan ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMDeviceVlan:carrier ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMDeviceVlan:hw-address ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMDeviceVlan:vlan-id ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMDeviceVlanClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+@_reserved5:
+@_reserved6:
+
+<!-- ##### MACRO NM_DEVICE_VLAN_CARRIER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_DEVICE_VLAN_HW_ADDRESS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_DEVICE_VLAN_VLAN_ID ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_device_vlan_get_carrier ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_vlan_get_hw_address ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_vlan_get_vlan_id ##### -->
+<para>
+
+</para>
+
+@device:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_device_vlan_new ##### -->
+<para>
+
+</para>
+
+@connection:
+@path:
+@Returns:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-device-wifi.sgml b/docs/libnm-glib/tmpl/nm-device-wifi.sgml
index 1bfe346e4..94cc3e9fd 100644
--- a/docs/libnm-glib/tmpl/nm-device-wifi.sgml
+++ b/docs/libnm-glib/tmpl/nm-device-wifi.sgml
@@ -9,13 +9,11 @@ NMDeviceWifi
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-device-wimax.sgml b/docs/libnm-glib/tmpl/nm-device-wimax.sgml
index 220bf560a..fbda34696 100644
--- a/docs/libnm-glib/tmpl/nm-device-wimax.sgml
+++ b/docs/libnm-glib/tmpl/nm-device-wimax.sgml
@@ -9,13 +9,11 @@ NMDeviceWimax
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-device.sgml b/docs/libnm-glib/tmpl/nm-device.sgml
index 0810f93a5..c2d02f96d 100644
--- a/docs/libnm-glib/tmpl/nm-device.sgml
+++ b/docs/libnm-glib/tmpl/nm-device.sgml
@@ -9,13 +9,11 @@ NMDevice
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -108,6 +106,11 @@ NMDevice
</para>
+<!-- ##### ARG NMDevice:state-reason ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMDevice:udi ##### -->
<para>
@@ -125,7 +128,7 @@ NMDevice
@parent:
@state_changed:
-@connection_valid:
+@connection_compatible:
@_reserved1:
@_reserved2:
@_reserved3:
@@ -241,6 +244,13 @@ NMDevice
+<!-- ##### MACRO NM_DEVICE_STATE_REASON ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_DEVICE_UDI ##### -->
<para>
@@ -411,6 +421,16 @@ NMDevice
@Returns:
+<!-- ##### FUNCTION nm_device_get_state_reason ##### -->
+<para>
+
+</para>
+
+@device:
+@reason:
+@Returns:
+
+
<!-- ##### FUNCTION nm_device_get_udi ##### -->
<para>
diff --git a/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml b/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml
index cef5854d3..752a8b2ce 100644
--- a/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml
+++ b/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml
@@ -9,13 +9,11 @@ NMDHCP4Config
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml b/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml
index 2c1132613..d01ac192e 100644
--- a/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml
+++ b/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml
@@ -9,13 +9,11 @@ NMDHCP6Config
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-exported-connection-bindings.sgml b/docs/libnm-glib/tmpl/nm-exported-connection-bindings.sgml
new file mode 100644
index 000000000..6d7bd83d7
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-exported-connection-bindings.sgml
@@ -0,0 +1,213 @@
+<!-- ##### SECTION Title ##### -->
+nm-exported-connection-bindings
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### MACRO DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_Connection ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_Connection_Secrets ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION dbus_g_proxy_begin_call ##### -->
+<para>
+
+</para>
+
+@Param1:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets ##### -->
+<para>
+
+</para>
+
+@proxy:
+@IN_setting_name:
+@IN_hints:
+@IN_request_new:
+@OUT_secrets:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_async ##### -->
+<para>
+
+</para>
+
+@proxy:
+@IN_setting_name:
+@IN_hints:
+@IN_request_new:
+@callback:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_async_callback ##### -->
+<para>
+
+</para>
+
+@proxy:
+@call:
+@user_data:
+
+
+<!-- ##### USER_FUNCTION org_freedesktop_NetworkManagerSettings_Connection_Secrets_get_secrets_reply ##### -->
+<para>
+
+</para>
+
+@proxy:
+@OUT_secrets:
+@error:
+@userdata:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_delete ##### -->
+<para>
+
+</para>
+
+@proxy:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_delete_async ##### -->
+<para>
+
+</para>
+
+@proxy:
+@callback:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_delete_async_callback ##### -->
+<para>
+
+</para>
+
+@proxy:
+@call:
+@user_data:
+
+
+<!-- ##### USER_FUNCTION org_freedesktop_NetworkManagerSettings_Connection_delete_reply ##### -->
+<para>
+
+</para>
+
+@proxy:
+@error:
+@userdata:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_get_settings ##### -->
+<para>
+
+</para>
+
+@proxy:
+@OUT_settings:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_get_settings_async ##### -->
+<para>
+
+</para>
+
+@proxy:
+@callback:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_get_settings_async_callback ##### -->
+<para>
+
+</para>
+
+@proxy:
+@call:
+@user_data:
+
+
+<!-- ##### USER_FUNCTION org_freedesktop_NetworkManagerSettings_Connection_get_settings_reply ##### -->
+<para>
+
+</para>
+
+@proxy:
+@OUT_settings:
+@error:
+@userdata:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_update ##### -->
+<para>
+
+</para>
+
+@proxy:
+@IN_properties:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_update_async ##### -->
+<para>
+
+</para>
+
+@proxy:
+@IN_properties:
+@callback:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_Connection_update_async_callback ##### -->
+<para>
+
+</para>
+
+@proxy:
+@call:
+@user_data:
+
+
+<!-- ##### USER_FUNCTION org_freedesktop_NetworkManagerSettings_Connection_update_reply ##### -->
+<para>
+
+</para>
+
+@proxy:
+@error:
+@userdata:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-exported-connection-glue.sgml b/docs/libnm-glib/tmpl/nm-exported-connection-glue.sgml
new file mode 100644
index 000000000..fda72e2e5
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-exported-connection-glue.sgml
@@ -0,0 +1,247 @@
+<!-- ##### SECTION Title ##### -->
+nm-exported-connection-glue
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### FUNCTION dbus_glib_marshal_nm_exported_connection_BOOLEAN__POINTER_POINTER ##### -->
+<para>
+
+</para>
+
+@closure:
+@return_value:
+@n_param_values:
+@param_values:
+@invocation_hint:
+@marshal_data:
+
+
+<!-- ##### MACRO dbus_glib_marshal_nm_exported_connection_NONE__BOXED_POINTER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO dbus_glib_marshal_nm_exported_connection_NONE__POINTER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO dbus_glib_marshal_nm_exported_connection_NONE__STRING_BOXED_BOOLEAN_POINTER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION dbus_glib_marshal_nm_exported_connection_VOID__BOXED_POINTER ##### -->
+<para>
+
+</para>
+
+@closure:
+@return_value:
+@n_param_values:
+@param_values:
+@invocation_hint:
+@marshal_data:
+
+
+<!-- ##### MACRO dbus_glib_marshal_nm_exported_connection_VOID__POINTER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION dbus_glib_marshal_nm_exported_connection_VOID__STRING_BOXED_BOOLEAN_POINTER ##### -->
+<para>
+
+</para>
+
+@closure:
+@return_value:
+@n_param_values:
+@param_values:
+@invocation_hint:
+@marshal_data:
+
+
+<!-- ##### VARIABLE dbus_glib_nm_exported_connection_object_info ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO g_marshal_value_peek_boolean ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_boxed ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_char ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_double ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_enum ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_flags ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_float ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_int ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_int64 ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_long ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_object ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_param ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_pointer ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_string ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_uchar ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_uint ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_uint64 ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_ulong ##### -->
+<para>
+
+</para>
+
+@v:
+
+
+<!-- ##### MACRO g_marshal_value_peek_variant ##### -->
+<para>
+
+</para>
+
+@v:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml b/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml
new file mode 100644
index 000000000..a60db68ef
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml
@@ -0,0 +1,22 @@
+<!-- ##### SECTION Title ##### -->
+nm-glib-enum-types
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
diff --git a/docs/libnm-glib/tmpl/nm-glib-marshal.sgml b/docs/libnm-glib/tmpl/nm-glib-marshal.sgml
new file mode 100644
index 000000000..dbe724348
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-glib-marshal.sgml
@@ -0,0 +1,22 @@
+<!-- ##### SECTION Title ##### -->
+nm-glib-marshal
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
diff --git a/docs/libnm-glib/tmpl/nm-ip4-config.sgml b/docs/libnm-glib/tmpl/nm-ip4-config.sgml
index e015c2af7..0e33ca0b6 100644
--- a/docs/libnm-glib/tmpl/nm-ip4-config.sgml
+++ b/docs/libnm-glib/tmpl/nm-ip4-config.sgml
@@ -9,13 +9,11 @@ NMIP4Config
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-ip6-config.sgml b/docs/libnm-glib/tmpl/nm-ip6-config.sgml
index f098e022f..f2e66b715 100644
--- a/docs/libnm-glib/tmpl/nm-ip6-config.sgml
+++ b/docs/libnm-glib/tmpl/nm-ip6-config.sgml
@@ -9,13 +9,11 @@ NMIP6Config
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-object.sgml b/docs/libnm-glib/tmpl/nm-object.sgml
index eb07c0dad..d79c15225 100644
--- a/docs/libnm-glib/tmpl/nm-object.sgml
+++ b/docs/libnm-glib/tmpl/nm-object.sgml
@@ -9,13 +9,11 @@ NMObject
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-remote-connection.sgml b/docs/libnm-glib/tmpl/nm-remote-connection.sgml
index 40a745c8d..594371fdc 100644
--- a/docs/libnm-glib/tmpl/nm-remote-connection.sgml
+++ b/docs/libnm-glib/tmpl/nm-remote-connection.sgml
@@ -9,13 +9,11 @@ NMRemoteConnection
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -55,11 +53,6 @@ NMRemoteConnection
</para>
-<!-- ##### ARG NMRemoteConnection:init-result ##### -->
-<para>
-
-</para>
-
<!-- ##### STRUCT NMRemoteConnectionClass ##### -->
<para>
diff --git a/docs/libnm-glib/tmpl/nm-remote-settings.sgml b/docs/libnm-glib/tmpl/nm-remote-settings.sgml
index a300d9b91..3f24a06c9 100644
--- a/docs/libnm-glib/tmpl/nm-remote-settings.sgml
+++ b/docs/libnm-glib/tmpl/nm-remote-settings.sgml
@@ -9,13 +9,11 @@ NMRemoteSettings
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -129,6 +127,13 @@ NMRemoteSettings
+<!-- ##### MACRO NM_REMOTE_SETTINGS_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_REMOTE_SETTINGS_HOSTNAME ##### -->
<para>
@@ -209,6 +214,27 @@ NMRemoteSettings
@Returns:
+<!-- ##### FUNCTION nm_remote_settings_new_async ##### -->
+<para>
+
+</para>
+
+@bus:
+@cancellable:
+@callback:
+@user_data:
+
+
+<!-- ##### FUNCTION nm_remote_settings_new_finish ##### -->
+<para>
+
+</para>
+
+@result:
+@error:
+@Returns:
+
+
<!-- ##### FUNCTION nm_remote_settings_save_hostname ##### -->
<para>
diff --git a/docs/libnm-glib/tmpl/nm-secret-agent-glue.sgml b/docs/libnm-glib/tmpl/nm-secret-agent-glue.sgml
index c4706cbf2..f8b51d7df 100644
--- a/docs/libnm-glib/tmpl/nm-secret-agent-glue.sgml
+++ b/docs/libnm-glib/tmpl/nm-secret-agent-glue.sgml
@@ -9,13 +9,11 @@ nm-secret-agent-glue
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-secret-agent.sgml b/docs/libnm-glib/tmpl/nm-secret-agent.sgml
index 7cacb7031..9f31c86b8 100644
--- a/docs/libnm-glib/tmpl/nm-secret-agent.sgml
+++ b/docs/libnm-glib/tmpl/nm-secret-agent.sgml
@@ -9,13 +9,11 @@ NMSecretAgent
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -46,6 +44,11 @@ NMSecretAgent
</para>
+<!-- ##### ARG NMSecretAgent:registered ##### -->
+<para>
+
+</para>
+
<!-- ##### STRUCT NMSecretAgentClass ##### -->
<para>
@@ -126,6 +129,13 @@ NMSecretAgent
+<!-- ##### MACRO NM_SECRET_AGENT_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SECRET_AGENT_IDENTIFIER ##### -->
<para>
diff --git a/docs/libnm-glib/tmpl/nm-settings-system-bindings.sgml b/docs/libnm-glib/tmpl/nm-settings-system-bindings.sgml
new file mode 100644
index 000000000..297907940
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-settings-system-bindings.sgml
@@ -0,0 +1,120 @@
+<!-- ##### SECTION Title ##### -->
+nm-settings-system-bindings
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### MACRO DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_NetworkManagerSettings_System ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION dbus_g_proxy_begin_call ##### -->
+<para>
+
+</para>
+
+@Param1:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_System_get_permissions ##### -->
+<para>
+
+</para>
+
+@proxy:
+@OUT_permissions:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_System_get_permissions_async ##### -->
+<para>
+
+</para>
+
+@proxy:
+@callback:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_System_get_permissions_async_callback ##### -->
+<para>
+
+</para>
+
+@proxy:
+@call:
+@user_data:
+
+
+<!-- ##### USER_FUNCTION org_freedesktop_NetworkManagerSettings_System_get_permissions_reply ##### -->
+<para>
+
+</para>
+
+@proxy:
+@OUT_permissions:
+@error:
+@userdata:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_System_save_hostname ##### -->
+<para>
+
+</para>
+
+@proxy:
+@IN_hostname:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_System_save_hostname_async ##### -->
+<para>
+
+</para>
+
+@proxy:
+@IN_hostname:
+@callback:
+@Returns:
+
+
+<!-- ##### FUNCTION org_freedesktop_NetworkManagerSettings_System_save_hostname_async_callback ##### -->
+<para>
+
+</para>
+
+@proxy:
+@call:
+@user_data:
+
+
+<!-- ##### USER_FUNCTION org_freedesktop_NetworkManagerSettings_System_save_hostname_reply ##### -->
+<para>
+
+</para>
+
+@proxy:
+@error:
+@userdata:
+
+
diff --git a/docs/libnm-glib/tmpl/nm-types.sgml b/docs/libnm-glib/tmpl/nm-types.sgml
index 18babb0f0..1469192ec 100644
--- a/docs/libnm-glib/tmpl/nm-types.sgml
+++ b/docs/libnm-glib/tmpl/nm-types.sgml
@@ -9,13 +9,11 @@ nm-types
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-vpn-connection.sgml b/docs/libnm-glib/tmpl/nm-vpn-connection.sgml
index 3086909ad..fe3dcbe00 100644
--- a/docs/libnm-glib/tmpl/nm-vpn-connection.sgml
+++ b/docs/libnm-glib/tmpl/nm-vpn-connection.sgml
@@ -9,13 +9,11 @@ NMVPNConnection
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml b/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml
new file mode 100644
index 000000000..83b976cd4
--- /dev/null
+++ b/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml
@@ -0,0 +1,22 @@
+<!-- ##### SECTION Title ##### -->
+nm-vpn-enum-types
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml
index 708893551..cf000cae0 100644
--- a/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml
+++ b/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml
@@ -9,13 +9,11 @@ NMVpnPluginUiWidget
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml
index ed0ab40b7..a35e6a9ab 100644
--- a/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml
+++ b/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml
@@ -9,13 +9,11 @@ nm-vpn-plugin-utils
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml
index b6b95132a..08e0807cf 100644
--- a/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml
+++ b/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml
@@ -9,13 +9,11 @@ NMVPNPlugin
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml b/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml
index f5dca7a3b..4dd298b75 100644
--- a/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml
+++ b/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml
@@ -9,13 +9,11 @@ NMWimaxNsp
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-util/Makefile.in b/docs/libnm-util/Makefile.in
index f35bd85ea..281aa7653 100644
--- a/docs/libnm-util/Makefile.in
+++ b/docs/libnm-util/Makefile.in
@@ -114,6 +114,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -168,11 +170,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -183,6 +189,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -222,6 +229,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/docs/libnm-util/html/NMConnection.html b/docs/libnm-util/html/NMConnection.html
index 19914db28..45911ba8e 100644
--- a/docs/libnm-util/html/NMConnection.html
+++ b/docs/libnm-util/html/NMConnection.html
@@ -49,6 +49,7 @@
<a class="link" href="NMConnection.html#NMConnection-struct" title="NMConnection">NMConnection</a>;
<a class="link" href="NMConnection.html#NMConnectionClass" title="NMConnectionClass">NMConnectionClass</a>;
enum <a class="link" href="NMConnection.html#NMConnectionError-enum" title="enum NMConnectionError">NMConnectionError</a>;
+#define <a class="link" href="NMConnection.html#NM-CONNECTION-ERROR:CAPS" title="NM_CONNECTION_ERROR">NM_CONNECTION_ERROR</a>
#define <a class="link" href="NMConnection.html#NM-CONNECTION-PATH:CAPS" title="NM_CONNECTION_PATH">NM_CONNECTION_PATH</a>
<span class="returnvalue">void</span> <a class="link" href="NMConnection.html#nm-connection-add-setting" title="nm_connection_add_setting ()">nm_connection_add_setting</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);
@@ -59,11 +60,11 @@ enum <a class="link" href="NMConnection.html#NMConnectionError-en
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMConnection.html#nm-connection-compare" title="nm_connection_compare ()">nm_connection_compare</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMConnection.html#nm-connection-create-setting" title="nm_connection_create_setting ()">nm_connection_create_setting</a> (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMConnection.html#nm-connection-diff" title="nm_connection_diff ()">nm_connection_diff</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **out_settings</code></em>);
<span class="returnvalue">void</span> <a class="link" href="NMConnection.html#nm-connection-dump" title="nm_connection_dump ()">nm_connection_dump</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMConnection.html" title="NMConnection"><span class="returnvalue">NMConnection</span></a> * <a class="link" href="NMConnection.html#nm-connection-duplicate" title="nm_connection_duplicate ()">nm_connection_duplicate</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
@@ -79,12 +80,15 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCon
<a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="returnvalue">NMSetting8021x</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-802-1x" title="nm_connection_get_setting_802_1x ()">nm_connection_get_setting_802_1x</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth"><span class="returnvalue">NMSettingBluetooth</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-bluetooth" title="nm_connection_get_setting_bluetooth ()">nm_connection_get_setting_bluetooth</a>
(<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
+<span class="returnvalue">NMSettingBond</span> * <a class="link" href="NMConnection.html#nm-connection-get-setting-bond" title="nm_connection_get_setting_bond ()">nm_connection_get_setting_bond</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-by-name" title="nm_connection_get_setting_by_name ()">nm_connection_get_setting_by_name</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
<a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="returnvalue">NMSettingCdma</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-cdma" title="nm_connection_get_setting_cdma ()">nm_connection_get_setting_cdma</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="returnvalue">NMSettingConnection</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-connection" title="nm_connection_get_setting_connection ()">nm_connection_get_setting_connection</a>
(<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="returnvalue">NMSettingGsm</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-gsm" title="nm_connection_get_setting_gsm ()">nm_connection_get_setting_gsm</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
+<span class="returnvalue">NMSettingInfiniband</span> * <a class="link" href="NMConnection.html#nm-connection-get-setting-infiniband" title="nm_connection_get_setting_infiniband ()">nm_connection_get_setting_infiniband</a>
+ (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config"><span class="returnvalue">NMSettingIP4Config</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-ip4-config" title="nm_connection_get_setting_ip4_config ()">nm_connection_get_setting_ip4_config</a>
(<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="returnvalue">NMSettingIP6Config</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-ip6-config" title="nm_connection_get_setting_ip6_config ()">nm_connection_get_setting_ip6_config</a>
@@ -92,6 +96,8 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCon
<a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh"><span class="returnvalue">NMSettingOlpcMesh</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-olpc-mesh" title="nm_connection_get_setting_olpc_mesh ()">nm_connection_get_setting_olpc_mesh</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingPPP.html" title="NMSettingPPP"><span class="returnvalue">NMSettingPPP</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-ppp" title="nm_connection_get_setting_ppp ()">nm_connection_get_setting_ppp</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE"><span class="returnvalue">NMSettingPPPOE</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-pppoe" title="nm_connection_get_setting_pppoe ()">nm_connection_get_setting_pppoe</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
+<a class="link" href="NMSettingSerial.html" title="NMSettingSerial"><span class="returnvalue">NMSettingSerial</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-serial" title="nm_connection_get_setting_serial ()">nm_connection_get_setting_serial</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
+<span class="returnvalue">NMSettingVlan</span> * <a class="link" href="NMConnection.html#nm-connection-get-setting-vlan" title="nm_connection_get_setting_vlan ()">nm_connection_get_setting_vlan</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="returnvalue">NMSettingVPN</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-vpn" title="nm_connection_get_setting_vpn ()">nm_connection_get_setting_vpn</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingWimax.html" title="NMSettingWimax"><span class="returnvalue">NMSettingWimax</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-wimax" title="nm_connection_get_setting_wimax ()">nm_connection_get_setting_wimax</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a class="link" href="NMSettingWired.html" title="NMSettingWired"><span class="returnvalue">NMSettingWired</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-wired" title="nm_connection_get_setting_wired ()">nm_connection_get_setting_wired</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
@@ -99,6 +105,8 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCon
<a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="returnvalue">NMSettingWirelessSecurity</span></a> * <a class="link" href="NMConnection.html#nm-connection-get-setting-wireless-security" title="nm_connection_get_setting_wireless_security ()">nm_connection_get_setting_wireless_security</a>
(<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMConnection.html#nm-connection-get-uuid" title="nm_connection_get_uuid ()">nm_connection_get_uuid</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMConnection.html#nm-connection-get-virtual-iface-name" title="nm_connection_get_virtual_iface_name ()">nm_connection_get_virtual_iface_name</a>
+ (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMConnection.html#nm-connection-is-type" title="nm_connection_is_type ()">nm_connection_is_type</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>);
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="NMConnection.html#nm-connection-lookup-setting-type" title="nm_connection_lookup_setting_type ()">nm_connection_lookup_setting_type</a> (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
@@ -117,7 +125,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCon
<span class="returnvalue">void</span> <a class="link" href="NMConnection.html#nm-connection-set-path" title="nm_connection_set_path ()">nm_connection_set_path</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * <a class="link" href="NMConnection.html#nm-connection-to-hash" title="nm_connection_to_hash ()">nm_connection_to_hash</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags" title="enum NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMConnection.html#nm-connection-update-secrets" title="nm_connection_update_secrets ()">nm_connection_update_secrets</a> (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *setting_name</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *secrets</code></em>,
@@ -195,10 +203,10 @@ It should only be accessed through the functions described below.
<div class="refsect2">
<a name="NMConnectionError-enum"></a><h3>enum NMConnectionError</h3>
<pre class="programlisting">typedef enum {
- NM_CONNECTION_ERROR_UNKNOWN = 0,
- NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND,
- NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID,
- NM_CONNECTION_ERROR_SETTING_NOT_FOUND
+ NM_CONNECTION_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, /*&lt; nick=ConnectionSettingNotFound &gt;*/
+ NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID, /*&lt; nick=ConnectionTypeInvalid &gt;*/
+ NM_CONNECTION_ERROR_SETTING_NOT_FOUND /*&lt; nick=SettingNotFound &gt;*/
} NMConnectionError;
</pre>
<p>
@@ -238,6 +246,14 @@ Describes errors that may result from operations involving a <a class="link" hre
</div>
<hr>
<div class="refsect2">
+<a name="NM-CONNECTION-ERROR:CAPS"></a><h3>NM_CONNECTION_ERROR</h3>
+<pre class="programlisting">#define NM_CONNECTION_ERROR nm_connection_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-CONNECTION-PATH:CAPS"></a><h3>NM_CONNECTION_PATH</h3>
<pre class="programlisting">#define NM_CONNECTION_PATH "path"
</pre>
@@ -325,7 +341,7 @@ specific secret should be cleared or not. <span class="annotation">[<acronym tit
<a name="nm-connection-compare"></a><h3>nm_connection_compare ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_connection_compare (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);</pre>
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);</pre>
<p>
Compares two <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> objects for similarity, with comparison behavior
modified by a set of flags. See <a class="link" href="NMSetting.html#nm-setting-compare" title="nm_setting_compare ()"><code class="function">nm_setting_compare()</code></a> for a description of
@@ -383,7 +399,7 @@ Create a new <a class="link" href="NMSetting.html" title="NMSetting"><span class
<a name="nm-connection-diff"></a><h3>nm_connection_diff ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_connection_diff (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **out_settings</code></em>);</pre>
<p>
Compares two <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> objects for similarity, with comparison behavior
@@ -414,7 +430,7 @@ No values are returned, only key names.
<td>if the
connections differ, on return a hash table mapping setting names to
second-level GHashTable (utf8 to guint32), which contains the key names that
-differ mapped to one or more of <a class="link" href="NMSetting.html#NMSettingDiffResult" title="enum NMSettingDiffResult"><code class="literal">NMSettingDiffResult</code></a> as a bitfield. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 GLib.HashTable]</span>
+differ mapped to one or more of <a class="link" href="NMSetting.html#NMSettingDiffResult"><code class="literal">NMSettingDiffResult</code></a> as a bitfield. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 GLib.HashTable]</span>
</td>
</tr>
<tr>
@@ -637,6 +653,29 @@ A shortcut to return any <a class="link" href="NMSettingBluetooth.html" title="N
</div>
<hr>
<div class="refsect2">
+<a name="nm-connection-get-setting-bond"></a><h3>nm_connection_get_setting_bond ()</h3>
+<pre class="programlisting"><span class="returnvalue">NMSettingBond</span> * nm_connection_get_setting_bond (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
+<p>
+A shortcut to return any <span class="type">NMSettingBond</span> the connection might contain.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>an <span class="type">NMSettingBond</span> if the connection contains one, otherwise NULL. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-connection-get-setting-by-name"></a><h3>nm_connection_get_setting_by_name ()</h3>
<pre class="programlisting"><a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * nm_connection_get_setting_by_name (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
@@ -737,6 +776,30 @@ A shortcut to return any <a class="link" href="NMSettingGsm.html" title="NMSetti
</div>
<hr>
<div class="refsect2">
+<a name="nm-connection-get-setting-infiniband"></a><h3>nm_connection_get_setting_infiniband ()</h3>
+<pre class="programlisting"><span class="returnvalue">NMSettingInfiniband</span> * nm_connection_get_setting_infiniband
+ (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
+<p>
+A shortcut to return any <span class="type">NMSettingInfiniband</span> the connection might contain.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>an <span class="type">NMSettingInfiniband</span> if the connection contains one, otherwise NULL. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-connection-get-setting-ip4-config"></a><h3>nm_connection_get_setting_ip4_config ()</h3>
<pre class="programlisting"><a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config"><span class="returnvalue">NMSettingIP4Config</span></a> * nm_connection_get_setting_ip4_config
(<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
@@ -854,6 +917,52 @@ A shortcut to return any <span class="type">NMSettingPPOE</span> the connection
</div>
<hr>
<div class="refsect2">
+<a name="nm-connection-get-setting-serial"></a><h3>nm_connection_get_setting_serial ()</h3>
+<pre class="programlisting"><a class="link" href="NMSettingSerial.html" title="NMSettingSerial"><span class="returnvalue">NMSettingSerial</span></a> * nm_connection_get_setting_serial (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
+<p>
+A shortcut to return any <a class="link" href="NMSettingSerial.html" title="NMSettingSerial"><span class="type">NMSettingSerial</span></a> the connection might contain.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>an <a class="link" href="NMSettingSerial.html" title="NMSettingSerial"><span class="type">NMSettingSerial</span></a> if the connection contains one, otherwise NULL. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-connection-get-setting-vlan"></a><h3>nm_connection_get_setting_vlan ()</h3>
+<pre class="programlisting"><span class="returnvalue">NMSettingVlan</span> * nm_connection_get_setting_vlan (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
+<p>
+A shortcut to return any <span class="type">NMSettingVlan</span> the connection might contain.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>an <span class="type">NMSettingVlan</span> if the connection contains one, otherwise NULL. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-connection-get-setting-vpn"></a><h3>nm_connection_get_setting_vpn ()</h3>
<pre class="programlisting"><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="returnvalue">NMSettingVPN</span></a> * nm_connection_get_setting_vpn (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
<p>
@@ -992,6 +1101,32 @@ A shortcut to return the UUID from the connection's <a class="link" href="NMSett
</div>
<hr>
<div class="refsect2">
+<a name="nm-connection-get-virtual-iface-name"></a><h3>nm_connection_get_virtual_iface_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_connection_get_virtual_iface_name
+ (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>);</pre>
+<p>
+Returns the name of the virtual kernel interface which the connection
+needs to use if specified in the settings. This function abstracts all
+connection types which require this functionality. For all other
+connection types, this function will return NULL.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
+<td>The <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>Name of the kernel interface or NULL</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-connection-is-type"></a><h3>nm_connection_is_type ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_connection_is_type (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>);</pre>
@@ -1235,7 +1370,7 @@ which provides the connection</td>
<div class="refsect2">
<a name="nm-connection-to-hash"></a><h3>nm_connection_to_hash ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * nm_connection_to_hash (<em class="parameter"><code><a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> *connection</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags" title="enum NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);</pre>
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);</pre>
<p>
Converts the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> describing the connection,
suitable for marshalling over D-Bus or serializing. The hash table mapping
diff --git a/docs/libnm-util/html/NMSetting.html b/docs/libnm-util/html/NMSetting.html
index 63319e1a6..3e64eeb0b 100644
--- a/docs/libnm-util/html/NMSetting.html
+++ b/docs/libnm-util/html/NMSetting.html
@@ -41,25 +41,26 @@
</tr></table></div>
<div class="refsynopsisdiv">
<a name="NMSetting.synopsis"></a><h2>Synopsis</h2>
-<a name="NMSettingError"></a><pre class="synopsis">
+<a name="NMSettingCompareFlags"></a><a name="NMSettingDiffResult"></a><a name="NMSettingError"></a><a name="NMSettingHashFlags"></a><a name="NMSettingSecretFlags"></a><pre class="synopsis">
#include &lt;nm-setting.h&gt;
<a class="link" href="NMSetting.html#NMSetting-struct" title="NMSetting">NMSetting</a>;
<a class="link" href="NMSetting.html#NMSettingClass" title="NMSettingClass">NMSettingClass</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="NMSetting.html#NMSettingClearSecretsWithFlagsFn" title="NMSettingClearSecretsWithFlagsFn ()">*NMSettingClearSecretsWithFlagsFn</a>) (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *secret</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
-enum <a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags">NMSettingCompareFlags</a>;
-enum <a class="link" href="NMSetting.html#NMSettingDiffResult" title="enum NMSettingDiffResult">NMSettingDiffResult</a>;
+enum <a class="link" href="NMSetting.html#NMSettingCompareFlags-enum" title="enum NMSettingCompareFlags">NMSettingCompareFlags</a>;
+enum <a class="link" href="NMSetting.html#NMSettingDiffResult-enum" title="enum NMSettingDiffResult">NMSettingDiffResult</a>;
enum <a class="link" href="NMSetting.html#NMSettingError-enum" title="enum NMSettingError">NMSettingError</a>;
-enum <a class="link" href="NMSetting.html#NMSettingHashFlags" title="enum NMSettingHashFlags">NMSettingHashFlags</a>;
-enum <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags">NMSettingSecretFlags</a>;
+enum <a class="link" href="NMSetting.html#NMSettingHashFlags-enum" title="enum NMSettingHashFlags">NMSettingHashFlags</a>;
+enum <a class="link" href="NMSetting.html#NMSettingSecretFlags-enum" title="enum NMSettingSecretFlags">NMSettingSecretFlags</a>;
<span class="returnvalue">void</span> (<a class="link" href="NMSetting.html#NMSettingValueIterFn" title="NMSettingValueIterFn ()">*NMSettingValueIterFn</a>) (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
+#define <a class="link" href="NMSetting.html#NM-SETTING-ERROR:CAPS" title="NM_SETTING_ERROR">NM_SETTING_ERROR</a>
#define <a class="link" href="NMSetting.html#NM-SETTING-NAME:CAPS" title="NM_SETTING_NAME">NM_SETTING_NAME</a>
#define <a class="link" href="NMSetting.html#NM-SETTING-PARAM-FUZZY-IGNORE:CAPS" title="NM_SETTING_PARAM_FUZZY_IGNORE">NM_SETTING_PARAM_FUZZY_IGNORE</a>
#define <a class="link" href="NMSetting.html#NM-SETTING-PARAM-REQUIRED:CAPS" title="NM_SETTING_PARAM_REQUIRED">NM_SETTING_PARAM_REQUIRED</a>
@@ -71,10 +72,10 @@ enum <a class="link" href="NMSetting.html#NMSettingSecretFlags" t
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting.html#nm-setting-compare" title="nm_setting_compare ()">nm_setting_compare</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting.html#nm-setting-diff" title="nm_setting_diff ()">nm_setting_diff</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> invert_results</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **results</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMSetting.html#nm-setting-duplicate" title="nm_setting_duplicate ()">nm_setting_duplicate</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);
@@ -85,17 +86,18 @@ enum <a class="link" href="NMSetting.html#NMSettingSecretFlags" t
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting.html#nm-setting-get-name" title="nm_setting_get_name ()">nm_setting_get_name</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting.html#nm-setting-get-secret-flags" title="nm_setting_get_secret_flags ()">nm_setting_get_secret_flags</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *secret_name</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> *out_flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> *out_flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMSetting.html#nm-setting-get-virtual-iface-name" title="nm_setting_get_virtual_iface_name ()">nm_setting_get_virtual_iface_name</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="NMSetting.html#nm-setting-need-secrets" title="nm_setting_need_secrets ()">nm_setting_need_secrets</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMSetting.html#nm-setting-new-from-hash" title="nm_setting_new_from_hash ()">nm_setting_new_from_hash</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> setting_type</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *hash</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting.html#nm-setting-set-secret-flags" title="nm_setting_set_secret_flags ()">nm_setting_set_secret_flags</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *secret_name</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * <a class="link" href="NMSetting.html#nm-setting-to-hash" title="nm_setting_to_hash ()">nm_setting_to_hash</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags" title="enum NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);
<span class="returnvalue">char</span> * <a class="link" href="NMSetting.html#nm-setting-to-string" title="nm_setting_to_string ()">nm_setting_to_string</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting.html#nm-setting-update-secrets" title="nm_setting_update_secrets ()">nm_setting_update_secrets</a> (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *secrets</code></em>,
@@ -112,15 +114,18 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
+----NMSetting
+----<a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+----<a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth">NMSettingBluetooth</a>
+ +----NMSettingBond
+----<a class="link" href="NMSettingCdma.html" title="NMSettingCdma">NMSettingCdma</a>
+----<a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+----<a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+ +----NMSettingInfiniband
+----<a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config">NMSettingIP4Config</a>
+----<a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
+----<a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh">NMSettingOlpcMesh</a>
+----<a class="link" href="NMSettingPPP.html" title="NMSettingPPP">NMSettingPPP</a>
+----<a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE">NMSettingPPPOE</a>
+----<a class="link" href="NMSettingSerial.html" title="NMSettingSerial">NMSettingSerial</a>
+ +----NMSettingVlan
+----<a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
+----<a class="link" href="NMSettingWimax.html" title="NMSettingWimax">NMSettingWimax</a>
+----<a class="link" href="NMSettingWired.html" title="NMSettingWired">NMSettingWired</a>
@@ -129,8 +134,24 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
</pre>
<pre class="synopsis">
GEnum
+ +----NMSettingCompareFlags
+</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSettingDiffResult
+</pre>
+<pre class="synopsis">
+ GEnum
+----NMSettingError
</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSettingHashFlags
+</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSettingSecretFlags
+</pre>
</div>
<div class="refsect1">
<a name="NMSetting.properties"></a><h2>Properties</h2>
@@ -200,9 +221,10 @@ It should only be accessed through the functions described below.
NMSettingClearSecretsWithFlagsFn func,
gpointer user_data);
+ const char *(*get_virtual_iface_name) (NMSetting *setting);
+
/* Padding for future expansion */
void (*_reserved1) (void);
- void (*_reserved2) (void);
} NMSettingClass;
</pre>
<p>
@@ -213,7 +235,7 @@ It should only be accessed through the functions described below.
<a name="NMSettingClearSecretsWithFlagsFn"></a><h3>NMSettingClearSecretsWithFlagsFn ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*NMSettingClearSecretsWithFlagsFn) (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *secret</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -246,7 +268,7 @@ It should only be accessed through the functions described below.
</div>
<hr>
<div class="refsect2">
-<a name="NMSettingCompareFlags"></a><h3>enum NMSettingCompareFlags</h3>
+<a name="NMSettingCompareFlags-enum"></a><h3>enum NMSettingCompareFlags</h3>
<pre class="programlisting">typedef enum {
NM_SETTING_COMPARE_FLAG_EXACT = 0x00000000,
NM_SETTING_COMPARE_FLAG_FUZZY = 0x00000001,
@@ -304,7 +326,7 @@ storage (ie, the secret's flag includes <em class="parameter"><code>NM_SETTING_S
</div>
<hr>
<div class="refsect2">
-<a name="NMSettingDiffResult"></a><h3>enum NMSettingDiffResult</h3>
+<a name="NMSettingDiffResult-enum"></a><h3>enum NMSettingDiffResult</h3>
<pre class="programlisting">typedef enum {
NM_SETTING_DIFF_RESULT_UNKNOWN = 0x00000000,
NM_SETTING_DIFF_RESULT_IN_A = 0x00000001,
@@ -339,10 +361,10 @@ These values indicate the result of a setting difference operation.
<div class="refsect2">
<a name="NMSettingError-enum"></a><h3>enum NMSettingError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_ERROR_UNKNOWN = 0,
- NM_SETTING_ERROR_PROPERTY_NOT_FOUND,
- NM_SETTING_ERROR_PROPERTY_NOT_SECRET,
- NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH
+ NM_SETTING_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_ERROR_PROPERTY_NOT_FOUND, /*&lt; nick=PropertyNotFound &gt;*/
+ NM_SETTING_ERROR_PROPERTY_NOT_SECRET, /*&lt; nick=PropertyNotSecret &gt;*/
+ NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH /*&lt; nick=PropertyTypeMismatch &gt;*/
} NMSettingError;
</pre>
<p>
@@ -380,7 +402,7 @@ Describes errors that may result from operations involving a <a class="link" hre
</div>
<hr>
<div class="refsect2">
-<a name="NMSettingHashFlags"></a><h3>enum NMSettingHashFlags</h3>
+<a name="NMSettingHashFlags-enum"></a><h3>enum NMSettingHashFlags</h3>
<pre class="programlisting">typedef enum {
NM_SETTING_HASH_FLAG_ALL = 0x00000000,
NM_SETTING_HASH_FLAG_NO_SECRETS = 0x00000001,
@@ -414,7 +436,7 @@ when calling <a class="link" href="NMSetting.html#nm-setting-to-hash" title="nm_
</div>
<hr>
<div class="refsect2">
-<a name="NMSettingSecretFlags"></a><h3>enum NMSettingSecretFlags</h3>
+<a name="NMSettingSecretFlags-enum"></a><h3>enum NMSettingSecretFlags</h3>
<pre class="programlisting">typedef enum {
NM_SETTING_SECRET_FLAG_NONE = 0x00000000,
NM_SETTING_SECRET_FLAG_AGENT_OWNED = 0x00000001,
@@ -502,6 +524,14 @@ secret is not required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-ERROR:CAPS"></a><h3>NM_SETTING_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_ERROR nm_setting_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-NAME:CAPS"></a><h3>NM_SETTING_NAME</h3>
<pre class="programlisting">#define NM_SETTING_NAME "name"
</pre>
@@ -594,10 +624,10 @@ specific secret should be cleared or not. <span class="annotation">[<acronym tit
<a name="nm-setting-compare"></a><h3>nm_setting_compare ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_compare (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);</pre>
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>);</pre>
<p>
Compares two <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> objects for similarity, with comparison behavior
-modified by a set of flags. See the documentation for <a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a>
+modified by a set of flags. See the documentation for <a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a>
for a description of each flag's behavior.
</p>
<div class="variablelist"><table border="0">
@@ -630,15 +660,15 @@ for a description of each flag's behavior.
<a name="nm-setting-diff"></a><h3>nm_setting_diff ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_diff (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *a</code></em>,
<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *b</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> invert_results</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **results</code></em>);</pre>
<p>
Compares two <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> objects for similarity, with comparison behavior
-modified by a set of flags. See the documentation for <a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a>
+modified by a set of flags. See the documentation for <a class="link" href="NMSetting.html#NMSettingCompareFlags"><span class="type">NMSettingCompareFlags</span></a>
for a description of each flag's behavior. If the settings differ, the keys
of each setting that differ from the other are added to <em class="parameter"><code>results</code></em>, mapped to
-one or more <a class="link" href="NMSetting.html#NMSettingDiffResult" title="enum NMSettingDiffResult"><span class="type">NMSettingDiffResult</span></a> values.
+one or more <a class="link" href="NMSetting.html#NMSettingDiffResult"><span class="type">NMSettingDiffResult</span></a> values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -660,13 +690,13 @@ one or more <a class="link" href="NMSetting.html#NMSettingDiffResult" title="enu
<tr>
<td><p><span class="term"><em class="parameter"><code>invert_results</code></em> :</span></p></td>
<td>this parameter is used internally by libnm-util and should
-be set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> inverts the meaning of the <a class="link" href="NMSetting.html#NMSettingDiffResult" title="enum NMSettingDiffResult"><span class="type">NMSettingDiffResult</span></a>.</td>
+be set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> inverts the meaning of the <a class="link" href="NMSetting.html#NMSettingDiffResult"><span class="type">NMSettingDiffResult</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>results</code></em> :</span></p></td>
<td>if the
settings differ, on return a hash table mapping the differing keys to one or
-more <a class="link" href="NMSetting.html#NMSettingDiffResult" title="enum NMSettingDiffResult"><code class="literal">NMSettingDiffResult</code></a> values OR-ed together. If the settings do not
+more <a class="link" href="NMSetting.html#NMSettingDiffResult"><code class="literal">NMSettingDiffResult</code></a> values OR-ed together. If the settings do not
differ, any hash table passed in is unmodified. If no hash table is passed
in and the settings differ, a new one is created and returned. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 guint32]</span>
</td>
@@ -775,10 +805,10 @@ like 'ppp' or 'wireless' or 'wired'.</td>
<a name="nm-setting-get-secret-flags"></a><h3>nm_setting_get_secret_flags ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_get_secret_flags (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *secret_name</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> *out_flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> *out_flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
-For a given secret, retrieves the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> describing how to
+For a given secret, retrieves the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> describing how to
handle that secret.
</p>
<div class="variablelist"><table border="0">
@@ -795,7 +825,7 @@ handle that secret.
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_flags</code></em> :</span></p></td>
-<td>on success, the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> for the secret</td>
+<td>on success, the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> for the secret</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
@@ -812,6 +842,30 @@ this setting, and if that property is secret), FALSE if not</td>
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-get-virtual-iface-name"></a><h3>nm_setting_get_virtual_iface_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_get_virtual_iface_name (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);</pre>
+<p>
+Returns the name of the virtual kernel interface which the connection
+needs to use if specified in the settings.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>Name of the virtual interface or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the setting does not
+support this feature</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-need-secrets"></a><h3>nm_setting_need_secrets ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_setting_need_secrets (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>);</pre>
<p>
@@ -878,10 +932,10 @@ hash table, or NULL on failure</td>
<a name="nm-setting-set-secret-flags"></a><h3>nm_setting_set_secret_flags ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_set_secret_flags (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *secret_name</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
-For a given secret, retrieves the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> describing how to
+For a given secret, retrieves the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> describing how to
handle that secret.
</p>
<div class="variablelist"><table border="0">
@@ -898,7 +952,7 @@ handle that secret.
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> for the secret</td>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> for the secret</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
@@ -917,7 +971,7 @@ this setting, and if that property is secret), FALSE if not</td>
<div class="refsect2">
<a name="nm-setting-to-hash"></a><h3>nm_setting_to_hash ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * nm_setting_to_hash (<em class="parameter"><code><a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> *setting</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags" title="enum NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);</pre>
+ <em class="parameter"><code><a class="link" href="NMSetting.html#NMSettingHashFlags"><span class="type">NMSettingHashFlags</span></a> flags</code></em>);</pre>
<p>
Converts the <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> mapping each setting property
name to a GValue describing that property, suitable for marshalling over
diff --git a/docs/libnm-util/html/NMSetting8021x.html b/docs/libnm-util/html/NMSetting8021x.html
index 1318a65cf..ba179c4ab 100644
--- a/docs/libnm-util/html/NMSetting8021x.html
+++ b/docs/libnm-util/html/NMSetting8021x.html
@@ -41,12 +41,12 @@
</tr></table></div>
<div class="refsynopsisdiv">
<a name="NMSetting8021x.synopsis"></a><h2>Synopsis</h2>
-<a name="NMSetting8021xError"></a><pre class="synopsis">
+<a name="NMSetting8021xCKFormat"></a><a name="NMSetting8021xCKScheme"></a><a name="NMSetting8021xError"></a><pre class="synopsis">
#include &lt;nm-setting-8021x.h&gt;
<a class="link" href="NMSetting8021x.html#NMSetting8021x-struct" title="NMSetting8021x">NMSetting8021x</a>;
-enum <a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat">NMSetting8021xCKFormat</a>;
-enum <a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme">NMSetting8021xCKScheme</a>;
+enum <a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat-enum" title="enum NMSetting8021xCKFormat">NMSetting8021xCKFormat</a>;
+enum <a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme-enum" title="enum NMSetting8021xCKScheme">NMSetting8021xCKScheme</a>;
<a class="link" href="NMSetting8021x.html#NMSetting8021xClass" title="NMSetting8021xClass">NMSetting8021xClass</a>;
enum <a class="link" href="NMSetting8021x.html#NMSetting8021xError-enum" title="enum NMSetting8021xError">NMSetting8021xError</a>;
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-ALTSUBJECT-MATCHES:CAPS" title="NM_SETTING_802_1X_ALTSUBJECT_MATCHES">NM_SETTING_802_1X_ALTSUBJECT_MATCHES</a>
@@ -55,9 +55,13 @@ enum <a class="link" href="NMSetting8021x.html#NMSetting8021xErro
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-CA-PATH:CAPS" title="NM_SETTING_802_1X_CA_PATH">NM_SETTING_802_1X_CA_PATH</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-CLIENT-CERT:CAPS" title="NM_SETTING_802_1X_CLIENT_CERT">NM_SETTING_802_1X_CLIENT_CERT</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-EAP:CAPS" title="NM_SETTING_802_1X_EAP">NM_SETTING_802_1X_EAP</a>
+#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-ERROR:CAPS" title="NM_SETTING_802_1X_ERROR">NM_SETTING_802_1X_ERROR</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-IDENTITY:CAPS" title="NM_SETTING_802_1X_IDENTITY">NM_SETTING_802_1X_IDENTITY</a>
+#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PAC-FILE:CAPS" title="NM_SETTING_802_1X_PAC_FILE">NM_SETTING_802_1X_PAC_FILE</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD:CAPS" title="NM_SETTING_802_1X_PASSWORD">NM_SETTING_802_1X_PASSWORD</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-FLAGS:CAPS" title="NM_SETTING_802_1X_PASSWORD_FLAGS">NM_SETTING_802_1X_PASSWORD_FLAGS</a>
+#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW:CAPS" title="NM_SETTING_802_1X_PASSWORD_RAW">NM_SETTING_802_1X_PASSWORD_RAW</a>
+#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW-FLAGS:CAPS" title="NM_SETTING_802_1X_PASSWORD_RAW_FLAGS">NM_SETTING_802_1X_PASSWORD_RAW_FLAGS</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-FAST-PROVISIONING:CAPS" title="NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING">NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-PEAPLABEL:CAPS" title="NM_SETTING_802_1X_PHASE1_PEAPLABEL">NM_SETTING_802_1X_PHASE1_PEAPLABEL</a>
#define <a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-PEAPVER:CAPS" title="NM_SETTING_802_1X_PHASE1_PEAPVER">NM_SETTING_802_1X_PHASE1_PEAPVER</a>
@@ -100,14 +104,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-ca-cert-blob" title="nm_setting_802_1x_get_ca_cert_blob ()">nm_setting_802_1x_get_ca_cert_blob</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-ca-cert-path" title="nm_setting_802_1x_get_ca_cert_path ()">nm_setting_802_1x_get_ca_cert_path</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-ca-cert-scheme" title="nm_setting_802_1x_get_ca_cert_scheme ()">nm_setting_802_1x_get_ca_cert_scheme</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-ca-cert-scheme" title="nm_setting_802_1x_get_ca_cert_scheme ()">nm_setting_802_1x_get_ca_cert_scheme</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-ca-path" title="nm_setting_802_1x_get_ca_path ()">nm_setting_802_1x_get_ca_path</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-client-cert-blob" title="nm_setting_802_1x_get_client_cert_blob ()">nm_setting_802_1x_get_client_cert_blob</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-client-cert-path" title="nm_setting_802_1x_get_client_cert_path ()">nm_setting_802_1x_get_client_cert_path</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-client-cert-scheme" title="nm_setting_802_1x_get_client_cert_scheme ()">nm_setting_802_1x_get_client_cert_scheme</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-client-cert-scheme" title="nm_setting_802_1x_get_client_cert_scheme ()">nm_setting_802_1x_get_client_cert_scheme</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-eap-method" title="nm_setting_802_1x_get_eap_method ()">nm_setting_802_1x_get_eap_method</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> i</code></em>);
@@ -118,8 +122,12 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-num-phase2-altsubject-matches" title="nm_setting_802_1x_get_num_phase2_altsubject_matches ()">nm_setting_802_1x_get_num_phase2_altsubject_matches</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-pac-file" title="nm_setting_802_1x_get_pac_file ()">nm_setting_802_1x_get_pac_file</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password" title="nm_setting_802_1x_get_password ()">nm_setting_802_1x_get_password</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password-flags" title="nm_setting_802_1x_get_password_flags ()">nm_setting_802_1x_get_password_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password-flags" title="nm_setting_802_1x_get_password_flags ()">nm_setting_802_1x_get_password_flags</a>
+ (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
+const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password-raw" title="nm_setting_802_1x_get_password_raw ()">nm_setting_802_1x_get_password_raw</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password-raw-flags" title="nm_setting_802_1x_get_password_raw_flags ()">nm_setting_802_1x_get_password_raw_flags</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase1-fast-provisioning" title="nm_setting_802_1x_get_phase1_fast_provisioning ()">nm_setting_802_1x_get_phase1_fast_provisioning</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
@@ -137,7 +145,7 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.htm
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-ca-cert-path" title="nm_setting_802_1x_get_phase2_ca_cert_path ()">nm_setting_802_1x_get_phase2_ca_cert_path</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-ca-cert-scheme" title="nm_setting_802_1x_get_phase2_ca_cert_scheme ()">nm_setting_802_1x_get_phase2_ca_cert_scheme</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-ca-cert-scheme" title="nm_setting_802_1x_get_phase2_ca_cert_scheme ()">nm_setting_802_1x_get_phase2_ca_cert_scheme</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-ca-path" title="nm_setting_802_1x_get_phase2_ca_path ()">nm_setting_802_1x_get_phase2_ca_path</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
@@ -145,35 +153,35 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.htm
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-client-cert-path" title="nm_setting_802_1x_get_phase2_client_cert_path ()">nm_setting_802_1x_get_phase2_client_cert_path</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-client-cert-scheme" title="nm_setting_802_1x_get_phase2_client_cert_scheme ()">nm_setting_802_1x_get_phase2_client_cert_scheme</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-client-cert-scheme" title="nm_setting_802_1x_get_phase2_client_cert_scheme ()">nm_setting_802_1x_get_phase2_client_cert_scheme</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-blob" title="nm_setting_802_1x_get_phase2_private_key_blob ()">nm_setting_802_1x_get_phase2_private_key_blob</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-format" title="nm_setting_802_1x_get_phase2_private_key_format ()">nm_setting_802_1x_get_phase2_private_key_format</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-format" title="nm_setting_802_1x_get_phase2_private_key_format ()">nm_setting_802_1x_get_phase2_private_key_format</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-password" title="nm_setting_802_1x_get_phase2_private_key_password ()">nm_setting_802_1x_get_phase2_private_key_password</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-password-flags" title="nm_setting_802_1x_get_phase2_private_key_password_flags ()">nm_setting_802_1x_get_phase2_private_key_password_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-password-flags" title="nm_setting_802_1x_get_phase2_private_key_password_flags ()">nm_setting_802_1x_get_phase2_private_key_password_flags</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-path" title="nm_setting_802_1x_get_phase2_private_key_path ()">nm_setting_802_1x_get_phase2_private_key_path</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-scheme" title="nm_setting_802_1x_get_phase2_private_key_scheme ()">nm_setting_802_1x_get_phase2_private_key_scheme</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-private-key-scheme" title="nm_setting_802_1x_get_phase2_private_key_scheme ()">nm_setting_802_1x_get_phase2_private_key_scheme</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase2-subject-match" title="nm_setting_802_1x_get_phase2_subject_match ()">nm_setting_802_1x_get_phase2_subject_match</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-pin" title="nm_setting_802_1x_get_pin ()">nm_setting_802_1x_get_pin</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-pin-flags" title="nm_setting_802_1x_get_pin_flags ()">nm_setting_802_1x_get_pin_flags</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-pin-flags" title="nm_setting_802_1x_get_pin_flags ()">nm_setting_802_1x_get_pin_flags</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-blob" title="nm_setting_802_1x_get_private_key_blob ()">nm_setting_802_1x_get_private_key_blob</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-format" title="nm_setting_802_1x_get_private_key_format ()">nm_setting_802_1x_get_private_key_format</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-format" title="nm_setting_802_1x_get_private_key_format ()">nm_setting_802_1x_get_private_key_format</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-password" title="nm_setting_802_1x_get_private_key_password ()">nm_setting_802_1x_get_private_key_password</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-password-flags" title="nm_setting_802_1x_get_private_key_password_flags ()">nm_setting_802_1x_get_private_key_password_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-password-flags" title="nm_setting_802_1x_get_private_key_password_flags ()">nm_setting_802_1x_get_private_key_password_flags</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-path" title="nm_setting_802_1x_get_private_key_path ()">nm_setting_802_1x_get_private_key_path</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-scheme" title="nm_setting_802_1x_get_private_key_scheme ()">nm_setting_802_1x_get_private_key_scheme</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-private-key-scheme" title="nm_setting_802_1x_get_private_key_scheme ()">nm_setting_802_1x_get_private_key_scheme</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-subject-match" title="nm_setting_802_1x_get_subject_match ()">nm_setting_802_1x_get_subject_match</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-system-ca-certs" title="nm_setting_802_1x_get_system_ca_certs ()">nm_setting_802_1x_get_system_ca_certs</a>
@@ -189,38 +197,38 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> i</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-set-ca-cert" title="nm_setting_802_1x_set_ca_cert ()">nm_setting_802_1x_set_ca_cert</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-set-client-cert" title="nm_setting_802_1x_set_client_cert ()">nm_setting_802_1x_set_client_cert</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-set-phase2-ca-cert" title="nm_setting_802_1x_set_phase2_ca_cert ()">nm_setting_802_1x_set_phase2_ca_cert</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-set-phase2-client-cert" title="nm_setting_802_1x_set_phase2_client_cert ()">nm_setting_802_1x_set_phase2_client_cert</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-set-phase2-private-key" title="nm_setting_802_1x_set_phase2_private_key ()">nm_setting_802_1x_set_phase2_private_key</a>
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key_path</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-set-private-key" title="nm_setting_802_1x_set_private_key ()">nm_setting_802_1x_set_private_key</a> (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key_path</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
</pre>
</div>
@@ -233,6 +241,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
</pre>
<pre class="synopsis">
GEnum
+ +----NMSetting8021xCKFormat
+</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSetting8021xCKScheme
+</pre>
+<pre class="synopsis">
+ GEnum
+----NMSetting8021xError
</pre>
</div>
@@ -246,8 +262,11 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--client-cert" title='The "client-cert" property'>client-cert</a>" <span class="type">GArray_guchar_</span>* : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--eap" title='The "eap" property'>eap</a>" <span class="type">GSList_gchararray_</span>* : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--identity" title='The "identity" property'>identity</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
+ "<a class="link" href="NMSetting8021x.html#NMSetting8021x--pac-file" title='The "pac-file" property'>pac-file</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'>password</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-flags" title='The "password-flags" property'>password-flags</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
+ "<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'>password-raw</a>" <span class="type">GArray_guchar_</span>* : Read / Write
+ "<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw-flags" title='The "password-raw-flags" property'>password-raw-flags</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--phase1-fast-provisioning" title='The "phase1-fast-provisioning" property'>phase1-fast-provisioning</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--phase1-peaplabel" title='The "phase1-peaplabel" property'>phase1-peaplabel</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSetting8021x.html#NMSetting8021x--phase1-peapver" title='The "phase1-peapver" property'>phase1-peapver</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
@@ -309,8 +328,9 @@ following books.
</div>
<hr>
<div class="refsect2">
-<a name="NMSetting8021xCKFormat"></a><h3>enum NMSetting8021xCKFormat</h3>
+<a name="NMSetting8021xCKFormat-enum"></a><h3>enum NMSetting8021xCKFormat</h3>
<pre class="programlisting">typedef enum {
+ /*&lt; underscore_name=nm_setting_802_1x_ck_format &gt;*/
NM_SETTING_802_1X_CK_FORMAT_UNKNOWN = 0,
NM_SETTING_802_1X_CK_FORMAT_X509,
NM_SETTING_802_1X_CK_FORMAT_RAW_KEY,
@@ -318,7 +338,7 @@ following books.
} NMSetting8021xCKFormat;
</pre>
<p>
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> values indicate the general type of a certificate
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> values indicate the general type of a certificate
or private key
</p>
<div class="variablelist"><table border="0">
@@ -351,15 +371,16 @@ and private key
</div>
<hr>
<div class="refsect2">
-<a name="NMSetting8021xCKScheme"></a><h3>enum NMSetting8021xCKScheme</h3>
+<a name="NMSetting8021xCKScheme-enum"></a><h3>enum NMSetting8021xCKScheme</h3>
<pre class="programlisting">typedef enum {
+ /*&lt; underscore_name=nm_setting_802_1x_ck_scheme &gt;*/
NM_SETTING_802_1X_CK_SCHEME_UNKNOWN = 0,
NM_SETTING_802_1X_CK_SCHEME_BLOB,
NM_SETTING_802_1X_CK_SCHEME_PATH
} NMSetting8021xCKScheme;
</pre>
<p>
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> values indicate how a certificate or private key is
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> values indicate how a certificate or private key is
stored in the setting properties, either as a blob of the item's data, or as
a path to a certificate or private key file on the filesystem
</p>
@@ -407,9 +428,10 @@ to a file containing the certificate or key data
<div class="refsect2">
<a name="NMSetting8021xError-enum"></a><h3>enum NMSetting8021xError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_802_1X_ERROR_UNKNOWN = 0,
- NM_SETTING_802_1X_ERROR_INVALID_PROPERTY,
- NM_SETTING_802_1X_ERROR_MISSING_PROPERTY
+ /*&lt; underscore_name=nm_setting_802_1x_error &gt;*/
+ NM_SETTING_802_1X_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_802_1X_ERROR_MISSING_PROPERTY /*&lt; nick=MissingProperty &gt;*/
} NMSetting8021xError;
</pre>
<div class="variablelist"><table border="0">
@@ -484,6 +506,14 @@ required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-802-1X-ERROR:CAPS"></a><h3>NM_SETTING_802_1X_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_802_1X_ERROR nm_setting_802_1x_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-802-1X-IDENTITY:CAPS"></a><h3>NM_SETTING_802_1X_IDENTITY</h3>
<pre class="programlisting">#define NM_SETTING_802_1X_IDENTITY "identity"
</pre>
@@ -492,6 +522,14 @@ required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-802-1X-PAC-FILE:CAPS"></a><h3>NM_SETTING_802_1X_PAC_FILE</h3>
+<pre class="programlisting">#define NM_SETTING_802_1X_PAC_FILE "pac-file"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-802-1X-PASSWORD:CAPS"></a><h3>NM_SETTING_802_1X_PASSWORD</h3>
<pre class="programlisting">#define NM_SETTING_802_1X_PASSWORD "password"
</pre>
@@ -508,6 +546,22 @@ required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-802-1X-PASSWORD-RAW:CAPS"></a><h3>NM_SETTING_802_1X_PASSWORD_RAW</h3>
+<pre class="programlisting">#define NM_SETTING_802_1X_PASSWORD_RAW "password-raw"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NM-SETTING-802-1X-PASSWORD-RAW-FLAGS:CAPS"></a><h3>NM_SETTING_802_1X_PASSWORD_RAW_FLAGS</h3>
+<pre class="programlisting">#define NM_SETTING_802_1X_PASSWORD_RAW_FLAGS "password-raw-flags"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-802-1X-PHASE1-FAST-PROVISIONING:CAPS"></a><h3>NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING</h3>
<pre class="programlisting">#define NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING "phase1-fast-provisioning"
</pre>
@@ -944,7 +998,7 @@ of the network cannot be confirmed by the client.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-ca-cert-scheme"></a><h3>nm_setting_802_1x_get_ca_cert_scheme ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_ca_cert_scheme
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_ca_cert_scheme
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<p>
Returns the scheme used to store the CA certificate. If the returned scheme
@@ -1045,7 +1099,7 @@ authentication method.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-client-cert-scheme"></a><h3>nm_setting_802_1x_get_client_cert_scheme ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_client_cert_scheme
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_client_cert_scheme
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<p>
Returns the scheme used to store the client certificate. If the returned scheme
@@ -1195,6 +1249,28 @@ Returns the number of entries in the
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-802-1x-get-pac-file"></a><h3>nm_setting_802_1x_get_pac_file ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_802_1x_get_pac_file (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
+<p>
+Returns the file containing PAC credentials used by EAP-FAST method.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the PAC file</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-802-1x-get-password"></a><h3>nm_setting_802_1x_get_password ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_802_1x_get_password (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
@@ -1216,7 +1292,7 @@ by the <a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-password-flags"></a><h3>nm_setting_802_1x_get_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_password_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_password_flags
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -1228,7 +1304,50 @@ by the <a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'><span class="type">"password"</span></a>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'><span class="type">"password"</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-setting-802-1x-get-password-raw"></a><h3>nm_setting_802_1x_get_password_raw ()</h3>
+<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * nm_setting_802_1x_get_password_raw (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the password used by the authentication method as a
+UTF-8-encoded array of bytes, as specified by the
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'><span class="type">"password-raw"</span></a> property</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-setting-802-1x-get-password-raw-flags"></a><h3>nm_setting_802_1x_get_password_raw_flags ()</h3>
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_password_raw_flags
+ (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'><span class="type">"password-raw"</span></a>
</td>
</tr>
</tbody>
@@ -1431,7 +1550,7 @@ of the network cannot be confirmed by the client.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-phase2-ca-cert-scheme"></a><h3>nm_setting_802_1x_get_phase2_ca_cert_scheme ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_phase2_ca_cert_scheme
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_phase2_ca_cert_scheme
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<p>
Returns the scheme used to store the "phase 2" CA certificate. If the
@@ -1534,7 +1653,7 @@ authentication method.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-phase2-client-cert-scheme"></a><h3>nm_setting_802_1x_get_phase2_client_cert_scheme ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_phase2_client_cert_scheme
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_phase2_client_cert_scheme
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<p>
Returns the scheme used to store the "phase 2" client certificate. If the
@@ -1591,7 +1710,7 @@ keys should always be encrypted with a private key password.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-phase2-private-key-format"></a><h3>nm_setting_802_1x_get_phase2_private_key_format ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> nm_setting_802_1x_get_phase2_private_key_format
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> nm_setting_802_1x_get_phase2_private_key_format
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -1634,7 +1753,7 @@ previously set with <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-phase2-private-key-password-flags"></a><h3>nm_setting_802_1x_get_phase2_private_key_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_phase2_private_key_password_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_phase2_private_key_password_flags
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -1646,7 +1765,7 @@ previously set with <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
<a class="link" href="NMSetting8021x.html#NMSetting8021x--phase2-private-key-password" title='The "phase2-private-key-password" property'><span class="type">"phase2-private-key-password"</span></a>
</td>
</tr>
@@ -1681,7 +1800,7 @@ authentication method.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-phase2-private-key-scheme"></a><h3>nm_setting_802_1x_get_phase2_private_key_scheme ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_phase2_private_key_scheme
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_phase2_private_key_scheme
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<p>
Returns the scheme used to store the "phase 2" private key. If the returned
@@ -1751,7 +1870,7 @@ by the <span class="type">"pin"</span> property</td>
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-pin-flags"></a><h3>nm_setting_802_1x_get_pin_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_pin_flags (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_pin_flags (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
@@ -1762,7 +1881,7 @@ by the <span class="type">"pin"</span> property</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
<span class="type">"pin"</span>
</td>
</tr>
@@ -1802,7 +1921,7 @@ keys should always be encrypted with a private key password.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-private-key-format"></a><h3>nm_setting_802_1x_get_private_key_format ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> nm_setting_802_1x_get_private_key_format
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="returnvalue">NMSetting8021xCKFormat</span></a> nm_setting_802_1x_get_private_key_format
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -1845,7 +1964,7 @@ previously set with <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-private-key-password-flags"></a><h3>nm_setting_802_1x_get_private_key_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_private_key_password_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_802_1x_get_private_key_password_flags
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -1857,7 +1976,7 @@ previously set with <a class="link" href="NMSetting8021x.html#nm-setting-802-1x-
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
<a class="link" href="NMSetting8021x.html#NMSetting8021x--private-key-password" title='The "private-key-password" property'><span class="type">"private-key-password"</span></a>
</td>
</tr>
@@ -1892,7 +2011,7 @@ authentication method.
<hr>
<div class="refsect2">
<a name="nm-setting-802-1x-get-private-key-scheme"></a><h3>nm_setting_802_1x_get_private_key_scheme ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_private_key_scheme
+<pre class="programlisting"><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="returnvalue">NMSetting8021xCKScheme</span></a> nm_setting_802_1x_get_private_key_scheme
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>);</pre>
<p>
Returns the scheme used to store the private key. If the returned scheme is
@@ -2057,8 +2176,8 @@ Removes the allowed "phase 2" altSubjectName at the specified index.
<a name="nm-setting-802-1x-set-ca-cert"></a><h3>nm_setting_802_1x_set_ca_cert ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_802_1x_set_ca_cert (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Reads a certificate from disk and sets the <a class="link" href="NMSetting8021x.html#NMSetting8021x--ca-cert" title='The "ca-cert" property'><span class="type">"ca-cert"</span></a> property
@@ -2106,8 +2225,8 @@ clears the CA certificate.</td>
<a name="nm-setting-802-1x-set-client-cert"></a><h3>nm_setting_802_1x_set_client_cert ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_802_1x_set_client_cert (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Reads a certificate from disk and sets the <a class="link" href="NMSetting8021x.html#NMSetting8021x--client-cert" title='The "client-cert" property'><span class="type">"client-cert"</span></a>
@@ -2161,8 +2280,8 @@ any <em class="parameter"><code>scheme</code></em> clears the client certificate
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_802_1x_set_phase2_ca_cert
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Reads a certificate from disk and sets the <a class="link" href="NMSetting8021x.html#NMSetting8021x--phase2-ca-cert" title='The "phase2-ca-cert" property'><span class="type">"phase2-ca-cert"</span></a>
@@ -2211,8 +2330,8 @@ clears the "phase2" CA certificate.</td>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_802_1x_set_phase2_client_cert
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cert_path</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Reads a certificate from disk and sets the <a class="link" href="NMSetting8021x.html#NMSetting8021x--phase2-client-cert" title='The "phase2-client-cert" property'><span class="type">"phase2-client-cert"</span></a>
@@ -2267,8 +2386,8 @@ any <em class="parameter"><code>scheme</code></em> clears the "phase2" client ce
(<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key_path</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Private keys are used to authenticate the connecting client to the network
@@ -2343,8 +2462,8 @@ an error is returned.</td>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_802_1x_set_private_key (<em class="parameter"><code><a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key_path</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *password</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
- <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme"><span class="type">NMSetting8021xCKScheme</span></a> scheme</code></em>,
+ <em class="parameter"><code><a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat"><span class="type">NMSetting8021xCKFormat</span></a> *out_format</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Private keys are used to authenticate the connecting client to the network
@@ -2492,10 +2611,21 @@ user or login name.
</div>
<hr>
<div class="refsect2">
+<a name="NMSetting8021x--pac-file"></a><h3>The <code class="literal">"pac-file"</code> property</h3>
+<pre class="programlisting"> "pac-file" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
+<p>
+UTF-8 encoded file path containing PAC for EAP-FAST.
+</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMSetting8021x--password"></a><h3>The <code class="literal">"password"</code> property</h3>
<pre class="programlisting"> "password" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
<p>
-Password used for EAP authentication methods.
+Password used for EAP authentication methods. If both
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'><span class="type">"password"</span></a> and <a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'><span class="type">"password-raw"</span></a> are
+specified, <a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'><span class="type">"password"</span></a> is preferred.
</p>
<p>Default value: NULL</p>
</div>
@@ -2511,6 +2641,27 @@ Flags indicating how to handle <a class="link" href="NMSetting8021x.html#NMSetti
</div>
<hr>
<div class="refsect2">
+<a name="NMSetting8021x--password-raw"></a><h3>The <code class="literal">"password-raw"</code> property</h3>
+<pre class="programlisting"> "password-raw" <span class="type">GArray_guchar_</span>* : Read / Write</pre>
+<p>
+Password used for EAP authentication methods delivered as a
+UTF-8-encoded array of bytes. If both <a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'><span class="type">"password"</span></a>
+and <a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'><span class="type">"password-raw"</span></a> are specified,
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'><span class="type">"password"</span></a> is preferred.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NMSetting8021x--password-raw-flags"></a><h3>The <code class="literal">"password-raw-flags"</code> property</h3>
+<pre class="programlisting"> "password-raw-flags" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
+<p>
+Flags indicating how to handle <a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'><span class="type">"password-raw"</span></a>:.
+</p>
+<p>Allowed values: &lt;= 7</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMSetting8021x--phase1-fast-provisioning"></a><h3>The <code class="literal">"phase1-fast-provisioning"</code> property</h3>
<pre class="programlisting"> "phase1-fast-provisioning" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
<p>
diff --git a/docs/libnm-util/html/NMSettingBluetooth.html b/docs/libnm-util/html/NMSettingBluetooth.html
index d6450cfc3..e2f390113 100644
--- a/docs/libnm-util/html/NMSettingBluetooth.html
+++ b/docs/libnm-util/html/NMSettingBluetooth.html
@@ -48,6 +48,7 @@
<a class="link" href="NMSettingBluetooth.html#NMSettingBluetoothClass" title="NMSettingBluetoothClass">NMSettingBluetoothClass</a>;
enum <a class="link" href="NMSettingBluetooth.html#NMSettingBluetoothError-enum" title="enum NMSettingBluetoothError">NMSettingBluetoothError</a>;
#define <a class="link" href="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-BDADDR:CAPS" title="NM_SETTING_BLUETOOTH_BDADDR">NM_SETTING_BLUETOOTH_BDADDR</a>
+#define <a class="link" href="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-ERROR:CAPS" title="NM_SETTING_BLUETOOTH_ERROR">NM_SETTING_BLUETOOTH_ERROR</a>
#define <a class="link" href="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-SETTING-NAME:CAPS" title="NM_SETTING_BLUETOOTH_SETTING_NAME">NM_SETTING_BLUETOOTH_SETTING_NAME</a>
#define <a class="link" href="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE:CAPS" title="NM_SETTING_BLUETOOTH_TYPE">NM_SETTING_BLUETOOTH_TYPE</a>
#define <a class="link" href="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE-DUN:CAPS" title="NM_SETTING_BLUETOOTH_TYPE_DUN">NM_SETTING_BLUETOOTH_TYPE_DUN</a>
@@ -115,10 +116,10 @@ Point (NAP) profiles.
<div class="refsect2">
<a name="NMSettingBluetoothError-enum"></a><h3>enum NMSettingBluetoothError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_BLUETOOTH_ERROR_UNKNOWN = 0,
- NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY,
- NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY,
- NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND,
+ NM_SETTING_BLUETOOTH_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND, /*&lt; nick=TypeSettingNotFound &gt;*/
} NMSettingBluetoothError;
</pre>
<div class="variablelist"><table border="0">
@@ -160,6 +161,14 @@ must also contain an <a class="link" href="NMSettingGsm.html" title="NMSettingGs
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-BLUETOOTH-ERROR:CAPS"></a><h3>NM_SETTING_BLUETOOTH_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_BLUETOOTH_ERROR nm_setting_bluetooth_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-BLUETOOTH-SETTING-NAME:CAPS"></a><h3>NM_SETTING_BLUETOOTH_SETTING_NAME</h3>
<pre class="programlisting">#define NM_SETTING_BLUETOOTH_SETTING_NAME "bluetooth"
</pre>
diff --git a/docs/libnm-util/html/NMSettingCdma.html b/docs/libnm-util/html/NMSettingCdma.html
index d0d5634de..ffb2f45b9 100644
--- a/docs/libnm-util/html/NMSettingCdma.html
+++ b/docs/libnm-util/html/NMSettingCdma.html
@@ -47,6 +47,7 @@
<a class="link" href="NMSettingCdma.html#NMSettingCdma-struct" title="NMSettingCdma">NMSettingCdma</a>;
<a class="link" href="NMSettingCdma.html#NMSettingCdmaClass" title="NMSettingCdmaClass">NMSettingCdmaClass</a>;
enum <a class="link" href="NMSettingCdma.html#NMSettingCdmaError-enum" title="enum NMSettingCdmaError">NMSettingCdmaError</a>;
+#define <a class="link" href="NMSettingCdma.html#NM-SETTING-CDMA-ERROR:CAPS" title="NM_SETTING_CDMA_ERROR">NM_SETTING_CDMA_ERROR</a>
#define <a class="link" href="NMSettingCdma.html#NM-SETTING-CDMA-NUMBER:CAPS" title="NM_SETTING_CDMA_NUMBER">NM_SETTING_CDMA_NUMBER</a>
#define <a class="link" href="NMSettingCdma.html#NM-SETTING-CDMA-PASSWORD:CAPS" title="NM_SETTING_CDMA_PASSWORD">NM_SETTING_CDMA_PASSWORD</a>
#define <a class="link" href="NMSettingCdma.html#NM-SETTING-CDMA-PASSWORD-FLAGS:CAPS" title="NM_SETTING_CDMA_PASSWORD_FLAGS">NM_SETTING_CDMA_PASSWORD_FLAGS</a>
@@ -55,7 +56,7 @@ enum <a class="link" href="NMSettingCdma.html#NMSettingCdmaError-
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a> <a class="link" href="NMSettingCdma.html#nm-setting-cdma-error-quark" title="nm_setting_cdma_error_quark ()">nm_setting_cdma_error_quark</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingCdma.html#nm-setting-cdma-get-number" title="nm_setting_cdma_get_number ()">nm_setting_cdma_get_number</a> (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingCdma.html#nm-setting-cdma-get-password" title="nm_setting_cdma_get_password ()">nm_setting_cdma_get_password</a> (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingCdma.html#nm-setting-cdma-get-password-flags" title="nm_setting_cdma_get_password_flags ()">nm_setting_cdma_get_password_flags</a> (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingCdma.html#nm-setting-cdma-get-password-flags" title="nm_setting_cdma_get_password_flags ()">nm_setting_cdma_get_password_flags</a> (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingCdma.html#nm-setting-cdma-get-username" title="nm_setting_cdma_get_username ()">nm_setting_cdma_get_username</a> (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMSettingCdma.html#nm-setting-cdma-new" title="nm_setting_cdma_new ()">nm_setting_cdma_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
@@ -117,10 +118,10 @@ networks, including those using CDMA2000/EVDO technology.
<div class="refsect2">
<a name="NMSettingCdmaError-enum"></a><h3>enum NMSettingCdmaError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_CDMA_ERROR_UNKNOWN = 0,
- NM_SETTING_CDMA_ERROR_INVALID_PROPERTY,
- NM_SETTING_CDMA_ERROR_MISSING_PROPERTY,
- NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING
+ NM_SETTING_CDMA_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_CDMA_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_CDMA_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING /*&lt; nick=MissingSerialSetting &gt;*/
} NMSettingCdmaError;
</pre>
<div class="variablelist"><table border="0">
@@ -153,6 +154,14 @@ is missing in the connection
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-CDMA-ERROR:CAPS"></a><h3>NM_SETTING_CDMA_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_CDMA_ERROR nm_setting_cdma_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-CDMA-NUMBER:CAPS"></a><h3>NM_SETTING_CDMA_NUMBER</h3>
<pre class="programlisting">#define NM_SETTING_CDMA_NUMBER "number"
</pre>
@@ -247,7 +256,7 @@ Registers an error quark for <a class="link" href="NMSettingCdma.html" title="NM
<hr>
<div class="refsect2">
<a name="nm-setting-cdma-get-password-flags"></a><h3>nm_setting_cdma_get_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_cdma_get_password_flags (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_cdma_get_password_flags (<em class="parameter"><code><a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
@@ -258,7 +267,7 @@ Registers an error quark for <a class="link" href="NMSettingCdma.html" title="NM
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingCdma.html#NMSettingCdma--password" title='The "password" property'><span class="type">"password"</span></a>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingCdma.html#NMSettingCdma--password" title='The "password" property'><span class="type">"password"</span></a>
</td>
</tr>
</tbody>
diff --git a/docs/libnm-util/html/NMSettingConnection.html b/docs/libnm-util/html/NMSettingConnection.html
index 0089fc413..360c97434 100644
--- a/docs/libnm-util/html/NMSettingConnection.html
+++ b/docs/libnm-util/html/NMSettingConnection.html
@@ -48,13 +48,22 @@
<a class="link" href="NMSettingConnection.html#NMSettingConnectionClass" title="NMSettingConnectionClass">NMSettingConnectionClass</a>;
enum <a class="link" href="NMSettingConnection.html#NMSettingConnectionError-enum" title="enum NMSettingConnectionError">NMSettingConnectionError</a>;
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-AUTOCONNECT:CAPS" title="NM_SETTING_CONNECTION_AUTOCONNECT">NM_SETTING_CONNECTION_AUTOCONNECT</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR:CAPS" title="NM_SETTING_CONNECTION_ERROR">NM_SETTING_CONNECTION_ERROR</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ID:CAPS" title="NM_SETTING_CONNECTION_ID">NM_SETTING_CONNECTION_ID</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-MASTER:CAPS" title="NM_SETTING_CONNECTION_MASTER">NM_SETTING_CONNECTION_MASTER</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-PERMISSIONS:CAPS" title="NM_SETTING_CONNECTION_PERMISSIONS">NM_SETTING_CONNECTION_PERMISSIONS</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-READ-ONLY:CAPS" title="NM_SETTING_CONNECTION_READ_ONLY">NM_SETTING_CONNECTION_READ_ONLY</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-SETTING-NAME:CAPS" title="NM_SETTING_CONNECTION_SETTING_NAME">NM_SETTING_CONNECTION_SETTING_NAME</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-SLAVE-TYPE:CAPS" title="NM_SETTING_CONNECTION_SLAVE_TYPE">NM_SETTING_CONNECTION_SLAVE_TYPE</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-TIMESTAMP:CAPS" title="NM_SETTING_CONNECTION_TIMESTAMP">NM_SETTING_CONNECTION_TIMESTAMP</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-TYPE:CAPS" title="NM_SETTING_CONNECTION_TYPE">NM_SETTING_CONNECTION_TYPE</a>
#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-UUID:CAPS" title="NM_SETTING_CONNECTION_UUID">NM_SETTING_CONNECTION_UUID</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE:CAPS" title="NM_SETTING_CONNECTION_ZONE">NM_SETTING_CONNECTION_ZONE</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-BLOCK:CAPS" title="NM_SETTING_CONNECTION_ZONE_BLOCK">NM_SETTING_CONNECTION_ZONE_BLOCK</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-HOME:CAPS" title="NM_SETTING_CONNECTION_ZONE_HOME">NM_SETTING_CONNECTION_ZONE_HOME</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-PUBLIC:CAPS" title="NM_SETTING_CONNECTION_ZONE_PUBLIC">NM_SETTING_CONNECTION_ZONE_PUBLIC</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-TRUSTED:CAPS" title="NM_SETTING_CONNECTION_ZONE_TRUSTED">NM_SETTING_CONNECTION_ZONE_TRUSTED</a>
+#define <a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-WORK:CAPS" title="NM_SETTING_CONNECTION_ZONE_WORK">NM_SETTING_CONNECTION_ZONE_WORK</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-add-permission" title="nm_setting_connection_add_permission ()">nm_setting_connection_add_permission</a>
(<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *ptype</code></em>,
@@ -66,6 +75,7 @@ enum <a class="link" href="NMSettingConnection.html#NMSettingConn
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-connection-type" title="nm_setting_connection_get_connection_type ()">nm_setting_connection_get_connection_type</a>
(<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-id" title="nm_setting_connection_get_id ()">nm_setting_connection_get_id</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-master" title="nm_setting_connection_get_master ()">nm_setting_connection_get_master</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-num-permissions" title="nm_setting_connection_get_num_permissions ()">nm_setting_connection_get_num_permissions</a>
(<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-permission" title="nm_setting_connection_get_permission ()">nm_setting_connection_get_permission</a>
@@ -75,8 +85,13 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
<em class="parameter"><code>const <span class="type">char</span> **out_pitem</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **out_detail</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-read-only" title="nm_setting_connection_get_read_only ()">nm_setting_connection_get_read_only</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-slave-type" title="nm_setting_connection_get_slave_type ()">nm_setting_connection_get_slave_type</a>
+ (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-timestamp" title="nm_setting_connection_get_timestamp ()">nm_setting_connection_get_timestamp</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-uuid" title="nm_setting_connection_get_uuid ()">nm_setting_connection_get_uuid</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-get-zone" title="nm_setting_connection_get_zone ()">nm_setting_connection_get_zone</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-is-slave-type" title="nm_setting_connection_is_slave_type ()">nm_setting_connection_is_slave_type</a> (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *type</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMSettingConnection.html#nm-setting-connection-new" title="nm_setting_connection_new ()">nm_setting_connection_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingConnection.html#nm-setting-connection-permissions-user-allowed" title="nm_setting_connection_permissions_user_allowed ()">nm_setting_connection_permissions_user_allowed</a>
(<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>,
@@ -103,11 +118,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
<pre class="synopsis">
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--autoconnect" title='The "autoconnect" property'>autoconnect</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--id" title='The "id" property'>id</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
+ "<a class="link" href="NMSettingConnection.html#NMSettingConnection--master" title='The "master" property'>master</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--permissions" title='The "permissions" property'>permissions</a>" <span class="type">GSList_gchararray_</span>* : Read / Write
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--read-only" title='The "read-only" property'>read-only</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
+ "<a class="link" href="NMSettingConnection.html#NMSettingConnection--slave-type" title='The "slave-type" property'>slave-type</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--timestamp" title='The "timestamp" property'>timestamp</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> : Read / Write / Construct
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--type" title='The "type" property'>type</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSettingConnection.html#NMSettingConnection--uuid" title='The "uuid" property'>uuid</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
+ "<a class="link" href="NMSettingConnection.html#NMSettingConnection--zone" title='The "zone" property'>zone</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct
</pre>
</div>
<div class="refsect1">
@@ -149,10 +167,11 @@ It should only be accessed through the functions described below.
<div class="refsect2">
<a name="NMSettingConnectionError-enum"></a><h3>enum NMSettingConnectionError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_CONNECTION_ERROR_UNKNOWN = 0,
- NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY,
- NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
- NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND
+ NM_SETTING_CONNECTION_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND, /*&lt; nick=TypeSettingNotFound &gt;*/
+ NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED, /*&lt; nick=IpConfigNotAllowed &gt;*/
} NMSettingConnectionError;
</pre>
<p>
@@ -186,6 +205,12 @@ Describes errors that may result from operations involving a
<a class="link" href="NMSettingConnection.html#NMSettingConnection--type" title='The "type" property'><span class="type">"type"</span></a> property was not present in the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>
</td>
</tr>
+<tr>
+<td><p><a name="NM-SETTING-CONNECTION-ERROR-IP-CONFIG-NOT-ALLOWED:CAPS"></a><span class="term"><code class="literal">NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED</code></span></p></td>
+<td>ip configuration is not
+ allowed to be present.
+</td>
+</tr>
</tbody>
</table></div>
</div>
@@ -199,6 +224,14 @@ Describes errors that may result from operations involving a
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ERROR:CAPS"></a><h3>NM_SETTING_CONNECTION_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ERROR nm_setting_connection_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-CONNECTION-ID:CAPS"></a><h3>NM_SETTING_CONNECTION_ID</h3>
<pre class="programlisting">#define NM_SETTING_CONNECTION_ID "id"
</pre>
@@ -207,6 +240,14 @@ Describes errors that may result from operations involving a
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-MASTER:CAPS"></a><h3>NM_SETTING_CONNECTION_MASTER</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_MASTER "master"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-CONNECTION-PERMISSIONS:CAPS"></a><h3>NM_SETTING_CONNECTION_PERMISSIONS</h3>
<pre class="programlisting">#define NM_SETTING_CONNECTION_PERMISSIONS "permissions"
</pre>
@@ -231,6 +272,14 @@ Describes errors that may result from operations involving a
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-SLAVE-TYPE:CAPS"></a><h3>NM_SETTING_CONNECTION_SLAVE_TYPE</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_SLAVE_TYPE "slave-type"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-CONNECTION-TIMESTAMP:CAPS"></a><h3>NM_SETTING_CONNECTION_TIMESTAMP</h3>
<pre class="programlisting">#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
</pre>
@@ -255,6 +304,54 @@ Describes errors that may result from operations involving a
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ZONE:CAPS"></a><h3>NM_SETTING_CONNECTION_ZONE</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ZONE "zone"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ZONE-BLOCK:CAPS"></a><h3>NM_SETTING_CONNECTION_ZONE_BLOCK</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ZONE_BLOCK "block"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ZONE-HOME:CAPS"></a><h3>NM_SETTING_CONNECTION_ZONE_HOME</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ZONE_HOME "home"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ZONE-PUBLIC:CAPS"></a><h3>NM_SETTING_CONNECTION_ZONE_PUBLIC</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ZONE_PUBLIC "public"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ZONE-TRUSTED:CAPS"></a><h3>NM_SETTING_CONNECTION_ZONE_TRUSTED</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ZONE_TRUSTED "trusted"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="NM-SETTING-CONNECTION-ZONE-WORK:CAPS"></a><h3>NM_SETTING_CONNECTION_ZONE_WORK</h3>
+<pre class="programlisting">#define NM_SETTING_CONNECTION_ZONE_WORK "work"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-connection-add-permission"></a><h3>nm_setting_connection_add_permission ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_connection_add_permission
(<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>,
@@ -382,6 +479,29 @@ Returns the <a class="link" href="NMSettingConnection.html#NMSettingConnection--
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-connection-get-master"></a><h3>nm_setting_connection_get_master ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_connection_get_master (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);</pre>
+<p>
+Returns the <a class="link" href="NMSettingConnection.html#NMSettingConnection--master" title='The "master" property'><span class="type">"master"</span></a> property of the connection.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>interface name of the master device or UUID of the master
+connection.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-connection-get-num-permissions"></a><h3>nm_setting_connection_get_num_permissions ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_setting_connection_get_num_permissions
(<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);</pre>
@@ -475,6 +595,29 @@ Returns the <a class="link" href="NMSettingConnection.html#NMSettingConnection--
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-connection-get-slave-type"></a><h3>nm_setting_connection_get_slave_type ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_connection_get_slave_type
+ (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);</pre>
+<p>
+Returns the <a class="link" href="NMSettingConnection.html#NMSettingConnection--slave-type" title='The "slave-type" property'><span class="type">"slave-type"</span></a> property of the connection.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the type of slave this connection is, if any</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-connection-get-timestamp"></a><h3>nm_setting_connection_get_timestamp ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a> nm_setting_connection_get_timestamp (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);</pre>
<p>
@@ -519,6 +662,54 @@ Returns the <a class="link" href="NMSettingConnection.html#NMSettingConnection--
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-connection-get-zone"></a><h3>nm_setting_connection_get_zone ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_connection_get_zone (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>);</pre>
+<p>
+Returns the <a class="link" href="NMSettingConnection.html#NMSettingConnection--zone" title='The "zone" property'><span class="type">"zone"</span></a> property of the connection.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the trust level of a connection</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-setting-connection-is-slave-type"></a><h3>nm_setting_connection_is_slave_type ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_connection_is_slave_type (<em class="parameter"><code><a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> *setting</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *type</code></em>);</pre>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the setting name (ie <span class="type">NM_SETTING_BOND_SETTING_NAME</span>) to be matched
+against <em class="parameter"><code>setting</code></em>'s slave type</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>TRUE if connection is of the given slave <em class="parameter"><code>type</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-connection-new"></a><h3>nm_setting_connection_new ()</h3>
<pre class="programlisting"><a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * nm_setting_connection_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
@@ -612,6 +803,15 @@ A human readable unique idenfier for the connection, like "Work WiFi" or
</div>
<hr>
<div class="refsect2">
+<a name="NMSettingConnection--master"></a><h3>The <code class="literal">"master"</code> property</h3>
+<pre class="programlisting"> "master" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
+<p>
+Interface name of the master device or UUID of the master connection.
+</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMSettingConnection--permissions"></a><h3>The <code class="literal">"permissions"</code> property</h3>
<pre class="programlisting"> "permissions" <span class="type">GSList_gchararray_</span>* : Read / Write</pre>
<p>
@@ -645,6 +845,16 @@ if the connection is read-only and cannot be modified.
</div>
<hr>
<div class="refsect2">
+<a name="NMSettingConnection--slave-type"></a><h3>The <code class="literal">"slave-type"</code> property</h3>
+<pre class="programlisting"> "slave-type" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
+<p>
+Setting name describing the type of slave device (ie
+<span class="type">NM_SETTING_BOND_SETTING_NAME</span>) or NULL if this connection is not a slave.
+</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMSettingConnection--timestamp"></a><h3>The <code class="literal">"timestamp"</code> property</h3>
<pre class="programlisting"> "timestamp" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> : Read / Write / Construct</pre>
<p>
@@ -686,6 +896,18 @@ be generated by <a class="link" href="libnm-util-nm-utils.html#nm-utils-uuid-gen
</p>
<p>Default value: NULL</p>
</div>
+<hr>
+<div class="refsect2">
+<a name="NMSettingConnection--zone"></a><h3>The <code class="literal">"zone"</code> property</h3>
+<pre class="programlisting"> "zone" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct</pre>
+<p>
+The trust level of a the connection.
+Free form case-insensitive string (for example "Home", "Work", "Public").
+NULL or unspecified zone means the connection will be placed in the
+default zone as defined by the firewall.
+</p>
+<p>Default value: NULL</p>
+</div>
</div>
</div>
<div class="footer">
diff --git a/docs/libnm-util/html/NMSettingGsm.html b/docs/libnm-util/html/NMSettingGsm.html
index ce1012f47..f2522cdc2 100644
--- a/docs/libnm-util/html/NMSettingGsm.html
+++ b/docs/libnm-util/html/NMSettingGsm.html
@@ -41,16 +41,17 @@
</tr></table></div>
<div class="refsynopsisdiv">
<a name="NMSettingGsm.synopsis"></a><h2>Synopsis</h2>
-<a name="NMSettingGsmError"></a><pre class="synopsis">
+<a name="NMSettingGsmError"></a><a name="NMSettingGsmNetworkBand"></a><a name="NMSettingGsmNetworkType"></a><pre class="synopsis">
#include &lt;nm-setting-gsm.h&gt;
<a class="link" href="NMSettingGsm.html#NMSettingGsm-struct" title="NMSettingGsm">NMSettingGsm</a>;
<a class="link" href="NMSettingGsm.html#NMSettingGsmClass" title="NMSettingGsmClass">NMSettingGsmClass</a>;
enum <a class="link" href="NMSettingGsm.html#NMSettingGsmError-enum" title="enum NMSettingGsmError">NMSettingGsmError</a>;
-enum <a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand" title="enum NMSettingGsmNetworkBand">NMSettingGsmNetworkBand</a>;
-enum <a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType" title="enum NMSettingGsmNetworkType">NMSettingGsmNetworkType</a>;
+enum <a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand-enum" title="enum NMSettingGsmNetworkBand">NMSettingGsmNetworkBand</a>;
+enum <a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType-enum" title="enum NMSettingGsmNetworkType">NMSettingGsmNetworkType</a>;
#define <a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-ALLOWED-BANDS:CAPS" title="NM_SETTING_GSM_ALLOWED_BANDS">NM_SETTING_GSM_ALLOWED_BANDS</a>
#define <a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-APN:CAPS" title="NM_SETTING_GSM_APN">NM_SETTING_GSM_APN</a>
+#define <a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-ERROR:CAPS" title="NM_SETTING_GSM_ERROR">NM_SETTING_GSM_ERROR</a>
#define <a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-HOME-ONLY:CAPS" title="NM_SETTING_GSM_HOME_ONLY">NM_SETTING_GSM_HOME_ONLY</a>
#define <a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-NETWORK-ID:CAPS" title="NM_SETTING_GSM_NETWORK_ID">NM_SETTING_GSM_NETWORK_ID</a>
#define <a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE:CAPS" title="NM_SETTING_GSM_NETWORK_TYPE">NM_SETTING_GSM_NETWORK_TYPE</a>
@@ -69,9 +70,9 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
<span class="returnvalue">int</span> <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-network-type" title="nm_setting_gsm_get_network_type ()">nm_setting_gsm_get_network_type</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-number" title="nm_setting_gsm_get_number ()">nm_setting_gsm_get_number</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-password" title="nm_setting_gsm_get_password ()">nm_setting_gsm_get_password</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-password-flags" title="nm_setting_gsm_get_password_flags ()">nm_setting_gsm_get_password_flags</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-password-flags" title="nm_setting_gsm_get_password_flags ()">nm_setting_gsm_get_password_flags</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-pin" title="nm_setting_gsm_get_pin ()">nm_setting_gsm_get_pin</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-pin-flags" title="nm_setting_gsm_get_pin_flags ()">nm_setting_gsm_get_pin_flags</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-pin-flags" title="nm_setting_gsm_get_pin_flags ()">nm_setting_gsm_get_pin_flags</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingGsm.html#nm-setting-gsm-get-username" title="nm_setting_gsm_get_username ()">nm_setting_gsm_get_username</a> (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);
<a class="link" href="NMSetting.html" title="NMSetting"><span class="returnvalue">NMSetting</span></a> * <a class="link" href="NMSettingGsm.html#nm-setting-gsm-new" title="nm_setting_gsm_new ()">nm_setting_gsm_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
@@ -87,6 +88,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
GEnum
+----NMSettingGsmError
</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSettingGsmNetworkBand
+</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSettingGsmNetworkType
+</pre>
</div>
<div class="refsect1">
<a name="NMSettingGsm.properties"></a><h2>Properties</h2>
@@ -140,10 +149,10 @@ networks, including those using GPRS/EDGE and UMTS/HSPA technology.
<div class="refsect2">
<a name="NMSettingGsmError-enum"></a><h3>enum NMSettingGsmError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_GSM_ERROR_UNKNOWN = 0,
- NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
- NM_SETTING_GSM_ERROR_MISSING_PROPERTY,
- NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING
+ NM_SETTING_GSM_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_GSM_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_GSM_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING /*&lt; nick=MissingSerialSetting &gt;*/
} NMSettingGsmError;
</pre>
<div class="variablelist"><table border="0">
@@ -176,7 +185,7 @@ is missing in the connection
</div>
<hr>
<div class="refsect2">
-<a name="NMSettingGsmNetworkBand"></a><h3>enum NMSettingGsmNetworkBand</h3>
+<a name="NMSettingGsmNetworkBand-enum"></a><h3>enum NMSettingGsmNetworkBand</h3>
<pre class="programlisting">typedef enum {
NM_SETTING_GSM_BAND_UNKNOWN = 0x00000000,
NM_SETTING_GSM_BAND_ANY = 0x00000001,
@@ -196,7 +205,7 @@ is missing in the connection
} NMSettingGsmNetworkBand;
</pre>
<p>
-<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand" title="enum NMSettingGsmNetworkBand"><span class="type">NMSettingGsmNetworkBand</span></a> values indicate the allowed frequency bands
+<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand"><span class="type">NMSettingGsmNetworkBand</span></a> values indicate the allowed frequency bands
the device may use when connecting to this network.
</p>
<div class="variablelist"><table border="0">
@@ -282,7 +291,7 @@ the device may use when connecting to this network.
</div>
<hr>
<div class="refsect2">
-<a name="NMSettingGsmNetworkType"></a><h3>enum NMSettingGsmNetworkType</h3>
+<a name="NMSettingGsmNetworkType-enum"></a><h3>enum NMSettingGsmNetworkType</h3>
<pre class="programlisting">typedef enum {
NM_SETTING_GSM_NETWORK_TYPE_ANY = -1,
NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA = 0,
@@ -292,7 +301,7 @@ the device may use when connecting to this network.
} NMSettingGsmNetworkType;
</pre>
<p>
-<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType" title="enum NMSettingGsmNetworkType"><span class="type">NMSettingGsmNetworkType</span></a> values indicate the allowed access technologies
+<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType"><span class="type">NMSettingGsmNetworkType</span></a> values indicate the allowed access technologies
the device may use when connecting to this network.
</p>
<div class="variablelist"><table border="0">
@@ -348,6 +357,14 @@ preferred but 3G-type technologies may be used as a fallback
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-GSM-ERROR:CAPS"></a><h3>NM_SETTING_GSM_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_GSM_ERROR nm_setting_gsm_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-GSM-HOME-ONLY:CAPS"></a><h3>NM_SETTING_GSM_HOME_ONLY</h3>
<pre class="programlisting">#define NM_SETTING_GSM_HOME_ONLY "home-only"
</pre>
@@ -577,7 +594,7 @@ Registers an error quark for <a class="link" href="NMSettingGsm.html" title="NMS
<hr>
<div class="refsect2">
<a name="nm-setting-gsm-get-password-flags"></a><h3>nm_setting_gsm_get_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_gsm_get_password_flags (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_gsm_get_password_flags (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
@@ -588,7 +605,7 @@ Registers an error quark for <a class="link" href="NMSettingGsm.html" title="NMS
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingGsm.html#NMSettingGsm--password" title='The "password" property'><span class="type">"password"</span></a>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingGsm.html#NMSettingGsm--password" title='The "password" property'><span class="type">"password"</span></a>
</td>
</tr>
</tbody>
@@ -616,7 +633,7 @@ Registers an error quark for <a class="link" href="NMSettingGsm.html" title="NMS
<hr>
<div class="refsect2">
<a name="nm-setting-gsm-get-pin-flags"></a><h3>nm_setting_gsm_get_pin_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_gsm_get_pin_flags (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);</pre>
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_gsm_get_pin_flags (<em class="parameter"><code><a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
@@ -627,7 +644,7 @@ Registers an error quark for <a class="link" href="NMSettingGsm.html" title="NMS
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingGsm.html#NMSettingGsm--pin" title='The "pin" property'><span class="type">"pin"</span></a>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingGsm.html#NMSettingGsm--pin" title='The "pin" property'><span class="type">"pin"</span></a>
</td>
</tr>
</tbody>
@@ -676,7 +693,7 @@ Creates a new <a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><spa
<p>
Bitfield of allowed frequency bands. Note that not all devices allow
frequency band control. Permitted values are those specified by
-<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand" title="enum NMSettingGsmNetworkBand"><span class="type">NMSettingGsmNetworkBand</span></a>.
+<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand"><span class="type">NMSettingGsmNetworkBand</span></a>.
</p>
<p>Allowed values: &lt;= 1</p>
<p>Default value: 1</p>
@@ -726,7 +743,7 @@ roaming control of the device is not otherwise possible.
<p>
Network preference to force the device to only use specific network
technologies. Permitted values are those specified by
-<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType" title="enum NMSettingGsmNetworkType"><span class="type">NMSettingGsmNetworkType</span></a>. Note that not all devices allow network
+<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType"><span class="type">NMSettingGsmNetworkType</span></a>. Note that not all devices allow network
preference control.
</p>
<p>Allowed values: [G_MAXULONG,3]</p>
diff --git a/docs/libnm-util/html/NMSettingIP4Config.html b/docs/libnm-util/html/NMSettingIP4Config.html
index aee7ddc87..1f9e666b0 100644
--- a/docs/libnm-util/html/NMSettingIP4Config.html
+++ b/docs/libnm-util/html/NMSettingIP4Config.html
@@ -55,6 +55,7 @@ enum <a class="link" href="NMSettingIP4Config.html#NMSettingIP4Co
#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DHCP-SEND-HOSTNAME:CAPS" title="NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME">NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME</a>
#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DNS:CAPS" title="NM_SETTING_IP4_CONFIG_DNS">NM_SETTING_IP4_CONFIG_DNS</a>
#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DNS-SEARCH:CAPS" title="NM_SETTING_IP4_CONFIG_DNS_SEARCH">NM_SETTING_IP4_CONFIG_DNS_SEARCH</a>
+#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-ERROR:CAPS" title="NM_SETTING_IP4_CONFIG_ERROR">NM_SETTING_IP4_CONFIG_ERROR</a>
#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-IGNORE-AUTO-DNS:CAPS" title="NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS">NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS</a>
#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-IGNORE-AUTO-ROUTES:CAPS" title="NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES">NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES</a>
#define <a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-MAY-FAIL:CAPS" title="NM_SETTING_IP4_CONFIG_MAY_FAIL">NM_SETTING_IP4_CONFIG_MAY_FAIL</a>
@@ -247,10 +248,10 @@ properties related to IPv4 addressing, routing, and Domain Name Service
<div class="refsect2">
<a name="NMSettingIP4ConfigError-enum"></a><h3>enum NMSettingIP4ConfigError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN = 0,
- NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
- NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY,
- NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD
+ NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD /*&lt; nick=NotAllowedForMethod &gt;*/
} NMSettingIP4ConfigError;
</pre>
<div class="variablelist"><table border="0">
@@ -331,6 +332,14 @@ not valid with the given IP4 method
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-IP4-CONFIG-ERROR:CAPS"></a><h3>NM_SETTING_IP4_CONFIG_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_IP4_CONFIG_ERROR nm_setting_ip4_config_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-IP4-CONFIG-IGNORE-AUTO-DNS:CAPS"></a><h3>NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS</h3>
<pre class="programlisting">#define NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS "ignore-auto-dns"
</pre>
@@ -1753,7 +1762,7 @@ example, in IPv6-only networks, setting this property to TRUE allows
the overall network configuration to succeed if IPv4 configuration fails
but IPv6 configuration completes successfully.
</p>
-<p>Default value: FALSE</p>
+<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
diff --git a/docs/libnm-util/html/NMSettingIP6Config.html b/docs/libnm-util/html/NMSettingIP6Config.html
index e0d39277e..b053bd279 100644
--- a/docs/libnm-util/html/NMSettingIP6Config.html
+++ b/docs/libnm-util/html/NMSettingIP6Config.html
@@ -41,7 +41,7 @@
</tr></table></div>
<div class="refsynopsisdiv">
<a name="NMSettingIP6Config.synopsis"></a><h2>Synopsis</h2>
-<a name="NMIP6Address"></a><a name="NMIP6Route"></a><a name="NMSettingIP6ConfigError"></a><pre class="synopsis">
+<a name="NMIP6Address"></a><a name="NMIP6Route"></a><a name="NMSettingIP6ConfigError"></a><a name="NMSettingIP6ConfigPrivacy"></a><pre class="synopsis">
#include &lt;nm-setting-ip6-config.h&gt;
typedef <a class="link" href="NMSettingIP6Config.html#NMIP6Address">NMIP6Address</a>;
@@ -49,11 +49,14 @@ typedef <a class="link" href="NMSettingIP6Config.html#NMIP6Route">NM
<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config-struct" title="NMSettingIP6Config">NMSettingIP6Config</a>;
<a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigClass" title="NMSettingIP6ConfigClass">NMSettingIP6ConfigClass</a>;
enum <a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigError-enum" title="enum NMSettingIP6ConfigError">NMSettingIP6ConfigError</a>;
+enum <a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy-enum" title="enum NMSettingIP6ConfigPrivacy">NMSettingIP6ConfigPrivacy</a>;
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ADDRESSES:CAPS" title="NM_SETTING_IP6_CONFIG_ADDRESSES">NM_SETTING_IP6_CONFIG_ADDRESSES</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-DNS:CAPS" title="NM_SETTING_IP6_CONFIG_DNS">NM_SETTING_IP6_CONFIG_DNS</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-DNS-SEARCH:CAPS" title="NM_SETTING_IP6_CONFIG_DNS_SEARCH">NM_SETTING_IP6_CONFIG_DNS_SEARCH</a>
+#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR:CAPS" title="NM_SETTING_IP6_CONFIG_ERROR">NM_SETTING_IP6_CONFIG_ERROR</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IGNORE-AUTO-DNS:CAPS" title="NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS">NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IGNORE-AUTO-ROUTES:CAPS" title="NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES">NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES</a>
+#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IP6-PRIVACY:CAPS" title="NM_SETTING_IP6_CONFIG_IP6_PRIVACY">NM_SETTING_IP6_CONFIG_IP6_PRIVACY</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-MAY-FAIL:CAPS" title="NM_SETTING_IP6_CONFIG_MAY_FAIL">NM_SETTING_IP6_CONFIG_MAY_FAIL</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-METHOD:CAPS" title="NM_SETTING_IP6_CONFIG_METHOD">NM_SETTING_IP6_CONFIG_METHOD</a>
#define <a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-METHOD-AUTO:CAPS" title="NM_SETTING_IP6_CONFIG_METHOD_AUTO">NM_SETTING_IP6_CONFIG_METHOD_AUTO</a>
@@ -125,6 +128,8 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
(<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-ignore-auto-routes" title="nm_setting_ip6_config_get_ignore_auto_routes ()">nm_setting_ip6_config_get_ignore_auto_routes</a>
(<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);
+<a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy"><span class="returnvalue">NMSettingIP6ConfigPrivacy</span></a> <a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-ip6-privacy" title="nm_setting_ip6_config_get_ip6_privacy ()">nm_setting_ip6_config_get_ip6_privacy</a>
+ (<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-may-fail" title="nm_setting_ip6_config_get_may_fail ()">nm_setting_ip6_config_get_may_fail</a> (<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-method" title="nm_setting_ip6_config_get_method ()">nm_setting_ip6_config_get_method</a> (<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-never-default" title="nm_setting_ip6_config_get_never_default ()">nm_setting_ip6_config_get_never_default</a>
@@ -170,6 +175,10 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
GEnum
+----NMSettingIP6ConfigError
</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMSettingIP6ConfigPrivacy
+</pre>
</div>
<div class="refsect1">
<a name="NMSettingIP6Config.properties"></a><h2>Properties</h2>
@@ -179,6 +188,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
"<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--dns-search" title='The "dns-search" property'>dns-search</a>" <span class="type">GSList_gchararray_</span>* : Read / Write
"<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--ignore-auto-dns" title='The "ignore-auto-dns" property'>ignore-auto-dns</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
"<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--ignore-auto-routes" title='The "ignore-auto-routes" property'>ignore-auto-routes</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
+ "<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--ip6-privacy" title='The "ip6-privacy" property'>ip6-privacy</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> : Read / Write / Construct
"<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--may-fail" title='The "may-fail" property'>may-fail</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
"<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--method" title='The "method" property'>method</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
"<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--never-default" title='The "never-default" property'>never-default</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
@@ -236,10 +246,10 @@ properties related to IPv6 addressing, routing, and Domain Name Service
<div class="refsect2">
<a name="NMSettingIP6ConfigError-enum"></a><h3>enum NMSettingIP6ConfigError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN = 0,
- NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY,
- NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY,
- NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD
+ NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD /*&lt; nick=NotAllowedForMethod &gt;*/
} NMSettingIP6ConfigError;
</pre>
<div class="variablelist"><table border="0">
@@ -272,6 +282,48 @@ not valid with the given IPv6 method
</div>
<hr>
<div class="refsect2">
+<a name="NMSettingIP6ConfigPrivacy-enum"></a><h3>enum NMSettingIP6ConfigPrivacy</h3>
+<pre class="programlisting">typedef enum {
+ NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN = -1,
+ NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED = 0,
+ NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR = 1,
+ NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR = 2
+} NMSettingIP6ConfigPrivacy;
+</pre>
+<p>
+<a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy"><span class="type">NMSettingIP6ConfigPrivacy</span></a> values indicate if and how IPv6 Privacy
+Extensions are used (RFC4941).
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="NM-SETTING-IP6-CONFIG-PRIVACY-UNKNOWN:CAPS"></a><span class="term"><code class="literal">NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN</code></span></p></td>
+<td>unknown or no value specified
+</td>
+</tr>
+<tr>
+<td><p><a name="NM-SETTING-IP6-CONFIG-PRIVACY-DISABLED:CAPS"></a><span class="term"><code class="literal">NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED</code></span></p></td>
+<td>IPv6 Privacy Extensions are disabled
+</td>
+</tr>
+<tr>
+<td><p><a name="NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-PUBLIC-ADDR:CAPS"></a><span class="term"><code class="literal">NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR</code></span></p></td>
+<td>IPv6 Privacy Extensions
+are enabled, but public addresses are preferred over temporary addresses
+</td>
+</tr>
+<tr>
+<td><p><a name="NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-TEMP-ADDR:CAPS"></a><span class="term"><code class="literal">NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR</code></span></p></td>
+<td>IPv6 Privacy Extensions
+are enabled and temporary addresses are preferred over public addresses
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-IP6-CONFIG-ADDRESSES:CAPS"></a><h3>NM_SETTING_IP6_CONFIG_ADDRESSES</h3>
<pre class="programlisting">#define NM_SETTING_IP6_CONFIG_ADDRESSES "addresses"
</pre>
@@ -296,6 +348,14 @@ not valid with the given IPv6 method
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-IP6-CONFIG-ERROR:CAPS"></a><h3>NM_SETTING_IP6_CONFIG_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_IP6_CONFIG_ERROR nm_setting_ip6_config_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-IP6-CONFIG-IGNORE-AUTO-DNS:CAPS"></a><h3>NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS</h3>
<pre class="programlisting">#define NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS "ignore-auto-dns"
</pre>
@@ -312,6 +372,14 @@ not valid with the given IPv6 method
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-IP6-CONFIG-IP6-PRIVACY:CAPS"></a><h3>NM_SETTING_IP6_CONFIG_IP6_PRIVACY</h3>
+<pre class="programlisting">#define NM_SETTING_IP6_CONFIG_IP6_PRIVACY "ip6-privacy"
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-IP6-CONFIG-MAY-FAIL:CAPS"></a><h3>NM_SETTING_IP6_CONFIG_MAY_FAIL</h3>
<pre class="programlisting">#define NM_SETTING_IP6_CONFIG_MAY_FAIL "may-fail"
</pre>
@@ -1262,6 +1330,30 @@ ignored.</td>
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-ip6-config-get-ip6-privacy"></a><h3>nm_setting_ip6_config_get_ip6_privacy ()</h3>
+<pre class="programlisting"><a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy"><span class="returnvalue">NMSettingIP6ConfigPrivacy</span></a> nm_setting_ip6_config_get_ip6_privacy
+ (<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);</pre>
+<p>
+Returns the value contained in the <a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--ip6-privacy" title='The "ip6-privacy" property'><span class="type">"ip6-privacy"</span></a>
+property.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>IPv6 Privacy Extensions configuration value (<a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy"><span class="type">NMSettingIP6ConfigPrivacy</span></a>).</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-ip6-config-get-may-fail"></a><h3>nm_setting_ip6_config_get_may_fail ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_setting_ip6_config_get_may_fail (<em class="parameter"><code><a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> *setting</code></em>);</pre>
<p>
@@ -1615,6 +1707,22 @@ specified in <a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--r
</div>
<hr>
<div class="refsect2">
+<a name="NMSettingIP6Config--ip6-privacy"></a><h3>The <code class="literal">"ip6-privacy"</code> property</h3>
+<pre class="programlisting"> "ip6-privacy" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> : Read / Write / Construct</pre>
+<p>
+Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941.
+If enabled, it makes the kernel generate a temporary IPv6 address
+in addition to the public one generated from MAC address via
+modified EUI-64. This enhances privacy, but could cause problems
+in some applications, on the other hand. The permitted values
+are: 0: disabled, 1: enabled (prefer public address),
+2: enabled (prefer temporary addresses).
+</p>
+<p>Allowed values: [G_MAXULONG,2]</p>
+<p>Default value: -1</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NMSettingIP6Config--may-fail"></a><h3>The <code class="literal">"may-fail"</code> property</h3>
<pre class="programlisting"> "may-fail" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre>
<p>
diff --git a/docs/libnm-util/html/NMSettingOlpcMesh.html b/docs/libnm-util/html/NMSettingOlpcMesh.html
index 1f24e2a53..159926002 100644
--- a/docs/libnm-util/html/NMSettingOlpcMesh.html
+++ b/docs/libnm-util/html/NMSettingOlpcMesh.html
@@ -46,6 +46,7 @@
enum <a class="link" href="NMSettingOlpcMesh.html#NMSettingOlpcMeshError-enum" title="enum NMSettingOlpcMeshError">NMSettingOlpcMeshError</a>;
#define <a class="link" href="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-CHANNEL:CAPS" title="NM_SETTING_OLPC_MESH_CHANNEL">NM_SETTING_OLPC_MESH_CHANNEL</a>
#define <a class="link" href="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-DHCP-ANYCAST-ADDRESS:CAPS" title="NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS">NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS</a>
+#define <a class="link" href="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-ERROR:CAPS" title="NM_SETTING_OLPC_MESH_ERROR">NM_SETTING_OLPC_MESH_ERROR</a>
#define <a class="link" href="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-SETTING-NAME:CAPS" title="NM_SETTING_OLPC_MESH_SETTING_NAME">NM_SETTING_OLPC_MESH_SETTING_NAME</a>
#define <a class="link" href="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-SSID:CAPS" title="NM_SETTING_OLPC_MESH_SSID">NM_SETTING_OLPC_MESH_SSID</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a> <a class="link" href="NMSettingOlpcMesh.html#nm-setting-olpc-mesh-error-quark" title="nm_setting_olpc_mesh_error_quark ()">nm_setting_olpc_mesh_error_quark</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
@@ -109,9 +110,9 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.htm
<div class="refsect2">
<a name="NMSettingOlpcMeshError-enum"></a><h3>enum NMSettingOlpcMeshError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_OLPC_MESH_ERROR_UNKNOWN = 0,
- NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY,
- NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY
+ NM_SETTING_OLPC_MESH_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY /*&lt; nick=MissingProperty &gt;*/
} NMSettingOlpcMeshError;
</pre>
<p>
@@ -135,6 +136,14 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.htm
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-OLPC-MESH-ERROR:CAPS"></a><h3>NM_SETTING_OLPC_MESH_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_OLPC_MESH_ERROR nm_setting_olpc_mesh_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-OLPC-MESH-SETTING-NAME:CAPS"></a><h3>NM_SETTING_OLPC_MESH_SETTING_NAME</h3>
<pre class="programlisting">#define NM_SETTING_OLPC_MESH_SETTING_NAME "802-11-olpc-mesh"
</pre>
diff --git a/docs/libnm-util/html/NMSettingPPP.html b/docs/libnm-util/html/NMSettingPPP.html
index c1d73eadd..0f95d8f6a 100644
--- a/docs/libnm-util/html/NMSettingPPP.html
+++ b/docs/libnm-util/html/NMSettingPPP.html
@@ -50,6 +50,7 @@ that require PPP to deliver IP capability</p>
enum <a class="link" href="NMSettingPPP.html#NMSettingPPPError-enum" title="enum NMSettingPPPError">NMSettingPPPError</a>;
#define <a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-BAUD:CAPS" title="NM_SETTING_PPP_BAUD">NM_SETTING_PPP_BAUD</a>
#define <a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-CRTSCTS:CAPS" title="NM_SETTING_PPP_CRTSCTS">NM_SETTING_PPP_CRTSCTS</a>
+#define <a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-ERROR:CAPS" title="NM_SETTING_PPP_ERROR">NM_SETTING_PPP_ERROR</a>
#define <a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-LCP-ECHO-FAILURE:CAPS" title="NM_SETTING_PPP_LCP_ECHO_FAILURE">NM_SETTING_PPP_LCP_ECHO_FAILURE</a>
#define <a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-LCP-ECHO-INTERVAL:CAPS" title="NM_SETTING_PPP_LCP_ECHO_INTERVAL">NM_SETTING_PPP_LCP_ECHO_INTERVAL</a>
#define <a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-MPPE-STATEFUL:CAPS" title="NM_SETTING_PPP_MPPE_STATEFUL">NM_SETTING_PPP_MPPE_STATEFUL</a>
@@ -161,10 +162,10 @@ cable and DSL modems and some mobile broadband devices.
<div class="refsect2">
<a name="NMSettingPPPError-enum"></a><h3>enum NMSettingPPPError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_PPP_ERROR_UNKNOWN = 0,
- NM_SETTING_PPP_ERROR_INVALID_PROPERTY,
- NM_SETTING_PPP_ERROR_MISSING_PROPERTY,
- NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED
+ NM_SETTING_PPP_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_PPP_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_PPP_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED /*&lt; nick=RequireMPPENotAllowed &gt;*/
} NMSettingPPPError;
</pre>
<div class="variablelist"><table border="0">
@@ -213,6 +214,14 @@ with other setting configuration parameters
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-PPP-ERROR:CAPS"></a><h3>NM_SETTING_PPP_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_PPP_ERROR nm_setting_ppp_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-PPP-LCP-ECHO-FAILURE:CAPS"></a><h3>NM_SETTING_PPP_LCP_ECHO_FAILURE</h3>
<pre class="programlisting">#define NM_SETTING_PPP_LCP_ECHO_FAILURE "lcp-echo-failure"
</pre>
diff --git a/docs/libnm-util/html/NMSettingPPPOE.html b/docs/libnm-util/html/NMSettingPPPOE.html
index 43c795db7..bdbeeead7 100644
--- a/docs/libnm-util/html/NMSettingPPPOE.html
+++ b/docs/libnm-util/html/NMSettingPPPOE.html
@@ -47,6 +47,7 @@
<a class="link" href="NMSettingPPPOE.html#NMSettingPPPOE-struct" title="NMSettingPPPOE">NMSettingPPPOE</a>;
<a class="link" href="NMSettingPPPOE.html#NMSettingPPPOEClass" title="NMSettingPPPOEClass">NMSettingPPPOEClass</a>;
enum <a class="link" href="NMSettingPPPOE.html#NMSettingPPPOEError-enum" title="enum NMSettingPPPOEError">NMSettingPPPOEError</a>;
+#define <a class="link" href="NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR:CAPS" title="NM_SETTING_PPPOE_ERROR">NM_SETTING_PPPOE_ERROR</a>
#define <a class="link" href="NMSettingPPPOE.html#NM-SETTING-PPPOE-PASSWORD:CAPS" title="NM_SETTING_PPPOE_PASSWORD">NM_SETTING_PPPOE_PASSWORD</a>
#define <a class="link" href="NMSettingPPPOE.html#NM-SETTING-PPPOE-PASSWORD-FLAGS:CAPS" title="NM_SETTING_PPPOE_PASSWORD_FLAGS">NM_SETTING_PPPOE_PASSWORD_FLAGS</a>
#define <a class="link" href="NMSettingPPPOE.html#NM-SETTING-PPPOE-SERVICE:CAPS" title="NM_SETTING_PPPOE_SERVICE">NM_SETTING_PPPOE_SERVICE</a>
@@ -54,7 +55,7 @@ enum <a class="link" href="NMSettingPPPOE.html#NMSettingPPPOEErro
#define <a class="link" href="NMSettingPPPOE.html#NM-SETTING-PPPOE-USERNAME:CAPS" title="NM_SETTING_PPPOE_USERNAME">NM_SETTING_PPPOE_USERNAME</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a> <a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-error-quark" title="nm_setting_pppoe_error_quark ()">nm_setting_pppoe_error_quark</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-get-password" title="nm_setting_pppoe_get_password ()">nm_setting_pppoe_get_password</a> (<em class="parameter"><code><a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE"><span class="type">NMSettingPPPOE</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-get-password-flags" title="nm_setting_pppoe_get_password_flags ()">nm_setting_pppoe_get_password_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-get-password-flags" title="nm_setting_pppoe_get_password_flags ()">nm_setting_pppoe_get_password_flags</a>
(<em class="parameter"><code><a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE"><span class="type">NMSettingPPPOE</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-get-service" title="nm_setting_pppoe_get_service ()">nm_setting_pppoe_get_service</a> (<em class="parameter"><code><a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE"><span class="type">NMSettingPPPOE</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-get-username" title="nm_setting_pppoe_get_username ()">nm_setting_pppoe_get_username</a> (<em class="parameter"><code><a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE"><span class="type">NMSettingPPPOE</span></a> *setting</code></em>);
@@ -118,10 +119,10 @@ to provide IP transport, for example cable or DSL modems.
<div class="refsect2">
<a name="NMSettingPPPOEError-enum"></a><h3>enum NMSettingPPPOEError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_PPPOE_ERROR_UNKNOWN = 0,
- NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY,
- NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY,
- NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING
+ NM_SETTING_PPPOE_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING /*&lt; nick=MissingPPPSetting &gt;*/
} NMSettingPPPOEError;
</pre>
<div class="variablelist"><table border="0">
@@ -154,6 +155,14 @@ did not contain a required PPP setting for PPP related options
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-PPPOE-ERROR:CAPS"></a><h3>NM_SETTING_PPPOE_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_PPPOE_ERROR nm_setting_pppoe_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-PPPOE-PASSWORD:CAPS"></a><h3>NM_SETTING_PPPOE_PASSWORD</h3>
<pre class="programlisting">#define NM_SETTING_PPPOE_PASSWORD "password"
</pre>
@@ -217,7 +226,7 @@ Registers an error quark for <a class="link" href="NMSettingPPPOE.html" title="N
<hr>
<div class="refsect2">
<a name="nm-setting-pppoe-get-password-flags"></a><h3>nm_setting_pppoe_get_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_pppoe_get_password_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_pppoe_get_password_flags
(<em class="parameter"><code><a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE"><span class="type">NMSettingPPPOE</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -229,7 +238,7 @@ Registers an error quark for <a class="link" href="NMSettingPPPOE.html" title="N
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingPPPOE.html#NMSettingPPPOE--password" title='The "password" property'><span class="type">"password"</span></a>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the <a class="link" href="NMSettingPPPOE.html#NMSettingPPPOE--password" title='The "password" property'><span class="type">"password"</span></a>
</td>
</tr>
</tbody>
diff --git a/docs/libnm-util/html/NMSettingSerial.html b/docs/libnm-util/html/NMSettingSerial.html
index e3d2b43d3..e68a26093 100644
--- a/docs/libnm-util/html/NMSettingSerial.html
+++ b/docs/libnm-util/html/NMSettingSerial.html
@@ -50,6 +50,7 @@ serial communications</p>
enum <a class="link" href="NMSettingSerial.html#NMSettingSerialError-enum" title="enum NMSettingSerialError">NMSettingSerialError</a>;
#define <a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-BAUD:CAPS" title="NM_SETTING_SERIAL_BAUD">NM_SETTING_SERIAL_BAUD</a>
#define <a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-BITS:CAPS" title="NM_SETTING_SERIAL_BITS">NM_SETTING_SERIAL_BITS</a>
+#define <a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-ERROR:CAPS" title="NM_SETTING_SERIAL_ERROR">NM_SETTING_SERIAL_ERROR</a>
#define <a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-PARITY:CAPS" title="NM_SETTING_SERIAL_PARITY">NM_SETTING_SERIAL_PARITY</a>
#define <a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-SEND-DELAY:CAPS" title="NM_SETTING_SERIAL_SEND_DELAY">NM_SETTING_SERIAL_SEND_DELAY</a>
#define <a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-SETTING-NAME:CAPS" title="NM_SETTING_SERIAL_SETTING_NAME">NM_SETTING_SERIAL_SETTING_NAME</a>
@@ -121,10 +122,10 @@ such as mobile broadband or analog telephone connections.
<div class="refsect2">
<a name="NMSettingSerialError-enum"></a><h3>enum NMSettingSerialError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_SERIAL_ERROR_UNKNOWN = 0,
- NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY,
- NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY,
- NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING
+ NM_SETTING_SERIAL_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING /*&lt; nick=MissingPPPSetting &gt;*/
} NMSettingSerialError;
</pre>
<div class="variablelist"><table border="0">
@@ -173,6 +174,14 @@ setting requires the connection to contain an <a class="link" href="NMSettingPPP
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-SERIAL-ERROR:CAPS"></a><h3>NM_SETTING_SERIAL_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_SERIAL_ERROR nm_setting_serial_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-SERIAL-PARITY:CAPS"></a><h3>NM_SETTING_SERIAL_PARITY</h3>
<pre class="programlisting">#define NM_SETTING_SERIAL_PARITY "parity"
</pre>
diff --git a/docs/libnm-util/html/NMSettingVPN.html b/docs/libnm-util/html/NMSettingVPN.html
index 4f397cc37..d686803bc 100644
--- a/docs/libnm-util/html/NMSettingVPN.html
+++ b/docs/libnm-util/html/NMSettingVPN.html
@@ -51,6 +51,7 @@ enum <a class="link" href="NMSettingVPN.html#NMSettingVpnError-en
<em class="parameter"><code>const <span class="type">char</span> *value</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
#define <a class="link" href="NMSettingVPN.html#NM-SETTING-VPN-DATA:CAPS" title="NM_SETTING_VPN_DATA">NM_SETTING_VPN_DATA</a>
+#define <a class="link" href="NMSettingVPN.html#NM-SETTING-VPN-ERROR:CAPS" title="NM_SETTING_VPN_ERROR">NM_SETTING_VPN_ERROR</a>
#define <a class="link" href="NMSettingVPN.html#NM-SETTING-VPN-SECRETS:CAPS" title="NM_SETTING_VPN_SECRETS">NM_SETTING_VPN_SECRETS</a>
#define <a class="link" href="NMSettingVPN.html#NM-SETTING-VPN-SERVICE-TYPE:CAPS" title="NM_SETTING_VPN_SERVICE_TYPE">NM_SETTING_VPN_SERVICE_TYPE</a>
#define <a class="link" href="NMSettingVPN.html#NM-SETTING-VPN-SETTING-NAME:CAPS" title="NM_SETTING_VPN_SETTING_NAME">NM_SETTING_VPN_SETTING_NAME</a>
@@ -70,6 +71,8 @@ enum <a class="link" href="NMSettingVPN.html#NMSettingVpnError-en
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-data-item" title="nm_setting_vpn_get_data_item ()">nm_setting_vpn_get_data_item</a> (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-num-data-items" title="nm_setting_vpn_get_num_data_items ()">nm_setting_vpn_get_num_data_items</a> (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-num-secrets" title="nm_setting_vpn_get_num_secrets ()">nm_setting_vpn_get_num_secrets</a> (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-secret" title="nm_setting_vpn_get_secret ()">nm_setting_vpn_get_secret</a> (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-service-type" title="nm_setting_vpn_get_service_type ()">nm_setting_vpn_get_service_type</a> (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>);
@@ -142,9 +145,9 @@ properties.
<div class="refsect2">
<a name="NMSettingVpnError-enum"></a><h3>enum NMSettingVpnError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_VPN_ERROR_UNKNOWN = 0,
- NM_SETTING_VPN_ERROR_INVALID_PROPERTY,
- NM_SETTING_VPN_ERROR_MISSING_PROPERTY,
+ NM_SETTING_VPN_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_VPN_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_VPN_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
} NMSettingVpnError;
</pre>
<div class="variablelist"><table border="0">
@@ -205,6 +208,14 @@ required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-VPN-ERROR:CAPS"></a><h3>NM_SETTING_VPN_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_VPN_ERROR nm_setting_vpn_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-VPN-SECRETS:CAPS"></a><h3>NM_SETTING_VPN_SECRETS</h3>
<pre class="programlisting">#define NM_SETTING_VPN_SECRETS "secrets"
</pre>
@@ -407,6 +418,50 @@ by <a class="link" href="NMSettingVPN.html#nm-setting-vpn-add-data-item" title="
</div>
<hr>
<div class="refsect2">
+<a name="nm-setting-vpn-get-num-data-items"></a><h3>nm_setting_vpn_get_num_data_items ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_setting_vpn_get_num_data_items (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>);</pre>
+<p>
+Gets number of key/value pairs of VPN configuration data.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the number of VPN plugin specific configuration data items</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-setting-vpn-get-num-secrets"></a><h3>nm_setting_vpn_get_num_secrets ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_setting_vpn_get_num_secrets (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>);</pre>
+<p>
+Gets number of VPN plugin specific secrets in the setting.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
+<td>the <a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the number of VPN plugin specific secrets</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-setting-vpn-get-secret"></a><h3>nm_setting_vpn_get_secret ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * nm_setting_vpn_get_secret (<em class="parameter"><code><a class="link" href="NMSettingVPN.html" title="NMSettingVPN"><span class="type">NMSettingVPN</span></a> *setting</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
@@ -574,7 +629,14 @@ plugin.
<div class="refsect2">
<a name="NMSettingVPN--user-name"></a><h3>The <code class="literal">"user-name"</code> property</h3>
<pre class="programlisting"> "user-name" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
-<p>If the VPN connection requires a user name for authentication, that name should be provided here. If the connection is available to more than one user, and the VPN requires each user to supply a different name, then leave this property empty. If this property is empty, NetworkManager will automatically supply the username of the user which requested the VPN connection.</p>
+<p>
+If the VPN connection requires a user name for authentication, that name
+should be provided here. If the connection is available to more than
+one user, and the VPN requires each user to supply a different name, then
+leave this property empty. If this property is empty, NetworkManager
+will automatically supply the username of the user which requested the
+VPN connection.
+</p>
<p>Default value: NULL</p>
</div>
</div>
diff --git a/docs/libnm-util/html/NMSettingWimax.html b/docs/libnm-util/html/NMSettingWimax.html
index abaa48d8c..66f68ba90 100644
--- a/docs/libnm-util/html/NMSettingWimax.html
+++ b/docs/libnm-util/html/NMSettingWimax.html
@@ -47,6 +47,7 @@
<a class="link" href="NMSettingWimax.html#NMSettingWimax-struct" title="NMSettingWimax">NMSettingWimax</a>;
<a class="link" href="NMSettingWimax.html#NMSettingWimaxClass" title="NMSettingWimaxClass">NMSettingWimaxClass</a>;
enum <a class="link" href="NMSettingWimax.html#NMSettingWimaxError-enum" title="enum NMSettingWimaxError">NMSettingWimaxError</a>;
+#define <a class="link" href="NMSettingWimax.html#NM-SETTING-WIMAX-ERROR:CAPS" title="NM_SETTING_WIMAX_ERROR">NM_SETTING_WIMAX_ERROR</a>
#define <a class="link" href="NMSettingWimax.html#NM-SETTING-WIMAX-MAC-ADDRESS:CAPS" title="NM_SETTING_WIMAX_MAC_ADDRESS">NM_SETTING_WIMAX_MAC_ADDRESS</a>
#define <a class="link" href="NMSettingWimax.html#NM-SETTING-WIMAX-NETWORK-NAME:CAPS" title="NM_SETTING_WIMAX_NETWORK_NAME">NM_SETTING_WIMAX_NETWORK_NAME</a>
#define <a class="link" href="NMSettingWimax.html#NM-SETTING-WIMAX-SETTING-NAME:CAPS" title="NM_SETTING_WIMAX_SETTING_NAME">NM_SETTING_WIMAX_SETTING_NAME</a>
@@ -104,9 +105,9 @@ necessary for connection to 802.16e Mobile WiMAX networks.
<div class="refsect2">
<a name="NMSettingWimaxError-enum"></a><h3>enum NMSettingWimaxError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_WIMAX_ERROR_UNKNOWN = 0,
- NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY
+ NM_SETTING_WIMAX_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY /*&lt; nick=MissingProperty &gt;*/
} NMSettingWimaxError;
</pre>
<div class="variablelist"><table border="0">
@@ -133,6 +134,14 @@ required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-WIMAX-ERROR:CAPS"></a><h3>NM_SETTING_WIMAX_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_WIMAX_ERROR nm_setting_wimax_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-WIMAX-MAC-ADDRESS:CAPS"></a><h3>NM_SETTING_WIMAX_MAC_ADDRESS</h3>
<pre class="programlisting">#define NM_SETTING_WIMAX_MAC_ADDRESS "mac-address"
</pre>
diff --git a/docs/libnm-util/html/NMSettingWired.html b/docs/libnm-util/html/NMSettingWired.html
index f2b709997..d56f053f3 100644
--- a/docs/libnm-util/html/NMSettingWired.html
+++ b/docs/libnm-util/html/NMSettingWired.html
@@ -50,6 +50,7 @@ enum <a class="link" href="NMSettingWired.html#NMSettingWiredErro
#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-AUTO-NEGOTIATE:CAPS" title="NM_SETTING_WIRED_AUTO_NEGOTIATE">NM_SETTING_WIRED_AUTO_NEGOTIATE</a>
#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-CLONED-MAC-ADDRESS:CAPS" title="NM_SETTING_WIRED_CLONED_MAC_ADDRESS">NM_SETTING_WIRED_CLONED_MAC_ADDRESS</a>
#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-DUPLEX:CAPS" title="NM_SETTING_WIRED_DUPLEX">NM_SETTING_WIRED_DUPLEX</a>
+#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-ERROR:CAPS" title="NM_SETTING_WIRED_ERROR">NM_SETTING_WIRED_ERROR</a>
#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-MAC-ADDRESS:CAPS" title="NM_SETTING_WIRED_MAC_ADDRESS">NM_SETTING_WIRED_MAC_ADDRESS</a>
#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-MAC-ADDRESS-BLACKLIST:CAPS" title="NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST">NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST</a>
#define <a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-MTU:CAPS" title="NM_SETTING_WIRED_MTU">NM_SETTING_WIRED_MTU</a>
@@ -153,9 +154,9 @@ necessary for connection to Ethernet networks.
<div class="refsect2">
<a name="NMSettingWiredError-enum"></a><h3>enum NMSettingWiredError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_WIRED_ERROR_UNKNOWN = 0,
- NM_SETTING_WIRED_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIRED_ERROR_MISSING_PROPERTY
+ NM_SETTING_WIRED_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_WIRED_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_WIRED_ERROR_MISSING_PROPERTY /*&lt; nick=MissingProperty &gt;*/
} NMSettingWiredError;
</pre>
<div class="variablelist"><table border="0">
@@ -206,6 +207,14 @@ required
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-WIRED-ERROR:CAPS"></a><h3>NM_SETTING_WIRED_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_WIRED_ERROR nm_setting_wired_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-WIRED-MAC-ADDRESS:CAPS"></a><h3>NM_SETTING_WIRED_MAC_ADDRESS</h3>
<pre class="programlisting">#define NM_SETTING_WIRED_MAC_ADDRESS "mac-address"
</pre>
diff --git a/docs/libnm-util/html/NMSettingWireless.html b/docs/libnm-util/html/NMSettingWireless.html
index a860f226a..ab05340ed 100644
--- a/docs/libnm-util/html/NMSettingWireless.html
+++ b/docs/libnm-util/html/NMSettingWireless.html
@@ -51,6 +51,7 @@ enum <a class="link" href="NMSettingWireless.html#NMSettingWirele
#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-BSSID:CAPS" title="NM_SETTING_WIRELESS_BSSID">NM_SETTING_WIRELESS_BSSID</a>
#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-CHANNEL:CAPS" title="NM_SETTING_WIRELESS_CHANNEL">NM_SETTING_WIRELESS_CHANNEL</a>
#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-CLONED-MAC-ADDRESS:CAPS" title="NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS">NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS</a>
+#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-ERROR:CAPS" title="NM_SETTING_WIRELESS_ERROR">NM_SETTING_WIRELESS_ERROR</a>
#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-MAC-ADDRESS:CAPS" title="NM_SETTING_WIRELESS_MAC_ADDRESS">NM_SETTING_WIRELESS_MAC_ADDRESS</a>
#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-MAC-ADDRESS-BLACKLIST:CAPS" title="NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST">NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST</a>
#define <a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-MODE:CAPS" title="NM_SETTING_WIRELESS_MODE">NM_SETTING_WIRELESS_MODE</a>
@@ -159,11 +160,11 @@ necessary for connection to 802.11 WiFi networks.
<div class="refsect2">
<a name="NMSettingWirelessError-enum"></a><h3>enum NMSettingWirelessError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_WIRELESS_ERROR_UNKNOWN = 0,
- NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY,
- NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING,
- NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND
+ NM_SETTING_WIRELESS_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING, /*&lt; nick=MissingSecuritySetting &gt;*/
+ NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND /*&lt; nick=ChannelRequiresBand &gt;*/
} NMSettingWirelessError;
</pre>
<div class="variablelist"><table border="0">
@@ -234,6 +235,14 @@ set to a value that requires the <a class="link" href="NMSettingWireless.html#NM
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-WIRELESS-ERROR:CAPS"></a><h3>NM_SETTING_WIRELESS_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_WIRELESS_ERROR nm_setting_wireless_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-WIRELESS-MAC-ADDRESS:CAPS"></a><h3>NM_SETTING_WIRELESS_MAC_ADDRESS</h3>
<pre class="programlisting">#define NM_SETTING_WIRELESS_MAC_ADDRESS "mac-address"
</pre>
diff --git a/docs/libnm-util/html/NMSettingWirelessSecurity.html b/docs/libnm-util/html/NMSettingWirelessSecurity.html
index c9b8d399b..b9022091a 100644
--- a/docs/libnm-util/html/NMSettingWirelessSecurity.html
+++ b/docs/libnm-util/html/NMSettingWirelessSecurity.html
@@ -42,14 +42,15 @@ use WEP, LEAP, WPA or WPA2/RSN security</p>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="NMSettingWirelessSecurity.synopsis"></a><h2>Synopsis</h2>
-<a name="NMSettingWirelessSecurityError"></a><pre class="synopsis">
+<a name="NMSettingWirelessSecurityError"></a><a name="NMWepKeyType"></a><pre class="synopsis">
#include &lt;nm-setting-wireless-security.h&gt;
<a class="link" href="NMSettingWirelessSecurity.html#NMSettingWirelessSecurity-struct" title="NMSettingWirelessSecurity">NMSettingWirelessSecurity</a>;
<a class="link" href="NMSettingWirelessSecurity.html#NMSettingWirelessSecurityClass" title="NMSettingWirelessSecurityClass">NMSettingWirelessSecurityClass</a>;
enum <a class="link" href="NMSettingWirelessSecurity.html#NMSettingWirelessSecurityError-enum" title="enum NMSettingWirelessSecurityError">NMSettingWirelessSecurityError</a>;
-enum <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType">NMWepKeyType</a>;
+enum <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType-enum" title="enum NMWepKeyType">NMWepKeyType</a>;
#define <a class="link" href="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-AUTH-ALG:CAPS" title="NM_SETTING_WIRELESS_SECURITY_AUTH_ALG">NM_SETTING_WIRELESS_SECURITY_AUTH_ALG</a>
+#define <a class="link" href="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR:CAPS" title="NM_SETTING_WIRELESS_SECURITY_ERROR">NM_SETTING_WIRELESS_SECURITY_ERROR</a>
#define <a class="link" href="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-GROUP:CAPS" title="NM_SETTING_WIRELESS_SECURITY_GROUP">NM_SETTING_WIRELESS_SECURITY_GROUP</a>
#define <a class="link" href="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-KEY-MGMT:CAPS" title="NM_SETTING_WIRELESS_SECURITY_KEY_MGMT">NM_SETTING_WIRELESS_SECURITY_KEY_MGMT</a>
#define <a class="link" href="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-LEAP-PASSWORD:CAPS" title="NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD">NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD</a>
@@ -93,7 +94,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-leap-password" title="nm_setting_wireless_security_get_leap_password ()">nm_setting_wireless_security_get_leap_password</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-leap-password-flags" title="nm_setting_wireless_security_get_leap_password_flags ()">nm_setting_wireless_security_get_leap_password_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-leap-password-flags" title="nm_setting_wireless_security_get_leap_password_flags ()">nm_setting_wireless_security_get_leap_password_flags</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-leap-username" title="nm_setting_wireless_security_get_leap_username ()">nm_setting_wireless_security_get_leap_username</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
@@ -111,14 +112,14 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> i</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-psk" title="nm_setting_wireless_security_get_psk ()">nm_setting_wireless_security_get_psk</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-psk-flags" title="nm_setting_wireless_security_get_psk_flags ()">nm_setting_wireless_security_get_psk_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-psk-flags" title="nm_setting_wireless_security_get_psk_flags ()">nm_setting_wireless_security_get_psk_flags</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-wep-key" title="nm_setting_wireless_security_get_wep_key ()">nm_setting_wireless_security_get_wep_key</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> idx</code></em>);
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-wep-key-flags" title="nm_setting_wireless_security_get_wep_key_flags ()">nm_setting_wireless_security_get_wep_key_flags</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-wep-key-flags" title="nm_setting_wireless_security_get_wep_key_flags ()">nm_setting_wireless_security_get_wep_key_flags</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
-<a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="returnvalue">NMWepKeyType</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-wep-key-type" title="nm_setting_wireless_security_get_wep_key_type ()">nm_setting_wireless_security_get_wep_key_type</a>
+<a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="returnvalue">NMWepKeyType</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-wep-key-type" title="nm_setting_wireless_security_get_wep_key_type ()">nm_setting_wireless_security_get_wep_key_type</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-get-wep-tx-keyidx" title="nm_setting_wireless_security_get_wep_tx_keyidx ()">nm_setting_wireless_security_get_wep_tx_keyidx</a>
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);
@@ -149,6 +150,10 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMSet
GEnum
+----NMSettingWirelessSecurityError
</pre>
+<pre class="synopsis">
+ GEnum
+ +----NMWepKeyType
+</pre>
</div>
<div class="refsect1">
<a name="NMSettingWirelessSecurity.properties"></a><h2>Properties</h2>
@@ -223,13 +228,13 @@ of how WiFi security works, you may want to get copies of the following books.
<div class="refsect2">
<a name="NMSettingWirelessSecurityError-enum"></a><h3>enum NMSettingWirelessSecurityError</h3>
<pre class="programlisting">typedef enum {
- NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN = 0,
- NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY,
- NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING,
- NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X,
- NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME,
- NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP
+ NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN = 0, /*&lt; nick=UnknownError &gt;*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, /*&lt; nick=InvalidProperty &gt;*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY, /*&lt; nick=MissingProperty &gt;*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING, /*&lt; nick=Missing8021xSetting &gt;*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X, /*&lt; nick=LEAPRequires8021x &gt;*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME, /*&lt; nick=LEAPRequiresUsername &gt;*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP /*&lt; nick=SharedKeyRequiresWEP &gt;*/
} NMSettingWirelessSecurityError;
</pre>
<div class="variablelist"><table border="0">
@@ -281,7 +286,7 @@ encryption protocol
</div>
<hr>
<div class="refsect2">
-<a name="NMWepKeyType"></a><h3>enum NMWepKeyType</h3>
+<a name="NMWepKeyType-enum"></a><h3>enum NMWepKeyType</h3>
<pre class="programlisting">typedef enum {
NM_WEP_KEY_TYPE_UNKNOWN = 0,
NM_WEP_KEY_TYPE_KEY = 1, /* Hex or ASCII */
@@ -291,7 +296,7 @@ encryption protocol
} NMWepKeyType;
</pre>
<p>
-The <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="type">NMWepKeyType</span></a> values specify how any WEP keys present in the setting
+The <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> values specify how any WEP keys present in the setting
are intepreted. There are no standards governing how to hash the various WEP
key/passphrase formats into the actual WEP key. Unfortunately some WEP keys
can be interpreted in multiple ways, requring the setting to specify how to
@@ -343,6 +348,14 @@ the actual WEP key using the MD5 hash algorithm.
</div>
<hr>
<div class="refsect2">
+<a name="NM-SETTING-WIRELESS-SECURITY-ERROR:CAPS"></a><h3>NM_SETTING_WIRELESS_SECURITY_ERROR</h3>
+<pre class="programlisting">#define NM_SETTING_WIRELESS_SECURITY_ERROR nm_setting_wireless_security_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="NM-SETTING-WIRELESS-SECURITY-GROUP:CAPS"></a><h3>NM_SETTING_WIRELESS_SECURITY_GROUP</h3>
<pre class="programlisting">#define NM_SETTING_WIRELESS_SECURITY_GROUP "group"
</pre>
@@ -735,7 +748,7 @@ list.
<hr>
<div class="refsect2">
<a name="nm-setting-wireless-security-get-leap-password-flags"></a><h3>nm_setting_wireless_security_get_leap_password_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_wireless_security_get_leap_password_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_wireless_security_get_leap_password_flags
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -747,7 +760,7 @@ list.
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
<a class="link" href="NMSettingWirelessSecurity.html#NMSettingWirelessSecurity--leap-password" title='The "leap-password" property'><span class="type">"leap-password"</span></a>
</td>
</tr>
@@ -914,7 +927,7 @@ list.
<hr>
<div class="refsect2">
<a name="nm-setting-wireless-security-get-psk-flags"></a><h3>nm_setting_wireless_security_get_psk_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_wireless_security_get_psk_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_wireless_security_get_psk_flags
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -926,7 +939,7 @@ list.
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the
<a class="link" href="NMSettingWirelessSecurity.html#NMSettingWirelessSecurity--psk" title='The "psk" property'><span class="type">"psk"</span></a>
</td>
</tr>
@@ -961,7 +974,7 @@ list.
<hr>
<div class="refsect2">
<a name="nm-setting-wireless-security-get-wep-key-flags"></a><h3>nm_setting_wireless_security_get_wep_key_flags ()</h3>
-<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_wireless_security_get_wep_key_flags
+<pre class="programlisting"><a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="returnvalue">NMSettingSecretFlags</span></a> nm_setting_wireless_security_get_wep_key_flags
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -973,7 +986,7 @@ list.
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the all WEP keys</td>
+<td>the <a class="link" href="NMSetting.html#NMSettingSecretFlags"><span class="type">NMSettingSecretFlags</span></a> pertaining to the all WEP keys</td>
</tr>
</tbody>
</table></div>
@@ -981,7 +994,7 @@ list.
<hr>
<div class="refsect2">
<a name="nm-setting-wireless-security-get-wep-key-type"></a><h3>nm_setting_wireless_security_get_wep_key_type ()</h3>
-<pre class="programlisting"><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="returnvalue">NMWepKeyType</span></a> nm_setting_wireless_security_get_wep_key_type
+<pre class="programlisting"><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="returnvalue">NMWepKeyType</span></a> nm_setting_wireless_security_get_wep_key_type
(<em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> *setting</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -1266,7 +1279,7 @@ Flags indicating how to handle <a class="link" href="NMSettingWirelessSecurity.h
<pre class="programlisting"> "wep-key-type" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct</pre>
<p>
Controls the interpretation of WEP keys. Allowed values are those given
-by <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><code class="literal">NMWepKeyType</code></a>. If set to 1 and the keys are hexadecimal, they must be
+by <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><code class="literal">NMWepKeyType</code></a>. If set to 1 and the keys are hexadecimal, they must be
either 10 or 26 characters in length. If set to 1 and the keys are
ASCII keys, they must be either 5 or 13 characters in length. If set to
2, the passphrase is hashed using the de-facto MD5 method to derive the
diff --git a/docs/libnm-util/html/api-index-full.html b/docs/libnm-util/html/api-index-full.html
index 728129f1c..9f287353e 100644
--- a/docs/libnm-util/html/api-index-full.html
+++ b/docs/libnm-util/html/api-index-full.html
@@ -95,6 +95,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMConnection.html#NM-CONNECTION-ERROR:CAPS" title="NM_CONNECTION_ERROR">NM_CONNECTION_ERROR</a>, macro in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMConnection.html#nm-connection-error-quark" title="nm_connection_error_quark ()">nm_connection_error_quark</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
</dt>
<dd></dd>
@@ -123,6 +127,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMConnection.html#nm-connection-get-setting-bond" title="nm_connection_get_setting_bond ()">nm_connection_get_setting_bond</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMConnection.html#nm-connection-get-setting-by-name" title="nm_connection_get_setting_by_name ()">nm_connection_get_setting_by_name</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
</dt>
<dd></dd>
@@ -139,6 +147,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMConnection.html#nm-connection-get-setting-infiniband" title="nm_connection_get_setting_infiniband ()">nm_connection_get_setting_infiniband</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMConnection.html#nm-connection-get-setting-ip4-config" title="nm_connection_get_setting_ip4_config ()">nm_connection_get_setting_ip4_config</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
</dt>
<dd></dd>
@@ -159,6 +171,14 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMConnection.html#nm-connection-get-setting-serial" title="nm_connection_get_setting_serial ()">nm_connection_get_setting_serial</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMConnection.html#nm-connection-get-setting-vlan" title="nm_connection_get_setting_vlan ()">nm_connection_get_setting_vlan</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMConnection.html#nm-connection-get-setting-vpn" title="nm_connection_get_setting_vpn ()">nm_connection_get_setting_vpn</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
</dt>
<dd></dd>
@@ -183,6 +203,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMConnection.html#nm-connection-get-virtual-iface-name" title="nm_connection_get_virtual_iface_name ()">nm_connection_get_virtual_iface_name</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMConnection.html#nm-connection-is-type" title="nm_connection_is_type ()">nm_connection_is_type</a>, function in <a class="link" href="NMConnection.html" title="NMConnection">NMConnection</a>
</dt>
<dd></dd>
@@ -481,6 +505,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--pac-file" title='The "pac-file" property'>NMSetting8021x:pac-file</a>, object property in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#NMSetting8021x--password" title='The "password" property'>NMSetting8021x:password</a>, object property in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -489,6 +517,14 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw" title='The "password-raw" property'>NMSetting8021x:password-raw</a>, object property in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSetting8021x.html#NMSetting8021x--password-raw-flags" title='The "password-raw-flags" property'>NMSetting8021x:password-raw-flags</a>, object property in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#NMSetting8021x--phase1-fast-provisioning" title='The "phase1-fast-provisioning" property'>NMSetting8021x:phase1-fast-provisioning</a>, object property in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -561,11 +597,11 @@
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat" title="enum NMSetting8021xCKFormat">NMSetting8021xCKFormat</a>, enum in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat-enum" title="enum NMSetting8021xCKFormat">NMSetting8021xCKFormat</a>, enum in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme" title="enum NMSetting8021xCKScheme">NMSetting8021xCKScheme</a>, enum in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+<a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme-enum" title="enum NMSetting8021xCKScheme">NMSetting8021xCKScheme</a>, enum in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
<dt>
@@ -601,6 +637,26 @@
</dt>
<dd></dd>
<dt>
+NMSettingBond, struct in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NMSettingBond:interface-name, object property in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NMSettingBond:options, object property in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NMSettingBondClass, struct in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NMSettingBondError, enum in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingCdma.html#NMSettingCdma-struct" title="NMSettingCdma">NMSettingCdma</a>, struct in <a class="link" href="NMSettingCdma.html" title="NMSettingCdma">NMSettingCdma</a>
</dt>
<dd></dd>
@@ -637,7 +693,7 @@
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSetting.html#NMSettingCompareFlags" title="enum NMSettingCompareFlags">NMSettingCompareFlags</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+<a class="link" href="NMSetting.html#NMSettingCompareFlags-enum" title="enum NMSettingCompareFlags">NMSettingCompareFlags</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
</dt>
<dd></dd>
<dt>
@@ -653,6 +709,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#NMSettingConnection--master" title='The "master" property'>NMSettingConnection:master</a>, object property in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#NMSettingConnection--permissions" title='The "permissions" property'>NMSettingConnection:permissions</a>, object property in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -661,6 +721,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#NMSettingConnection--slave-type" title='The "slave-type" property'>NMSettingConnection:slave-type</a>, object property in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#NMSettingConnection--timestamp" title='The "timestamp" property'>NMSettingConnection:timestamp</a>, object property in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -673,6 +737,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#NMSettingConnection--zone" title='The "zone" property'>NMSettingConnection:zone</a>, object property in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#NMSettingConnectionClass" title="NMSettingConnectionClass">NMSettingConnectionClass</a>, struct in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -681,7 +749,7 @@
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSetting.html#NMSettingDiffResult" title="enum NMSettingDiffResult">NMSettingDiffResult</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+<a class="link" href="NMSetting.html#NMSettingDiffResult-enum" title="enum NMSettingDiffResult">NMSettingDiffResult</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
</dt>
<dd></dd>
<dt>
@@ -745,15 +813,39 @@
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand" title="enum NMSettingGsmNetworkBand">NMSettingGsmNetworkBand</a>, enum in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand-enum" title="enum NMSettingGsmNetworkBand">NMSettingGsmNetworkBand</a>, enum in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType-enum" title="enum NMSettingGsmNetworkType">NMSettingGsmNetworkType</a>, enum in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSetting.html#NMSettingHashFlags-enum" title="enum NMSettingHashFlags">NMSettingHashFlags</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+</dt>
+<dd></dd>
+<dt>
+NMSettingInfiniband, struct in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NMSettingInfiniband:mac-address, object property in NMSettingInfiniband
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType" title="enum NMSettingGsmNetworkType">NMSettingGsmNetworkType</a>, enum in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+NMSettingInfiniband:mtu, object property in NMSettingInfiniband
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSetting.html#NMSettingHashFlags" title="enum NMSettingHashFlags">NMSettingHashFlags</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+NMSettingInfiniband:transport-mode, object property in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NMSettingInfinibandClass, struct in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NMSettingInfinibandError, enum in NMSettingInfiniband
</dt>
<dd></dd>
<dt>
@@ -841,6 +933,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--ip6-privacy" title='The "ip6-privacy" property'>NMSettingIP6Config:ip6-privacy</a>, object property in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingIP6Config.html#NMSettingIP6Config--may-fail" title='The "may-fail" property'>NMSettingIP6Config:may-fail</a>, object property in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
</dt>
<dd></dd>
@@ -865,6 +961,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy-enum" title="enum NMSettingIP6ConfigPrivacy">NMSettingIP6ConfigPrivacy</a>, enum in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingOlpcMesh.html#NMSettingOlpcMesh-struct" title="NMSettingOlpcMesh">NMSettingOlpcMesh</a>, struct in <a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh">NMSettingOlpcMesh</a>
</dt>
<dd></dd>
@@ -1001,7 +1101,7 @@
</dt>
<dd></dd>
<dt>
-<a class="link" href="NMSetting.html#NMSettingSecretFlags" title="enum NMSettingSecretFlags">NMSettingSecretFlags</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+<a class="link" href="NMSetting.html#NMSettingSecretFlags-enum" title="enum NMSettingSecretFlags">NMSettingSecretFlags</a>, enum in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
</dt>
<dd></dd>
<dt>
@@ -1041,6 +1141,42 @@
</dt>
<dd></dd>
<dt>
+NMSettingVlan, struct in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlan:egress-priority-map, object property in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlan:flags, object property in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlan:id, object property in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlan:ingress-priority-map, object property in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlan:interface-name, object property in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlan:parent, object property in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlanClass, struct in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMSettingVlanError, enum in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingVPN.html#NMSettingVPN-struct" title="NMSettingVPN">NMSettingVPN</a>, struct in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
</dt>
<dd></dd>
@@ -1337,6 +1473,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-ERROR:CAPS" title="NM_SETTING_802_1X_ERROR">NM_SETTING_802_1X_ERROR</a>, macro in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#nm-setting-802-1x-error-quark" title="nm_setting_802_1x_error_quark ()">nm_setting_802_1x_error_quark</a>, function in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -1397,6 +1537,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-pac-file" title="nm_setting_802_1x_get_pac_file ()">nm_setting_802_1x_get_pac_file</a>, function in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password" title="nm_setting_802_1x_get_password ()">nm_setting_802_1x_get_password</a>, function in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -1405,6 +1549,14 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password-raw" title="nm_setting_802_1x_get_password_raw ()">nm_setting_802_1x_get_password_raw</a>, function in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-password-raw-flags" title="nm_setting_802_1x_get_password_raw_flags ()">nm_setting_802_1x_get_password_raw_flags</a>, function in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#nm-setting-802-1x-get-phase1-fast-provisioning" title="nm_setting_802_1x_get_phase1_fast_provisioning ()">nm_setting_802_1x_get_phase1_fast_provisioning</a>, function in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -1533,6 +1685,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PAC-FILE:CAPS" title="NM_SETTING_802_1X_PAC_FILE">NM_SETTING_802_1X_PAC_FILE</a>, macro in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD:CAPS" title="NM_SETTING_802_1X_PASSWORD">NM_SETTING_802_1X_PASSWORD</a>, macro in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -1541,6 +1697,14 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW:CAPS" title="NM_SETTING_802_1X_PASSWORD_RAW">NM_SETTING_802_1X_PASSWORD_RAW</a>, macro in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW-FLAGS:CAPS" title="NM_SETTING_802_1X_PASSWORD_RAW_FLAGS">NM_SETTING_802_1X_PASSWORD_RAW_FLAGS</a>, macro in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-FAST-PROVISIONING:CAPS" title="NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING">NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING</a>, macro in <a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
</dt>
<dd></dd>
@@ -1665,6 +1829,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-ERROR:CAPS" title="NM_SETTING_BLUETOOTH_ERROR">NM_SETTING_BLUETOOTH_ERROR</a>, macro in <a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth">NMSettingBluetooth</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingBluetooth.html#nm-setting-bluetooth-error-quark" title="nm_setting_bluetooth_error_quark ()">nm_setting_bluetooth_error_quark</a>, function in <a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth">NMSettingBluetooth</a>
</dt>
<dd></dd>
@@ -1697,6 +1865,90 @@
</dt>
<dd></dd>
<dt>
+nm_setting_bond_add_option, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_ERROR, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_error_quark, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_get_interface_name, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_get_num_options, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_get_option, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_get_option_by_name, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_get_option_default, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_get_valid_options, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_INTERFACE_NAME, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_new, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTIONS, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTION_ARP_INTERVAL, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTION_ARP_IP_TARGET, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTION_DOWNDELAY, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTION_MIIMON, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTION_MODE, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_OPTION_UPDELAY, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+nm_setting_bond_remove_option, function in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_BOND_SETTING_NAME, macro in NMSettingBond
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingCdma.html#NM-SETTING-CDMA-ERROR:CAPS" title="NM_SETTING_CDMA_ERROR">NM_SETTING_CDMA_ERROR</a>, macro in <a class="link" href="NMSettingCdma.html" title="NMSettingCdma">NMSettingCdma</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingCdma.html#nm-setting-cdma-error-quark" title="nm_setting_cdma_error_quark ()">nm_setting_cdma_error_quark</a>, function in <a class="link" href="NMSettingCdma.html" title="NMSettingCdma">NMSettingCdma</a>
</dt>
<dd></dd>
@@ -1761,6 +2013,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR:CAPS" title="NM_SETTING_CONNECTION_ERROR">NM_SETTING_CONNECTION_ERROR</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#nm-setting-connection-error-quark" title="nm_setting_connection_error_quark ()">nm_setting_connection_error_quark</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -1777,6 +2033,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#nm-setting-connection-get-master" title="nm_setting_connection_get_master ()">nm_setting_connection_get_master</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#nm-setting-connection-get-num-permissions" title="nm_setting_connection_get_num_permissions ()">nm_setting_connection_get_num_permissions</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -1789,6 +2049,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#nm-setting-connection-get-slave-type" title="nm_setting_connection_get_slave_type ()">nm_setting_connection_get_slave_type</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#nm-setting-connection-get-timestamp" title="nm_setting_connection_get_timestamp ()">nm_setting_connection_get_timestamp</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -1797,10 +2061,22 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#nm-setting-connection-get-zone" title="nm_setting_connection_get_zone ()">nm_setting_connection_get_zone</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ID:CAPS" title="NM_SETTING_CONNECTION_ID">NM_SETTING_CONNECTION_ID</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#nm-setting-connection-is-slave-type" title="nm_setting_connection_is_slave_type ()">nm_setting_connection_is_slave_type</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-MASTER:CAPS" title="NM_SETTING_CONNECTION_MASTER">NM_SETTING_CONNECTION_MASTER</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#nm-setting-connection-new" title="nm_setting_connection_new ()">nm_setting_connection_new</a>, function in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -1825,6 +2101,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-SLAVE-TYPE:CAPS" title="NM_SETTING_CONNECTION_SLAVE_TYPE">NM_SETTING_CONNECTION_SLAVE_TYPE</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-TIMESTAMP:CAPS" title="NM_SETTING_CONNECTION_TIMESTAMP">NM_SETTING_CONNECTION_TIMESTAMP</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
</dt>
<dd></dd>
@@ -1837,6 +2117,30 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE:CAPS" title="NM_SETTING_CONNECTION_ZONE">NM_SETTING_CONNECTION_ZONE</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-BLOCK:CAPS" title="NM_SETTING_CONNECTION_ZONE_BLOCK">NM_SETTING_CONNECTION_ZONE_BLOCK</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-HOME:CAPS" title="NM_SETTING_CONNECTION_ZONE_HOME">NM_SETTING_CONNECTION_ZONE_HOME</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-PUBLIC:CAPS" title="NM_SETTING_CONNECTION_ZONE_PUBLIC">NM_SETTING_CONNECTION_ZONE_PUBLIC</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-TRUSTED:CAPS" title="NM_SETTING_CONNECTION_ZONE_TRUSTED">NM_SETTING_CONNECTION_ZONE_TRUSTED</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-WORK:CAPS" title="NM_SETTING_CONNECTION_ZONE_WORK">NM_SETTING_CONNECTION_ZONE_WORK</a>, macro in <a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting.html#nm-setting-diff" title="nm_setting_diff ()">nm_setting_diff</a>, function in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
</dt>
<dd></dd>
@@ -1849,6 +2153,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting.html#NM-SETTING-ERROR:CAPS" title="NM_SETTING_ERROR">NM_SETTING_ERROR</a>, macro in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSetting.html#nm-setting-error-quark" title="nm_setting_error_quark ()">nm_setting_error_quark</a>, function in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
</dt>
<dd></dd>
@@ -1861,6 +2169,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSetting.html#nm-setting-get-virtual-iface-name" title="nm_setting_get_virtual_iface_name ()">nm_setting_get_virtual_iface_name</a>, function in <a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-ALLOWED-BANDS:CAPS" title="NM_SETTING_GSM_ALLOWED_BANDS">NM_SETTING_GSM_ALLOWED_BANDS</a>, macro in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
</dt>
<dd></dd>
@@ -1869,6 +2181,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingGsm.html#NM-SETTING-GSM-ERROR:CAPS" title="NM_SETTING_GSM_ERROR">NM_SETTING_GSM_ERROR</a>, macro in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingGsm.html#nm-setting-gsm-error-quark" title="nm_setting_gsm_error_quark ()">nm_setting_gsm_error_quark</a>, function in <a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
</dt>
<dd></dd>
@@ -1961,6 +2277,46 @@
</dt>
<dd></dd>
<dt>
+NM_SETTING_INFINIBAND_ERROR, macro in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_setting_infiniband_error_quark, function in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_setting_infiniband_get_mac_address, function in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_setting_infiniband_get_mtu, function in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_setting_infiniband_get_transport_mode, function in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_INFINIBAND_MAC_ADDRESS, macro in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_INFINIBAND_MTU, macro in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+nm_setting_infiniband_new, function in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_INFINIBAND_SETTING_NAME, macro in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_INFINIBAND_TRANSPORT_MODE, macro in NMSettingInfiniband
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-ADDRESSES:CAPS" title="NM_SETTING_IP4_CONFIG_ADDRESSES">NM_SETTING_IP4_CONFIG_ADDRESSES</a>, macro in <a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config">NMSettingIP4Config</a>
</dt>
<dd></dd>
@@ -2017,6 +2373,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-ERROR:CAPS" title="NM_SETTING_IP4_CONFIG_ERROR">NM_SETTING_IP4_CONFIG_ERROR</a>, macro in <a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config">NMSettingIP4Config</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingIP4Config.html#nm-setting-ip4-config-error-quark" title="nm_setting_ip4_config_error_quark ()">nm_setting_ip4_config_error_quark</a>, function in <a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config">NMSettingIP4Config</a>
</dt>
<dd></dd>
@@ -2197,6 +2557,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR:CAPS" title="NM_SETTING_IP6_CONFIG_ERROR">NM_SETTING_IP6_CONFIG_ERROR</a>, macro in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-error-quark" title="nm_setting_ip6_config_error_quark ()">nm_setting_ip6_config_error_quark</a>, function in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
</dt>
<dd></dd>
@@ -2221,6 +2585,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-ip6-privacy" title="nm_setting_ip6_config_get_ip6_privacy ()">nm_setting_ip6_config_get_ip6_privacy</a>, function in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingIP6Config.html#nm-setting-ip6-config-get-may-fail" title="nm_setting_ip6_config_get_may_fail ()">nm_setting_ip6_config_get_may_fail</a>, function in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
</dt>
<dd></dd>
@@ -2261,6 +2629,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IP6-PRIVACY:CAPS" title="NM_SETTING_IP6_CONFIG_IP6_PRIVACY">NM_SETTING_IP6_CONFIG_IP6_PRIVACY</a>, macro in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-MAY-FAIL:CAPS" title="NM_SETTING_IP6_CONFIG_MAY_FAIL">NM_SETTING_IP6_CONFIG_MAY_FAIL</a>, macro in <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
</dt>
<dd></dd>
@@ -2345,6 +2717,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-ERROR:CAPS" title="NM_SETTING_OLPC_MESH_ERROR">NM_SETTING_OLPC_MESH_ERROR</a>, macro in <a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh">NMSettingOlpcMesh</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingOlpcMesh.html#nm-setting-olpc-mesh-error-quark" title="nm_setting_olpc_mesh_error_quark ()">nm_setting_olpc_mesh_error_quark</a>, function in <a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh">NMSettingOlpcMesh</a>
</dt>
<dd></dd>
@@ -2389,6 +2765,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR:CAPS" title="NM_SETTING_PPPOE_ERROR">NM_SETTING_PPPOE_ERROR</a>, macro in <a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE">NMSettingPPPOE</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingPPPOE.html#nm-setting-pppoe-error-quark" title="nm_setting_pppoe_error_quark ()">nm_setting_pppoe_error_quark</a>, function in <a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE">NMSettingPPPOE</a>
</dt>
<dd></dd>
@@ -2441,6 +2821,10 @@
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingPPP.html#NM-SETTING-PPP-ERROR:CAPS" title="NM_SETTING_PPP_ERROR">NM_SETTING_PPP_ERROR</a>, macro in <a class="link" href="NMSettingPPP.html" title="NMSettingPPP">NMSettingPPP</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingPPP.html#nm-setting-ppp-error-quark" title="nm_setting_ppp_error_quark ()">nm_setting_ppp_error_quark</a>, function in <a class="link" href="NMSettingPPP.html" title="NMSettingPPP">NMSettingPPP</a>
</dt>
<dd></dd>
@@ -2601,6 +2985,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingSerial.html#NM-SETTING-SERIAL-ERROR:CAPS" title="NM_SETTING_SERIAL_ERROR">NM_SETTING_SERIAL_ERROR</a>, macro in <a class="link" href="NMSettingSerial.html" title="NMSettingSerial">NMSettingSerial</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingSerial.html#nm-setting-serial-error-quark" title="nm_setting_serial_error_quark ()">nm_setting_serial_error_quark</a>, function in <a class="link" href="NMSettingSerial.html" title="NMSettingSerial">NMSettingSerial</a>
</dt>
<dd></dd>
@@ -2665,6 +3053,86 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+nm_setting_vlan_add_priority, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_add_priority_str, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_clear_priorities, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_EGRESS_PRIORITY_MAP, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_ERROR, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_error_quark, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_FLAGS, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_get_flags, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_get_id, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_get_interface_name, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_get_num_priorities, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_get_parent, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_get_priority, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_ID, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_INGRESS_PRIORITY_MAP, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_INTERFACE_NAME, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_new, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_PARENT, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+nm_setting_vlan_remove_priority, function in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NM_SETTING_VLAN_SETTING_NAME, macro in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingVPN.html#nm-setting-vpn-add-data-item" title="nm_setting_vpn_add_data_item ()">nm_setting_vpn_add_data_item</a>, function in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
</dt>
<dd></dd>
@@ -2677,6 +3145,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingVPN.html#NM-SETTING-VPN-ERROR:CAPS" title="NM_SETTING_VPN_ERROR">NM_SETTING_VPN_ERROR</a>, macro in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingVPN.html#nm-setting-vpn-error-quark" title="nm_setting_vpn_error_quark ()">nm_setting_vpn_error_quark</a>, function in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
</dt>
<dd></dd>
@@ -2693,6 +3165,14 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-num-data-items" title="nm_setting_vpn_get_num_data_items ()">nm_setting_vpn_get_num_data_items</a>, function in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-num-secrets" title="nm_setting_vpn_get_num_secrets ()">nm_setting_vpn_get_num_secrets</a>, function in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingVPN.html#nm-setting-vpn-get-secret" title="nm_setting_vpn_get_secret ()">nm_setting_vpn_get_secret</a>, function in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
</dt>
<dd></dd>
@@ -2733,6 +3213,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingWimax.html#NM-SETTING-WIMAX-ERROR:CAPS" title="NM_SETTING_WIMAX_ERROR">NM_SETTING_WIMAX_ERROR</a>, macro in <a class="link" href="NMSettingWimax.html" title="NMSettingWimax">NMSettingWimax</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingWimax.html#nm-setting-wimax-error-quark" title="nm_setting_wimax_error_quark ()">nm_setting_wimax_error_quark</a>, function in <a class="link" href="NMSettingWimax.html" title="NMSettingWimax">NMSettingWimax</a>
</dt>
<dd></dd>
@@ -2777,6 +3261,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingWired.html#NM-SETTING-WIRED-ERROR:CAPS" title="NM_SETTING_WIRED_ERROR">NM_SETTING_WIRED_ERROR</a>, macro in <a class="link" href="NMSettingWired.html" title="NMSettingWired">NMSettingWired</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingWired.html#nm-setting-wired-error-quark" title="nm_setting_wired_error_quark ()">nm_setting_wired_error_quark</a>, function in <a class="link" href="NMSettingWired.html" title="NMSettingWired">NMSettingWired</a>
</dt>
<dd></dd>
@@ -2901,6 +3389,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingWireless.html#NM-SETTING-WIRELESS-ERROR:CAPS" title="NM_SETTING_WIRELESS_ERROR">NM_SETTING_WIRELESS_ERROR</a>, macro in <a class="link" href="NMSettingWireless.html" title="NMSettingWireless">NMSettingWireless</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingWireless.html#nm-setting-wireless-error-quark" title="nm_setting_wireless_error_quark ()">nm_setting_wireless_error_quark</a>, function in <a class="link" href="NMSettingWireless.html" title="NMSettingWireless">NMSettingWireless</a>
</dt>
<dd></dd>
@@ -3025,6 +3517,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR:CAPS" title="NM_SETTING_WIRELESS_SECURITY_ERROR">NM_SETTING_WIRELESS_SECURITY_ERROR</a>, macro in <a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity">NMSettingWirelessSecurity</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingWirelessSecurity.html#nm-setting-wireless-security-error-quark" title="nm_setting_wireless_security_error_quark ()">nm_setting_wireless_security_error_quark</a>, function in <a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity">NMSettingWirelessSecurity</a>
</dt>
<dd></dd>
@@ -3202,7 +3698,7 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
<dd></dd>
<a name="idxU"></a><h3 class="title">U</h3>
<dt>
-<a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a>, enum in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+<a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType-enum" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a>, enum in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
</dt>
<dd></dd>
<dt>
@@ -3218,6 +3714,30 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
</dt>
<dd></dd>
<dt>
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-atoba" title="nm_utils_hwaddr_atoba ()">nm_utils_hwaddr_atoba</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()">nm_utils_hwaddr_aton</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()">nm_utils_hwaddr_len</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libnm-util-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX">NM_UTILS_HWADDR_LEN_MAX</a>, macro in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-ntoa" title="nm_utils_hwaddr_ntoa ()">nm_utils_hwaddr_ntoa</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-type" title="nm_utils_hwaddr_type ()">nm_utils_hwaddr_type</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="libnm-util-nm-utils.html#nm-utils-init" title="nm_utils_init ()">nm_utils_init</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a>
</dt>
<dd></dd>
@@ -3323,12 +3843,20 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private
<dd></dd>
<a name="idxV"></a><h3 class="title">V</h3>
<dt>
+NMVlanFlags, enum in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
+NMVlanPriorityMap, enum in NMSettingVlan
+</dt>
+<dd></dd>
+<dt>
<a class="link" href="NMSettingVPN.html#NMVPNIterFunc" title="NMVPNIterFunc ()">NMVPNIterFunc</a>, user_function in <a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
</dt>
<dd></dd>
<a name="idxW"></a><h3 class="title">W</h3>
<dt>
-<a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType">NMWepKeyType</a>, enum in <a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity">NMSettingWirelessSecurity</a>
+<a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType-enum" title="enum NMWepKeyType">NMWepKeyType</a>, enum in <a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity">NMSettingWirelessSecurity</a>
</dt>
<dd></dd>
</div>
diff --git a/docs/libnm-util/html/ch01.html b/docs/libnm-util/html/ch01.html
index f16de7b00..c23e7223e 100644
--- a/docs/libnm-util/html/ch01.html
+++ b/docs/libnm-util/html/ch01.html
@@ -21,7 +21,7 @@
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
-<a name="id359365"></a>libnm-util API Reference</h2></div></div></div>
+<a name="id500813"></a>libnm-util API Reference</h2></div></div></div>
<div class="toc"><dl>
<dt>
<span class="refentrytitle"><a href="NMConnection.html">NMConnection</a></span><span class="refpurpose"> — Describes a connection to specific network or provider</span>
diff --git a/docs/libnm-util/html/index.sgml b/docs/libnm-util/html/index.sgml
index d8ff5d801..18260e919 100644
--- a/docs/libnm-util/html/index.sgml
+++ b/docs/libnm-util/html/index.sgml
@@ -14,6 +14,7 @@
<ANCHOR id="NM-CONNECTION-ERROR-CONNECTION-SETTING-NOT-FOUND:CAPS" href="libnm-util/NMConnection.html#NM-CONNECTION-ERROR-CONNECTION-SETTING-NOT-FOUND:CAPS">
<ANCHOR id="NM-CONNECTION-ERROR-CONNECTION-TYPE-INVALID:CAPS" href="libnm-util/NMConnection.html#NM-CONNECTION-ERROR-CONNECTION-TYPE-INVALID:CAPS">
<ANCHOR id="NM-CONNECTION-ERROR-SETTING-NOT-FOUND:CAPS" href="libnm-util/NMConnection.html#NM-CONNECTION-ERROR-SETTING-NOT-FOUND:CAPS">
+<ANCHOR id="NM-CONNECTION-ERROR:CAPS" href="libnm-util/NMConnection.html#NM-CONNECTION-ERROR:CAPS">
<ANCHOR id="NM-CONNECTION-PATH:CAPS" href="libnm-util/NMConnection.html#NM-CONNECTION-PATH:CAPS">
<ANCHOR id="nm-connection-add-setting" href="libnm-util/NMConnection.html#nm-connection-add-setting">
<ANCHOR id="nm-connection-clear-secrets" href="libnm-util/NMConnection.html#nm-connection-clear-secrets">
@@ -30,21 +31,26 @@
<ANCHOR id="nm-connection-get-setting" href="libnm-util/NMConnection.html#nm-connection-get-setting">
<ANCHOR id="nm-connection-get-setting-802-1x" href="libnm-util/NMConnection.html#nm-connection-get-setting-802-1x">
<ANCHOR id="nm-connection-get-setting-bluetooth" href="libnm-util/NMConnection.html#nm-connection-get-setting-bluetooth">
+<ANCHOR id="nm-connection-get-setting-bond" href="libnm-util/NMConnection.html#nm-connection-get-setting-bond">
<ANCHOR id="nm-connection-get-setting-by-name" href="libnm-util/NMConnection.html#nm-connection-get-setting-by-name">
<ANCHOR id="nm-connection-get-setting-cdma" href="libnm-util/NMConnection.html#nm-connection-get-setting-cdma">
<ANCHOR id="nm-connection-get-setting-connection" href="libnm-util/NMConnection.html#nm-connection-get-setting-connection">
<ANCHOR id="nm-connection-get-setting-gsm" href="libnm-util/NMConnection.html#nm-connection-get-setting-gsm">
+<ANCHOR id="nm-connection-get-setting-infiniband" href="libnm-util/NMConnection.html#nm-connection-get-setting-infiniband">
<ANCHOR id="nm-connection-get-setting-ip4-config" href="libnm-util/NMConnection.html#nm-connection-get-setting-ip4-config">
<ANCHOR id="nm-connection-get-setting-ip6-config" href="libnm-util/NMConnection.html#nm-connection-get-setting-ip6-config">
<ANCHOR id="nm-connection-get-setting-olpc-mesh" href="libnm-util/NMConnection.html#nm-connection-get-setting-olpc-mesh">
<ANCHOR id="nm-connection-get-setting-ppp" href="libnm-util/NMConnection.html#nm-connection-get-setting-ppp">
<ANCHOR id="nm-connection-get-setting-pppoe" href="libnm-util/NMConnection.html#nm-connection-get-setting-pppoe">
+<ANCHOR id="nm-connection-get-setting-serial" href="libnm-util/NMConnection.html#nm-connection-get-setting-serial">
+<ANCHOR id="nm-connection-get-setting-vlan" href="libnm-util/NMConnection.html#nm-connection-get-setting-vlan">
<ANCHOR id="nm-connection-get-setting-vpn" href="libnm-util/NMConnection.html#nm-connection-get-setting-vpn">
<ANCHOR id="nm-connection-get-setting-wimax" href="libnm-util/NMConnection.html#nm-connection-get-setting-wimax">
<ANCHOR id="nm-connection-get-setting-wired" href="libnm-util/NMConnection.html#nm-connection-get-setting-wired">
<ANCHOR id="nm-connection-get-setting-wireless" href="libnm-util/NMConnection.html#nm-connection-get-setting-wireless">
<ANCHOR id="nm-connection-get-setting-wireless-security" href="libnm-util/NMConnection.html#nm-connection-get-setting-wireless-security">
<ANCHOR id="nm-connection-get-uuid" href="libnm-util/NMConnection.html#nm-connection-get-uuid">
+<ANCHOR id="nm-connection-get-virtual-iface-name" href="libnm-util/NMConnection.html#nm-connection-get-virtual-iface-name">
<ANCHOR id="nm-connection-is-type" href="libnm-util/NMConnection.html#nm-connection-is-type">
<ANCHOR id="nm-connection-lookup-setting-type" href="libnm-util/NMConnection.html#nm-connection-lookup-setting-type">
<ANCHOR id="nm-connection-lookup-setting-type-by-quark" href="libnm-util/NMConnection.html#nm-connection-lookup-setting-type-by-quark">
@@ -64,7 +70,11 @@
<ANCHOR id="NMConnection-secrets-updated" href="libnm-util/NMConnection.html#NMConnection-secrets-updated">
<ANCHOR id="NMSetting" href="libnm-util/NMSetting.html">
<ANCHOR id="NMSetting.synopsis" href="libnm-util/NMSetting.html#NMSetting.synopsis">
+<ANCHOR id="NMSettingCompareFlags" href="libnm-util/NMSetting.html#NMSettingCompareFlags">
+<ANCHOR id="NMSettingDiffResult" href="libnm-util/NMSetting.html#NMSettingDiffResult">
<ANCHOR id="NMSettingError" href="libnm-util/NMSetting.html#NMSettingError">
+<ANCHOR id="NMSettingHashFlags" href="libnm-util/NMSetting.html#NMSettingHashFlags">
+<ANCHOR id="NMSettingSecretFlags" href="libnm-util/NMSetting.html#NMSettingSecretFlags">
<ANCHOR id="NMSetting.object-hierarchy" href="libnm-util/NMSetting.html#NMSetting.object-hierarchy">
<ANCHOR id="NMSetting.properties" href="libnm-util/NMSetting.html#NMSetting.properties">
<ANCHOR id="NMSetting.description" href="libnm-util/NMSetting.html#NMSetting.description">
@@ -72,14 +82,14 @@
<ANCHOR id="NMSetting-struct" href="libnm-util/NMSetting.html#NMSetting-struct">
<ANCHOR id="NMSettingClass" href="libnm-util/NMSetting.html#NMSettingClass">
<ANCHOR id="NMSettingClearSecretsWithFlagsFn" href="libnm-util/NMSetting.html#NMSettingClearSecretsWithFlagsFn">
-<ANCHOR id="NMSettingCompareFlags" href="libnm-util/NMSetting.html#NMSettingCompareFlags">
+<ANCHOR id="NMSettingCompareFlags-enum" href="libnm-util/NMSetting.html#NMSettingCompareFlags-enum">
<ANCHOR id="NM-SETTING-COMPARE-FLAG-EXACT:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-COMPARE-FLAG-EXACT:CAPS">
<ANCHOR id="NM-SETTING-COMPARE-FLAG-FUZZY:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-COMPARE-FLAG-FUZZY:CAPS">
<ANCHOR id="NM-SETTING-COMPARE-FLAG-IGNORE-ID:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-COMPARE-FLAG-IGNORE-ID:CAPS">
<ANCHOR id="NM-SETTING-COMPARE-FLAG-IGNORE-SECRETS:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-COMPARE-FLAG-IGNORE-SECRETS:CAPS">
<ANCHOR id="NM-SETTING-COMPARE-FLAG-IGNORE-AGENT-OWNED-SECRETS:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-COMPARE-FLAG-IGNORE-AGENT-OWNED-SECRETS:CAPS">
<ANCHOR id="NM-SETTING-COMPARE-FLAG-IGNORE-NOT-SAVED-SECRETS:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-COMPARE-FLAG-IGNORE-NOT-SAVED-SECRETS:CAPS">
-<ANCHOR id="NMSettingDiffResult" href="libnm-util/NMSetting.html#NMSettingDiffResult">
+<ANCHOR id="NMSettingDiffResult-enum" href="libnm-util/NMSetting.html#NMSettingDiffResult-enum">
<ANCHOR id="NM-SETTING-DIFF-RESULT-UNKNOWN:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-DIFF-RESULT-UNKNOWN:CAPS">
<ANCHOR id="NM-SETTING-DIFF-RESULT-IN-A:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-DIFF-RESULT-IN-A:CAPS">
<ANCHOR id="NM-SETTING-DIFF-RESULT-IN-B:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-DIFF-RESULT-IN-B:CAPS">
@@ -88,16 +98,17 @@
<ANCHOR id="NM-SETTING-ERROR-PROPERTY-NOT-FOUND:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-ERROR-PROPERTY-NOT-FOUND:CAPS">
<ANCHOR id="NM-SETTING-ERROR-PROPERTY-NOT-SECRET:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-ERROR-PROPERTY-NOT-SECRET:CAPS">
<ANCHOR id="NM-SETTING-ERROR-PROPERTY-TYPE-MISMATCH:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-ERROR-PROPERTY-TYPE-MISMATCH:CAPS">
-<ANCHOR id="NMSettingHashFlags" href="libnm-util/NMSetting.html#NMSettingHashFlags">
+<ANCHOR id="NMSettingHashFlags-enum" href="libnm-util/NMSetting.html#NMSettingHashFlags-enum">
<ANCHOR id="NM-SETTING-HASH-FLAG-ALL:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-HASH-FLAG-ALL:CAPS">
<ANCHOR id="NM-SETTING-HASH-FLAG-NO-SECRETS:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-HASH-FLAG-NO-SECRETS:CAPS">
<ANCHOR id="NM-SETTING-HASH-FLAG-ONLY-SECRETS:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-HASH-FLAG-ONLY-SECRETS:CAPS">
-<ANCHOR id="NMSettingSecretFlags" href="libnm-util/NMSetting.html#NMSettingSecretFlags">
+<ANCHOR id="NMSettingSecretFlags-enum" href="libnm-util/NMSetting.html#NMSettingSecretFlags-enum">
<ANCHOR id="NM-SETTING-SECRET-FLAG-NONE:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-SECRET-FLAG-NONE:CAPS">
<ANCHOR id="NM-SETTING-SECRET-FLAG-AGENT-OWNED:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-SECRET-FLAG-AGENT-OWNED:CAPS">
<ANCHOR id="NM-SETTING-SECRET-FLAG-NOT-SAVED:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-SECRET-FLAG-NOT-SAVED:CAPS">
<ANCHOR id="NM-SETTING-SECRET-FLAG-NOT-REQUIRED:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-SECRET-FLAG-NOT-REQUIRED:CAPS">
<ANCHOR id="NMSettingValueIterFn" href="libnm-util/NMSetting.html#NMSettingValueIterFn">
+<ANCHOR id="NM-SETTING-ERROR:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-ERROR:CAPS">
<ANCHOR id="NM-SETTING-NAME:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-NAME:CAPS">
<ANCHOR id="NM-SETTING-PARAM-FUZZY-IGNORE:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-PARAM-FUZZY-IGNORE:CAPS">
<ANCHOR id="NM-SETTING-PARAM-REQUIRED:CAPS" href="libnm-util/NMSetting.html#NM-SETTING-PARAM-REQUIRED:CAPS">
@@ -112,6 +123,7 @@
<ANCHOR id="nm-setting-error-quark" href="libnm-util/NMSetting.html#nm-setting-error-quark">
<ANCHOR id="nm-setting-get-name" href="libnm-util/NMSetting.html#nm-setting-get-name">
<ANCHOR id="nm-setting-get-secret-flags" href="libnm-util/NMSetting.html#nm-setting-get-secret-flags">
+<ANCHOR id="nm-setting-get-virtual-iface-name" href="libnm-util/NMSetting.html#nm-setting-get-virtual-iface-name">
<ANCHOR id="nm-setting-need-secrets" href="libnm-util/NMSetting.html#nm-setting-need-secrets">
<ANCHOR id="nm-setting-new-from-hash" href="libnm-util/NMSetting.html#nm-setting-new-from-hash">
<ANCHOR id="nm-setting-set-secret-flags" href="libnm-util/NMSetting.html#nm-setting-set-secret-flags">
@@ -135,35 +147,52 @@
<ANCHOR id="NM-SETTING-CONNECTION-ERROR-INVALID-PROPERTY:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-INVALID-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-ERROR-TYPE-SETTING-NOT-FOUND:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-TYPE-SETTING-NOT-FOUND:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ERROR-IP-CONFIG-NOT-ALLOWED:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-IP-CONFIG-NOT-ALLOWED:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-AUTOCONNECT:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-AUTOCONNECT:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ERROR:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-ID:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ID:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-MASTER:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-MASTER:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-PERMISSIONS:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-PERMISSIONS:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-READ-ONLY:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-READ-ONLY:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-SETTING-NAME:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-SETTING-NAME:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-SLAVE-TYPE:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-SLAVE-TYPE:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-TIMESTAMP:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-TIMESTAMP:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-TYPE:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-TYPE:CAPS">
<ANCHOR id="NM-SETTING-CONNECTION-UUID:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-UUID:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ZONE:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ZONE-BLOCK:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-BLOCK:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ZONE-HOME:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-HOME:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ZONE-PUBLIC:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-PUBLIC:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ZONE-TRUSTED:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-TRUSTED:CAPS">
+<ANCHOR id="NM-SETTING-CONNECTION-ZONE-WORK:CAPS" href="libnm-util/NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-WORK:CAPS">
<ANCHOR id="nm-setting-connection-add-permission" href="libnm-util/NMSettingConnection.html#nm-setting-connection-add-permission">
<ANCHOR id="nm-setting-connection-error-quark" href="libnm-util/NMSettingConnection.html#nm-setting-connection-error-quark">
<ANCHOR id="nm-setting-connection-get-autoconnect" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-autoconnect">
<ANCHOR id="nm-setting-connection-get-connection-type" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-connection-type">
<ANCHOR id="nm-setting-connection-get-id" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-id">
+<ANCHOR id="nm-setting-connection-get-master" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-master">
<ANCHOR id="nm-setting-connection-get-num-permissions" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-num-permissions">
<ANCHOR id="nm-setting-connection-get-permission" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-permission">
<ANCHOR id="nm-setting-connection-get-read-only" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-read-only">
+<ANCHOR id="nm-setting-connection-get-slave-type" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-slave-type">
<ANCHOR id="nm-setting-connection-get-timestamp" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-timestamp">
<ANCHOR id="nm-setting-connection-get-uuid" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-uuid">
+<ANCHOR id="nm-setting-connection-get-zone" href="libnm-util/NMSettingConnection.html#nm-setting-connection-get-zone">
+<ANCHOR id="nm-setting-connection-is-slave-type" href="libnm-util/NMSettingConnection.html#nm-setting-connection-is-slave-type">
<ANCHOR id="nm-setting-connection-new" href="libnm-util/NMSettingConnection.html#nm-setting-connection-new">
<ANCHOR id="nm-setting-connection-permissions-user-allowed" href="libnm-util/NMSettingConnection.html#nm-setting-connection-permissions-user-allowed">
<ANCHOR id="nm-setting-connection-remove-permission" href="libnm-util/NMSettingConnection.html#nm-setting-connection-remove-permission">
<ANCHOR id="NMSettingConnection.property-details" href="libnm-util/NMSettingConnection.html#NMSettingConnection.property-details">
<ANCHOR id="NMSettingConnection--autoconnect" href="libnm-util/NMSettingConnection.html#NMSettingConnection--autoconnect">
<ANCHOR id="NMSettingConnection--id" href="libnm-util/NMSettingConnection.html#NMSettingConnection--id">
+<ANCHOR id="NMSettingConnection--master" href="libnm-util/NMSettingConnection.html#NMSettingConnection--master">
<ANCHOR id="NMSettingConnection--permissions" href="libnm-util/NMSettingConnection.html#NMSettingConnection--permissions">
<ANCHOR id="NMSettingConnection--read-only" href="libnm-util/NMSettingConnection.html#NMSettingConnection--read-only">
+<ANCHOR id="NMSettingConnection--slave-type" href="libnm-util/NMSettingConnection.html#NMSettingConnection--slave-type">
<ANCHOR id="NMSettingConnection--timestamp" href="libnm-util/NMSettingConnection.html#NMSettingConnection--timestamp">
<ANCHOR id="NMSettingConnection--type" href="libnm-util/NMSettingConnection.html#NMSettingConnection--type">
<ANCHOR id="NMSettingConnection--uuid" href="libnm-util/NMSettingConnection.html#NMSettingConnection--uuid">
+<ANCHOR id="NMSettingConnection--zone" href="libnm-util/NMSettingConnection.html#NMSettingConnection--zone">
<ANCHOR id="NMSettingWired" href="libnm-util/NMSettingWired.html">
<ANCHOR id="NMSettingWired.synopsis" href="libnm-util/NMSettingWired.html#NMSettingWired.synopsis">
<ANCHOR id="NMSettingWiredError" href="libnm-util/NMSettingWired.html#NMSettingWiredError">
@@ -180,6 +209,7 @@
<ANCHOR id="NM-SETTING-WIRED-AUTO-NEGOTIATE:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-AUTO-NEGOTIATE:CAPS">
<ANCHOR id="NM-SETTING-WIRED-CLONED-MAC-ADDRESS:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-CLONED-MAC-ADDRESS:CAPS">
<ANCHOR id="NM-SETTING-WIRED-DUPLEX:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-DUPLEX:CAPS">
+<ANCHOR id="NM-SETTING-WIRED-ERROR:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-ERROR:CAPS">
<ANCHOR id="NM-SETTING-WIRED-MAC-ADDRESS:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-MAC-ADDRESS:CAPS">
<ANCHOR id="NM-SETTING-WIRED-MAC-ADDRESS-BLACKLIST:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-MAC-ADDRESS-BLACKLIST:CAPS">
<ANCHOR id="NM-SETTING-WIRED-MTU:CAPS" href="libnm-util/NMSettingWired.html#NM-SETTING-WIRED-MTU:CAPS">
@@ -237,6 +267,7 @@
<ANCHOR id="NM-SETTING-WIRELESS-BSSID:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-BSSID:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-CHANNEL:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-CHANNEL:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-CLONED-MAC-ADDRESS:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-CLONED-MAC-ADDRESS:CAPS">
+<ANCHOR id="NM-SETTING-WIRELESS-ERROR:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-ERROR:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-MAC-ADDRESS:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-MAC-ADDRESS:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-MAC-ADDRESS-BLACKLIST:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-MAC-ADDRESS-BLACKLIST:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-MODE:CAPS" href="libnm-util/NMSettingWireless.html#NM-SETTING-WIRELESS-MODE:CAPS">
@@ -284,6 +315,7 @@
<ANCHOR id="NMSettingWirelessSecurity" href="libnm-util/NMSettingWirelessSecurity.html">
<ANCHOR id="NMSettingWirelessSecurity.synopsis" href="libnm-util/NMSettingWirelessSecurity.html#NMSettingWirelessSecurity.synopsis">
<ANCHOR id="NMSettingWirelessSecurityError" href="libnm-util/NMSettingWirelessSecurity.html#NMSettingWirelessSecurityError">
+<ANCHOR id="NMWepKeyType" href="libnm-util/NMSettingWirelessSecurity.html#NMWepKeyType">
<ANCHOR id="NMSettingWirelessSecurity.object-hierarchy" href="libnm-util/NMSettingWirelessSecurity.html#NMSettingWirelessSecurity.object-hierarchy">
<ANCHOR id="NMSettingWirelessSecurity.properties" href="libnm-util/NMSettingWirelessSecurity.html#NMSettingWirelessSecurity.properties">
<ANCHOR id="NMSettingWirelessSecurity.description" href="libnm-util/NMSettingWirelessSecurity.html#NMSettingWirelessSecurity.description">
@@ -298,12 +330,13 @@
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-ERROR-LEAP-REQUIRES-802-1X:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR-LEAP-REQUIRES-802-1X:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-ERROR-LEAP-REQUIRES-USERNAME:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR-LEAP-REQUIRES-USERNAME:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-ERROR-SHARED-KEY-REQUIRES-WEP:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR-SHARED-KEY-REQUIRES-WEP:CAPS">
-<ANCHOR id="NMWepKeyType" href="libnm-util/NMSettingWirelessSecurity.html#NMWepKeyType">
+<ANCHOR id="NMWepKeyType-enum" href="libnm-util/NMSettingWirelessSecurity.html#NMWepKeyType-enum">
<ANCHOR id="NM-WEP-KEY-TYPE-UNKNOWN:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-WEP-KEY-TYPE-UNKNOWN:CAPS">
<ANCHOR id="NM-WEP-KEY-TYPE-KEY:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-WEP-KEY-TYPE-KEY:CAPS">
<ANCHOR id="NM-WEP-KEY-TYPE-PASSPHRASE:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-WEP-KEY-TYPE-PASSPHRASE:CAPS">
<ANCHOR id="NM-WEP-KEY-TYPE-LAST:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-WEP-KEY-TYPE-LAST:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-AUTH-ALG:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-AUTH-ALG:CAPS">
+<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-ERROR:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-GROUP:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-GROUP:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-KEY-MGMT:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-KEY-MGMT:CAPS">
<ANCHOR id="NM-SETTING-WIRELESS-SECURITY-LEAP-PASSWORD:CAPS" href="libnm-util/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-LEAP-PASSWORD:CAPS">
@@ -383,6 +416,7 @@
<ANCHOR id="NM-SETTING-BLUETOOTH-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-BLUETOOTH-ERROR-TYPE-SETTING-NOT-FOUND:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-ERROR-TYPE-SETTING-NOT-FOUND:CAPS">
<ANCHOR id="NM-SETTING-BLUETOOTH-BDADDR:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-BDADDR:CAPS">
+<ANCHOR id="NM-SETTING-BLUETOOTH-ERROR:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-ERROR:CAPS">
<ANCHOR id="NM-SETTING-BLUETOOTH-SETTING-NAME:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-SETTING-NAME:CAPS">
<ANCHOR id="NM-SETTING-BLUETOOTH-TYPE:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE:CAPS">
<ANCHOR id="NM-SETTING-BLUETOOTH-TYPE-DUN:CAPS" href="libnm-util/NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE-DUN:CAPS">
@@ -410,6 +444,7 @@
<ANCHOR id="NM-SETTING-SERIAL-ERROR-MISSING-PPP-SETTING:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-ERROR-MISSING-PPP-SETTING:CAPS">
<ANCHOR id="NM-SETTING-SERIAL-BAUD:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-BAUD:CAPS">
<ANCHOR id="NM-SETTING-SERIAL-BITS:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-BITS:CAPS">
+<ANCHOR id="NM-SETTING-SERIAL-ERROR:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-ERROR:CAPS">
<ANCHOR id="NM-SETTING-SERIAL-PARITY:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-PARITY:CAPS">
<ANCHOR id="NM-SETTING-SERIAL-SEND-DELAY:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-SEND-DELAY:CAPS">
<ANCHOR id="NM-SETTING-SERIAL-SETTING-NAME:CAPS" href="libnm-util/NMSettingSerial.html#NM-SETTING-SERIAL-SETTING-NAME:CAPS">
@@ -441,6 +476,7 @@
<ANCHOR id="NM-SETTING-CDMA-ERROR-INVALID-PROPERTY:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-ERROR-INVALID-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-CDMA-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-CDMA-ERROR-MISSING-SERIAL-SETTING:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-ERROR-MISSING-SERIAL-SETTING:CAPS">
+<ANCHOR id="NM-SETTING-CDMA-ERROR:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-ERROR:CAPS">
<ANCHOR id="NM-SETTING-CDMA-NUMBER:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-NUMBER:CAPS">
<ANCHOR id="NM-SETTING-CDMA-PASSWORD:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-PASSWORD:CAPS">
<ANCHOR id="NM-SETTING-CDMA-PASSWORD-FLAGS:CAPS" href="libnm-util/NMSettingCdma.html#NM-SETTING-CDMA-PASSWORD-FLAGS:CAPS">
@@ -460,6 +496,8 @@
<ANCHOR id="NMSettingGsm" href="libnm-util/NMSettingGsm.html">
<ANCHOR id="NMSettingGsm.synopsis" href="libnm-util/NMSettingGsm.html#NMSettingGsm.synopsis">
<ANCHOR id="NMSettingGsmError" href="libnm-util/NMSettingGsm.html#NMSettingGsmError">
+<ANCHOR id="NMSettingGsmNetworkBand" href="libnm-util/NMSettingGsm.html#NMSettingGsmNetworkBand">
+<ANCHOR id="NMSettingGsmNetworkType" href="libnm-util/NMSettingGsm.html#NMSettingGsmNetworkType">
<ANCHOR id="NMSettingGsm.object-hierarchy" href="libnm-util/NMSettingGsm.html#NMSettingGsm.object-hierarchy">
<ANCHOR id="NMSettingGsm.properties" href="libnm-util/NMSettingGsm.html#NMSettingGsm.properties">
<ANCHOR id="NMSettingGsm.description" href="libnm-util/NMSettingGsm.html#NMSettingGsm.description">
@@ -471,7 +509,7 @@
<ANCHOR id="NM-SETTING-GSM-ERROR-INVALID-PROPERTY:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-ERROR-INVALID-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-GSM-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-GSM-ERROR-MISSING-SERIAL-SETTING:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-ERROR-MISSING-SERIAL-SETTING:CAPS">
-<ANCHOR id="NMSettingGsmNetworkBand" href="libnm-util/NMSettingGsm.html#NMSettingGsmNetworkBand">
+<ANCHOR id="NMSettingGsmNetworkBand-enum" href="libnm-util/NMSettingGsm.html#NMSettingGsmNetworkBand-enum">
<ANCHOR id="NM-SETTING-GSM-BAND-UNKNOWN:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-BAND-UNKNOWN:CAPS">
<ANCHOR id="NM-SETTING-GSM-BAND-ANY:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-BAND-ANY:CAPS">
<ANCHOR id="NM-SETTING-GSM-BAND-EGSM:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-BAND-EGSM:CAPS">
@@ -487,7 +525,7 @@
<ANCHOR id="NM-SETTING-GSM-BAND-U17IX:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-BAND-U17IX:CAPS">
<ANCHOR id="NM-SETTING-GSM-BAND-U1900:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-BAND-U1900:CAPS">
<ANCHOR id="NM-SETTING-GSM-BAND-U2600:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-BAND-U2600:CAPS">
-<ANCHOR id="NMSettingGsmNetworkType" href="libnm-util/NMSettingGsm.html#NMSettingGsmNetworkType">
+<ANCHOR id="NMSettingGsmNetworkType-enum" href="libnm-util/NMSettingGsm.html#NMSettingGsmNetworkType-enum">
<ANCHOR id="NM-SETTING-GSM-NETWORK-TYPE-ANY:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE-ANY:CAPS">
<ANCHOR id="NM-SETTING-GSM-NETWORK-TYPE-UMTS-HSPA:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE-UMTS-HSPA:CAPS">
<ANCHOR id="NM-SETTING-GSM-NETWORK-TYPE-GPRS-EDGE:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE-GPRS-EDGE:CAPS">
@@ -495,6 +533,7 @@
<ANCHOR id="NM-SETTING-GSM-NETWORK-TYPE-PREFER-GPRS-EDGE:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE-PREFER-GPRS-EDGE:CAPS">
<ANCHOR id="NM-SETTING-GSM-ALLOWED-BANDS:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-ALLOWED-BANDS:CAPS">
<ANCHOR id="NM-SETTING-GSM-APN:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-APN:CAPS">
+<ANCHOR id="NM-SETTING-GSM-ERROR:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-ERROR:CAPS">
<ANCHOR id="NM-SETTING-GSM-HOME-ONLY:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-HOME-ONLY:CAPS">
<ANCHOR id="NM-SETTING-GSM-NETWORK-ID:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-NETWORK-ID:CAPS">
<ANCHOR id="NM-SETTING-GSM-NETWORK-TYPE:CAPS" href="libnm-util/NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE:CAPS">
@@ -543,6 +582,7 @@
<ANCHOR id="NM-SETTING-WIMAX-ERROR-UNKNOWN:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-ERROR-UNKNOWN:CAPS">
<ANCHOR id="NM-SETTING-WIMAX-ERROR-INVALID-PROPERTY:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-ERROR-INVALID-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-WIMAX-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-ERROR-MISSING-PROPERTY:CAPS">
+<ANCHOR id="NM-SETTING-WIMAX-ERROR:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-ERROR:CAPS">
<ANCHOR id="NM-SETTING-WIMAX-MAC-ADDRESS:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-MAC-ADDRESS:CAPS">
<ANCHOR id="NM-SETTING-WIMAX-NETWORK-NAME:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-NETWORK-NAME:CAPS">
<ANCHOR id="NM-SETTING-WIMAX-SETTING-NAME:CAPS" href="libnm-util/NMSettingWimax.html#NM-SETTING-WIMAX-SETTING-NAME:CAPS">
@@ -565,6 +605,7 @@
<ANCHOR id="NMSettingOlpcMeshError-enum" href="libnm-util/NMSettingOlpcMesh.html#NMSettingOlpcMeshError-enum">
<ANCHOR id="NM-SETTING-OLPC-MESH-CHANNEL:CAPS" href="libnm-util/NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-CHANNEL:CAPS">
<ANCHOR id="NM-SETTING-OLPC-MESH-DHCP-ANYCAST-ADDRESS:CAPS" href="libnm-util/NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-DHCP-ANYCAST-ADDRESS:CAPS">
+<ANCHOR id="NM-SETTING-OLPC-MESH-ERROR:CAPS" href="libnm-util/NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-ERROR:CAPS">
<ANCHOR id="NM-SETTING-OLPC-MESH-SETTING-NAME:CAPS" href="libnm-util/NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-SETTING-NAME:CAPS">
<ANCHOR id="NM-SETTING-OLPC-MESH-SSID:CAPS" href="libnm-util/NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-SSID:CAPS">
<ANCHOR id="nm-setting-olpc-mesh-error-quark" href="libnm-util/NMSettingOlpcMesh.html#nm-setting-olpc-mesh-error-quark">
@@ -578,18 +619,20 @@
<ANCHOR id="NMSettingOlpcMesh--ssid" href="libnm-util/NMSettingOlpcMesh.html#NMSettingOlpcMesh--ssid">
<ANCHOR id="NMSetting8021x" href="libnm-util/NMSetting8021x.html">
<ANCHOR id="NMSetting8021x.synopsis" href="libnm-util/NMSetting8021x.html#NMSetting8021x.synopsis">
+<ANCHOR id="NMSetting8021xCKFormat" href="libnm-util/NMSetting8021x.html#NMSetting8021xCKFormat">
+<ANCHOR id="NMSetting8021xCKScheme" href="libnm-util/NMSetting8021x.html#NMSetting8021xCKScheme">
<ANCHOR id="NMSetting8021xError" href="libnm-util/NMSetting8021x.html#NMSetting8021xError">
<ANCHOR id="NMSetting8021x.object-hierarchy" href="libnm-util/NMSetting8021x.html#NMSetting8021x.object-hierarchy">
<ANCHOR id="NMSetting8021x.properties" href="libnm-util/NMSetting8021x.html#NMSetting8021x.properties">
<ANCHOR id="NMSetting8021x.description" href="libnm-util/NMSetting8021x.html#NMSetting8021x.description">
<ANCHOR id="NMSetting8021x.details" href="libnm-util/NMSetting8021x.html#NMSetting8021x.details">
<ANCHOR id="NMSetting8021x-struct" href="libnm-util/NMSetting8021x.html#NMSetting8021x-struct">
-<ANCHOR id="NMSetting8021xCKFormat" href="libnm-util/NMSetting8021x.html#NMSetting8021xCKFormat">
+<ANCHOR id="NMSetting8021xCKFormat-enum" href="libnm-util/NMSetting8021x.html#NMSetting8021xCKFormat-enum">
<ANCHOR id="NM-SETTING-802-1X-CK-FORMAT-UNKNOWN:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-FORMAT-UNKNOWN:CAPS">
<ANCHOR id="NM-SETTING-802-1X-CK-FORMAT-X509:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-FORMAT-X509:CAPS">
<ANCHOR id="NM-SETTING-802-1X-CK-FORMAT-RAW-KEY:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-FORMAT-RAW-KEY:CAPS">
<ANCHOR id="NM-SETTING-802-1X-CK-FORMAT-PKCS12:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-FORMAT-PKCS12:CAPS">
-<ANCHOR id="NMSetting8021xCKScheme" href="libnm-util/NMSetting8021x.html#NMSetting8021xCKScheme">
+<ANCHOR id="NMSetting8021xCKScheme-enum" href="libnm-util/NMSetting8021x.html#NMSetting8021xCKScheme-enum">
<ANCHOR id="NM-SETTING-802-1X-CK-SCHEME-UNKNOWN:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-SCHEME-UNKNOWN:CAPS">
<ANCHOR id="NM-SETTING-802-1X-CK-SCHEME-BLOB:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-SCHEME-BLOB:CAPS">
<ANCHOR id="NM-SETTING-802-1X-CK-SCHEME-PATH:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CK-SCHEME-PATH:CAPS">
@@ -604,9 +647,13 @@
<ANCHOR id="NM-SETTING-802-1X-CA-PATH:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CA-PATH:CAPS">
<ANCHOR id="NM-SETTING-802-1X-CLIENT-CERT:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-CLIENT-CERT:CAPS">
<ANCHOR id="NM-SETTING-802-1X-EAP:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-EAP:CAPS">
+<ANCHOR id="NM-SETTING-802-1X-ERROR:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-ERROR:CAPS">
<ANCHOR id="NM-SETTING-802-1X-IDENTITY:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-IDENTITY:CAPS">
+<ANCHOR id="NM-SETTING-802-1X-PAC-FILE:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PAC-FILE:CAPS">
<ANCHOR id="NM-SETTING-802-1X-PASSWORD:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD:CAPS">
<ANCHOR id="NM-SETTING-802-1X-PASSWORD-FLAGS:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-FLAGS:CAPS">
+<ANCHOR id="NM-SETTING-802-1X-PASSWORD-RAW:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW:CAPS">
+<ANCHOR id="NM-SETTING-802-1X-PASSWORD-RAW-FLAGS:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW-FLAGS:CAPS">
<ANCHOR id="NM-SETTING-802-1X-PHASE1-FAST-PROVISIONING:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-FAST-PROVISIONING:CAPS">
<ANCHOR id="NM-SETTING-802-1X-PHASE1-PEAPLABEL:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-PEAPLABEL:CAPS">
<ANCHOR id="NM-SETTING-802-1X-PHASE1-PEAPVER:CAPS" href="libnm-util/NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-PEAPVER:CAPS">
@@ -649,8 +696,11 @@
<ANCHOR id="nm-setting-802-1x-get-num-altsubject-matches" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-num-altsubject-matches">
<ANCHOR id="nm-setting-802-1x-get-num-eap-methods" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-num-eap-methods">
<ANCHOR id="nm-setting-802-1x-get-num-phase2-altsubject-matches" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-num-phase2-altsubject-matches">
+<ANCHOR id="nm-setting-802-1x-get-pac-file" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-pac-file">
<ANCHOR id="nm-setting-802-1x-get-password" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-password">
<ANCHOR id="nm-setting-802-1x-get-password-flags" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-password-flags">
+<ANCHOR id="nm-setting-802-1x-get-password-raw" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-password-raw">
+<ANCHOR id="nm-setting-802-1x-get-password-raw-flags" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-password-raw-flags">
<ANCHOR id="nm-setting-802-1x-get-phase1-fast-provisioning" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-phase1-fast-provisioning">
<ANCHOR id="nm-setting-802-1x-get-phase1-peaplabel" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-phase1-peaplabel">
<ANCHOR id="nm-setting-802-1x-get-phase1-peapver" href="libnm-util/NMSetting8021x.html#nm-setting-802-1x-get-phase1-peapver">
@@ -699,8 +749,11 @@
<ANCHOR id="NMSetting8021x--client-cert" href="libnm-util/NMSetting8021x.html#NMSetting8021x--client-cert">
<ANCHOR id="NMSetting8021x--eap" href="libnm-util/NMSetting8021x.html#NMSetting8021x--eap">
<ANCHOR id="NMSetting8021x--identity" href="libnm-util/NMSetting8021x.html#NMSetting8021x--identity">
+<ANCHOR id="NMSetting8021x--pac-file" href="libnm-util/NMSetting8021x.html#NMSetting8021x--pac-file">
<ANCHOR id="NMSetting8021x--password" href="libnm-util/NMSetting8021x.html#NMSetting8021x--password">
<ANCHOR id="NMSetting8021x--password-flags" href="libnm-util/NMSetting8021x.html#NMSetting8021x--password-flags">
+<ANCHOR id="NMSetting8021x--password-raw" href="libnm-util/NMSetting8021x.html#NMSetting8021x--password-raw">
+<ANCHOR id="NMSetting8021x--password-raw-flags" href="libnm-util/NMSetting8021x.html#NMSetting8021x--password-raw-flags">
<ANCHOR id="NMSetting8021x--phase1-fast-provisioning" href="libnm-util/NMSetting8021x.html#NMSetting8021x--phase1-fast-provisioning">
<ANCHOR id="NMSetting8021x--phase1-peaplabel" href="libnm-util/NMSetting8021x.html#NMSetting8021x--phase1-peaplabel">
<ANCHOR id="NMSetting8021x--phase1-peapver" href="libnm-util/NMSetting8021x.html#NMSetting8021x--phase1-peapver">
@@ -743,6 +796,7 @@
<ANCHOR id="NM-SETTING-IP4-CONFIG-DHCP-SEND-HOSTNAME:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DHCP-SEND-HOSTNAME:CAPS">
<ANCHOR id="NM-SETTING-IP4-CONFIG-DNS:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DNS:CAPS">
<ANCHOR id="NM-SETTING-IP4-CONFIG-DNS-SEARCH:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DNS-SEARCH:CAPS">
+<ANCHOR id="NM-SETTING-IP4-CONFIG-ERROR:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-ERROR:CAPS">
<ANCHOR id="NM-SETTING-IP4-CONFIG-IGNORE-AUTO-DNS:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-IGNORE-AUTO-DNS:CAPS">
<ANCHOR id="NM-SETTING-IP4-CONFIG-IGNORE-AUTO-ROUTES:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-IGNORE-AUTO-ROUTES:CAPS">
<ANCHOR id="NM-SETTING-IP4-CONFIG-MAY-FAIL:CAPS" href="libnm-util/NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-MAY-FAIL:CAPS">
@@ -827,6 +881,7 @@
<ANCHOR id="NMIP6Address" href="libnm-util/NMSettingIP6Config.html#NMIP6Address">
<ANCHOR id="NMIP6Route" href="libnm-util/NMSettingIP6Config.html#NMIP6Route">
<ANCHOR id="NMSettingIP6ConfigError" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6ConfigError">
+<ANCHOR id="NMSettingIP6ConfigPrivacy" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy">
<ANCHOR id="NMSettingIP6Config.object-hierarchy" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config.object-hierarchy">
<ANCHOR id="NMSettingIP6Config.properties" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config.properties">
<ANCHOR id="NMSettingIP6Config.description" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config.description">
@@ -840,11 +895,18 @@
<ANCHOR id="NM-SETTING-IP6-CONFIG-ERROR-INVALID-PROPERTY:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR-INVALID-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-ERROR-NOT-ALLOWED-FOR-METHOD:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR-NOT-ALLOWED-FOR-METHOD:CAPS">
+<ANCHOR id="NMSettingIP6ConfigPrivacy-enum" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy-enum">
+<ANCHOR id="NM-SETTING-IP6-CONFIG-PRIVACY-UNKNOWN:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-UNKNOWN:CAPS">
+<ANCHOR id="NM-SETTING-IP6-CONFIG-PRIVACY-DISABLED:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-DISABLED:CAPS">
+<ANCHOR id="NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-PUBLIC-ADDR:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-PUBLIC-ADDR:CAPS">
+<ANCHOR id="NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-TEMP-ADDR:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-TEMP-ADDR:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-ADDRESSES:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ADDRESSES:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-DNS:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-DNS:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-DNS-SEARCH:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-DNS-SEARCH:CAPS">
+<ANCHOR id="NM-SETTING-IP6-CONFIG-ERROR:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-IGNORE-AUTO-DNS:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IGNORE-AUTO-DNS:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-IGNORE-AUTO-ROUTES:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IGNORE-AUTO-ROUTES:CAPS">
+<ANCHOR id="NM-SETTING-IP6-CONFIG-IP6-PRIVACY:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IP6-PRIVACY:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-MAY-FAIL:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-MAY-FAIL:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-METHOD:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-METHOD:CAPS">
<ANCHOR id="NM-SETTING-IP6-CONFIG-METHOD-AUTO:CAPS" href="libnm-util/NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-METHOD-AUTO:CAPS">
@@ -894,6 +956,7 @@
<ANCHOR id="nm-setting-ip6-config-get-dns-search" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-dns-search">
<ANCHOR id="nm-setting-ip6-config-get-ignore-auto-dns" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-ignore-auto-dns">
<ANCHOR id="nm-setting-ip6-config-get-ignore-auto-routes" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-ignore-auto-routes">
+<ANCHOR id="nm-setting-ip6-config-get-ip6-privacy" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-ip6-privacy">
<ANCHOR id="nm-setting-ip6-config-get-may-fail" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-may-fail">
<ANCHOR id="nm-setting-ip6-config-get-method" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-method">
<ANCHOR id="nm-setting-ip6-config-get-never-default" href="libnm-util/NMSettingIP6Config.html#nm-setting-ip6-config-get-never-default">
@@ -913,6 +976,7 @@
<ANCHOR id="NMSettingIP6Config--dns-search" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--dns-search">
<ANCHOR id="NMSettingIP6Config--ignore-auto-dns" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--ignore-auto-dns">
<ANCHOR id="NMSettingIP6Config--ignore-auto-routes" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--ignore-auto-routes">
+<ANCHOR id="NMSettingIP6Config--ip6-privacy" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--ip6-privacy">
<ANCHOR id="NMSettingIP6Config--may-fail" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--may-fail">
<ANCHOR id="NMSettingIP6Config--method" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--method">
<ANCHOR id="NMSettingIP6Config--never-default" href="libnm-util/NMSettingIP6Config.html#NMSettingIP6Config--never-default">
@@ -933,6 +997,7 @@
<ANCHOR id="NM-SETTING-PPP-ERROR-REQUIRE-MPPE-NOT-ALLOWED:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-ERROR-REQUIRE-MPPE-NOT-ALLOWED:CAPS">
<ANCHOR id="NM-SETTING-PPP-BAUD:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-BAUD:CAPS">
<ANCHOR id="NM-SETTING-PPP-CRTSCTS:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-CRTSCTS:CAPS">
+<ANCHOR id="NM-SETTING-PPP-ERROR:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-ERROR:CAPS">
<ANCHOR id="NM-SETTING-PPP-LCP-ECHO-FAILURE:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-LCP-ECHO-FAILURE:CAPS">
<ANCHOR id="NM-SETTING-PPP-LCP-ECHO-INTERVAL:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-LCP-ECHO-INTERVAL:CAPS">
<ANCHOR id="NM-SETTING-PPP-MPPE-STATEFUL:CAPS" href="libnm-util/NMSettingPPP.html#NM-SETTING-PPP-MPPE-STATEFUL:CAPS">
@@ -1003,6 +1068,7 @@
<ANCHOR id="NM-SETTING-PPPOE-ERROR-INVALID-PROPERTY:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR-INVALID-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-PPPOE-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NM-SETTING-PPPOE-ERROR-MISSING-PPP-SETTING:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR-MISSING-PPP-SETTING:CAPS">
+<ANCHOR id="NM-SETTING-PPPOE-ERROR:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR:CAPS">
<ANCHOR id="NM-SETTING-PPPOE-PASSWORD:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-PASSWORD:CAPS">
<ANCHOR id="NM-SETTING-PPPOE-PASSWORD-FLAGS:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-PASSWORD-FLAGS:CAPS">
<ANCHOR id="NM-SETTING-PPPOE-SERVICE:CAPS" href="libnm-util/NMSettingPPPOE.html#NM-SETTING-PPPOE-SERVICE:CAPS">
@@ -1034,6 +1100,7 @@
<ANCHOR id="NM-SETTING-VPN-ERROR-MISSING-PROPERTY:CAPS" href="libnm-util/NMSettingVPN.html#NM-SETTING-VPN-ERROR-MISSING-PROPERTY:CAPS">
<ANCHOR id="NMVPNIterFunc" href="libnm-util/NMSettingVPN.html#NMVPNIterFunc">
<ANCHOR id="NM-SETTING-VPN-DATA:CAPS" href="libnm-util/NMSettingVPN.html#NM-SETTING-VPN-DATA:CAPS">
+<ANCHOR id="NM-SETTING-VPN-ERROR:CAPS" href="libnm-util/NMSettingVPN.html#NM-SETTING-VPN-ERROR:CAPS">
<ANCHOR id="NM-SETTING-VPN-SECRETS:CAPS" href="libnm-util/NMSettingVPN.html#NM-SETTING-VPN-SECRETS:CAPS">
<ANCHOR id="NM-SETTING-VPN-SERVICE-TYPE:CAPS" href="libnm-util/NMSettingVPN.html#NM-SETTING-VPN-SERVICE-TYPE:CAPS">
<ANCHOR id="NM-SETTING-VPN-SETTING-NAME:CAPS" href="libnm-util/NMSettingVPN.html#NM-SETTING-VPN-SETTING-NAME:CAPS">
@@ -1044,6 +1111,8 @@
<ANCHOR id="nm-setting-vpn-foreach-data-item" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-foreach-data-item">
<ANCHOR id="nm-setting-vpn-foreach-secret" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-foreach-secret">
<ANCHOR id="nm-setting-vpn-get-data-item" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-get-data-item">
+<ANCHOR id="nm-setting-vpn-get-num-data-items" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-get-num-data-items">
+<ANCHOR id="nm-setting-vpn-get-num-secrets" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-get-num-secrets">
<ANCHOR id="nm-setting-vpn-get-secret" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-get-secret">
<ANCHOR id="nm-setting-vpn-get-service-type" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-get-service-type">
<ANCHOR id="nm-setting-vpn-get-user-name" href="libnm-util/NMSettingVPN.html#nm-setting-vpn-get-user-name">
@@ -1057,9 +1126,11 @@
<ANCHOR id="NMSettingVPN--user-name" href="libnm-util/NMSettingVPN.html#NMSettingVPN--user-name">
<ANCHOR id="libnm-util-nm-utils" href="libnm-util/libnm-util-nm-utils.html">
<ANCHOR id="libnm-util-nm-utils.synopsis" href="libnm-util/libnm-util-nm-utils.html#libnm-util-nm-utils.synopsis">
+<ANCHOR id="NMUtilsSecurityType" href="libnm-util/libnm-util-nm-utils.html#NMUtilsSecurityType">
+<ANCHOR id="libnm-util-nm-utils.object-hierarchy" href="libnm-util/libnm-util-nm-utils.html#libnm-util-nm-utils.object-hierarchy">
<ANCHOR id="libnm-util-nm-utils.description" href="libnm-util/libnm-util-nm-utils.html#libnm-util-nm-utils.description">
<ANCHOR id="libnm-util-nm-utils.details" href="libnm-util/libnm-util-nm-utils.html#libnm-util-nm-utils.details">
-<ANCHOR id="NMUtilsSecurityType" href="libnm-util/libnm-util-nm-utils.html#NMUtilsSecurityType">
+<ANCHOR id="NMUtilsSecurityType-enum" href="libnm-util/libnm-util-nm-utils.html#NMUtilsSecurityType-enum">
<ANCHOR id="NMU-SEC-INVALID:CAPS" href="libnm-util/libnm-util-nm-utils.html#NMU-SEC-INVALID:CAPS">
<ANCHOR id="NMU-SEC-NONE:CAPS" href="libnm-util/libnm-util-nm-utils.html#NMU-SEC-NONE:CAPS">
<ANCHOR id="NMU-SEC-STATIC-WEP:CAPS" href="libnm-util/libnm-util-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS">
@@ -1069,9 +1140,15 @@
<ANCHOR id="NMU-SEC-WPA-ENTERPRISE:CAPS" href="libnm-util/libnm-util-nm-utils.html#NMU-SEC-WPA-ENTERPRISE:CAPS">
<ANCHOR id="NMU-SEC-WPA2-PSK:CAPS" href="libnm-util/libnm-util-nm-utils.html#NMU-SEC-WPA2-PSK:CAPS">
<ANCHOR id="NMU-SEC-WPA2-ENTERPRISE:CAPS" href="libnm-util/libnm-util-nm-utils.html#NMU-SEC-WPA2-ENTERPRISE:CAPS">
+<ANCHOR id="NM-UTILS-HWADDR-LEN-MAX:CAPS" href="libnm-util/libnm-util-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS">
<ANCHOR id="nm-utils-deinit" href="libnm-util/libnm-util-nm-utils.html#nm-utils-deinit">
<ANCHOR id="nm-utils-escape-ssid" href="libnm-util/libnm-util-nm-utils.html#nm-utils-escape-ssid">
<ANCHOR id="nm-utils-gvalue-hash-dup" href="libnm-util/libnm-util-nm-utils.html#nm-utils-gvalue-hash-dup">
+<ANCHOR id="nm-utils-hwaddr-atoba" href="libnm-util/libnm-util-nm-utils.html#nm-utils-hwaddr-atoba">
+<ANCHOR id="nm-utils-hwaddr-aton" href="libnm-util/libnm-util-nm-utils.html#nm-utils-hwaddr-aton">
+<ANCHOR id="nm-utils-hwaddr-len" href="libnm-util/libnm-util-nm-utils.html#nm-utils-hwaddr-len">
+<ANCHOR id="nm-utils-hwaddr-ntoa" href="libnm-util/libnm-util-nm-utils.html#nm-utils-hwaddr-ntoa">
+<ANCHOR id="nm-utils-hwaddr-type" href="libnm-util/libnm-util-nm-utils.html#nm-utils-hwaddr-type">
<ANCHOR id="nm-utils-init" href="libnm-util/libnm-util-nm-utils.html#nm-utils-init">
<ANCHOR id="nm-utils-ip4-addresses-from-gvalue" href="libnm-util/libnm-util-nm-utils.html#nm-utils-ip4-addresses-from-gvalue">
<ANCHOR id="nm-utils-ip4-addresses-to-gvalue" href="libnm-util/libnm-util-nm-utils.html#nm-utils-ip4-addresses-to-gvalue">
diff --git a/docs/libnm-util/html/libnm-util-nm-utils.html b/docs/libnm-util/html/libnm-util-nm-utils.html
index c9aa3d53b..a17c1ece6 100644
--- a/docs/libnm-util/html/libnm-util-nm-utils.html
+++ b/docs/libnm-util/html/libnm-util-nm-utils.html
@@ -24,6 +24,8 @@
<a href="#libnm-util-nm-utils.synopsis" class="shortcut">Top</a>
 | 
<a href="#libnm-util-nm-utils.description" class="shortcut">Description</a>
+  | 
+ <a href="#libnm-util-nm-utils.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
@@ -37,14 +39,24 @@
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libnm-util-nm-utils.synopsis"></a><h2>Synopsis</h2>
-<pre class="synopsis">
+<a name="NMUtilsSecurityType"></a><pre class="synopsis">
#include &lt;nm-utils.h&gt;
-enum <a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a>;
+enum <a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType-enum" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a>;
+#define <a class="link" href="libnm-util-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX">NM_UTILS_HWADDR_LEN_MAX</a>
<span class="returnvalue">void</span> <a class="link" href="libnm-util-nm-utils.html#nm-utils-deinit" title="nm_utils_deinit ()">nm_utils_deinit</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-escape-ssid" title="nm_utils_escape_ssid ()">nm_utils_escape_ssid</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-gvalue-hash-dup" title="nm_utils_gvalue_hash_dup ()">nm_utils_gvalue_hash_dup</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *hash</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-atoba" title="nm_utils_hwaddr_atoba ()">nm_utils_hwaddr_atoba</a> (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
+ <em class="parameter"><code><span class="type">int</span> type</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()">nm_utils_hwaddr_aton</a> (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
+ <em class="parameter"><code><span class="type">int</span> type</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()">nm_utils_hwaddr_len</a> (<em class="parameter"><code><span class="type">int</span> type</code></em>);
+<span class="returnvalue">char</span> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-ntoa" title="nm_utils_hwaddr_ntoa ()">nm_utils_hwaddr_ntoa</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>,
+ <em class="parameter"><code><span class="type">int</span> type</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-type" title="nm_utils_hwaddr_type ()">nm_utils_hwaddr_type</a> (<em class="parameter"><code><span class="type">int</span> len</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-init" title="nm_utils_init ()">nm_utils_init</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-ip4-addresses-from-gvalue" title="nm_utils_ip4_addresses_from_gvalue ()">nm_utils_ip4_addresses_from_gvalue</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libnm-util-nm-utils.html#nm-utils-ip4-addresses-to-gvalue" title="nm_utils_ip4_addresses_to_gvalue ()">nm_utils_ip4_addresses_to_gvalue</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *list</code></em>,
@@ -73,7 +85,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="libnm
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-same-ssid" title="nm_utils_same_ssid ()">nm_utils_same_ssid</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a> *ssid1</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a> *ssid2</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_trailing_null</code></em>);
-<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()">nm_utils_security_valid</a> (<em class="parameter"><code><a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>,
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()">nm_utils_security_valid</a> (<em class="parameter"><code><a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>,
<em class="parameter"><code><span class="type">NMDeviceWifiCapabilities</span> wifi_caps</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> have_ap</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> adhoc</code></em>,
@@ -96,6 +108,13 @@ const <span class="returnvalue">char</span> * <a class="link" href="libnm
</pre>
</div>
<div class="refsect1">
+<a name="libnm-util-nm-utils.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="synopsis">
+ GEnum
+ +----NMUtilsSecurityType
+</pre>
+</div>
+<div class="refsect1">
<a name="libnm-util-nm-utils.description"></a><h2>Description</h2>
<p>
A collection of utility functions for working SSIDs, IP addresses, WiFi
@@ -105,7 +124,7 @@ access points and devices, among other things.
<div class="refsect1">
<a name="libnm-util-nm-utils.details"></a><h2>Details</h2>
<div class="refsect2">
-<a name="NMUtilsSecurityType"></a><h3>enum NMUtilsSecurityType</h3>
+<a name="NMUtilsSecurityType-enum"></a><h3>enum NMUtilsSecurityType</h3>
<pre class="programlisting">typedef enum {
NMU_SEC_INVALID = 0,
NMU_SEC_NONE,
@@ -178,6 +197,17 @@ generating the dynamic WEP keys automatically
</div>
<hr>
<div class="refsect2">
+<a name="NM-UTILS-HWADDR-LEN-MAX:CAPS"></a><h3>NM_UTILS_HWADDR_LEN_MAX</h3>
+<pre class="programlisting">#define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */
+</pre>
+<p>
+The maximum length of a hardware address of a type known by
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()"><code class="function">nm_utils_hwaddr_len()</code></a> or <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a>. This can be used
+as the size of the buffer passed to <a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a>.
+</p>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-utils-deinit"></a><h3>nm_utils_deinit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> nm_utils_deinit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
@@ -243,6 +273,144 @@ returned hash with <a href="http://library.gnome.org/devel/glib/unstable/glib-Ha
</div>
<hr>
<div class="refsect2">
+<a name="nm-utils-hwaddr-atoba"></a><h3>nm_utils_hwaddr_atoba ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * nm_utils_hwaddr_atoba (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
+ <em class="parameter"><code><span class="type">int</span> type</code></em>);</pre>
+<p>
+Parses <em class="parameter"><code>asc</code></em> and converts it to binary form in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>. See
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a> if you don't want a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td>
+<td>the ASCII representation of a hardware address</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the type of address; either <code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em> couldn't
+be parsed. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-utils-hwaddr-aton"></a><h3>nm_utils_hwaddr_aton ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> * nm_utils_hwaddr_aton (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
+ <em class="parameter"><code><span class="type">int</span> type</code></em>,
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>);</pre>
+<p>
+Parses <em class="parameter"><code>asc</code></em> and converts it to binary form in <em class="parameter"><code>buffer</code></em>. See
+<a class="link" href="libnm-util-nm-utils.html#nm-utils-hwaddr-atoba" title="nm_utils_hwaddr_atoba ()"><code class="function">nm_utils_hwaddr_atoba()</code></a> if you'd rather have the result in a
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td>
+<td>the ASCII representation of a hardware address</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the type of address; either <code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
+<td>buffer to store the result into</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+<em class="parameter"><code>buffer</code></em>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em> couldn't be parsed</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-utils-hwaddr-len"></a><h3>nm_utils_hwaddr_len ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> nm_utils_hwaddr_len (<em class="parameter"><code><span class="type">int</span> type</code></em>);</pre>
+<p>
+Returns the length in octets of a hardware address of type <em class="parameter"><code>type</code></em>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the type of address; either <code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the length</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-utils-hwaddr-ntoa"></a><h3>nm_utils_hwaddr_ntoa ()</h3>
+<pre class="programlisting"><span class="returnvalue">char</span> * nm_utils_hwaddr_ntoa (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>,
+ <em class="parameter"><code><span class="type">int</span> type</code></em>);</pre>
+<p>
+Converts <em class="parameter"><code>addr</code></em> to textual form.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
+<td>a binary hardware address</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>the type of address; either <code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the textual form of <em class="parameter"><code>addr</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="nm-utils-hwaddr-type"></a><h3>nm_utils_hwaddr_type ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> nm_utils_hwaddr_type (<em class="parameter"><code><span class="type">int</span> len</code></em>);</pre>
+<p>
+Returns the type (either <code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>) of the raw
+address given its length.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
+<td>the length of hardware address in bytes</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the type, either <code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>, or -1 if
+the address length was not recognized</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
<a name="nm-utils-init"></a><h3>nm_utils_init ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_init (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
@@ -673,7 +841,7 @@ NULLs, even though that is functionally pointless.
<hr>
<div class="refsect2">
<a name="nm-utils-security-valid"></a><h3>nm_utils_security_valid ()</h3>
-<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_security_valid (<em class="parameter"><code><a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>,
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_security_valid (<em class="parameter"><code><a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>,
<em class="parameter"><code><span class="type">NMDeviceWifiCapabilities</span> wifi_caps</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> have_ap</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> adhoc</code></em>,
diff --git a/docs/libnm-util/html/libnm-util.devhelp2 b/docs/libnm-util/html/libnm-util.devhelp2
index 021b34e1b..993a29d70 100644
--- a/docs/libnm-util/html/libnm-util.devhelp2
+++ b/docs/libnm-util/html/libnm-util.devhelp2
@@ -31,6 +31,7 @@
<keyword type="struct" name="NMConnection" link="NMConnection.html#NMConnection-struct"/>
<keyword type="struct" name="NMConnectionClass" link="NMConnection.html#NMConnectionClass"/>
<keyword type="enum" name="enum NMConnectionError" link="NMConnection.html#NMConnectionError-enum"/>
+ <keyword type="macro" name="NM_CONNECTION_ERROR" link="NMConnection.html#NM-CONNECTION-ERROR:CAPS"/>
<keyword type="macro" name="NM_CONNECTION_PATH" link="NMConnection.html#NM-CONNECTION-PATH:CAPS"/>
<keyword type="function" name="nm_connection_add_setting ()" link="NMConnection.html#nm-connection-add-setting"/>
<keyword type="function" name="nm_connection_clear_secrets ()" link="NMConnection.html#nm-connection-clear-secrets"/>
@@ -47,21 +48,26 @@
<keyword type="function" name="nm_connection_get_setting ()" link="NMConnection.html#nm-connection-get-setting"/>
<keyword type="function" name="nm_connection_get_setting_802_1x ()" link="NMConnection.html#nm-connection-get-setting-802-1x"/>
<keyword type="function" name="nm_connection_get_setting_bluetooth ()" link="NMConnection.html#nm-connection-get-setting-bluetooth"/>
+ <keyword type="function" name="nm_connection_get_setting_bond ()" link="NMConnection.html#nm-connection-get-setting-bond"/>
<keyword type="function" name="nm_connection_get_setting_by_name ()" link="NMConnection.html#nm-connection-get-setting-by-name"/>
<keyword type="function" name="nm_connection_get_setting_cdma ()" link="NMConnection.html#nm-connection-get-setting-cdma"/>
<keyword type="function" name="nm_connection_get_setting_connection ()" link="NMConnection.html#nm-connection-get-setting-connection"/>
<keyword type="function" name="nm_connection_get_setting_gsm ()" link="NMConnection.html#nm-connection-get-setting-gsm"/>
+ <keyword type="function" name="nm_connection_get_setting_infiniband ()" link="NMConnection.html#nm-connection-get-setting-infiniband"/>
<keyword type="function" name="nm_connection_get_setting_ip4_config ()" link="NMConnection.html#nm-connection-get-setting-ip4-config"/>
<keyword type="function" name="nm_connection_get_setting_ip6_config ()" link="NMConnection.html#nm-connection-get-setting-ip6-config"/>
<keyword type="function" name="nm_connection_get_setting_olpc_mesh ()" link="NMConnection.html#nm-connection-get-setting-olpc-mesh"/>
<keyword type="function" name="nm_connection_get_setting_ppp ()" link="NMConnection.html#nm-connection-get-setting-ppp"/>
<keyword type="function" name="nm_connection_get_setting_pppoe ()" link="NMConnection.html#nm-connection-get-setting-pppoe"/>
+ <keyword type="function" name="nm_connection_get_setting_serial ()" link="NMConnection.html#nm-connection-get-setting-serial"/>
+ <keyword type="function" name="nm_connection_get_setting_vlan ()" link="NMConnection.html#nm-connection-get-setting-vlan"/>
<keyword type="function" name="nm_connection_get_setting_vpn ()" link="NMConnection.html#nm-connection-get-setting-vpn"/>
<keyword type="function" name="nm_connection_get_setting_wimax ()" link="NMConnection.html#nm-connection-get-setting-wimax"/>
<keyword type="function" name="nm_connection_get_setting_wired ()" link="NMConnection.html#nm-connection-get-setting-wired"/>
<keyword type="function" name="nm_connection_get_setting_wireless ()" link="NMConnection.html#nm-connection-get-setting-wireless"/>
<keyword type="function" name="nm_connection_get_setting_wireless_security ()" link="NMConnection.html#nm-connection-get-setting-wireless-security"/>
<keyword type="function" name="nm_connection_get_uuid ()" link="NMConnection.html#nm-connection-get-uuid"/>
+ <keyword type="function" name="nm_connection_get_virtual_iface_name ()" link="NMConnection.html#nm-connection-get-virtual-iface-name"/>
<keyword type="function" name="nm_connection_is_type ()" link="NMConnection.html#nm-connection-is-type"/>
<keyword type="function" name="nm_connection_lookup_setting_type ()" link="NMConnection.html#nm-connection-lookup-setting-type"/>
<keyword type="function" name="nm_connection_lookup_setting_type_by_quark ()" link="NMConnection.html#nm-connection-lookup-setting-type-by-quark"/>
@@ -80,12 +86,13 @@
<keyword type="struct" name="NMSetting" link="NMSetting.html#NMSetting-struct"/>
<keyword type="struct" name="NMSettingClass" link="NMSetting.html#NMSettingClass"/>
<keyword type="function" name="NMSettingClearSecretsWithFlagsFn ()" link="NMSetting.html#NMSettingClearSecretsWithFlagsFn"/>
- <keyword type="enum" name="enum NMSettingCompareFlags" link="NMSetting.html#NMSettingCompareFlags"/>
- <keyword type="enum" name="enum NMSettingDiffResult" link="NMSetting.html#NMSettingDiffResult"/>
+ <keyword type="enum" name="enum NMSettingCompareFlags" link="NMSetting.html#NMSettingCompareFlags-enum"/>
+ <keyword type="enum" name="enum NMSettingDiffResult" link="NMSetting.html#NMSettingDiffResult-enum"/>
<keyword type="enum" name="enum NMSettingError" link="NMSetting.html#NMSettingError-enum"/>
- <keyword type="enum" name="enum NMSettingHashFlags" link="NMSetting.html#NMSettingHashFlags"/>
- <keyword type="enum" name="enum NMSettingSecretFlags" link="NMSetting.html#NMSettingSecretFlags"/>
+ <keyword type="enum" name="enum NMSettingHashFlags" link="NMSetting.html#NMSettingHashFlags-enum"/>
+ <keyword type="enum" name="enum NMSettingSecretFlags" link="NMSetting.html#NMSettingSecretFlags-enum"/>
<keyword type="function" name="NMSettingValueIterFn ()" link="NMSetting.html#NMSettingValueIterFn"/>
+ <keyword type="macro" name="NM_SETTING_ERROR" link="NMSetting.html#NM-SETTING-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_NAME" link="NMSetting.html#NM-SETTING-NAME:CAPS"/>
<keyword type="macro" name="NM_SETTING_PARAM_FUZZY_IGNORE" link="NMSetting.html#NM-SETTING-PARAM-FUZZY-IGNORE:CAPS"/>
<keyword type="macro" name="NM_SETTING_PARAM_REQUIRED" link="NMSetting.html#NM-SETTING-PARAM-REQUIRED:CAPS"/>
@@ -100,6 +107,7 @@
<keyword type="function" name="nm_setting_error_quark ()" link="NMSetting.html#nm-setting-error-quark"/>
<keyword type="function" name="nm_setting_get_name ()" link="NMSetting.html#nm-setting-get-name"/>
<keyword type="function" name="nm_setting_get_secret_flags ()" link="NMSetting.html#nm-setting-get-secret-flags"/>
+ <keyword type="function" name="nm_setting_get_virtual_iface_name ()" link="NMSetting.html#nm-setting-get-virtual-iface-name"/>
<keyword type="function" name="nm_setting_need_secrets ()" link="NMSetting.html#nm-setting-need-secrets"/>
<keyword type="function" name="nm_setting_new_from_hash ()" link="NMSetting.html#nm-setting-new-from-hash"/>
<keyword type="function" name="nm_setting_set_secret_flags ()" link="NMSetting.html#nm-setting-set-secret-flags"/>
@@ -112,39 +120,56 @@
<keyword type="struct" name="NMSettingConnectionClass" link="NMSettingConnection.html#NMSettingConnectionClass"/>
<keyword type="enum" name="enum NMSettingConnectionError" link="NMSettingConnection.html#NMSettingConnectionError-enum"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_AUTOCONNECT" link="NMSettingConnection.html#NM-SETTING-CONNECTION-AUTOCONNECT:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ERROR" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_ID" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ID:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_MASTER" link="NMSettingConnection.html#NM-SETTING-CONNECTION-MASTER:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_PERMISSIONS" link="NMSettingConnection.html#NM-SETTING-CONNECTION-PERMISSIONS:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_READ_ONLY" link="NMSettingConnection.html#NM-SETTING-CONNECTION-READ-ONLY:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_SETTING_NAME" link="NMSettingConnection.html#NM-SETTING-CONNECTION-SETTING-NAME:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_SLAVE_TYPE" link="NMSettingConnection.html#NM-SETTING-CONNECTION-SLAVE-TYPE:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_TIMESTAMP" link="NMSettingConnection.html#NM-SETTING-CONNECTION-TIMESTAMP:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_TYPE" link="NMSettingConnection.html#NM-SETTING-CONNECTION-TYPE:CAPS"/>
<keyword type="macro" name="NM_SETTING_CONNECTION_UUID" link="NMSettingConnection.html#NM-SETTING-CONNECTION-UUID:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ZONE" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ZONE_BLOCK" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-BLOCK:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ZONE_HOME" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-HOME:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ZONE_PUBLIC" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-PUBLIC:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ZONE_TRUSTED" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-TRUSTED:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_CONNECTION_ZONE_WORK" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ZONE-WORK:CAPS"/>
<keyword type="function" name="nm_setting_connection_add_permission ()" link="NMSettingConnection.html#nm-setting-connection-add-permission"/>
<keyword type="function" name="nm_setting_connection_error_quark ()" link="NMSettingConnection.html#nm-setting-connection-error-quark"/>
<keyword type="function" name="nm_setting_connection_get_autoconnect ()" link="NMSettingConnection.html#nm-setting-connection-get-autoconnect"/>
<keyword type="function" name="nm_setting_connection_get_connection_type ()" link="NMSettingConnection.html#nm-setting-connection-get-connection-type"/>
<keyword type="function" name="nm_setting_connection_get_id ()" link="NMSettingConnection.html#nm-setting-connection-get-id"/>
+ <keyword type="function" name="nm_setting_connection_get_master ()" link="NMSettingConnection.html#nm-setting-connection-get-master"/>
<keyword type="function" name="nm_setting_connection_get_num_permissions ()" link="NMSettingConnection.html#nm-setting-connection-get-num-permissions"/>
<keyword type="function" name="nm_setting_connection_get_permission ()" link="NMSettingConnection.html#nm-setting-connection-get-permission"/>
<keyword type="function" name="nm_setting_connection_get_read_only ()" link="NMSettingConnection.html#nm-setting-connection-get-read-only"/>
+ <keyword type="function" name="nm_setting_connection_get_slave_type ()" link="NMSettingConnection.html#nm-setting-connection-get-slave-type"/>
<keyword type="function" name="nm_setting_connection_get_timestamp ()" link="NMSettingConnection.html#nm-setting-connection-get-timestamp"/>
<keyword type="function" name="nm_setting_connection_get_uuid ()" link="NMSettingConnection.html#nm-setting-connection-get-uuid"/>
+ <keyword type="function" name="nm_setting_connection_get_zone ()" link="NMSettingConnection.html#nm-setting-connection-get-zone"/>
+ <keyword type="function" name="nm_setting_connection_is_slave_type ()" link="NMSettingConnection.html#nm-setting-connection-is-slave-type"/>
<keyword type="function" name="nm_setting_connection_new ()" link="NMSettingConnection.html#nm-setting-connection-new"/>
<keyword type="function" name="nm_setting_connection_permissions_user_allowed ()" link="NMSettingConnection.html#nm-setting-connection-permissions-user-allowed"/>
<keyword type="function" name="nm_setting_connection_remove_permission ()" link="NMSettingConnection.html#nm-setting-connection-remove-permission"/>
<keyword type="property" name="The &quot;autoconnect&quot; property" link="NMSettingConnection.html#NMSettingConnection--autoconnect"/>
<keyword type="property" name="The &quot;id&quot; property" link="NMSettingConnection.html#NMSettingConnection--id"/>
+ <keyword type="property" name="The &quot;master&quot; property" link="NMSettingConnection.html#NMSettingConnection--master"/>
<keyword type="property" name="The &quot;permissions&quot; property" link="NMSettingConnection.html#NMSettingConnection--permissions"/>
<keyword type="property" name="The &quot;read-only&quot; property" link="NMSettingConnection.html#NMSettingConnection--read-only"/>
+ <keyword type="property" name="The &quot;slave-type&quot; property" link="NMSettingConnection.html#NMSettingConnection--slave-type"/>
<keyword type="property" name="The &quot;timestamp&quot; property" link="NMSettingConnection.html#NMSettingConnection--timestamp"/>
<keyword type="property" name="The &quot;type&quot; property" link="NMSettingConnection.html#NMSettingConnection--type"/>
<keyword type="property" name="The &quot;uuid&quot; property" link="NMSettingConnection.html#NMSettingConnection--uuid"/>
+ <keyword type="property" name="The &quot;zone&quot; property" link="NMSettingConnection.html#NMSettingConnection--zone"/>
<keyword type="struct" name="NMSettingWired" link="NMSettingWired.html#NMSettingWired-struct"/>
<keyword type="struct" name="NMSettingWiredClass" link="NMSettingWired.html#NMSettingWiredClass"/>
<keyword type="enum" name="enum NMSettingWiredError" link="NMSettingWired.html#NMSettingWiredError-enum"/>
<keyword type="macro" name="NM_SETTING_WIRED_AUTO_NEGOTIATE" link="NMSettingWired.html#NM-SETTING-WIRED-AUTO-NEGOTIATE:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRED_CLONED_MAC_ADDRESS" link="NMSettingWired.html#NM-SETTING-WIRED-CLONED-MAC-ADDRESS:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRED_DUPLEX" link="NMSettingWired.html#NM-SETTING-WIRED-DUPLEX:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_WIRED_ERROR" link="NMSettingWired.html#NM-SETTING-WIRED-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRED_MAC_ADDRESS" link="NMSettingWired.html#NM-SETTING-WIRED-MAC-ADDRESS:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST" link="NMSettingWired.html#NM-SETTING-WIRED-MAC-ADDRESS-BLACKLIST:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRED_MTU" link="NMSettingWired.html#NM-SETTING-WIRED-MTU:CAPS"/>
@@ -189,6 +214,7 @@
<keyword type="macro" name="NM_SETTING_WIRELESS_BSSID" link="NMSettingWireless.html#NM-SETTING-WIRELESS-BSSID:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_CHANNEL" link="NMSettingWireless.html#NM-SETTING-WIRELESS-CHANNEL:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS" link="NMSettingWireless.html#NM-SETTING-WIRELESS-CLONED-MAC-ADDRESS:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_WIRELESS_ERROR" link="NMSettingWireless.html#NM-SETTING-WIRELESS-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_MAC_ADDRESS" link="NMSettingWireless.html#NM-SETTING-WIRELESS-MAC-ADDRESS:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST" link="NMSettingWireless.html#NM-SETTING-WIRELESS-MAC-ADDRESS-BLACKLIST:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_MODE" link="NMSettingWireless.html#NM-SETTING-WIRELESS-MODE:CAPS"/>
@@ -235,8 +261,9 @@
<keyword type="struct" name="NMSettingWirelessSecurity" link="NMSettingWirelessSecurity.html#NMSettingWirelessSecurity-struct"/>
<keyword type="struct" name="NMSettingWirelessSecurityClass" link="NMSettingWirelessSecurity.html#NMSettingWirelessSecurityClass"/>
<keyword type="enum" name="enum NMSettingWirelessSecurityError" link="NMSettingWirelessSecurity.html#NMSettingWirelessSecurityError-enum"/>
- <keyword type="enum" name="enum NMWepKeyType" link="NMSettingWirelessSecurity.html#NMWepKeyType"/>
+ <keyword type="enum" name="enum NMWepKeyType" link="NMSettingWirelessSecurity.html#NMWepKeyType-enum"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_SECURITY_AUTH_ALG" link="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-AUTH-ALG:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_WIRELESS_SECURITY_ERROR" link="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_SECURITY_GROUP" link="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-GROUP:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_SECURITY_KEY_MGMT" link="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-KEY-MGMT:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD" link="NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-LEAP-PASSWORD:CAPS"/>
@@ -304,6 +331,7 @@
<keyword type="struct" name="NMSettingBluetoothClass" link="NMSettingBluetooth.html#NMSettingBluetoothClass"/>
<keyword type="enum" name="enum NMSettingBluetoothError" link="NMSettingBluetooth.html#NMSettingBluetoothError-enum"/>
<keyword type="macro" name="NM_SETTING_BLUETOOTH_BDADDR" link="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-BDADDR:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_BLUETOOTH_ERROR" link="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_BLUETOOTH_SETTING_NAME" link="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-SETTING-NAME:CAPS"/>
<keyword type="macro" name="NM_SETTING_BLUETOOTH_TYPE" link="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE:CAPS"/>
<keyword type="macro" name="NM_SETTING_BLUETOOTH_TYPE_DUN" link="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE-DUN:CAPS"/>
@@ -319,6 +347,7 @@
<keyword type="enum" name="enum NMSettingSerialError" link="NMSettingSerial.html#NMSettingSerialError-enum"/>
<keyword type="macro" name="NM_SETTING_SERIAL_BAUD" link="NMSettingSerial.html#NM-SETTING-SERIAL-BAUD:CAPS"/>
<keyword type="macro" name="NM_SETTING_SERIAL_BITS" link="NMSettingSerial.html#NM-SETTING-SERIAL-BITS:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_SERIAL_ERROR" link="NMSettingSerial.html#NM-SETTING-SERIAL-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_SERIAL_PARITY" link="NMSettingSerial.html#NM-SETTING-SERIAL-PARITY:CAPS"/>
<keyword type="macro" name="NM_SETTING_SERIAL_SEND_DELAY" link="NMSettingSerial.html#NM-SETTING-SERIAL-SEND-DELAY:CAPS"/>
<keyword type="macro" name="NM_SETTING_SERIAL_SETTING_NAME" link="NMSettingSerial.html#NM-SETTING-SERIAL-SETTING-NAME:CAPS"/>
@@ -338,6 +367,7 @@
<keyword type="struct" name="NMSettingCdma" link="NMSettingCdma.html#NMSettingCdma-struct"/>
<keyword type="struct" name="NMSettingCdmaClass" link="NMSettingCdma.html#NMSettingCdmaClass"/>
<keyword type="enum" name="enum NMSettingCdmaError" link="NMSettingCdma.html#NMSettingCdmaError-enum"/>
+ <keyword type="macro" name="NM_SETTING_CDMA_ERROR" link="NMSettingCdma.html#NM-SETTING-CDMA-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_CDMA_NUMBER" link="NMSettingCdma.html#NM-SETTING-CDMA-NUMBER:CAPS"/>
<keyword type="macro" name="NM_SETTING_CDMA_PASSWORD" link="NMSettingCdma.html#NM-SETTING-CDMA-PASSWORD:CAPS"/>
<keyword type="macro" name="NM_SETTING_CDMA_PASSWORD_FLAGS" link="NMSettingCdma.html#NM-SETTING-CDMA-PASSWORD-FLAGS:CAPS"/>
@@ -356,10 +386,11 @@
<keyword type="struct" name="NMSettingGsm" link="NMSettingGsm.html#NMSettingGsm-struct"/>
<keyword type="struct" name="NMSettingGsmClass" link="NMSettingGsm.html#NMSettingGsmClass"/>
<keyword type="enum" name="enum NMSettingGsmError" link="NMSettingGsm.html#NMSettingGsmError-enum"/>
- <keyword type="enum" name="enum NMSettingGsmNetworkBand" link="NMSettingGsm.html#NMSettingGsmNetworkBand"/>
- <keyword type="enum" name="enum NMSettingGsmNetworkType" link="NMSettingGsm.html#NMSettingGsmNetworkType"/>
+ <keyword type="enum" name="enum NMSettingGsmNetworkBand" link="NMSettingGsm.html#NMSettingGsmNetworkBand-enum"/>
+ <keyword type="enum" name="enum NMSettingGsmNetworkType" link="NMSettingGsm.html#NMSettingGsmNetworkType-enum"/>
<keyword type="macro" name="NM_SETTING_GSM_ALLOWED_BANDS" link="NMSettingGsm.html#NM-SETTING-GSM-ALLOWED-BANDS:CAPS"/>
<keyword type="macro" name="NM_SETTING_GSM_APN" link="NMSettingGsm.html#NM-SETTING-GSM-APN:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_GSM_ERROR" link="NMSettingGsm.html#NM-SETTING-GSM-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_GSM_HOME_ONLY" link="NMSettingGsm.html#NM-SETTING-GSM-HOME-ONLY:CAPS"/>
<keyword type="macro" name="NM_SETTING_GSM_NETWORK_ID" link="NMSettingGsm.html#NM-SETTING-GSM-NETWORK-ID:CAPS"/>
<keyword type="macro" name="NM_SETTING_GSM_NETWORK_TYPE" link="NMSettingGsm.html#NM-SETTING-GSM-NETWORK-TYPE:CAPS"/>
@@ -397,6 +428,7 @@
<keyword type="struct" name="NMSettingWimax" link="NMSettingWimax.html#NMSettingWimax-struct"/>
<keyword type="struct" name="NMSettingWimaxClass" link="NMSettingWimax.html#NMSettingWimaxClass"/>
<keyword type="enum" name="enum NMSettingWimaxError" link="NMSettingWimax.html#NMSettingWimaxError-enum"/>
+ <keyword type="macro" name="NM_SETTING_WIMAX_ERROR" link="NMSettingWimax.html#NM-SETTING-WIMAX-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIMAX_MAC_ADDRESS" link="NMSettingWimax.html#NM-SETTING-WIMAX-MAC-ADDRESS:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIMAX_NETWORK_NAME" link="NMSettingWimax.html#NM-SETTING-WIMAX-NETWORK-NAME:CAPS"/>
<keyword type="macro" name="NM_SETTING_WIMAX_SETTING_NAME" link="NMSettingWimax.html#NM-SETTING-WIMAX-SETTING-NAME:CAPS"/>
@@ -411,6 +443,7 @@
<keyword type="enum" name="enum NMSettingOlpcMeshError" link="NMSettingOlpcMesh.html#NMSettingOlpcMeshError-enum"/>
<keyword type="macro" name="NM_SETTING_OLPC_MESH_CHANNEL" link="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-CHANNEL:CAPS"/>
<keyword type="macro" name="NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS" link="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-DHCP-ANYCAST-ADDRESS:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_OLPC_MESH_ERROR" link="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_OLPC_MESH_SETTING_NAME" link="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-SETTING-NAME:CAPS"/>
<keyword type="macro" name="NM_SETTING_OLPC_MESH_SSID" link="NMSettingOlpcMesh.html#NM-SETTING-OLPC-MESH-SSID:CAPS"/>
<keyword type="function" name="nm_setting_olpc_mesh_error_quark ()" link="NMSettingOlpcMesh.html#nm-setting-olpc-mesh-error-quark"/>
@@ -422,8 +455,8 @@
<keyword type="property" name="The &quot;dhcp-anycast-address&quot; property" link="NMSettingOlpcMesh.html#NMSettingOlpcMesh--dhcp-anycast-address"/>
<keyword type="property" name="The &quot;ssid&quot; property" link="NMSettingOlpcMesh.html#NMSettingOlpcMesh--ssid"/>
<keyword type="struct" name="NMSetting8021x" link="NMSetting8021x.html#NMSetting8021x-struct"/>
- <keyword type="enum" name="enum NMSetting8021xCKFormat" link="NMSetting8021x.html#NMSetting8021xCKFormat"/>
- <keyword type="enum" name="enum NMSetting8021xCKScheme" link="NMSetting8021x.html#NMSetting8021xCKScheme"/>
+ <keyword type="enum" name="enum NMSetting8021xCKFormat" link="NMSetting8021x.html#NMSetting8021xCKFormat-enum"/>
+ <keyword type="enum" name="enum NMSetting8021xCKScheme" link="NMSetting8021x.html#NMSetting8021xCKScheme-enum"/>
<keyword type="struct" name="NMSetting8021xClass" link="NMSetting8021x.html#NMSetting8021xClass"/>
<keyword type="enum" name="enum NMSetting8021xError" link="NMSetting8021x.html#NMSetting8021xError-enum"/>
<keyword type="macro" name="NM_SETTING_802_1X_ALTSUBJECT_MATCHES" link="NMSetting8021x.html#NM-SETTING-802-1X-ALTSUBJECT-MATCHES:CAPS"/>
@@ -432,9 +465,13 @@
<keyword type="macro" name="NM_SETTING_802_1X_CA_PATH" link="NMSetting8021x.html#NM-SETTING-802-1X-CA-PATH:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_CLIENT_CERT" link="NMSetting8021x.html#NM-SETTING-802-1X-CLIENT-CERT:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_EAP" link="NMSetting8021x.html#NM-SETTING-802-1X-EAP:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_802_1X_ERROR" link="NMSetting8021x.html#NM-SETTING-802-1X-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_IDENTITY" link="NMSetting8021x.html#NM-SETTING-802-1X-IDENTITY:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_802_1X_PAC_FILE" link="NMSetting8021x.html#NM-SETTING-802-1X-PAC-FILE:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_PASSWORD" link="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_PASSWORD_FLAGS" link="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-FLAGS:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_802_1X_PASSWORD_RAW" link="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_802_1X_PASSWORD_RAW_FLAGS" link="NMSetting8021x.html#NM-SETTING-802-1X-PASSWORD-RAW-FLAGS:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING" link="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-FAST-PROVISIONING:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_PHASE1_PEAPLABEL" link="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-PEAPLABEL:CAPS"/>
<keyword type="macro" name="NM_SETTING_802_1X_PHASE1_PEAPVER" link="NMSetting8021x.html#NM-SETTING-802-1X-PHASE1-PEAPVER:CAPS"/>
@@ -477,8 +514,11 @@
<keyword type="function" name="nm_setting_802_1x_get_num_altsubject_matches ()" link="NMSetting8021x.html#nm-setting-802-1x-get-num-altsubject-matches"/>
<keyword type="function" name="nm_setting_802_1x_get_num_eap_methods ()" link="NMSetting8021x.html#nm-setting-802-1x-get-num-eap-methods"/>
<keyword type="function" name="nm_setting_802_1x_get_num_phase2_altsubject_matches ()" link="NMSetting8021x.html#nm-setting-802-1x-get-num-phase2-altsubject-matches"/>
+ <keyword type="function" name="nm_setting_802_1x_get_pac_file ()" link="NMSetting8021x.html#nm-setting-802-1x-get-pac-file"/>
<keyword type="function" name="nm_setting_802_1x_get_password ()" link="NMSetting8021x.html#nm-setting-802-1x-get-password"/>
<keyword type="function" name="nm_setting_802_1x_get_password_flags ()" link="NMSetting8021x.html#nm-setting-802-1x-get-password-flags"/>
+ <keyword type="function" name="nm_setting_802_1x_get_password_raw ()" link="NMSetting8021x.html#nm-setting-802-1x-get-password-raw"/>
+ <keyword type="function" name="nm_setting_802_1x_get_password_raw_flags ()" link="NMSetting8021x.html#nm-setting-802-1x-get-password-raw-flags"/>
<keyword type="function" name="nm_setting_802_1x_get_phase1_fast_provisioning ()" link="NMSetting8021x.html#nm-setting-802-1x-get-phase1-fast-provisioning"/>
<keyword type="function" name="nm_setting_802_1x_get_phase1_peaplabel ()" link="NMSetting8021x.html#nm-setting-802-1x-get-phase1-peaplabel"/>
<keyword type="function" name="nm_setting_802_1x_get_phase1_peapver ()" link="NMSetting8021x.html#nm-setting-802-1x-get-phase1-peapver"/>
@@ -526,8 +566,11 @@
<keyword type="property" name="The &quot;client-cert&quot; property" link="NMSetting8021x.html#NMSetting8021x--client-cert"/>
<keyword type="property" name="The &quot;eap&quot; property" link="NMSetting8021x.html#NMSetting8021x--eap"/>
<keyword type="property" name="The &quot;identity&quot; property" link="NMSetting8021x.html#NMSetting8021x--identity"/>
+ <keyword type="property" name="The &quot;pac-file&quot; property" link="NMSetting8021x.html#NMSetting8021x--pac-file"/>
<keyword type="property" name="The &quot;password&quot; property" link="NMSetting8021x.html#NMSetting8021x--password"/>
<keyword type="property" name="The &quot;password-flags&quot; property" link="NMSetting8021x.html#NMSetting8021x--password-flags"/>
+ <keyword type="property" name="The &quot;password-raw&quot; property" link="NMSetting8021x.html#NMSetting8021x--password-raw"/>
+ <keyword type="property" name="The &quot;password-raw-flags&quot; property" link="NMSetting8021x.html#NMSetting8021x--password-raw-flags"/>
<keyword type="property" name="The &quot;phase1-fast-provisioning&quot; property" link="NMSetting8021x.html#NMSetting8021x--phase1-fast-provisioning"/>
<keyword type="property" name="The &quot;phase1-peaplabel&quot; property" link="NMSetting8021x.html#NMSetting8021x--phase1-peaplabel"/>
<keyword type="property" name="The &quot;phase1-peapver&quot; property" link="NMSetting8021x.html#NMSetting8021x--phase1-peapver"/>
@@ -557,6 +600,7 @@
<keyword type="macro" name="NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DHCP-SEND-HOSTNAME:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP4_CONFIG_DNS" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DNS:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP4_CONFIG_DNS_SEARCH" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-DNS-SEARCH:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_IP4_CONFIG_ERROR" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-IGNORE-AUTO-DNS:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-IGNORE-AUTO-ROUTES:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP4_CONFIG_MAY_FAIL" link="NMSettingIP4Config.html#NM-SETTING-IP4-CONFIG-MAY-FAIL:CAPS"/>
@@ -640,11 +684,14 @@
<keyword type="struct" name="NMSettingIP6Config" link="NMSettingIP6Config.html#NMSettingIP6Config-struct"/>
<keyword type="struct" name="NMSettingIP6ConfigClass" link="NMSettingIP6Config.html#NMSettingIP6ConfigClass"/>
<keyword type="enum" name="enum NMSettingIP6ConfigError" link="NMSettingIP6Config.html#NMSettingIP6ConfigError-enum"/>
+ <keyword type="enum" name="enum NMSettingIP6ConfigPrivacy" link="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy-enum"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_ADDRESSES" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ADDRESSES:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_DNS" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-DNS:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_DNS_SEARCH" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-DNS-SEARCH:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_IP6_CONFIG_ERROR" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IGNORE-AUTO-DNS:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IGNORE-AUTO-ROUTES:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_IP6_CONFIG_IP6_PRIVACY" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-IP6-PRIVACY:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_MAY_FAIL" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-MAY-FAIL:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_METHOD" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-METHOD:CAPS"/>
<keyword type="macro" name="NM_SETTING_IP6_CONFIG_METHOD_AUTO" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-METHOD-AUTO:CAPS"/>
@@ -694,6 +741,7 @@
<keyword type="function" name="nm_setting_ip6_config_get_dns_search ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-dns-search"/>
<keyword type="function" name="nm_setting_ip6_config_get_ignore_auto_dns ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-ignore-auto-dns"/>
<keyword type="function" name="nm_setting_ip6_config_get_ignore_auto_routes ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-ignore-auto-routes"/>
+ <keyword type="function" name="nm_setting_ip6_config_get_ip6_privacy ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-ip6-privacy"/>
<keyword type="function" name="nm_setting_ip6_config_get_may_fail ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-may-fail"/>
<keyword type="function" name="nm_setting_ip6_config_get_method ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-method"/>
<keyword type="function" name="nm_setting_ip6_config_get_never_default ()" link="NMSettingIP6Config.html#nm-setting-ip6-config-get-never-default"/>
@@ -712,6 +760,7 @@
<keyword type="property" name="The &quot;dns-search&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--dns-search"/>
<keyword type="property" name="The &quot;ignore-auto-dns&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--ignore-auto-dns"/>
<keyword type="property" name="The &quot;ignore-auto-routes&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--ignore-auto-routes"/>
+ <keyword type="property" name="The &quot;ip6-privacy&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--ip6-privacy"/>
<keyword type="property" name="The &quot;may-fail&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--may-fail"/>
<keyword type="property" name="The &quot;method&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--method"/>
<keyword type="property" name="The &quot;never-default&quot; property" link="NMSettingIP6Config.html#NMSettingIP6Config--never-default"/>
@@ -721,6 +770,7 @@
<keyword type="enum" name="enum NMSettingPPPError" link="NMSettingPPP.html#NMSettingPPPError-enum"/>
<keyword type="macro" name="NM_SETTING_PPP_BAUD" link="NMSettingPPP.html#NM-SETTING-PPP-BAUD:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPP_CRTSCTS" link="NMSettingPPP.html#NM-SETTING-PPP-CRTSCTS:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_PPP_ERROR" link="NMSettingPPP.html#NM-SETTING-PPP-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPP_LCP_ECHO_FAILURE" link="NMSettingPPP.html#NM-SETTING-PPP-LCP-ECHO-FAILURE:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPP_LCP_ECHO_INTERVAL" link="NMSettingPPP.html#NM-SETTING-PPP-LCP-ECHO-INTERVAL:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPP_MPPE_STATEFUL" link="NMSettingPPP.html#NM-SETTING-PPP-MPPE-STATEFUL:CAPS"/>
@@ -779,6 +829,7 @@
<keyword type="struct" name="NMSettingPPPOE" link="NMSettingPPPOE.html#NMSettingPPPOE-struct"/>
<keyword type="struct" name="NMSettingPPPOEClass" link="NMSettingPPPOE.html#NMSettingPPPOEClass"/>
<keyword type="enum" name="enum NMSettingPPPOEError" link="NMSettingPPPOE.html#NMSettingPPPOEError-enum"/>
+ <keyword type="macro" name="NM_SETTING_PPPOE_ERROR" link="NMSettingPPPOE.html#NM-SETTING-PPPOE-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPPOE_PASSWORD" link="NMSettingPPPOE.html#NM-SETTING-PPPOE-PASSWORD:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPPOE_PASSWORD_FLAGS" link="NMSettingPPPOE.html#NM-SETTING-PPPOE-PASSWORD-FLAGS:CAPS"/>
<keyword type="macro" name="NM_SETTING_PPPOE_SERVICE" link="NMSettingPPPOE.html#NM-SETTING-PPPOE-SERVICE:CAPS"/>
@@ -799,6 +850,7 @@
<keyword type="enum" name="enum NMSettingVpnError" link="NMSettingVPN.html#NMSettingVpnError-enum"/>
<keyword type="function" name="NMVPNIterFunc ()" link="NMSettingVPN.html#NMVPNIterFunc"/>
<keyword type="macro" name="NM_SETTING_VPN_DATA" link="NMSettingVPN.html#NM-SETTING-VPN-DATA:CAPS"/>
+ <keyword type="macro" name="NM_SETTING_VPN_ERROR" link="NMSettingVPN.html#NM-SETTING-VPN-ERROR:CAPS"/>
<keyword type="macro" name="NM_SETTING_VPN_SECRETS" link="NMSettingVPN.html#NM-SETTING-VPN-SECRETS:CAPS"/>
<keyword type="macro" name="NM_SETTING_VPN_SERVICE_TYPE" link="NMSettingVPN.html#NM-SETTING-VPN-SERVICE-TYPE:CAPS"/>
<keyword type="macro" name="NM_SETTING_VPN_SETTING_NAME" link="NMSettingVPN.html#NM-SETTING-VPN-SETTING-NAME:CAPS"/>
@@ -809,6 +861,8 @@
<keyword type="function" name="nm_setting_vpn_foreach_data_item ()" link="NMSettingVPN.html#nm-setting-vpn-foreach-data-item"/>
<keyword type="function" name="nm_setting_vpn_foreach_secret ()" link="NMSettingVPN.html#nm-setting-vpn-foreach-secret"/>
<keyword type="function" name="nm_setting_vpn_get_data_item ()" link="NMSettingVPN.html#nm-setting-vpn-get-data-item"/>
+ <keyword type="function" name="nm_setting_vpn_get_num_data_items ()" link="NMSettingVPN.html#nm-setting-vpn-get-num-data-items"/>
+ <keyword type="function" name="nm_setting_vpn_get_num_secrets ()" link="NMSettingVPN.html#nm-setting-vpn-get-num-secrets"/>
<keyword type="function" name="nm_setting_vpn_get_secret ()" link="NMSettingVPN.html#nm-setting-vpn-get-secret"/>
<keyword type="function" name="nm_setting_vpn_get_service_type ()" link="NMSettingVPN.html#nm-setting-vpn-get-service-type"/>
<keyword type="function" name="nm_setting_vpn_get_user_name ()" link="NMSettingVPN.html#nm-setting-vpn-get-user-name"/>
@@ -819,10 +873,16 @@
<keyword type="property" name="The &quot;secrets&quot; property" link="NMSettingVPN.html#NMSettingVPN--secrets"/>
<keyword type="property" name="The &quot;service-type&quot; property" link="NMSettingVPN.html#NMSettingVPN--service-type"/>
<keyword type="property" name="The &quot;user-name&quot; property" link="NMSettingVPN.html#NMSettingVPN--user-name"/>
- <keyword type="enum" name="enum NMUtilsSecurityType" link="libnm-util-nm-utils.html#NMUtilsSecurityType"/>
+ <keyword type="enum" name="enum NMUtilsSecurityType" link="libnm-util-nm-utils.html#NMUtilsSecurityType-enum"/>
+ <keyword type="macro" name="NM_UTILS_HWADDR_LEN_MAX" link="libnm-util-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS"/>
<keyword type="function" name="nm_utils_deinit ()" link="libnm-util-nm-utils.html#nm-utils-deinit"/>
<keyword type="function" name="nm_utils_escape_ssid ()" link="libnm-util-nm-utils.html#nm-utils-escape-ssid"/>
<keyword type="function" name="nm_utils_gvalue_hash_dup ()" link="libnm-util-nm-utils.html#nm-utils-gvalue-hash-dup"/>
+ <keyword type="function" name="nm_utils_hwaddr_atoba ()" link="libnm-util-nm-utils.html#nm-utils-hwaddr-atoba"/>
+ <keyword type="function" name="nm_utils_hwaddr_aton ()" link="libnm-util-nm-utils.html#nm-utils-hwaddr-aton"/>
+ <keyword type="function" name="nm_utils_hwaddr_len ()" link="libnm-util-nm-utils.html#nm-utils-hwaddr-len"/>
+ <keyword type="function" name="nm_utils_hwaddr_ntoa ()" link="libnm-util-nm-utils.html#nm-utils-hwaddr-ntoa"/>
+ <keyword type="function" name="nm_utils_hwaddr_type ()" link="libnm-util-nm-utils.html#nm-utils-hwaddr-type"/>
<keyword type="function" name="nm_utils_init ()" link="libnm-util-nm-utils.html#nm-utils-init"/>
<keyword type="function" name="nm_utils_ip4_addresses_from_gvalue ()" link="libnm-util-nm-utils.html#nm-utils-ip4-addresses-from-gvalue"/>
<keyword type="function" name="nm_utils_ip4_addresses_to_gvalue ()" link="libnm-util-nm-utils.html#nm-utils-ip4-addresses-to-gvalue"/>
@@ -877,6 +937,7 @@
<keyword type="constant" name="NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-INVALID-PROPERTY:CAPS"/>
<keyword type="constant" name="NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-MISSING-PROPERTY:CAPS"/>
<keyword type="constant" name="NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-TYPE-SETTING-NOT-FOUND:CAPS"/>
+ <keyword type="constant" name="NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED" link="NMSettingConnection.html#NM-SETTING-CONNECTION-ERROR-IP-CONFIG-NOT-ALLOWED:CAPS"/>
<keyword type="constant" name="NM_SETTING_WIRED_ERROR_UNKNOWN" link="NMSettingWired.html#NM-SETTING-WIRED-ERROR-UNKNOWN:CAPS"/>
<keyword type="constant" name="NM_SETTING_WIRED_ERROR_INVALID_PROPERTY" link="NMSettingWired.html#NM-SETTING-WIRED-ERROR-INVALID-PROPERTY:CAPS"/>
<keyword type="constant" name="NM_SETTING_WIRED_ERROR_MISSING_PROPERTY" link="NMSettingWired.html#NM-SETTING-WIRED-ERROR-MISSING-PROPERTY:CAPS"/>
@@ -953,6 +1014,10 @@
<keyword type="constant" name="NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR-INVALID-PROPERTY:CAPS"/>
<keyword type="constant" name="NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR-MISSING-PROPERTY:CAPS"/>
<keyword type="constant" name="NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-ERROR-NOT-ALLOWED-FOR-METHOD:CAPS"/>
+ <keyword type="constant" name="NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-UNKNOWN:CAPS"/>
+ <keyword type="constant" name="NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-DISABLED:CAPS"/>
+ <keyword type="constant" name="NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-PUBLIC-ADDR:CAPS"/>
+ <keyword type="constant" name="NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR" link="NMSettingIP6Config.html#NM-SETTING-IP6-CONFIG-PRIVACY-PREFER-TEMP-ADDR:CAPS"/>
<keyword type="constant" name="NM_SETTING_PPP_ERROR_UNKNOWN" link="NMSettingPPP.html#NM-SETTING-PPP-ERROR-UNKNOWN:CAPS"/>
<keyword type="constant" name="NM_SETTING_PPP_ERROR_INVALID_PROPERTY" link="NMSettingPPP.html#NM-SETTING-PPP-ERROR-INVALID-PROPERTY:CAPS"/>
<keyword type="constant" name="NM_SETTING_PPP_ERROR_MISSING_PROPERTY" link="NMSettingPPP.html#NM-SETTING-PPP-ERROR-MISSING-PROPERTY:CAPS"/>
diff --git a/docs/libnm-util/html/object-tree.html b/docs/libnm-util/html/object-tree.html
index e0e264188..8670ba6c5 100644
--- a/docs/libnm-util/html/object-tree.html
+++ b/docs/libnm-util/html/object-tree.html
@@ -28,15 +28,18 @@
<a class="link" href="NMSetting.html" title="NMSetting">NMSetting</a>
<a class="link" href="NMSetting8021x.html" title="NMSetting8021x">NMSetting8021x</a>
<a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth">NMSettingBluetooth</a>
+ NMSettingBond
<a class="link" href="NMSettingCdma.html" title="NMSettingCdma">NMSettingCdma</a>
<a class="link" href="NMSettingConnection.html" title="NMSettingConnection">NMSettingConnection</a>
<a class="link" href="NMSettingGsm.html" title="NMSettingGsm">NMSettingGsm</a>
+ NMSettingInfiniband
<a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config">NMSettingIP4Config</a>
<a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config">NMSettingIP6Config</a>
<a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh">NMSettingOlpcMesh</a>
<a class="link" href="NMSettingPPP.html" title="NMSettingPPP">NMSettingPPP</a>
<a class="link" href="NMSettingPPPOE.html" title="NMSettingPPPOE">NMSettingPPPOE</a>
<a class="link" href="NMSettingSerial.html" title="NMSettingSerial">NMSettingSerial</a>
+ NMSettingVlan
<a class="link" href="NMSettingVPN.html" title="NMSettingVPN">NMSettingVPN</a>
<a class="link" href="NMSettingWimax.html" title="NMSettingWimax">NMSettingWimax</a>
<a class="link" href="NMSettingWired.html" title="NMSettingWired">NMSettingWired</a>
@@ -44,23 +47,39 @@
<a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity">NMSettingWirelessSecurity</a>
GEnum
<a class="link" href="NMConnection.html#NMConnectionError">NMConnectionError</a>
+ <a class="link" href="NMSetting8021x.html#NMSetting8021xCKFormat">NMSetting8021xCKFormat</a>
+ <a class="link" href="NMSetting8021x.html#NMSetting8021xCKScheme">NMSetting8021xCKScheme</a>
<a class="link" href="NMSetting8021x.html#NMSetting8021xError">NMSetting8021xError</a>
<a class="link" href="NMSettingBluetooth.html#NMSettingBluetoothError">NMSettingBluetoothError</a>
+ NMSettingBondError
<a class="link" href="NMSettingCdma.html#NMSettingCdmaError">NMSettingCdmaError</a>
+ <a class="link" href="NMSetting.html#NMSettingCompareFlags">NMSettingCompareFlags</a>
<a class="link" href="NMSettingConnection.html#NMSettingConnectionError">NMSettingConnectionError</a>
+ <a class="link" href="NMSetting.html#NMSettingDiffResult">NMSettingDiffResult</a>
<a class="link" href="NMSetting.html#NMSettingError">NMSettingError</a>
<a class="link" href="NMSettingGsm.html#NMSettingGsmError">NMSettingGsmError</a>
+ <a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkBand">NMSettingGsmNetworkBand</a>
+ <a class="link" href="NMSettingGsm.html#NMSettingGsmNetworkType">NMSettingGsmNetworkType</a>
+ <a class="link" href="NMSetting.html#NMSettingHashFlags">NMSettingHashFlags</a>
+ NMSettingInfinibandError
<a class="link" href="NMSettingIP4Config.html#NMSettingIP4ConfigError">NMSettingIP4ConfigError</a>
<a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigError">NMSettingIP6ConfigError</a>
+ <a class="link" href="NMSettingIP6Config.html#NMSettingIP6ConfigPrivacy">NMSettingIP6ConfigPrivacy</a>
<a class="link" href="NMSettingOlpcMesh.html#NMSettingOlpcMeshError">NMSettingOlpcMeshError</a>
<a class="link" href="NMSettingPPP.html#NMSettingPPPError">NMSettingPPPError</a>
<a class="link" href="NMSettingPPPOE.html#NMSettingPPPOEError">NMSettingPPPOEError</a>
+ <a class="link" href="NMSetting.html#NMSettingSecretFlags">NMSettingSecretFlags</a>
<a class="link" href="NMSettingSerial.html#NMSettingSerialError">NMSettingSerialError</a>
+ NMSettingVlanError
<a class="link" href="NMSettingVPN.html#NMSettingVpnError">NMSettingVpnError</a>
<a class="link" href="NMSettingWimax.html#NMSettingWimaxError">NMSettingWimaxError</a>
<a class="link" href="NMSettingWired.html#NMSettingWiredError">NMSettingWiredError</a>
<a class="link" href="NMSettingWireless.html#NMSettingWirelessError">NMSettingWirelessError</a>
<a class="link" href="NMSettingWirelessSecurity.html#NMSettingWirelessSecurityError">NMSettingWirelessSecurityError</a>
+ <a class="link" href="libnm-util-nm-utils.html#NMUtilsSecurityType">NMUtilsSecurityType</a>
+ NMVlanFlags
+ NMVlanPriorityMap
+ <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType">NMWepKeyType</a>
GBoxed
<a class="link" href="NMSettingIP4Config.html#NMIP4Address">NMIP4Address</a>
<a class="link" href="NMSettingIP4Config.html#NMIP4Route">NMIP4Route</a>
diff --git a/docs/libnm-util/libnm-util-sections.txt b/docs/libnm-util/libnm-util-sections.txt
index 2977214c6..a278e8e8e 100644
--- a/docs/libnm-util/libnm-util-sections.txt
+++ b/docs/libnm-util/libnm-util-sections.txt
@@ -4,6 +4,7 @@
NMConnection
NMConnectionClass
NMConnectionError
+NM_CONNECTION_ERROR
NM_CONNECTION_PATH
nm_connection_add_setting
nm_connection_clear_secrets
@@ -20,21 +21,26 @@ nm_connection_get_path
nm_connection_get_setting
nm_connection_get_setting_802_1x
nm_connection_get_setting_bluetooth
+nm_connection_get_setting_bond
nm_connection_get_setting_by_name
nm_connection_get_setting_cdma
nm_connection_get_setting_connection
nm_connection_get_setting_gsm
+nm_connection_get_setting_infiniband
nm_connection_get_setting_ip4_config
nm_connection_get_setting_ip6_config
nm_connection_get_setting_olpc_mesh
nm_connection_get_setting_ppp
nm_connection_get_setting_pppoe
+nm_connection_get_setting_serial
+nm_connection_get_setting_vlan
nm_connection_get_setting_vpn
nm_connection_get_setting_wimax
nm_connection_get_setting_wired
nm_connection_get_setting_wireless
nm_connection_get_setting_wireless_security
nm_connection_get_uuid
+nm_connection_get_virtual_iface_name
nm_connection_is_type
nm_connection_lookup_setting_type
nm_connection_lookup_setting_type_by_quark
@@ -50,13 +56,10 @@ nm_connection_verify
<SUBSECTION Standard>
NM_CONNECTION
NM_CONNECTION_CLASS
-NM_CONNECTION_ERROR
NM_CONNECTION_GET_CLASS
NM_IS_CONNECTION
NM_IS_CONNECTION_CLASS
NM_TYPE_CONNECTION
-NM_TYPE_CONNECTION_ERROR
-nm_connection_error_get_type
nm_connection_get_type
</SECTION>
@@ -72,6 +75,7 @@ NMSettingError
NMSettingHashFlags
NMSettingSecretFlags
NMSettingValueIterFn
+NM_SETTING_ERROR
NM_SETTING_NAME
NM_SETTING_PARAM_FUZZY_IGNORE
NM_SETTING_PARAM_REQUIRED
@@ -86,6 +90,7 @@ nm_setting_enumerate_values
nm_setting_error_quark
nm_setting_get_name
nm_setting_get_secret_flags
+nm_setting_get_virtual_iface_name
nm_setting_need_secrets
nm_setting_new_from_hash
nm_setting_set_secret_flags
@@ -98,11 +103,8 @@ NM_IS_SETTING
NM_IS_SETTING_CLASS
NM_SETTING
NM_SETTING_CLASS
-NM_SETTING_ERROR
NM_SETTING_GET_CLASS
NM_TYPE_SETTING
-NM_TYPE_SETTING_ERROR
-nm_setting_error_get_type
nm_setting_get_type
</SECTION>
@@ -120,9 +122,13 @@ NM_SETTING_802_1X_CA_CERT
NM_SETTING_802_1X_CA_PATH
NM_SETTING_802_1X_CLIENT_CERT
NM_SETTING_802_1X_EAP
+NM_SETTING_802_1X_ERROR
NM_SETTING_802_1X_IDENTITY
+NM_SETTING_802_1X_PAC_FILE
NM_SETTING_802_1X_PASSWORD
NM_SETTING_802_1X_PASSWORD_FLAGS
+NM_SETTING_802_1X_PASSWORD_RAW
+NM_SETTING_802_1X_PASSWORD_RAW_FLAGS
NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING
NM_SETTING_802_1X_PHASE1_PEAPLABEL
NM_SETTING_802_1X_PHASE1_PEAPVER
@@ -165,8 +171,11 @@ nm_setting_802_1x_get_identity
nm_setting_802_1x_get_num_altsubject_matches
nm_setting_802_1x_get_num_eap_methods
nm_setting_802_1x_get_num_phase2_altsubject_matches
+nm_setting_802_1x_get_pac_file
nm_setting_802_1x_get_password
nm_setting_802_1x_get_password_flags
+nm_setting_802_1x_get_password_raw
+nm_setting_802_1x_get_password_raw_flags
nm_setting_802_1x_get_phase1_fast_provisioning
nm_setting_802_1x_get_phase1_peaplabel
nm_setting_802_1x_get_phase1_peapver
@@ -212,11 +221,8 @@ NM_IS_SETTING_802_1X
NM_IS_SETTING_802_1X_CLASS
NM_SETTING_802_1X
NM_SETTING_802_1X_CLASS
-NM_SETTING_802_1X_ERROR
NM_SETTING_802_1X_GET_CLASS
NM_TYPE_SETTING_802_1X
-NM_TYPE_SETTING_802_1X_ERROR
-nm_setting_802_1x_error_get_type
nm_setting_802_1x_get_type
</SECTION>
@@ -227,6 +233,7 @@ NMSettingBluetooth
NMSettingBluetoothClass
NMSettingBluetoothError
NM_SETTING_BLUETOOTH_BDADDR
+NM_SETTING_BLUETOOTH_ERROR
NM_SETTING_BLUETOOTH_SETTING_NAME
NM_SETTING_BLUETOOTH_TYPE
NM_SETTING_BLUETOOTH_TYPE_DUN
@@ -240,20 +247,54 @@ NM_IS_SETTING_BLUETOOTH
NM_IS_SETTING_BLUETOOTH_CLASS
NM_SETTING_BLUETOOTH
NM_SETTING_BLUETOOTH_CLASS
-NM_SETTING_BLUETOOTH_ERROR
NM_SETTING_BLUETOOTH_GET_CLASS
NM_TYPE_SETTING_BLUETOOTH
-NM_TYPE_SETTING_BLUETOOTH_ERROR
-nm_setting_bluetooth_error_get_type
nm_setting_bluetooth_get_type
</SECTION>
<SECTION>
+<FILE>nm-setting-bond</FILE>
+<TITLE>NMSettingBond</TITLE>
+NMSettingBond
+NMSettingBondClass
+NMSettingBondError
+NM_SETTING_BOND_ERROR
+NM_SETTING_BOND_INTERFACE_NAME
+NM_SETTING_BOND_OPTIONS
+NM_SETTING_BOND_OPTION_ARP_INTERVAL
+NM_SETTING_BOND_OPTION_ARP_IP_TARGET
+NM_SETTING_BOND_OPTION_DOWNDELAY
+NM_SETTING_BOND_OPTION_MIIMON
+NM_SETTING_BOND_OPTION_MODE
+NM_SETTING_BOND_OPTION_UPDELAY
+NM_SETTING_BOND_SETTING_NAME
+nm_setting_bond_add_option
+nm_setting_bond_error_quark
+nm_setting_bond_get_interface_name
+nm_setting_bond_get_num_options
+nm_setting_bond_get_option
+nm_setting_bond_get_option_by_name
+nm_setting_bond_get_option_default
+nm_setting_bond_get_valid_options
+nm_setting_bond_new
+nm_setting_bond_remove_option
+<SUBSECTION Standard>
+NM_IS_SETTING_BOND
+NM_IS_SETTING_BOND_CLASS
+NM_SETTING_BOND
+NM_SETTING_BOND_CLASS
+NM_SETTING_BOND_GET_CLASS
+NM_TYPE_SETTING_BOND
+nm_setting_bond_get_type
+</SECTION>
+
+<SECTION>
<FILE>nm-setting-cdma</FILE>
<TITLE>NMSettingCdma</TITLE>
NMSettingCdma
NMSettingCdmaClass
NMSettingCdmaError
+NM_SETTING_CDMA_ERROR
NM_SETTING_CDMA_NUMBER
NM_SETTING_CDMA_PASSWORD
NM_SETTING_CDMA_PASSWORD_FLAGS
@@ -270,11 +311,8 @@ NM_IS_SETTING_CDMA
NM_IS_SETTING_CDMA_CLASS
NM_SETTING_CDMA
NM_SETTING_CDMA_CLASS
-NM_SETTING_CDMA_ERROR
NM_SETTING_CDMA_GET_CLASS
NM_TYPE_SETTING_CDMA
-NM_TYPE_SETTING_CDMA_ERROR
-nm_setting_cdma_error_get_type
nm_setting_cdma_get_type
</SECTION>
@@ -285,23 +323,36 @@ NMSettingConnection
NMSettingConnectionClass
NMSettingConnectionError
NM_SETTING_CONNECTION_AUTOCONNECT
+NM_SETTING_CONNECTION_ERROR
NM_SETTING_CONNECTION_ID
+NM_SETTING_CONNECTION_MASTER
NM_SETTING_CONNECTION_PERMISSIONS
NM_SETTING_CONNECTION_READ_ONLY
NM_SETTING_CONNECTION_SETTING_NAME
+NM_SETTING_CONNECTION_SLAVE_TYPE
NM_SETTING_CONNECTION_TIMESTAMP
NM_SETTING_CONNECTION_TYPE
NM_SETTING_CONNECTION_UUID
+NM_SETTING_CONNECTION_ZONE
+NM_SETTING_CONNECTION_ZONE_BLOCK
+NM_SETTING_CONNECTION_ZONE_HOME
+NM_SETTING_CONNECTION_ZONE_PUBLIC
+NM_SETTING_CONNECTION_ZONE_TRUSTED
+NM_SETTING_CONNECTION_ZONE_WORK
nm_setting_connection_add_permission
nm_setting_connection_error_quark
nm_setting_connection_get_autoconnect
nm_setting_connection_get_connection_type
nm_setting_connection_get_id
+nm_setting_connection_get_master
nm_setting_connection_get_num_permissions
nm_setting_connection_get_permission
nm_setting_connection_get_read_only
+nm_setting_connection_get_slave_type
nm_setting_connection_get_timestamp
nm_setting_connection_get_uuid
+nm_setting_connection_get_zone
+nm_setting_connection_is_slave_type
nm_setting_connection_new
nm_setting_connection_permissions_user_allowed
nm_setting_connection_remove_permission
@@ -310,11 +361,8 @@ NM_IS_SETTING_CONNECTION
NM_IS_SETTING_CONNECTION_CLASS
NM_SETTING_CONNECTION
NM_SETTING_CONNECTION_CLASS
-NM_SETTING_CONNECTION_ERROR
NM_SETTING_CONNECTION_GET_CLASS
NM_TYPE_SETTING_CONNECTION
-NM_TYPE_SETTING_CONNECTION_ERROR
-nm_setting_connection_error_get_type
nm_setting_connection_get_type
</SECTION>
@@ -328,6 +376,7 @@ NMSettingGsmNetworkBand
NMSettingGsmNetworkType
NM_SETTING_GSM_ALLOWED_BANDS
NM_SETTING_GSM_APN
+NM_SETTING_GSM_ERROR
NM_SETTING_GSM_HOME_ONLY
NM_SETTING_GSM_NETWORK_ID
NM_SETTING_GSM_NETWORK_TYPE
@@ -356,15 +405,38 @@ NM_IS_SETTING_GSM
NM_IS_SETTING_GSM_CLASS
NM_SETTING_GSM
NM_SETTING_GSM_CLASS
-NM_SETTING_GSM_ERROR
NM_SETTING_GSM_GET_CLASS
NM_TYPE_SETTING_GSM
-NM_TYPE_SETTING_GSM_ERROR
-nm_setting_gsm_error_get_type
nm_setting_gsm_get_type
</SECTION>
<SECTION>
+<FILE>nm-setting-infiniband</FILE>
+<TITLE>NMSettingInfiniband</TITLE>
+NMSettingInfiniband
+NMSettingInfinibandClass
+NMSettingInfinibandError
+NM_SETTING_INFINIBAND_ERROR
+NM_SETTING_INFINIBAND_MAC_ADDRESS
+NM_SETTING_INFINIBAND_MTU
+NM_SETTING_INFINIBAND_SETTING_NAME
+NM_SETTING_INFINIBAND_TRANSPORT_MODE
+nm_setting_infiniband_error_quark
+nm_setting_infiniband_get_mac_address
+nm_setting_infiniband_get_mtu
+nm_setting_infiniband_get_transport_mode
+nm_setting_infiniband_new
+<SUBSECTION Standard>
+NM_IS_SETTING_INFINIBAND
+NM_IS_SETTING_INFINIBAND_CLASS
+NM_SETTING_INFINIBAND
+NM_SETTING_INFINIBAND_CLASS
+NM_SETTING_INFINIBAND_GET_CLASS
+NM_TYPE_SETTING_INFINIBAND
+nm_setting_infiniband_get_type
+</SECTION>
+
+<SECTION>
<FILE>nm-setting-ip4-config</FILE>
<TITLE>NMSettingIP4Config</TITLE>
NMIP4Address
@@ -378,6 +450,7 @@ NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME
NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME
NM_SETTING_IP4_CONFIG_DNS
NM_SETTING_IP4_CONFIG_DNS_SEARCH
+NM_SETTING_IP4_CONFIG_ERROR
NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS
NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES
NM_SETTING_IP4_CONFIG_MAY_FAIL
@@ -449,13 +522,10 @@ NM_IS_SETTING_IP4_CONFIG
NM_IS_SETTING_IP4_CONFIG_CLASS
NM_SETTING_IP4_CONFIG
NM_SETTING_IP4_CONFIG_CLASS
-NM_SETTING_IP4_CONFIG_ERROR
NM_SETTING_IP4_CONFIG_GET_CLASS
NM_TYPE_SETTING_IP4_CONFIG
-NM_TYPE_SETTING_IP4_CONFIG_ERROR
nm_ip4_address_get_type
nm_ip4_route_get_type
-nm_setting_ip4_config_error_get_type
nm_setting_ip4_config_get_type
</SECTION>
@@ -467,11 +537,14 @@ NMIP6Route
NMSettingIP6Config
NMSettingIP6ConfigClass
NMSettingIP6ConfigError
+NMSettingIP6ConfigPrivacy
NM_SETTING_IP6_CONFIG_ADDRESSES
NM_SETTING_IP6_CONFIG_DNS
NM_SETTING_IP6_CONFIG_DNS_SEARCH
+NM_SETTING_IP6_CONFIG_ERROR
NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS
NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES
+NM_SETTING_IP6_CONFIG_IP6_PRIVACY
NM_SETTING_IP6_CONFIG_MAY_FAIL
NM_SETTING_IP6_CONFIG_METHOD
NM_SETTING_IP6_CONFIG_METHOD_AUTO
@@ -521,6 +594,7 @@ nm_setting_ip6_config_get_dns
nm_setting_ip6_config_get_dns_search
nm_setting_ip6_config_get_ignore_auto_dns
nm_setting_ip6_config_get_ignore_auto_routes
+nm_setting_ip6_config_get_ip6_privacy
nm_setting_ip6_config_get_may_fail
nm_setting_ip6_config_get_method
nm_setting_ip6_config_get_never_default
@@ -539,13 +613,10 @@ NM_IS_SETTING_IP6_CONFIG
NM_IS_SETTING_IP6_CONFIG_CLASS
NM_SETTING_IP6_CONFIG
NM_SETTING_IP6_CONFIG_CLASS
-NM_SETTING_IP6_CONFIG_ERROR
NM_SETTING_IP6_CONFIG_GET_CLASS
NM_TYPE_SETTING_IP6_CONFIG
-NM_TYPE_SETTING_IP6_CONFIG_ERROR
nm_ip6_address_get_type
nm_ip6_route_get_type
-nm_setting_ip6_config_error_get_type
nm_setting_ip6_config_get_type
</SECTION>
@@ -557,6 +628,7 @@ NMSettingOlpcMeshClass
NMSettingOlpcMeshError
NM_SETTING_OLPC_MESH_CHANNEL
NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS
+NM_SETTING_OLPC_MESH_ERROR
NM_SETTING_OLPC_MESH_SETTING_NAME
NM_SETTING_OLPC_MESH_SSID
nm_setting_olpc_mesh_error_quark
@@ -569,11 +641,8 @@ NM_IS_SETTING_OLPC_MESH
NM_IS_SETTING_OLPC_MESH_CLASS
NM_SETTING_OLPC_MESH
NM_SETTING_OLPC_MESH_CLASS
-NM_SETTING_OLPC_MESH_ERROR
NM_SETTING_OLPC_MESH_GET_CLASS
NM_TYPE_SETTING_OLPC_MESH
-NM_TYPE_SETTING_OLPC_MESH_ERROR
-nm_setting_olpc_mesh_error_get_type
nm_setting_olpc_mesh_get_type
</SECTION>
@@ -585,6 +654,7 @@ NMSettingPPPClass
NMSettingPPPError
NM_SETTING_PPP_BAUD
NM_SETTING_PPP_CRTSCTS
+NM_SETTING_PPP_ERROR
NM_SETTING_PPP_LCP_ECHO_FAILURE
NM_SETTING_PPP_LCP_ECHO_INTERVAL
NM_SETTING_PPP_MPPE_STATEFUL
@@ -627,11 +697,8 @@ NM_IS_SETTING_PPP
NM_IS_SETTING_PPP_CLASS
NM_SETTING_PPP
NM_SETTING_PPP_CLASS
-NM_SETTING_PPP_ERROR
NM_SETTING_PPP_GET_CLASS
NM_TYPE_SETTING_PPP
-NM_TYPE_SETTING_PPP_ERROR
-nm_setting_ppp_error_get_type
nm_setting_ppp_get_type
</SECTION>
@@ -641,6 +708,7 @@ nm_setting_ppp_get_type
NMSettingPPPOE
NMSettingPPPOEClass
NMSettingPPPOEError
+NM_SETTING_PPPOE_ERROR
NM_SETTING_PPPOE_PASSWORD
NM_SETTING_PPPOE_PASSWORD_FLAGS
NM_SETTING_PPPOE_SERVICE
@@ -657,11 +725,8 @@ NM_IS_SETTING_PPPOE
NM_IS_SETTING_PPPOE_CLASS
NM_SETTING_PPPOE
NM_SETTING_PPPOE_CLASS
-NM_SETTING_PPPOE_ERROR
NM_SETTING_PPPOE_GET_CLASS
NM_TYPE_SETTING_PPPOE
-NM_TYPE_SETTING_PPPOE_ERROR
-nm_setting_pppoe_error_get_type
nm_setting_pppoe_get_type
</SECTION>
@@ -678,6 +743,7 @@ NMSettingSerialClass
NMSettingSerialError
NM_SETTING_SERIAL_BAUD
NM_SETTING_SERIAL_BITS
+NM_SETTING_SERIAL_ERROR
NM_SETTING_SERIAL_PARITY
NM_SETTING_SERIAL_SEND_DELAY
NM_SETTING_SERIAL_SETTING_NAME
@@ -694,15 +760,50 @@ NM_IS_SETTING_SERIAL
NM_IS_SETTING_SERIAL_CLASS
NM_SETTING_SERIAL
NM_SETTING_SERIAL_CLASS
-NM_SETTING_SERIAL_ERROR
NM_SETTING_SERIAL_GET_CLASS
NM_TYPE_SETTING_SERIAL
-NM_TYPE_SETTING_SERIAL_ERROR
-nm_setting_serial_error_get_type
nm_setting_serial_get_type
</SECTION>
<SECTION>
+<FILE>nm-setting-vlan</FILE>
+<TITLE>NMSettingVlan</TITLE>
+NMSettingVlan
+NMSettingVlanClass
+NMSettingVlanError
+NMVlanFlags
+NMVlanPriorityMap
+NM_SETTING_VLAN_EGRESS_PRIORITY_MAP
+NM_SETTING_VLAN_ERROR
+NM_SETTING_VLAN_FLAGS
+NM_SETTING_VLAN_ID
+NM_SETTING_VLAN_INGRESS_PRIORITY_MAP
+NM_SETTING_VLAN_INTERFACE_NAME
+NM_SETTING_VLAN_PARENT
+NM_SETTING_VLAN_SETTING_NAME
+nm_setting_vlan_add_priority
+nm_setting_vlan_add_priority_str
+nm_setting_vlan_clear_priorities
+nm_setting_vlan_error_quark
+nm_setting_vlan_get_flags
+nm_setting_vlan_get_id
+nm_setting_vlan_get_interface_name
+nm_setting_vlan_get_num_priorities
+nm_setting_vlan_get_parent
+nm_setting_vlan_get_priority
+nm_setting_vlan_new
+nm_setting_vlan_remove_priority
+<SUBSECTION Standard>
+NM_IS_SETTING_VLAN
+NM_IS_SETTING_VLAN_CLASS
+NM_SETTING_VLAN
+NM_SETTING_VLAN_CLASS
+NM_SETTING_VLAN_GET_CLASS
+NM_TYPE_SETTING_VLAN
+nm_setting_vlan_get_type
+</SECTION>
+
+<SECTION>
<FILE>nm-setting-vpn</FILE>
<TITLE>NMSettingVPN</TITLE>
NMSettingVPN
@@ -710,6 +811,7 @@ NMSettingVPNClass
NMSettingVpnError
NMVPNIterFunc
NM_SETTING_VPN_DATA
+NM_SETTING_VPN_ERROR
NM_SETTING_VPN_SECRETS
NM_SETTING_VPN_SERVICE_TYPE
NM_SETTING_VPN_SETTING_NAME
@@ -720,6 +822,8 @@ nm_setting_vpn_error_quark
nm_setting_vpn_foreach_data_item
nm_setting_vpn_foreach_secret
nm_setting_vpn_get_data_item
+nm_setting_vpn_get_num_data_items
+nm_setting_vpn_get_num_secrets
nm_setting_vpn_get_secret
nm_setting_vpn_get_service_type
nm_setting_vpn_get_user_name
@@ -731,11 +835,8 @@ NM_IS_SETTING_VPN
NM_IS_SETTING_VPN_CLASS
NM_SETTING_VPN
NM_SETTING_VPN_CLASS
-NM_SETTING_VPN_ERROR
NM_SETTING_VPN_GET_CLASS
NM_TYPE_SETTING_VPN
-NM_TYPE_SETTING_VPN_ERROR
-nm_setting_vpn_error_get_type
nm_setting_vpn_get_type
</SECTION>
@@ -745,6 +846,7 @@ nm_setting_vpn_get_type
NMSettingWimax
NMSettingWimaxClass
NMSettingWimaxError
+NM_SETTING_WIMAX_ERROR
NM_SETTING_WIMAX_MAC_ADDRESS
NM_SETTING_WIMAX_NETWORK_NAME
NM_SETTING_WIMAX_SETTING_NAME
@@ -757,11 +859,8 @@ NM_IS_SETTING_WIMAX
NM_IS_SETTING_WIMAX_CLASS
NM_SETTING_WIMAX
NM_SETTING_WIMAX_CLASS
-NM_SETTING_WIMAX_ERROR
NM_SETTING_WIMAX_GET_CLASS
NM_TYPE_SETTING_WIMAX
-NM_TYPE_SETTING_WIMAX_ERROR
-nm_setting_wimax_error_get_type
nm_setting_wimax_get_type
</SECTION>
@@ -774,6 +873,7 @@ NMSettingWiredError
NM_SETTING_WIRED_AUTO_NEGOTIATE
NM_SETTING_WIRED_CLONED_MAC_ADDRESS
NM_SETTING_WIRED_DUPLEX
+NM_SETTING_WIRED_ERROR
NM_SETTING_WIRED_MAC_ADDRESS
NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST
NM_SETTING_WIRED_MTU
@@ -805,11 +905,8 @@ NM_IS_SETTING_WIRED
NM_IS_SETTING_WIRED_CLASS
NM_SETTING_WIRED
NM_SETTING_WIRED_CLASS
-NM_SETTING_WIRED_ERROR
NM_SETTING_WIRED_GET_CLASS
NM_TYPE_SETTING_WIRED
-NM_TYPE_SETTING_WIRED_ERROR
-nm_setting_wired_error_get_type
nm_setting_wired_get_type
</SECTION>
@@ -823,6 +920,7 @@ NM_SETTING_WIRELESS_BAND
NM_SETTING_WIRELESS_BSSID
NM_SETTING_WIRELESS_CHANNEL
NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS
+NM_SETTING_WIRELESS_ERROR
NM_SETTING_WIRELESS_MAC_ADDRESS
NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST
NM_SETTING_WIRELESS_MODE
@@ -858,11 +956,8 @@ NM_IS_SETTING_WIRELESS
NM_IS_SETTING_WIRELESS_CLASS
NM_SETTING_WIRELESS
NM_SETTING_WIRELESS_CLASS
-NM_SETTING_WIRELESS_ERROR
NM_SETTING_WIRELESS_GET_CLASS
NM_TYPE_SETTING_WIRELESS
-NM_TYPE_SETTING_WIRELESS_ERROR
-nm_setting_wireless_error_get_type
nm_setting_wireless_get_type
</SECTION>
@@ -874,6 +969,7 @@ NMSettingWirelessSecurityClass
NMSettingWirelessSecurityError
NMWepKeyType
NM_SETTING_WIRELESS_SECURITY_AUTH_ALG
+NM_SETTING_WIRELESS_SECURITY_ERROR
NM_SETTING_WIRELESS_SECURITY_GROUP
NM_SETTING_WIRELESS_SECURITY_KEY_MGMT
NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD
@@ -925,20 +1021,23 @@ NM_IS_SETTING_WIRELESS_SECURITY
NM_IS_SETTING_WIRELESS_SECURITY_CLASS
NM_SETTING_WIRELESS_SECURITY
NM_SETTING_WIRELESS_SECURITY_CLASS
-NM_SETTING_WIRELESS_SECURITY_ERROR
NM_SETTING_WIRELESS_SECURITY_GET_CLASS
NM_TYPE_SETTING_WIRELESS_SECURITY
-NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR
-nm_setting_wireless_security_error_get_type
nm_setting_wireless_security_get_type
</SECTION>
<SECTION>
<FILE>nm-utils</FILE>
NMUtilsSecurityType
+NM_UTILS_HWADDR_LEN_MAX
nm_utils_deinit
nm_utils_escape_ssid
nm_utils_gvalue_hash_dup
+nm_utils_hwaddr_atoba
+nm_utils_hwaddr_aton
+nm_utils_hwaddr_len
+nm_utils_hwaddr_ntoa
+nm_utils_hwaddr_type
nm_utils_init
nm_utils_ip4_addresses_from_gvalue
nm_utils_ip4_addresses_to_gvalue
@@ -967,3 +1066,76 @@ nm_utils_wifi_freq_to_channel
nm_utils_wifi_is_channel_valid
</SECTION>
+<SECTION>
+<FILE>nm-utils-enum-types</FILE>
+<SUBSECTION Standard>
+NM_TYPE_CONNECTION_ERROR
+NM_TYPE_SETTING_802_1X_CK_FORMAT
+NM_TYPE_SETTING_802_1X_CK_SCHEME
+NM_TYPE_SETTING_802_1X_ERROR
+NM_TYPE_SETTING_BLUETOOTH_ERROR
+NM_TYPE_SETTING_BOND_ERROR
+NM_TYPE_SETTING_CDMA_ERROR
+NM_TYPE_SETTING_COMPARE_FLAGS
+NM_TYPE_SETTING_CONNECTION_ERROR
+NM_TYPE_SETTING_DIFF_RESULT
+NM_TYPE_SETTING_ERROR
+NM_TYPE_SETTING_GSM_ERROR
+NM_TYPE_SETTING_GSM_NETWORK_BAND
+NM_TYPE_SETTING_GSM_NETWORK_TYPE
+NM_TYPE_SETTING_HASH_FLAGS
+NM_TYPE_SETTING_INFINIBAND_ERROR
+NM_TYPE_SETTING_IP4_CONFIG_ERROR
+NM_TYPE_SETTING_IP6_CONFIG_ERROR
+NM_TYPE_SETTING_IP6_CONFIG_PRIVACY
+NM_TYPE_SETTING_OLPC_MESH_ERROR
+NM_TYPE_SETTING_PPPOE_ERROR
+NM_TYPE_SETTING_PPP_ERROR
+NM_TYPE_SETTING_SECRET_FLAGS
+NM_TYPE_SETTING_SERIAL_ERROR
+NM_TYPE_SETTING_VLAN_ERROR
+NM_TYPE_SETTING_VPN_ERROR
+NM_TYPE_SETTING_WIMAX_ERROR
+NM_TYPE_SETTING_WIRED_ERROR
+NM_TYPE_SETTING_WIRELESS_ERROR
+NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR
+NM_TYPE_UTILS_SECURITY_TYPE
+NM_TYPE_VLAN_FLAGS
+NM_TYPE_VLAN_PRIORITY_MAP
+NM_TYPE_WEP_KEY_TYPE
+nm_connection_error_get_type
+nm_setting_802_1x_ck_format_get_type
+nm_setting_802_1x_ck_scheme_get_type
+nm_setting_802_1x_error_get_type
+nm_setting_bluetooth_error_get_type
+nm_setting_bond_error_get_type
+nm_setting_cdma_error_get_type
+nm_setting_compare_flags_get_type
+nm_setting_connection_error_get_type
+nm_setting_diff_result_get_type
+nm_setting_error_get_type
+nm_setting_gsm_error_get_type
+nm_setting_gsm_network_band_get_type
+nm_setting_gsm_network_type_get_type
+nm_setting_hash_flags_get_type
+nm_setting_infiniband_error_get_type
+nm_setting_ip4_config_error_get_type
+nm_setting_ip6_config_error_get_type
+nm_setting_ip6_config_privacy_get_type
+nm_setting_olpc_mesh_error_get_type
+nm_setting_ppp_error_get_type
+nm_setting_pppoe_error_get_type
+nm_setting_secret_flags_get_type
+nm_setting_serial_error_get_type
+nm_setting_vlan_error_get_type
+nm_setting_vpn_error_get_type
+nm_setting_wimax_error_get_type
+nm_setting_wired_error_get_type
+nm_setting_wireless_error_get_type
+nm_setting_wireless_security_error_get_type
+nm_utils_security_type_get_type
+nm_vlan_flags_get_type
+nm_vlan_priority_map_get_type
+nm_wep_key_type_get_type
+</SECTION>
+
diff --git a/docs/libnm-util/libnm-util.types b/docs/libnm-util/libnm-util.types
index af48d52a5..72f62e063 100644
--- a/docs/libnm-util/libnm-util.types
+++ b/docs/libnm-util/libnm-util.types
@@ -4,30 +4,45 @@ nm_ip4_address_get_type
nm_ip4_route_get_type
nm_ip6_address_get_type
nm_ip6_route_get_type
+nm_setting_802_1x_ck_format_get_type
+nm_setting_802_1x_ck_scheme_get_type
nm_setting_802_1x_error_get_type
nm_setting_802_1x_get_type
nm_setting_bluetooth_error_get_type
nm_setting_bluetooth_get_type
+nm_setting_bond_error_get_type
+nm_setting_bond_get_type
nm_setting_cdma_error_get_type
nm_setting_cdma_get_type
+nm_setting_compare_flags_get_type
nm_setting_connection_error_get_type
nm_setting_connection_get_type
+nm_setting_diff_result_get_type
nm_setting_error_get_type
nm_setting_get_type
nm_setting_gsm_error_get_type
nm_setting_gsm_get_type
+nm_setting_gsm_network_band_get_type
+nm_setting_gsm_network_type_get_type
+nm_setting_hash_flags_get_type
+nm_setting_infiniband_error_get_type
+nm_setting_infiniband_get_type
nm_setting_ip4_config_error_get_type
nm_setting_ip4_config_get_type
nm_setting_ip6_config_error_get_type
nm_setting_ip6_config_get_type
+nm_setting_ip6_config_privacy_get_type
nm_setting_olpc_mesh_error_get_type
nm_setting_olpc_mesh_get_type
nm_setting_ppp_error_get_type
nm_setting_ppp_get_type
nm_setting_pppoe_error_get_type
nm_setting_pppoe_get_type
+nm_setting_secret_flags_get_type
nm_setting_serial_error_get_type
nm_setting_serial_get_type
+nm_setting_vlan_error_get_type
+nm_setting_vlan_get_type
nm_setting_vpn_error_get_type
nm_setting_vpn_get_type
nm_setting_wimax_error_get_type
@@ -38,3 +53,7 @@ nm_setting_wireless_error_get_type
nm_setting_wireless_get_type
nm_setting_wireless_security_error_get_type
nm_setting_wireless_security_get_type
+nm_utils_security_type_get_type
+nm_vlan_flags_get_type
+nm_vlan_priority_map_get_type
+nm_wep_key_type_get_type
diff --git a/docs/libnm-util/tmpl/libnm-util-unused.sgml b/docs/libnm-util/tmpl/libnm-util-unused.sgml
index e69de29bb..26fd8b523 100644
--- a/docs/libnm-util/tmpl/libnm-util-unused.sgml
+++ b/docs/libnm-util/tmpl/libnm-util-unused.sgml
@@ -0,0 +1,260 @@
+<!-- ##### SECTION ./tmpl/nm-setting-adsl.sgml:Image ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/nm-setting-adsl.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/nm-setting-adsl.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/nm-setting-adsl.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/nm-setting-adsl.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/nm-setting-adsl.sgml:Title ##### -->
+NMSettingAdsl
+
+
+<!-- ##### STRUCT NMSettingAdsl ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:encapsulation ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:password ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:password-flags ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:protocol ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:username ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:vci ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:vpi ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT NMSettingAdslClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+
+<!-- ##### ENUM NMSettingAdslError ##### -->
+<para>
+
+</para>
+
+@NM_SETTING_ADSL_ERROR_UNKNOWN:
+@NM_SETTING_ADSL_ERROR_INVALID_PROPERTY:
+@NM_SETTING_ADSL_ERROR_MISSING_PROPERTY:
+
+<!-- ##### MACRO NM_SETTING_ADSL_ENCAPSULATION ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_ENCAPSULATION_LLC ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_ENCAPSULATION_VCMUX ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_ERROR ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PASSWORD ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PASSWORD_FLAGS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL_IPOATM ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL_PPPOA ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL_PPPOE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_SETTING_NAME ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_USERNAME ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_VCI ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_VPI ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION nm_connection_get_setting_adsl ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_error_quark ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_encapsulation ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_password ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_password_flags ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_protocol ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_username ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_vci ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_get_vpi ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+<!-- ##### FUNCTION nm_setting_adsl_new ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
diff --git a/docs/libnm-util/tmpl/nm-connection.sgml b/docs/libnm-util/tmpl/nm-connection.sgml
index ddbbcf74b..434e0d1bd 100644
--- a/docs/libnm-util/tmpl/nm-connection.sgml
+++ b/docs/libnm-util/tmpl/nm-connection.sgml
@@ -9,13 +9,11 @@ NMConnection
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -66,6 +64,13 @@ NMConnection
@NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID:
@NM_CONNECTION_ERROR_SETTING_NOT_FOUND:
+<!-- ##### MACRO NM_CONNECTION_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_CONNECTION_PATH ##### -->
<para>
@@ -214,6 +219,15 @@ NMConnection
@Returns:
+<!-- ##### FUNCTION nm_connection_get_setting_bond ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+
<!-- ##### FUNCTION nm_connection_get_setting_by_name ##### -->
<para>
@@ -251,6 +265,15 @@ NMConnection
@Returns:
+<!-- ##### FUNCTION nm_connection_get_setting_infiniband ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+
<!-- ##### FUNCTION nm_connection_get_setting_ip4_config ##### -->
<para>
@@ -296,6 +319,24 @@ NMConnection
@Returns:
+<!-- ##### FUNCTION nm_connection_get_setting_serial ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_connection_get_setting_vlan ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+
<!-- ##### FUNCTION nm_connection_get_setting_vpn ##### -->
<para>
@@ -350,6 +391,15 @@ NMConnection
@Returns:
+<!-- ##### FUNCTION nm_connection_get_virtual_iface_name ##### -->
+<para>
+
+</para>
+
+@connection:
+@Returns:
+
+
<!-- ##### FUNCTION nm_connection_is_type ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-8021x.sgml b/docs/libnm-util/tmpl/nm-setting-8021x.sgml
index 50256d112..107752243 100644
--- a/docs/libnm-util/tmpl/nm-setting-8021x.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-8021x.sgml
@@ -9,13 +9,11 @@ NMSetting8021x
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -63,6 +61,11 @@ NMSetting8021x
</para>
+<!-- ##### ARG NMSetting8021x:pac-file ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMSetting8021x:password ##### -->
<para>
@@ -73,6 +76,16 @@ NMSetting8021x
</para>
+<!-- ##### ARG NMSetting8021x:password-raw ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSetting8021x:password-raw-flags ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMSetting8021x:phase1-fast-provisioning ##### -->
<para>
@@ -244,6 +257,13 @@ NMSetting8021x
+<!-- ##### MACRO NM_SETTING_802_1X_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_802_1X_IDENTITY ##### -->
<para>
@@ -251,6 +271,13 @@ NMSetting8021x
+<!-- ##### MACRO NM_SETTING_802_1X_PAC_FILE ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_802_1X_PASSWORD ##### -->
<para>
@@ -265,6 +292,20 @@ NMSetting8021x
+<!-- ##### MACRO NM_SETTING_802_1X_PASSWORD_RAW ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_802_1X_PASSWORD_RAW_FLAGS ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING ##### -->
<para>
@@ -603,6 +644,15 @@ NMSetting8021x
@Returns:
+<!-- ##### FUNCTION nm_setting_802_1x_get_pac_file ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_802_1x_get_password ##### -->
<para>
@@ -621,6 +671,24 @@ NMSetting8021x
@Returns:
+<!-- ##### FUNCTION nm_setting_802_1x_get_password_raw ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_802_1x_get_password_raw_flags ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_802_1x_get_phase1_fast_provisioning ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-adsl.sgml b/docs/libnm-util/tmpl/nm-setting-adsl.sgml
new file mode 100644
index 000000000..d81ae07f5
--- /dev/null
+++ b/docs/libnm-util/tmpl/nm-setting-adsl.sgml
@@ -0,0 +1,262 @@
+<!-- ##### SECTION Title ##### -->
+NMSettingAdsl
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMSettingAdsl ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingAdsl:encapsulation ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingAdsl:password ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingAdsl:password-flags ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingAdsl:protocol ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingAdsl:username ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingAdsl:vci ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingAdsl:vpi ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMSettingAdslClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+
+<!-- ##### ENUM NMSettingAdslError ##### -->
+<para>
+
+</para>
+
+@NM_SETTING_ADSL_ERROR_UNKNOWN:
+@NM_SETTING_ADSL_ERROR_INVALID_PROPERTY:
+@NM_SETTING_ADSL_ERROR_MISSING_PROPERTY:
+
+<!-- ##### MACRO NM_SETTING_ADSL_ENCAPSULATION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_ENCAPSULATION_LLC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_ENCAPSULATION_VCMUX ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PASSWORD ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PASSWORD_FLAGS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL_IPOATM ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL_PPPOA ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_PROTOCOL_PPPOE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_SETTING_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_USERNAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_VCI ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_ADSL_VPI ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_setting_adsl_error_quark ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_encapsulation ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_password ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_password_flags ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_protocol ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_username ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_vci ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_get_vpi ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_adsl_new ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
diff --git a/docs/libnm-util/tmpl/nm-setting-bluetooth.sgml b/docs/libnm-util/tmpl/nm-setting-bluetooth.sgml
index ef059fad3..9ab1b4b2d 100644
--- a/docs/libnm-util/tmpl/nm-setting-bluetooth.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-bluetooth.sgml
@@ -9,13 +9,11 @@ NMSettingBluetooth
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -66,6 +64,13 @@ NMSettingBluetooth
+<!-- ##### MACRO NM_SETTING_BLUETOOTH_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_BLUETOOTH_SETTING_NAME ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-bond.sgml b/docs/libnm-util/tmpl/nm-setting-bond.sgml
new file mode 100644
index 000000000..8f7dbfc1c
--- /dev/null
+++ b/docs/libnm-util/tmpl/nm-setting-bond.sgml
@@ -0,0 +1,228 @@
+<!-- ##### SECTION Title ##### -->
+NMSettingBond
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMSettingBond ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingBond:interface-name ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingBond:options ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMSettingBondClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+
+<!-- ##### ENUM NMSettingBondError ##### -->
+<para>
+
+</para>
+
+@NM_SETTING_BOND_ERROR_UNKNOWN:
+@NM_SETTING_BOND_ERROR_INVALID_PROPERTY:
+@NM_SETTING_BOND_ERROR_MISSING_PROPERTY:
+@NM_SETTING_BOND_ERROR_INVALID_OPTION:
+@NM_SETTING_BOND_ERROR_MISSING_OPTION:
+
+<!-- ##### MACRO NM_SETTING_BOND_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_INTERFACE_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTIONS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTION_ARP_INTERVAL ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTION_ARP_IP_TARGET ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTION_DOWNDELAY ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTION_MIIMON ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTION_MODE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_OPTION_UPDELAY ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_BOND_SETTING_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_setting_bond_add_option ##### -->
+<para>
+
+</para>
+
+@setting:
+@name:
+@value:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_error_quark ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_get_interface_name ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_get_num_options ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_get_option ##### -->
+<para>
+
+</para>
+
+@setting:
+@idx:
+@out_name:
+@out_value:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_get_option_by_name ##### -->
+<para>
+
+</para>
+
+@setting:
+@name:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_get_option_default ##### -->
+<para>
+
+</para>
+
+@setting:
+@name:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_get_valid_options ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_new ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_bond_remove_option ##### -->
+<para>
+
+</para>
+
+@setting:
+@name:
+@Returns:
+
+
diff --git a/docs/libnm-util/tmpl/nm-setting-cdma.sgml b/docs/libnm-util/tmpl/nm-setting-cdma.sgml
index 9a23158a0..7837016d3 100644
--- a/docs/libnm-util/tmpl/nm-setting-cdma.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-cdma.sgml
@@ -9,13 +9,11 @@ NMSettingCdma
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -69,6 +67,13 @@ NMSettingCdma
@NM_SETTING_CDMA_ERROR_MISSING_PROPERTY:
@NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING:
+<!-- ##### MACRO NM_SETTING_CDMA_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_CDMA_NUMBER ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-connection.sgml b/docs/libnm-util/tmpl/nm-setting-connection.sgml
index 7bbce8793..cee42ea47 100644
--- a/docs/libnm-util/tmpl/nm-setting-connection.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-connection.sgml
@@ -9,13 +9,11 @@ NMSettingConnection
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -38,6 +36,11 @@ NMSettingConnection
</para>
+<!-- ##### ARG NMSettingConnection:master ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMSettingConnection:permissions ##### -->
<para>
@@ -48,6 +51,11 @@ NMSettingConnection
</para>
+<!-- ##### ARG NMSettingConnection:slave-type ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMSettingConnection:timestamp ##### -->
<para>
@@ -63,6 +71,11 @@ NMSettingConnection
</para>
+<!-- ##### ARG NMSettingConnection:zone ##### -->
+<para>
+
+</para>
+
<!-- ##### STRUCT NMSettingConnectionClass ##### -->
<para>
@@ -83,6 +96,7 @@ NMSettingConnection
@NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY:
@NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY:
@NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND:
+@NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED:
<!-- ##### MACRO NM_SETTING_CONNECTION_AUTOCONNECT ##### -->
<para>
@@ -91,6 +105,13 @@ NMSettingConnection
+<!-- ##### MACRO NM_SETTING_CONNECTION_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_CONNECTION_ID ##### -->
<para>
@@ -98,6 +119,13 @@ NMSettingConnection
+<!-- ##### MACRO NM_SETTING_CONNECTION_MASTER ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_CONNECTION_PERMISSIONS ##### -->
<para>
@@ -119,6 +147,13 @@ NMSettingConnection
+<!-- ##### MACRO NM_SETTING_CONNECTION_SLAVE_TYPE ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_CONNECTION_TIMESTAMP ##### -->
<para>
@@ -140,6 +175,48 @@ NMSettingConnection
+<!-- ##### MACRO NM_SETTING_CONNECTION_ZONE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_CONNECTION_ZONE_BLOCK ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_CONNECTION_ZONE_HOME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_CONNECTION_ZONE_PUBLIC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_CONNECTION_ZONE_TRUSTED ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_CONNECTION_ZONE_WORK ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### FUNCTION nm_setting_connection_add_permission ##### -->
<para>
@@ -188,6 +265,15 @@ NMSettingConnection
@Returns:
+<!-- ##### FUNCTION nm_setting_connection_get_master ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_connection_get_num_permissions ##### -->
<para>
@@ -219,6 +305,15 @@ NMSettingConnection
@Returns:
+<!-- ##### FUNCTION nm_setting_connection_get_slave_type ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_connection_get_timestamp ##### -->
<para>
@@ -237,6 +332,25 @@ NMSettingConnection
@Returns:
+<!-- ##### FUNCTION nm_setting_connection_get_zone ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_connection_is_slave_type ##### -->
+<para>
+
+</para>
+
+@setting:
+@type:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_connection_new ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-gsm.sgml b/docs/libnm-util/tmpl/nm-setting-gsm.sgml
index 7d572ddb8..5a6a3c481 100644
--- a/docs/libnm-util/tmpl/nm-setting-gsm.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-gsm.sgml
@@ -9,13 +9,11 @@ NMSettingGsm
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -150,6 +148,13 @@ NMSettingGsm
+<!-- ##### MACRO NM_SETTING_GSM_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_GSM_HOME_ONLY ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-infiniband.sgml b/docs/libnm-util/tmpl/nm-setting-infiniband.sgml
new file mode 100644
index 000000000..ba7117c01
--- /dev/null
+++ b/docs/libnm-util/tmpl/nm-setting-infiniband.sgml
@@ -0,0 +1,143 @@
+<!-- ##### SECTION Title ##### -->
+NMSettingInfiniband
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMSettingInfiniband ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingInfiniband:mac-address ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingInfiniband:mtu ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingInfiniband:transport-mode ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMSettingInfinibandClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+
+<!-- ##### ENUM NMSettingInfinibandError ##### -->
+<para>
+
+</para>
+
+@NM_SETTING_INFINIBAND_ERROR_UNKNOWN:
+@NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY:
+@NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY:
+
+<!-- ##### MACRO NM_SETTING_INFINIBAND_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_INFINIBAND_MAC_ADDRESS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_INFINIBAND_MTU ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_INFINIBAND_SETTING_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_INFINIBAND_TRANSPORT_MODE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_setting_infiniband_error_quark ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_infiniband_get_mac_address ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_infiniband_get_mtu ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_infiniband_get_transport_mode ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_infiniband_new ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
diff --git a/docs/libnm-util/tmpl/nm-setting-ip4-config.sgml b/docs/libnm-util/tmpl/nm-setting-ip4-config.sgml
index 9d7105710..fbc1b4ccb 100644
--- a/docs/libnm-util/tmpl/nm-setting-ip4-config.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-ip4-config.sgml
@@ -9,13 +9,11 @@ NMSettingIP4Config
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -163,6 +161,13 @@ NMSettingIP4Config
+<!-- ##### MACRO NM_SETTING_IP4_CONFIG_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-ip6-config.sgml b/docs/libnm-util/tmpl/nm-setting-ip6-config.sgml
index 959a0e28b..400bfced4 100644
--- a/docs/libnm-util/tmpl/nm-setting-ip6-config.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-ip6-config.sgml
@@ -9,13 +9,11 @@ NMSettingIP6Config
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -65,6 +63,11 @@ NMSettingIP6Config
</para>
+<!-- ##### ARG NMSettingIP6Config:ip6-privacy ##### -->
+<para>
+
+</para>
+
<!-- ##### ARG NMSettingIP6Config:may-fail ##### -->
<para>
@@ -106,6 +109,16 @@ NMSettingIP6Config
@NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY:
@NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD:
+<!-- ##### ENUM NMSettingIP6ConfigPrivacy ##### -->
+<para>
+
+</para>
+
+@NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN:
+@NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED:
+@NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR:
+@NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR:
+
<!-- ##### MACRO NM_SETTING_IP6_CONFIG_ADDRESSES ##### -->
<para>
@@ -127,6 +140,13 @@ NMSettingIP6Config
+<!-- ##### MACRO NM_SETTING_IP6_CONFIG_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS ##### -->
<para>
@@ -141,6 +161,13 @@ NMSettingIP6Config
+<!-- ##### MACRO NM_SETTING_IP6_CONFIG_IP6_PRIVACY ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_IP6_CONFIG_MAY_FAIL ##### -->
<para>
@@ -561,6 +588,15 @@ NMSettingIP6Config
@Returns:
+<!-- ##### FUNCTION nm_setting_ip6_config_get_ip6_privacy ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_ip6_config_get_may_fail ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-olpc-mesh.sgml b/docs/libnm-util/tmpl/nm-setting-olpc-mesh.sgml
index 4db8508e5..744c87e30 100644
--- a/docs/libnm-util/tmpl/nm-setting-olpc-mesh.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-olpc-mesh.sgml
@@ -9,13 +9,11 @@ NMSettingOlpcMesh
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -77,6 +75,13 @@ NMSettingOlpcMesh
+<!-- ##### MACRO NM_SETTING_OLPC_MESH_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_OLPC_MESH_SETTING_NAME ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-ppp.sgml b/docs/libnm-util/tmpl/nm-setting-ppp.sgml
index 346476541..f26d56fa4 100644
--- a/docs/libnm-util/tmpl/nm-setting-ppp.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-ppp.sgml
@@ -9,13 +9,11 @@ NMSettingPPP
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -153,6 +151,13 @@ NMSettingPPP
+<!-- ##### MACRO NM_SETTING_PPP_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_PPP_LCP_ECHO_FAILURE ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-pppoe.sgml b/docs/libnm-util/tmpl/nm-setting-pppoe.sgml
index d5772a873..942b5a049 100644
--- a/docs/libnm-util/tmpl/nm-setting-pppoe.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-pppoe.sgml
@@ -9,13 +9,11 @@ NMSettingPPPOE
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -69,6 +67,13 @@ NMSettingPPPOE
@NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY:
@NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING:
+<!-- ##### MACRO NM_SETTING_PPPOE_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_PPPOE_PASSWORD ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-private.sgml b/docs/libnm-util/tmpl/nm-setting-private.sgml
index b97401650..b5cdc70e8 100644
--- a/docs/libnm-util/tmpl/nm-setting-private.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-private.sgml
@@ -9,13 +9,11 @@ nm-setting-private
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libnm-util/tmpl/nm-setting-serial.sgml b/docs/libnm-util/tmpl/nm-setting-serial.sgml
index 6a43dc3f0..542b9fbcf 100644
--- a/docs/libnm-util/tmpl/nm-setting-serial.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-serial.sgml
@@ -9,13 +9,11 @@ NMSettingSerial
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -88,6 +86,13 @@ NMSettingSerial
+<!-- ##### MACRO NM_SETTING_SERIAL_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_SERIAL_PARITY ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-vlan.sgml b/docs/libnm-util/tmpl/nm-setting-vlan.sgml
new file mode 100644
index 000000000..79cb88db5
--- /dev/null
+++ b/docs/libnm-util/tmpl/nm-setting-vlan.sgml
@@ -0,0 +1,270 @@
+<!-- ##### SECTION Title ##### -->
+NMSettingVlan
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
+<!-- ##### STRUCT NMSettingVlan ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG NMSettingVlan:egress-priority-map ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingVlan:flags ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingVlan:id ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingVlan:ingress-priority-map ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingVlan:interface-name ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG NMSettingVlan:parent ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT NMSettingVlanClass ##### -->
+<para>
+
+</para>
+
+@parent:
+@_reserved1:
+@_reserved2:
+@_reserved3:
+@_reserved4:
+
+<!-- ##### ENUM NMSettingVlanError ##### -->
+<para>
+
+</para>
+
+@NM_SETTING_VLAN_ERROR_UNKNOWN:
+@NM_SETTING_VLAN_ERROR_INVALID_PROPERTY:
+@NM_SETTING_VLAN_ERROR_MISSING_PROPERTY:
+
+<!-- ##### ENUM NMVlanFlags ##### -->
+<para>
+
+</para>
+
+@NM_VLAN_FLAG_REORDER_HEADERS:
+@NM_VLAN_FLAG_GVRP:
+@NM_VLAN_FLAG_LOOSE_BINDING:
+
+<!-- ##### ENUM NMVlanPriorityMap ##### -->
+<para>
+
+</para>
+
+@NM_VLAN_INGRESS_MAP:
+@NM_VLAN_EGRESS_MAP:
+
+<!-- ##### MACRO NM_SETTING_VLAN_EGRESS_PRIORITY_MAP ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_FLAGS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_ID ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_INGRESS_PRIORITY_MAP ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_INTERFACE_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_PARENT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NM_SETTING_VLAN_SETTING_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION nm_setting_vlan_add_priority ##### -->
+<para>
+
+</para>
+
+@setting:
+@map:
+@from:
+@to:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_add_priority_str ##### -->
+<para>
+
+</para>
+
+@setting:
+@map:
+@str:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_clear_priorities ##### -->
+<para>
+
+</para>
+
+@setting:
+@map:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_error_quark ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_get_flags ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_get_id ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_get_interface_name ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_get_num_priorities ##### -->
+<para>
+
+</para>
+
+@setting:
+@map:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_get_parent ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_get_priority ##### -->
+<para>
+
+</para>
+
+@setting:
+@map:
+@idx:
+@out_from:
+@out_to:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_new ##### -->
+<para>
+
+</para>
+
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vlan_remove_priority ##### -->
+<para>
+
+</para>
+
+@setting:
+@map:
+@idx:
+
+
diff --git a/docs/libnm-util/tmpl/nm-setting-vpn.sgml b/docs/libnm-util/tmpl/nm-setting-vpn.sgml
index e7b724f20..e29dfff99 100644
--- a/docs/libnm-util/tmpl/nm-setting-vpn.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-vpn.sgml
@@ -9,13 +9,11 @@ NMSettingVPN
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -85,6 +83,13 @@ NMSettingVPN
+<!-- ##### MACRO NM_SETTING_VPN_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_VPN_SECRETS ##### -->
<para>
@@ -172,6 +177,24 @@ NMSettingVPN
@Returns:
+<!-- ##### FUNCTION nm_setting_vpn_get_num_data_items ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_setting_vpn_get_num_secrets ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_vpn_get_secret ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-wimax.sgml b/docs/libnm-util/tmpl/nm-setting-wimax.sgml
index 733fe165d..9225504a5 100644
--- a/docs/libnm-util/tmpl/nm-setting-wimax.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-wimax.sgml
@@ -9,13 +9,11 @@ NMSettingWimax
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -54,6 +52,13 @@ NMSettingWimax
@NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY:
@NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY:
+<!-- ##### MACRO NM_SETTING_WIMAX_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_WIMAX_MAC_ADDRESS ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-wired.sgml b/docs/libnm-util/tmpl/nm-setting-wired.sgml
index c38725750..cff79594b 100644
--- a/docs/libnm-util/tmpl/nm-setting-wired.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-wired.sgml
@@ -9,13 +9,11 @@ NMSettingWired
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -124,6 +122,13 @@ NMSettingWired
+<!-- ##### MACRO NM_SETTING_WIRED_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_WIRED_MAC_ADDRESS ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-wireless-security.sgml b/docs/libnm-util/tmpl/nm-setting-wireless-security.sgml
index 6fec769ce..d653c6825 100644
--- a/docs/libnm-util/tmpl/nm-setting-wireless-security.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-wireless-security.sgml
@@ -9,13 +9,11 @@ NMSettingWirelessSecurity
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -154,6 +152,13 @@ NMSettingWirelessSecurity
+<!-- ##### MACRO NM_SETTING_WIRELESS_SECURITY_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_WIRELESS_SECURITY_GROUP ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting-wireless.sgml b/docs/libnm-util/tmpl/nm-setting-wireless.sgml
index d3ce038fd..3790e252d 100644
--- a/docs/libnm-util/tmpl/nm-setting-wireless.sgml
+++ b/docs/libnm-util/tmpl/nm-setting-wireless.sgml
@@ -9,13 +9,11 @@ NMSettingWireless
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -143,6 +141,13 @@ NMSettingWireless
+<!-- ##### MACRO NM_SETTING_WIRELESS_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_WIRELESS_MAC_ADDRESS ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-setting.sgml b/docs/libnm-util/tmpl/nm-setting.sgml
index 912a47c6d..a5198c104 100644
--- a/docs/libnm-util/tmpl/nm-setting.sgml
+++ b/docs/libnm-util/tmpl/nm-setting.sgml
@@ -9,13 +9,11 @@ NMSetting
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -46,8 +44,8 @@ NMSetting
@set_secret_flags:
@compare_property:
@clear_secrets_with_flags:
+@get_virtual_iface_name:
@_reserved1:
-@_reserved2:
<!-- ##### USER_FUNCTION NMSettingClearSecretsWithFlagsFn ##### -->
<para>
@@ -123,6 +121,13 @@ NMSetting
@user_data:
+<!-- ##### MACRO NM_SETTING_ERROR ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### MACRO NM_SETTING_NAME ##### -->
<para>
@@ -249,6 +254,15 @@ NMSetting
@Returns:
+<!-- ##### FUNCTION nm_setting_get_virtual_iface_name ##### -->
+<para>
+
+</para>
+
+@setting:
+@Returns:
+
+
<!-- ##### FUNCTION nm_setting_need_secrets ##### -->
<para>
diff --git a/docs/libnm-util/tmpl/nm-utils-enum-types.sgml b/docs/libnm-util/tmpl/nm-utils-enum-types.sgml
new file mode 100644
index 000000000..5171db340
--- /dev/null
+++ b/docs/libnm-util/tmpl/nm-utils-enum-types.sgml
@@ -0,0 +1,22 @@
+<!-- ##### SECTION Title ##### -->
+nm-utils-enum-types
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
diff --git a/docs/libnm-util/tmpl/nm-utils.sgml b/docs/libnm-util/tmpl/nm-utils.sgml
index 0d77c8328..9195b5029 100644
--- a/docs/libnm-util/tmpl/nm-utils.sgml
+++ b/docs/libnm-util/tmpl/nm-utils.sgml
@@ -9,13 +9,11 @@ nm-utils
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -37,6 +35,13 @@ nm-utils
@NMU_SEC_WPA2_PSK:
@NMU_SEC_WPA2_ENTERPRISE:
+<!-- ##### MACRO NM_UTILS_HWADDR_LEN_MAX ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### FUNCTION nm_utils_deinit ##### -->
<para>
@@ -64,6 +69,55 @@ nm-utils
@Returns:
+<!-- ##### FUNCTION nm_utils_hwaddr_atoba ##### -->
+<para>
+
+</para>
+
+@asc:
+@type:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_utils_hwaddr_aton ##### -->
+<para>
+
+</para>
+
+@asc:
+@type:
+@buffer:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_utils_hwaddr_len ##### -->
+<para>
+
+</para>
+
+@type:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_utils_hwaddr_ntoa ##### -->
+<para>
+
+</para>
+
+@addr:
+@type:
+@Returns:
+
+
+<!-- ##### FUNCTION nm_utils_hwaddr_type ##### -->
+<para>
+
+</para>
+
+@len:
+@Returns:
+
+
<!-- ##### FUNCTION nm_utils_init ##### -->
<para>
diff --git a/examples/C/Makefile.in b/examples/C/Makefile.in
index 03e238b17..463b6d493 100644
--- a/examples/C/Makefile.in
+++ b/examples/C/Makefile.in
@@ -148,6 +148,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -202,11 +204,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -217,6 +223,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -256,6 +263,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/examples/C/glib/Makefile.am b/examples/C/glib/Makefile.am
index 1063d5200..428f6adcd 100644
--- a/examples/C/glib/Makefile.am
+++ b/examples/C/glib/Makefile.am
@@ -1,6 +1,8 @@
INCLUDES = -I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-glib \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include
AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
@@ -12,7 +14,10 @@ noinst_PROGRAMS = \
get-active-connections-dbus-glib \
list-connections-dbus-glib \
list-connections-libnm-glib \
- get-ap-info-libnm-glib
+ get-ap-info-libnm-glib \
+ monitor-nm-running-dbus-glib \
+ monitor-nm-running-GDBus \
+ monitor-nm-state-GDBus
add_connection_dbus_glib_SOURCES = add-connection-dbus-glib.c
add_connection_dbus_glib_LDADD = \
@@ -53,11 +58,27 @@ get_ap_info_libnm_glib_LDADD = \
$(DBUS_LIBS) \
$(GLIB_LIBS)
+monitor_nm_running_dbus_glib_SOURCES = monitor-nm-running-dbus-glib.c
+monitor_nm_running_dbus_glib_LDADD = \
+ $(DBUS_LIBS) \
+ $(GLIB_LIBS)
+
+monitor_nm_running_GDBus_SOURCES = monitor-nm-running-GDBus.c
+monitor_nm_running_GDBus_LDADD = \
+ $(GIO_LIBS)
+
+monitor_nm_state_GDBus_SOURCES = monitor-nm-state-GDBus.c
+monitor_nm_state_GDBus_LDADD = \
+ $(GIO_LIBS)
+
EXTRA_DIST = \
add-connection-dbus-glib.c \
add-connection-libnm-glib.c \
get-active-connections-dbus-glib.c \
list-connections-dbus-glib.c \
list-connections-libnm-glib.c \
- get-ap-info-libnm-glib.c
+ get-ap-info-libnm-glib.c \
+ monitor-nm-running-dbus-glib.c \
+ monitor-nm-running-GDBus.c \
+ monitor-nm-state-GDBus.c
diff --git a/examples/C/glib/Makefile.in b/examples/C/glib/Makefile.in
index 1a220537f..871da9c9c 100644
--- a/examples/C/glib/Makefile.in
+++ b/examples/C/glib/Makefile.in
@@ -39,7 +39,10 @@ noinst_PROGRAMS = add-connection-dbus-glib$(EXEEXT) \
get-active-connections-dbus-glib$(EXEEXT) \
list-connections-dbus-glib$(EXEEXT) \
list-connections-libnm-glib$(EXEEXT) \
- get-ap-info-libnm-glib$(EXEEXT)
+ get-ap-info-libnm-glib$(EXEEXT) \
+ monitor-nm-running-dbus-glib$(EXEEXT) \
+ monitor-nm-running-GDBus$(EXEEXT) \
+ monitor-nm-state-GDBus$(EXEEXT)
subdir = examples/C/glib
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -108,6 +111,20 @@ list_connections_libnm_glib_DEPENDENCIES = \
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/libnm-glib/libnm-glib.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
+am_monitor_nm_running_GDBus_OBJECTS = \
+ monitor-nm-running-GDBus.$(OBJEXT)
+monitor_nm_running_GDBus_OBJECTS = \
+ $(am_monitor_nm_running_GDBus_OBJECTS)
+monitor_nm_running_GDBus_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_monitor_nm_running_dbus_glib_OBJECTS = \
+ monitor-nm-running-dbus-glib.$(OBJEXT)
+monitor_nm_running_dbus_glib_OBJECTS = \
+ $(am_monitor_nm_running_dbus_glib_OBJECTS)
+monitor_nm_running_dbus_glib_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_monitor_nm_state_GDBus_OBJECTS = monitor-nm-state-GDBus.$(OBJEXT)
+monitor_nm_state_GDBus_OBJECTS = $(am_monitor_nm_state_GDBus_OBJECTS)
+monitor_nm_state_GDBus_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -139,13 +156,19 @@ SOURCES = $(add_connection_dbus_glib_SOURCES) \
$(get_active_connections_dbus_glib_SOURCES) \
$(get_ap_info_libnm_glib_SOURCES) \
$(list_connections_dbus_glib_SOURCES) \
- $(list_connections_libnm_glib_SOURCES)
+ $(list_connections_libnm_glib_SOURCES) \
+ $(monitor_nm_running_GDBus_SOURCES) \
+ $(monitor_nm_running_dbus_glib_SOURCES) \
+ $(monitor_nm_state_GDBus_SOURCES)
DIST_SOURCES = $(add_connection_dbus_glib_SOURCES) \
$(add_connection_libnm_glib_SOURCES) \
$(get_active_connections_dbus_glib_SOURCES) \
$(get_ap_info_libnm_glib_SOURCES) \
$(list_connections_dbus_glib_SOURCES) \
- $(list_connections_libnm_glib_SOURCES)
+ $(list_connections_libnm_glib_SOURCES) \
+ $(monitor_nm_running_GDBus_SOURCES) \
+ $(monitor_nm_running_dbus_glib_SOURCES) \
+ $(monitor_nm_state_GDBus_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -194,6 +217,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -248,11 +273,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -263,6 +292,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -302,6 +332,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -366,8 +398,10 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = -I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-glib \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include
AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
@@ -412,13 +446,29 @@ get_ap_info_libnm_glib_LDADD = \
$(DBUS_LIBS) \
$(GLIB_LIBS)
+monitor_nm_running_dbus_glib_SOURCES = monitor-nm-running-dbus-glib.c
+monitor_nm_running_dbus_glib_LDADD = \
+ $(DBUS_LIBS) \
+ $(GLIB_LIBS)
+
+monitor_nm_running_GDBus_SOURCES = monitor-nm-running-GDBus.c
+monitor_nm_running_GDBus_LDADD = \
+ $(GIO_LIBS)
+
+monitor_nm_state_GDBus_SOURCES = monitor-nm-state-GDBus.c
+monitor_nm_state_GDBus_LDADD = \
+ $(GIO_LIBS)
+
EXTRA_DIST = \
add-connection-dbus-glib.c \
add-connection-libnm-glib.c \
get-active-connections-dbus-glib.c \
list-connections-dbus-glib.c \
list-connections-libnm-glib.c \
- get-ap-info-libnm-glib.c
+ get-ap-info-libnm-glib.c \
+ monitor-nm-running-dbus-glib.c \
+ monitor-nm-running-GDBus.c \
+ monitor-nm-state-GDBus.c
all: all-am
@@ -481,6 +531,15 @@ list-connections-dbus-glib$(EXEEXT): $(list_connections_dbus_glib_OBJECTS) $(lis
list-connections-libnm-glib$(EXEEXT): $(list_connections_libnm_glib_OBJECTS) $(list_connections_libnm_glib_DEPENDENCIES)
@rm -f list-connections-libnm-glib$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(list_connections_libnm_glib_OBJECTS) $(list_connections_libnm_glib_LDADD) $(LIBS)
+monitor-nm-running-GDBus$(EXEEXT): $(monitor_nm_running_GDBus_OBJECTS) $(monitor_nm_running_GDBus_DEPENDENCIES)
+ @rm -f monitor-nm-running-GDBus$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(monitor_nm_running_GDBus_OBJECTS) $(monitor_nm_running_GDBus_LDADD) $(LIBS)
+monitor-nm-running-dbus-glib$(EXEEXT): $(monitor_nm_running_dbus_glib_OBJECTS) $(monitor_nm_running_dbus_glib_DEPENDENCIES)
+ @rm -f monitor-nm-running-dbus-glib$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(monitor_nm_running_dbus_glib_OBJECTS) $(monitor_nm_running_dbus_glib_LDADD) $(LIBS)
+monitor-nm-state-GDBus$(EXEEXT): $(monitor_nm_state_GDBus_OBJECTS) $(monitor_nm_state_GDBus_DEPENDENCIES)
+ @rm -f monitor-nm-state-GDBus$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(monitor_nm_state_GDBus_OBJECTS) $(monitor_nm_state_GDBus_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -494,6 +553,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-ap-info-libnm-glib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list-connections-dbus-glib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list-connections-libnm-glib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor-nm-running-GDBus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor-nm-running-dbus-glib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor-nm-state-GDBus.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
diff --git a/examples/C/glib/list-connections-libnm-glib.c b/examples/C/glib/list-connections-libnm-glib.c
index edb5ccc34..01a9f254e 100644
--- a/examples/C/glib/list-connections-libnm-glib.c
+++ b/examples/C/glib/list-connections-libnm-glib.c
@@ -76,7 +76,7 @@ show_connection (NMConnection *data, gpointer user_data)
char timestamp_real_str[64];
const char *val1, *val2, *val3, *val4, *val5;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (s_con) {
/* Get various info from NMSettingConnection and show it */
timestamp = nm_setting_connection_get_timestamp (s_con);
diff --git a/examples/C/glib/monitor-nm-running-GDBus.c b/examples/C/glib/monitor-nm-running-GDBus.c
new file mode 100644
index 000000000..42f9b7582
--- /dev/null
+++ b/examples/C/glib/monitor-nm-running-GDBus.c
@@ -0,0 +1,92 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set ft=c ts=4 sts=4 sw=4 noexpandtab smartindent: */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2012 Red Hat, Inc.
+ */
+
+/*
+ * This example monitors whether NM is running by checking if
+ * "org.freedesktop.NetworkManager" is owned by a process on D-Bus.
+ * It uses g_bus_watch_name().
+ *
+ * See also http://developer.gnome.org/gio/stable/gio-Watching-Bus-Names.html
+ *
+ * Standalone compilation:
+ * gcc -Wall `pkg-config --libs --cflags glib-2.0 gio-2.0` monitor-nm-running-GDBus.c -o monitor-nm-running-GDBus
+ */
+
+#include <gio/gio.h>
+
+#if GLIB_CHECK_VERSION(2,26,0)
+static void
+on_name_appeared (GDBusConnection *connection,
+ const gchar *name,
+ const gchar *name_owner,
+ gpointer user_data)
+{
+ g_print ("Name '%s' on the system bus is owned by %s => NM is running\n",
+ name, name_owner);
+}
+
+static void
+on_name_vanished (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ g_print ("Name '%s' does not exist on the system bus => NM is not running\n", name);
+}
+#endif
+
+
+int
+main (int argc, char *argv[])
+{
+#if GLIB_CHECK_VERSION(2,26,0)
+ guint watcher_id;
+ GMainLoop *loop;
+ GBusNameWatcherFlags flags;
+
+ /* Initialize GType system */
+ g_type_init ();
+
+ g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n");
+ g_print ("===================================================\n");
+
+ flags = G_BUS_NAME_WATCHER_FLAGS_NONE;
+
+ /* Start to watch "org.freedesktop.NetworkManager" bus name */
+ watcher_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
+ "org.freedesktop.NetworkManager",
+ flags,
+ on_name_appeared,
+ on_name_vanished,
+ NULL,
+ NULL);
+
+ /* Run main loop */
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ /* Stop watching the name */
+ g_bus_unwatch_name (watcher_id);
+#else
+ g_print ("Sorry, you need at least GLib 2.26 for GDBus.\n");
+#endif
+
+ return 0;
+}
+
diff --git a/examples/C/glib/monitor-nm-running-dbus-glib.c b/examples/C/glib/monitor-nm-running-dbus-glib.c
new file mode 100644
index 000000000..3290fb1ac
--- /dev/null
+++ b/examples/C/glib/monitor-nm-running-dbus-glib.c
@@ -0,0 +1,125 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set ft=c ts=4 sts=4 sw=4 noexpandtab smartindent: */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2012 Red Hat, Inc.
+ */
+
+/*
+ * This example monitors whether NM is running by checking D-Bus
+ * NameOwnerChanged signal.
+ * It uses dbus-glib library.
+ *
+ * Standalone compilation:
+ * gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1` monitor-nm-running.c -o monitor-nm-running
+ */
+
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-bindings.h>
+#include <string.h>
+
+#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
+
+static void
+proxy_name_owner_changed (DBusGProxy *proxy,
+ const char *name,
+ const char *old_owner,
+ const char *new_owner,
+ gpointer user_data)
+{
+ gboolean *nm_running = (gboolean *) user_data;
+ gboolean old_good = (old_owner && strlen (old_owner));
+ gboolean new_good = (new_owner && strlen (new_owner));
+ gboolean new_running = FALSE;
+
+ /* We are only interested in NetworkManager */
+ if (!name || strcmp (name, NM_DBUS_SERVICE) != 0)
+ return;
+
+ if (!old_good && new_good)
+ new_running = TRUE;
+ else if (old_good && !new_good)
+ new_running = FALSE;
+
+ *nm_running = new_running;
+
+ g_print ("name: '%s', old_owner: '%s', new_owner: '%s'", name, old_owner, new_owner);
+ g_print (" => NM is %s\n", *nm_running ? "running" : "not running");
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ DBusGConnection *bus;
+ DBusGProxy *bus_proxy;
+ GMainLoop *loop = NULL;
+ GError *err = NULL;
+ gboolean nm_running;
+
+ /* Initialize GType system */
+ g_type_init ();
+
+ g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n");
+ g_print ("===================================================\n");
+
+ /* Get system bus */
+ bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
+
+ /* Create a D-Bus proxy to D-Bus daemon */
+ bus_proxy = dbus_g_proxy_new_for_name (bus,
+ "org.freedesktop.DBus",
+ "/org/freedesktop/DBus",
+ "org.freedesktop.DBus");
+
+ if (!bus_proxy) {
+ g_message ("Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus.");
+ dbus_g_connection_unref (bus);
+ return -1;
+ }
+
+ /* Call NameHasOwner method to find out if NM is running. When NM runs it claims
+ * 'org.freedesktop.NetworkManager' service name on D-Bus */
+ if (!org_freedesktop_DBus_name_has_owner (bus_proxy, NM_DBUS_SERVICE, &nm_running, &err)) {
+ g_message ("Error: NameHasOwner request failed: %s",
+ (err && err->message) ? err->message : "(unknown)");
+ g_clear_error (&err);
+ g_object_unref (bus_proxy);
+ dbus_g_connection_unref (bus);
+ return -1;
+ }
+ g_print ("NM is %s\n", nm_running ? "running" : "not running");
+
+
+ /* Connect to NameOwnerChanged signal to monitor NM running state */
+ dbus_g_proxy_add_signal (bus_proxy, "NameOwnerChanged",
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (bus_proxy,
+ "NameOwnerChanged",
+ G_CALLBACK (proxy_name_owner_changed),
+ &nm_running, NULL);
+
+ loop = g_main_loop_new (NULL, FALSE); /* Create main loop */
+ g_main_loop_run (loop); /* Run main loop */
+
+ g_object_unref (bus_proxy);
+ dbus_g_connection_unref (bus);
+
+ return 0;
+}
+
diff --git a/examples/C/glib/monitor-nm-state-GDBus.c b/examples/C/glib/monitor-nm-state-GDBus.c
new file mode 100644
index 000000000..22ff65b77
--- /dev/null
+++ b/examples/C/glib/monitor-nm-state-GDBus.c
@@ -0,0 +1,138 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set ft=c ts=4 sts=4 sw=4 noexpandtab smartindent: */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2012 Red Hat, Inc.
+ */
+
+/*
+ * This example monitors NM state via D-Bus "StateChanged" signal on
+ * "org.freedesktop.NetworkManager" object.
+ * It uses GDBus.
+
+ * You don't need to have NetworkManager devel package installed. You can just
+ * grab NetworkManager.h and put it in the path.
+ *
+ * Standalone compilation:
+ * gcc -Wall `pkg-config --libs --cflags glib-2.0 gio-2.0 NetworkManager` monitor-nm-state-GDBus.c -o monitor-nm-state-GDBus
+ */
+
+#include <gio/gio.h>
+#include <string.h>
+#include <NetworkManager.h>
+
+#if GLIB_CHECK_VERSION(2,26,0)
+static const char *
+nm_state_to_string (NMState state)
+{
+ switch (state) {
+ case NM_STATE_ASLEEP:
+ return "asleep";
+ case NM_STATE_CONNECTING:
+ return "connecting";
+ case NM_STATE_CONNECTED_LOCAL:
+ return "connected (local only)";
+ case NM_STATE_CONNECTED_SITE:
+ return "connected (site only)";
+ case NM_STATE_CONNECTED_GLOBAL:
+ return "connected";
+ case NM_STATE_DISCONNECTING:
+ return "disconnecting";
+ case NM_STATE_DISCONNECTED:
+ return "disconnected";
+ case NM_STATE_UNKNOWN:
+ default:
+ return "unknown";
+ }
+}
+
+static void
+on_signal (GDBusProxy *proxy,
+ gchar *sender_name,
+ gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
+{
+ guint32 new_state;
+
+ /* Print all signals */
+ //gchar *parameters_str;
+ //parameters_str = g_variant_print (parameters, TRUE);
+ //g_print (" *** Received Signal: %s: %s\n", signal_name, parameters_str);
+ //g_free (parameters_str);
+
+ /* We are only interested in "StateChanged" signal */
+ if (strcmp (signal_name, "StateChanged") == 0) {
+ GVariant *tmp = g_variant_get_child_value (parameters, 0);
+ new_state = g_variant_get_uint32 (tmp);
+ g_variant_unref (tmp);
+ g_print ("NetworkManager state is: (%d) %s\n", new_state, nm_state_to_string ((NMState) new_state));
+ }
+}
+#endif
+
+
+int
+main (int argc, char *argv[])
+{
+#if GLIB_CHECK_VERSION(2,26,0)
+ GMainLoop *loop;
+ GError *error = NULL;
+ GDBusProxyFlags flags;
+ GDBusProxy *proxy;
+
+ /* Initialize GType system */
+ g_type_init ();
+
+ /* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager' interface */
+ g_print ("Monitor NetworkManager's state\n");
+ g_print ("==============================\n");
+
+ flags = G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ flags,
+ NULL, /* GDBusInterfaceInfo */
+ "org.freedesktop.NetworkManager",
+ "/org/freedesktop/NetworkManager",
+ "org.freedesktop.NetworkManager",
+ NULL, /* GCancellable */
+ &error);
+
+ if (proxy == NULL)
+ {
+ g_printerr ("Error creating D-Bus proxy: %s\n", error->message);
+ g_error_free (error);
+ return -1;
+ }
+
+ /* Connect to g-signal to receive signals from proxy (remote object) */
+ g_signal_connect (proxy,
+ "g-signal",
+ G_CALLBACK (on_signal),
+ NULL);
+
+ /* Run main loop */
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ g_object_unref (proxy);
+#else
+ g_print ("Sorry, you need at least GLib 2.26 for GDBus.\n");
+#endif
+
+ return 0;
+}
+
diff --git a/examples/C/qt/Makefile.am b/examples/C/qt/Makefile.am
index 5f0c6a1e3..a0cf8f4db 100644
--- a/examples/C/qt/Makefile.am
+++ b/examples/C/qt/Makefile.am
@@ -1,4 +1,5 @@
-INCLUDES = -I${top_srcdir}/include
+INCLUDES = -I${top_srcdir}/include \
+ -I${top_builddir}/include
AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
@@ -7,7 +8,8 @@ AM_CPPFLAGS = \
noinst_PROGRAMS = \
add-connection-wired \
list-connections \
- change-ipv4-addresses
+ change-ipv4-addresses \
+ monitor-nm-running
add_connection_wired_SOURCES = add-connection-wired.cpp
add_connection_wired_LDADD = \
@@ -24,8 +26,22 @@ change_ipv4_addresses_LDADD = \
$(DBUS_LIBS) \
$(QT_LIBS)
+monitor_nm_running_SOURCES = monitor-nm-running.cpp
+monitor_nm_running_LDADD = \
+ $(DBUS_LIBS) \
+ $(QT_LIBS)
+
+monitor-nm-running.moc: monitor-nm-running.cpp
+ $(AM_V_GEN) $(MOC) -i $< -o $@
+
+BUILT_SOURCES = \
+ monitor-nm-running.moc
+
EXTRA_DIST = \
add-connection-wired.cpp \
list-connections.cpp \
- change-ipv4-addresses.cpp
+ change-ipv4-addresses.cpp \
+ monitor-nm-running.cpp
+
+CLEANFILES = $(BUILT_SOURCES)
diff --git a/examples/C/qt/Makefile.in b/examples/C/qt/Makefile.in
index 6887f1689..5c3f9a33b 100644
--- a/examples/C/qt/Makefile.in
+++ b/examples/C/qt/Makefile.in
@@ -35,7 +35,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = add-connection-wired$(EXEEXT) \
- list-connections$(EXEEXT) change-ipv4-addresses$(EXEEXT)
+ list-connections$(EXEEXT) change-ipv4-addresses$(EXEEXT) \
+ monitor-nm-running$(EXEEXT)
subdir = examples/C/qt
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +74,10 @@ am_list_connections_OBJECTS = list-connections.$(OBJEXT)
list_connections_OBJECTS = $(am_list_connections_OBJECTS)
list_connections_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
+am_monitor_nm_running_OBJECTS = monitor-nm-running.$(OBJEXT)
+monitor_nm_running_OBJECTS = $(am_monitor_nm_running_OBJECTS)
+monitor_nm_running_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -100,9 +105,11 @@ AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(add_connection_wired_SOURCES) \
- $(change_ipv4_addresses_SOURCES) $(list_connections_SOURCES)
+ $(change_ipv4_addresses_SOURCES) $(list_connections_SOURCES) \
+ $(monitor_nm_running_SOURCES)
DIST_SOURCES = $(add_connection_wired_SOURCES) \
- $(change_ipv4_addresses_SOURCES) $(list_connections_SOURCES)
+ $(change_ipv4_addresses_SOURCES) $(list_connections_SOURCES) \
+ $(monitor_nm_running_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -151,6 +158,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -205,11 +214,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -220,6 +233,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -259,6 +273,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -322,7 +338,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-INCLUDES = -I${top_srcdir}/include
+INCLUDES = -I${top_srcdir}/include \
+ -I${top_builddir}/include
+
AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
$(QT_CFLAGS)
@@ -342,12 +360,23 @@ change_ipv4_addresses_LDADD = \
$(DBUS_LIBS) \
$(QT_LIBS)
+monitor_nm_running_SOURCES = monitor-nm-running.cpp
+monitor_nm_running_LDADD = \
+ $(DBUS_LIBS) \
+ $(QT_LIBS)
+
+BUILT_SOURCES = \
+ monitor-nm-running.moc
+
EXTRA_DIST = \
add-connection-wired.cpp \
list-connections.cpp \
- change-ipv4-addresses.cpp
+ change-ipv4-addresses.cpp \
+ monitor-nm-running.cpp
-all: all-am
+CLEANFILES = $(BUILT_SOURCES)
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
@@ -399,6 +428,9 @@ change-ipv4-addresses$(EXEEXT): $(change_ipv4_addresses_OBJECTS) $(change_ipv4_a
list-connections$(EXEEXT): $(list_connections_OBJECTS) $(list_connections_DEPENDENCIES)
@rm -f list-connections$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(list_connections_OBJECTS) $(list_connections_LDADD) $(LIBS)
+monitor-nm-running$(EXEEXT): $(monitor_nm_running_OBJECTS) $(monitor_nm_running_DEPENDENCIES)
+ @rm -f monitor-nm-running$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(monitor_nm_running_OBJECTS) $(monitor_nm_running_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -409,6 +441,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add-connection-wired.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/change-ipv4-addresses.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list-connections.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor-nm-running.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -526,10 +559,12 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS)
installdirs:
-install: install-am
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -546,6 +581,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -554,6 +590,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
@@ -625,7 +662,7 @@ ps-am:
uninstall-am:
-.MAKE: install-am install-strip
+.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
@@ -641,6 +678,9 @@ uninstall-am:
pdf pdf-am ps ps-am tags uninstall uninstall-am
+monitor-nm-running.moc: monitor-nm-running.cpp
+ $(AM_V_GEN) $(MOC) -i $< -o $@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/examples/C/qt/monitor-nm-running.cpp b/examples/C/qt/monitor-nm-running.cpp
new file mode 100644
index 000000000..861f251e0
--- /dev/null
+++ b/examples/C/qt/monitor-nm-running.cpp
@@ -0,0 +1,89 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set ft=c ts=4 sts=4 sw=4 expandtab smartindent: */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2012 Red Hat, Inc.
+ */
+
+/*
+ * This example monitors whether NM is running by checking if
+ * "org.freedesktop.NetworkManager" is owned by a process on D-Bus.
+ * It uses QDBusServiceWatcher class.
+ *
+ * Standalone compilation:
+ * moc-qt4 monitor-nm-running.cpp -o monitor-nm-running.moc
+ * g++ -Wall `pkg-config --libs --cflags QtCore QtDBus` monitor-nm-running.cpp -o monitor-nm-running
+ *
+ * You don't need to have NetworkManager devel package installed.
+ */
+
+#include <iostream>
+#include <QObject>
+#include <QCoreApplication>
+#include <QtDBus/QDBusServiceWatcher>
+#include <QtDBus/QDBusConnection>
+#include <QtCore/QDebug>
+
+const QString NM_DBUS_SERVICE = "org.freedesktop.NetworkManager";
+
+// Define a class with slots
+class NMWatcher: public QObject {
+ Q_OBJECT;
+
+ public slots:
+ void serviceRegistered(const QString& name);
+ void serviceUnregistered(const QString& name);
+};
+
+
+void NMWatcher::serviceRegistered(const QString& name)
+{
+ std::cout << "Name '" << name.toStdString() << "' registered"
+ << " => NM is running" << std::endl;
+}
+
+void NMWatcher::serviceUnregistered(const QString& name)
+{
+ std::cout << "Name '" << name.toStdString() << "' unregistered"
+ << " => NM is not running" << std::endl;
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app (argc, argv);
+
+ qDebug() << "Monitor 'org.freedesktop.NetworkManager' D-Bus name";
+ qDebug() << "===================================================";
+
+ NMWatcher nm_watcher;
+
+ // Watch all changes of D-Bus NM_DBUS_SERVICE name
+ QDBusServiceWatcher *watcher = new QDBusServiceWatcher(NM_DBUS_SERVICE,
+ QDBusConnection::systemBus());
+
+ QObject::connect(watcher, SIGNAL(serviceRegistered(const QString&)),
+ &nm_watcher, SLOT(serviceRegistered(const QString&)));
+
+ QObject::connect(watcher, SIGNAL(serviceUnregistered(const QString&)),
+ &nm_watcher, SLOT(serviceUnregistered(const QString&)));
+
+ app.exec();
+
+ delete watcher;
+ return 0;
+}
+
+#include "monitor-nm-running.moc"
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 643959b14..eeea87717 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,3 +1,5 @@
SUBDIRS= \
+ shell \
python \
+ ruby \
C
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 243af5ec1..bd89738ce 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -147,6 +147,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -201,11 +203,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -216,6 +222,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -255,6 +262,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -319,7 +328,9 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = \
+ shell \
python \
+ ruby \
C
all: all-recursive
diff --git a/examples/python/Makefile.in b/examples/python/Makefile.in
index 5231cef81..fce5f16a4 100644
--- a/examples/python/Makefile.in
+++ b/examples/python/Makefile.in
@@ -107,6 +107,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -161,11 +163,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -176,6 +182,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -215,6 +222,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/examples/ruby/Makefile.am b/examples/ruby/Makefile.am
new file mode 100644
index 000000000..14f97ef89
--- /dev/null
+++ b/examples/ruby/Makefile.am
@@ -0,0 +1,4 @@
+EXTRA_DIST = \
+ add-connection.rb \
+ get-basic-nm-info.rb \
+ list-devices.rb
diff --git a/examples/ruby/Makefile.in b/examples/ruby/Makefile.in
new file mode 100644
index 000000000..0e5db4165
--- /dev/null
+++ b/examples/ruby/Makefile.in
@@ -0,0 +1,482 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = examples/ruby
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnl-check.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DHCLIENT_PATH = @DHCLIENT_PATH@
+DHCLIENT_VERSION = @DHCLIENT_VERSION@
+DHCPCD_PATH = @DHCPCD_PATH@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+IPTABLES_PATH = @IPTABLES_PATH@
+IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@
+IWMX_SDK_LIBS = @IWMX_SDK_LIBS@
+KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDL = @LIBDL@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBNL1_CFLAGS = @LIBNL1_CFLAGS@
+LIBNL1_LIBS = @LIBNL1_LIBS@
+LIBNL2_CFLAGS = @LIBNL2_CFLAGS@
+LIBNL2_LIBS = @LIBNL2_LIBS@
+LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
+LIBNL3_LIBS = @LIBNL3_LIBS@
+LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
+LIBNL_LIBS = @LIBNL_LIBS@
+LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
+LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
+NM_MICRO_VERSION = @NM_MICRO_VERSION@
+NM_MINOR_VERSION = @NM_MINOR_VERSION@
+NM_VERSION = @NM_VERSION@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_PATH = @PKGCONFIG_PATH@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+RESOLVCONF_PATH = @RESOLVCONF_PATH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
+UDEV_BASE_DIR = @UDEV_BASE_DIR@
+USE_NLS = @USE_NLS@
+UUID_CFLAGS = @UUID_CFLAGS@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ add-connection.rb \
+ get-basic-nm-info.rb \
+ list-devices.rb
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/ruby/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu examples/ruby/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/ruby/add-connection.rb b/examples/ruby/add-connection.rb
new file mode 100755
index 000000000..4256848f3
--- /dev/null
+++ b/examples/ruby/add-connection.rb
@@ -0,0 +1,86 @@
+#!/usr/bin/env ruby
+# vim: ft=ruby ts=2 sts=2 sw=2 et ai
+# -*- Mode: ruby; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2011 Red Hat, Inc.
+#
+
+require 'dbus'
+require 'ipaddr'
+
+#
+# This example adds a new ethernet connection via Addconnection() D-Bus call.
+# It also shows how to specify D-Bus signature for properties like "addresses"
+# and "clone-mac-address".
+#
+# Configuration settings are described here:
+# http://projects.gnome.org/NetworkManager/developers/api/09/ref-settings.html
+#
+
+# Helper functions
+def ip_to_int(ip_addr)
+ return IPAddr.new(ip_addr).hton.unpack('L').first
+end
+
+def rand_hex_3(l)
+ "%0#{l}x" % rand(1 << l*4)
+end
+
+def rand_uuid
+ [8,4,4,4,12].map {|n| rand_hex_3(n)}.join('-')
+end
+
+
+# Create new connection settings
+s_con = {
+ "type" => "802-3-ethernet",
+ "uuid"=> rand_uuid,
+ "id" => "__MyConnection__"
+}
+
+s_wired = { "cloned-mac-address" => ["ay", [0x00, 0x22, 0x68, 0x01, 0x02, 0x03]]}
+
+ip1 = ip_to_int("192.168.1.12")
+ip2 = ip_to_int("192.168.1.13")
+gw1 = ip_to_int("192.168.1.1")
+ip3 = ip_to_int("10.0.2.5")
+gw2 = ip_to_int("10.0.2.254")
+dns1 = ip_to_int("8.8.8.8")
+dns2 = ip_to_int("8.8.4.4")
+
+s_ip4 = {
+ "addresses"=> ["aau", [[ip1, 24, gw1], [ip2, 24, gw1], [ip3, 24, gw2]]],
+ "method"=>["s", "manual"],
+ "dns"=> ["au", [dns1, dns2]]
+}
+s_ip6 = {"method" => "ignore"}
+
+con = {
+ "802-3-ethernet" => s_wired,
+ "connection" => s_con,
+ "ipv4" => s_ip4,
+ "ipv6" => s_ip6
+}
+
+system_bus = DBus::SystemBus.instance
+nm = system_bus.service("org.freedesktop.NetworkManager").object("/org/freedesktop/NetworkManager/Settings")
+nm.introspect
+settings_iface = nm["org.freedesktop.NetworkManager.Settings"]
+
+ret = settings_iface.AddConnection(con)
+puts "New connection added: #{ret.first}"
+
diff --git a/examples/ruby/get-basic-nm-info.rb b/examples/ruby/get-basic-nm-info.rb
new file mode 100755
index 000000000..1cf679477
--- /dev/null
+++ b/examples/ruby/get-basic-nm-info.rb
@@ -0,0 +1,51 @@
+#!/usr/bin/env ruby
+# vim: ft=ruby ts=2 sts=2 sw=2 et ai
+# -*- Mode: ruby; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2011 Red Hat, Inc.
+#
+
+require 'dbus'
+
+#
+# This example gets basic information about NetworkManager.
+# Namely, it gets properties from /org/freedesktop/NetworkManager object.
+#
+
+# Get system bus
+system_bus = DBus::SystemBus.instance
+
+# Get the NetworkManager service
+nm_service = system_bus.service("org.freedesktop.NetworkManager")
+
+# Get the object from the service
+nm_object = nm_service.object("/org/freedesktop/NetworkManager")
+
+# Set default interface for the object
+nm_object.default_iface = "org.freedesktop.NetworkManager"
+
+# Introspect it
+nm_object.introspect
+
+properties = nm_object["org.freedesktop.DBus.Properties"].GetAll("org.freedesktop.NetworkManager")
+
+puts "Basic NM properties:"
+puts "===================="
+properties[0].each do |prop,val|
+ puts "#{prop} = #{val}"
+end
+
diff --git a/examples/ruby/list-devices.rb b/examples/ruby/list-devices.rb
new file mode 100755
index 000000000..5831a1268
--- /dev/null
+++ b/examples/ruby/list-devices.rb
@@ -0,0 +1,85 @@
+#!/usr/bin/env ruby
+# vim: ft=ruby ts=2 sts=2 sw=2 et ai
+# -*- Mode: ruby; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2011 Red Hat, Inc.
+#
+
+require 'dbus'
+
+#
+# This example lists basic information about network interfaces known to NM
+#
+
+devtypes = { 1 => "Ethernet",
+ 2 => "WiFi",
+ 5 => "Bluetooth",
+ 6 => "OLPC",
+ 7 => "WiMAX",
+ 8 => "Modem" }
+
+states = { 0 => "Unknown",
+ 10 => "Unmanaged",
+ 20 => "Unavailable",
+ 30 => "Disconnected",
+ 40 => "Prepare",
+ 50 => "Config",
+ 60 => "Need Auth",
+ 70 => "IP Config",
+ 80 => "IP Check",
+ 90 => "Secondaries",
+ 100 => "Activated",
+ 110 => "Deactivating",
+ 120 => "Failed" }
+
+# Get system bus
+system_bus = DBus::SystemBus.instance
+
+# Get the NetworkManager service
+nm_service = system_bus.service("org.freedesktop.NetworkManager")
+
+# Get the object from the service
+nm_object = nm_service.object("/org/freedesktop/NetworkManager")
+
+# Set default interface for the object
+nm_object.default_iface = "org.freedesktop.NetworkManager"
+
+# Introspect it
+nm_object.introspect
+
+# Get all devices known to NM
+devices = nm_object.GetDevices.first
+
+# and print their properties
+devices.each do |d|
+ dev_obj = system_bus.service("org.freedesktop.NetworkManager").object(d)
+ dev_obj.introspect
+ props = dev_obj["org.freedesktop.DBus.Properties"].GetAll("org.freedesktop.NetworkManager.Device")
+
+ puts "============================"
+ puts "Interface: #{props[0]['Interface']}"
+
+ devtype = devtypes[props[0]['DeviceType']]
+ devtype = "Unknown" if devtype.nil?
+ puts "Type: #{devtype}"
+
+ puts "Driver: #{props[0]['Driver']}"
+
+ state = states[props[0]['State']]
+ state = "Unknown" if state.nil?
+ puts "State: #{state}"
+end
diff --git a/examples/shell/Makefile.am b/examples/shell/Makefile.am
new file mode 100644
index 000000000..e4083d9aa
--- /dev/null
+++ b/examples/shell/Makefile.am
@@ -0,0 +1,3 @@
+EXTRA_DIST = \
+ nm-logging.sh \
+ get-hostname.sh
diff --git a/examples/shell/Makefile.in b/examples/shell/Makefile.in
new file mode 100644
index 000000000..1933a406a
--- /dev/null
+++ b/examples/shell/Makefile.in
@@ -0,0 +1,481 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = examples/shell
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnl-check.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DHCLIENT_PATH = @DHCLIENT_PATH@
+DHCLIENT_VERSION = @DHCLIENT_VERSION@
+DHCPCD_PATH = @DHCPCD_PATH@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+IPTABLES_PATH = @IPTABLES_PATH@
+IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@
+IWMX_SDK_LIBS = @IWMX_SDK_LIBS@
+KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDL = @LIBDL@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBNL1_CFLAGS = @LIBNL1_CFLAGS@
+LIBNL1_LIBS = @LIBNL1_LIBS@
+LIBNL2_CFLAGS = @LIBNL2_CFLAGS@
+LIBNL2_LIBS = @LIBNL2_LIBS@
+LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
+LIBNL3_LIBS = @LIBNL3_LIBS@
+LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
+LIBNL_LIBS = @LIBNL_LIBS@
+LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
+LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
+NM_MICRO_VERSION = @NM_MICRO_VERSION@
+NM_MINOR_VERSION = @NM_MINOR_VERSION@
+NM_VERSION = @NM_VERSION@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_PATH = @PKGCONFIG_PATH@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+RESOLVCONF_PATH = @RESOLVCONF_PATH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
+UDEV_BASE_DIR = @UDEV_BASE_DIR@
+USE_NLS = @USE_NLS@
+UUID_CFLAGS = @UUID_CFLAGS@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ nm-logging.sh \
+ get-hostname.sh
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/shell/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu examples/shell/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/shell/get-hostname.sh b/examples/shell/get-hostname.sh
new file mode 100755
index 000000000..a521132c9
--- /dev/null
+++ b/examples/shell/get-hostname.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# vim: ft=sh ts=2 sts=2 sw=2 et ai
+# -*- Mode: sh; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2011 Red Hat, Inc.
+#
+
+#
+# Call Get() method on org.freedesktop.DBus.Properties interface to get Hostname
+# property of /org/freedesktop/NetworkManager/Settings object
+#
+
+SERVICE_NAME="org.freedesktop.NetworkManager"
+OBJECT_PATH="/org/freedesktop/NetworkManager/Settings"
+METHOD="org.freedesktop.DBus.Properties.Get"
+
+
+dbus-send --system --print-reply --dest=$SERVICE_NAME $OBJECT_PATH $METHOD \
+ string:"org.freedesktop.NetworkManager.Settings" string:"Hostname" | \
+sed -n 's/.*"\([^"]*\)".*/\1/p'
+
+
+# The same with glib's gdbus
+# gdbus call --system --dest $SERVICE_NAME --object-path $OBJECT_PATH --method $METHOD \
+# "org.freedesktop.NetworkManager.Settings" "Hostname"
+
+
+# The same with qt's qdbus
+# qdbus --system $SERVICE_NAME $OBJECT_PATH $METHOD \
+# "org.freedesktop.NetworkManager.Settings" "Hostname"
+
diff --git a/examples/shell/nm-logging.sh b/examples/shell/nm-logging.sh
new file mode 100755
index 000000000..afd06e5aa
--- /dev/null
+++ b/examples/shell/nm-logging.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+# vim: ft=sh ts=2 sts=2 sw=2 et ai
+# -*- Mode: sh; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2011 Red Hat, Inc.
+#
+
+#
+# Sets NM logging level and/or domains (see description in 'man NetworkManager.conf')
+# The level controls how verbose NM's log output will be (err,warn,info,debug).
+# Domains control what parts of networking NM emits log messages for. Leaving
+# either of the two arguments blank (i.e., an empty string) will leave that
+# parameter unchanged.
+#
+# The normal logging level is 'info', for debugging use 'debug'.
+#
+# Examples:
+# nm-logging.sh debug - switches the debugging level on
+# nm-logging.sh info - turns debugging off (back to normal)
+# nm-logging.sh "" "WIFI" - changes domain to print only WiFi related messages
+# nm-logging.sh err "HW,IP4" - will print only error messages related to hardware or IPv4
+#
+
+LOG_LEVEL=$1
+LOG_DOMAINS=$2
+
+dbus-send --system --print-reply \
+--dest=org.freedesktop.NetworkManager \
+/org/freedesktop/NetworkManager \
+org.freedesktop.NetworkManager.SetLogging \
+string:"$LOG_LEVEL" string:"$LOG_DOMAINS"
+
diff --git a/include/Makefile.am b/include/Makefile.am
index b5b44d82d..a058bff34 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,7 +1,6 @@
EXTRA_DIST = \
NetworkManager.h \
NetworkManagerVPN.h \
- wireless-helper.h \
nm-dbus-glib-types.h \
nm-glib-compat.h \
nm-test-helpers.h \
diff --git a/include/Makefile.in b/include/Makefile.in
index e10ca22cf..8b60268a9 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -134,6 +134,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -188,11 +190,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -203,6 +209,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -242,6 +249,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -308,7 +317,6 @@ top_srcdir = @top_srcdir@
EXTRA_DIST = \
NetworkManager.h \
NetworkManagerVPN.h \
- wireless-helper.h \
nm-dbus-glib-types.h \
nm-glib-compat.h \
nm-test-helpers.h \
diff --git a/include/NetworkManager.h b/include/NetworkManager.h
index 3522dd25e..0aa31aefa 100644
--- a/include/NetworkManager.h
+++ b/include/NetworkManager.h
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 - 2011 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
*/
#ifndef NETWORK_MANAGER_H
@@ -36,6 +36,7 @@
#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired"
#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless"
#define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH NM_DBUS_INTERFACE_DEVICE ".Bluetooth"
+#define NM_DBUS_INTERFACE_DEVICE_OLPC_MESH NM_DBUS_INTERFACE_DEVICE ".OlpcMesh"
#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint"
#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint"
#define NM_DBUS_INTERFACE_DEVICE_MODEM NM_DBUS_INTERFACE_DEVICE ".Modem"
@@ -47,6 +48,9 @@
#define NM_DBUS_INTERFACE_DHCP4_CONFIG NM_DBUS_INTERFACE ".DHCP4Config"
#define NM_DBUS_INTERFACE_IP6_CONFIG NM_DBUS_INTERFACE ".IP6Config"
#define NM_DBUS_INTERFACE_DHCP6_CONFIG NM_DBUS_INTERFACE ".DHCP6Config"
+#define NM_DBUS_INTERFACE_DEVICE_INFINIBAND NM_DBUS_INTERFACE_DEVICE ".Infiniband"
+#define NM_DBUS_INTERFACE_DEVICE_BOND NM_DBUS_INTERFACE_DEVICE ".Bond"
+#define NM_DBUS_INTERFACE_DEVICE_VLAN NM_DBUS_INTERFACE_DEVICE ".Vlan"
#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManager.Settings"
@@ -101,19 +105,25 @@ typedef enum {
* @NM_DEVICE_TYPE_WIMAX: an 802.16e Mobile WiMAX broadband device
* @NM_DEVICE_TYPE_MODEM: a modem supporting analog telephone, CDMA/EVDO,
* GSM/UMTS, or LTE network access protocols
+ * @NM_DEVICE_TYPE_INFINIBAND: an IP-over-InfiniBand device
+ * @NM_DEVICE_TYPE_BOND: a bond master interface
*
- * #NMState values indicate the current overall networking state.
+ * #NMDeviceType values indicate the type of hardware represented by
+ * an #NMDevice.
**/
typedef enum {
- NM_DEVICE_TYPE_UNKNOWN = 0,
- NM_DEVICE_TYPE_ETHERNET = 1,
- NM_DEVICE_TYPE_WIFI = 2,
- NM_DEVICE_TYPE_UNUSED1 = 3,
- NM_DEVICE_TYPE_UNUSED2 = 4,
- NM_DEVICE_TYPE_BT = 5, /* Bluetooth */
- NM_DEVICE_TYPE_OLPC_MESH = 6,
- NM_DEVICE_TYPE_WIMAX = 7,
- NM_DEVICE_TYPE_MODEM = 8,
+ NM_DEVICE_TYPE_UNKNOWN = 0,
+ NM_DEVICE_TYPE_ETHERNET = 1,
+ NM_DEVICE_TYPE_WIFI = 2,
+ NM_DEVICE_TYPE_UNUSED1 = 3,
+ NM_DEVICE_TYPE_UNUSED2 = 4,
+ NM_DEVICE_TYPE_BT = 5, /* Bluetooth */
+ NM_DEVICE_TYPE_OLPC_MESH = 6,
+ NM_DEVICE_TYPE_WIMAX = 7,
+ NM_DEVICE_TYPE_MODEM = 8,
+ NM_DEVICE_TYPE_INFINIBAND = 9,
+ NM_DEVICE_TYPE_BOND = 10,
+ NM_DEVICE_TYPE_VLAN = 11,
} NMDeviceType;
/**
@@ -141,6 +151,7 @@ typedef enum {
* @NM_WIFI_DEVICE_CAP_CIPHER_CCMP: device supports AES/CCMP encryption
* @NM_WIFI_DEVICE_CAP_WPA: device supports WPA1 authentication
* @NM_WIFI_DEVICE_CAP_RSN: device supports WPA2/RSN authentication
+ * @NM_WIFI_DEVICE_CAP_AP: device supports Access Point mode
*
* 802.11 specific device encryption and authentication capabilities.
**/
@@ -152,7 +163,8 @@ typedef enum {
NM_WIFI_DEVICE_CAP_CIPHER_TKIP = 0x00000004,
NM_WIFI_DEVICE_CAP_CIPHER_CCMP = 0x00000008,
NM_WIFI_DEVICE_CAP_WPA = 0x00000010,
- NM_WIFI_DEVICE_CAP_RSN = 0x00000020
+ NM_WIFI_DEVICE_CAP_RSN = 0x00000020,
+ NM_WIFI_DEVICE_CAP_AP = 0x00000040
} NMDeviceWifiCapabilities;
@@ -461,6 +473,24 @@ typedef enum {
/* The Bluetooth connection failed or timed out */
NM_DEVICE_STATE_REASON_BT_FAILED = 44,
+ /* GSM Modem's SIM Card not inserted */
+ NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45,
+
+ /* GSM Modem's SIM Pin required */
+ NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46,
+
+ /* GSM Modem's SIM Puk required */
+ NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47,
+
+ /* GSM Modem's SIM wrong */
+ NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48,
+
+ /* InfiniBand device does not support connected mode */
+ NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49,
+
+ /* A dependency of the connection failed */
+ NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50,
+
/* Unused */
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
} NMDeviceStateReason;
diff --git a/include/NetworkManagerVPN.h b/include/NetworkManagerVPN.h
index f4ef93d3d..8ee5b9a39 100644
--- a/include/NetworkManagerVPN.h
+++ b/include/NetworkManagerVPN.h
@@ -151,6 +151,9 @@ typedef enum {
/* string: DNS domain name */
#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN "domain"
+/* array of strings: DNS domain names */
+#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAINS "domains"
+
/* string: Login message */
#define NM_VPN_PLUGIN_IP4_CONFIG_BANNER "banner"
diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h
index 4b9687104..30b83e0d5 100644
--- a/include/nm-glib-compat.h
+++ b/include/nm-glib-compat.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw@redhat.com>
@@ -22,6 +23,7 @@
#ifndef NM_GLIB_COMPAT_H
#define NM_GLIB_COMPAT_H
+
#include <glib.h>
#if !GLIB_CHECK_VERSION(2,31,0)
@@ -29,4 +31,17 @@
#define g_value_get_schar g_value_get_char
#endif
+#if !GLIB_CHECK_VERSION(2,30,0)
+#define G_VALUE_INIT { 0, { { 0 } } }
+#endif
+
+#if !GLIB_CHECK_VERSION(2,28,0)
+#define g_simple_async_result_take_error(result, error) \
+ G_STMT_START { \
+ GError *__error = error; \
+ g_simple_async_result_set_from_error (result, __error); \
+ g_error_free (__error); \
+ } G_STMT_END
+#endif
+
#endif /* NM_GLIB_COMPAT_H */
diff --git a/include/nm-version.h b/include/nm-version.h
index b7b6ca2eb..19af476bc 100644
--- a/include/nm-version.h
+++ b/include/nm-version.h
@@ -43,7 +43,7 @@
* Evaluates to the micro version number of NetworkManager which this source
* compiled against.
*/
-#define NM_MICRO_VERSION (2)
+#define NM_MICRO_VERSION (4)
/**
* NM_CHECK_VERSION:
diff --git a/initscript/Arch/Makefile.in b/initscript/Arch/Makefile.in
index 719b4f29d..cd2ba2ea8 100644
--- a/initscript/Arch/Makefile.in
+++ b/initscript/Arch/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/Debian/Makefile.in b/initscript/Debian/Makefile.in
index fe9ef4dcd..7ddadb9cf 100644
--- a/initscript/Debian/Makefile.in
+++ b/initscript/Debian/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/Gentoo/Makefile.in b/initscript/Gentoo/Makefile.in
index bf6ff5b64..4da1a2a43 100644
--- a/initscript/Gentoo/Makefile.in
+++ b/initscript/Gentoo/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/Makefile.in b/initscript/Makefile.in
index 008f92a88..a3a61d15b 100644
--- a/initscript/Makefile.in
+++ b/initscript/Makefile.in
@@ -157,6 +157,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -211,11 +213,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -226,6 +232,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -265,6 +272,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/Mandriva/Makefile.in b/initscript/Mandriva/Makefile.in
index 4a07d5f4a..1b1c87107 100644
--- a/initscript/Mandriva/Makefile.in
+++ b/initscript/Mandriva/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/Mandriva/networkmanager.in b/initscript/Mandriva/networkmanager.in
index dac14e72e..b5374a048 100644
--- a/initscript/Mandriva/networkmanager.in
+++ b/initscript/Mandriva/networkmanager.in
@@ -14,6 +14,7 @@
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
# Short-Description: Daemon for automatically switching to best network connection.
# Description: This is a daemon for automatically switching network
# connections to the best available connection.
diff --git a/initscript/RedHat/Makefile.in b/initscript/RedHat/Makefile.in
index 50e0d3c49..6ee9f0333 100644
--- a/initscript/RedHat/Makefile.in
+++ b/initscript/RedHat/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/SUSE/Makefile.in b/initscript/SUSE/Makefile.in
index 4a6383c27..b0a0fce15 100644
--- a/initscript/SUSE/Makefile.in
+++ b/initscript/SUSE/Makefile.in
@@ -108,6 +108,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -162,11 +164,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -177,6 +183,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -216,6 +223,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/Slackware/Makefile.in b/initscript/Slackware/Makefile.in
index 6c7ef59ab..3d5ad0405 100644
--- a/initscript/Slackware/Makefile.in
+++ b/initscript/Slackware/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/linexa/Makefile.in b/initscript/linexa/Makefile.in
index a82fcd15d..9e65bda23 100644
--- a/initscript/linexa/Makefile.in
+++ b/initscript/linexa/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/initscript/paldo/Makefile.in b/initscript/paldo/Makefile.in
index 309cf11bd..44f3f7f76 100644
--- a/initscript/paldo/Makefile.in
+++ b/initscript/paldo/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/introspection/Makefile.am b/introspection/Makefile.am
index 7b549c126..ea1c51ba2 100644
--- a/introspection/Makefile.am
+++ b/introspection/Makefile.am
@@ -10,6 +10,9 @@ EXTRA_DIST = \
nm-device-ethernet.xml \
nm-device-modem.xml \
nm-device-wimax.xml \
+ nm-device-infiniband.xml \
+ nm-device-bond.xml \
+ nm-device-vlan.xml \
nm-device.xml \
nm-ip4-config.xml \
nm-ip6-config.xml \
diff --git a/introspection/Makefile.in b/introspection/Makefile.in
index 9e74d3911..382cd5ab2 100644
--- a/introspection/Makefile.in
+++ b/introspection/Makefile.in
@@ -108,6 +108,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -162,11 +164,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -177,6 +183,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -216,6 +223,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -291,6 +300,9 @@ EXTRA_DIST = \
nm-device-ethernet.xml \
nm-device-modem.xml \
nm-device-wimax.xml \
+ nm-device-infiniband.xml \
+ nm-device-bond.xml \
+ nm-device-vlan.xml \
nm-device.xml \
nm-ip4-config.xml \
nm-ip6-config.xml \
diff --git a/introspection/all.xml.in b/introspection/all.xml.in
index bcb8d045c..406140e96 100644
--- a/introspection/all.xml.in
+++ b/introspection/all.xml.in
@@ -34,6 +34,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<xi:include href="nm-device-bt.xml"/>
<xi:include href="nm-device-olpc-mesh.xml"/>
<xi:include href="nm-device-wimax.xml"/>
+<xi:include href="nm-device-infiniband.xml"/>
+<xi:include href="nm-device-bond.xml"/>
+<xi:include href="nm-device-vlan.xml"/>
<xi:include href="nm-wimax-nsp.xml"/>
<xi:include href="nm-ip4-config.xml"/>
<xi:include href="nm-ip6-config.xml"/>
diff --git a/introspection/nm-active-connection.xml b/introspection/nm-active-connection.xml
index a150b2c82..ef01ab160 100644
--- a/introspection/nm-active-connection.xml
+++ b/introspection/nm-active-connection.xml
@@ -37,6 +37,9 @@
<property name="Vpn" type="b" access="read">
<tp:docstring>Whether this active connection is also a VPN connection.</tp:docstring>
</property>
+ <property name="Master" type="o" access="read">
+ <tp:docstring>The path to the master device if the connection is a slave.</tp:docstring>
+ </property>
<signal name="PropertiesChanged">
<arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
diff --git a/introspection/nm-device-bond.xml b/introspection/nm-device-bond.xml
new file mode 100644
index 000000000..9d200ef8f
--- /dev/null
+++ b/introspection/nm-device-bond.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+ <interface name="org.freedesktop.NetworkManager.Device.Bond">
+
+ <property name="HwAddress" type="s" access="read">
+ <tp:docstring>
+ Hardware address of the device.
+ </tp:docstring>
+ </property>
+
+ <property name="Carrier" type="b" access="read">
+ <tp:docstring>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </tp:docstring>
+ </property>
+
+ <signal name="PropertiesChanged">
+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
+ <tp:docstring>
+ A dictionary mapping property names to variant boxed values
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ </interface>
+</node>
diff --git a/introspection/nm-device-infiniband.xml b/introspection/nm-device-infiniband.xml
new file mode 100644
index 000000000..097714c69
--- /dev/null
+++ b/introspection/nm-device-infiniband.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+ <interface name="org.freedesktop.NetworkManager.Device.Infiniband">
+
+ <property name="HwAddress" type="s" access="read">
+ <tp:docstring>
+ Hardware address of the device.
+ </tp:docstring>
+ </property>
+
+ <property name="Carrier" type="b" access="read">
+ <tp:docstring>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </tp:docstring>
+ </property>
+
+ <signal name="PropertiesChanged">
+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
+ <tp:docstring>
+ A dictionary mapping property names to variant boxed values
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ </interface>
+</node>
diff --git a/introspection/nm-device-vlan.xml b/introspection/nm-device-vlan.xml
new file mode 100644
index 000000000..54b7bbe48
--- /dev/null
+++ b/introspection/nm-device-vlan.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+ <interface name="org.freedesktop.NetworkManager.Device.Vlan">
+
+ <property name="HwAddress" type="s" access="read">
+ <tp:docstring>
+ Hardware address of the device.
+ </tp:docstring>
+ </property>
+
+ <property name="Carrier" type="b" access="read">
+ <tp:docstring>
+ Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not).
+ </tp:docstring>
+ </property>
+
+ <property name="VlanId" type="u" access="read">
+ <tp:docstring>
+ The VLAN ID of this VLAN interface.
+ </tp:docstring>
+ </property>
+
+ <signal name="PropertiesChanged">
+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
+ <tp:docstring>
+ A dictionary mapping property names to variant boxed values
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ </interface>
+</node>
diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml
index 5fdda96d3..d12d47784 100644
--- a/introspection/nm-device.xml
+++ b/introspection/nm-device.xml
@@ -51,6 +51,11 @@
The current state of the device.
</tp:docstring>
</property>
+ <property name="StateReason" type="(uu)" access="read" tp:type="NM_DEVICE_STATE_REASON_STRUCT">
+ <tp:docstring>
+ The current state and reason for changing to that state.
+ </tp:docstring>
+ </property>
<property name="ActiveConnection" type="o" access="read">
<tp:docstring>
Object path of an ActiveConnection object that "owns" this device during
@@ -236,6 +241,21 @@
wireline data network.
</tp:docstring>
</tp:enumvalue>
+ <tp:enumvalue suffix="INFINIBAND" value="9">
+ <tp:docstring>
+ The device is an IP-capable InfiniBand interface.
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="BOND" value="10">
+ <tp:docstring>
+ The device is a bond master interface.
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="VLAN" value="11">
+ <tp:docstring>
+ The device is a VLAN interface.
+ </tp:docstring>
+ </tp:enumvalue>
</tp:enum>
<tp:flags name="NM_DEVICE_CAP" value-prefix="NM_DEVICE_CAP" type="u">
@@ -476,7 +496,49 @@
The Bluetooth connection timed out or failed.
</tp:docstring>
</tp:enumvalue>
+ <tp:enumvalue suffix="GSM_SIM_NOT_INSERTED" value="45">
+ <tp:docstring>
+ GSM Modem's SIM Card not inserted.
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="GSM_SIM_PIN_REQUIRED" value="46">
+ <tp:docstring>
+ GSM Modem's SIM Pin required.
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="GSM_SIM_PUK_REQUIRED" value="47">
+ <tp:docstring>
+ GSM Modem's SIM Puk required.
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="GSM_SIM_WRONG" value="48">
+ <tp:docstring>
+ GSM Modem's SIM wrong
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="INFINIBAND_MODE" value="49">
+ <tp:docstring>
+ InfiniBand device does not support connected mode.
+ </tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="DEPENDENCY_FAILED" value="50">
+ <tp:docstring>
+ A dependency of the connection failed.
+ </tp:docstring>
+ </tp:enumvalue>
</tp:enum>
+ <tp:struct name="NM_DEVICE_STATE_REASON_STRUCT">
+ <tp:member type="u" name="state" tp:type="NM_DEVICE_STATE">
+ <tp:docstring>
+ The device state.
+ </tp:docstring>
+ </tp:member>
+ <tp:member type="u" name="reason" tp:type="NM_DEVICE_STATE_REASON">
+ <tp:docstring>
+ The reason for originally changing to the device state.
+ </tp:docstring>
+ </tp:member>
+ </tp:struct>
</interface>
</node>
diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am
index 4eec40161..b2ea3b797 100644
--- a/libnm-glib/Makefile.am
+++ b/libnm-glib/Makefile.am
@@ -1,28 +1,16 @@
+include $(GLIB_MAKEFILE)
+
SUBDIRS=. tests
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_builddir)/marshallers
BUILT_SOURCES = \
- nm-access-point-bindings.h \
- nm-client-bindings.h \
- nm-device-bindings.h \
- nm-device-ethernet-bindings.h \
- nm-device-wifi-bindings.h \
- nm-device-bt-bindings.h \
- nm-settings-connection-bindings.h \
- nm-device-wimax-bindings.h \
- nm-device-modem-bindings.h \
- nm-settings-bindings.h \
- nm-vpn-connection-bindings.h \
nm-vpn-plugin-glue.h \
- nm-active-connection-bindings.h \
- nm-ip4-config-bindings.h \
- nm-dhcp4-config-bindings.h \
- nm-ip6-config-bindings.h \
- nm-dhcp6-config-bindings.h \
nm-secret-agent-glue.h
@@ -58,7 +46,7 @@ libdeprecated_HEADERS = libnm_glib.h
lib_LTLIBRARIES = libnm-glib.la libnm-glib-vpn.la
libnm_glib_la_CFLAGS = \
- $(GLIB_CFLAGS) \
+ $(GIO_CFLAGS) \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS)
@@ -70,8 +58,12 @@ libnminclude_HEADERS = \
nm-client.h \
nm-device.h \
nm-device-ethernet.h \
+ nm-device-infiniband.h \
nm-device-wifi.h \
nm-device-bt.h \
+ nm-device-olpc-mesh.h \
+ nm-device-bond.h \
+ nm-device-vlan.h \
nm-access-point.h \
nm-ip4-config.h \
nm-device-modem.h \
@@ -85,21 +77,26 @@ libnminclude_HEADERS = \
nm-remote-settings.h \
nm-secret-agent.h \
nm-device-wimax.h \
- nm-wimax-nsp.h
+ nm-wimax-nsp.h \
+ nm-glib-enum-types.h
libnmvpn_HEADERS = \
nm-vpn-plugin.h \
nm-vpn-plugin-ui-interface.h \
- nm-vpn-plugin-utils.h
+ nm-vpn-plugin-utils.h \
+ nm-vpn-enum-types.h
libnm_glib_la_csources = \
nm-object.c \
nm-client.c \
- nm-dbus-utils.c \
nm-device.c \
nm-device-ethernet.c \
+ nm-device-infiniband.c \
nm-device-wifi.c \
nm-device-bt.c \
+ nm-device-olpc-mesh.c \
+ nm-device-bond.c \
+ nm-device-vlan.c \
nm-access-point.c \
nm-ip4-config.c \
nm-device-modem.c \
@@ -114,55 +111,69 @@ libnm_glib_la_csources = \
nm-remote-settings.c \
nm-secret-agent.c \
nm-device-wimax.c \
- nm-wimax-nsp.c
+ nm-wimax-nsp.c \
+ nm-glib-enum-types.c \
+ nm-glib-marshal.c
libnm_glib_la_private_headers = \
nm-object-private.h \
- nm-dbus-utils.h \
nm-device-private.h \
nm-types-private.h \
nm-object-cache.h \
- nm-remote-connection-private.h
+ nm-remote-connection-private.h \
+ nm-glib-marshal.h
libnm_glib_la_SOURCES = \
$(libnm_glib_la_csources) \
$(libnm_glib_la_private_headers)
+GLIB_GENERATED = nm-glib-enum-types.h nm-glib-enum-types.c
+nm_glib_enum_types_sources = $(libnminclude_HEADERS)
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
+
+GLIB_GENERATED += nm-glib-marshal.h nm-glib-marshal.c
+nm_glib_marshal_sources = $(libnm_glib_la_SOURCES)
+
libnm_glib_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
$(builddir)/libdeprecated-nm-glib.la \
- $(GLIB_LIBS) \
+ $(GIO_LIBS) \
$(DBUS_LIBS) \
$(GUDEV_LIBS)
SYMBOL_VIS_FILE=$(srcdir)/libnm-glib.ver
libnm_glib_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \
- -version-info "6:0:2"
+ -version-info "7:0:3"
noinst_PROGRAMS = libnm-glib-test
libnm_glib_test_SOURCES = libnm-glib-test.c
-libnm_glib_test_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS)
-libnm_glib_test_LDADD = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la $(GLIB_LIBS) $(DBUS_LIBS)
+libnm_glib_test_CFLAGS = $(GIO_CFLAGS) $(DBUS_CFLAGS)
+libnm_glib_test_LDADD = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la $(GIO_LIBS) $(DBUS_LIBS)
libnm_glib_vpn_la_SOURCES = \
nm-vpn-plugin.c \
nm-vpn-plugin-ui-interface.c \
- nm-vpn-plugin-utils.c
-libnm_glib_vpn_la_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS)
-libnm_glib_vpn_la_LIBADD = $(top_builddir)/libnm-util/libnm-util.la $(GLIB_LIBS) $(DBUS_LIBS)
+ nm-vpn-plugin-utils.c \
+ nm-vpn-enum-types.c
+GLIB_GENERATED += nm-vpn-enum-types.h nm-vpn-enum-types.c
+nm_vpn_enum_types_sources = $(libnmvpn_HEADERS)
+libnm_glib_vpn_la_CFLAGS = $(GIO_CFLAGS) $(DBUS_CFLAGS)
+libnm_glib_vpn_la_LIBADD = $(top_builddir)/libnm-util/libnm-util.la $(GIO_LIBS) $(DBUS_LIBS)
libnm_glib_vpn_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib-vpn.ver \
-version-info "2:0:1"
+BUILT_SOURCES += $(GLIB_GENERATED)
+
#####################################################
# Test libnm-glib stuff
#####################################################
libnm_glib_test_la_CFLAGS = \
- $(GLIB_CFLAGS) \
+ $(GIO_CFLAGS) \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS) \
-DLIBNM_GLIB_TEST
@@ -173,67 +184,18 @@ libnm_glib_test_la_SOURCES = \
libnm_glib_test_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
- $(GLIB_LIBS) \
+ $(GIO_LIBS) \
$(DBUS_LIBS) \
$(GUDEV_LIBS)
#####################################################
-nm-client-bindings.h: $(top_srcdir)/introspection/nm-manager.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_client --mode=glib-client --output=$@ $<
-
-nm-device-bindings.h: $(top_srcdir)/introspection/nm-device.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device --mode=glib-client --output=$@ $<
-
-nm-device-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=$@ $<
-
-nm-device-wifi-bindings.h: $(top_srcdir)/introspection/nm-device-wifi.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_wifi --mode=glib-client --output=$@ $<
-
-nm-device-bt-bindings.h: $(top_srcdir)/introspection/nm-device-bt.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_bt --mode=glib-client --output=$@ $<
-
-nm-access-point-bindings.h: $(top_srcdir)/introspection/nm-access-point.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_access_point --mode=glib-client --output=$@ $<
-
-nm-settings-bindings.h: $(top_srcdir)/introspection/nm-settings.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-client --output=$@ $<
-
-nm-settings-connection-bindings.h: $(top_srcdir)/introspection/nm-settings-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings_connection --mode=glib-client --output=$@ $<
-
-nm-vpn-connection-bindings.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-client --output=$@ $<
-
nm-vpn-plugin-glue.h: $(top_srcdir)/introspection/nm-vpn-plugin.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_plugin --mode=glib-server --output=$@ $<
-nm-active-connection-bindings.h: $(top_srcdir)/introspection/nm-active-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_active_connection --mode=glib-client --output=$@ $<
-
-nm-ip4-config-bindings.h: $(top_srcdir)/introspection/nm-ip4-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_ip4_config --mode=glib-client --output=$@ $<
-
-nm-dhcp4-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp4-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp4_config --mode=glib-client --output=$@ $<
-
-nm-ip6-config-bindings.h: $(top_srcdir)/introspection/nm-ip6-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_ip6_config --mode=glib-client --output=$@ $<
-
-nm-dhcp6-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-client --output=$@ $<
-
nm-secret-agent-glue.h: $(top_srcdir)/introspection/nm-secret-agent.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_secret_agent --mode=glib-server --output=$@ $<
-nm-device-wimax-bindings.h: $(top_srcdir)/introspection/nm-device-wimax.xml
- dbus-binding-tool --prefix=nm_device_wimax --mode=glib-client --output=$@ $<
-
-nm-device-modem-bindings.h: $(top_srcdir)/introspection/nm-device-modem.xml
- dbus-binding-tool --prefix=nm_device_modem --mode=glib-client --output=$@ $<
-
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnm-glib.pc libnm-glib-vpn.pc
@@ -241,7 +203,7 @@ DISTCLEANFILES = libnm-glib.pc libnm-glib.pc
EXTRA_DIST = libnm-glib.pc.in libnm-glib-vpn.pc.in libnm-glib.ver libnm-glib-vpn.ver
-CLEANFILES = $(BUILT_SOURCES) *-bindings.h *-glue.h
+CLEANFILES = $(BUILT_SOURCES)
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
@@ -251,8 +213,8 @@ if HAVE_INTROSPECTION
introspection_sources = $(libnminclude_HEADERS) $(libnm_glib_la_csources)
NMClient-1.0.gir: libnm-glib.la
-NMClient_1_0_gir_INCLUDES = GObject-2.0 DBusGLib-1.0
-NMClient_1_0_gir_PACKAGES = gobject-2.0 dbus-glib-1 gudev-1.0
+NMClient_1_0_gir_INCLUDES = Gio-2.0 DBusGLib-1.0
+NMClient_1_0_gir_PACKAGES = gio-2.0 dbus-glib-1 gudev-1.0
NMClient_1_0_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/libnm-glib -I$(top_srcdir)/libnm-util
NMClient_1_0_gir_LIBS = libnm-glib.la
NMClient_1_0_gir_FILES = $(introspection_sources)
diff --git a/libnm-glib/Makefile.in b/libnm-glib/Makefile.in
index cbfa06f48..5a013e87c 100644
--- a/libnm-glib/Makefile.in
+++ b/libnm-glib/Makefile.in
@@ -100,18 +100,19 @@ AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
libnm_glib_test_la_DEPENDENCIES = \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+ $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am__objects_1 =
am__objects_2 = libnm_glib_test_la-nm-object.lo \
libnm_glib_test_la-nm-client.lo \
- libnm_glib_test_la-nm-dbus-utils.lo \
libnm_glib_test_la-nm-device.lo \
libnm_glib_test_la-nm-device-ethernet.lo \
+ libnm_glib_test_la-nm-device-infiniband.lo \
libnm_glib_test_la-nm-device-wifi.lo \
libnm_glib_test_la-nm-device-bt.lo \
+ libnm_glib_test_la-nm-device-olpc-mesh.lo \
+ libnm_glib_test_la-nm-device-bond.lo \
+ libnm_glib_test_la-nm-device-vlan.lo \
libnm_glib_test_la-nm-access-point.lo \
libnm_glib_test_la-nm-ip4-config.lo \
libnm_glib_test_la-nm-device-modem.lo \
@@ -126,7 +127,9 @@ am__objects_2 = libnm_glib_test_la-nm-object.lo \
libnm_glib_test_la-nm-remote-settings.lo \
libnm_glib_test_la-nm-secret-agent.lo \
libnm_glib_test_la-nm-device-wimax.lo \
- libnm_glib_test_la-nm-wimax-nsp.lo
+ libnm_glib_test_la-nm-wimax-nsp.lo \
+ libnm_glib_test_la-nm-glib-enum-types.lo \
+ libnm_glib_test_la-nm-glib-marshal.lo
am__objects_3 = $(am__objects_2) $(am__objects_1)
am_libnm_glib_test_la_OBJECTS = $(am__objects_1) $(am__objects_3)
libnm_glib_test_la_OBJECTS = $(am_libnm_glib_test_la_OBJECTS)
@@ -139,20 +142,23 @@ libnm_glib_vpn_la_DEPENDENCIES = \
$(am__DEPENDENCIES_1)
am_libnm_glib_vpn_la_OBJECTS = libnm_glib_vpn_la-nm-vpn-plugin.lo \
libnm_glib_vpn_la-nm-vpn-plugin-ui-interface.lo \
- libnm_glib_vpn_la-nm-vpn-plugin-utils.lo
+ libnm_glib_vpn_la-nm-vpn-plugin-utils.lo \
+ libnm_glib_vpn_la-nm-vpn-enum-types.lo
libnm_glib_vpn_la_OBJECTS = $(am_libnm_glib_vpn_la_OBJECTS)
libnm_glib_vpn_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libnm_glib_vpn_la_CFLAGS) $(CFLAGS) \
$(libnm_glib_vpn_la_LDFLAGS) $(LDFLAGS) -o $@
libnm_glib_la_DEPENDENCIES = $(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
$(builddir)/libdeprecated-nm-glib.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am__objects_4 = libnm_glib_la-nm-object.lo libnm_glib_la-nm-client.lo \
- libnm_glib_la-nm-dbus-utils.lo libnm_glib_la-nm-device.lo \
- libnm_glib_la-nm-device-ethernet.lo \
+ libnm_glib_la-nm-device.lo libnm_glib_la-nm-device-ethernet.lo \
+ libnm_glib_la-nm-device-infiniband.lo \
libnm_glib_la-nm-device-wifi.lo libnm_glib_la-nm-device-bt.lo \
+ libnm_glib_la-nm-device-olpc-mesh.lo \
+ libnm_glib_la-nm-device-bond.lo \
+ libnm_glib_la-nm-device-vlan.lo \
libnm_glib_la-nm-access-point.lo \
libnm_glib_la-nm-ip4-config.lo \
libnm_glib_la-nm-device-modem.lo \
@@ -165,7 +171,9 @@ am__objects_4 = libnm_glib_la-nm-object.lo libnm_glib_la-nm-client.lo \
libnm_glib_la-nm-remote-connection.lo \
libnm_glib_la-nm-remote-settings.lo \
libnm_glib_la-nm-secret-agent.lo \
- libnm_glib_la-nm-device-wimax.lo libnm_glib_la-nm-wimax-nsp.lo
+ libnm_glib_la-nm-device-wimax.lo libnm_glib_la-nm-wimax-nsp.lo \
+ libnm_glib_la-nm-glib-enum-types.lo \
+ libnm_glib_la-nm-glib-marshal.lo
am_libnm_glib_la_OBJECTS = $(am__objects_4) $(am__objects_1)
libnm_glib_la_OBJECTS = $(am_libnm_glib_la_OBJECTS)
libnm_glib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -303,6 +311,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -357,11 +367,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -372,6 +386,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -411,6 +426,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -477,29 +494,13 @@ top_srcdir = @top_srcdir@
SUBDIRS = . tests
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_builddir)/marshallers
-BUILT_SOURCES = \
- nm-access-point-bindings.h \
- nm-client-bindings.h \
- nm-device-bindings.h \
- nm-device-ethernet-bindings.h \
- nm-device-wifi-bindings.h \
- nm-device-bt-bindings.h \
- nm-settings-connection-bindings.h \
- nm-device-wimax-bindings.h \
- nm-device-modem-bindings.h \
- nm-settings-bindings.h \
- nm-vpn-connection-bindings.h \
- nm-vpn-plugin-glue.h \
- nm-active-connection-bindings.h \
- nm-ip4-config-bindings.h \
- nm-dhcp4-config-bindings.h \
- nm-ip6-config-bindings.h \
- nm-dhcp6-config-bindings.h \
- nm-secret-agent-glue.h
-
+BUILT_SOURCES = nm-vpn-plugin-glue.h nm-secret-agent-glue.h \
+ $(GLIB_GENERATED)
noinst_LTLIBRARIES = \
libdeprecated-nm-glib.la \
libnm-glib-test.la
@@ -530,7 +531,7 @@ libdeprecated_HEADERS = libnm_glib.h
#####################################################
lib_LTLIBRARIES = libnm-glib.la libnm-glib-vpn.la
libnm_glib_la_CFLAGS = \
- $(GLIB_CFLAGS) \
+ $(GIO_CFLAGS) \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS)
@@ -541,8 +542,12 @@ libnminclude_HEADERS = \
nm-client.h \
nm-device.h \
nm-device-ethernet.h \
+ nm-device-infiniband.h \
nm-device-wifi.h \
nm-device-bt.h \
+ nm-device-olpc-mesh.h \
+ nm-device-bond.h \
+ nm-device-vlan.h \
nm-access-point.h \
nm-ip4-config.h \
nm-device-modem.h \
@@ -556,21 +561,26 @@ libnminclude_HEADERS = \
nm-remote-settings.h \
nm-secret-agent.h \
nm-device-wimax.h \
- nm-wimax-nsp.h
+ nm-wimax-nsp.h \
+ nm-glib-enum-types.h
libnmvpn_HEADERS = \
nm-vpn-plugin.h \
nm-vpn-plugin-ui-interface.h \
- nm-vpn-plugin-utils.h
+ nm-vpn-plugin-utils.h \
+ nm-vpn-enum-types.h
libnm_glib_la_csources = \
nm-object.c \
nm-client.c \
- nm-dbus-utils.c \
nm-device.c \
nm-device-ethernet.c \
+ nm-device-infiniband.c \
nm-device-wifi.c \
nm-device-bt.c \
+ nm-device-olpc-mesh.c \
+ nm-device-bond.c \
+ nm-device-vlan.c \
nm-access-point.c \
nm-ip4-config.c \
nm-device-modem.c \
@@ -585,42 +595,52 @@ libnm_glib_la_csources = \
nm-remote-settings.c \
nm-secret-agent.c \
nm-device-wimax.c \
- nm-wimax-nsp.c
+ nm-wimax-nsp.c \
+ nm-glib-enum-types.c \
+ nm-glib-marshal.c
libnm_glib_la_private_headers = \
nm-object-private.h \
- nm-dbus-utils.h \
nm-device-private.h \
nm-types-private.h \
nm-object-cache.h \
- nm-remote-connection-private.h
+ nm-remote-connection-private.h \
+ nm-glib-marshal.h
libnm_glib_la_SOURCES = \
$(libnm_glib_la_csources) \
$(libnm_glib_la_private_headers)
+GLIB_GENERATED = nm-glib-enum-types.h nm-glib-enum-types.c \
+ nm-glib-marshal.h nm-glib-marshal.c nm-vpn-enum-types.h \
+ nm-vpn-enum-types.c
+nm_glib_enum_types_sources = $(libnminclude_HEADERS)
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
+nm_glib_marshal_sources = $(libnm_glib_la_SOURCES)
libnm_glib_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
$(builddir)/libdeprecated-nm-glib.la \
- $(GLIB_LIBS) \
+ $(GIO_LIBS) \
$(DBUS_LIBS) \
$(GUDEV_LIBS)
SYMBOL_VIS_FILE = $(srcdir)/libnm-glib.ver
libnm_glib_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \
- -version-info "6:0:2"
+ -version-info "7:0:3"
libnm_glib_test_SOURCES = libnm-glib-test.c
-libnm_glib_test_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS)
-libnm_glib_test_LDADD = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la $(GLIB_LIBS) $(DBUS_LIBS)
+libnm_glib_test_CFLAGS = $(GIO_CFLAGS) $(DBUS_CFLAGS)
+libnm_glib_test_LDADD = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la $(GIO_LIBS) $(DBUS_LIBS)
libnm_glib_vpn_la_SOURCES = \
nm-vpn-plugin.c \
nm-vpn-plugin-ui-interface.c \
- nm-vpn-plugin-utils.c
+ nm-vpn-plugin-utils.c \
+ nm-vpn-enum-types.c
-libnm_glib_vpn_la_CFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS)
-libnm_glib_vpn_la_LIBADD = $(top_builddir)/libnm-util/libnm-util.la $(GLIB_LIBS) $(DBUS_LIBS)
+nm_vpn_enum_types_sources = $(libnmvpn_HEADERS)
+libnm_glib_vpn_la_CFLAGS = $(GIO_CFLAGS) $(DBUS_CFLAGS)
+libnm_glib_vpn_la_LIBADD = $(top_builddir)/libnm-util/libnm-util.la $(GIO_LIBS) $(DBUS_LIBS)
libnm_glib_vpn_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib-vpn.ver \
-version-info "2:0:1"
@@ -629,7 +649,7 @@ libnm_glib_vpn_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib-vpn.ver \
# Test libnm-glib stuff
#####################################################
libnm_glib_test_la_CFLAGS = \
- $(GLIB_CFLAGS) \
+ $(GIO_CFLAGS) \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS) \
-DLIBNM_GLIB_TEST
@@ -640,8 +660,7 @@ libnm_glib_test_la_SOURCES = \
libnm_glib_test_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
- $(GLIB_LIBS) \
+ $(GIO_LIBS) \
$(DBUS_LIBS) \
$(GUDEV_LIBS)
@@ -649,12 +668,12 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnm-glib.pc libnm-glib-vpn.pc
DISTCLEANFILES = libnm-glib.pc libnm-glib.pc
EXTRA_DIST = libnm-glib.pc.in libnm-glib-vpn.pc.in libnm-glib.ver libnm-glib-vpn.ver
-CLEANFILES = $(BUILT_SOURCES) *-bindings.h *-glue.h $(am__append_2)
+CLEANFILES = $(BUILT_SOURCES) $(am__append_2)
INTROSPECTION_GIRS = $(am__append_1)
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/libnm-util
@HAVE_INTROSPECTION_TRUE@introspection_sources = $(libnminclude_HEADERS) $(libnm_glib_la_csources)
-@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_INCLUDES = GObject-2.0 DBusGLib-1.0
-@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_PACKAGES = gobject-2.0 dbus-glib-1 gudev-1.0
+@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_INCLUDES = Gio-2.0 DBusGLib-1.0
+@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_PACKAGES = gio-2.0 dbus-glib-1 gudev-1.0
@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/libnm-glib -I$(top_srcdir)/libnm-util
@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_LIBS = libnm-glib.la
@HAVE_INTROSPECTION_TRUE@NMClient_1_0_gir_FILES = $(introspection_sources)
@@ -773,15 +792,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-access-point.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-active-connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-client.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-dbus-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-bond.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-bt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-ethernet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-infiniband.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-modem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-olpc-mesh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-vlan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-wifi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device-wimax.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-device.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-dhcp4-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-dhcp6-config.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-glib-enum-types.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-glib-marshal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-ip4-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-ip6-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_la-nm-object-cache.Plo@am__quote@
@@ -796,15 +820,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-access-point.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-active-connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-client.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-dbus-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-bond.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-bt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-ethernet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-infiniband.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-modem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-olpc-mesh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-vlan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-wifi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device-wimax.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-device.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-dhcp4-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-dhcp6-config.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-glib-enum-types.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-glib-marshal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-ip4-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-ip6-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-object-cache.Plo@am__quote@
@@ -815,6 +844,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-types.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-vpn-connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_test_la-nm-wimax-nsp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_vpn_la-nm-vpn-enum-types.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_vpn_la-nm-vpn-plugin-ui-interface.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_vpn_la-nm-vpn-plugin-utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_glib_vpn_la-nm-vpn-plugin.Plo@am__quote@
@@ -870,14 +900,6 @@ libnm_glib_test_la-nm-client.lo: nm-client.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-client.lo `test -f 'nm-client.c' || echo '$(srcdir)/'`nm-client.c
-libnm_glib_test_la-nm-dbus-utils.lo: nm-dbus-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-dbus-utils.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-dbus-utils.Tpo -c -o libnm_glib_test_la-nm-dbus-utils.lo `test -f 'nm-dbus-utils.c' || echo '$(srcdir)/'`nm-dbus-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-dbus-utils.Tpo $(DEPDIR)/libnm_glib_test_la-nm-dbus-utils.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-dbus-utils.c' object='libnm_glib_test_la-nm-dbus-utils.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-dbus-utils.lo `test -f 'nm-dbus-utils.c' || echo '$(srcdir)/'`nm-dbus-utils.c
-
libnm_glib_test_la-nm-device.lo: nm-device.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-device.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-device.Tpo -c -o libnm_glib_test_la-nm-device.lo `test -f 'nm-device.c' || echo '$(srcdir)/'`nm-device.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-device.Tpo $(DEPDIR)/libnm_glib_test_la-nm-device.Plo
@@ -894,6 +916,14 @@ libnm_glib_test_la-nm-device-ethernet.lo: nm-device-ethernet.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-device-ethernet.lo `test -f 'nm-device-ethernet.c' || echo '$(srcdir)/'`nm-device-ethernet.c
+libnm_glib_test_la-nm-device-infiniband.lo: nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-device-infiniband.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-device-infiniband.Tpo -c -o libnm_glib_test_la-nm-device-infiniband.lo `test -f 'nm-device-infiniband.c' || echo '$(srcdir)/'`nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-device-infiniband.Tpo $(DEPDIR)/libnm_glib_test_la-nm-device-infiniband.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-infiniband.c' object='libnm_glib_test_la-nm-device-infiniband.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-device-infiniband.lo `test -f 'nm-device-infiniband.c' || echo '$(srcdir)/'`nm-device-infiniband.c
+
libnm_glib_test_la-nm-device-wifi.lo: nm-device-wifi.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-device-wifi.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-device-wifi.Tpo -c -o libnm_glib_test_la-nm-device-wifi.lo `test -f 'nm-device-wifi.c' || echo '$(srcdir)/'`nm-device-wifi.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-device-wifi.Tpo $(DEPDIR)/libnm_glib_test_la-nm-device-wifi.Plo
@@ -910,6 +940,30 @@ libnm_glib_test_la-nm-device-bt.lo: nm-device-bt.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-device-bt.lo `test -f 'nm-device-bt.c' || echo '$(srcdir)/'`nm-device-bt.c
+libnm_glib_test_la-nm-device-olpc-mesh.lo: nm-device-olpc-mesh.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-device-olpc-mesh.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-device-olpc-mesh.Tpo -c -o libnm_glib_test_la-nm-device-olpc-mesh.lo `test -f 'nm-device-olpc-mesh.c' || echo '$(srcdir)/'`nm-device-olpc-mesh.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-device-olpc-mesh.Tpo $(DEPDIR)/libnm_glib_test_la-nm-device-olpc-mesh.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-olpc-mesh.c' object='libnm_glib_test_la-nm-device-olpc-mesh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-device-olpc-mesh.lo `test -f 'nm-device-olpc-mesh.c' || echo '$(srcdir)/'`nm-device-olpc-mesh.c
+
+libnm_glib_test_la-nm-device-bond.lo: nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-device-bond.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-device-bond.Tpo -c -o libnm_glib_test_la-nm-device-bond.lo `test -f 'nm-device-bond.c' || echo '$(srcdir)/'`nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-device-bond.Tpo $(DEPDIR)/libnm_glib_test_la-nm-device-bond.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-bond.c' object='libnm_glib_test_la-nm-device-bond.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-device-bond.lo `test -f 'nm-device-bond.c' || echo '$(srcdir)/'`nm-device-bond.c
+
+libnm_glib_test_la-nm-device-vlan.lo: nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-device-vlan.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-device-vlan.Tpo -c -o libnm_glib_test_la-nm-device-vlan.lo `test -f 'nm-device-vlan.c' || echo '$(srcdir)/'`nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-device-vlan.Tpo $(DEPDIR)/libnm_glib_test_la-nm-device-vlan.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-vlan.c' object='libnm_glib_test_la-nm-device-vlan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-device-vlan.lo `test -f 'nm-device-vlan.c' || echo '$(srcdir)/'`nm-device-vlan.c
+
libnm_glib_test_la-nm-access-point.lo: nm-access-point.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-access-point.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-access-point.Tpo -c -o libnm_glib_test_la-nm-access-point.lo `test -f 'nm-access-point.c' || echo '$(srcdir)/'`nm-access-point.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-access-point.Tpo $(DEPDIR)/libnm_glib_test_la-nm-access-point.Plo
@@ -1030,6 +1084,22 @@ libnm_glib_test_la-nm-wimax-nsp.lo: nm-wimax-nsp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-wimax-nsp.lo `test -f 'nm-wimax-nsp.c' || echo '$(srcdir)/'`nm-wimax-nsp.c
+libnm_glib_test_la-nm-glib-enum-types.lo: nm-glib-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-glib-enum-types.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-glib-enum-types.Tpo -c -o libnm_glib_test_la-nm-glib-enum-types.lo `test -f 'nm-glib-enum-types.c' || echo '$(srcdir)/'`nm-glib-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-glib-enum-types.Tpo $(DEPDIR)/libnm_glib_test_la-nm-glib-enum-types.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-glib-enum-types.c' object='libnm_glib_test_la-nm-glib-enum-types.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-glib-enum-types.lo `test -f 'nm-glib-enum-types.c' || echo '$(srcdir)/'`nm-glib-enum-types.c
+
+libnm_glib_test_la-nm-glib-marshal.lo: nm-glib-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -MT libnm_glib_test_la-nm-glib-marshal.lo -MD -MP -MF $(DEPDIR)/libnm_glib_test_la-nm-glib-marshal.Tpo -c -o libnm_glib_test_la-nm-glib-marshal.lo `test -f 'nm-glib-marshal.c' || echo '$(srcdir)/'`nm-glib-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test_la-nm-glib-marshal.Tpo $(DEPDIR)/libnm_glib_test_la-nm-glib-marshal.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-glib-marshal.c' object='libnm_glib_test_la-nm-glib-marshal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_test_la-nm-glib-marshal.lo `test -f 'nm-glib-marshal.c' || echo '$(srcdir)/'`nm-glib-marshal.c
+
libnm_glib_vpn_la-nm-vpn-plugin.lo: nm-vpn-plugin.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_vpn_la_CFLAGS) $(CFLAGS) -MT libnm_glib_vpn_la-nm-vpn-plugin.lo -MD -MP -MF $(DEPDIR)/libnm_glib_vpn_la-nm-vpn-plugin.Tpo -c -o libnm_glib_vpn_la-nm-vpn-plugin.lo `test -f 'nm-vpn-plugin.c' || echo '$(srcdir)/'`nm-vpn-plugin.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_vpn_la-nm-vpn-plugin.Tpo $(DEPDIR)/libnm_glib_vpn_la-nm-vpn-plugin.Plo
@@ -1054,6 +1124,14 @@ libnm_glib_vpn_la-nm-vpn-plugin-utils.lo: nm-vpn-plugin-utils.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_vpn_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_vpn_la-nm-vpn-plugin-utils.lo `test -f 'nm-vpn-plugin-utils.c' || echo '$(srcdir)/'`nm-vpn-plugin-utils.c
+libnm_glib_vpn_la-nm-vpn-enum-types.lo: nm-vpn-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_vpn_la_CFLAGS) $(CFLAGS) -MT libnm_glib_vpn_la-nm-vpn-enum-types.lo -MD -MP -MF $(DEPDIR)/libnm_glib_vpn_la-nm-vpn-enum-types.Tpo -c -o libnm_glib_vpn_la-nm-vpn-enum-types.lo `test -f 'nm-vpn-enum-types.c' || echo '$(srcdir)/'`nm-vpn-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_vpn_la-nm-vpn-enum-types.Tpo $(DEPDIR)/libnm_glib_vpn_la-nm-vpn-enum-types.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-vpn-enum-types.c' object='libnm_glib_vpn_la-nm-vpn-enum-types.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_vpn_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_vpn_la-nm-vpn-enum-types.lo `test -f 'nm-vpn-enum-types.c' || echo '$(srcdir)/'`nm-vpn-enum-types.c
+
libnm_glib_la-nm-object.lo: nm-object.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-object.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-object.Tpo -c -o libnm_glib_la-nm-object.lo `test -f 'nm-object.c' || echo '$(srcdir)/'`nm-object.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-object.Tpo $(DEPDIR)/libnm_glib_la-nm-object.Plo
@@ -1070,14 +1148,6 @@ libnm_glib_la-nm-client.lo: nm-client.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-client.lo `test -f 'nm-client.c' || echo '$(srcdir)/'`nm-client.c
-libnm_glib_la-nm-dbus-utils.lo: nm-dbus-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-dbus-utils.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-dbus-utils.Tpo -c -o libnm_glib_la-nm-dbus-utils.lo `test -f 'nm-dbus-utils.c' || echo '$(srcdir)/'`nm-dbus-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-dbus-utils.Tpo $(DEPDIR)/libnm_glib_la-nm-dbus-utils.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-dbus-utils.c' object='libnm_glib_la-nm-dbus-utils.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-dbus-utils.lo `test -f 'nm-dbus-utils.c' || echo '$(srcdir)/'`nm-dbus-utils.c
-
libnm_glib_la-nm-device.lo: nm-device.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-device.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-device.Tpo -c -o libnm_glib_la-nm-device.lo `test -f 'nm-device.c' || echo '$(srcdir)/'`nm-device.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-device.Tpo $(DEPDIR)/libnm_glib_la-nm-device.Plo
@@ -1094,6 +1164,14 @@ libnm_glib_la-nm-device-ethernet.lo: nm-device-ethernet.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-device-ethernet.lo `test -f 'nm-device-ethernet.c' || echo '$(srcdir)/'`nm-device-ethernet.c
+libnm_glib_la-nm-device-infiniband.lo: nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-device-infiniband.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-device-infiniband.Tpo -c -o libnm_glib_la-nm-device-infiniband.lo `test -f 'nm-device-infiniband.c' || echo '$(srcdir)/'`nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-device-infiniband.Tpo $(DEPDIR)/libnm_glib_la-nm-device-infiniband.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-infiniband.c' object='libnm_glib_la-nm-device-infiniband.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-device-infiniband.lo `test -f 'nm-device-infiniband.c' || echo '$(srcdir)/'`nm-device-infiniband.c
+
libnm_glib_la-nm-device-wifi.lo: nm-device-wifi.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-device-wifi.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-device-wifi.Tpo -c -o libnm_glib_la-nm-device-wifi.lo `test -f 'nm-device-wifi.c' || echo '$(srcdir)/'`nm-device-wifi.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-device-wifi.Tpo $(DEPDIR)/libnm_glib_la-nm-device-wifi.Plo
@@ -1110,6 +1188,30 @@ libnm_glib_la-nm-device-bt.lo: nm-device-bt.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-device-bt.lo `test -f 'nm-device-bt.c' || echo '$(srcdir)/'`nm-device-bt.c
+libnm_glib_la-nm-device-olpc-mesh.lo: nm-device-olpc-mesh.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-device-olpc-mesh.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-device-olpc-mesh.Tpo -c -o libnm_glib_la-nm-device-olpc-mesh.lo `test -f 'nm-device-olpc-mesh.c' || echo '$(srcdir)/'`nm-device-olpc-mesh.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-device-olpc-mesh.Tpo $(DEPDIR)/libnm_glib_la-nm-device-olpc-mesh.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-olpc-mesh.c' object='libnm_glib_la-nm-device-olpc-mesh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-device-olpc-mesh.lo `test -f 'nm-device-olpc-mesh.c' || echo '$(srcdir)/'`nm-device-olpc-mesh.c
+
+libnm_glib_la-nm-device-bond.lo: nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-device-bond.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-device-bond.Tpo -c -o libnm_glib_la-nm-device-bond.lo `test -f 'nm-device-bond.c' || echo '$(srcdir)/'`nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-device-bond.Tpo $(DEPDIR)/libnm_glib_la-nm-device-bond.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-bond.c' object='libnm_glib_la-nm-device-bond.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-device-bond.lo `test -f 'nm-device-bond.c' || echo '$(srcdir)/'`nm-device-bond.c
+
+libnm_glib_la-nm-device-vlan.lo: nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-device-vlan.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-device-vlan.Tpo -c -o libnm_glib_la-nm-device-vlan.lo `test -f 'nm-device-vlan.c' || echo '$(srcdir)/'`nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-device-vlan.Tpo $(DEPDIR)/libnm_glib_la-nm-device-vlan.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-vlan.c' object='libnm_glib_la-nm-device-vlan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-device-vlan.lo `test -f 'nm-device-vlan.c' || echo '$(srcdir)/'`nm-device-vlan.c
+
libnm_glib_la-nm-access-point.lo: nm-access-point.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-access-point.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-access-point.Tpo -c -o libnm_glib_la-nm-access-point.lo `test -f 'nm-access-point.c' || echo '$(srcdir)/'`nm-access-point.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-access-point.Tpo $(DEPDIR)/libnm_glib_la-nm-access-point.Plo
@@ -1230,6 +1332,22 @@ libnm_glib_la-nm-wimax-nsp.lo: nm-wimax-nsp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-wimax-nsp.lo `test -f 'nm-wimax-nsp.c' || echo '$(srcdir)/'`nm-wimax-nsp.c
+libnm_glib_la-nm-glib-enum-types.lo: nm-glib-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-glib-enum-types.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-glib-enum-types.Tpo -c -o libnm_glib_la-nm-glib-enum-types.lo `test -f 'nm-glib-enum-types.c' || echo '$(srcdir)/'`nm-glib-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-glib-enum-types.Tpo $(DEPDIR)/libnm_glib_la-nm-glib-enum-types.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-glib-enum-types.c' object='libnm_glib_la-nm-glib-enum-types.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-glib-enum-types.lo `test -f 'nm-glib-enum-types.c' || echo '$(srcdir)/'`nm-glib-enum-types.c
+
+libnm_glib_la-nm-glib-marshal.lo: nm-glib-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -MT libnm_glib_la-nm-glib-marshal.lo -MD -MP -MF $(DEPDIR)/libnm_glib_la-nm-glib-marshal.Tpo -c -o libnm_glib_la-nm-glib-marshal.lo `test -f 'nm-glib-marshal.c' || echo '$(srcdir)/'`nm-glib-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_la-nm-glib-marshal.Tpo $(DEPDIR)/libnm_glib_la-nm-glib-marshal.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-glib-marshal.c' object='libnm_glib_la-nm-glib-marshal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_la_CFLAGS) $(CFLAGS) -c -o libnm_glib_la-nm-glib-marshal.lo `test -f 'nm-glib-marshal.c' || echo '$(srcdir)/'`nm-glib-marshal.c
+
libnm_glib_test-libnm-glib-test.o: libnm-glib-test.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnm_glib_test_CFLAGS) $(CFLAGS) -MT libnm_glib_test-libnm-glib-test.o -MD -MP -MF $(DEPDIR)/libnm_glib_test-libnm-glib-test.Tpo -c -o libnm_glib_test-libnm-glib-test.o `test -f 'libnm-glib-test.c' || echo '$(srcdir)/'`libnm-glib-test.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_glib_test-libnm-glib-test.Tpo $(DEPDIR)/libnm_glib_test-libnm-glib-test.Po
@@ -1707,63 +1825,16 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
uninstall-libnmvpnHEADERS uninstall-pkgconfigDATA \
uninstall-typelibDATA
+include $(GLIB_MAKEFILE)
#####################################################
-nm-client-bindings.h: $(top_srcdir)/introspection/nm-manager.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_client --mode=glib-client --output=$@ $<
-
-nm-device-bindings.h: $(top_srcdir)/introspection/nm-device.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device --mode=glib-client --output=$@ $<
-
-nm-device-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=$@ $<
-
-nm-device-wifi-bindings.h: $(top_srcdir)/introspection/nm-device-wifi.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_wifi --mode=glib-client --output=$@ $<
-
-nm-device-bt-bindings.h: $(top_srcdir)/introspection/nm-device-bt.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_bt --mode=glib-client --output=$@ $<
-
-nm-access-point-bindings.h: $(top_srcdir)/introspection/nm-access-point.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_access_point --mode=glib-client --output=$@ $<
-
-nm-settings-bindings.h: $(top_srcdir)/introspection/nm-settings.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-client --output=$@ $<
-
-nm-settings-connection-bindings.h: $(top_srcdir)/introspection/nm-settings-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings_connection --mode=glib-client --output=$@ $<
-
-nm-vpn-connection-bindings.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-client --output=$@ $<
-
nm-vpn-plugin-glue.h: $(top_srcdir)/introspection/nm-vpn-plugin.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_plugin --mode=glib-server --output=$@ $<
-nm-active-connection-bindings.h: $(top_srcdir)/introspection/nm-active-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_active_connection --mode=glib-client --output=$@ $<
-
-nm-ip4-config-bindings.h: $(top_srcdir)/introspection/nm-ip4-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_ip4_config --mode=glib-client --output=$@ $<
-
-nm-dhcp4-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp4-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp4_config --mode=glib-client --output=$@ $<
-
-nm-ip6-config-bindings.h: $(top_srcdir)/introspection/nm-ip6-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_ip6_config --mode=glib-client --output=$@ $<
-
-nm-dhcp6-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-client --output=$@ $<
-
nm-secret-agent-glue.h: $(top_srcdir)/introspection/nm-secret-agent.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_secret_agent --mode=glib-server --output=$@ $<
-nm-device-wimax-bindings.h: $(top_srcdir)/introspection/nm-device-wimax.xml
- dbus-binding-tool --prefix=nm_device_wimax --mode=glib-client --output=$@ $<
-
-nm-device-modem-bindings.h: $(top_srcdir)/introspection/nm-device-modem.xml
- dbus-binding-tool --prefix=nm_device_modem --mode=glib-client --output=$@ $<
-
-include $(INTROSPECTION_MAKEFILE)
@HAVE_INTROSPECTION_TRUE@NMClient-1.0.gir: libnm-glib.la
diff --git a/libnm-glib/libnm-glib-test.c b/libnm-glib/libnm-glib-test.c
index 16e6fad64..4e80806fb 100644
--- a/libnm-glib/libnm-glib-test.c
+++ b/libnm-glib/libnm-glib-test.c
@@ -28,8 +28,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include "wireless-helper.h"
-
#include "nm-client.h"
#include "nm-device.h"
#include "nm-device-ethernet.h"
diff --git a/libnm-glib/libnm-glib.ver b/libnm-glib/libnm-glib.ver
index 1a4a68cf6..427e2484c 100644
--- a/libnm-glib/libnm-glib.ver
+++ b/libnm-glib/libnm-glib.ver
@@ -23,6 +23,7 @@ global:
nm_active_connection_get_default6;
nm_active_connection_get_default;
nm_active_connection_get_devices;
+ nm_active_connection_get_master;
nm_active_connection_get_specific_object;
nm_active_connection_get_state;
nm_active_connection_get_type;
@@ -43,6 +44,10 @@ global:
nm_client_networking_get_enabled;
nm_client_networking_set_enabled;
nm_client_new;
+ nm_client_new_async;
+ nm_client_new_finish;
+ nm_client_permission_get_type;
+ nm_client_permission_result_get_type;
nm_client_sleep;
nm_client_wimax_get_enabled;
nm_client_wimax_hardware_get_enabled;
@@ -53,13 +58,24 @@ global:
nm_client_wwan_get_enabled;
nm_client_wwan_hardware_get_enabled;
nm_client_wwan_set_enabled;
+ nm_device_bond_error_get_type;
+ nm_device_bond_error_quark;
+ nm_device_bond_get_carrier;
+ nm_device_bond_get_hw_address;
+ nm_device_bond_get_type;
+ nm_device_bond_new;
+ nm_device_bt_error_get_type;
+ nm_device_bt_error_quark;
nm_device_bt_get_capabilities;
nm_device_bt_get_hw_address;
nm_device_bt_get_name;
nm_device_bt_get_type;
nm_device_bt_new;
+ nm_device_connection_compatible;
nm_device_connection_valid;
nm_device_disconnect;
+ nm_device_ethernet_error_get_type;
+ nm_device_ethernet_error_quark;
nm_device_ethernet_get_carrier;
nm_device_ethernet_get_hw_address;
nm_device_ethernet_get_permanent_hw_address;
@@ -81,13 +97,38 @@ global:
nm_device_get_managed;
nm_device_get_product;
nm_device_get_state;
+ nm_device_get_state_reason;
nm_device_get_type;
nm_device_get_udi;
nm_device_get_vendor;
+ nm_device_infiniband_error_get_type;
+ nm_device_infiniband_error_quark;
+ nm_device_infiniband_get_carrier;
+ nm_device_infiniband_get_hw_address;
+ nm_device_infiniband_get_type;
+ nm_device_infiniband_new;
+ nm_device_modem_error_get_type;
+ nm_device_modem_error_quark;
nm_device_modem_get_current_capabilities;
nm_device_modem_get_modem_capabilities;
nm_device_modem_get_type;
nm_device_new;
+ nm_device_olpc_mesh_error_get_type;
+ nm_device_olpc_mesh_error_quark;
+ nm_device_olpc_mesh_get_active_channel;
+ nm_device_olpc_mesh_get_companion;
+ nm_device_olpc_mesh_get_hw_address;
+ nm_device_olpc_mesh_get_type;
+ nm_device_olpc_mesh_new;
+ nm_device_vlan_error_get_type;
+ nm_device_vlan_error_quark;
+ nm_device_vlan_get_carrier;
+ nm_device_vlan_get_hw_address;
+ nm_device_vlan_get_type;
+ nm_device_vlan_get_vlan_id;
+ nm_device_vlan_new;
+ nm_device_wifi_error_get_type;
+ nm_device_wifi_error_quark;
nm_device_wifi_get_access_point_by_path;
nm_device_wifi_get_access_points;
nm_device_wifi_get_active_access_point;
@@ -98,6 +139,8 @@ global:
nm_device_wifi_get_permanent_hw_address;
nm_device_wifi_get_type;
nm_device_wifi_new;
+ nm_device_wimax_error_get_type;
+ nm_device_wimax_error_quark;
nm_device_wimax_get_active_nsp;
nm_device_wimax_get_bsid;
nm_device_wimax_get_center_frequency;
@@ -150,11 +193,15 @@ global:
nm_remote_settings_get_type;
nm_remote_settings_list_connections;
nm_remote_settings_new;
+ nm_remote_settings_new_async;
+ nm_remote_settings_new_finish;
nm_remote_settings_save_hostname;
nm_secret_agent_delete_secrets;
nm_secret_agent_error_get_type;
nm_secret_agent_error_quark;
+ nm_secret_agent_get_registered;
nm_secret_agent_get_secrets;
+ nm_secret_agent_get_secrets_flags_get_type;
nm_secret_agent_get_type;
nm_secret_agent_register;
nm_secret_agent_save_secrets;
@@ -172,6 +219,7 @@ global:
nm_wimax_nsp_get_network_type;
nm_wimax_nsp_get_signal_quality;
nm_wimax_nsp_get_type;
+ nm_wimax_nsp_network_type_get_type;
nm_wimax_nsp_new;
local:
*;
diff --git a/libnm-glib/nm-access-point.c b/libnm-glib/nm-access-point.c
index 415700d97..53993b072 100644
--- a/libnm-glib/nm-access-point.c
+++ b/libnm-glib/nm-access-point.c
@@ -36,8 +36,6 @@
#include "nm-types-private.h"
#include "nm-object-private.h"
-#include "nm-access-point-bindings.h"
-
G_DEFINE_TYPE (NMAccessPoint, nm_access_point, NM_TYPE_OBJECT)
#define NM_ACCESS_POINT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACCESS_POINT, NMAccessPointPrivate))
@@ -115,19 +113,10 @@ nm_access_point_new (DBusGConnection *connection, const char *path)
NM80211ApFlags
nm_access_point_get_flags (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NM_802_11_AP_FLAGS_NONE);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->flags) {
- priv->flags = _nm_object_get_uint_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_FLAGS,
- NULL);
- }
-
- return priv->flags;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->flags;
}
/**
@@ -141,19 +130,10 @@ nm_access_point_get_flags (NMAccessPoint *ap)
NM80211ApSecurityFlags
nm_access_point_get_wpa_flags (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NM_802_11_AP_SEC_NONE);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->wpa_flags) {
- priv->wpa_flags = _nm_object_get_uint_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_WPA_FLAGS,
- NULL);
- }
-
- return priv->wpa_flags;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->wpa_flags;
}
/**
@@ -168,19 +148,10 @@ nm_access_point_get_wpa_flags (NMAccessPoint *ap)
NM80211ApSecurityFlags
nm_access_point_get_rsn_flags (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NM_802_11_AP_SEC_NONE);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->rsn_flags) {
- priv->rsn_flags = _nm_object_get_uint_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_RSN_FLAGS,
- NULL);
- }
-
- return priv->rsn_flags;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->rsn_flags;
}
/**
@@ -195,19 +166,10 @@ nm_access_point_get_rsn_flags (NMAccessPoint *ap)
const GByteArray *
nm_access_point_get_ssid (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NULL);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->ssid) {
- priv->ssid = _nm_object_get_byte_array_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_SSID,
- NULL);
- }
-
- return priv->ssid;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->ssid;
}
/**
@@ -221,19 +183,10 @@ nm_access_point_get_ssid (NMAccessPoint *ap)
guint32
nm_access_point_get_frequency (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), 0);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->frequency) {
- priv->frequency = _nm_object_get_uint_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_FREQUENCY,
- NULL);
- }
-
- return priv->frequency;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->frequency;
}
/**
@@ -248,19 +201,10 @@ nm_access_point_get_frequency (NMAccessPoint *ap)
const char *
nm_access_point_get_bssid (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NULL);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->bssid) {
- priv->bssid = _nm_object_get_string_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_HW_ADDRESS,
- NULL);
- }
-
- return priv->bssid;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->bssid;
}
/**
@@ -291,19 +235,10 @@ nm_access_point_get_hw_address (NMAccessPoint *ap)
NM80211Mode
nm_access_point_get_mode (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), 0);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->mode) {
- priv->mode = _nm_object_get_uint_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_MODE,
- NULL);
- }
-
- return priv->mode;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->mode;
}
/**
@@ -317,19 +252,10 @@ nm_access_point_get_mode (NMAccessPoint *ap)
guint32
nm_access_point_get_max_bitrate (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), 0);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->max_bitrate) {
- priv->max_bitrate = _nm_object_get_uint_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_MAX_BITRATE,
- NULL);
- }
-
- return priv->max_bitrate;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->max_bitrate;
}
/**
@@ -343,25 +269,16 @@ nm_access_point_get_max_bitrate (NMAccessPoint *ap)
guint8
nm_access_point_get_strength (NMAccessPoint *ap)
{
- NMAccessPointPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), 0);
- priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- if (!priv->strength) {
- priv->strength = _nm_object_get_byte_property (NM_OBJECT (ap),
- NM_DBUS_INTERFACE_ACCESS_POINT,
- DBUS_PROP_STRENGTH,
- NULL);
- }
-
- return priv->strength;
+ _nm_object_ensure_inited (NM_OBJECT (ap));
+ return NM_ACCESS_POINT_GET_PRIVATE (ap)->strength;
}
/**
- * nm_access_point_filter_connections:
+ * nm_access_point_connection_valid:
* @ap: an #NMAccessPoint to validate @connection against
- * @connections: an #NMConnection to validate against @ap
+ * @connection: an #NMConnection to validate against @ap
*
* Validates a given connection against a given WiFi access point to ensure that
* the connection may be activated with that AP. The connection must match the
@@ -475,6 +392,11 @@ nm_access_point_connection_valid (NMAccessPoint *ap, NMConnection *connection)
* returned connections will match the @ap's SSID and (if given) BSSID and
* other attributes like security settings, channel, etc.
*
+ * To obtain the list of connections that are compatible with this access point,
+ * use nm_remote_settings_list_connections() and then filter the returned list
+ * for a given #NMDevice using nm_device_filter_connections() and finally
+ * filter that list with this function.
+ *
* Returns: (transfer container) (element-type NetworkManager.Connection): a
* list of #NMConnection objects that could be activated with the given @ap.
* The elements of the list are owned by their creator and should not be freed
@@ -590,51 +512,42 @@ demarshal_ssid (NMObject *object, GParamSpec *pspec, GValue *value, gpointer fie
}
static void
-register_for_property_changed (NMAccessPoint *ap)
+register_properties (NMAccessPoint *ap)
{
NMAccessPointPrivate *priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_ACCESS_POINT_FLAGS, _nm_object_demarshal_generic, &priv->flags },
- { NM_ACCESS_POINT_WPA_FLAGS, _nm_object_demarshal_generic, &priv->wpa_flags },
- { NM_ACCESS_POINT_RSN_FLAGS, _nm_object_demarshal_generic, &priv->rsn_flags },
- { NM_ACCESS_POINT_SSID, demarshal_ssid, &priv->ssid },
- { NM_ACCESS_POINT_FREQUENCY, _nm_object_demarshal_generic, &priv->frequency },
- { NM_ACCESS_POINT_HW_ADDRESS, _nm_object_demarshal_generic, &priv->bssid },
- { NM_ACCESS_POINT_MODE, _nm_object_demarshal_generic, &priv->mode },
- { NM_ACCESS_POINT_MAX_BITRATE, _nm_object_demarshal_generic, &priv->max_bitrate },
- { NM_ACCESS_POINT_STRENGTH, _nm_object_demarshal_generic, &priv->strength },
+ const NMPropertiesInfo property_info[] = {
+ { NM_ACCESS_POINT_FLAGS, &priv->flags },
+ { NM_ACCESS_POINT_WPA_FLAGS, &priv->wpa_flags },
+ { NM_ACCESS_POINT_RSN_FLAGS, &priv->rsn_flags },
+ { NM_ACCESS_POINT_SSID, &priv->ssid, demarshal_ssid },
+ { NM_ACCESS_POINT_FREQUENCY, &priv->frequency },
+ { NM_ACCESS_POINT_HW_ADDRESS, &priv->bssid },
+ { NM_ACCESS_POINT_MODE, &priv->mode },
+ { NM_ACCESS_POINT_MAX_BITRATE, &priv->max_bitrate },
+ { NM_ACCESS_POINT_STRENGTH, &priv->strength },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (ap),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (ap),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- NMObject *object;
NMAccessPointPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_access_point_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_access_point_parent_class)->constructed (object);
priv = NM_ACCESS_POINT_GET_PRIVATE (object);
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (object),
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_ACCESS_POINT);
- register_for_property_changed (NM_ACCESS_POINT (object));
-
- return G_OBJECT (object);
+ register_properties (NM_ACCESS_POINT (object));
}
@@ -646,7 +559,7 @@ nm_access_point_class_init (NMAccessPointClass *ap_class)
g_type_class_add_private (ap_class, sizeof (NMAccessPointPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->dispose = dispose;
object_class->finalize = finalize;
diff --git a/libnm-glib/nm-active-connection.c b/libnm-glib/nm-active-connection.c
index 7dc1c2dbe..59d8a6aff 100644
--- a/libnm-glib/nm-active-connection.c
+++ b/libnm-glib/nm-active-connection.c
@@ -28,17 +28,26 @@
#include "nm-object-private.h"
#include "nm-types-private.h"
#include "nm-device.h"
+#include "nm-device-private.h"
#include "nm-connection.h"
-
-#include "nm-active-connection-bindings.h"
-
-G_DEFINE_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT)
+#include "nm-vpn-connection.h"
+#include "nm-glib-compat.h"
+
+static GType _nm_active_connection_type_for_path (DBusGConnection *connection,
+ const char *path);
+static void _nm_active_connection_type_for_path_async (DBusGConnection *connection,
+ const char *path,
+ NMObjectTypeCallbackFunc callback,
+ gpointer user_data);
+
+G_DEFINE_TYPE_WITH_CODE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT,
+ _nm_object_register_type_func (g_define_type_id,
+ _nm_active_connection_type_for_path,
+ _nm_active_connection_type_for_path_async);
+ )
#define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate))
-static gboolean demarshal_devices (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
-
-
typedef struct {
gboolean disposed;
DBusGProxy *proxy;
@@ -50,6 +59,7 @@ typedef struct {
NMActiveConnectionState state;
gboolean is_default;
gboolean is_default6;
+ char *master;
} NMActiveConnectionPrivate;
enum {
@@ -61,6 +71,7 @@ enum {
PROP_STATE,
PROP_DEFAULT,
PROP_DEFAULT6,
+ PROP_MASTER,
LAST_PROP
};
@@ -72,6 +83,7 @@ enum {
#define DBUS_PROP_STATE "State"
#define DBUS_PROP_DEFAULT "Default"
#define DBUS_PROP_DEFAULT6 "Default6"
+#define DBUS_PROP_MASTER "Master"
/**
* nm_active_connection_new:
@@ -94,6 +106,104 @@ nm_active_connection_new (DBusGConnection *connection, const char *path)
NULL);
}
+static GType
+_nm_active_connection_type_for_path (DBusGConnection *connection,
+ const char *path)
+{
+ DBusGProxy *proxy;
+ GError *error = NULL;
+ GValue value = {0,};
+ GType type;
+
+ proxy = dbus_g_proxy_new_for_name (connection,
+ NM_DBUS_SERVICE,
+ path,
+ "org.freedesktop.DBus.Properties");
+ if (!proxy) {
+ g_warning ("%s: couldn't create D-Bus object proxy.", __func__);
+ return G_TYPE_INVALID;
+ }
+
+ /* Have to create an NMVPNConnection if it's a VPN connection, otherwise
+ * a plain NMActiveConnection.
+ */
+ if (dbus_g_proxy_call (proxy,
+ "Get", &error,
+ G_TYPE_STRING, NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
+ G_TYPE_STRING, "Vpn",
+ G_TYPE_INVALID,
+ G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
+ if (g_value_get_boolean (&value))
+ type = NM_TYPE_VPN_CONNECTION;
+ else
+ type = NM_TYPE_ACTIVE_CONNECTION;
+ } else {
+ g_warning ("Error in getting active connection 'Vpn' property: (%d) %s",
+ error->code, error->message);
+ g_error_free (error);
+ type = G_TYPE_INVALID;
+ }
+
+ g_object_unref (proxy);
+ return type;
+}
+
+typedef struct {
+ DBusGConnection *connection;
+ NMObjectTypeCallbackFunc callback;
+ gpointer user_data;
+} NMActiveConnectionAsyncData;
+
+static void
+async_got_type (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
+{
+ NMActiveConnectionAsyncData *async_data = user_data;
+ GValue value = G_VALUE_INIT;
+ const char *path = dbus_g_proxy_get_path (proxy);
+ GError *error = NULL;
+ GType type;
+
+ if (dbus_g_proxy_end_call (proxy, call, &error,
+ G_TYPE_VALUE, &value,
+ G_TYPE_INVALID)) {
+ if (g_value_get_boolean (&value))
+ type = NM_TYPE_VPN_CONNECTION;
+ else
+ type = NM_TYPE_ACTIVE_CONNECTION;
+ } else {
+ g_warning ("%s: could not read properties for %s: %s", __func__, path, error->message);
+ type = G_TYPE_INVALID;
+ }
+
+ async_data->callback (type, async_data->user_data);
+
+ g_object_unref (proxy);
+ g_slice_free (NMActiveConnectionAsyncData, async_data);
+}
+
+static void
+_nm_active_connection_type_for_path_async (DBusGConnection *connection,
+ const char *path,
+ NMObjectTypeCallbackFunc callback,
+ gpointer user_data)
+{
+ NMActiveConnectionAsyncData *async_data;
+ DBusGProxy *proxy;
+
+ async_data = g_slice_new (NMActiveConnectionAsyncData);
+ async_data->connection = connection;
+ async_data->callback = callback;
+ async_data->user_data = user_data;
+
+ proxy = dbus_g_proxy_new_for_name (connection, NM_DBUS_SERVICE, path,
+ "org.freedesktop.DBus.Properties");
+ dbus_g_proxy_begin_call (proxy, "Get",
+ async_got_type, async_data, NULL,
+ G_TYPE_STRING, NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
+ G_TYPE_STRING, "Vpn",
+ G_TYPE_INVALID);
+}
+
/**
* nm_active_connection_get_connection:
* @connection: a #NMActiveConnection
@@ -106,19 +216,10 @@ nm_active_connection_new (DBusGConnection *connection, const char *path)
const char *
nm_active_connection_get_connection (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (!priv->connection) {
- priv->connection = _nm_object_get_string_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_CONNECTION,
- NULL);
- }
-
- return priv->connection;
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->connection;
}
/**
@@ -133,19 +234,10 @@ nm_active_connection_get_connection (NMActiveConnection *connection)
const char *
nm_active_connection_get_uuid (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (!priv->uuid) {
- priv->uuid = _nm_object_get_string_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_UUID,
- NULL);
- }
-
- return priv->uuid;
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->uuid;
}
/**
@@ -160,19 +252,10 @@ nm_active_connection_get_uuid (NMActiveConnection *connection)
const char *
nm_active_connection_get_specific_object (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (!priv->specific_object) {
- priv->specific_object = _nm_object_get_string_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_SPECIFIC_OBJECT,
- NULL);
- }
-
- return priv->specific_object;
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->specific_object;
}
/**
@@ -187,27 +270,10 @@ nm_active_connection_get_specific_object (NMActiveConnection *connection)
const GPtrArray *
nm_active_connection_get_devices (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
- GValue value = { 0, };
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (priv->devices)
- return handle_ptr_array_return (priv->devices);
-
- if (!_nm_object_get_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_DEVICES,
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_devices (NM_OBJECT (connection), NULL, &value, &priv->devices);
- g_value_unset (&value);
-
- return handle_ptr_array_return (priv->devices);
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return handle_ptr_array_return (NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->devices);
}
/**
@@ -221,19 +287,10 @@ nm_active_connection_get_devices (NMActiveConnection *connection)
NMActiveConnectionState
nm_active_connection_get_state (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NM_ACTIVE_CONNECTION_STATE_UNKNOWN);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (!priv->state) {
- priv->state = _nm_object_get_uint_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_STATE,
- NULL);
- }
-
- return priv->state;
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->state;
}
/**
@@ -248,19 +305,10 @@ nm_active_connection_get_state (NMActiveConnection *connection)
gboolean
nm_active_connection_get_default (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (!priv->is_default) {
- priv->is_default = _nm_object_get_boolean_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_DEFAULT,
- NULL);
- }
-
- return priv->is_default;
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_default;
}
/**
@@ -275,19 +323,28 @@ nm_active_connection_get_default (NMActiveConnection *connection)
gboolean
nm_active_connection_get_default6 (NMActiveConnection *connection)
{
- NMActiveConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
- priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- if (!priv->is_default6) {
- priv->is_default6 = _nm_object_get_boolean_property (NM_OBJECT (connection),
- NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- DBUS_PROP_DEFAULT6,
- NULL);
- }
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_default6;
+}
- return priv->is_default6;
+/**
+ * nm_active_connection_get_master:
+ * @connection: a #NMActiveConnection
+ *
+ * Gets the path to the master #NMDevice of the connection.
+ *
+ * Returns: the path of the master #NMDevice of the #NMActiveConnection.
+ * This is the internal string used by the connection, and must not be modified.
+ **/
+const char *
+nm_active_connection_get_master (NMActiveConnection *connection)
+{
+ g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (connection));
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->master;
}
static void
@@ -324,6 +381,7 @@ finalize (GObject *object)
g_free (priv->connection);
g_free (priv->uuid);
g_free (priv->specific_object);
+ g_free (priv->master);
G_OBJECT_CLASS (nm_active_connection_parent_class)->finalize (object);
}
@@ -340,6 +398,9 @@ get_property (GObject *object,
case PROP_CONNECTION:
g_value_set_string (value, nm_active_connection_get_connection (self));
break;
+ case PROP_UUID:
+ g_value_set_string (value, nm_active_connection_get_uuid (self));
+ break;
case PROP_SPECIFIC_OBJECT:
g_value_set_boxed (value, nm_active_connection_get_specific_object (self));
break;
@@ -355,68 +416,55 @@ get_property (GObject *object,
case PROP_DEFAULT6:
g_value_set_boolean (value, nm_active_connection_get_default6 (self));
break;
+ case PROP_MASTER:
+ g_value_set_string (value, nm_active_connection_get_master (self));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
-static gboolean
-demarshal_devices (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- DBusGConnection *connection;
-
- connection = nm_object_get_connection (object);
- if (!_nm_object_array_demarshal (value, (GPtrArray **) field, connection, nm_device_new))
- return FALSE;
-
- _nm_object_queue_notify (object, NM_ACTIVE_CONNECTION_DEVICES);
- return TRUE;
-}
-
static void
-register_for_property_changed (NMActiveConnection *connection)
+register_properties (NMActiveConnection *connection)
{
NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_ACTIVE_CONNECTION_CONNECTION, _nm_object_demarshal_generic, &priv->connection },
- { NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, _nm_object_demarshal_generic, &priv->specific_object },
- { NM_ACTIVE_CONNECTION_DEVICES, demarshal_devices, &priv->devices },
- { NM_ACTIVE_CONNECTION_STATE, _nm_object_demarshal_generic, &priv->state },
- { NM_ACTIVE_CONNECTION_DEFAULT, _nm_object_demarshal_generic, &priv->is_default },
- { NM_ACTIVE_CONNECTION_DEFAULT6, _nm_object_demarshal_generic, &priv->is_default6 },
+ const NMPropertiesInfo property_info[] = {
+ { NM_ACTIVE_CONNECTION_CONNECTION, &priv->connection },
+ { NM_ACTIVE_CONNECTION_UUID, &priv->uuid },
+ { NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, &priv->specific_object },
+ { NM_ACTIVE_CONNECTION_DEVICES, &priv->devices, NULL, NM_TYPE_DEVICE },
+ { NM_ACTIVE_CONNECTION_STATE, &priv->state },
+ { NM_ACTIVE_CONNECTION_DEFAULT, &priv->is_default },
+ { NM_ACTIVE_CONNECTION_DEFAULT6, &priv->is_default6 },
+ { NM_ACTIVE_CONNECTION_MASTER, &priv->master },
+
+ /* not tracked after construction time */
+ { "vpn", NULL },
+
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (connection),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (connection),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- NMObject *object;
NMActiveConnectionPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_active_connection_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_active_connection_parent_class)->constructed (object);
priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (object),
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION);
- register_for_property_changed (NM_ACTIVE_CONNECTION (object));
-
- return G_OBJECT (object);
+ register_properties (NM_ACTIVE_CONNECTION (object));
}
@@ -428,7 +476,7 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
g_type_class_add_private (ap_class, sizeof (NMActiveConnectionPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->dispose = dispose;
object_class->finalize = finalize;
@@ -449,6 +497,19 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
G_PARAM_READABLE));
/**
+ * NMActiveConnection:uuid:
+ *
+ * The active connection's UUID
+ **/
+ g_object_class_install_property
+ (object_class, PROP_UUID,
+ g_param_spec_string (NM_ACTIVE_CONNECTION_UUID,
+ "UUID",
+ "UUID",
+ NULL,
+ G_PARAM_READABLE));
+
+ /**
* NMActiveConnection:specific-object:
*
* The specific object's path of the active connection.
@@ -514,4 +575,17 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
"Is the default IPv6 active connection",
FALSE,
G_PARAM_READABLE));
+
+ /**
+ * NMActiveConnection:master:
+ *
+ * The path of the master device if one exists.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_MASTER,
+ g_param_spec_string (NM_ACTIVE_CONNECTION_MASTER,
+ "Master",
+ "Path of the master device",
+ NULL,
+ G_PARAM_READABLE));
}
diff --git a/libnm-glib/nm-active-connection.h b/libnm-glib/nm-active-connection.h
index 974e551a1..d6426e903 100644
--- a/libnm-glib/nm-active-connection.h
+++ b/libnm-glib/nm-active-connection.h
@@ -46,6 +46,7 @@ G_BEGIN_DECLS
#define NM_ACTIVE_CONNECTION_STATE "state"
#define NM_ACTIVE_CONNECTION_DEFAULT "default"
#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6"
+#define NM_ACTIVE_CONNECTION_MASTER "master"
typedef struct {
NMObject parent;
@@ -74,6 +75,7 @@ const GPtrArray *nm_active_connection_get_devices (NMActiveConnection *c
NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection);
gboolean nm_active_connection_get_default (NMActiveConnection *connection);
gboolean nm_active_connection_get_default6 (NMActiveConnection *connection);
+const char * nm_active_connection_get_master (NMActiveConnection *connection);
G_END_DECLS
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index 0769de1a7..937a1bf85 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <dbus/dbus-glib.h>
@@ -29,19 +29,26 @@
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
#include "nm-device-private.h"
-#include "nm-marshal.h"
+#include "nm-glib-marshal.h"
#include "nm-types-private.h"
#include "nm-object-private.h"
#include "nm-active-connection.h"
#include "nm-vpn-connection.h"
#include "nm-object-cache.h"
#include "nm-dbus-glib-types.h"
-
-#include "nm-client-bindings.h"
+#include "nm-glib-compat.h"
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
-G_DEFINE_TYPE (NMClient, nm_client, NM_TYPE_OBJECT)
+static void nm_client_initable_iface_init (GInitableIface *iface);
+static void nm_client_async_initable_iface_init (GAsyncInitableIface *iface);
+static GInitableIface *nm_client_parent_initable_iface;
+static GAsyncInitableIface *nm_client_parent_async_initable_iface;
+
+G_DEFINE_TYPE_WITH_CODE (NMClient, nm_client, NM_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_client_initable_iface_init);
+ G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_client_async_initable_iface_init);
+ )
#define NM_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_CLIENT, NMClientPrivate))
@@ -64,7 +71,6 @@ typedef struct {
*/
GSList *pending_activations;
- gboolean have_networking_enabled;
gboolean networking_enabled;
gboolean wireless_enabled;
gboolean wireless_hw_enabled;
@@ -109,20 +115,8 @@ static void proxy_name_owner_changed (DBusGProxy *proxy,
const char *new_owner,
gpointer user_data);
-static void client_device_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data);
-static void client_device_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data);
-
-static void
-handle_net_enabled_changed (GObject *object,
- GParamSpec *pspec,
- GValue *value,
- gpointer user_data)
-{
- NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (object);
-
- /* Update the cache flag when it changes */
- priv->have_networking_enabled = TRUE;
-}
+static void client_device_added (NMObject *client, NMObject *device);
+static void client_device_removed (NMObject *client, NMObject *device);
static void
nm_client_init (NMClient *client)
@@ -132,11 +126,6 @@ nm_client_init (NMClient *client)
priv->state = NM_STATE_UNKNOWN;
priv->permissions = g_hash_table_new (g_direct_hash, g_direct_equal);
-
- g_signal_connect (client,
- "notify::" NM_CLIENT_NETWORKING_ENABLED,
- G_CALLBACK (handle_net_enabled_changed),
- client);
}
static void
@@ -154,188 +143,40 @@ poke_wireless_devices_with_rf_status (NMClient *client)
}
static void
-update_wireless_status (NMClient *client, gboolean notify)
-{
- NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
- gboolean val;
- gboolean poke = FALSE;
-
- val = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "WirelessHardwareEnabled",
- NULL);
- if (val != priv->wireless_hw_enabled) {
- priv->wireless_hw_enabled = val;
- poke = TRUE;
- if (notify)
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIRELESS_HARDWARE_ENABLED);
- }
-
- if (priv->wireless_hw_enabled == FALSE)
- val = FALSE;
- else
- val = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "WirelessEnabled",
- NULL);
- if (val != priv->wireless_enabled) {
- priv->wireless_enabled = val;
- poke = TRUE;
- if (notify)
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIRELESS_ENABLED);
- }
-
- if (poke)
- poke_wireless_devices_with_rf_status (client);
-}
-
-static void
wireless_enabled_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
{
poke_wireless_devices_with_rf_status (NM_CLIENT (object));
}
static void
-update_wwan_status (NMClient *client, gboolean notify)
-{
- NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
- gboolean val;
-
- val = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "WwanHardwareEnabled",
- NULL);
- if (val != priv->wwan_hw_enabled) {
- priv->wwan_hw_enabled = val;
- if (notify)
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WWAN_HARDWARE_ENABLED);
- }
-
- if (priv->wwan_hw_enabled == FALSE)
- val = FALSE;
- else {
- val = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "WwanEnabled",
- NULL);
- }
-
- if (val != priv->wwan_enabled) {
- priv->wwan_enabled = val;
- if (notify)
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WWAN_ENABLED);
- }
-}
-
-static void
-update_wimax_status (NMClient *client, gboolean notify)
+register_properties (NMClient *client)
{
NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
- gboolean val;
-
- val = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "WimaxHardwareEnabled",
- NULL);
- if (val != priv->wimax_hw_enabled) {
- priv->wimax_hw_enabled = val;
- if (notify)
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIMAX_HARDWARE_ENABLED);
- }
-
- if (priv->wimax_hw_enabled == FALSE)
- val = FALSE;
- else {
- val = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "WimaxEnabled",
- NULL);
- }
-
- if (val != priv->wimax_enabled) {
- priv->wimax_enabled = val;
- if (notify)
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIMAX_ENABLED);
- }
-}
-
-static GObject *
-new_active_connection (DBusGConnection *connection, const char *path)
-{
- DBusGProxy *proxy;
- GError *error = NULL;
- GValue value = {0,};
- GObject *object = NULL;
-
- proxy = dbus_g_proxy_new_for_name (connection,
- NM_DBUS_SERVICE,
- path,
- "org.freedesktop.DBus.Properties");
- if (!proxy) {
- g_warning ("%s: couldn't create D-Bus object proxy.", __func__);
- return NULL;
- }
-
- /* Have to create an NMVPNConnection if it's a VPN connection, otherwise
- * a plain NMActiveConnection.
- */
- if (dbus_g_proxy_call (proxy,
- "Get", &error,
- G_TYPE_STRING, NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
- G_TYPE_STRING, "Vpn",
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
- if (g_value_get_boolean (&value))
- object = nm_vpn_connection_new (connection, path);
- else
- object = nm_active_connection_new (connection, path);
- } else {
- g_warning ("Error in getting active connection 'Vpn' property: (%d) %s",
- error->code, error->message);
- g_error_free (error);
- }
-
- g_object_unref (proxy);
- return object;
-}
-
-static gboolean
-demarshal_active_connections (NMObject *object,
- GParamSpec *pspec,
- GValue *value,
- gpointer field)
-{
- DBusGConnection *connection;
-
- connection = nm_object_get_connection (object);
- if (!_nm_object_array_demarshal (value, (GPtrArray **) field, connection, new_active_connection))
- return FALSE;
-
- _nm_object_queue_notify (object, NM_CLIENT_ACTIVE_CONNECTIONS);
- return TRUE;
-}
-
-static void
-register_for_property_changed (NMClient *client)
-{
- NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_CLIENT_VERSION, _nm_object_demarshal_generic, &priv->version },
- { NM_CLIENT_STATE, _nm_object_demarshal_generic, &priv->state },
- { NM_CLIENT_NETWORKING_ENABLED, _nm_object_demarshal_generic, &priv->networking_enabled },
- { NM_CLIENT_WIRELESS_ENABLED, _nm_object_demarshal_generic, &priv->wireless_enabled },
- { NM_CLIENT_WIRELESS_HARDWARE_ENABLED, _nm_object_demarshal_generic, &priv->wireless_hw_enabled },
- { NM_CLIENT_WWAN_ENABLED, _nm_object_demarshal_generic, &priv->wwan_enabled },
- { NM_CLIENT_WWAN_HARDWARE_ENABLED, _nm_object_demarshal_generic, &priv->wwan_hw_enabled },
- { NM_CLIENT_WIMAX_ENABLED, _nm_object_demarshal_generic, &priv->wimax_enabled },
- { NM_CLIENT_WIMAX_HARDWARE_ENABLED, _nm_object_demarshal_generic, &priv->wimax_hw_enabled },
- { NM_CLIENT_ACTIVE_CONNECTIONS, demarshal_active_connections, &priv->active_connections },
+ const NMPropertiesInfo property_info[] = {
+ { NM_CLIENT_VERSION, &priv->version },
+ { NM_CLIENT_STATE, &priv->state },
+ { NM_CLIENT_NETWORKING_ENABLED, &priv->networking_enabled },
+ { NM_CLIENT_WIRELESS_ENABLED, &priv->wireless_enabled },
+ { NM_CLIENT_WIRELESS_HARDWARE_ENABLED, &priv->wireless_hw_enabled },
+ { NM_CLIENT_WWAN_ENABLED, &priv->wwan_enabled },
+ { NM_CLIENT_WWAN_HARDWARE_ENABLED, &priv->wwan_hw_enabled },
+ { NM_CLIENT_WIMAX_ENABLED, &priv->wimax_enabled },
+ { NM_CLIENT_WIMAX_HARDWARE_ENABLED, &priv->wimax_hw_enabled },
+ { NM_CLIENT_ACTIVE_CONNECTIONS, &priv->active_connections, NULL, NM_TYPE_ACTIVE_CONNECTION },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (client),
+ _nm_object_register_properties (NM_OBJECT (client),
+ priv->client_proxy,
+ property_info);
+
+ _nm_object_register_pseudo_property (NM_OBJECT (client),
priv->client_proxy,
- property_changed_info);
+ "Devices",
+ &priv->devices,
+ NM_TYPE_DEVICE,
+ client_device_added,
+ client_device_removed);
}
#define NM_AUTH_PERMISSION_ENABLE_DISABLE_NETWORK "org.freedesktop.NetworkManager.enable-disable-network"
@@ -444,31 +285,38 @@ update_permissions (NMClient *self, GHashTable *permissions)
g_list_free (keys);
}
-static void
-get_permissions_sync (NMClient *self)
+static gboolean
+get_permissions_sync (NMClient *self, GError **error)
{
gboolean success;
GHashTable *permissions = NULL;
success = dbus_g_proxy_call_with_timeout (NM_CLIENT_GET_PRIVATE (self)->client_proxy,
- "GetPermissions", 3000, NULL,
+ "GetPermissions", 3000, error,
G_TYPE_INVALID,
DBUS_TYPE_G_MAP_OF_STRING, &permissions, G_TYPE_INVALID);
update_permissions (self, success ? permissions : NULL);
if (permissions)
g_hash_table_destroy (permissions);
+
+ return success;
}
static void
get_permissions_reply (DBusGProxy *proxy,
- GHashTable *permissions,
- GError *error,
+ DBusGProxyCall *call,
gpointer user_data)
{
NMClient *self = NM_CLIENT (user_data);
+ GHashTable *permissions;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_MAP_OF_STRING, &permissions,
+ G_TYPE_INVALID);
NM_CLIENT_GET_PRIVATE (self)->perm_call = NULL;
update_permissions (NM_CLIENT (user_data), error ? NULL : permissions);
+ g_clear_error (&error);
}
static void
@@ -478,9 +326,9 @@ client_recheck_permissions (DBusGProxy *proxy, gpointer user_data)
NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (self);
if (!priv->perm_call) {
- priv->perm_call = org_freedesktop_NetworkManager_get_permissions_async (NM_CLIENT_GET_PRIVATE (self)->client_proxy,
- get_permissions_reply,
- self);
+ priv->perm_call = dbus_g_proxy_begin_call (NM_CLIENT_GET_PRIVATE (self)->client_proxy, "GetPermissions",
+ get_permissions_reply, self, NULL,
+ G_TYPE_INVALID);
}
}
@@ -496,31 +344,11 @@ client_recheck_permissions (DBusGProxy *proxy, gpointer user_data)
const GPtrArray *
nm_client_get_devices (NMClient *client)
{
- NMClientPrivate *priv;
- DBusGConnection *connection;
- GValue value = { 0, };
- GError *error = NULL;
- GPtrArray *temp;
-
g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
- priv = NM_CLIENT_GET_PRIVATE (client);
- if (priv->devices)
- return handle_ptr_array_return (priv->devices);
-
- if (!org_freedesktop_NetworkManager_get_devices (priv->client_proxy, &temp, &error)) {
- g_warning ("%s: error getting devices: %s\n", __func__, error->message);
- g_error_free (error);
- return NULL;
- }
-
- g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
- g_value_take_boxed (&value, temp);
- connection = nm_object_get_connection (NM_OBJECT (client));
- _nm_object_array_demarshal (&value, &priv->devices, connection, nm_device_new);
- g_value_unset (&value);
+ _nm_object_ensure_inited (NM_OBJECT (client));
- return handle_ptr_array_return (priv->devices);
+ return handle_ptr_array_return (NM_CLIENT_GET_PRIVATE (client)->devices);
}
/**
@@ -664,17 +492,22 @@ recheck_pending_activations (NMClient *self)
static void
activate_cb (DBusGProxy *proxy,
- char *path,
- GError *error,
+ DBusGProxyCall *call,
gpointer user_data)
{
ActivateInfo *info = user_data;
+ char *path;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_OBJECT_PATH, &path,
+ G_TYPE_INVALID);
if (error) {
activate_info_complete (info, NULL, error);
activate_info_free (info);
+ g_clear_error (&error);
} else {
- info->active_path = g_strdup (path);
+ info->active_path = path;
recheck_pending_activations (info->client);
}
}
@@ -726,29 +559,34 @@ nm_client_activate_connection (NMClient *client,
priv = NM_CLIENT_GET_PRIVATE (client);
priv->pending_activations = g_slist_prepend (priv->pending_activations, info);
- org_freedesktop_NetworkManager_activate_connection_async (priv->client_proxy,
- nm_connection_get_path (connection),
- device ? nm_object_get_path (NM_OBJECT (device)) : "/",
- specific_object ? specific_object : "/",
- activate_cb,
- info);
+ dbus_g_proxy_begin_call (priv->client_proxy, "ActivateConnection",
+ activate_cb, info, NULL,
+ DBUS_TYPE_G_OBJECT_PATH, nm_connection_get_path (connection),
+ DBUS_TYPE_G_OBJECT_PATH, device ? nm_object_get_path (NM_OBJECT (device)) : "/",
+ DBUS_TYPE_G_OBJECT_PATH, specific_object ? specific_object : "/",
+ G_TYPE_INVALID);
}
static void
add_activate_cb (DBusGProxy *proxy,
- char *connection_path,
- char *active_path,
- GError *error,
+ DBusGProxyCall *call,
gpointer user_data)
{
ActivateInfo *info = user_data;
+ char *connection_path;
+ char *active_path;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_OBJECT_PATH, &connection_path,
+ DBUS_TYPE_G_OBJECT_PATH, &active_path,
+ G_TYPE_INVALID);
if (error) {
activate_info_complete (info, NULL, error);
activate_info_free (info);
} else {
- info->new_connection_path = g_strdup (connection_path);
- info->active_path = g_strdup (active_path);
+ info->new_connection_path = connection_path;
+ info->active_path = active_path;
recheck_pending_activations (info->client);
}
}
@@ -803,12 +641,12 @@ nm_client_add_and_activate_connection (NMClient *client,
priv = NM_CLIENT_GET_PRIVATE (client);
priv->pending_activations = g_slist_prepend (priv->pending_activations, info);
- org_freedesktop_NetworkManager_add_and_activate_connection_async (priv->client_proxy,
- hash,
- nm_object_get_path (NM_OBJECT (device)),
- specific_object ? specific_object : "/",
- add_activate_cb,
- info);
+ dbus_g_proxy_begin_call (priv->client_proxy, "AddAndActivateConnection",
+ add_activate_cb, info, NULL,
+ DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, hash,
+ DBUS_TYPE_G_OBJECT_PATH, nm_object_get_path (NM_OBJECT (device)),
+ DBUS_TYPE_G_OBJECT_PATH, specific_object ? specific_object : "/",
+ G_TYPE_INVALID);
g_hash_table_unref (hash);
}
@@ -838,7 +676,10 @@ nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active)
// FIXME: return errors
priv = NM_CLIENT_GET_PRIVATE (client);
path = nm_object_get_path (NM_OBJECT (active));
- if (!org_freedesktop_NetworkManager_deactivate_connection (priv->client_proxy, path, &error)) {
+ if (!dbus_g_proxy_call (priv->client_proxy, "DeactivateConnection", &error,
+ DBUS_TYPE_G_OBJECT_PATH, path,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID)) {
g_warning ("Could not deactivate connection '%s': %s", path, error->message);
g_error_free (error);
}
@@ -858,28 +699,15 @@ const GPtrArray *
nm_client_get_active_connections (NMClient *client)
{
NMClientPrivate *priv;
- GValue value = { 0, };
g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
- priv = NM_CLIENT_GET_PRIVATE (client);
- if (priv->active_connections)
- return handle_ptr_array_return (priv->active_connections);
+ _nm_object_ensure_inited (NM_OBJECT (client));
+ priv = NM_CLIENT_GET_PRIVATE (client);
if (!priv->manager_running)
return NULL;
- if (!_nm_object_get_property (NM_OBJECT (client),
- "org.freedesktop.NetworkManager",
- "ActiveConnections",
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_active_connections (NM_OBJECT (client), NULL, &value, &priv->active_connections);
- g_value_unset (&value);
-
return handle_ptr_array_return (priv->active_connections);
}
@@ -896,6 +724,7 @@ nm_client_wireless_get_enabled (NMClient *client)
{
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
+ _nm_object_ensure_inited (NM_OBJECT (client));
return NM_CLIENT_GET_PRIVATE (client)->wireless_enabled;
}
@@ -935,6 +764,7 @@ nm_client_wireless_hardware_get_enabled (NMClient *client)
{
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
+ _nm_object_ensure_inited (NM_OBJECT (client));
return NM_CLIENT_GET_PRIVATE (client)->wireless_hw_enabled;
}
@@ -951,6 +781,7 @@ nm_client_wwan_get_enabled (NMClient *client)
{
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
+ _nm_object_ensure_inited (NM_OBJECT (client));
return NM_CLIENT_GET_PRIVATE (client)->wwan_enabled;
}
@@ -990,6 +821,7 @@ nm_client_wwan_hardware_get_enabled (NMClient *client)
{
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
+ _nm_object_ensure_inited (NM_OBJECT (client));
return NM_CLIENT_GET_PRIVATE (client)->wwan_hw_enabled;
}
@@ -1006,6 +838,7 @@ nm_client_wimax_get_enabled (NMClient *client)
{
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
+ _nm_object_ensure_inited (NM_OBJECT (client));
return NM_CLIENT_GET_PRIVATE (client)->wimax_enabled;
}
@@ -1045,6 +878,7 @@ nm_client_wimax_hardware_get_enabled (NMClient *client)
{
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
+ _nm_object_ensure_inited (NM_OBJECT (client));
return NM_CLIENT_GET_PRIVATE (client)->wimax_hw_enabled;
}
@@ -1060,23 +894,14 @@ const char *
nm_client_get_version (NMClient *client)
{
NMClientPrivate *priv;
- GError *err = NULL;
g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
priv = NM_CLIENT_GET_PRIVATE (client);
- if (!priv->manager_running)
- return NULL;
-
- if (!priv->version)
- priv->version = _nm_object_get_string_property (NM_OBJECT (client), NM_DBUS_INTERFACE, "Version", &err);
+ _nm_object_ensure_inited (NM_OBJECT (client));
- /* TODO: we don't pass the error to the caller yet, maybe later */
- if (err)
- g_error_free (err);
-
- return priv->version;
+ return priv->manager_running ? priv->version : NULL;
}
/**
@@ -1090,19 +915,11 @@ nm_client_get_version (NMClient *client)
NMState
nm_client_get_state (NMClient *client)
{
- NMClientPrivate *priv;
-
g_return_val_if_fail (NM_IS_CLIENT (client), NM_STATE_UNKNOWN);
- priv = NM_CLIENT_GET_PRIVATE (client);
-
- if (!priv->manager_running)
- return NM_STATE_UNKNOWN;
-
- if (priv->state == NM_STATE_UNKNOWN)
- priv->state = _nm_object_get_uint_property (NM_OBJECT (client), NM_DBUS_INTERFACE, "State", NULL);
+ _nm_object_ensure_inited (NM_OBJECT (client));
- return priv->state;
+ return NM_CLIENT_GET_PRIVATE (client)->state;
}
/**
@@ -1116,23 +933,10 @@ nm_client_get_state (NMClient *client)
gboolean
nm_client_networking_get_enabled (NMClient *client)
{
- NMClientPrivate *priv;
-
g_return_val_if_fail (NM_IS_CLIENT (client), FALSE);
- priv = NM_CLIENT_GET_PRIVATE (client);
- if (!priv->have_networking_enabled) {
- priv = NM_CLIENT_GET_PRIVATE (client);
- if (!priv->networking_enabled) {
- priv->networking_enabled = _nm_object_get_boolean_property (NM_OBJECT (client),
- NM_DBUS_INTERFACE,
- "NetworkingEnabled",
- NULL);
- priv->have_networking_enabled = TRUE;
- }
- }
-
- return priv->networking_enabled;
+ _nm_object_ensure_inited (NM_OBJECT (client));
+ return NM_CLIENT_GET_PRIVATE (client)->networking_enabled;
}
/**
@@ -1151,7 +955,10 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable)
g_return_if_fail (NM_IS_CLIENT (client));
- if (!org_freedesktop_NetworkManager_enable (NM_CLIENT_GET_PRIVATE (client)->client_proxy, enable, &err)) {
+ if (!dbus_g_proxy_call (NM_CLIENT_GET_PRIVATE (client)->client_proxy, "Enable", &err,
+ G_TYPE_BOOLEAN, enable,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID)) {
g_warning ("Error enabling/disabling networking: %s", err->message);
g_error_free (err);
}
@@ -1160,14 +967,14 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable)
/**
* nm_client_sleep:
* @client: a #NMClient
- * @sleep: %TRUE to put the daemon to sleep
+ * @sleep_: %TRUE to put the daemon to sleep
*
* Deprecated; use nm_client_networking_set_enabled() instead.
**/
void
-nm_client_sleep (NMClient *client, gboolean sleep)
+nm_client_sleep (NMClient *client, gboolean sleep_)
{
- nm_client_networking_set_enabled (client, !sleep);
+ nm_client_networking_set_enabled (client, !sleep_);
}
/**
@@ -1223,6 +1030,35 @@ free_object_array (GPtrArray **array)
}
static void
+dispose_and_free_object_array (GPtrArray **array)
+{
+ g_return_if_fail (array != NULL);
+
+ if (*array) {
+ /* The objects in the array may have circular refs with other
+ * objects, which the caller will need to know to break by
+ * calling this function rather than free_object_array().
+ */
+ g_ptr_array_foreach (*array, (GFunc) g_object_run_dispose, NULL);
+ free_object_array (array);
+ }
+}
+
+static void
+updated_properties (GObject *object, GAsyncResult *result, gpointer user_data)
+{
+ NMClient *client = NM_CLIENT (user_data);
+ GError *error = NULL;
+
+ if (!_nm_object_reload_properties_finish (NM_OBJECT (object), result, &error)) {
+ g_warning ("%s: error reading NMClient properties: %s", __func__, error->message);
+ g_error_free (error);
+ }
+
+ _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
+}
+
+static void
proxy_name_owner_changed (DBusGProxy *proxy,
const char *name,
const char *old_owner,
@@ -1250,61 +1086,34 @@ proxy_name_owner_changed (DBusGProxy *proxy,
if (!priv->manager_running) {
priv->state = NM_STATE_UNKNOWN;
_nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
+ _nm_object_suppress_property_updates (NM_OBJECT (client), TRUE);
poke_wireless_devices_with_rf_status (client);
free_object_array (&priv->devices);
- free_object_array (&priv->active_connections);
+ dispose_and_free_object_array (&priv->active_connections);
priv->wireless_enabled = FALSE;
priv->wireless_hw_enabled = FALSE;
priv->wwan_enabled = FALSE;
priv->wwan_hw_enabled = FALSE;
priv->wimax_enabled = FALSE;
priv->wimax_hw_enabled = FALSE;
+ g_free (priv->version);
+ priv->version = NULL;
} else {
- _nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
- update_wireless_status (client, TRUE);
- update_wwan_status (client, TRUE);
- update_wimax_status (client, TRUE);
+ _nm_object_suppress_property_updates (NM_OBJECT (client), FALSE);
+ _nm_object_reload_properties_async (NM_OBJECT (client), updated_properties, client);
}
}
static void
-client_device_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
+client_device_added (NMObject *client, NMObject *device)
{
- NMClient *client = NM_CLIENT (user_data);
- NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
- GObject *device;
-
- device = G_OBJECT (nm_client_get_device_by_path (client, path));
- if (!device) {
- DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (client));
-
- device = G_OBJECT (_nm_object_cache_get (path));
- if (device) {
- g_ptr_array_add (priv->devices, device);
- } else {
- device = G_OBJECT (nm_device_new (connection, path));
- if (device)
- g_ptr_array_add (priv->devices, device);
- }
- }
-
- if (device)
- g_signal_emit (client, signals[DEVICE_ADDED], 0, device);
+ g_signal_emit (client, signals[DEVICE_ADDED], 0, device);
}
static void
-client_device_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
+client_device_removed (NMObject *client, NMObject *device)
{
- NMClient *client = NM_CLIENT (user_data);
- NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
- NMDevice *device;
-
- device = nm_client_get_device_by_path (client, path);
- if (device) {
- g_signal_emit (client, signals[DEVICE_REMOVED], 0, device);
- g_ptr_array_remove (priv->devices, device);
- g_object_unref (device);
- }
+ g_signal_emit (client, signals[DEVICE_REMOVED], 0, device);
}
/****************************************************************/
@@ -1314,6 +1123,14 @@ client_device_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
*
* Creates a new #NMClient.
*
+ * Note that this will do blocking D-Bus calls to initialize the
+ * client. You can use nm_client_new_async() if you want to avoid
+ * that.
+ *
+ * NOTE: #NMClient provides information about devices and a mechanism to
+ * control them. To access and modify network configuration data, use the
+ * #NMRemoteSettings object.
+ *
* Returns: a new #NMClient
**/
NMClient *
@@ -1321,6 +1138,7 @@ nm_client_new (void)
{
DBusGConnection *connection;
GError *err = NULL;
+ NMClient *client;
#ifdef LIBNM_GLIB_TEST
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &err);
@@ -1333,51 +1151,115 @@ nm_client_new (void)
return NULL;
}
- return (NMClient *) g_object_new (NM_TYPE_CLIENT,
- NM_OBJECT_DBUS_CONNECTION, connection,
- NM_OBJECT_DBUS_PATH, NM_DBUS_PATH,
- NULL);
+ client = g_object_new (NM_TYPE_CLIENT,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, NM_DBUS_PATH,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (client));
+ return client;
+}
+
+static void
+client_inited (GObject *source, GAsyncResult *result, gpointer user_data)
+{
+ GSimpleAsyncResult *simple = user_data;
+ GError *error = NULL;
+
+ if (!g_async_initable_init_finish (G_ASYNC_INITABLE (source), result, &error))
+ g_simple_async_result_take_error (simple, error);
+ else
+ g_simple_async_result_set_op_res_gpointer (simple, source, g_object_unref);
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+/**
+ * nm_client_new_async:
+ * @cancellable: a #GCancellable, or %NULL
+ * @callback: callback to call when the client is created
+ * @user_data: data for @callback
+ *
+ * Creates a new #NMClient and begins asynchronously initializing it.
+ * @callback will be called when it is done; use
+ * nm_client_new_finish() to get the result.
+ *
+ * NOTE: #NMClient provides information about devices and a mechanism to
+ * control them. To access and modify network configuration data, use the
+ * #NMRemoteSettings object.
+ **/
+void
+nm_client_new_async (GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data)
{
- NMObject *object;
DBusGConnection *connection;
- NMClientPrivate *priv;
GError *err = NULL;
+ NMClient *client;
+ GSimpleAsyncResult *simple;
- object = (NMObject *) G_OBJECT_CLASS (nm_client_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
+ simple = g_simple_async_result_new (NULL, callback, user_data, nm_client_new_async);
+
+#ifdef LIBNM_GLIB_TEST
+ connection = dbus_g_bus_get (DBUS_BUS_SESSION, &err);
+#else
+ connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
+#endif
+ if (!connection) {
+ g_simple_async_result_take_error (simple, err);
+ g_simple_async_result_complete_in_idle (simple);
+ g_object_unref (simple);
+ return;
+ }
+
+ client = g_object_new (NM_TYPE_CLIENT,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, NM_DBUS_PATH,
+ NULL);
+ g_async_initable_init_async (G_ASYNC_INITABLE (client), G_PRIORITY_DEFAULT,
+ cancellable, client_inited, simple);
+}
+
+/**
+ * nm_client_new_finish:
+ * @result: a #GAsyncResult
+ * @error: location for a #GError, or %NULL
+ *
+ * Gets the result of an nm_client_new_async() call.
+ *
+ * Returns: a new #NMClient, or %NULL on error
+ **/
+NMClient *
+nm_client_new_finish (GAsyncResult *result, GError **error)
+{
+ GSimpleAsyncResult *simple;
+
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL, nm_client_new_async), NULL);
+
+ simple = G_SIMPLE_ASYNC_RESULT (result);
+ if (g_simple_async_result_propagate_error (simple, error))
return NULL;
+ else
+ return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple));
+}
+
+static void
+constructed (GObject *object)
+{
+ DBusGConnection *connection;
+ NMClientPrivate *priv;
+
+ nm_utils_init (NULL);
+
+ G_OBJECT_CLASS (nm_client_parent_class)->constructed (object);
priv = NM_CLIENT_GET_PRIVATE (object);
- connection = nm_object_get_connection (object);
+ connection = nm_object_get_connection (NM_OBJECT (object));
priv->client_proxy = dbus_g_proxy_new_for_name (connection,
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE);
- register_for_property_changed (NM_CLIENT (object));
-
- dbus_g_proxy_add_signal (priv->client_proxy, "DeviceAdded", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (priv->client_proxy,
- "DeviceAdded",
- G_CALLBACK (client_device_added_proxy),
- object,
- NULL);
-
- dbus_g_proxy_add_signal (priv->client_proxy, "DeviceRemoved", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (priv->client_proxy,
- "DeviceRemoved",
- G_CALLBACK (client_device_removed_proxy),
- object,
- NULL);
+ register_properties (NM_CLIENT (object));
/* Permissions */
dbus_g_proxy_add_signal (priv->client_proxy, "CheckPermissions", G_TYPE_INVALID);
@@ -1386,7 +1268,6 @@ constructor (GType type,
G_CALLBACK (client_recheck_permissions),
object,
NULL);
- get_permissions_sync (NM_CLIENT (object));
priv->bus_proxy = dbus_g_proxy_new_for_name (connection,
DBUS_SERVICE_DBUS,
@@ -1401,30 +1282,136 @@ constructor (GType type,
G_CALLBACK (proxy_name_owner_changed),
object, NULL);
+ g_signal_connect (object, "notify::" NM_CLIENT_WIRELESS_ENABLED,
+ G_CALLBACK (wireless_enabled_cb), NULL);
+
+ g_signal_connect (object, "notify::" NM_CLIENT_ACTIVE_CONNECTIONS,
+ G_CALLBACK (active_connections_changed_cb), NULL);
+}
+
+static gboolean
+init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
+{
+ NMClient *client = NM_CLIENT (initable);
+ NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
+
+ if (!nm_client_parent_initable_iface->init (initable, cancellable, error))
+ return FALSE;
+
if (!dbus_g_proxy_call (priv->bus_proxy,
- "NameHasOwner", &err,
- G_TYPE_STRING, NM_DBUS_SERVICE,
- G_TYPE_INVALID,
- G_TYPE_BOOLEAN, &priv->manager_running,
- G_TYPE_INVALID)) {
- g_warning ("Error on NameHasOwner DBUS call: %s", err->message);
- g_error_free (err);
+ "NameHasOwner", error,
+ G_TYPE_STRING, NM_DBUS_SERVICE,
+ G_TYPE_INVALID,
+ G_TYPE_BOOLEAN, &priv->manager_running,
+ G_TYPE_INVALID))
+ return FALSE;
+
+ if (priv->manager_running && !get_permissions_sync (client, error))
+ return FALSE;
+
+ return TRUE;
+}
+
+typedef struct {
+ NMClient *client;
+ GSimpleAsyncResult *result;
+ gboolean properties_pending;
+ gboolean permissions_pending;
+} NMClientInitData;
+
+static void
+init_async_complete (NMClientInitData *init_data)
+{
+ if (init_data->properties_pending || init_data->permissions_pending)
+ return;
+
+ g_simple_async_result_complete (init_data->result);
+ g_object_unref (init_data->result);
+ g_slice_free (NMClientInitData, init_data);
+}
+
+static void
+init_async_got_permissions (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
+{
+ NMClientInitData *init_data = user_data;
+ GHashTable *permissions;
+ GError *error = NULL;
+
+ dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_MAP_OF_STRING, &permissions,
+ G_TYPE_INVALID);
+ update_permissions (init_data->client, error ? NULL : permissions);
+ g_clear_error (&error);
+
+ init_data->permissions_pending = FALSE;
+ init_async_complete (init_data);
+}
+
+static void
+init_async_got_properties (GObject *source, GAsyncResult *result, gpointer user_data)
+{
+ NMClientInitData *init_data = user_data;
+ GError *error = NULL;
+
+ if (!nm_client_parent_async_initable_iface->init_finish (G_ASYNC_INITABLE (source), result, &error))
+ g_simple_async_result_take_error (init_data->result, error);
+
+ init_data->properties_pending = FALSE;
+ init_async_complete (init_data);
+}
+
+static void
+init_async_got_manager_running (DBusGProxy *proxy, DBusGProxyCall *call,
+ gpointer user_data)
+{
+ NMClientInitData *init_data = user_data;
+ NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (init_data->client);
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call, &error,
+ G_TYPE_BOOLEAN, &priv->manager_running,
+ G_TYPE_INVALID)) {
+ g_simple_async_result_take_error (init_data->result, error);
+ init_async_complete (init_data);
+ return;
}
- if (priv->manager_running) {
- update_wireless_status (NM_CLIENT (object), FALSE);
- update_wwan_status (NM_CLIENT (object), FALSE);
- update_wimax_status (NM_CLIENT (object), FALSE);
- nm_client_get_state (NM_CLIENT (object));
+ if (!priv->manager_running) {
+ init_async_complete (init_data);
+ return;
}
- g_signal_connect (G_OBJECT (object), "notify::" NM_CLIENT_WIRELESS_ENABLED,
- G_CALLBACK (wireless_enabled_cb), NULL);
+ nm_client_parent_async_initable_iface->init_async (G_ASYNC_INITABLE (init_data->client),
+ G_PRIORITY_DEFAULT, NULL, /* FIXME cancellable */
+ init_async_got_properties, init_data);
+ init_data->properties_pending = TRUE;
- g_signal_connect (object, "notify::" NM_CLIENT_ACTIVE_CONNECTIONS,
- G_CALLBACK (active_connections_changed_cb), NULL);
+ dbus_g_proxy_begin_call (priv->client_proxy, "GetPermissions",
+ init_async_got_permissions, init_data, NULL,
+ G_TYPE_INVALID);
+ init_data->permissions_pending = TRUE;
+}
- return G_OBJECT (object);
+static void
+init_async (GAsyncInitable *initable, int io_priority,
+ GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMClientInitData *init_data;
+ NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (initable);
+
+ init_data = g_slice_new0 (NMClientInitData);
+ init_data->client = NM_CLIENT (initable);
+ init_data->result = g_simple_async_result_new (G_OBJECT (initable), callback,
+ user_data, init_async);
+ g_simple_async_result_set_op_res_gboolean (init_data->result, TRUE);
+
+ /* Check if NM is running */
+ dbus_g_proxy_begin_call (priv->bus_proxy, "NameHasOwner",
+ init_async_got_manager_running,
+ init_data, NULL,
+ G_TYPE_STRING, NM_DBUS_SERVICE,
+ G_TYPE_INVALID);
}
static void
@@ -1444,7 +1431,7 @@ dispose (GObject *object)
g_object_unref (priv->bus_proxy);
free_object_array (&priv->devices);
- free_object_array (&priv->active_connections);
+ dispose_and_free_object_array (&priv->active_connections);
g_slist_foreach (priv->pending_activations, (GFunc) activate_info_free, NULL);
g_slist_free (priv->pending_activations);
@@ -1563,7 +1550,7 @@ nm_client_class_init (NMClientClass *client_class)
g_type_class_add_private (client_class, sizeof (NMClientPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->dispose = dispose;
@@ -1763,7 +1750,22 @@ nm_client_class_init (NMClientClass *client_class)
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
0, NULL, NULL,
- _nm_marshal_VOID__UINT_UINT,
+ _nm_glib_marshal_VOID__UINT_UINT,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}
+static void
+nm_client_initable_iface_init (GInitableIface *iface)
+{
+ nm_client_parent_initable_iface = g_type_interface_peek_parent (iface);
+
+ iface->init = init_sync;
+}
+
+static void
+nm_client_async_initable_iface_init (GAsyncInitableIface *iface)
+{
+ nm_client_parent_async_initable_iface = g_type_interface_peek_parent (iface);
+
+ iface->init_async = init_async;
+}
diff --git a/libnm-glib/nm-client.h b/libnm-glib/nm-client.h
index c9fd7c104..684326ffd 100644
--- a/libnm-glib/nm-client.h
+++ b/libnm-glib/nm-client.h
@@ -26,6 +26,7 @@
#include <glib.h>
#include <glib-object.h>
+#include <gio/gio.h>
#include <dbus/dbus-glib.h>
#include <NetworkManager.h>
#include "nm-object.h"
@@ -106,6 +107,12 @@ GType nm_client_get_type (void);
NMClient *nm_client_new (void);
+void nm_client_new_async (GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+NMClient *nm_client_new_finish (GAsyncResult *result,
+ GError **error);
+
const GPtrArray *nm_client_get_devices (NMClient *client);
NMDevice *nm_client_get_device_by_path (NMClient *client, const char *object_path);
NMDevice *nm_client_get_device_by_iface (NMClient *client, const char *iface);
@@ -156,7 +163,7 @@ const char *nm_client_get_version (NMClient *client);
NMState nm_client_get_state (NMClient *client);
gboolean nm_client_get_manager_running (NMClient *client);
const GPtrArray *nm_client_get_active_connections (NMClient *client);
-void nm_client_sleep (NMClient *client, gboolean sleep);
+void nm_client_sleep (NMClient *client, gboolean sleep_);
NMClientPermissionResult nm_client_get_permission_result (NMClient *client,
NMClientPermission permission);
diff --git a/libnm-glib/nm-dbus-utils.c b/libnm-glib/nm-dbus-utils.c
deleted file mode 100644
index f641f185a..000000000
--- a/libnm-glib/nm-dbus-utils.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * libnm_glib -- Access network status & information from glib applications
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- */
-
-#include "nm-dbus-utils.h"
-
-char *
-_nm_dbus_get_string_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name)
-{
- GError *err = NULL;
- char *str = NULL;
- GValue value = {0,};
-
- g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), NULL);
-
- if (dbus_g_proxy_call (proxy, "Get", &err,
- G_TYPE_STRING, interface,
- G_TYPE_STRING, prop_name,
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- str = g_strdup (g_value_get_string (&value));
- } else {
- g_warning ("Error in device_get_property: %s\n", err->message);
- g_error_free (err);
- }
-
- return str;
-}
-
-char *
-_nm_dbus_get_object_path_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name)
-{
- GError *err = NULL;
- char *path = NULL;
- GValue value = {0,};
-
- g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), NULL);
-
- if (dbus_g_proxy_call (proxy, "Get", &err,
- G_TYPE_STRING, interface,
- G_TYPE_STRING, prop_name,
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- path = g_strdup (g_value_get_boxed (&value));
- } else {
- g_warning ("Error in device_get_property: %s\n", err->message);
- g_error_free (err);
- }
-
- return path;
-}
-
-gint32
-_nm_dbus_get_int_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name)
-{
- GError *err = NULL;
- gint32 i = 0;
- GValue value = {0,};
-
- g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), 0);
-
- if (dbus_g_proxy_call (proxy, "Get", &err,
- G_TYPE_STRING, interface,
- G_TYPE_STRING, prop_name,
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- i = g_value_get_int (&value);
- } else {
- g_warning ("Error in device_get_property: %s\n", err->message);
- g_error_free (err);
- }
-
- return i;
-}
-
-guint32
-_nm_dbus_get_uint_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name)
-{
- GError *err = NULL;
- guint32 i = 0;
- GValue value = {0,};
-
- g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), 0);
-
- if (dbus_g_proxy_call (proxy, "Get", &err,
- G_TYPE_STRING, interface,
- G_TYPE_STRING, prop_name,
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- i = g_value_get_uint (&value);
- } else {
- g_warning ("Error in device_get_property: %s\n", err->message);
- g_error_free (err);
- }
-
- return i;
-}
-
-gboolean
-_nm_dbus_get_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name,
- GValue *value)
-{
- DBusGProxy *properties_proxy;
- GError *err = NULL;
- gboolean ret = TRUE;
-
- g_return_val_if_fail (proxy != NULL, FALSE);
- g_return_val_if_fail (interface != NULL, FALSE);
- g_return_val_if_fail (prop_name != NULL, FALSE);
-
- properties_proxy = dbus_g_proxy_new_from_proxy (proxy,
- "org.freedesktop.DBus.Properties",
- dbus_g_proxy_get_path (proxy));
-
- if (!dbus_g_proxy_call (properties_proxy, "Get", &err,
- G_TYPE_STRING, interface,
- G_TYPE_STRING, prop_name,
- G_TYPE_INVALID,
- G_TYPE_VALUE, value,
- G_TYPE_INVALID)) {
- g_warning ("Error in device_get_property: %s\n", err->message);
- g_error_free (err);
- ret = FALSE;
- }
-
- g_object_unref (properties_proxy);
-
- return ret;
-}
-
-void
-_nm_dbus_set_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name,
- GValue *value)
-{
- DBusGProxy *properties_proxy;
-
- g_return_if_fail (proxy != NULL);
- g_return_if_fail (interface != NULL);
- g_return_if_fail (prop_name != NULL);
-
- properties_proxy = dbus_g_proxy_new_from_proxy (proxy,
- "org.freedesktop.DBus.Properties",
- dbus_g_proxy_get_path (proxy));
-
- dbus_g_proxy_call_no_reply (properties_proxy, "Set",
- G_TYPE_STRING, interface,
- G_TYPE_STRING, prop_name,
- G_TYPE_VALUE, value,
- G_TYPE_INVALID);
-
- g_object_unref (properties_proxy);
-}
-
-char *
-_nm_dbus_introspect (DBusGConnection *connection,
- const char *interface,
- const char *path)
-{
- DBusGProxy *remote_object_introspectable;
- char *introspect_data = NULL;
- GError *err = NULL;
-
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (interface != NULL, NULL);
- g_return_val_if_fail (path != NULL, NULL);
-
- remote_object_introspectable = dbus_g_proxy_new_for_name (connection,
- interface,
- path,
- "org.freedesktop.DBus.Introspectable");
- if (!dbus_g_proxy_call (remote_object_introspectable, "Introspect", &err,
- G_TYPE_INVALID,
- G_TYPE_STRING, &introspect_data, G_TYPE_INVALID)) {
- g_error ("Failed to complete Introspect %s", err->message);
- g_error_free (err);
- }
-
- g_object_unref (G_OBJECT (remote_object_introspectable));
-
- return introspect_data;
-}
diff --git a/libnm-glib/nm-dbus-utils.h b/libnm-glib/nm-dbus-utils.h
deleted file mode 100644
index 4002c3a06..000000000
--- a/libnm-glib/nm-dbus-utils.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * libnm_glib -- Access network status & information from glib applications
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- */
-
-#ifndef NM_UTILS_H
-#define NM_UTILS_H
-
-#include <dbus/dbus-glib.h>
-
-char *_nm_dbus_get_string_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name);
-
-char *_nm_dbus_get_object_path_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name);
-
-gint32 _nm_dbus_get_int_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name);
-
-guint32 _nm_dbus_get_uint_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name);
-
-gboolean _nm_dbus_get_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name,
- GValue *value);
-void _nm_dbus_set_property (DBusGProxy *proxy,
- const char *interface,
- const char *prop_name,
- GValue *value);
-
-char *_nm_dbus_introspect (DBusGConnection *connection,
- const char *interface,
- const char *path);
-
-#endif /* NM_UTILS_H */
diff --git a/libnm-glib/nm-device-bond.c b/libnm-glib/nm-device-bond.c
new file mode 100644
index 000000000..034b7b3c2
--- /dev/null
+++ b/libnm-glib/nm-device-bond.c
@@ -0,0 +1,300 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * libnm_glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <netinet/ether.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-bond.h>
+#include <nm-utils.h>
+
+#include "nm-device-bond.h"
+#include "nm-device-private.h"
+#include "nm-object-private.h"
+
+G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE)
+
+#define NM_DEVICE_BOND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BOND, NMDeviceBondPrivate))
+
+typedef struct {
+ DBusGProxy *proxy;
+
+ char *hw_address;
+ gboolean carrier;
+} NMDeviceBondPrivate;
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_CARRIER,
+
+ LAST_PROP
+};
+
+#define DBUS_PROP_HW_ADDRESS "HwAddress"
+#define DBUS_PROP_CARRIER "Carrier"
+
+/**
+ * nm_device_bond_error_quark:
+ *
+ * Registers an error quark for #NMDeviceBond if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceBond errors.
+ **/
+GQuark
+nm_device_bond_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-bond-error-quark");
+ return quark;
+}
+
+/**
+ * nm_device_bond_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceBond.
+ *
+ * Returns: (transfer full): a new device
+ **/
+GObject *
+nm_device_bond_new (DBusGConnection *connection, const char *path)
+{
+ GObject *device;
+
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ device = g_object_new (NM_TYPE_DEVICE_BOND,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
+}
+
+/**
+ * nm_device_bond_get_hw_address:
+ * @device: a #NMDeviceBond
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceBond
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
+const char *
+nm_device_bond_get_hw_address (NMDeviceBond *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_BOND (device), NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_BOND_GET_PRIVATE (device)->hw_address;
+}
+
+/**
+ * nm_device_bond_get_carrier:
+ * @device: a #NMDeviceBond
+ *
+ * Whether the device has carrier.
+ *
+ * Returns: %TRUE if the device has carrier
+ **/
+gboolean
+nm_device_bond_get_carrier (NMDeviceBond *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_BOND (device), FALSE);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_BOND_GET_PRIVATE (device)->carrier;
+}
+
+static gboolean
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
+{
+ NMSettingConnection *s_con;
+ NMSettingBond *s_bond;
+ const char *ctype, *dev_iface_name, *bond_iface_name;
+
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ ctype = nm_setting_connection_get_connection_type (s_con);
+ if (strcmp (ctype, NM_SETTING_BOND_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_BOND_ERROR, NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION,
+ "The connection was not a bond connection.");
+ return FALSE;
+ }
+
+ s_bond = nm_connection_get_setting_bond (connection);
+ if (!s_bond) {
+ g_set_error (error, NM_DEVICE_BOND_ERROR, NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION,
+ "The connection was not a valid bond connection.");
+ return FALSE;
+ }
+
+ dev_iface_name = nm_device_get_iface (device);
+ bond_iface_name = nm_setting_bond_get_interface_name (s_bond);
+ if (g_strcmp0 (dev_iface_name, bond_iface_name) != 0) {
+ g_set_error (error, NM_DEVICE_BOND_ERROR, NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH,
+ "The interfaces of the device and the connection didn't match.");
+ return FALSE;
+ }
+
+ /* FIXME: check slaves? But we can't... */
+
+ return TRUE;
+}
+
+/***********************************************************/
+
+static void
+nm_device_bond_init (NMDeviceBond *device)
+{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_BOND);
+}
+
+static void
+register_properties (NMDeviceBond *device)
+{
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (device);
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_BOND_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_BOND_CARRIER, &priv->carrier },
+ { NULL },
+ };
+
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
+}
+
+static void
+constructed (GObject *object)
+{
+ NMDeviceBondPrivate *priv;
+
+ G_OBJECT_CLASS (nm_device_bond_parent_class)->constructed (object);
+
+ priv = NM_DEVICE_BOND_GET_PRIVATE (object);
+
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
+ NM_DBUS_SERVICE,
+ nm_object_get_path (NM_OBJECT (object)),
+ NM_DBUS_INTERFACE_DEVICE_BOND);
+
+ register_properties (NM_DEVICE_BOND (object));
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (object);
+
+ if (priv->proxy) {
+ g_object_unref (priv->proxy);
+ priv->proxy = NULL;
+ }
+
+ G_OBJECT_CLASS (nm_device_bond_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (object);
+
+ g_free (priv->hw_address);
+
+ G_OBJECT_CLASS (nm_device_bond_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ NMDeviceBond *device = NM_DEVICE_BOND (object);
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ g_value_set_string (value, nm_device_bond_get_hw_address (device));
+ break;
+ case PROP_CARRIER:
+ g_value_set_boolean (value, nm_device_bond_get_carrier (device));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_device_bond_class_init (NMDeviceBondClass *eth_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (eth_class);
+ NMDeviceClass *device_class = NM_DEVICE_CLASS (eth_class);
+
+ g_type_class_add_private (eth_class, sizeof (NMDeviceBondPrivate));
+
+ /* virtual methods */
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+ object_class->get_property = get_property;
+ device_class->connection_compatible = connection_compatible;
+
+ /* properties */
+
+ /**
+ * NMDeviceBond:hw-address:
+ *
+ * The hardware (MAC) address of the device.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_BOND_HW_ADDRESS,
+ "Active MAC Address",
+ "Currently set hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ /**
+ * NMDeviceBond:carrier:
+ *
+ * Whether the device has carrier.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_BOND_CARRIER,
+ "Carrier",
+ "Carrier",
+ FALSE,
+ G_PARAM_READABLE));
+
+}
diff --git a/libnm-glib/nm-device-bond.h b/libnm-glib/nm-device-bond.h
new file mode 100644
index 000000000..db4a90fc5
--- /dev/null
+++ b/libnm-glib/nm-device-bond.h
@@ -0,0 +1,82 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * libnm_glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_BOND_H
+#define NM_DEVICE_BOND_H
+
+#include "nm-device.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_BOND (nm_device_bond_get_type ())
+#define NM_DEVICE_BOND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_BOND, NMDeviceBond))
+#define NM_DEVICE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_BOND, NMDeviceBondClass))
+#define NM_IS_DEVICE_BOND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_BOND))
+#define NM_IS_DEVICE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_BOND))
+#define NM_DEVICE_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_BOND, NMDeviceBondClass))
+
+/**
+ * NMDeviceBondError:
+ * @NM_DEVICE_BOND_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION: the connection was not of bond type
+ * @NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION: the bond connection was invalid
+ * @NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH: the interfaces of the connection and the device mismatched
+ */
+typedef enum {
+ NM_DEVICE_BOND_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION, /*< nick=NotBondConnection >*/
+ NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION, /*< nick=InvalidBondConnection >*/
+ NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH, /*< nick=InterfaceMismatch >*/
+} NMDeviceBondError;
+
+#define NM_DEVICE_BOND_ERROR nm_device_bond_error_quark ()
+GQuark nm_device_bond_error_quark (void);
+
+#define NM_DEVICE_BOND_HW_ADDRESS "hw-address"
+#define NM_DEVICE_BOND_CARRIER "carrier"
+
+typedef struct {
+ NMDevice parent;
+} NMDeviceBond;
+
+typedef struct {
+ NMDeviceClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+ void (*_reserved5) (void);
+ void (*_reserved6) (void);
+} NMDeviceBondClass;
+
+GType nm_device_bond_get_type (void);
+
+GObject *nm_device_bond_new (DBusGConnection *connection, const char *path);
+
+const char * nm_device_bond_get_hw_address (NMDeviceBond *device);
+gboolean nm_device_bond_get_carrier (NMDeviceBond *device);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_BOND_H */
diff --git a/libnm-glib/nm-device-bt.c b/libnm-glib/nm-device-bt.c
index dc60d2587..8e0ff2009 100644
--- a/libnm-glib/nm-device-bt.c
+++ b/libnm-glib/nm-device-bt.c
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <config.h>
@@ -32,8 +32,6 @@
#include "nm-device-private.h"
#include "nm-object-private.h"
-#include "nm-device-bt-bindings.h"
-
G_DEFINE_TYPE (NMDeviceBt, nm_device_bt, NM_TYPE_DEVICE)
#define NM_DEVICE_BT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BT, NMDeviceBtPrivate))
@@ -44,7 +42,6 @@ typedef struct {
char *hw_address;
char *name;
guint32 bt_capabilities;
- gboolean bt_capabilities_valid;
gboolean disposed;
} NMDeviceBtPrivate;
@@ -63,6 +60,23 @@ enum {
#define DBUS_PROP_BT_CAPABILITIES "BtCapabilities"
/**
+ * nm_device_bt_error_quark:
+ *
+ * Registers an error quark for #NMDeviceBt if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceBt errors.
+ **/
+GQuark
+nm_device_bt_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-bt-error-quark");
+ return quark;
+}
+
+/**
* nm_device_bt_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
@@ -95,19 +109,10 @@ nm_device_bt_new (DBusGConnection *connection, const char *path)
const char *
nm_device_bt_get_hw_address (NMDeviceBt *device)
{
- NMDeviceBtPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL);
- priv = NM_DEVICE_BT_GET_PRIVATE (device);
- if (!priv->hw_address) {
- priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_BLUETOOTH,
- DBUS_PROP_HW_ADDRESS,
- NULL);
- }
-
- return priv->hw_address;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_BT_GET_PRIVATE (device)->hw_address;
}
/**
@@ -121,19 +126,10 @@ nm_device_bt_get_hw_address (NMDeviceBt *device)
const char *
nm_device_bt_get_name (NMDeviceBt *device)
{
- NMDeviceBtPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL);
- priv = NM_DEVICE_BT_GET_PRIVATE (device);
- if (!priv->name) {
- priv->name = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_BLUETOOTH,
- DBUS_PROP_NAME,
- NULL);
- }
-
- return priv->name;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_BT_GET_PRIVATE (device)->name;
}
/**
@@ -147,20 +143,10 @@ nm_device_bt_get_name (NMDeviceBt *device)
NMBluetoothCapabilities
nm_device_bt_get_capabilities (NMDeviceBt *device)
{
- NMDeviceBtPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_BT (device), NM_BT_CAPABILITY_NONE);
- priv = NM_DEVICE_BT_GET_PRIVATE (device);
- if (!priv->bt_capabilities_valid) {
- priv->bt_capabilities = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_BLUETOOTH,
- DBUS_PROP_BT_CAPABILITIES,
- NULL);
- priv->bt_capabilities_valid = TRUE;
- }
-
- return priv->bt_capabilities;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_BT_GET_PRIVATE (device)->bt_capabilities;
}
static NMBluetoothCapabilities
@@ -169,7 +155,7 @@ get_connection_bt_type (NMConnection *connection)
NMSettingBluetooth *s_bt;
const char *bt_type;
- s_bt = (NMSettingBluetooth *) nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH);
+ s_bt = nm_connection_get_setting_bluetooth (connection);
if (!s_bt)
return NM_BT_CAPABILITY_NONE;
@@ -185,7 +171,7 @@ get_connection_bt_type (NMConnection *connection)
}
static gboolean
-connection_valid (NMDevice *device, NMConnection *connection)
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
NMSettingConnection *s_con;
NMSettingBluetooth *s_bt;
@@ -196,30 +182,49 @@ connection_valid (NMDevice *device, NMConnection *connection)
NMBluetoothCapabilities dev_caps;
NMBluetoothCapabilities bt_type;
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
ctype = nm_setting_connection_get_connection_type (s_con);
- if (strcmp (ctype, NM_SETTING_BLUETOOTH_SETTING_NAME) != 0)
+ if (strcmp (ctype, NM_SETTING_BLUETOOTH_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_BT_ERROR, NM_DEVICE_BT_ERROR_NOT_BT_CONNECTION,
+ "The connection was not a Bluetooth connection.");
return FALSE;
+ }
s_bt = nm_connection_get_setting_bluetooth (connection);
- if (!s_bt)
+ if (!s_bt) {
+ g_set_error (error, NM_DEVICE_BT_ERROR, NM_DEVICE_BT_ERROR_INVALID_BT_CONNECTION,
+ "The connection was not a valid Bluetooth connection.");
return FALSE;
+ }
/* Check BT address */
hw_str = nm_device_bt_get_hw_address (NM_DEVICE_BT (device));
if (hw_str) {
hw_mac = ether_aton (hw_str);
+ if (!hw_mac) {
+ g_set_error (error, NM_DEVICE_BT_ERROR, NM_DEVICE_BT_ERROR_INVALID_DEVICE_MAC,
+ "Invalid device MAC address.");
+ return FALSE;
+ }
mac = nm_setting_bluetooth_get_bdaddr (s_bt);
- if (mac && hw_mac && memcmp (mac->data, hw_mac->ether_addr_octet, ETH_ALEN))
+ if (mac && hw_mac && memcmp (mac->data, hw_mac->ether_addr_octet, ETH_ALEN)) {
+ g_set_error (error, NM_DEVICE_BT_ERROR, NM_DEVICE_BT_ERROR_MAC_MISMATCH,
+ "The MACs of the device and the connection didn't match.");
return FALSE;
+ }
}
dev_caps = nm_device_bt_get_capabilities (NM_DEVICE_BT (device));
bt_type = get_connection_bt_type (connection);
- if (!(bt_type & dev_caps))
+ if (!(bt_type & dev_caps)) {
+ g_set_error (error, NM_DEVICE_BT_ERROR, NM_DEVICE_BT_ERROR_MISSING_DEVICE_CAPS,
+ "The device missed BT capabilities required by the connection.");
return FALSE;
+ }
return TRUE;
}
@@ -229,46 +234,38 @@ connection_valid (NMDevice *device, NMConnection *connection)
static void
nm_device_bt_init (NMDeviceBt *device)
{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_BT);
}
static void
-register_for_property_changed (NMDeviceBt *device)
+register_properties (NMDeviceBt *device)
{
NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_BT_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
- { NM_DEVICE_BT_NAME, _nm_object_demarshal_generic, &priv->name },
- { NM_DEVICE_BT_CAPABILITIES, _nm_object_demarshal_generic, &priv->bt_capabilities },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_BT_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_BT_NAME, &priv->name },
+ { NM_DEVICE_BT_CAPABILITIES, &priv->bt_capabilities },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (device),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
-
- object = G_OBJECT_CLASS (nm_device_bt_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (object) {
- NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object);
+ NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object);
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
- NM_DBUS_SERVICE,
- nm_object_get_path (NM_OBJECT (object)),
- NM_DBUS_INTERFACE_DEVICE_BLUETOOTH);
+ G_OBJECT_CLASS (nm_device_bt_parent_class)->constructed (object);
- register_for_property_changed (NM_DEVICE_BT (object));
- }
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
+ NM_DBUS_SERVICE,
+ nm_object_get_path (NM_OBJECT (object)),
+ NM_DBUS_INTERFACE_DEVICE_BLUETOOTH);
- return object;
+ register_properties (NM_DEVICE_BT (object));
}
static void
@@ -331,11 +328,11 @@ nm_device_bt_class_init (NMDeviceBtClass *bt_class)
g_type_class_add_private (bt_class, sizeof (NMDeviceBtPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->dispose = dispose;
object_class->finalize = finalize;
object_class->get_property = get_property;
- device_class->connection_valid = connection_valid;
+ device_class->connection_compatible = connection_compatible;
/* properties */
diff --git a/libnm-glib/nm-device-bt.h b/libnm-glib/nm-device-bt.h
index 71817f847..8f9a78a71 100644
--- a/libnm-glib/nm-device-bt.h
+++ b/libnm-glib/nm-device-bt.h
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2008 - 2009 Red Hat, Inc.
+ * Copyright (C) 2008 - 2012 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
@@ -36,6 +36,27 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_BT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_BT))
#define NM_DEVICE_BT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_BT, NMDeviceBtClass))
+/**
+ * NMDeviceBtError:
+ * @NM_DEVICE_BT_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_BT_ERROR_NOT_BT_CONNECTION: the connection was not of bluetooth type
+ * @NM_DEVICE_BT_ERROR_INVALID_BT_CONNECTION: the bluetooth connection was invalid
+ * @NM_DEVICE_BT_ERROR_INVALID_DEVICE_MAC: the device's MAC was invalid
+ * @NM_DEVICE_BT_ERROR_MAC_MISMATCH: the MACs of the connection and the device mismatched
+ * @NM_DEVICE_BT_ERROR_MISSING_DEVICE_CAPS: the device missed required capabilities
+ */
+typedef enum {
+ NM_DEVICE_BT_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_BT_ERROR_NOT_BT_CONNECTION, /*< nick=NotBtConnection >*/
+ NM_DEVICE_BT_ERROR_INVALID_BT_CONNECTION, /*< nick=InvalidBtConnection >*/
+ NM_DEVICE_BT_ERROR_INVALID_DEVICE_MAC, /*< nick=InvalidDeviceMac >*/
+ NM_DEVICE_BT_ERROR_MAC_MISMATCH, /*< nick=MacMismatch >*/
+ NM_DEVICE_BT_ERROR_MISSING_DEVICE_CAPS, /*< nick=MissingDeviceCaps >*/
+} NMDeviceBtError;
+
+#define NM_DEVICE_BT_ERROR nm_device_bt_error_quark ()
+GQuark nm_device_bt_error_quark (void);
+
#define NM_DEVICE_BT_HW_ADDRESS "hw-address"
#define NM_DEVICE_BT_NAME "name"
#define NM_DEVICE_BT_CAPABILITIES "bt-capabilities"
diff --git a/libnm-glib/nm-device-ethernet.c b/libnm-glib/nm-device-ethernet.c
index 580132132..62aedbbf8 100644
--- a/libnm-glib/nm-device-ethernet.c
+++ b/libnm-glib/nm-device-ethernet.c
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <config.h>
@@ -33,8 +33,6 @@
#include "nm-device-private.h"
#include "nm-object-private.h"
-#include "nm-device-ethernet-bindings.h"
-
G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
#define NM_DEVICE_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetPrivate))
@@ -46,7 +44,6 @@ typedef struct {
char *perm_hw_address;
guint32 speed;
gboolean carrier;
- gboolean carrier_valid;
gboolean disposed;
} NMDeviceEthernetPrivate;
@@ -67,6 +64,23 @@ enum {
#define DBUS_PROP_CARRIER "Carrier"
/**
+ * nm_device_ethernet_error_quark:
+ *
+ * Registers an error quark for #NMDeviceEthernet if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceEthernet errors.
+ **/
+GQuark
+nm_device_ethernet_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-ethernet-error-quark");
+ return quark;
+}
+
+/**
* nm_device_ethernet_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
@@ -78,13 +92,17 @@ enum {
GObject *
nm_device_ethernet_new (DBusGConnection *connection, const char *path)
{
+ GObject *device;
+
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_object_new (NM_TYPE_DEVICE_ETHERNET,
- NM_OBJECT_DBUS_CONNECTION, connection,
- NM_OBJECT_DBUS_PATH, path,
- NULL);
+ device = g_object_new (NM_TYPE_DEVICE_ETHERNET,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
}
/**
@@ -99,19 +117,10 @@ nm_device_ethernet_new (DBusGConnection *connection, const char *path)
const char *
nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
{
- NMDeviceEthernetPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), NULL);
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
- if (!priv->hw_address) {
- priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRED,
- DBUS_PROP_HW_ADDRESS,
- NULL);
- }
-
- return priv->hw_address;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_ETHERNET_GET_PRIVATE (device)->hw_address;
}
/**
@@ -126,19 +135,10 @@ nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
const char *
nm_device_ethernet_get_permanent_hw_address (NMDeviceEthernet *device)
{
- NMDeviceEthernetPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), NULL);
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
- if (!priv->perm_hw_address) {
- priv->perm_hw_address = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRED,
- DBUS_PROP_PERM_HW_ADDRESS,
- NULL);
- }
-
- return priv->perm_hw_address;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_ETHERNET_GET_PRIVATE (device)->perm_hw_address;
}
/**
@@ -152,19 +152,10 @@ nm_device_ethernet_get_permanent_hw_address (NMDeviceEthernet *device)
guint32
nm_device_ethernet_get_speed (NMDeviceEthernet *device)
{
- NMDeviceEthernetPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), 0);
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
- if (!priv->speed) {
- priv->speed = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRED,
- DBUS_PROP_SPEED,
- NULL);
- }
-
- return priv->speed;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_ETHERNET_GET_PRIVATE (device)->speed;
}
/**
@@ -178,43 +169,41 @@ nm_device_ethernet_get_speed (NMDeviceEthernet *device)
gboolean
nm_device_ethernet_get_carrier (NMDeviceEthernet *device)
{
- NMDeviceEthernetPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), FALSE);
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
- if (!priv->carrier_valid) {
- priv->carrier = _nm_object_get_boolean_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRED,
- DBUS_PROP_CARRIER,
- NULL);
- priv->carrier_valid = TRUE;
- }
-
- return priv->carrier;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_ETHERNET_GET_PRIVATE (device)->carrier;
}
static gboolean
-connection_valid (NMDevice *device, NMConnection *connection)
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
NMSettingConnection *s_con;
NMSettingWired *s_wired;
const char *ctype;
gboolean is_pppoe = FALSE;
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
ctype = nm_setting_connection_get_connection_type (s_con);
if (!strcmp (ctype, NM_SETTING_PPPOE_SETTING_NAME))
is_pppoe = TRUE;
- else if (strcmp (ctype, NM_SETTING_WIRED_SETTING_NAME) != 0)
+ else if (strcmp (ctype, NM_SETTING_WIRED_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_ETHERNET_ERROR, NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION,
+ "The connection was not a wired or PPPoE connection.");
return FALSE;
+ }
s_wired = nm_connection_get_setting_wired (connection);
/* Wired setting optional for PPPoE */
- if (!is_pppoe && !s_wired)
+ if (!is_pppoe && !s_wired) {
+ g_set_error (error, NM_DEVICE_ETHERNET_ERROR, NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION,
+ "The connection was not a valid ethernet connection.");
return FALSE;
+ }
if (s_wired) {
const GByteArray *mac;
@@ -227,9 +216,17 @@ connection_valid (NMDevice *device, NMConnection *connection)
perm_str = nm_device_ethernet_get_permanent_hw_address (NM_DEVICE_ETHERNET (device));
if (perm_str) {
perm_mac = ether_aton (perm_str);
+ if (!perm_mac) {
+ g_set_error (error, NM_DEVICE_ETHERNET_ERROR, NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC,
+ "Invalid device MAC address.");
+ return FALSE;
+ }
mac = nm_setting_wired_get_mac_address (s_wired);
- if (mac && perm_mac && memcmp (mac->data, perm_mac->ether_addr_octet, ETH_ALEN))
+ if (mac && perm_mac && memcmp (mac->data, perm_mac->ether_addr_octet, ETH_ALEN)) {
+ g_set_error (error, NM_DEVICE_ETHERNET_ERROR, NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH,
+ "The MACs of the device and the connection didn't match.");
return FALSE;
+ }
}
}
@@ -241,43 +238,32 @@ connection_valid (NMDevice *device, NMConnection *connection)
static void
nm_device_ethernet_init (NMDeviceEthernet *device)
{
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
-
- priv->disposed = FALSE;
- priv->carrier = FALSE;
- priv->carrier_valid = FALSE;
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_ETHERNET);
}
static void
-register_for_property_changed (NMDeviceEthernet *device)
+register_properties (NMDeviceEthernet *device)
{
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_ETHERNET_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
- { NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS, _nm_object_demarshal_generic, &priv->perm_hw_address },
- { NM_DEVICE_ETHERNET_SPEED, _nm_object_demarshal_generic, &priv->speed },
- { NM_DEVICE_ETHERNET_CARRIER, _nm_object_demarshal_generic, &priv->carrier },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_ETHERNET_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS, &priv->perm_hw_address },
+ { NM_DEVICE_ETHERNET_SPEED, &priv->speed },
+ { NM_DEVICE_ETHERNET_CARRIER, &priv->carrier },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (device),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
NMDeviceEthernetPrivate *priv;
- object = G_OBJECT_CLASS (nm_device_ethernet_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->constructed (object);
priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
@@ -286,9 +272,7 @@ constructor (GType type,
nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DEVICE_WIRED);
- register_for_property_changed (NM_DEVICE_ETHERNET (object));
-
- return object;
+ register_properties (NM_DEVICE_ETHERNET (object));
}
static void
@@ -355,11 +339,11 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *eth_class)
g_type_class_add_private (eth_class, sizeof (NMDeviceEthernetPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->dispose = dispose;
object_class->finalize = finalize;
object_class->get_property = get_property;
- device_class->connection_valid = connection_valid;
+ device_class->connection_compatible = connection_compatible;
/* properties */
diff --git a/libnm-glib/nm-device-ethernet.h b/libnm-glib/nm-device-ethernet.h
index 305ca022e..f14cd045f 100644
--- a/libnm-glib/nm-device-ethernet.h
+++ b/libnm-glib/nm-device-ethernet.h
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2010 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_DEVICE_ETHERNET_H
@@ -35,6 +35,25 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_ETHERNET))
#define NM_DEVICE_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
+/**
+ * NMDeviceEthernetError:
+ * @NM_DEVICE_ETHERNET_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION: the connection was not of ethernet or PPPoE type
+ * @NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION: the ethernet connection was invalid
+ * @NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC: the device's MAC was invalid
+ * @NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH: the MACs of the connection and the device mismatched
+ */
+typedef enum {
+ NM_DEVICE_ETHERNET_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION, /*< nick=NotEthernetConnection >*/
+ NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION, /*< nick=InvalidEthernetConnection >*/
+ NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC, /*< nick=InvalidDeviceMac >*/
+ NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH, /*< nick=MacMismatch >*/
+} NMDeviceEthernetError;
+
+#define NM_DEVICE_ETHERNET_ERROR nm_device_ethernet_error_quark ()
+GQuark nm_device_ethernet_error_quark (void);
+
#define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address"
#define NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS "perm-hw-address"
#define NM_DEVICE_ETHERNET_SPEED "speed"
diff --git a/libnm-glib/nm-device-infiniband.c b/libnm-glib/nm-device-infiniband.c
new file mode 100644
index 000000000..ec5f4a8b8
--- /dev/null
+++ b/libnm-glib/nm-device-infiniband.c
@@ -0,0 +1,310 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * libnm_glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <linux/if_infiniband.h>
+#include <netinet/ether.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-infiniband.h>
+#include <nm-utils.h>
+
+#include "nm-device-infiniband.h"
+#include "nm-device-private.h"
+#include "nm-object-private.h"
+
+G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE)
+
+#define NM_DEVICE_INFINIBAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandPrivate))
+
+typedef struct {
+ DBusGProxy *proxy;
+
+ char *hw_address;
+ gboolean carrier;
+} NMDeviceInfinibandPrivate;
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_CARRIER,
+
+ LAST_PROP
+};
+
+#define DBUS_PROP_HW_ADDRESS "HwAddress"
+#define DBUS_PROP_CARRIER "Carrier"
+
+/**
+ * nm_device_infiniband_error_quark:
+ *
+ * Registers an error quark for #NMDeviceInfiniband if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceInfiniband errors.
+ **/
+GQuark
+nm_device_infiniband_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-infiniband-error-quark");
+ return quark;
+}
+
+/**
+ * nm_device_infiniband_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceInfiniband.
+ *
+ * Returns: (transfer full): a new device
+ **/
+GObject *
+nm_device_infiniband_new (DBusGConnection *connection, const char *path)
+{
+ GObject *device;
+
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ device = g_object_new (NM_TYPE_DEVICE_INFINIBAND,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
+}
+
+/**
+ * nm_device_infiniband_get_hw_address:
+ * @device: a #NMDeviceInfiniband
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceInfiniband
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
+const char *
+nm_device_infiniband_get_hw_address (NMDeviceInfiniband *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_INFINIBAND (device), NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->hw_address;
+}
+
+/**
+ * nm_device_infiniband_get_carrier:
+ * @device: a #NMDeviceInfiniband
+ *
+ * Whether the device has carrier.
+ *
+ * Returns: %TRUE if the device has carrier
+ **/
+gboolean
+nm_device_infiniband_get_carrier (NMDeviceInfiniband *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_INFINIBAND (device), FALSE);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->carrier;
+}
+
+static gboolean
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
+{
+ NMSettingConnection *s_con;
+ NMSettingInfiniband *s_infiniband;
+ const char *ctype, *hwaddr_str;
+ const GByteArray *mac;
+ guint8 *hwaddr, hwaddr_buf[INFINIBAND_ALEN];
+
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ ctype = nm_setting_connection_get_connection_type (s_con);
+ if (strcmp (ctype, NM_SETTING_INFINIBAND_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_INFINIBAND_ERROR, NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION,
+ "The connection was not a InfiniBand connection.");
+ return FALSE;
+ }
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (!s_infiniband) {
+ g_set_error (error, NM_DEVICE_INFINIBAND_ERROR, NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION,
+ "The connection was not a valid InfiniBand connection.");
+ return FALSE;
+ }
+
+ hwaddr_str = nm_device_infiniband_get_hw_address (NM_DEVICE_INFINIBAND (device));
+ if (hwaddr_str) {
+ hwaddr = nm_utils_hwaddr_aton (hwaddr_str, ARPHRD_INFINIBAND, hwaddr_buf);
+ if (!hwaddr) {
+ g_set_error (error, NM_DEVICE_INFINIBAND_ERROR, NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC,
+ "Invalid device MAC address.");
+ return FALSE;
+ }
+ mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (mac && hwaddr && memcmp (mac->data, hwaddr, INFINIBAND_ALEN)) {
+ g_set_error (error, NM_DEVICE_INFINIBAND_ERROR, NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH,
+ "The MACs of the device and the connection didn't match.");
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+/***********************************************************/
+
+static void
+nm_device_infiniband_init (NMDeviceInfiniband *device)
+{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_INFINIBAND);
+}
+
+static void
+register_properties (NMDeviceInfiniband *device)
+{
+ NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device);
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_INFINIBAND_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_INFINIBAND_CARRIER, &priv->carrier },
+ { NULL },
+ };
+
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
+}
+
+static void
+constructed (GObject *object)
+{
+ NMDeviceInfinibandPrivate *priv;
+
+ G_OBJECT_CLASS (nm_device_infiniband_parent_class)->constructed (object);
+
+ priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (object);
+
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
+ NM_DBUS_SERVICE,
+ nm_object_get_path (NM_OBJECT (object)),
+ NM_DBUS_INTERFACE_DEVICE_INFINIBAND);
+
+ register_properties (NM_DEVICE_INFINIBAND (object));
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (object);
+
+ if (priv->proxy) {
+ g_object_unref (priv->proxy);
+ priv->proxy = NULL;
+ }
+
+ G_OBJECT_CLASS (nm_device_infiniband_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (object);
+
+ g_free (priv->hw_address);
+
+ G_OBJECT_CLASS (nm_device_infiniband_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ NMDeviceInfiniband *device = NM_DEVICE_INFINIBAND (object);
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ g_value_set_string (value, nm_device_infiniband_get_hw_address (device));
+ break;
+ case PROP_CARRIER:
+ g_value_set_boolean (value, nm_device_infiniband_get_carrier (device));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_device_infiniband_class_init (NMDeviceInfinibandClass *eth_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (eth_class);
+ NMDeviceClass *device_class = NM_DEVICE_CLASS (eth_class);
+
+ g_type_class_add_private (eth_class, sizeof (NMDeviceInfinibandPrivate));
+
+ /* virtual methods */
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+ object_class->get_property = get_property;
+ device_class->connection_compatible = connection_compatible;
+
+ /* properties */
+
+ /**
+ * NMDeviceInfiniband:hw-address:
+ *
+ * The hardware (MAC) address of the device.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_INFINIBAND_HW_ADDRESS,
+ "Active MAC Address",
+ "Currently set hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ /**
+ * NMDeviceInfiniband:carrier:
+ *
+ * Whether the device has carrier.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_INFINIBAND_CARRIER,
+ "Carrier",
+ "Carrier",
+ FALSE,
+ G_PARAM_READABLE));
+
+}
+
diff --git a/libnm-glib/nm-device-infiniband.h b/libnm-glib/nm-device-infiniband.h
new file mode 100644
index 000000000..d0e754b35
--- /dev/null
+++ b/libnm-glib/nm-device-infiniband.h
@@ -0,0 +1,84 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * libnm_glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_INFINIBAND_H
+#define NM_DEVICE_INFINIBAND_H
+
+#include "nm-device.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_INFINIBAND (nm_device_infiniband_get_type ())
+#define NM_DEVICE_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfiniband))
+#define NM_DEVICE_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass))
+#define NM_IS_DEVICE_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_INFINIBAND))
+#define NM_IS_DEVICE_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_INFINIBAND))
+#define NM_DEVICE_INFINIBAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass))
+
+/**
+ * NMDeviceInfinibandError:
+ * @NM_DEVICE_INFINIBAND_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION: the connection was not of InfiniBand type
+ * @NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION: the InfiniBand connection was invalid
+ * @NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC: the device's MAC was invalid
+ * @NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH: the MACs of the connection and the device mismatched
+ */
+typedef enum {
+ NM_DEVICE_INFINIBAND_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION, /*< nick=NotInfinibandConnection >*/
+ NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION, /*< nick=InvalidInfinibandConnection >*/
+ NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC, /*< nick=InvalidDeviceMac >*/
+ NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH, /*< nick=MacMismatch >*/
+} NMDeviceInfinibandError;
+
+#define NM_DEVICE_INFINIBAND_ERROR nm_device_infiniband_error_quark ()
+GQuark nm_device_infiniband_error_quark (void);
+
+#define NM_DEVICE_INFINIBAND_HW_ADDRESS "hw-address"
+#define NM_DEVICE_INFINIBAND_CARRIER "carrier"
+
+typedef struct {
+ NMDevice parent;
+} NMDeviceInfiniband;
+
+typedef struct {
+ NMDeviceClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+ void (*_reserved5) (void);
+ void (*_reserved6) (void);
+} NMDeviceInfinibandClass;
+
+GType nm_device_infiniband_get_type (void);
+
+GObject *nm_device_infiniband_new (DBusGConnection *connection, const char *path);
+
+const char * nm_device_infiniband_get_hw_address (NMDeviceInfiniband *device);
+gboolean nm_device_infiniband_get_carrier (NMDeviceInfiniband *device);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_INFINIBAND_H */
diff --git a/libnm-glib/nm-device-modem.c b/libnm-glib/nm-device-modem.c
index e71e93051..f1d1389b6 100644
--- a/libnm-glib/nm-device-modem.c
+++ b/libnm-glib/nm-device-modem.c
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
@@ -31,7 +31,7 @@
#include "nm-device-modem.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
-#include "nm-marshal.h"
+#include "nm-glib-marshal.h"
G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE)
@@ -59,6 +59,23 @@ enum {
#define DBUS_PROP_CURRENT_CAPS "CurrentCapabilities"
/**
+ * nm_device_modem_error_quark:
+ *
+ * Registers an error quark for #NMDeviceModem if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceModem errors.
+ **/
+GQuark
+nm_device_modem_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-modem-error-quark");
+ return quark;
+}
+
+/**
* nm_device_modem_get_modem_capabilities:
* @self: a #NMDeviceModem
*
@@ -71,20 +88,11 @@ enum {
NMDeviceModemCapabilities
nm_device_modem_get_modem_capabilities (NMDeviceModem *self)
{
- NMDeviceModemPrivate *priv;
-
g_return_val_if_fail (self != NULL, NM_DEVICE_MODEM_CAPABILITY_NONE);
g_return_val_if_fail (NM_IS_DEVICE_MODEM (self), NM_DEVICE_MODEM_CAPABILITY_NONE);
- priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
- if (!priv->caps) {
- priv->caps = _nm_object_get_uint_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_MODEM,
- DBUS_PROP_MODEM_CAPS,
- NULL);
- }
-
- return priv->caps;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_MODEM_GET_PRIVATE (self)->caps;
}
/**
@@ -101,24 +109,15 @@ nm_device_modem_get_modem_capabilities (NMDeviceModem *self)
NMDeviceModemCapabilities
nm_device_modem_get_current_capabilities (NMDeviceModem *self)
{
- NMDeviceModemPrivate *priv;
-
g_return_val_if_fail (self != NULL, NM_DEVICE_MODEM_CAPABILITY_NONE);
g_return_val_if_fail (NM_IS_DEVICE_MODEM (self), NM_DEVICE_MODEM_CAPABILITY_NONE);
- priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
- if (!priv->current_caps) {
- priv->current_caps = _nm_object_get_uint_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_MODEM,
- DBUS_PROP_CURRENT_CAPS,
- NULL);
- }
-
- return priv->current_caps;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_MODEM_GET_PRIVATE (self)->current_caps;
}
static gboolean
-connection_valid (NMDevice *device, NMConnection *connection)
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
NMSettingConnection *s_con;
NMSettingGsm *s_gsm;
@@ -126,22 +125,32 @@ connection_valid (NMDevice *device, NMConnection *connection)
const char *ctype;
NMDeviceModemCapabilities current_caps;
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
ctype = nm_setting_connection_get_connection_type (s_con);
if ( strcmp (ctype, NM_SETTING_GSM_SETTING_NAME) != 0
- && strcmp (ctype, NM_SETTING_CDMA_SETTING_NAME) != 0)
+ && strcmp (ctype, NM_SETTING_CDMA_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_MODEM_ERROR, NM_DEVICE_MODEM_ERROR_NOT_MODEM_CONNECTION,
+ "The connection was not a modem connection.");
return FALSE;
+ }
s_gsm = nm_connection_get_setting_gsm (connection);
s_cdma = nm_connection_get_setting_cdma (connection);
- if (!s_cdma && !s_gsm)
+ if (!s_cdma && !s_gsm) {
+ g_set_error (error, NM_DEVICE_MODEM_ERROR, NM_DEVICE_MODEM_ERROR_INVALID_MODEM_CONNECTION,
+ "The connection was not a valid modem connection.");
return FALSE;
+ }
current_caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device));
if ( !(s_gsm && (current_caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS))
&& !(s_cdma && (current_caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO))) {
+ g_set_error (error, NM_DEVICE_MODEM_ERROR, NM_DEVICE_MODEM_ERROR_MISSING_DEVICE_CAPS,
+ "The device missed capabilities required by the GSM/CDMA connection.");
return FALSE;
}
@@ -151,48 +160,41 @@ connection_valid (NMDevice *device, NMConnection *connection)
/*******************************************************************/
static void
-register_for_property_changed (NMDeviceModem *device)
+nm_device_modem_init (NMDeviceModem *device)
+{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_MODEM);
+}
+
+static void
+register_properties (NMDeviceModem *device)
{
NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (device);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_MODEM_MODEM_CAPABILITIES, _nm_object_demarshal_generic, &priv->caps },
- { NM_DEVICE_MODEM_CURRENT_CAPABILITIES, _nm_object_demarshal_generic, &priv->current_caps },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_MODEM_MODEM_CAPABILITIES, &priv->caps },
+ { NM_DEVICE_MODEM_CURRENT_CAPABILITIES, &priv->current_caps },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (device),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
NMDeviceModemPrivate *priv;
- object = G_OBJECT_CLASS (nm_device_modem_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (object) {
- priv = NM_DEVICE_MODEM_GET_PRIVATE (object);
-
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
- NM_DBUS_SERVICE,
- nm_object_get_path (NM_OBJECT (object)),
- NM_DBUS_INTERFACE_DEVICE_MODEM);
+ G_OBJECT_CLASS (nm_device_modem_parent_class)->constructed (object);
- register_for_property_changed (NM_DEVICE_MODEM (object));
- }
+ priv = NM_DEVICE_MODEM_GET_PRIVATE (object);
- return object;
-}
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
+ NM_DBUS_SERVICE,
+ nm_object_get_path (NM_OBJECT (object)),
+ NM_DBUS_INTERFACE_DEVICE_MODEM);
-static void
-nm_device_modem_init (NMDeviceModem *device)
-{
+ register_properties (NM_DEVICE_MODEM (object));
}
static void
@@ -242,10 +244,10 @@ nm_device_modem_class_init (NMDeviceModemClass *modem_class)
g_type_class_add_private (modem_class, sizeof (NMDeviceModemPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->dispose = dispose;
- device_class->connection_valid = connection_valid;
+ device_class->connection_compatible = connection_compatible;
/**
* NMDeviceModem:modem-capabilities:
diff --git a/libnm-glib/nm-device-modem.h b/libnm-glib/nm-device-modem.h
index bf84b90d8..6f9666dd9 100644
--- a/libnm-glib/nm-device-modem.h
+++ b/libnm-glib/nm-device-modem.h
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
@@ -35,6 +35,23 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_MODEM))
#define NM_DEVICE_MODEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_MODEM, NMDeviceModemClass))
+/**
+ * NMDeviceModemError:
+ * @NM_DEVICE_MODEM_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_MODEM_ERROR_NOT_MODEM_CONNECTION: the connection was not of modem type
+ * @NM_DEVICE_MODEM_ERROR_INVALID_MODEM_CONNECTION: the modem connection was invalid
+ * @NM_DEVICE_MODEM_ERROR_MISSING_DEVICE_CAPS: the device missed required capabilities
+ */
+typedef enum {
+ NM_DEVICE_MODEM_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_MODEM_ERROR_NOT_MODEM_CONNECTION, /*< nick=NotModemConnection >*/
+ NM_DEVICE_MODEM_ERROR_INVALID_MODEM_CONNECTION, /*< nick=InvalidModemConnection >*/
+ NM_DEVICE_MODEM_ERROR_MISSING_DEVICE_CAPS, /*< nick=MissingDeviceCaps >*/
+} NMDeviceModemError;
+
+#define NM_DEVICE_MODEM_ERROR nm_device_modem_error_quark ()
+GQuark nm_device_modem_error_quark (void);
+
#define NM_DEVICE_MODEM_MODEM_CAPABILITIES "modem-capabilities"
#define NM_DEVICE_MODEM_CURRENT_CAPABILITIES "current-capabilities"
diff --git a/libnm-glib/nm-device-olpc-mesh.c b/libnm-glib/nm-device-olpc-mesh.c
new file mode 100644
index 000000000..ed48ecb64
--- /dev/null
+++ b/libnm-glib/nm-device-olpc-mesh.c
@@ -0,0 +1,333 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set ft=c ts=4 sts=4 sw=4 noexpandtab smartindent: */
+/*
+ * libnm-glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ */
+
+#include <config.h>
+#include <string.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-olpc-mesh.h>
+
+#include "nm-device-olpc-mesh.h"
+#include "nm-device-private.h"
+#include "nm-object-private.h"
+#include "nm-device-wifi.h"
+
+G_DEFINE_TYPE (NMDeviceOlpcMesh, nm_device_olpc_mesh, NM_TYPE_DEVICE)
+
+#define NM_DEVICE_OLPC_MESH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshPrivate))
+
+typedef struct {
+ DBusGProxy *proxy;
+
+ char *hw_address;
+ NMDeviceWifi *companion;
+ guint32 active_channel;
+} NMDeviceOlpcMeshPrivate;
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_COMPANION,
+ PROP_ACTIVE_CHANNEL,
+
+ LAST_PROP
+};
+
+#define DBUS_PROP_HW_ADDRESS "HwAddress"
+#define DBUS_PROP_COMPANION "Companion"
+#define DBUS_PROP_ACTIVE_CHANNEL "ActiveChannel"
+
+/**
+ * nm_device_olpc_mesh_error_quark:
+ *
+ * Registers an error quark for #NMDeviceOlpcMesh if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceOlpcMesh errors.
+ **/
+GQuark
+nm_device_olpc_mesh_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-olpc-mesh-error-quark");
+ return quark;
+}
+
+/**
+ * nm_device_olpc_mesh_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceOlpcMesh.
+ *
+ * Returns: (transfer full): a new OlpcMesh device
+ **/
+GObject *
+nm_device_olpc_mesh_new (DBusGConnection *connection, const char *path)
+{
+ GObject *device;
+
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ device = g_object_new (NM_TYPE_DEVICE_OLPC_MESH,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
+}
+
+/**
+ * nm_device_olpc_mesh_get_hw_address:
+ * @device: a #NMDeviceOlpcMesh
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceOlpcMesh
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
+const char *
+nm_device_olpc_mesh_get_hw_address (NMDeviceOlpcMesh *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->hw_address;
+}
+
+/**
+ * nm_device_olpc_mesh_get_companion:
+ * @device: a #NMDeviceOlpcMesh
+ *
+ * Gets the companion device of the #NMDeviceOlpcMesh.
+ *
+ * Returns: (transfer none): the companion of the device of %NULL
+ **/
+NMDeviceWifi *
+nm_device_olpc_mesh_get_companion (NMDeviceOlpcMesh *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->companion;
+}
+
+/**
+ * nm_device_olpc_mesh_get_active_channel:
+ * @device: a #NMDeviceOlpcMesh
+ *
+ * Returns the active channel of the #NMDeviceOlpcMesh device.
+ *
+ * Returns: active channel of the device
+ **/
+guint32
+nm_device_olpc_mesh_get_active_channel (NMDeviceOlpcMesh *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), 0);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->active_channel;
+}
+
+static gboolean
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
+{
+ NMSettingConnection *s_con;
+ NMSettingOlpcMesh *s_olpc_mesh;
+ const char *ctype;
+
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ ctype = nm_setting_connection_get_connection_type (s_con);
+ if (strcmp (ctype, NM_SETTING_OLPC_MESH_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_OLPC_MESH_ERROR, NM_DEVICE_OLPC_MESH_ERROR_NOT_OLPC_MESH_CONNECTION,
+ "The connection was not a Olpc Mesh connection.");
+ return FALSE;
+ }
+
+ s_olpc_mesh = nm_connection_get_setting_olpc_mesh (connection);
+ if (!s_olpc_mesh) {
+ g_set_error (error, NM_DEVICE_OLPC_MESH_ERROR, NM_DEVICE_OLPC_MESH_ERROR_INVALID_OLPC_MESH_CONNECTION,
+ "The connection was not a valid Olpc Mesh connection.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**************************************************************/
+
+static void
+nm_device_olpc_mesh_init (NMDeviceOlpcMesh *device)
+{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_OLPC_MESH);
+}
+
+static void
+register_properties (NMDeviceOlpcMesh *device)
+{
+ NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (device);
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_OLPC_MESH_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_OLPC_MESH_COMPANION, &priv->companion, NULL, NM_TYPE_DEVICE_WIFI },
+ { NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL, &priv->active_channel },
+ { NULL },
+ };
+
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
+}
+
+static void
+constructed (GObject *object)
+{
+ NMDeviceOlpcMeshPrivate *priv;
+
+ G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->constructed (object);
+
+ priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (object);
+
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
+ NM_DBUS_SERVICE,
+ nm_object_get_path (NM_OBJECT (object)),
+ NM_DBUS_INTERFACE_DEVICE_OLPC_MESH);
+
+ register_properties (NM_DEVICE_OLPC_MESH (object));
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (object);
+
+ if (priv->companion) {
+ g_object_unref (priv->companion);
+ priv->companion = NULL;
+ }
+ if (priv->proxy) {
+ g_object_unref (priv->proxy);
+ priv->proxy = NULL;
+ }
+
+ G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (object);
+
+ g_free (priv->hw_address);
+
+ G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ NMDeviceOlpcMesh *device = NM_DEVICE_OLPC_MESH (object);
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ g_value_set_string (value, nm_device_olpc_mesh_get_hw_address (device));
+ break;
+ case PROP_COMPANION:
+ g_value_set_object (value, nm_device_olpc_mesh_get_companion (device));
+ break;
+ case PROP_ACTIVE_CHANNEL:
+ g_value_set_uint (value, nm_device_olpc_mesh_get_active_channel (device));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *olpc_mesh_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (olpc_mesh_class);
+ NMDeviceClass *device_class = NM_DEVICE_CLASS (olpc_mesh_class);
+
+ g_type_class_add_private (olpc_mesh_class, sizeof (NMDeviceOlpcMeshPrivate));
+
+ /* virtual methods */
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+ object_class->get_property = get_property;
+ device_class->connection_compatible = connection_compatible;
+
+ /* properties */
+
+ /**
+ * NMDeviceOlpcMesh:hw-address:
+ *
+ * The hardware (MAC) address of the device.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_OLPC_MESH_HW_ADDRESS,
+ "MAC Address",
+ "Hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ /**
+ * NMDeviceOlpcMesh:companion:
+ *
+ * The companion device.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_COMPANION,
+ g_param_spec_object (NM_DEVICE_OLPC_MESH_COMPANION,
+ "Companion device",
+ "Companion device",
+ NM_TYPE_DEVICE_WIFI,
+ G_PARAM_READABLE));
+
+ /**
+ * NMDeviceOlpcMesh:active-channel:
+ *
+ * The device's active channel.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_ACTIVE_CHANNEL,
+ g_param_spec_uint (NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL,
+ "Active channel",
+ "Active channel",
+ 0, G_MAXUINT32, 0,
+ G_PARAM_READABLE));
+
+}
+
diff --git a/libnm-glib/nm-device-olpc-mesh.h b/libnm-glib/nm-device-olpc-mesh.h
new file mode 100644
index 000000000..7945d0c78
--- /dev/null
+++ b/libnm-glib/nm-device-olpc-mesh.h
@@ -0,0 +1,84 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set ft=c ts=4 sts=4 sw=4 noexpandtab smartindent: */
+/*
+ * libnm-glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_OLPC_MESH_H
+#define NM_DEVICE_OLPC_MESH_H
+
+#include "nm-device.h"
+#include "nm-device-wifi.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_OLPC_MESH (nm_device_olpc_mesh_get_type ())
+#define NM_DEVICE_OLPC_MESH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMesh))
+#define NM_DEVICE_OLPC_MESH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshClass))
+#define NM_IS_DEVICE_OLPC_MESH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_OLPC_MESH))
+#define NM_IS_DEVICE_OLPC_MESH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_OLPC_MESH))
+#define NM_DEVICE_OLPC_MESH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshClass))
+
+/**
+ * NMDeviceOlpcMeshError:
+ * @NM_DEVICE_OLPC_MESH_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_OLPC_MESH_ERROR_NOT_OLPC_MESH_CONNECTION: the connection was not of Olpc Mesh type
+ * @NM_DEVICE_OLPC_MESH_ERROR_INVALID_OLPC_MESH_CONNECTION: the Olpc Mesh connection was invalid
+ */
+typedef enum {
+ NM_DEVICE_OLPC_MESH_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_OLPC_MESH_ERROR_NOT_OLPC_MESH_CONNECTION, /*< nick=NotOlpcMeshConnection >*/
+ NM_DEVICE_OLPC_MESH_ERROR_INVALID_OLPC_MESH_CONNECTION, /*< nick=InvalidOlpcMeshConnection >*/
+} NMDeviceOlpcMeshError;
+
+#define NM_DEVICE_OLPC_MESH_ERROR nm_device_olpc_mesh_error_quark ()
+GQuark nm_device_olpc_mesh_error_quark (void);
+
+#define NM_DEVICE_OLPC_MESH_HW_ADDRESS "hw-address"
+#define NM_DEVICE_OLPC_MESH_COMPANION "companion"
+#define NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL "active-channel"
+
+typedef struct {
+ NMDevice parent;
+} NMDeviceOlpcMesh;
+
+typedef struct {
+ NMDeviceClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+ void (*_reserved5) (void);
+ void (*_reserved6) (void);
+} NMDeviceOlpcMeshClass;
+
+GType nm_device_olpc_mesh_get_type (void);
+
+GObject *nm_device_olpc_mesh_new (DBusGConnection *connection, const char *path);
+
+const char *nm_device_olpc_mesh_get_hw_address (NMDeviceOlpcMesh *device);
+NMDeviceWifi *nm_device_olpc_mesh_get_companion (NMDeviceOlpcMesh *device);
+guint32 nm_device_olpc_mesh_get_active_channel (NMDeviceOlpcMesh *device);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_OLPC_MESH_H */
diff --git a/libnm-glib/nm-device-private.h b/libnm-glib/nm-device-private.h
index 2c56a0e64..5c674f2f7 100644
--- a/libnm-glib/nm-device-private.h
+++ b/libnm-glib/nm-device-private.h
@@ -17,20 +17,12 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2007 - 2008 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_DEVICE_PRIVATE_H
#define NM_DEVICE_PRIVATE_H
-#include <dbus/dbus-glib.h>
-
-DBusGConnection *nm_device_get_connection (NMDevice *device);
-const char *nm_device_get_path (NMDevice *device);
-DBusGProxy *nm_device_get_properties_proxy (NMDevice *device);
-
-/* static methods */
-NMDeviceType nm_device_type_for_path (DBusGConnection *connection,
- const char *path);
+void _nm_device_set_device_type (NMDevice *device, NMDeviceType dtype);
#endif /* NM_DEVICE_PRIVATE_H */
diff --git a/libnm-glib/nm-device-vlan.c b/libnm-glib/nm-device-vlan.c
new file mode 100644
index 000000000..08b1142d2
--- /dev/null
+++ b/libnm-glib/nm-device-vlan.c
@@ -0,0 +1,338 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * libnm_glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <netinet/ether.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-vlan.h>
+#include <nm-utils.h>
+
+#include "nm-device-vlan.h"
+#include "nm-device-private.h"
+#include "nm-object-private.h"
+
+G_DEFINE_TYPE (NMDeviceVlan, nm_device_vlan, NM_TYPE_DEVICE)
+
+#define NM_DEVICE_VLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_VLAN, NMDeviceVlanPrivate))
+
+typedef struct {
+ DBusGProxy *proxy;
+
+ char *hw_address;
+ gboolean carrier;
+ guint vlan_id;
+} NMDeviceVlanPrivate;
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_CARRIER,
+ PROP_VLAN_ID,
+
+ LAST_PROP
+};
+
+#define DBUS_PROP_HW_ADDRESS "HwAddress"
+#define DBUS_PROP_CARRIER "Carrier"
+#define DBUS_PROP_VLAN_ID "VlanId"
+
+/**
+ * nm_device_vlan_error_quark:
+ *
+ * Registers an error quark for #NMDeviceVlan if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceVlan errors.
+ **/
+GQuark
+nm_device_vlan_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-vlan-error-quark");
+ return quark;
+}
+
+/**
+ * nm_device_vlan_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceVlan.
+ *
+ * Returns: (transfer full): a new device
+ **/
+GObject *
+nm_device_vlan_new (DBusGConnection *connection, const char *path)
+{
+ GObject *device;
+
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ device = g_object_new (NM_TYPE_DEVICE_VLAN,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
+}
+
+/**
+ * nm_device_vlan_get_hw_address:
+ * @device: a #NMDeviceVlan
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceVlan
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
+const char *
+nm_device_vlan_get_hw_address (NMDeviceVlan *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), NULL);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_VLAN_GET_PRIVATE (device)->hw_address;
+}
+
+/**
+ * nm_device_vlan_get_carrier:
+ * @device: a #NMDeviceVlan
+ *
+ * Whether the device has carrier.
+ *
+ * Returns: %TRUE if the device has carrier
+ **/
+gboolean
+nm_device_vlan_get_carrier (NMDeviceVlan *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), FALSE);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_VLAN_GET_PRIVATE (device)->carrier;
+}
+
+/**
+ * nm_device_vlan_get_vlan_id:
+ * @device: a #NMDeviceVlan
+ *
+ * Returns: the device's VLAN ID
+ **/
+guint
+nm_device_vlan_get_vlan_id (NMDeviceVlan *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), FALSE);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_VLAN_GET_PRIVATE (device)->vlan_id;
+}
+
+static gboolean
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
+{
+ NMSettingConnection *s_con;
+ NMSettingVlan *s_vlan;
+ const char *ctype, *dev_iface_name, *vlan_iface_name;
+
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ ctype = nm_setting_connection_get_connection_type (s_con);
+ if (strcmp (ctype, NM_SETTING_VLAN_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_VLAN_ERROR, NM_DEVICE_VLAN_ERROR_NOT_VLAN_CONNECTION,
+ "The connection was not a VLAN connection.");
+ return FALSE;
+ }
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ if (!s_vlan) {
+ g_set_error (error, NM_DEVICE_VLAN_ERROR, NM_DEVICE_VLAN_ERROR_INVALID_VLAN_CONNECTION,
+ "The connection was not a valid VLAN connection.");
+ return FALSE;
+ }
+
+ if (nm_setting_vlan_get_id (s_vlan) != nm_device_vlan_get_vlan_id (NM_DEVICE_VLAN (device))) {
+ g_set_error (error, NM_DEVICE_VLAN_ERROR, NM_DEVICE_VLAN_ERROR_ID_MISMATCH,
+ "The VLAN identifiers of the device and the connection didn't match.");
+ return FALSE;
+ }
+
+ dev_iface_name = nm_device_get_iface (device);
+ vlan_iface_name = nm_setting_vlan_get_interface_name (s_vlan);
+ if (vlan_iface_name && g_strcmp0 (dev_iface_name, vlan_iface_name) != 0) {
+ g_set_error (error, NM_DEVICE_VLAN_ERROR, NM_DEVICE_VLAN_ERROR_INTERFACE_MISMATCH,
+ "The interfaces of the device and the connection didn't match.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/***********************************************************/
+
+static void
+nm_device_vlan_init (NMDeviceVlan *device)
+{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_VLAN);
+}
+
+static void
+register_properties (NMDeviceVlan *device)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_VLAN_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_VLAN_CARRIER, &priv->carrier },
+ { NM_DEVICE_VLAN_VLAN_ID, &priv->vlan_id },
+ { NULL },
+ };
+
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
+}
+
+static void
+constructed (GObject *object)
+{
+ NMDeviceVlanPrivate *priv;
+
+ G_OBJECT_CLASS (nm_device_vlan_parent_class)->constructed (object);
+
+ priv = NM_DEVICE_VLAN_GET_PRIVATE (object);
+
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
+ NM_DBUS_SERVICE,
+ nm_object_get_path (NM_OBJECT (object)),
+ NM_DBUS_INTERFACE_DEVICE_VLAN);
+
+ register_properties (NM_DEVICE_VLAN (object));
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (object);
+
+ if (priv->proxy) {
+ g_object_unref (priv->proxy);
+ priv->proxy = NULL;
+ }
+
+ G_OBJECT_CLASS (nm_device_vlan_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (object);
+
+ g_free (priv->hw_address);
+
+ G_OBJECT_CLASS (nm_device_vlan_parent_class)->finalize (object);
+}
+
+static void
+get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ NMDeviceVlan *device = NM_DEVICE_VLAN (object);
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ g_value_set_string (value, nm_device_vlan_get_hw_address (device));
+ break;
+ case PROP_CARRIER:
+ g_value_set_boolean (value, nm_device_vlan_get_carrier (device));
+ break;
+ case PROP_VLAN_ID:
+ g_value_set_uint (value, nm_device_vlan_get_vlan_id (device));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_device_vlan_class_init (NMDeviceVlanClass *eth_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (eth_class);
+ NMDeviceClass *device_class = NM_DEVICE_CLASS (eth_class);
+
+ g_type_class_add_private (eth_class, sizeof (NMDeviceVlanPrivate));
+
+ /* virtual methods */
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+ object_class->get_property = get_property;
+ device_class->connection_compatible = connection_compatible;
+
+ /* properties */
+
+ /**
+ * NMDeviceVlan:hw-address:
+ *
+ * The hardware (MAC) address of the device.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_VLAN_HW_ADDRESS,
+ "Active MAC Address",
+ "Currently set hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ /**
+ * NMDeviceVlan:carrier:
+ *
+ * Whether the device has carrier.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_VLAN_CARRIER,
+ "Carrier",
+ "Carrier",
+ FALSE,
+ G_PARAM_READABLE));
+
+ /**
+ * NMDeviceVlan:vlan-id:
+ *
+ * The device's VLAN ID.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_VLAN_ID,
+ g_param_spec_uint (NM_DEVICE_VLAN_VLAN_ID,
+ "VLAN ID",
+ "VLAN ID",
+ 0, 4095, 0,
+ G_PARAM_READABLE));
+}
diff --git a/libnm-glib/nm-device-vlan.h b/libnm-glib/nm-device-vlan.h
new file mode 100644
index 000000000..df0202595
--- /dev/null
+++ b/libnm-glib/nm-device-vlan.h
@@ -0,0 +1,86 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * libnm_glib -- Access network status & information from glib applications
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_VLAN_H
+#define NM_DEVICE_VLAN_H
+
+#include "nm-device.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_VLAN (nm_device_vlan_get_type ())
+#define NM_DEVICE_VLAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_VLAN, NMDeviceVlan))
+#define NM_DEVICE_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_VLAN, NMDeviceVlanClass))
+#define NM_IS_DEVICE_VLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_VLAN))
+#define NM_IS_DEVICE_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_VLAN))
+#define NM_DEVICE_VLAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_VLAN, NMDeviceVlanClass))
+
+/**
+ * NMDeviceVlanError:
+ * @NM_DEVICE_VLAN_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_VLAN_ERROR_NOT_VLAN_CONNECTION: the connection was not of VLAN type
+ * @NM_DEVICE_VLAN_ERROR_INVALID_VLAN_CONNECTION: the VLAN connection was invalid
+ * @NM_DEVICE_VLAN_ERROR_ID_MISMATCH: the VLAN identifiers of the connection and the device mismatched
+ * @NM_DEVICE_VLAN_ERROR_INTERFACE_MISMATCH: the interfaces of the connection and the device mismatched
+ */
+typedef enum {
+ NM_DEVICE_VLAN_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_VLAN_ERROR_NOT_VLAN_CONNECTION, /*< nick=NotVlanConnection >*/
+ NM_DEVICE_VLAN_ERROR_INVALID_VLAN_CONNECTION, /*< nick=InvalidVlanConnection >*/
+ NM_DEVICE_VLAN_ERROR_ID_MISMATCH, /*< nick=IdMismatch >*/
+ NM_DEVICE_VLAN_ERROR_INTERFACE_MISMATCH, /*< nick=InterfaceMismatch >*/
+} NMDeviceVlanError;
+
+#define NM_DEVICE_VLAN_ERROR nm_device_vlan_error_quark ()
+GQuark nm_device_vlan_error_quark (void);
+
+#define NM_DEVICE_VLAN_HW_ADDRESS "hw-address"
+#define NM_DEVICE_VLAN_CARRIER "carrier"
+#define NM_DEVICE_VLAN_VLAN_ID "vlan-id"
+
+typedef struct {
+ NMDevice parent;
+} NMDeviceVlan;
+
+typedef struct {
+ NMDeviceClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+ void (*_reserved5) (void);
+ void (*_reserved6) (void);
+} NMDeviceVlanClass;
+
+GType nm_device_vlan_get_type (void);
+
+GObject *nm_device_vlan_new (DBusGConnection *connection, const char *path);
+
+const char * nm_device_vlan_get_hw_address (NMDeviceVlan *device);
+gboolean nm_device_vlan_get_carrier (NMDeviceVlan *device);
+guint nm_device_vlan_get_vlan_id (NMDeviceVlan *device);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_VLAN_H */
diff --git a/libnm-glib/nm-device-wifi.c b/libnm-glib/nm-device-wifi.c
index 7d0e1b9f6..6975898f1 100644
--- a/libnm-glib/nm-device-wifi.c
+++ b/libnm-glib/nm-device-wifi.c
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <config.h>
@@ -36,14 +36,10 @@
#include "nm-dbus-glib-types.h"
#include "nm-types-private.h"
-#include "nm-device-wifi-bindings.h"
-
G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
#define NM_DEVICE_WIFI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIFI, NMDeviceWifiPrivate))
-static gboolean demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
-
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
typedef struct {
@@ -55,7 +51,6 @@ typedef struct {
NM80211Mode mode;
guint32 rate;
NMAccessPoint *active_ap;
- gboolean got_active_ap;
NMDeviceWifiCapabilities wireless_caps;
GPtrArray *aps;
@@ -91,6 +86,23 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
/**
+ * nm_device_wifi_error_quark:
+ *
+ * Registers an error quark for #NMDeviceWifi if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceWifi errors.
+ **/
+GQuark
+nm_device_wifi_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-wifi-error-quark");
+ return quark;
+}
+
+/**
* nm_device_wifi_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
@@ -102,13 +114,17 @@ static guint signals[LAST_SIGNAL] = { 0 };
GObject *
nm_device_wifi_new (DBusGConnection *connection, const char *path)
{
+ GObject *device;
+
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_object_new (NM_TYPE_DEVICE_WIFI,
- NM_OBJECT_DBUS_CONNECTION, connection,
- NM_OBJECT_DBUS_PATH, path,
- NULL);
+ device = g_object_new (NM_TYPE_DEVICE_WIFI,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
}
/**
@@ -123,19 +139,10 @@ nm_device_wifi_new (DBusGConnection *connection, const char *path)
const char *
nm_device_wifi_get_hw_address (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (!priv->hw_address) {
- priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRELESS,
- DBUS_PROP_HW_ADDRESS,
- NULL);
- }
-
- return priv->hw_address;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->hw_address;
}
/**
@@ -150,19 +157,10 @@ nm_device_wifi_get_hw_address (NMDeviceWifi *device)
const char *
nm_device_wifi_get_permanent_hw_address (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (!priv->perm_hw_address) {
- priv->perm_hw_address = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRELESS,
- DBUS_PROP_PERM_HW_ADDRESS,
- NULL);
- }
-
- return priv->perm_hw_address;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->perm_hw_address;
}
/**
@@ -176,19 +174,10 @@ nm_device_wifi_get_permanent_hw_address (NMDeviceWifi *device)
NM80211Mode
nm_device_wifi_get_mode (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), 0);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (!priv->mode) {
- priv->mode = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRELESS,
- DBUS_PROP_MODE,
- NULL);
- }
-
- return priv->mode;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->mode;
}
/**
@@ -202,7 +191,6 @@ nm_device_wifi_get_mode (NMDeviceWifi *device)
guint32
nm_device_wifi_get_bitrate (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
NMDeviceState state;
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), 0);
@@ -219,15 +207,8 @@ nm_device_wifi_get_bitrate (NMDeviceWifi *device)
return 0;
}
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (!priv->rate) {
- priv->rate = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRELESS,
- DBUS_PROP_BITRATE,
- NULL);
- }
-
- return priv->rate;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->rate;
}
/**
@@ -241,19 +222,10 @@ nm_device_wifi_get_bitrate (NMDeviceWifi *device)
NMDeviceWifiCapabilities
nm_device_wifi_get_capabilities (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), 0);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (!priv->wireless_caps) {
- priv->wireless_caps = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRELESS,
- DBUS_PROP_WIRELESS_CAPABILITIES,
- NULL);
- }
-
- return priv->wireless_caps;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->wireless_caps;
}
/**
@@ -267,11 +239,7 @@ nm_device_wifi_get_capabilities (NMDeviceWifi *device)
NMAccessPoint *
nm_device_wifi_get_active_access_point (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
NMDeviceState state;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
@@ -291,23 +259,8 @@ nm_device_wifi_get_active_access_point (NMDeviceWifi *device)
break;
}
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (priv->got_active_ap == TRUE)
- return priv->active_ap;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE_WIRELESS,
- DBUS_PROP_ACTIVE_ACCESS_POINT,
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_active_ap (NM_OBJECT (device), NULL, &value, &priv->active_ap);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->active_ap;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->active_ap;
}
/**
@@ -323,31 +276,10 @@ nm_device_wifi_get_active_access_point (NMDeviceWifi *device)
const GPtrArray *
nm_device_wifi_get_access_points (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv;
- DBusGConnection *connection;
- GValue value = { 0, };
- GError *error = NULL;
- GPtrArray *temp;
-
g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- if (priv->aps)
- return handle_ptr_array_return (priv->aps);
-
- if (!org_freedesktop_NetworkManager_Device_Wireless_get_access_points (priv->proxy, &temp, &error)) {
- g_warning ("%s: error getting access points: %s", __func__, error->message);
- g_error_free (error);
- return NULL;
- }
-
- g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
- g_value_take_boxed (&value, temp);
- connection = nm_object_get_connection (NM_OBJECT (device));
- _nm_object_array_demarshal (&value, &priv->aps, connection, nm_access_point_new);
- g_value_unset (&value);
-
- return handle_ptr_array_return (priv->aps);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return handle_ptr_array_return (NM_DEVICE_WIFI_GET_PRIVATE (device)->aps);
}
/**
@@ -386,57 +318,28 @@ nm_device_wifi_get_access_point_by_path (NMDeviceWifi *device,
}
static void
-access_point_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
+access_point_added (NMObject *self, NMObject *ap)
{
- NMDeviceWifi *self = NM_DEVICE_WIFI (user_data);
- NMDeviceWifiPrivate *priv;
- GObject *ap;
-
- g_return_if_fail (self != NULL);
-
- ap = G_OBJECT (nm_device_wifi_get_access_point_by_path (self, path));
- if (!ap) {
- DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (self));
-
- priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
- ap = G_OBJECT (_nm_object_cache_get (path));
- if (ap) {
- g_ptr_array_add (priv->aps, ap);
- } else {
- ap = G_OBJECT (nm_access_point_new (connection, path));
- if (ap)
- g_ptr_array_add (priv->aps, ap);
- }
- }
-
- if (ap)
- g_signal_emit (self, signals[ACCESS_POINT_ADDED], 0, NM_ACCESS_POINT (ap));
+ g_signal_emit (self, signals[ACCESS_POINT_ADDED], 0, ap);
}
static void
-access_point_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
+access_point_removed (NMObject *self_obj, NMObject *ap_obj)
{
- NMDeviceWifi *self = NM_DEVICE_WIFI (user_data);
+ NMDeviceWifi *self = NM_DEVICE_WIFI (self_obj);
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
- NMAccessPoint *ap;
-
- g_return_if_fail (self != NULL);
+ NMAccessPoint *ap = NM_ACCESS_POINT (ap_obj);
- ap = nm_device_wifi_get_access_point_by_path (self, path);
- if (ap) {
- if (ap == priv->active_ap) {
- g_object_unref (priv->active_ap);
- priv->active_ap = NULL;
- _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
-
- priv->rate = 0;
- _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIFI_BITRATE);
- }
+ if (ap == priv->active_ap) {
+ g_object_unref (priv->active_ap);
+ priv->active_ap = NULL;
+ _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
- g_signal_emit (self, signals[ACCESS_POINT_REMOVED], 0, ap);
- g_ptr_array_remove (priv->aps, ap);
- g_object_unref (G_OBJECT (ap));
+ priv->rate = 0;
+ _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIFI_BITRATE);
}
+
+ g_signal_emit (self, signals[ACCESS_POINT_REMOVED], 0, ap);
}
static void
@@ -504,7 +407,7 @@ has_proto (NMSettingWirelessSecurity *s_wsec, const char *proto)
}
static gboolean
-connection_valid (NMDevice *device, NMConnection *connection)
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
NMSettingConnection *s_con;
NMSettingWireless *s_wifi;
@@ -516,24 +419,40 @@ connection_valid (NMDevice *device, NMConnection *connection)
NMDeviceWifiCapabilities wifi_caps;
const char *key_mgmt;
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
ctype = nm_setting_connection_get_connection_type (s_con);
- if (strcmp (ctype, NM_SETTING_WIRELESS_SETTING_NAME) != 0)
+ if (strcmp (ctype, NM_SETTING_WIRELESS_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_WIFI_ERROR, NM_DEVICE_WIFI_ERROR_NOT_WIFI_CONNECTION,
+ "The connection was not a Wi-Fi connection.");
return FALSE;
+ }
s_wifi = nm_connection_get_setting_wireless (connection);
- if (!s_wifi)
+ if (!s_wifi) {
+ g_set_error (error, NM_DEVICE_WIFI_ERROR, NM_DEVICE_WIFI_ERROR_INVALID_WIFI_CONNECTION,
+ "The connection was not a valid Wi-Fi connection.");
return FALSE;
+ }
/* Check MAC address */
hw_str = nm_device_wifi_get_permanent_hw_address (NM_DEVICE_WIFI (device));
if (hw_str) {
hw_mac = ether_aton (hw_str);
+ if (!hw_mac) {
+ g_set_error (error, NM_DEVICE_WIFI_ERROR, NM_DEVICE_WIFI_ERROR_INVALID_DEVICE_MAC,
+ "Invalid device MAC address.");
+ return FALSE;
+ }
mac = nm_setting_wireless_get_mac_address (s_wifi);
- if (mac && hw_mac && memcmp (mac->data, hw_mac->ether_addr_octet, ETH_ALEN))
+ if (mac && hw_mac && memcmp (mac->data, hw_mac->ether_addr_octet, ETH_ALEN)) {
+ g_set_error (error, NM_DEVICE_WIFI_ERROR, NM_DEVICE_WIFI_ERROR_MAC_MISMATCH,
+ "The MACs of the device and the connection didn't match.");
return FALSE;
+ }
}
/* Check device capabilities; we assume all devices can do WEP at least */
@@ -548,12 +467,18 @@ connection_valid (NMDevice *device, NMConnection *connection)
|| !g_strcmp0 (key_mgmt, "wpa-eap")) {
/* Is device only WEP capable? */
- if (!(wifi_caps & WPA_CAPS))
+ if (!(wifi_caps & WPA_CAPS)) {
+ g_set_error (error, NM_DEVICE_WIFI_ERROR, NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_WPA_CAPS,
+ "The device missed WPA capabilities required by the connection.");
return FALSE;
+ }
/* Make sure WPA2/RSN-only connections don't get chosen for WPA-only cards */
- if (has_proto (s_wsec, "rsn") && !has_proto (s_wsec, "wpa") && !(wifi_caps & RSN_CAPS))
+ if (has_proto (s_wsec, "rsn") && !has_proto (s_wsec, "wpa") && !(wifi_caps & RSN_CAPS)) {
+ g_set_error (error, NM_DEVICE_WIFI_ERROR, NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_RSN_CAPS,
+ "The device missed WPA2/RSN capabilities required by the connection.");
return FALSE;
+ }
}
}
@@ -565,9 +490,7 @@ connection_valid (NMDevice *device, NMConnection *connection)
static void
nm_device_wifi_init (NMDeviceWifi *device)
{
- NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
-
- priv->disposed = FALSE;
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_WIFI);
}
static void
@@ -629,74 +552,39 @@ state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data)
}
}
-static gboolean
-demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
- const char *path;
- NMAccessPoint *ap = NULL;
- DBusGConnection *connection;
-
- if (value) {
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
- return FALSE;
-
- path = g_value_get_boxed (value);
- if (path) {
- ap = NM_ACCESS_POINT (_nm_object_cache_get (path));
- if (!ap) {
- connection = nm_object_get_connection (object);
- ap = NM_ACCESS_POINT (nm_access_point_new (connection, path));
- }
- }
- }
-
- priv->got_active_ap = TRUE;
-
- if (priv->active_ap) {
- g_object_unref (priv->active_ap);
- priv->active_ap = NULL;
- }
-
- if (ap)
- priv->active_ap = ap;
-
- _nm_object_queue_notify (object, NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
- return TRUE;
-}
-
static void
-register_for_property_changed (NMDeviceWifi *device)
+register_properties (NMDeviceWifi *device)
{
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_WIFI_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
- { NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS, _nm_object_demarshal_generic, &priv->perm_hw_address },
- { NM_DEVICE_WIFI_MODE, _nm_object_demarshal_generic, &priv->mode },
- { NM_DEVICE_WIFI_BITRATE, _nm_object_demarshal_generic, &priv->rate },
- { NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT, demarshal_active_ap, &priv->active_ap },
- { NM_DEVICE_WIFI_CAPABILITIES, _nm_object_demarshal_generic, &priv->wireless_caps },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_WIFI_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS, &priv->perm_hw_address },
+ { NM_DEVICE_WIFI_MODE, &priv->mode },
+ { NM_DEVICE_WIFI_BITRATE, &priv->rate },
+ { NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT, &priv->active_ap, NULL, NM_TYPE_ACCESS_POINT },
+ { NM_DEVICE_WIFI_CAPABILITIES, &priv->wireless_caps },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (device),
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
+
+ _nm_object_register_pseudo_property (NM_OBJECT (device),
priv->proxy,
- property_changed_info);
+ "AccessPoints",
+ &priv->aps,
+ NM_TYPE_ACCESS_POINT,
+ access_point_added,
+ access_point_removed);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
NMDeviceWifiPrivate *priv;
- object = G_OBJECT_CLASS (nm_device_wifi_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_device_wifi_parent_class)->constructed (object);
priv = NM_DEVICE_WIFI_GET_PRIVATE (object);
@@ -705,28 +593,12 @@ constructor (GType type,
nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DEVICE_WIRELESS);
- dbus_g_proxy_add_signal (priv->proxy, "AccessPointAdded",
- DBUS_TYPE_G_OBJECT_PATH,
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (priv->proxy, "AccessPointAdded",
- G_CALLBACK (access_point_added_proxy),
- object, NULL);
-
- dbus_g_proxy_add_signal (priv->proxy, "AccessPointRemoved",
- DBUS_TYPE_G_OBJECT_PATH,
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (priv->proxy, "AccessPointRemoved",
- G_CALLBACK (access_point_removed_proxy),
- object, NULL);
-
- register_for_property_changed (NM_DEVICE_WIFI (object));
+ register_properties (NM_DEVICE_WIFI (object));
g_signal_connect (NM_DEVICE (object),
"notify::" NM_DEVICE_STATE,
G_CALLBACK (state_changed_cb),
NULL);
-
- return object;
}
static void
@@ -767,11 +639,11 @@ nm_device_wifi_class_init (NMDeviceWifiClass *wifi_class)
g_type_class_add_private (wifi_class, sizeof (NMDeviceWifiPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->dispose = dispose;
object_class->finalize = finalize;
- device_class->connection_valid = connection_valid;
+ device_class->connection_compatible = connection_compatible;
/* properties */
diff --git a/libnm-glib/nm-device-wifi.h b/libnm-glib/nm-device-wifi.h
index fb2ab27da..13f1cb8a8 100644
--- a/libnm-glib/nm-device-wifi.h
+++ b/libnm-glib/nm-device-wifi.h
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2010 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_DEVICE_WIFI_H
@@ -36,6 +36,31 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_WIFI))
#define NM_DEVICE_WIFI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
+/**
+ * NMDeviceWifiError:
+ * @NM_DEVICE_WIFI_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_WIFI_ERROR_NOT_WIFI_CONNECTION: the connection was not of Wi-Fi type
+ * @NM_DEVICE_WIFI_ERROR_INVALID_WIFI_CONNECTION: the Wi-Fi connection was invalid
+ * @NM_DEVICE_WIFI_ERROR_INVALID_DEVICE_MAC: the device's MAC was invalid
+ * @NM_DEVICE_WIFI_ERROR_MAC_MISMATCH: the MACs of the connection and the device mismatched
+ * @NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_WPA_CAPS: the device missed WPA capabilities
+ * required by the connection
+ * @NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_RSN_CAPS: the device missed RSN capabilities
+ * required by the connection
+ */
+typedef enum {
+ NM_DEVICE_WIFI_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_WIFI_ERROR_NOT_WIFI_CONNECTION, /*< nick=NotWifiConnection >*/
+ NM_DEVICE_WIFI_ERROR_INVALID_WIFI_CONNECTION, /*< nick=InvalidWifiConnection >*/
+ NM_DEVICE_WIFI_ERROR_INVALID_DEVICE_MAC, /*< nick=InvalidDeviceMac >*/
+ NM_DEVICE_WIFI_ERROR_MAC_MISMATCH, /*< nick=MacMismatch >*/
+ NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_WPA_CAPS, /*< nick=MissingDeviceWpaCaps >*/
+ NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_RSN_CAPS, /*< nick=MissingDeviceRsnCaps >*/
+} NMDeviceWifiError;
+
+#define NM_DEVICE_WIFI_ERROR nm_device_wifi_error_quark ()
+GQuark nm_device_wifi_error_quark (void);
+
#define NM_DEVICE_WIFI_HW_ADDRESS "hw-address"
#define NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS "perm-hw-address"
#define NM_DEVICE_WIFI_MODE "mode"
diff --git a/libnm-glib/nm-device-wimax.c b/libnm-glib/nm-device-wimax.c
index 4844a0e21..48a518d76 100644
--- a/libnm-glib/nm-device-wimax.c
+++ b/libnm-glib/nm-device-wimax.c
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
* Copyright (C) 2009 Novell, Inc.
*/
@@ -33,15 +33,12 @@
#include "nm-object-cache.h"
#include "nm-dbus-glib-types.h"
#include "nm-types-private.h"
-
-#include "nm-device-wimax-bindings.h"
+#include "nm-device-private.h"
G_DEFINE_TYPE (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE)
#define NM_DEVICE_WIMAX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxPrivate))
-static gboolean demarshal_active_nsp (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
-
void _nm_device_wimax_set_wireless_enabled (NMDeviceWimax *wimax, gboolean enabled);
typedef struct {
@@ -50,7 +47,6 @@ typedef struct {
char *hw_address;
NMWimaxNsp *active_nsp;
- gboolean got_active_nsp;
GPtrArray *nsps;
guint center_freq;
@@ -91,6 +87,23 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
/**
+ * nm_device_wimax_error_quark:
+ *
+ * Registers an error quark for #NMDeviceWimax if necessary.
+ *
+ * Returns: the error quark used for #NMDeviceWimax errors.
+ **/
+GQuark
+nm_device_wimax_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0))
+ quark = g_quark_from_static_string ("nm-device-wimax-error-quark");
+ return quark;
+}
+
+/**
* nm_device_wimax_new:
* @connection: the #DBusGConnection
* @path: the D-Bus object path of the WiMAX device
@@ -102,13 +115,17 @@ static guint signals[LAST_SIGNAL] = { 0 };
GObject *
nm_device_wimax_new (DBusGConnection *connection, const char *path)
{
+ GObject *device;
+
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_object_new (NM_TYPE_DEVICE_WIMAX,
- NM_OBJECT_DBUS_CONNECTION, connection,
- NM_OBJECT_DBUS_PATH, path,
- NULL);
+ device = g_object_new (NM_TYPE_DEVICE_WIMAX,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return device;
}
/**
@@ -123,19 +140,10 @@ nm_device_wimax_new (DBusGConnection *connection, const char *path)
const char *
nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
{
- NMDeviceWimaxPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), NULL);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
- if (!priv->hw_address) {
- priv->hw_address = _nm_object_get_string_property (NM_OBJECT (wimax),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_HW_ADDRESS,
- NULL);
- }
-
- return priv->hw_address;
+ _nm_object_ensure_inited (NM_OBJECT (wimax));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (wimax)->hw_address;
}
/**
@@ -149,11 +157,7 @@ nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
NMWimaxNsp *
nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
{
- NMDeviceWimaxPrivate *priv;
NMDeviceState state;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), NULL);
@@ -173,23 +177,8 @@ nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
break;
}
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
- if (priv->got_active_nsp == TRUE)
- return priv->active_nsp;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (wimax),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_ACTIVE_NSP,
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_active_nsp (NM_OBJECT (wimax), NULL, &value, &priv->active_nsp);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->active_nsp;
+ _nm_object_ensure_inited (NM_OBJECT (wimax));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (wimax)->active_nsp;
}
/**
@@ -205,31 +194,10 @@ nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
const GPtrArray *
nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
{
- NMDeviceWimaxPrivate *priv;
- DBusGConnection *connection;
- GValue value = { 0, };
- GError *error = NULL;
- GPtrArray *temp;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), NULL);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
- if (priv->nsps)
- return handle_ptr_array_return (priv->nsps);
-
- if (!org_freedesktop_NetworkManager_Device_WiMax_get_nsp_list (priv->proxy, &temp, &error)) {
- g_warning ("%s: error getting NSPs: %s", __func__, error->message);
- g_error_free (error);
- return NULL;
- }
-
- g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
- g_value_take_boxed (&value, temp);
- connection = nm_object_get_connection (NM_OBJECT (wimax));
- _nm_object_array_demarshal (&value, &priv->nsps, connection, nm_wimax_nsp_new);
- g_value_unset (&value);
-
- return handle_ptr_array_return (priv->nsps);
+ _nm_object_ensure_inited (NM_OBJECT (wimax));
+ return handle_ptr_array_return (NM_DEVICE_WIMAX_GET_PRIVATE (wimax)->nsps);
}
/**
@@ -268,54 +236,25 @@ nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,
}
static void
-nsp_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
+nsp_added (NMObject *self, NMObject *nsp)
{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv;
- GObject *nsp;
-
- g_return_if_fail (self != NULL);
-
- nsp = G_OBJECT (nm_device_wimax_get_nsp_by_path (self, path));
- if (!nsp) {
- DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (self));
-
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- nsp = G_OBJECT (_nm_object_cache_get (path));
- if (nsp) {
- g_ptr_array_add (priv->nsps, nsp);
- } else {
- nsp = G_OBJECT (nm_wimax_nsp_new (connection, path));
- if (nsp)
- g_ptr_array_add (priv->nsps, nsp);
- }
- }
-
- if (nsp)
- g_signal_emit (self, signals[NSP_ADDED], 0, nsp);
+ g_signal_emit (self, signals[NSP_ADDED], 0, nsp);
}
static void
-nsp_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
+nsp_removed (NMObject *self_obj, NMObject *nsp_obj)
{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
+ NMDeviceWimax *self = NM_DEVICE_WIMAX (self_obj);
NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- NMWimaxNsp *nsp;
-
- g_return_if_fail (self != NULL);
-
- nsp = nm_device_wimax_get_nsp_by_path (self, path);
- if (nsp) {
- if (nsp == priv->active_nsp) {
- g_object_unref (priv->active_nsp);
- priv->active_nsp = NULL;
- _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIMAX_ACTIVE_NSP);
- }
+ NMWimaxNsp *nsp = NM_WIMAX_NSP (nsp_obj);
- g_signal_emit (self, signals[NSP_REMOVED], 0, nsp);
- g_ptr_array_remove (priv->nsps, nsp);
- g_object_unref (G_OBJECT (nsp));
+ if (nsp == priv->active_nsp) {
+ g_object_unref (priv->active_nsp);
+ priv->active_nsp = NULL;
+ _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIMAX_ACTIVE_NSP);
}
+
+ g_signal_emit (self, signals[NSP_REMOVED], 0, nsp);
}
static void
@@ -359,18 +298,10 @@ clean_up_nsps (NMDeviceWimax *self, gboolean notify)
guint
nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
{
- NMDeviceWimaxPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- if (!priv->center_freq) {
- priv->center_freq = _nm_object_get_uint_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_CENTER_FREQUENCY,
- NULL);
- }
- return priv->center_freq;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (self)->center_freq;
}
/**
@@ -387,18 +318,10 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
gint
nm_device_wimax_get_rssi (NMDeviceWimax *self)
{
- NMDeviceWimaxPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- if (!priv->rssi) {
- priv->rssi = _nm_object_get_int_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_RSSI,
- NULL);
- }
- return priv->rssi;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (self)->rssi;
}
/**
@@ -414,18 +337,10 @@ nm_device_wimax_get_rssi (NMDeviceWimax *self)
gint
nm_device_wimax_get_cinr (NMDeviceWimax *self)
{
- NMDeviceWimaxPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- if (!priv->cinr) {
- priv->cinr = _nm_object_get_int_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_CINR,
- NULL);
- }
- return priv->cinr;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (self)->cinr;
}
/**
@@ -441,18 +356,10 @@ nm_device_wimax_get_cinr (NMDeviceWimax *self)
gint
nm_device_wimax_get_tx_power (NMDeviceWimax *self)
{
- NMDeviceWimaxPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- if (!priv->tx_power) {
- priv->tx_power = _nm_object_get_int_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_TX_POWER,
- NULL);
- }
- return priv->tx_power;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (self)->tx_power;
}
/**
@@ -466,22 +373,14 @@ nm_device_wimax_get_tx_power (NMDeviceWimax *self)
const char *
nm_device_wimax_get_bsid (NMDeviceWimax *self)
{
- NMDeviceWimaxPrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), NULL);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- if (!priv->bsid) {
- priv->bsid = _nm_object_get_string_property (NM_OBJECT (self),
- NM_DBUS_INTERFACE_DEVICE_WIMAX,
- DBUS_PROP_BSID,
- NULL);
- }
- return priv->bsid;
+ _nm_object_ensure_inited (NM_OBJECT (self));
+ return NM_DEVICE_WIMAX_GET_PRIVATE (self)->bsid;
}
static gboolean
-connection_valid (NMDevice *device, NMConnection *connection)
+connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
NMSettingConnection *s_con;
NMSettingWimax *s_wimax;
@@ -490,24 +389,40 @@ connection_valid (NMDevice *device, NMConnection *connection)
const char *hw_str;
struct ether_addr *hw_mac;
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
ctype = nm_setting_connection_get_connection_type (s_con);
- if (strcmp (ctype, NM_SETTING_WIMAX_SETTING_NAME) != 0)
+ if (strcmp (ctype, NM_SETTING_WIMAX_SETTING_NAME) != 0) {
+ g_set_error (error, NM_DEVICE_WIMAX_ERROR, NM_DEVICE_WIMAX_ERROR_NOT_WIMAX_CONNECTION,
+ "The connection was not a Wimax connection.");
return FALSE;
+ }
s_wimax = nm_connection_get_setting_wimax (connection);
- if (!s_wimax)
+ if (!s_wimax) {
+ g_set_error (error, NM_DEVICE_WIMAX_ERROR, NM_DEVICE_WIMAX_ERROR_INVALID_WIMAX_CONNECTION,
+ "The connection was not a valid Wimax connection.");
return FALSE;
+ }
/* Check MAC address */
hw_str = nm_device_wimax_get_hw_address (NM_DEVICE_WIMAX (device));
if (hw_str) {
hw_mac = ether_aton (hw_str);
+ if (!hw_mac) {
+ g_set_error (error, NM_DEVICE_WIMAX_ERROR, NM_DEVICE_WIMAX_ERROR_INVALID_DEVICE_MAC,
+ "Invalid device MAC address.");
+ return FALSE;
+ }
mac = nm_setting_wimax_get_mac_address (s_wimax);
- if (mac && hw_mac && memcmp (mac->data, hw_mac->ether_addr_octet, ETH_ALEN))
+ if (mac && hw_mac && memcmp (mac->data, hw_mac->ether_addr_octet, ETH_ALEN)) {
+ g_set_error (error, NM_DEVICE_WIMAX_ERROR, NM_DEVICE_WIMAX_ERROR_MAC_MISMATCH,
+ "The MACs of the device and the connection didn't match.");
return FALSE;
+ }
}
return TRUE;
@@ -516,8 +431,9 @@ connection_valid (NMDevice *device, NMConnection *connection)
/**************************************************************/
static void
-nm_device_wimax_init (NMDeviceWimax *wimax)
+nm_device_wimax_init (NMDeviceWimax *device)
{
+ _nm_device_set_device_type (NM_DEVICE (device), NM_DEVICE_TYPE_WIMAX);
}
static void
@@ -620,75 +536,40 @@ state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data)
}
}
-static gboolean
-demarshal_active_nsp (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (object);
- const char *path;
- NMWimaxNsp *nsp = NULL;
- DBusGConnection *connection;
-
- if (value) {
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
- return FALSE;
-
- path = g_value_get_boxed (value);
- if (path) {
- nsp = NM_WIMAX_NSP (_nm_object_cache_get (path));
- if (!nsp) {
- connection = nm_object_get_connection (object);
- nsp = NM_WIMAX_NSP (nm_wimax_nsp_new (connection, path));
- }
- }
- }
-
- priv->got_active_nsp = TRUE;
-
- if (priv->active_nsp) {
- g_object_unref (priv->active_nsp);
- priv->active_nsp = NULL;
- }
-
- if (nsp)
- priv->active_nsp = nsp;
-
- _nm_object_queue_notify (object, NM_DEVICE_WIMAX_ACTIVE_NSP);
- return TRUE;
-}
-
static void
-register_for_property_changed (NMDeviceWimax *wimax)
+register_properties (NMDeviceWimax *wimax)
{
NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_WIMAX_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
- { NM_DEVICE_WIMAX_ACTIVE_NSP, demarshal_active_nsp, &priv->active_nsp },
- { NM_DEVICE_WIMAX_CENTER_FREQUENCY, _nm_object_demarshal_generic, &priv->center_freq },
- { NM_DEVICE_WIMAX_RSSI, _nm_object_demarshal_generic, &priv->rssi },
- { NM_DEVICE_WIMAX_CINR, _nm_object_demarshal_generic, &priv->cinr },
- { NM_DEVICE_WIMAX_TX_POWER, _nm_object_demarshal_generic, &priv->tx_power },
- { NM_DEVICE_WIMAX_BSID, _nm_object_demarshal_generic, &priv->bsid },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_WIMAX_HW_ADDRESS, &priv->hw_address },
+ { NM_DEVICE_WIMAX_ACTIVE_NSP, &priv->active_nsp, NULL, NM_TYPE_WIMAX_NSP },
+ { NM_DEVICE_WIMAX_CENTER_FREQUENCY, &priv->center_freq },
+ { NM_DEVICE_WIMAX_RSSI, &priv->rssi },
+ { NM_DEVICE_WIMAX_CINR, &priv->cinr },
+ { NM_DEVICE_WIMAX_TX_POWER, &priv->tx_power },
+ { NM_DEVICE_WIMAX_BSID, &priv->bsid },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (wimax),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (wimax),
+ priv->proxy,
+ property_info);
+
+ _nm_object_register_pseudo_property (NM_OBJECT (wimax),
+ priv->proxy,
+ "NspList",
+ &priv->nsps,
+ NM_TYPE_WIMAX_NSP,
+ nsp_added,
+ nsp_removed);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
NMDeviceWimaxPrivate *priv;
- object = G_OBJECT_CLASS (nm_device_wimax_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_device_wimax_parent_class)->constructed (object);
priv = NM_DEVICE_WIMAX_GET_PRIVATE (object);
@@ -697,28 +578,12 @@ constructor (GType type,
nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DEVICE_WIMAX);
- dbus_g_proxy_add_signal (priv->proxy, "NspAdded",
- DBUS_TYPE_G_OBJECT_PATH,
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (priv->proxy, "NspAdded",
- G_CALLBACK (nsp_added_proxy),
- object, NULL);
-
- dbus_g_proxy_add_signal (priv->proxy, "NspRemoved",
- DBUS_TYPE_G_OBJECT_PATH,
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (priv->proxy, "NspRemoved",
- G_CALLBACK (nsp_removed_proxy),
- object, NULL);
-
- register_for_property_changed (NM_DEVICE_WIMAX (object));
+ register_properties (NM_DEVICE_WIMAX (object));
g_signal_connect (object,
"notify::" NM_DEVICE_STATE,
G_CALLBACK (state_changed_cb),
NULL);
-
- return object;
}
static void
@@ -751,10 +616,10 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
g_type_class_add_private (wimax_class, sizeof (NMDeviceWimaxPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->dispose = dispose;
- device_class->connection_valid = connection_valid;
+ device_class->connection_compatible = connection_compatible;
/* properties */
diff --git a/libnm-glib/nm-device-wimax.h b/libnm-glib/nm-device-wimax.h
index 5e19bbaf9..e391d4de3 100644
--- a/libnm-glib/nm-device-wimax.h
+++ b/libnm-glib/nm-device-wimax.h
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
* Copyright (C) 2009 Novell, Inc.
*/
@@ -36,6 +36,25 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_WIMAX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_WIMAX))
#define NM_DEVICE_WIMAX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxClass))
+/**
+ * NMDeviceWimaxError:
+ * @NM_DEVICE_WIMAX_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_DEVICE_WIMAX_ERROR_NOT_WIMAX_CONNECTION: the connection was not of WiMax type
+ * @NM_DEVICE_WIMAX_ERROR_INVALID_WIMAX_CONNECTION: the WiMax connection was invalid
+ * @NM_DEVICE_WIMAX_ERROR_INVALID_DEVICE_MAC: the device's MAC was invalid
+ * @NM_DEVICE_WIMAX_ERROR_MAC_MISMATCH: the MACs of the connection and the device mismatched
+ */
+typedef enum {
+ NM_DEVICE_WIMAX_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_DEVICE_WIMAX_ERROR_NOT_WIMAX_CONNECTION, /*< nick=NotWimaxConnection >*/
+ NM_DEVICE_WIMAX_ERROR_INVALID_WIMAX_CONNECTION, /*< nick=InvalidWimaxConnection >*/
+ NM_DEVICE_WIMAX_ERROR_INVALID_DEVICE_MAC, /*< nick=InvalidDeviceMac >*/
+ NM_DEVICE_WIMAX_ERROR_MAC_MISMATCH, /*< nick=MacMismatch >*/
+} NMDeviceWimaxError;
+
+#define NM_DEVICE_WIMAX_ERROR nm_device_wimax_error_quark ()
+GQuark nm_device_wimax_error_quark (void);
+
#define NM_DEVICE_WIMAX_HW_ADDRESS "hw-address"
#define NM_DEVICE_WIMAX_ACTIVE_NSP "active-nsp"
#define NM_DEVICE_WIMAX_CENTER_FREQUENCY "center-frequency"
diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index 1f9f36719..96a037d57 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <string.h>
@@ -30,16 +30,32 @@
#include "nm-device-wifi.h"
#include "nm-device-modem.h"
#include "nm-device-bt.h"
+#include "nm-device-olpc-mesh.h"
#include "nm-device-wimax.h"
+#include "nm-device-infiniband.h"
+#include "nm-device-bond.h"
+#include "nm-device-vlan.h"
#include "nm-device.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
#include "nm-object-cache.h"
-#include "nm-marshal.h"
+#include "nm-glib-marshal.h"
+#include "nm-dbus-glib-types.h"
+#include "nm-glib-compat.h"
-#include "nm-device-bindings.h"
+static GType _nm_device_type_for_path (DBusGConnection *connection,
+ const char *path);
+static void _nm_device_type_for_path_async (DBusGConnection *connection,
+ const char *path,
+ NMObjectTypeCallbackFunc callback,
+ gpointer user_data);
-G_DEFINE_TYPE (NMDevice, nm_device, NM_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_CODE (NMDevice, nm_device, NM_TYPE_OBJECT,
+ _nm_object_register_type_func (g_define_type_id, _nm_device_type_for_path,
+ _nm_device_type_for_path_async);
+ )
+
+#define DBUS_G_TYPE_UINT_STRUCT (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INVALID))
#define NM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE, NMDevicePrivate))
@@ -56,17 +72,13 @@ typedef struct {
gboolean managed;
gboolean firmware_missing;
NMIP4Config *ip4_config;
- gboolean got_ip4_config;
NMDHCP4Config *dhcp4_config;
- gboolean got_dhcp4_config;
NMIP6Config *ip6_config;
- gboolean got_ip6_config;
NMDHCP6Config *dhcp6_config;
- gboolean got_dhcp6_config;
NMDeviceState state;
+ NMDeviceStateReason reason;
NMActiveConnection *active_connection;
- gboolean got_active_connection;
GUdevClient *client;
char *product;
@@ -85,6 +97,7 @@ enum {
PROP_DHCP4_CONFIG,
PROP_IP6_CONFIG,
PROP_STATE,
+ PROP_STATE_REASON,
PROP_PRODUCT,
PROP_VENDOR,
PROP_DHCP6_CONFIG,
@@ -110,211 +123,56 @@ nm_device_init (NMDevice *device)
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
priv->state = NM_DEVICE_STATE_UNKNOWN;
+ priv->reason = NM_DEVICE_STATE_REASON_NONE;
}
static gboolean
-demarshal_ip4_config (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
- const char *path;
- NMIP4Config *config = NULL;
- DBusGConnection *connection;
-
- if (value) {
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
- return FALSE;
-
- path = g_value_get_boxed (value);
- if (path) {
- config = NM_IP4_CONFIG (_nm_object_cache_get (path));
- if (!config) {
- connection = nm_object_get_connection (object);
- config = NM_IP4_CONFIG (nm_ip4_config_new (connection, path));
- }
- }
- }
-
- priv->got_ip4_config = TRUE;
-
- if (priv->ip4_config) {
- g_object_unref (priv->ip4_config);
- priv->ip4_config = NULL;
- }
-
- if (config)
- priv->ip4_config = config;
-
- _nm_object_queue_notify (object, NM_DEVICE_IP4_CONFIG);
- return TRUE;
-}
-
-static gboolean
-demarshal_dhcp4_config (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
- const char *path;
- NMDHCP4Config *config = NULL;
- DBusGConnection *connection;
-
- if (value) {
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
- return FALSE;
-
- path = g_value_get_boxed (value);
- if (path) {
- config = NM_DHCP4_CONFIG (_nm_object_cache_get (path));
- if (!config) {
- connection = nm_object_get_connection (object);
- config = NM_DHCP4_CONFIG (nm_dhcp4_config_new (connection, path));
- }
- }
- }
-
- priv->got_dhcp4_config = TRUE;
-
- if (priv->dhcp4_config) {
- g_object_unref (priv->dhcp4_config);
- priv->dhcp4_config = NULL;
- }
-
- if (config)
- priv->dhcp4_config = config;
-
- _nm_object_queue_notify (object, NM_DEVICE_DHCP4_CONFIG);
- return TRUE;
-}
-
-static gboolean
-demarshal_ip6_config (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
- const char *path;
- NMIP6Config *config = NULL;
- DBusGConnection *connection;
-
- if (value) {
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
- return FALSE;
-
- path = g_value_get_boxed (value);
- if (path) {
- config = NM_IP6_CONFIG (_nm_object_cache_get (path));
- if (!config) {
- connection = nm_object_get_connection (object);
- config = NM_IP6_CONFIG (nm_ip6_config_new (connection, path));
- }
- }
- }
-
- priv->got_ip6_config = TRUE;
-
- if (priv->ip6_config) {
- g_object_unref (priv->ip6_config);
- priv->ip6_config = NULL;
- }
-
- if (config)
- priv->ip6_config = config;
-
- _nm_object_queue_notify (object, NM_DEVICE_IP6_CONFIG);
- return TRUE;
-}
-
-static gboolean
-demarshal_dhcp6_config (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
+demarshal_state_reason (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
- const char *path;
- NMDHCP6Config *config = NULL;
- DBusGConnection *connection;
-
- if (value) {
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
- return FALSE;
-
- path = g_value_get_boxed (value);
- if (path) {
- config = NM_DHCP6_CONFIG (_nm_object_cache_get (path));
- if (!config) {
- connection = nm_object_get_connection (object);
- config = NM_DHCP6_CONFIG (nm_dhcp6_config_new (connection, path));
- }
- }
- }
- priv->got_dhcp6_config = TRUE;
-
- if (priv->dhcp6_config) {
- g_object_unref (priv->dhcp6_config);
- priv->dhcp6_config = NULL;
- }
-
- if (config)
- priv->dhcp6_config = config;
-
- _nm_object_queue_notify (object, NM_DEVICE_DHCP6_CONFIG);
- return TRUE;
-}
-
-static gboolean
-demarshal_active_connection (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
- const char *path;
- NMActiveConnection *active = NULL;
- DBusGConnection *connection;
-
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
+ if (!G_VALUE_HOLDS (value, DBUS_G_TYPE_UINT_STRUCT))
return FALSE;
- priv->got_active_connection = TRUE;
+ dbus_g_type_struct_get (value,
+ 0, &priv->state,
+ 1, &priv->reason,
+ G_MAXUINT);
- if (value) {
- path = g_value_get_boxed (value);
- if (path) {
- active = NM_ACTIVE_CONNECTION (_nm_object_cache_get (path));
- if (!active) {
- connection = nm_object_get_connection (object);
- active = NM_ACTIVE_CONNECTION (nm_active_connection_new (connection, path));
- }
- }
- }
-
- if (priv->active_connection) {
- g_object_unref (priv->active_connection);
- priv->active_connection = NULL;
- }
-
- if (active)
- priv->active_connection = active;
-
- _nm_object_queue_notify (object, NM_DEVICE_ACTIVE_CONNECTION);
+ _nm_object_queue_notify (object, NM_DEVICE_STATE_REASON);
return TRUE;
}
static void
-register_for_property_changed (NMDevice *device)
+register_properties (NMDevice *device)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_UDI, _nm_object_demarshal_generic, &priv->udi },
- { NM_DEVICE_INTERFACE, _nm_object_demarshal_generic, &priv->iface },
- { NM_DEVICE_IP_INTERFACE, _nm_object_demarshal_generic, &priv->ip_iface },
- { NM_DEVICE_DRIVER, _nm_object_demarshal_generic, &priv->driver },
- { NM_DEVICE_CAPABILITIES, _nm_object_demarshal_generic, &priv->capabilities },
- { NM_DEVICE_MANAGED, _nm_object_demarshal_generic, &priv->managed },
- { NM_DEVICE_FIRMWARE_MISSING, _nm_object_demarshal_generic, &priv->firmware_missing },
- { NM_DEVICE_IP4_CONFIG, demarshal_ip4_config, &priv->ip4_config },
- { NM_DEVICE_DHCP4_CONFIG, demarshal_dhcp4_config, &priv->dhcp4_config },
- { NM_DEVICE_IP6_CONFIG, demarshal_ip6_config, &priv->ip6_config },
- { NM_DEVICE_DHCP6_CONFIG, demarshal_dhcp6_config, &priv->dhcp6_config },
- { NM_DEVICE_ACTIVE_CONNECTION,demarshal_active_connection, &priv->active_connection },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DEVICE_UDI, &priv->udi },
+ { NM_DEVICE_INTERFACE, &priv->iface },
+ { NM_DEVICE_IP_INTERFACE, &priv->ip_iface },
+ { NM_DEVICE_DRIVER, &priv->driver },
+ { NM_DEVICE_CAPABILITIES, &priv->capabilities },
+ { NM_DEVICE_MANAGED, &priv->managed },
+ { NM_DEVICE_FIRMWARE_MISSING, &priv->firmware_missing },
+ { NM_DEVICE_IP4_CONFIG, &priv->ip4_config, NULL, NM_TYPE_IP4_CONFIG },
+ { NM_DEVICE_DHCP4_CONFIG, &priv->dhcp4_config, NULL, NM_TYPE_DHCP4_CONFIG },
+ { NM_DEVICE_IP6_CONFIG, &priv->ip6_config, NULL, NM_TYPE_IP6_CONFIG },
+ { NM_DEVICE_DHCP6_CONFIG, &priv->dhcp6_config, NULL, NM_TYPE_DHCP6_CONFIG },
+ { NM_DEVICE_STATE, &priv->state },
+ { NM_DEVICE_STATE_REASON, &priv->state, demarshal_state_reason },
+ { NM_DEVICE_ACTIVE_CONNECTION, &priv->active_connection, NULL, NM_TYPE_ACTIVE_CONNECTION },
+
+ /* Properties that exist in D-Bus but that we don't track */
+ { "ip4-address", NULL },
+ { "device-type", NULL },
+
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (device),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (device),
+ priv->proxy,
+ property_info);
}
static void
@@ -325,39 +183,68 @@ device_state_changed (DBusGProxy *proxy,
gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- if (priv->state != new_state) {
- priv->state = new_state;
+ if (old_state != new_state) {
+ /* Update state here since the PropertyChanged signal for state
+ * might come in a bit later, but a client might ask for the
+ * state via nm_device_get_state() as a result of this signal.
+ * When the PC signal does come in that will trigger the glib
+ * property notify signal so we don't need to do that here.
+ */
+ NM_DEVICE_GET_PRIVATE (self)->state = new_state;
g_signal_emit (self, signals[STATE_CHANGED], 0, new_state, old_state, reason);
- _nm_object_queue_notify (NM_OBJECT (self), "state");
}
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static GType
+_nm_device_gtype_from_dtype (NMDeviceType dtype)
+{
+ switch (dtype) {
+ case NM_DEVICE_TYPE_ETHERNET:
+ return NM_TYPE_DEVICE_ETHERNET;
+ case NM_DEVICE_TYPE_WIFI:
+ return NM_TYPE_DEVICE_WIFI;
+ case NM_DEVICE_TYPE_MODEM:
+ return NM_TYPE_DEVICE_MODEM;
+ case NM_DEVICE_TYPE_BT:
+ return NM_TYPE_DEVICE_BT;
+ case NM_DEVICE_TYPE_OLPC_MESH:
+ return NM_TYPE_DEVICE_OLPC_MESH;
+ case NM_DEVICE_TYPE_WIMAX:
+ return NM_TYPE_DEVICE_WIMAX;
+ case NM_DEVICE_TYPE_INFINIBAND:
+ return NM_TYPE_DEVICE_INFINIBAND;
+ case NM_DEVICE_TYPE_BOND:
+ return NM_TYPE_DEVICE_BOND;
+ case NM_DEVICE_TYPE_VLAN:
+ return NM_TYPE_DEVICE_VLAN;
+ default:
+ g_warning ("Unknown device type %d", dtype);
+ return G_TYPE_INVALID;
+ }
+}
+
+static void
+constructed (GObject *object)
{
- NMObject *object;
NMDevicePrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_device_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_device_parent_class)->constructed (object);
priv = NM_DEVICE_GET_PRIVATE (object);
+ /* Catch failure of subclasses to call _nm_device_set_device_type() */
+ g_warn_if_fail (priv->device_type != NM_DEVICE_TYPE_UNKNOWN);
+ /* Catch a subclass setting the wrong type */
+ g_warn_if_fail (G_OBJECT_TYPE (object) == _nm_device_gtype_from_dtype (priv->device_type));
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (object),
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DEVICE);
- register_for_property_changed (NM_DEVICE (object));
+ register_properties (NM_DEVICE (object));
- dbus_g_object_register_marshaller (_nm_marshal_VOID__UINT_UINT_UINT,
+ dbus_g_object_register_marshaller (_nm_glib_marshal_VOID__UINT_UINT_UINT,
G_TYPE_NONE,
G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT,
G_TYPE_INVALID);
@@ -371,8 +258,6 @@ constructor (GType type,
G_CALLBACK (device_state_changed),
NM_DEVICE (object),
NULL);
-
- return G_OBJECT (object);
}
static void
@@ -426,6 +311,7 @@ get_property (GObject *object,
GParamSpec *pspec)
{
NMDevice *device = NM_DEVICE (object);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
switch (prop_id) {
case PROP_DEVICE_TYPE:
@@ -467,6 +353,14 @@ get_property (GObject *object,
case PROP_STATE:
g_value_set_uint (value, nm_device_get_state (device));
break;
+ case PROP_STATE_REASON:
+ g_value_set_boxed (value,
+ dbus_g_type_specialized_construct (DBUS_G_TYPE_UINT_STRUCT));
+ dbus_g_type_struct_set (value,
+ 0, priv->state,
+ 1, priv->reason,
+ G_MAXUINT);
+ break;
case PROP_ACTIVE_CONNECTION:
g_value_set_object (value, nm_device_get_active_connection (device));
break;
@@ -510,7 +404,7 @@ nm_device_class_init (NMDeviceClass *device_class)
g_type_class_add_private (device_class, sizeof (NMDevicePrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->set_property = set_property;
object_class->dispose = dispose;
@@ -556,7 +450,7 @@ nm_device_class_init (NMDeviceClass *device_class)
"Device Type",
"Numeric device type (ie ethernet, wifi, etc)",
NM_DEVICE_TYPE_UNKNOWN, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_READABLE));
/**
* NMDevice:udi:
*
@@ -694,6 +588,19 @@ nm_device_class_init (NMDeviceClass *device_class)
G_PARAM_READABLE));
/**
+ * NMDevice:state-reason:
+ *
+ * The state and reason of the device.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_STATE_REASON,
+ g_param_spec_boxed (NM_DEVICE_STATE_REASON,
+ "StateReason",
+ "StateReason",
+ DBUS_G_TYPE_UINT_STRUCT,
+ G_PARAM_READABLE));
+
+ /**
* NMDevice:active-connection:
*
* The #NMActiveConnection object that "owns" this device during activation.
@@ -747,40 +654,50 @@ nm_device_class_init (NMDeviceClass *device_class)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMDeviceClass, state_changed),
NULL, NULL,
- _nm_marshal_VOID__UINT_UINT_UINT,
+ _nm_glib_marshal_VOID__UINT_UINT_UINT,
G_TYPE_NONE, 3,
G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
}
/**
- * nm_device_new:
- * @connection: the #DBusGConnection
- * @path: the DBus object path of the device
- *
- * Creates a new #NMDevice.
+ * _nm_device_set_device_type:
+ * @device: the device
+ * @dtype: the NM device type
*
- * Returns: (transfer full): a new device
+ * Sets the NM device type if it wasn't set during construction. INTERNAL
+ * ONLY METHOD.
**/
-GObject *
-nm_device_new (DBusGConnection *connection, const char *path)
+void
+_nm_device_set_device_type (NMDevice *device, NMDeviceType dtype)
+{
+ NMDevicePrivate *priv;
+
+ g_return_if_fail (device != NULL);
+ g_return_if_fail (dtype != NM_DEVICE_TYPE_UNKNOWN);
+
+ priv = NM_DEVICE_GET_PRIVATE (device);
+ if (priv->device_type == NM_DEVICE_TYPE_UNKNOWN)
+ priv->device_type = dtype;
+ else
+ g_warn_if_fail (dtype == priv->device_type);
+}
+
+static GType
+_nm_device_type_for_path (DBusGConnection *connection,
+ const char *path)
{
DBusGProxy *proxy;
GError *err = NULL;
GValue value = {0,};
- GType dtype = 0;
- NMDevice *device = NULL;
NMDeviceType nm_dtype;
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (path != NULL, NULL);
-
proxy = dbus_g_proxy_new_for_name (connection,
NM_DBUS_SERVICE,
path,
"org.freedesktop.DBus.Properties");
if (!proxy) {
g_warning ("%s: couldn't create D-Bus object proxy.", __func__);
- return NULL;
+ return G_TYPE_INVALID;
}
if (!dbus_g_proxy_call (proxy,
@@ -789,44 +706,100 @@ nm_device_new (DBusGConnection *connection, const char *path)
G_TYPE_STRING, "DeviceType",
G_TYPE_INVALID,
G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
+ g_object_unref (proxy);
g_warning ("Error in get_property: %s\n", err->message);
g_error_free (err);
- goto out;
}
+ g_object_unref (proxy);
nm_dtype = g_value_get_uint (&value);
- switch (nm_dtype) {
- case NM_DEVICE_TYPE_ETHERNET:
- dtype = NM_TYPE_DEVICE_ETHERNET;
- break;
- case NM_DEVICE_TYPE_WIFI:
- dtype = NM_TYPE_DEVICE_WIFI;
- break;
- case NM_DEVICE_TYPE_MODEM:
- dtype = NM_TYPE_DEVICE_MODEM;
- break;
- case NM_DEVICE_TYPE_BT:
- dtype = NM_TYPE_DEVICE_BT;
- break;
- case NM_DEVICE_TYPE_WIMAX:
- dtype = NM_TYPE_DEVICE_WIMAX;
- break;
- default:
- g_warning ("Unknown device type %d", g_value_get_uint (&value));
- break;
- }
+ return _nm_device_gtype_from_dtype (nm_dtype);
+}
- if (dtype) {
- device = (NMDevice *) g_object_new (dtype,
- NM_OBJECT_DBUS_CONNECTION, connection,
- NM_OBJECT_DBUS_PATH, path,
- NM_DEVICE_DEVICE_TYPE, nm_dtype,
- NULL);
+/**
+ * nm_device_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDevice.
+ *
+ * Returns: (transfer full): a new device
+ **/
+GObject *
+nm_device_new (DBusGConnection *connection, const char *path)
+{
+ GType dtype;
+ NMDevice *device = NULL;
+
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ dtype = _nm_device_type_for_path (connection, path);
+ if (dtype == G_TYPE_INVALID)
+ return NULL;
+
+ device = (NMDevice *) g_object_new (dtype,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return G_OBJECT (device);
+}
+
+typedef struct {
+ DBusGConnection *connection;
+ NMObjectTypeCallbackFunc callback;
+ gpointer user_data;
+} NMDeviceAsyncData;
+
+static void
+async_got_type (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
+{
+ NMDeviceAsyncData *async_data = user_data;
+ GValue value = G_VALUE_INIT;
+ const char *path = dbus_g_proxy_get_path (proxy);
+ GError *error = NULL;
+ GType type;
+
+ if (dbus_g_proxy_end_call (proxy, call, &error,
+ G_TYPE_VALUE, &value,
+ G_TYPE_INVALID)) {
+ NMDeviceType dtype;
+
+ dtype = g_value_get_uint (&value);
+ type = _nm_device_gtype_from_dtype (dtype);
+ } else {
+ g_warning ("%s: could not read properties for %s: %s", __func__, path, error->message);
+ g_error_free (error);
+ type = G_TYPE_INVALID;
}
-out:
+ async_data->callback (type, async_data->user_data);
g_object_unref (proxy);
- return G_OBJECT (device);
+ g_slice_free (NMDeviceAsyncData, async_data);
+}
+
+static void
+_nm_device_type_for_path_async (DBusGConnection *connection,
+ const char *path,
+ NMObjectTypeCallbackFunc callback,
+ gpointer user_data)
+{
+ NMDeviceAsyncData *async_data;
+ DBusGProxy *proxy;
+
+ async_data = g_slice_new (NMDeviceAsyncData);
+ async_data->connection = connection;
+ async_data->callback = callback;
+ async_data->user_data = user_data;
+
+ proxy = dbus_g_proxy_new_for_name (connection, NM_DBUS_SERVICE, path,
+ "org.freedesktop.DBus.Properties");
+ dbus_g_proxy_begin_call (proxy, "Get",
+ async_got_type, async_data, NULL,
+ G_TYPE_STRING, NM_DBUS_INTERFACE_DEVICE,
+ G_TYPE_STRING, "DeviceType",
+ G_TYPE_INVALID);
}
/**
@@ -841,19 +814,10 @@ out:
const char *
nm_device_get_iface (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->iface) {
- priv->iface = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Interface",
- NULL);
- }
-
- return priv->iface;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->iface;
}
/**
@@ -869,19 +833,10 @@ nm_device_get_iface (NMDevice *device)
const char *
nm_device_get_ip_iface (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->ip_iface) {
- priv->ip_iface = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "IpInterface",
- NULL);
- }
-
- return priv->ip_iface;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->ip_iface;
}
/**
@@ -913,19 +868,10 @@ nm_device_get_device_type (NMDevice *self)
const char *
nm_device_get_udi (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->udi) {
- priv->udi = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Udi",
- NULL);
- }
-
- return priv->udi;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->udi;
}
/**
@@ -940,19 +886,10 @@ nm_device_get_udi (NMDevice *device)
const char *
nm_device_get_driver (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->driver) {
- priv->driver = _nm_object_get_string_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Driver",
- NULL);
- }
-
- return priv->driver;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->driver;
}
/**
@@ -966,19 +903,10 @@ nm_device_get_driver (NMDevice *device)
NMDeviceCapabilities
nm_device_get_capabilities (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), 0);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->capabilities) {
- priv->capabilities = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Capabilities",
- NULL);
- }
-
- return priv->capabilities;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->capabilities;
}
/**
@@ -992,19 +920,10 @@ nm_device_get_capabilities (NMDevice *device)
gboolean
nm_device_get_managed (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), 0);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->managed) {
- priv->managed = _nm_object_get_boolean_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Managed",
- NULL);
- }
-
- return priv->managed;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->managed;
}
/**
@@ -1020,19 +939,10 @@ nm_device_get_managed (NMDevice *device)
gboolean
nm_device_get_firmware_missing (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), 0);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (!priv->firmware_missing) {
- priv->firmware_missing = _nm_object_get_boolean_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "FirmwareMissing",
- NULL);
- }
-
- return priv->firmware_missing;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->firmware_missing;
}
/**
@@ -1046,30 +956,10 @@ nm_device_get_firmware_missing (NMDevice *device)
NMIP4Config *
nm_device_get_ip4_config (NMDevice *device)
{
- NMDevicePrivate *priv;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (priv->got_ip4_config == TRUE)
- return priv->ip4_config;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Ip4Config",
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_ip4_config (NM_OBJECT (device), NULL, &value, &priv->ip4_config);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->ip4_config;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->ip4_config;
}
/**
@@ -1084,30 +974,10 @@ nm_device_get_ip4_config (NMDevice *device)
NMDHCP4Config *
nm_device_get_dhcp4_config (NMDevice *device)
{
- NMDevicePrivate *priv;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (priv->got_dhcp4_config == TRUE)
- return priv->dhcp4_config;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Dhcp4Config",
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_dhcp4_config (NM_OBJECT (device), NULL, &value, &priv->dhcp4_config);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->dhcp4_config;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->dhcp4_config;
}
/**
@@ -1121,30 +991,10 @@ nm_device_get_dhcp4_config (NMDevice *device)
NMIP6Config *
nm_device_get_ip6_config (NMDevice *device)
{
- NMDevicePrivate *priv;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (priv->got_ip6_config == TRUE)
- return priv->ip6_config;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Ip6Config",
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_ip6_config (NM_OBJECT (device), NULL, &value, &priv->ip6_config);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->ip6_config;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->ip6_config;
}
/**
@@ -1159,30 +1009,10 @@ nm_device_get_ip6_config (NMDevice *device)
NMDHCP6Config *
nm_device_get_dhcp6_config (NMDevice *device)
{
- NMDevicePrivate *priv;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (priv->got_dhcp6_config == TRUE)
- return priv->dhcp6_config;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "Dhcp6Config",
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_dhcp6_config (NM_OBJECT (device), NULL, &value, &priv->dhcp6_config);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->dhcp6_config;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->dhcp6_config;
}
/**
@@ -1196,19 +1026,31 @@ nm_device_get_dhcp6_config (NMDevice *device)
NMDeviceState
nm_device_get_state (NMDevice *device)
{
- NMDevicePrivate *priv;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NM_DEVICE_STATE_UNKNOWN);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (priv->state == NM_DEVICE_STATE_UNKNOWN) {
- priv->state = _nm_object_get_uint_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "State",
- NULL);
- }
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->state;
+}
- return priv->state;
+/**
+ * nm_device_get_state_reason:
+ * @device: a #NMDevice
+ * @reason: (out) (allow-none): location to store reason (#NMDeviceStateReason), or NULL
+ *
+ * Gets the current #NMDevice state (return value) and the reason for entering
+ * the state (@reason argument).
+ *
+ * Returns: the current device state
+ **/
+NMDeviceState
+nm_device_get_state_reason (NMDevice *device, NMDeviceStateReason *reason)
+{
+ g_return_val_if_fail (NM_IS_DEVICE (device), NM_DEVICE_STATE_UNKNOWN);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ if (reason)
+ *reason = NM_DEVICE_GET_PRIVATE (device)->reason;
+ return NM_DEVICE_GET_PRIVATE (device)->state;
}
/**
@@ -1223,30 +1065,10 @@ nm_device_get_state (NMDevice *device)
NMActiveConnection *
nm_device_get_active_connection (NMDevice *device)
{
- NMDevicePrivate *priv;
- char *path;
- GValue value = { 0, };
- GError *error = NULL;
-
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- priv = NM_DEVICE_GET_PRIVATE (device);
- if (priv->got_active_connection == TRUE)
- return priv->active_connection;
-
- path = _nm_object_get_object_path_property (NM_OBJECT (device),
- NM_DBUS_INTERFACE_DEVICE,
- "ActiveConnection",
- &error);
- if (error == NULL) {
- g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
- g_value_take_boxed (&value, path);
- demarshal_active_connection (NM_OBJECT (device), NULL, &value, &priv->active_connection);
- g_value_unset (&value);
- }
- g_clear_error (&error);
-
- return priv->active_connection;
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->active_connection;
}
/* From hostap, Copyright (c) 2002-2005, Jouni Malinen <jkmaline@cc.hut.fi> */
@@ -1453,11 +1275,14 @@ typedef struct {
static void
deactivate_cb (DBusGProxy *proxy,
- GError *error,
+ DBusGProxyCall *call,
gpointer user_data)
{
DeactivateInfo *info = user_data;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error,
+ G_TYPE_INVALID);
if (info->fn)
info->fn (info->device, error, info->user_data);
else if (error) {
@@ -1467,6 +1292,7 @@ deactivate_cb (DBusGProxy *proxy,
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
}
+ g_clear_error (&error);
g_object_unref (info->device);
g_slice_free (DeactivateInfo, info);
@@ -1497,9 +1323,9 @@ nm_device_disconnect (NMDevice *device,
info->user_data = user_data;
info->device = g_object_ref (device);
- org_freedesktop_NetworkManager_Device_disconnect_async (NM_DEVICE_GET_PRIVATE (device)->proxy,
- deactivate_cb,
- info);
+ dbus_g_proxy_begin_call (NM_DEVICE_GET_PRIVATE (device)->proxy, "Disconnect",
+ deactivate_cb, info, NULL,
+ G_TYPE_INVALID);
}
/**
@@ -1521,8 +1347,35 @@ nm_device_disconnect (NMDevice *device,
gboolean
nm_device_connection_valid (NMDevice *device, NMConnection *connection)
{
- if (NM_DEVICE_GET_CLASS (device)->connection_valid)
- return NM_DEVICE_GET_CLASS (device)->connection_valid (device, connection);
+ return nm_device_connection_compatible (device, connection, NULL);
+}
+
+/**
+ * nm_device_connection_compatible:
+ * @device: an #NMDevice to validate @connection against
+ * @connection: an #NMConnection to validate against @device
+ * @error: return location for a #GError, or %NULL
+ *
+ * Validates a given connection for a given #NMDevice object and returns
+ * whether the connection may be activated with the device. For example if
+ * @device is a WiFi device that supports only WEP encryption, the connection
+ * will only be valid if it is a WiFi connection which describes a WEP or open
+ * network, and will not be valid if it describes a WPA network, or if it is
+ * an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the
+ * device.
+ *
+ * This function does the same as nm_device_connection_valid(), i.e. checking
+ * compatibility of the given device and connection. But, in addition, it sets
+ * GError when FALSE is returned.
+ *
+ * Returns: %TRUE if the connection may be activated with this device, %FALSE
+ * if is incompatible with the device's capabilities and characteristics.
+ **/
+gboolean
+nm_device_connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
+{
+ if (NM_DEVICE_GET_CLASS (device)->connection_compatible)
+ return NM_DEVICE_GET_CLASS (device)->connection_compatible (device, connection, error);
return FALSE;
}
@@ -1537,7 +1390,8 @@ nm_device_connection_valid (NMDevice *device, NMConnection *connection)
* contain any WiFi connections in @connections that allow connection to
* unencrypted or WEP-enabled SSIDs. The returned list will not contain
* Ethernet, Bluetooth, WiFi WPA connections, or any other connection that is
- * incompatible with the device.
+ * incompatible with the device. To get the full list of connections see
+ * nm_remote_settings_list_connections().
*
* Returns: (transfer container) (element-type NetworkManager.Connection): a
* list of #NMConnection objects that could be activated with the given @device.
diff --git a/libnm-glib/nm-device.h b/libnm-glib/nm-device.h
index e21e71b12..50301dc93 100644
--- a/libnm-glib/nm-device.h
+++ b/libnm-glib/nm-device.h
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_DEVICE_H
@@ -58,6 +58,7 @@ G_BEGIN_DECLS
#define NM_DEVICE_IP6_CONFIG "ip6-config"
#define NM_DEVICE_DHCP6_CONFIG "dhcp6-config"
#define NM_DEVICE_STATE "state"
+#define NM_DEVICE_STATE_REASON "state-reason"
#define NM_DEVICE_ACTIVE_CONNECTION "active-connection"
#define NM_DEVICE_VENDOR "vendor"
#define NM_DEVICE_PRODUCT "product"
@@ -75,8 +76,9 @@ typedef struct {
NMDeviceState old_state,
NMDeviceStateReason reason);
- gboolean (*connection_valid) (NMDevice *device,
- NMConnection *connection);
+ gboolean (*connection_compatible) (NMDevice *device,
+ NMConnection *connection,
+ GError **error);
/* Padding for future expansion */
void (*_reserved1) (void);
@@ -104,6 +106,7 @@ NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *device);
NMIP6Config * nm_device_get_ip6_config (NMDevice *device);
NMDHCP6Config * nm_device_get_dhcp6_config (NMDevice *device);
NMDeviceState nm_device_get_state (NMDevice *device);
+NMDeviceState nm_device_get_state_reason (NMDevice *device, NMDeviceStateReason *reason);
NMActiveConnection * nm_device_get_active_connection(NMDevice *device);
const char * nm_device_get_product (NMDevice *device);
const char * nm_device_get_vendor (NMDevice *device);
@@ -120,6 +123,10 @@ GSList * nm_device_filter_connections (NMDevice *device,
gboolean nm_device_connection_valid (NMDevice *device,
NMConnection *connection);
+gboolean nm_device_connection_compatible (NMDevice *device,
+ NMConnection *connection,
+ GError **error);
+
G_END_DECLS
#endif /* NM_DEVICE_H */
diff --git a/libnm-glib/nm-dhcp4-config.c b/libnm-glib/nm-dhcp4-config.c
index 8299de029..2074e6d11 100644
--- a/libnm-glib/nm-dhcp4-config.c
+++ b/libnm-glib/nm-dhcp4-config.c
@@ -77,47 +77,38 @@ demarshal_dhcp4_options (NMObject *object, GParamSpec *pspec, GValue *value, gpo
}
static void
-register_for_property_changed (NMDHCP4Config *config)
+register_properties (NMDHCP4Config *config)
{
NMDHCP4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (config);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DHCP4_CONFIG_OPTIONS, demarshal_dhcp4_options, &priv->options },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DHCP4_CONFIG_OPTIONS, &priv->options, demarshal_dhcp4_options },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (config),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (config),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- NMObject *object;
DBusGConnection *connection;
NMDHCP4ConfigPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_dhcp4_config_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_dhcp4_config_parent_class)->constructed (object);
priv = NM_DHCP4_CONFIG_GET_PRIVATE (object);
priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
- connection = nm_object_get_connection (object);
+ connection = nm_object_get_connection (NM_OBJECT (object));
priv->proxy = dbus_g_proxy_new_for_name (connection,
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DHCP4_CONFIG);
- register_for_property_changed (NM_DHCP4_CONFIG (object));
-
- return G_OBJECT (object);
+ register_properties (NM_DHCP4_CONFIG (object));
}
static void
@@ -159,7 +150,7 @@ nm_dhcp4_config_class_init (NMDHCP4ConfigClass *config_class)
g_type_class_add_private (config_class, sizeof (NMDHCP4ConfigPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->finalize = finalize;
@@ -212,24 +203,10 @@ nm_dhcp4_config_new (DBusGConnection *connection, const char *object_path)
GHashTable *
nm_dhcp4_config_get_options (NMDHCP4Config *config)
{
- NMDHCP4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (config);
- GValue value = { 0, };
-
- if (g_hash_table_size (priv->options))
- return priv->options;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_DHCP4_CONFIG,
- "Options",
- &value,
- NULL))
- goto out;
-
- demarshal_dhcp4_options (NM_OBJECT (config), NULL, &value, &priv->options);
- g_value_unset (&value);
+ g_return_val_if_fail (NM_IS_DHCP4_CONFIG (config), NULL);
-out:
- return priv->options;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_DHCP4_CONFIG_GET_PRIVATE (config)->options;
}
/**
diff --git a/libnm-glib/nm-dhcp6-config.c b/libnm-glib/nm-dhcp6-config.c
index 00698ed54..3764cbf08 100644
--- a/libnm-glib/nm-dhcp6-config.c
+++ b/libnm-glib/nm-dhcp6-config.c
@@ -77,47 +77,38 @@ demarshal_dhcp6_options (NMObject *object, GParamSpec *pspec, GValue *value, gpo
}
static void
-register_for_property_changed (NMDHCP6Config *config)
+register_properties (NMDHCP6Config *config)
{
NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (config);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DHCP6_CONFIG_OPTIONS, demarshal_dhcp6_options, &priv->options },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DHCP6_CONFIG_OPTIONS, &priv->options, demarshal_dhcp6_options },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (config),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (config),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- NMObject *object;
DBusGConnection *connection;
NMDHCP6ConfigPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_dhcp6_config_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_dhcp6_config_parent_class)->constructed (object);
priv = NM_DHCP6_CONFIG_GET_PRIVATE (object);
priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
- connection = nm_object_get_connection (object);
+ connection = nm_object_get_connection (NM_OBJECT (object));
priv->proxy = dbus_g_proxy_new_for_name (connection,
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DHCP6_CONFIG);
- register_for_property_changed (NM_DHCP6_CONFIG (object));
-
- return G_OBJECT (object);
+ register_properties (NM_DHCP6_CONFIG (object));
}
static void
@@ -159,7 +150,7 @@ nm_dhcp6_config_class_init (NMDHCP6ConfigClass *config_class)
g_type_class_add_private (config_class, sizeof (NMDHCP6ConfigPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->finalize = finalize;
@@ -212,24 +203,10 @@ nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path)
GHashTable *
nm_dhcp6_config_get_options (NMDHCP6Config *config)
{
- NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (config);
- GValue value = { 0, };
-
- if (g_hash_table_size (priv->options))
- return priv->options;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_DHCP6_CONFIG,
- "Options",
- &value,
- NULL))
- goto out;
-
- demarshal_dhcp6_options (NM_OBJECT (config), NULL, &value, &priv->options);
- g_value_unset (&value);
+ g_return_val_if_fail (NM_IS_DHCP6_CONFIG (config), NULL);
-out:
- return priv->options;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_DHCP6_CONFIG_GET_PRIVATE (config)->options;
}
/**
diff --git a/libnm-glib/nm-glib-enum-types.c b/libnm-glib/nm-glib-enum-types.c
new file mode 100644
index 000000000..9fc4de96a
--- /dev/null
+++ b/libnm-glib/nm-glib-enum-types.c
@@ -0,0 +1,367 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#include "nm-glib-enum-types.h"
+
+#include "nm-object.h"
+#include "nm-client.h"
+#include "nm-device.h"
+#include "nm-device-ethernet.h"
+#include "nm-device-infiniband.h"
+#include "nm-device-wifi.h"
+#include "nm-device-bt.h"
+#include "nm-device-olpc-mesh.h"
+#include "nm-device-bond.h"
+#include "nm-device-vlan.h"
+#include "nm-access-point.h"
+#include "nm-ip4-config.h"
+#include "nm-device-modem.h"
+#include "nm-vpn-connection.h"
+#include "nm-types.h"
+#include "nm-active-connection.h"
+#include "nm-dhcp4-config.h"
+#include "nm-ip6-config.h"
+#include "nm-dhcp6-config.h"
+#include "nm-remote-connection.h"
+#include "nm-remote-settings.h"
+#include "nm-secret-agent.h"
+#include "nm-device-wimax.h"
+#include "nm-wimax-nsp.h"
+
+GType
+nm_client_permission_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_CLIENT_PERMISSION_NONE, "NM_CLIENT_PERMISSION_NONE", "none" },
+ { NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK, "NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK", "enable-disable-network" },
+ { NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI, "NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI", "enable-disable-wifi" },
+ { NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN, "NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN", "enable-disable-wwan" },
+ { NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX, "NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX", "enable-disable-wimax" },
+ { NM_CLIENT_PERMISSION_SLEEP_WAKE, "NM_CLIENT_PERMISSION_SLEEP_WAKE", "sleep-wake" },
+ { NM_CLIENT_PERMISSION_NETWORK_CONTROL, "NM_CLIENT_PERMISSION_NETWORK_CONTROL", "network-control" },
+ { NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED, "NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED", "wifi-share-protected" },
+ { NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN, "NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN", "wifi-share-open" },
+ { NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM, "NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM", "settings-modify-system" },
+ { NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN, "NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN", "settings-modify-own" },
+ { NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME, "NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME", "settings-modify-hostname" },
+ { NM_CLIENT_PERMISSION_LAST, "NM_CLIENT_PERMISSION_LAST", "last" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMClientPermission"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_client_permission_result_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_CLIENT_PERMISSION_RESULT_UNKNOWN, "NM_CLIENT_PERMISSION_RESULT_UNKNOWN", "unknown" },
+ { NM_CLIENT_PERMISSION_RESULT_YES, "NM_CLIENT_PERMISSION_RESULT_YES", "yes" },
+ { NM_CLIENT_PERMISSION_RESULT_AUTH, "NM_CLIENT_PERMISSION_RESULT_AUTH", "auth" },
+ { NM_CLIENT_PERMISSION_RESULT_NO, "NM_CLIENT_PERMISSION_RESULT_NO", "no" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMClientPermissionResult"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_ethernet_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_ETHERNET_ERROR_UNKNOWN, "NM_DEVICE_ETHERNET_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION, "NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION", "NotEthernetConnection" },
+ { NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION, "NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION", "InvalidEthernetConnection" },
+ { NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC, "NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC", "InvalidDeviceMac" },
+ { NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH, "NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH", "MacMismatch" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceEthernetError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_infiniband_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_INFINIBAND_ERROR_UNKNOWN, "NM_DEVICE_INFINIBAND_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION, "NM_DEVICE_INFINIBAND_ERROR_NOT_INFINIBAND_CONNECTION", "NotInfinibandConnection" },
+ { NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION, "NM_DEVICE_INFINIBAND_ERROR_INVALID_INFINIBAND_CONNECTION", "InvalidInfinibandConnection" },
+ { NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC, "NM_DEVICE_INFINIBAND_ERROR_INVALID_DEVICE_MAC", "InvalidDeviceMac" },
+ { NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH, "NM_DEVICE_INFINIBAND_ERROR_MAC_MISMATCH", "MacMismatch" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceInfinibandError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_wifi_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_WIFI_ERROR_UNKNOWN, "NM_DEVICE_WIFI_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_WIFI_ERROR_NOT_WIFI_CONNECTION, "NM_DEVICE_WIFI_ERROR_NOT_WIFI_CONNECTION", "NotWifiConnection" },
+ { NM_DEVICE_WIFI_ERROR_INVALID_WIFI_CONNECTION, "NM_DEVICE_WIFI_ERROR_INVALID_WIFI_CONNECTION", "InvalidWifiConnection" },
+ { NM_DEVICE_WIFI_ERROR_INVALID_DEVICE_MAC, "NM_DEVICE_WIFI_ERROR_INVALID_DEVICE_MAC", "InvalidDeviceMac" },
+ { NM_DEVICE_WIFI_ERROR_MAC_MISMATCH, "NM_DEVICE_WIFI_ERROR_MAC_MISMATCH", "MacMismatch" },
+ { NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_WPA_CAPS, "NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_WPA_CAPS", "MissingDeviceWpaCaps" },
+ { NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_RSN_CAPS, "NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_RSN_CAPS", "MissingDeviceRsnCaps" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceWifiError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_bt_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_BT_ERROR_UNKNOWN, "NM_DEVICE_BT_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_BT_ERROR_NOT_BT_CONNECTION, "NM_DEVICE_BT_ERROR_NOT_BT_CONNECTION", "NotBtConnection" },
+ { NM_DEVICE_BT_ERROR_INVALID_BT_CONNECTION, "NM_DEVICE_BT_ERROR_INVALID_BT_CONNECTION", "InvalidBtConnection" },
+ { NM_DEVICE_BT_ERROR_INVALID_DEVICE_MAC, "NM_DEVICE_BT_ERROR_INVALID_DEVICE_MAC", "InvalidDeviceMac" },
+ { NM_DEVICE_BT_ERROR_MAC_MISMATCH, "NM_DEVICE_BT_ERROR_MAC_MISMATCH", "MacMismatch" },
+ { NM_DEVICE_BT_ERROR_MISSING_DEVICE_CAPS, "NM_DEVICE_BT_ERROR_MISSING_DEVICE_CAPS", "MissingDeviceCaps" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceBtError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_olpc_mesh_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_OLPC_MESH_ERROR_UNKNOWN, "NM_DEVICE_OLPC_MESH_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_OLPC_MESH_ERROR_NOT_OLPC_MESH_CONNECTION, "NM_DEVICE_OLPC_MESH_ERROR_NOT_OLPC_MESH_CONNECTION", "NotOlpcMeshConnection" },
+ { NM_DEVICE_OLPC_MESH_ERROR_INVALID_OLPC_MESH_CONNECTION, "NM_DEVICE_OLPC_MESH_ERROR_INVALID_OLPC_MESH_CONNECTION", "InvalidOlpcMeshConnection" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceOlpcMeshError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_bond_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_BOND_ERROR_UNKNOWN, "NM_DEVICE_BOND_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION, "NM_DEVICE_BOND_ERROR_NOT_BOND_CONNECTION", "NotBondConnection" },
+ { NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION, "NM_DEVICE_BOND_ERROR_INVALID_BOND_CONNECTION", "InvalidBondConnection" },
+ { NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH, "NM_DEVICE_BOND_ERROR_INTERFACE_MISMATCH", "InterfaceMismatch" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceBondError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_vlan_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_VLAN_ERROR_UNKNOWN, "NM_DEVICE_VLAN_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_VLAN_ERROR_NOT_VLAN_CONNECTION, "NM_DEVICE_VLAN_ERROR_NOT_VLAN_CONNECTION", "NotVlanConnection" },
+ { NM_DEVICE_VLAN_ERROR_INVALID_VLAN_CONNECTION, "NM_DEVICE_VLAN_ERROR_INVALID_VLAN_CONNECTION", "InvalidVlanConnection" },
+ { NM_DEVICE_VLAN_ERROR_ID_MISMATCH, "NM_DEVICE_VLAN_ERROR_ID_MISMATCH", "IdMismatch" },
+ { NM_DEVICE_VLAN_ERROR_INTERFACE_MISMATCH, "NM_DEVICE_VLAN_ERROR_INTERFACE_MISMATCH", "InterfaceMismatch" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceVlanError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_modem_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_MODEM_ERROR_UNKNOWN, "NM_DEVICE_MODEM_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_MODEM_ERROR_NOT_MODEM_CONNECTION, "NM_DEVICE_MODEM_ERROR_NOT_MODEM_CONNECTION", "NotModemConnection" },
+ { NM_DEVICE_MODEM_ERROR_INVALID_MODEM_CONNECTION, "NM_DEVICE_MODEM_ERROR_INVALID_MODEM_CONNECTION", "InvalidModemConnection" },
+ { NM_DEVICE_MODEM_ERROR_MISSING_DEVICE_CAPS, "NM_DEVICE_MODEM_ERROR_MISSING_DEVICE_CAPS", "MissingDeviceCaps" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceModemError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_remote_settings_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_REMOTE_SETTINGS_ERROR_UNKNOWN, "NM_REMOTE_SETTINGS_ERROR_UNKNOWN", "UnknownError" },
+ { NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED, "NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED", "ConnectionRemoved" },
+ { NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE, "NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE", "ConnectionUnavailable" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMRemoteSettingsError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_secret_agent_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED, "NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED", "NotAuthorized" },
+ { NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, "NM_SECRET_AGENT_ERROR_INVALID_CONNECTION", "InvalidConnection" },
+ { NM_SECRET_AGENT_ERROR_USER_CANCELED, "NM_SECRET_AGENT_ERROR_USER_CANCELED", "UserCanceled" },
+ { NM_SECRET_AGENT_ERROR_AGENT_CANCELED, "NM_SECRET_AGENT_ERROR_AGENT_CANCELED", "AgentCanceled" },
+ { NM_SECRET_AGENT_ERROR_INTERNAL_ERROR, "NM_SECRET_AGENT_ERROR_INTERNAL_ERROR", "InternalError" },
+ { NM_SECRET_AGENT_ERROR_NO_SECRETS, "NM_SECRET_AGENT_ERROR_NO_SECRETS", "NoSecrets" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSecretAgentError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_secret_agent_get_secrets_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE, "NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE", "none" },
+ { NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION, "NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION", "allow-interaction" },
+ { NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW, "NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW", "request-new" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSecretAgentGetSecretsFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_wimax_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_WIMAX_ERROR_UNKNOWN, "NM_DEVICE_WIMAX_ERROR_UNKNOWN", "UnknownError" },
+ { NM_DEVICE_WIMAX_ERROR_NOT_WIMAX_CONNECTION, "NM_DEVICE_WIMAX_ERROR_NOT_WIMAX_CONNECTION", "NotWimaxConnection" },
+ { NM_DEVICE_WIMAX_ERROR_INVALID_WIMAX_CONNECTION, "NM_DEVICE_WIMAX_ERROR_INVALID_WIMAX_CONNECTION", "InvalidWimaxConnection" },
+ { NM_DEVICE_WIMAX_ERROR_INVALID_DEVICE_MAC, "NM_DEVICE_WIMAX_ERROR_INVALID_DEVICE_MAC", "InvalidDeviceMac" },
+ { NM_DEVICE_WIMAX_ERROR_MAC_MISMATCH, "NM_DEVICE_WIMAX_ERROR_MAC_MISMATCH", "MacMismatch" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceWimaxError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_wimax_nsp_network_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN, "NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN", "unknown" },
+ { NM_WIMAX_NSP_NETWORK_TYPE_HOME, "NM_WIMAX_NSP_NETWORK_TYPE_HOME", "home" },
+ { NM_WIMAX_NSP_NETWORK_TYPE_PARTNER, "NM_WIMAX_NSP_NETWORK_TYPE_PARTNER", "partner" },
+ { NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER, "NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER", "roaming-partner" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMWimaxNspNetworkType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+
+
diff --git a/libnm-glib/nm-glib-enum-types.h b/libnm-glib/nm-glib-enum-types.h
new file mode 100644
index 000000000..9aa5fa906
--- /dev/null
+++ b/libnm-glib/nm-glib-enum-types.h
@@ -0,0 +1,47 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#ifndef __NM_GLIB_ENUM_TYPES_H__
+#define __NM_GLIB_ENUM_TYPES_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+GType nm_client_permission_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_CLIENT_PERMISSION (nm_client_permission_get_type ())
+GType nm_client_permission_result_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_CLIENT_PERMISSION_RESULT (nm_client_permission_result_get_type ())
+GType nm_device_ethernet_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_ETHERNET_ERROR (nm_device_ethernet_error_get_type ())
+GType nm_device_infiniband_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_INFINIBAND_ERROR (nm_device_infiniband_error_get_type ())
+GType nm_device_wifi_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_WIFI_ERROR (nm_device_wifi_error_get_type ())
+GType nm_device_bt_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_BT_ERROR (nm_device_bt_error_get_type ())
+GType nm_device_olpc_mesh_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_OLPC_MESH_ERROR (nm_device_olpc_mesh_error_get_type ())
+GType nm_device_bond_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_BOND_ERROR (nm_device_bond_error_get_type ())
+GType nm_device_vlan_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_VLAN_ERROR (nm_device_vlan_error_get_type ())
+GType nm_device_modem_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_MODEM_ERROR (nm_device_modem_error_get_type ())
+GType nm_remote_settings_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_REMOTE_SETTINGS_ERROR (nm_remote_settings_error_get_type ())
+GType nm_secret_agent_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SECRET_AGENT_ERROR (nm_secret_agent_error_get_type ())
+GType nm_secret_agent_get_secrets_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SECRET_AGENT_GET_SECRETS_FLAGS (nm_secret_agent_get_secrets_flags_get_type ())
+GType nm_device_wimax_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_WIMAX_ERROR (nm_device_wimax_error_get_type ())
+GType nm_wimax_nsp_network_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_WIMAX_NSP_NETWORK_TYPE (nm_wimax_nsp_network_type_get_type ())
+G_END_DECLS
+
+#endif /* __NM_GLIB_ENUM_TYPES_H__ */
+
+
+
diff --git a/libnm-glib/nm-glib-marshal.c b/libnm-glib/nm-glib-marshal.c
new file mode 100644
index 000000000..a6ca01134
--- /dev/null
+++ b/libnm-glib/nm-glib-marshal.c
@@ -0,0 +1,167 @@
+#include "nm-glib-marshal.h"
+
+#include <glib-object.h>
+
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v) g_value_get_int (v)
+#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
+#define g_marshal_value_peek_long(v) g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
+#define g_marshal_value_peek_float(v) g_value_get_float (v)
+#define g_marshal_value_peek_double(v) g_value_get_double (v)
+#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v) g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v) g_value_get_object (v)
+#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ * Do not access GValues directly in your code. Instead, use the
+ * g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
+#define g_marshal_value_peek_char(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v) (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v) (v)->data[0].v_float
+#define g_marshal_value_peek_double(v) (v)->data[0].v_double
+#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+
+/* VOID:STRING,STRING,STRING (nm-glib-marshal.list:1) */
+void
+_nm_glib_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ data2);
+}
+
+/* VOID:UINT,UINT (nm-glib-marshal.list:2) */
+void
+_nm_glib_marshal_VOID__UINT_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1,
+ guint arg_1,
+ guint arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__UINT_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_uint (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ data2);
+}
+
+/* VOID:UINT,UINT,UINT (nm-glib-marshal.list:3) */
+void
+_nm_glib_marshal_VOID__UINT_UINT_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1,
+ guint arg_1,
+ guint arg_2,
+ guint arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__UINT_UINT_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_uint (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ g_marshal_value_peek_uint (param_values + 3),
+ data2);
+}
+
diff --git a/libnm-glib/nm-glib-marshal.h b/libnm-glib/nm-glib-marshal.h
new file mode 100644
index 000000000..53d8c06b2
--- /dev/null
+++ b/libnm-glib/nm-glib-marshal.h
@@ -0,0 +1,36 @@
+
+#ifndef ___nm_glib_marshal_MARSHAL_H__
+#define ___nm_glib_marshal_MARSHAL_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* VOID:STRING,STRING,STRING (nm-glib-marshal.list:1) */
+extern void _nm_glib_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:UINT,UINT (nm-glib-marshal.list:2) */
+extern void _nm_glib_marshal_VOID__UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:UINT,UINT,UINT (nm-glib-marshal.list:3) */
+extern void _nm_glib_marshal_VOID__UINT_UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+G_END_DECLS
+
+#endif /* ___nm_glib_marshal_MARSHAL_H__ */
+
diff --git a/libnm-glib/nm-ip4-config.c b/libnm-glib/nm-ip4-config.c
index a72fa8935..56678545e 100644
--- a/libnm-glib/nm-ip4-config.c
+++ b/libnm-glib/nm-ip4-config.c
@@ -115,49 +115,40 @@ demarshal_ip4_routes_array (NMObject *object, GParamSpec *pspec, GValue *value,
}
static void
-register_for_property_changed (NMIP4Config *config)
+register_properties (NMIP4Config *config)
{
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_IP4_CONFIG_ADDRESSES, demarshal_ip4_address_array, &priv->addresses },
- { NM_IP4_CONFIG_NAMESERVERS, demarshal_ip4_array, &priv->nameservers },
- { NM_IP4_CONFIG_DOMAINS, demarshal_domains, &priv->domains },
- { NM_IP4_CONFIG_ROUTES, demarshal_ip4_routes_array, &priv->routes },
- { NM_IP4_CONFIG_WINS_SERVERS, demarshal_ip4_array, &priv->wins },
+ const NMPropertiesInfo property_info[] = {
+ { NM_IP4_CONFIG_ADDRESSES, &priv->addresses, demarshal_ip4_address_array },
+ { NM_IP4_CONFIG_NAMESERVERS, &priv->nameservers, demarshal_ip4_array },
+ { NM_IP4_CONFIG_DOMAINS, &priv->domains, demarshal_domains },
+ { NM_IP4_CONFIG_ROUTES, &priv->routes, demarshal_ip4_routes_array },
+ { NM_IP4_CONFIG_WINS_SERVERS, &priv->wins, demarshal_ip4_array },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (config),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (config),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- NMObject *object;
DBusGConnection *connection;
NMIP4ConfigPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_ip4_config_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_ip4_config_parent_class)->constructed (object);
priv = NM_IP4_CONFIG_GET_PRIVATE (object);
- connection = nm_object_get_connection (object);
+ connection = nm_object_get_connection (NM_OBJECT (object));
priv->proxy = dbus_g_proxy_new_for_name (connection,
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_IP4_CONFIG);
- register_for_property_changed (NM_IP4_CONFIG (object));
-
- return G_OBJECT (object);
+ register_properties (NM_IP4_CONFIG (object));
}
static void
@@ -226,7 +217,7 @@ nm_ip4_config_class_init (NMIP4ConfigClass *config_class)
g_type_class_add_private (config_class, sizeof (NMIP4ConfigPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->finalize = finalize;
@@ -326,27 +317,10 @@ nm_ip4_config_new (DBusGConnection *connection, const char *object_path)
const GSList *
nm_ip4_config_get_addresses (NMIP4Config *config)
{
- NMIP4ConfigPrivate *priv;
- GValue value = { 0, };
-
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
- priv = NM_IP4_CONFIG_GET_PRIVATE (config);
- if (priv->addresses)
- return priv->addresses;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP4_CONFIG,
- "Addresses",
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_ip4_address_array (NM_OBJECT (config), NULL, &value, &priv->addresses);
- g_value_unset (&value);
-
- return priv->addresses;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP4_CONFIG_GET_PRIVATE (config)->addresses;
}
/**
@@ -361,29 +335,10 @@ nm_ip4_config_get_addresses (NMIP4Config *config)
const GArray *
nm_ip4_config_get_nameservers (NMIP4Config *config)
{
- NMIP4ConfigPrivate *priv;
- GArray *array = NULL;
- GValue value = {0,};
-
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
- priv = NM_IP4_CONFIG_GET_PRIVATE (config);
- if (!priv->nameservers) {
- if (_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP4_CONFIG,
- "Nameservers",
- &value,
- NULL)) {
- array = (GArray *) g_value_get_boxed (&value);
- if (array && array->len) {
- priv->nameservers = g_array_sized_new (FALSE, TRUE, sizeof (guint32), array->len);
- g_array_append_vals (priv->nameservers, array->data, array->len);
- }
- g_value_unset (&value);
- }
- }
-
- return priv->nameservers;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP4_CONFIG_GET_PRIVATE (config)->nameservers;
}
/**
@@ -398,32 +353,10 @@ nm_ip4_config_get_nameservers (NMIP4Config *config)
const GPtrArray *
nm_ip4_config_get_domains (NMIP4Config *config)
{
- NMIP4ConfigPrivate *priv;
- GValue value = {0,};
-
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
- priv = NM_IP4_CONFIG_GET_PRIVATE (config);
- if (priv->domains)
- return handle_ptr_array_return (priv->domains);
-
- if (_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP4_CONFIG,
- "Domains",
- &value,
- NULL)) {
- char **array = NULL, **p;
-
- array = (char **) g_value_get_boxed (&value);
- if (array && g_strv_length (array)) {
- priv->domains = g_ptr_array_sized_new (g_strv_length (array));
- for (p = array; *p; p++)
- g_ptr_array_add (priv->domains, g_strdup (*p));
- }
- g_value_unset (&value);
- }
-
- return handle_ptr_array_return (priv->domains);
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return handle_ptr_array_return (NM_IP4_CONFIG_GET_PRIVATE (config)->domains);
}
/**
@@ -438,29 +371,10 @@ nm_ip4_config_get_domains (NMIP4Config *config)
const GArray *
nm_ip4_config_get_wins_servers (NMIP4Config *config)
{
- NMIP4ConfigPrivate *priv;
- GArray *array = NULL;
- GValue value = {0,};
-
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
- priv = NM_IP4_CONFIG_GET_PRIVATE (config);
- if (!priv->wins) {
- if (_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP4_CONFIG,
- "WinsServers",
- &value,
- NULL)) {
- array = (GArray *) g_value_get_boxed (&value);
- if (array && array->len) {
- priv->wins = g_array_sized_new (FALSE, TRUE, sizeof (guint32), array->len);
- g_array_append_vals (priv->wins, array->data, array->len);
- }
- g_value_unset (&value);
- }
- }
-
- return priv->wins;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP4_CONFIG_GET_PRIVATE (config)->wins;
}
/**
@@ -476,26 +390,9 @@ nm_ip4_config_get_wins_servers (NMIP4Config *config)
const GSList *
nm_ip4_config_get_routes (NMIP4Config *config)
{
- NMIP4ConfigPrivate *priv;
- GValue value = { 0, };
-
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
- priv = NM_IP4_CONFIG_GET_PRIVATE (config);
- if (priv->routes)
- return priv->routes;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP4_CONFIG,
- "Routes",
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_ip4_routes_array (NM_OBJECT (config), NULL, &value, &priv->routes);
- g_value_unset (&value);
-
- return priv->routes;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP4_CONFIG_GET_PRIVATE (config)->routes;
}
diff --git a/libnm-glib/nm-ip6-config.c b/libnm-glib/nm-ip6-config.c
index 7e9bf3cd8..c9a262794 100644
--- a/libnm-glib/nm-ip6-config.c
+++ b/libnm-glib/nm-ip6-config.c
@@ -124,20 +124,20 @@ demarshal_ip6_routes_array (NMObject *object, GParamSpec *pspec, GValue *value,
}
static void
-register_for_property_changed (NMIP6Config *config)
+register_properties (NMIP6Config *config)
{
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_IP6_CONFIG_ADDRESSES, demarshal_ip6_address_array, &priv->addresses },
- { NM_IP6_CONFIG_NAMESERVERS, demarshal_ip6_nameserver_array, &priv->nameservers },
- { NM_IP6_CONFIG_DOMAINS, demarshal_domains, &priv->domains },
- { NM_IP6_CONFIG_ROUTES, demarshal_ip6_routes_array, &priv->routes },
+ const NMPropertiesInfo property_info[] = {
+ { NM_IP6_CONFIG_ADDRESSES, &priv->addresses, demarshal_ip6_address_array },
+ { NM_IP6_CONFIG_NAMESERVERS, &priv->nameservers, demarshal_ip6_nameserver_array },
+ { NM_IP6_CONFIG_DOMAINS, &priv->domains, demarshal_domains },
+ { NM_IP6_CONFIG_ROUTES, &priv->routes, demarshal_ip6_routes_array },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (config),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (config),
+ priv->proxy,
+ property_info);
}
/**
@@ -153,27 +153,10 @@ register_for_property_changed (NMIP6Config *config)
const GSList *
nm_ip6_config_get_addresses (NMIP6Config *config)
{
- NMIP6ConfigPrivate *priv;
- GValue value = { 0, };
-
g_return_val_if_fail (NM_IS_IP6_CONFIG (config), NULL);
- priv = NM_IP6_CONFIG_GET_PRIVATE (config);
- if (priv->addresses)
- return priv->addresses;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP6_CONFIG,
- "Addresses",
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_ip6_address_array (NM_OBJECT (config), NULL, &value, &priv->addresses);
- g_value_unset (&value);
-
- return priv->addresses;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP6_CONFIG_GET_PRIVATE (config)->addresses;
}
/* FIXME: like in libnm_util, in6_addr is not introspectable, so skipping here */
@@ -190,29 +173,10 @@ nm_ip6_config_get_addresses (NMIP6Config *config)
const GSList *
nm_ip6_config_get_nameservers (NMIP6Config *config)
{
- NMIP6ConfigPrivate *priv;
- GParamSpec *pspec;
- GValue value = {0,};
-
g_return_val_if_fail (NM_IS_IP6_CONFIG (config), NULL);
- priv = NM_IP6_CONFIG_GET_PRIVATE (config);
- if (priv->nameservers)
- return priv->nameservers;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP6_CONFIG,
- "Nameservers",
- &value,
- NULL)) {
- return NULL;
- }
-
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (config)), NM_IP6_CONFIG_NAMESERVERS);
- demarshal_ip6_nameserver_array (NM_OBJECT (config), pspec, &value, &priv->nameservers);
- g_value_unset (&value);
-
- return priv->nameservers;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP6_CONFIG_GET_PRIVATE (config)->nameservers;
}
/**
@@ -227,27 +191,10 @@ nm_ip6_config_get_nameservers (NMIP6Config *config)
const GPtrArray *
nm_ip6_config_get_domains (NMIP6Config *config)
{
- NMIP6ConfigPrivate *priv;
- GValue value = {0,};
-
g_return_val_if_fail (NM_IS_IP6_CONFIG (config), NULL);
- priv = NM_IP6_CONFIG_GET_PRIVATE (config);
- if (priv->domains)
- return handle_ptr_array_return (priv->domains);
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP6_CONFIG,
- "Domains",
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_domains (NM_OBJECT (config), NULL, &value, &priv->domains);
- g_value_unset (&value);
-
- return handle_ptr_array_return (priv->domains);
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return handle_ptr_array_return (NM_IP6_CONFIG_GET_PRIVATE (config)->domains);
}
/**
@@ -263,43 +210,19 @@ nm_ip6_config_get_domains (NMIP6Config *config)
const GSList *
nm_ip6_config_get_routes (NMIP6Config *config)
{
- NMIP6ConfigPrivate *priv;
- GValue value = { 0, };
-
g_return_val_if_fail (NM_IS_IP6_CONFIG (config), NULL);
- priv = NM_IP6_CONFIG_GET_PRIVATE (config);
- if (priv->routes)
- return priv->routes;
-
- if (!_nm_object_get_property (NM_OBJECT (config),
- NM_DBUS_INTERFACE_IP6_CONFIG,
- "Routes",
- &value,
- NULL)) {
- return NULL;
- }
-
- demarshal_ip6_routes_array (NM_OBJECT (config), NULL, &value, &priv->routes);
- g_value_unset (&value);
-
- return priv->routes;
+ _nm_object_ensure_inited (NM_OBJECT (config));
+ return NM_IP6_CONFIG_GET_PRIVATE (config)->routes;
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
DBusGConnection *connection;
NMIP6ConfigPrivate *priv;
- object = G_OBJECT_CLASS (nm_ip6_config_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_ip6_config_parent_class)->constructed (object);
priv = NM_IP6_CONFIG_GET_PRIVATE (object);
connection = nm_object_get_connection (NM_OBJECT (object));
@@ -309,9 +232,7 @@ constructor (GType type,
nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_IP6_CONFIG);
- register_for_property_changed (NM_IP6_CONFIG (object));
-
- return object;
+ register_properties (NM_IP6_CONFIG (object));
}
static void
@@ -379,7 +300,7 @@ nm_ip6_config_class_init (NMIP6ConfigClass *config_class)
g_type_class_add_private (config_class, sizeof (NMIP6ConfigPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->finalize = finalize;
diff --git a/libnm-glib/nm-object-cache.c b/libnm-glib/nm-object-cache.c
index c43b42733..741f1291b 100644
--- a/libnm-glib/nm-object-cache.c
+++ b/libnm-glib/nm-object-cache.c
@@ -34,18 +34,12 @@ _init_cache (void)
cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
}
-void
-_nm_object_cache_remove_by_path (const char *path)
+static void
+_nm_object_cache_remove_by_path (char *path)
{
_init_cache ();
g_hash_table_remove (cache, path);
-}
-
-void
-_nm_object_cache_remove_by_object (NMObject *object)
-{
- _init_cache ();
- g_hash_table_remove (cache, nm_object_get_path (object));
+ g_free (path);
}
void
@@ -57,7 +51,7 @@ _nm_object_cache_add (NMObject *object)
path = g_strdup (nm_object_get_path (object));
g_hash_table_insert (cache, path, object);
g_object_set_data_full (G_OBJECT (object), "nm-object-cache-tag",
- path, (GDestroyNotify) _nm_object_cache_remove_by_path);
+ g_strdup (path), (GDestroyNotify) _nm_object_cache_remove_by_path);
}
NMObject *
diff --git a/libnm-glib/nm-object-cache.h b/libnm-glib/nm-object-cache.h
index 2348dcfa0..8386591cd 100644
--- a/libnm-glib/nm-object-cache.h
+++ b/libnm-glib/nm-object-cache.h
@@ -32,8 +32,6 @@ G_BEGIN_DECLS
/* Returns referenced object from the cache */
NMObject *_nm_object_cache_get (const char *path);
void _nm_object_cache_add (NMObject *object);
-void _nm_object_cache_remove_by_object (NMObject *object);
-void _nm_object_cache_remove_by_path (const char *path);
G_END_DECLS
diff --git a/libnm-glib/nm-object-private.h b/libnm-glib/nm-object-private.h
index 4410df22d..7ec2162fb 100644
--- a/libnm-glib/nm-object-private.h
+++ b/libnm-glib/nm-object-private.h
@@ -23,83 +23,62 @@
#ifndef NM_OBJECT_PRIVATE_H
#define NM_OBJECT_PRIVATE_H
-#include <glib.h>
-#include <glib-object.h>
+#include <gio/gio.h>
#include "nm-object.h"
-typedef gboolean (*PropChangedMarshalFunc) (NMObject *, GParamSpec *, GValue *, gpointer);
+void _nm_object_ensure_inited (NMObject *object);
+
+typedef gboolean (*PropertyMarshalFunc) (NMObject *, GParamSpec *, GValue *, gpointer);
+
typedef GObject * (*NMObjectCreatorFunc) (DBusGConnection *, const char *);
typedef struct {
const char *name;
- PropChangedMarshalFunc func;
gpointer field;
-} NMPropertiesChangedInfo;
-
-
-void _nm_object_handle_properties_changed (NMObject *object,
- DBusGProxy *proxy,
- const NMPropertiesChangedInfo *info);
-
-void _nm_object_process_properties_changed (NMObject *self, GHashTable *properties);
-
-gboolean _nm_object_demarshal_generic (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
+ PropertyMarshalFunc func;
+ GType object_type;
+} NMPropertiesInfo;
+
+
+void _nm_object_register_properties (NMObject *object,
+ DBusGProxy *proxy,
+ const NMPropertiesInfo *info);
+
+gboolean _nm_object_reload_properties (NMObject *object, GError **error);
+
+void _nm_object_reload_properties_async (NMObject *object,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean _nm_object_reload_properties_finish (NMObject *object,
+ GAsyncResult *result,
+ GError **error);
+
+typedef void (*NMPseudoPropertyChangedFunc) (NMObject *self, NMObject *changed);
+void _nm_object_register_pseudo_property (NMObject *object,
+ DBusGProxy *proxy,
+ const char *name,
+ gpointer field,
+ GType object_type,
+ NMPseudoPropertyChangedFunc added_func,
+ NMPseudoPropertyChangedFunc removed_func);
+void _nm_object_reload_pseudo_property (NMObject *object,
+ const char *name);
void _nm_object_queue_notify (NMObject *object, const char *property);
+void _nm_object_suppress_property_updates (NMObject *object, gboolean suppress);
+
/* DBus property accessors */
-gboolean _nm_object_get_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GValue *value,
- GError **error);
+void _nm_object_reload_property (NMObject *object,
+ const char *interface,
+ const char *prop_name);
void _nm_object_set_property (NMObject *object,
const char *interface,
const char *prop_name,
GValue *value);
-char *_nm_object_get_string_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-char *_nm_object_get_object_path_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-gint32 _nm_object_get_int_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-guint32 _nm_object_get_uint_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-gboolean _nm_object_get_boolean_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-gint8 _nm_object_get_byte_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-gdouble _nm_object_get_double_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
-GByteArray *_nm_object_get_byte_array_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error);
-
static inline const GPtrArray *
handle_ptr_array_return (GPtrArray *array)
{
@@ -109,4 +88,12 @@ handle_ptr_array_return (GPtrArray *array)
return array;
}
+/* object demarshalling support */
+typedef GType (*NMObjectTypeFunc) (DBusGConnection *, const char *);
+typedef void (*NMObjectTypeCallbackFunc) (GType, gpointer);
+typedef void (*NMObjectTypeAsyncFunc) (DBusGConnection *, const char *, NMObjectTypeCallbackFunc, gpointer);
+
+void _nm_object_register_type_func (GType base_type, NMObjectTypeFunc type_func,
+ NMObjectTypeAsyncFunc type_async_func);
+
#endif /* NM_OBJECT_PRIVATE_H */
diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c
index 9a8a60f75..fc9d7f868 100644
--- a/libnm-glib/nm-object.c
+++ b/libnm-glib/nm-object.c
@@ -22,6 +22,7 @@
*/
#include <string.h>
+#include <gio/gio.h>
#include <nm-utils.h>
#include "NetworkManager.h"
#include "nm-object.h"
@@ -29,28 +30,59 @@
#include "nm-object-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
+#include "nm-types.h"
#define DEBUG 0
-G_DEFINE_ABSTRACT_TYPE (NMObject, nm_object, G_TYPE_OBJECT)
+static void nm_object_initable_iface_init (GInitableIface *iface);
+static void nm_object_async_initable_iface_init (GAsyncInitableIface *iface);
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (NMObject, nm_object, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_object_initable_iface_init);
+ G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_object_async_initable_iface_init);
+ )
#define NM_OBJECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_OBJECT, NMObjectPrivate))
+static GHashTable *type_funcs, *type_async_funcs;
+
typedef struct {
- PropChangedMarshalFunc func;
+ PropertyMarshalFunc func;
+ GType object_type;
+
gpointer field;
-} PropChangedInfo;
+} PropertyInfo;
+
+static void reload_complete (NMObject *object);
+
+typedef struct {
+ PropertyInfo pi;
+
+ NMObject *self;
+ DBusGProxy *proxy;
+
+ char *get_method;
+ NMPseudoPropertyChangedFunc added_func;
+ NMPseudoPropertyChangedFunc removed_func;
+} PseudoPropertyInfo;
typedef struct {
DBusGConnection *connection;
char *path;
DBusGProxy *properties_proxy;
- GSList *pcs;
+ GSList *property_interfaces;
+ GSList *property_tables;
+ GHashTable *pseudo_properties;
NMObject *parent;
+ gboolean suppress_property_updates;
GSList *notify_props;
guint32 notify_id;
- gboolean disposed;
+ gboolean inited, disposed;
+
+ GSList *reload_results;
+ guint reload_remaining;
+ GError *reload_error;
} NMObjectPrivate;
enum {
@@ -77,8 +109,6 @@ constructor (GType type,
object = G_OBJECT_CLASS (nm_object_parent_class)->constructor (type,
n_construct_params,
construct_params);
- if (!object)
- return NULL;
priv = NM_OBJECT_GET_PRIVATE (object);
@@ -88,17 +118,78 @@ constructor (GType type,
return NULL;
}
- priv->properties_proxy = dbus_g_proxy_new_for_name (priv->connection,
- NM_DBUS_SERVICE,
- priv->path,
- "org.freedesktop.DBus.Properties");
-
_nm_object_cache_add (NM_OBJECT (object));
return object;
}
static void
+constructed (GObject *object)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+
+ if (G_OBJECT_CLASS (nm_object_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_object_parent_class)->constructed (object);
+
+ priv->properties_proxy = dbus_g_proxy_new_for_name (priv->connection,
+ NM_DBUS_SERVICE,
+ priv->path,
+ "org.freedesktop.DBus.Properties");
+}
+
+static gboolean
+init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (initable);
+
+ priv->inited = TRUE;
+ return _nm_object_reload_properties (NM_OBJECT (initable), error);
+}
+
+static void
+init_async_got_properties (GObject *object, GAsyncResult *result, gpointer user_data)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GSimpleAsyncResult *simple = user_data;
+ GError *error = NULL;
+
+ priv->inited = TRUE;
+ if (_nm_object_reload_properties_finish (NM_OBJECT (object), result, &error))
+ g_simple_async_result_set_op_res_gboolean (simple, TRUE);
+ else
+ g_simple_async_result_take_error (simple, error);
+
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
+}
+
+static void
+init_async (GAsyncInitable *initable, int io_priority,
+ GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *simple;
+
+ simple = g_simple_async_result_new (G_OBJECT (initable), callback, user_data, init_async);
+ _nm_object_reload_properties_async (NM_OBJECT (initable), init_async_got_properties, simple);
+}
+
+static gboolean
+init_finish (GAsyncInitable *initable, GAsyncResult *result, GError **error)
+{
+ GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
+
+ /* This is needed for now because of bug 667375; it can go away
+ * when we depend on glib >= 2.38
+ */
+
+ if (g_simple_async_result_propagate_error (simple, error))
+ return FALSE;
+ else
+ return g_simple_async_result_get_op_res_gboolean (simple);
+}
+
+static void
dispose (GObject *object)
{
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
@@ -118,6 +209,9 @@ dispose (GObject *object)
g_slist_foreach (priv->notify_props, (GFunc) g_free, NULL);
g_slist_free (priv->notify_props);
+ g_slist_foreach (priv->property_interfaces, (GFunc) g_free, NULL);
+ g_slist_free (priv->property_interfaces);
+
g_object_unref (priv->properties_proxy);
dbus_g_connection_unref (priv->connection);
@@ -129,10 +223,13 @@ finalize (GObject *object)
{
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
- g_slist_foreach (priv->pcs, (GFunc) g_hash_table_destroy, NULL);
- g_slist_free (priv->pcs);
+ g_slist_foreach (priv->property_tables, (GFunc) g_hash_table_destroy, NULL);
+ g_slist_free (priv->property_tables);
g_free (priv->path);
+ if (priv->pseudo_properties)
+ g_hash_table_destroy (priv->pseudo_properties);
+
G_OBJECT_CLASS (nm_object_parent_class)->finalize (object);
}
@@ -187,8 +284,14 @@ nm_object_class_init (NMObjectClass *nm_object_class)
g_type_class_add_private (nm_object_class, sizeof (NMObjectPrivate));
+ if (!type_funcs) {
+ type_funcs = g_hash_table_new (NULL, NULL);
+ type_async_funcs = g_hash_table_new (NULL, NULL);
+ }
+
/* virtual methods */
object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->dispose = dispose;
@@ -223,6 +326,19 @@ nm_object_class_init (NMObjectClass *nm_object_class)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
+static void
+nm_object_initable_iface_init (GInitableIface *iface)
+{
+ iface->init = init_sync;
+}
+
+static void
+nm_object_async_initable_iface_init (GAsyncInitableIface *iface)
+{
+ iface->init_async = init_async;
+ iface->init_finish = init_finish;
+}
+
/**
* nm_object_get_connection:
* @object: a #NMObject
@@ -306,6 +422,142 @@ _nm_object_queue_notify (NMObject *object, const char *property)
priv->notify_props = g_slist_prepend (priv->notify_props, g_strdup (property));
}
+void
+_nm_object_register_type_func (GType base_type, NMObjectTypeFunc type_func,
+ NMObjectTypeAsyncFunc type_async_func)
+{
+ g_hash_table_insert (type_funcs,
+ GSIZE_TO_POINTER (base_type),
+ type_func);
+ g_hash_table_insert (type_async_funcs,
+ GSIZE_TO_POINTER (base_type),
+ type_async_func);
+}
+
+static GObject *
+_nm_object_create (GType type, DBusGConnection *connection, const char *path)
+{
+ NMObjectTypeFunc type_func;
+ GObject *object;
+ GError *error = NULL;
+
+ type_func = g_hash_table_lookup (type_funcs, GSIZE_TO_POINTER (type));
+ if (type_func)
+ type = type_func (connection, path);
+
+ if (type == G_TYPE_INVALID) {
+ g_warning ("Could not create object for %s: unknown object type", path);
+ return NULL;
+ }
+
+ object = g_object_new (type,
+ NM_OBJECT_DBUS_CONNECTION, connection,
+ NM_OBJECT_DBUS_PATH, path,
+ NULL);
+ if (!g_initable_init (G_INITABLE (object), NULL, &error)) {
+ g_object_unref (object);
+ object = NULL;
+ g_warning ("Could not create object for %s: %s", path, error->message);
+ g_error_free (error);
+ }
+
+ return object;
+}
+
+typedef void (*NMObjectCreateCallbackFunc) (GObject *, gpointer);
+typedef struct {
+ DBusGConnection *connection;
+ char *path;
+ NMObjectCreateCallbackFunc callback;
+ gpointer user_data;
+} NMObjectTypeAsyncData;
+
+static void
+create_async_complete (GObject *object, NMObjectTypeAsyncData *async_data)
+{
+ async_data->callback (object, async_data->user_data);
+
+ g_free (async_data->path);
+ g_slice_free (NMObjectTypeAsyncData, async_data);
+}
+
+static void
+async_inited (GObject *source, GAsyncResult *result, gpointer user_data)
+{
+ NMObjectTypeAsyncData *async_data = user_data;
+ GObject *object = G_OBJECT (source);
+ GError *error = NULL;
+
+ if (!g_async_initable_init_finish (G_ASYNC_INITABLE (object), result, &error)) {
+ g_warning ("Could not create object for %s: %s",
+ nm_object_get_path (NM_OBJECT (object)), error->message);
+ g_error_free (error);
+ g_object_unref (object);
+ object = NULL;
+ }
+
+ create_async_complete (object, async_data);
+}
+
+static void
+async_got_type (GType type, gpointer user_data)
+{
+ NMObjectTypeAsyncData *async_data = user_data;
+ GObject *object;
+
+ /* Ensure we don't have the object already; we may get multiple type
+ * requests for the same object if there are multiple properties on
+ * other objects that refer to the object at this path. One of those
+ * other requests may have already completed.
+ */
+ object = (GObject *) _nm_object_cache_get (async_data->path);
+ if (object) {
+ create_async_complete (object, async_data);
+ return;
+ }
+
+ if (type == G_TYPE_INVALID) {
+ /* Don't know how to create this object */
+ create_async_complete (NULL, async_data);
+ return;
+ }
+
+ object = g_object_new (type,
+ NM_OBJECT_DBUS_CONNECTION, async_data->connection,
+ NM_OBJECT_DBUS_PATH, async_data->path,
+ NULL);
+ g_warn_if_fail (object != NULL);
+ g_async_initable_init_async (G_ASYNC_INITABLE (object), G_PRIORITY_DEFAULT,
+ NULL, async_inited, async_data);
+}
+
+static void
+_nm_object_create_async (GType type, DBusGConnection *connection, const char *path,
+ NMObjectCreateCallbackFunc callback, gpointer user_data)
+{
+ NMObjectTypeAsyncFunc type_async_func;
+ NMObjectTypeFunc type_func;
+ NMObjectTypeAsyncData *async_data;
+
+ async_data = g_slice_new (NMObjectTypeAsyncData);
+ async_data->connection = connection;
+ async_data->path = g_strdup (path);
+ async_data->callback = callback;
+ async_data->user_data = user_data;
+
+ type_async_func = g_hash_table_lookup (type_async_funcs, GSIZE_TO_POINTER (type));
+ if (type_async_func) {
+ type_async_func (connection, path, async_got_type, async_data);
+ return;
+ }
+
+ type_func = g_hash_table_lookup (type_funcs, GSIZE_TO_POINTER (type));
+ if (type_func)
+ type = type_func (connection, path);
+
+ async_got_type (type, async_data);
+}
+
/* Stolen from dbus-glib */
static char*
wincaps_to_dash (const char *caps)
@@ -328,19 +580,213 @@ wincaps_to_dash (const char *caps)
return g_string_free (str, FALSE);
}
+/* Adds object to array if it's not already there */
+static void
+add_to_object_array_unique (GPtrArray *array, GObject *obj)
+{
+ guint i;
+
+ g_return_if_fail (array != NULL);
+
+ if (obj != NULL) {
+ for (i = 0; i < array->len; i++) {
+ if (g_ptr_array_index (array, i) == obj)
+ return;
+ }
+ g_ptr_array_add (array, obj);
+ }
+}
+
+typedef struct {
+ NMObject *self;
+ PropertyInfo *pi;
+
+ GObject **objects;
+ int length, remaining;
+
+ gboolean array;
+ const char *property_name;
+} ObjectCreatedData;
+
static void
-handle_property_changed (gpointer key, gpointer data, gpointer user_data)
+object_property_complete (ObjectCreatedData *odata)
+{
+ NMObject *self = odata->self;
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (self);
+ PropertyInfo *pi = odata->pi;
+
+ if (odata->array) {
+ GPtrArray **array = pi->field;
+ int i;
+
+ if (*array)
+ g_boxed_free (NM_TYPE_OBJECT_ARRAY, *array);
+ *array = g_ptr_array_sized_new (odata->length);
+ for (i = 0; i < odata->length; i++)
+ add_to_object_array_unique (*array, odata->objects[i]);
+ } else {
+ GObject **obj_p = pi->field;
+
+ if (*obj_p)
+ g_object_unref (*obj_p);
+ *obj_p = odata->objects[0];
+ }
+
+ if (odata->property_name)
+ _nm_object_queue_notify (self, odata->property_name);
+
+ if (priv->reload_results && --priv->reload_remaining == 0)
+ reload_complete (self);
+
+ g_object_unref (self);
+ g_free (odata->objects);
+ g_slice_free (ObjectCreatedData, odata);
+}
+
+static void
+object_created (GObject *obj, gpointer user_data)
+{
+ ObjectCreatedData *odata = user_data;
+
+ /* We assume that on error, the creator_func printed something */
+
+ odata->objects[--odata->remaining] = obj;
+ if (!odata->remaining)
+ object_property_complete (odata);
+}
+
+static gboolean
+handle_object_property (NMObject *self, const char *property_name, GValue *value,
+ PropertyInfo *pi, gboolean synchronously)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (self);
+ GObject *obj;
+ const char *path;
+ ObjectCreatedData *odata;
+
+ odata = g_slice_new (ObjectCreatedData);
+ odata->self = g_object_ref (self);
+ odata->pi = pi;
+ odata->objects = g_new (GObject *, 1);
+ odata->length = odata->remaining = 1;
+ odata->array = FALSE;
+ odata->property_name = property_name;
+
+ if (priv->reload_results)
+ priv->reload_remaining++;
+
+ path = g_value_get_boxed (value);
+ if (!strcmp (path, "/")) {
+ object_created (NULL, odata);
+ return TRUE;
+ }
+
+ obj = G_OBJECT (_nm_object_cache_get (path));
+ if (obj) {
+ object_created (obj, odata);
+ return TRUE;
+ } else if (synchronously) {
+ obj = _nm_object_create (pi->object_type, priv->connection, path);
+ object_created (obj, odata);
+ return obj != NULL;
+ } else {
+ _nm_object_create_async (pi->object_type, priv->connection, path,
+ object_created, odata);
+ /* Assume success */
+ return TRUE;
+ }
+}
+
+static gboolean
+handle_object_array_property (NMObject *self, const char *property_name, GValue *value,
+ PropertyInfo *pi, gboolean synchronously)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (self);
+ GObject *obj;
+ GPtrArray *paths;
+ GPtrArray **array = pi->field;
+ const char *path;
+ ObjectCreatedData *odata;
+ int i;
+
+ paths = g_value_get_boxed (value);
+
+ odata = g_slice_new (ObjectCreatedData);
+ odata->self = g_object_ref (self);
+ odata->pi = pi;
+ odata->objects = g_new0 (GObject *, paths->len);
+ odata->length = odata->remaining = paths->len;
+ odata->array = TRUE;
+ odata->property_name = property_name;
+
+ if (priv->reload_results)
+ priv->reload_remaining++;
+
+ if (paths->len == 0) {
+ object_property_complete (odata);
+ return TRUE;
+ }
+
+ for (i = 0; i < paths->len; i++) {
+ path = paths->pdata[i];
+ if (!strcmp (path, "/")) {
+ /* FIXME: can't happen? */
+ continue;
+ }
+
+ obj = G_OBJECT (_nm_object_cache_get (path));
+ if (obj) {
+ object_created (obj, odata);
+ } else if (synchronously) {
+ obj = _nm_object_create (pi->object_type, priv->connection, path);
+ object_created (obj, odata);
+ } else {
+ _nm_object_create_async (pi->object_type, priv->connection, path,
+ object_created, odata);
+ }
+ }
+
+ if (!synchronously) {
+ /* Assume success */
+ return TRUE;
+ }
+
+ return *array && ((*array)->len == paths->len);
+}
+
+static void
+handle_property_changed (NMObject *self, const char *dbus_name, GValue *value, gboolean synchronously)
{
- NMObject *self = NM_OBJECT (user_data);
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (self);
char *prop_name;
- PropChangedInfo *pci;
+ PropertyInfo *pi;
GParamSpec *pspec;
gboolean success = FALSE, found = FALSE;
GSList *iter;
- GValue *value = data;
- prop_name = wincaps_to_dash ((char *) key);
+ prop_name = wincaps_to_dash (dbus_name);
+
+ /* Iterate through the object and its parents to find the property */
+ for (iter = priv->property_tables; iter; iter = g_slist_next (iter)) {
+ pi = g_hash_table_lookup ((GHashTable *) iter->data, prop_name);
+ if (pi) {
+ if (!pi->field) {
+ /* We know about this property but aren't tracking changes on it. */
+ goto out;
+ }
+
+ found = TRUE;
+ break;
+ }
+ }
+
+ if (!found) {
+#if DEBUG
+ g_warning ("Property '%s' unhandled.", prop_name);
+#endif
+ goto out;
+ }
+
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (self)), prop_name);
if (!pspec) {
g_warning ("%s: property '%s' changed but wasn't defined by object type %s.",
@@ -350,29 +796,33 @@ handle_property_changed (gpointer key, gpointer data, gpointer user_data)
goto out;
}
- /* Iterate through the object and its parents to find the property */
- for (iter = priv->pcs; iter; iter = g_slist_next (iter)) {
- pci = g_hash_table_lookup ((GHashTable *) iter->data, prop_name);
- if (pci) {
- found = TRUE;
-
- /* Handle NULL object paths */
- if (G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH)) {
- if (g_strcmp0 (g_value_get_boxed (value), "/") == 0)
- value = NULL;
- }
-
- success = (*(pci->func)) (self, pspec, value, pci->field);
- if (success)
- break;
- }
+#if DEBUG
+ {
+ char *s;
+ s = g_strdup_value_contents (value);
+ g_message ("PC: %p (%s) prop (%s) '%s' value (%s) %s",
+ self, G_OBJECT_TYPE_NAME (self),
+ g_type_name (pspec->value_type), prop_name,
+ G_VALUE_TYPE_NAME (value), s);
+ g_free (s);
}
-
- if (!found) {
+#endif
+ if (pi->object_type) {
#if DEBUG
- g_warning ("Property '%s' unhandled.", prop_name);
+ g_message (" Value is object type %s", g_type_name (pi->object_type));
#endif
- } else if (!success) {
+ if (G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
+ success = handle_object_property (self, pspec->name, value, pi, synchronously);
+ else if (G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH))
+ success = handle_object_array_property (self, pspec->name, value, pi, synchronously);
+ else {
+ g_warn_if_reached ();
+ goto out;
+ }
+ } else
+ success = (*(pi->func)) (self, pspec, value, pi->field);
+
+ if (!success) {
g_warning ("%s: failed to update property '%s' of object type %s.",
__func__,
prop_name,
@@ -383,10 +833,19 @@ out:
g_free (prop_name);
}
-void
-_nm_object_process_properties_changed (NMObject *self, GHashTable *properties)
+static void
+process_properties_changed (NMObject *self, GHashTable *properties, gboolean synchronously)
{
- g_hash_table_foreach (properties, handle_property_changed, self);
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (self);
+ GHashTableIter iter;
+ gpointer name, value;
+
+ if (priv->suppress_property_updates)
+ return;
+
+ g_hash_table_iter_init (&iter, properties);
+ while (g_hash_table_iter_next (&iter, &name, &value))
+ handle_property_changed (self, name, value, synchronously);
}
static void
@@ -394,49 +853,7 @@ properties_changed_proxy (DBusGProxy *proxy,
GHashTable *properties,
gpointer user_data)
{
- _nm_object_process_properties_changed (NM_OBJECT (user_data), properties);
-}
-
-void
-_nm_object_handle_properties_changed (NMObject *object,
- DBusGProxy *proxy,
- const NMPropertiesChangedInfo *info)
-{
- NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
- NMPropertiesChangedInfo *tmp;
- GHashTable *instance;
-
- g_return_if_fail (NM_IS_OBJECT (object));
- g_return_if_fail (proxy != NULL);
- g_return_if_fail (info != NULL);
-
- dbus_g_proxy_add_signal (proxy, "PropertiesChanged", DBUS_TYPE_G_MAP_OF_VARIANT, G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (proxy,
- "PropertiesChanged",
- G_CALLBACK (properties_changed_proxy),
- object,
- NULL);
-
- instance = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
- priv->pcs = g_slist_prepend (priv->pcs, instance);
-
- for (tmp = (NMPropertiesChangedInfo *) info; tmp->name; tmp++) {
- PropChangedInfo *pci;
-
- if (!tmp->name || !tmp->func || !tmp->field) {
- g_warning ("%s: missing field in NMPropertiesChangedInfo", __func__);
- continue;
- }
-
- pci = g_malloc0 (sizeof (PropChangedInfo));
- if (!pci) {
- g_warning ("%s: not enough memory for PropChangedInfo", __func__);
- continue;
- }
- pci->func = tmp->func;
- pci->field = tmp->field;
- g_hash_table_insert (instance, g_strdup (tmp->name), pci);
- }
+ process_properties_changed (NM_OBJECT (user_data), properties, FALSE);
}
#define HANDLE_TYPE(ucase, lcase, getter) \
@@ -449,11 +866,11 @@ _nm_object_handle_properties_changed (NMObject *object,
goto done; \
}
-gboolean
-_nm_object_demarshal_generic (NMObject *object,
- GParamSpec *pspec,
- GValue *value,
- gpointer field)
+static gboolean
+demarshal_generic (NMObject *object,
+ GParamSpec *pspec,
+ GValue *value,
+ gpointer field)
{
gboolean success = TRUE;
@@ -503,34 +920,132 @@ done:
return success;
}
+void
+_nm_object_register_properties (NMObject *object,
+ DBusGProxy *proxy,
+ const NMPropertiesInfo *info)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ NMPropertiesInfo *tmp;
+ GHashTable *instance;
+
+ g_return_if_fail (NM_IS_OBJECT (object));
+ g_return_if_fail (proxy != NULL);
+ g_return_if_fail (info != NULL);
+
+ priv->property_interfaces = g_slist_prepend (priv->property_interfaces,
+ g_strdup (dbus_g_proxy_get_interface (proxy)));
+
+ dbus_g_proxy_add_signal (proxy, "PropertiesChanged", DBUS_TYPE_G_MAP_OF_VARIANT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (proxy,
+ "PropertiesChanged",
+ G_CALLBACK (properties_changed_proxy),
+ object,
+ NULL);
+
+ instance = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ priv->property_tables = g_slist_prepend (priv->property_tables, instance);
+
+ for (tmp = (NMPropertiesInfo *) info; tmp->name; tmp++) {
+ PropertyInfo *pi;
+
+ if (!tmp->name || (tmp->func && !tmp->field)) {
+ g_warning ("%s: missing field in NMPropertiesInfo", __func__);
+ continue;
+ }
+
+ pi = g_malloc0 (sizeof (PropertyInfo));
+ pi->func = tmp->func ? tmp->func : demarshal_generic;
+ pi->object_type = tmp->object_type;
+ pi->field = tmp->field;
+ g_hash_table_insert (instance, g_strdup (tmp->name), pi);
+ }
+}
+
gboolean
-_nm_object_get_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GValue *value,
- GError **error)
+_nm_object_reload_properties (NMObject *object, GError **error)
{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GHashTable *props = NULL;
+ GSList *p;
+ GHashTableIter pp;
+ gpointer name, info;
+
+ if (!priv->property_interfaces)
+ return TRUE;
+
+ for (p = priv->property_interfaces; p; p = p->next) {
+ if (!dbus_g_proxy_call (priv->properties_proxy, "GetAll", error,
+ G_TYPE_STRING, p->data,
+ G_TYPE_INVALID,
+ DBUS_TYPE_G_MAP_OF_VARIANT, &props,
+ G_TYPE_INVALID))
+ return FALSE;
+
+ process_properties_changed (object, props, TRUE);
+ g_hash_table_destroy (props);
+ }
+
+ if (priv->pseudo_properties) {
+ g_hash_table_iter_init (&pp, priv->pseudo_properties);
+ while (g_hash_table_iter_next (&pp, &name, &info))
+ _nm_object_reload_pseudo_property (object, name);
+ }
+
+ return TRUE;
+}
+
+void
+_nm_object_suppress_property_updates (NMObject *object, gboolean suppress)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+
+ priv->suppress_property_updates = suppress;
+}
+
+
+void
+_nm_object_ensure_inited (NMObject *object)
+{
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GError *error = NULL;
+
+ if (!priv->inited) {
+ if (!g_initable_init (G_INITABLE (object), NULL, &error)) {
+ g_warning ("Could not initialize %s %s: %s",
+ G_OBJECT_TYPE_NAME (object), priv->path,
+ error->message);
+ g_error_free (error);
+
+ /* Only warn once */
+ priv->inited = TRUE;
+ }
+ }
+}
+
+void
+_nm_object_reload_property (NMObject *object,
+ const char *interface,
+ const char *prop_name)
+{
+ GValue value = { 0, };
GError *err = NULL;
- g_return_val_if_fail (NM_IS_OBJECT (object), FALSE);
- g_return_val_if_fail (interface != NULL, FALSE);
- g_return_val_if_fail (prop_name != NULL, FALSE);
- g_return_val_if_fail (value != NULL, FALSE);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_if_fail (NM_IS_OBJECT (object));
+ g_return_if_fail (interface != NULL);
+ g_return_if_fail (prop_name != NULL);
if (!dbus_g_proxy_call_with_timeout (NM_OBJECT_GET_PRIVATE (object)->properties_proxy,
"Get", 15000, &err,
G_TYPE_STRING, interface,
G_TYPE_STRING, prop_name,
G_TYPE_INVALID,
- G_TYPE_VALUE, value,
+ G_TYPE_VALUE, &value,
G_TYPE_INVALID)) {
/* Don't warn about D-Bus no reply/timeout errors; it's mostly noise and
* happens for example when NM quits and the applet is still running.
- * And don't warn when 'error' is not NULL, rather propagate 'err' so the caller
- * can do something with it. */
- if ( !error
- && !(err->domain == DBUS_GERROR && err->code == DBUS_GERROR_NO_REPLY)) {
+ */
+ if (!g_error_matches (err, DBUS_GERROR, DBUS_GERROR_NO_REPLY)) {
g_warning ("%s: Error getting '%s' for %s: (%d) %s\n",
__func__,
prop_name,
@@ -538,11 +1053,12 @@ _nm_object_get_property (NMObject *object,
err->code,
err->message);
}
- g_propagate_error (error, err);
- return FALSE;
+ g_clear_error (&err);
+ return;
}
- return TRUE;
+ handle_property_changed (object, prop_name, &value, TRUE);
+ g_value_unset (&value);
}
void
@@ -569,157 +1085,305 @@ _nm_object_set_property (NMObject *object,
}
}
-char *
-_nm_object_get_string_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+static void
+pseudo_property_object_created (GObject *obj, gpointer user_data)
{
- char *str = NULL;
- const char *tmp;
- GValue value = {0,};
+ PseudoPropertyInfo *ppi = user_data;
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- if (G_VALUE_HOLDS_STRING (&value))
- str = g_strdup (g_value_get_string (&value));
- else if (G_VALUE_HOLDS (&value, DBUS_TYPE_G_OBJECT_PATH)) {
- tmp = g_value_get_boxed (&value);
- /* Handle "NULL" object paths */
- if (g_strcmp0 (tmp, "/") != 0)
- str = g_strdup (tmp);
- }
- g_value_unset (&value);
- }
+ if (obj) {
+ GPtrArray **list_p = (GPtrArray **)ppi->pi.field;
- return str;
+ if (!*list_p)
+ *list_p = g_ptr_array_new ();
+ add_to_object_array_unique (*list_p, obj);
+ ppi->added_func (ppi->self, NM_OBJECT (obj));
+ }
}
-char *
-_nm_object_get_object_path_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+static void
+pseudo_property_added (DBusGProxy *proxy, const char *path, gpointer user_data)
{
- char *path = NULL;
- const char *tmp;
- GValue value = {0,};
+ PseudoPropertyInfo *ppi = user_data;
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (ppi->self);
+ NMObject *obj;
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- tmp = g_value_get_boxed (&value);
- if (g_strcmp0 (tmp, "/") != 0)
- path = g_strdup (tmp);
- g_value_unset (&value);
- }
+ if (priv->suppress_property_updates)
+ return;
- return path;
+ obj = _nm_object_cache_get (path);
+ if (obj)
+ pseudo_property_object_created (G_OBJECT (obj), ppi);
+ else {
+ _nm_object_create_async (ppi->pi.object_type, priv->connection, path,
+ pseudo_property_object_created, ppi);
+ }
}
-gint32
-_nm_object_get_int_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+static void
+pseudo_property_removed (DBusGProxy *proxy, const char *path, gpointer user_data)
{
- gint32 i = 0;
- GValue value = {0,};
+ PseudoPropertyInfo *ppi = user_data;
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (ppi->self);
+ GPtrArray *list = *(GPtrArray **)ppi->pi.field;
+ NMObject *obj = NULL;
+ int i;
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- i = g_value_get_int (&value);
- g_value_unset (&value);
+ if (!list || priv->suppress_property_updates)
+ return;
+
+ for (i = 0; i < list->len; i++) {
+ obj = list->pdata[i];
+ if (!strcmp (path, nm_object_get_path (obj))) {
+ g_ptr_array_remove_index (list, i);
+ ppi->removed_func (ppi->self, obj);
+ g_object_unref (obj);
+ return;
+ }
}
+}
- return i;
+static void
+free_pseudo_property (PseudoPropertyInfo *ppi)
+{
+ g_object_unref (ppi->proxy);
+ g_free (ppi->get_method);
+ g_slice_free (PseudoPropertyInfo, ppi);
}
-guint32
-_nm_object_get_uint_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+void
+_nm_object_register_pseudo_property (NMObject *object,
+ DBusGProxy *proxy,
+ const char *name,
+ gpointer field,
+ GType object_type,
+ NMPseudoPropertyChangedFunc added_func,
+ NMPseudoPropertyChangedFunc removed_func)
{
- guint32 i = 0;
- GValue value = {0,};
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ PseudoPropertyInfo *ppi;
+ int basename_len;
+ char *added_signal, *removed_signal;
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- i = g_value_get_uint (&value);
- g_value_unset (&value);
- }
+ g_return_if_fail (NM_IS_OBJECT (object));
+ g_return_if_fail (proxy != NULL);
- return i;
+ ppi = g_slice_new0 (PseudoPropertyInfo);
+ ppi->pi.field = field;
+ ppi->pi.object_type = object_type;
+ ppi->self = object;
+ ppi->proxy = g_object_ref (proxy);
+ ppi->added_func = added_func;
+ ppi->removed_func = removed_func;
+
+ basename_len = strlen (name);
+ if (basename_len > 4 && !strcmp (name + basename_len - 4, "List"))
+ basename_len -= 4;
+ else if (basename_len > 1 && name[basename_len - 1] == 's')
+ basename_len--;
+ else
+ g_assert_not_reached ();
+
+ ppi->get_method = g_strdup_printf ("Get%s", name);
+ added_signal = g_strdup_printf ("%.*sAdded", basename_len, name);
+ removed_signal = g_strdup_printf ("%.*sRemoved", basename_len, name);
+
+ if (!priv->pseudo_properties) {
+ priv->pseudo_properties = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, (GDestroyNotify) free_pseudo_property);
+ }
+ g_hash_table_insert (priv->pseudo_properties, g_strdup (name), ppi);
+
+ dbus_g_proxy_add_signal (proxy, added_signal,
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (proxy, added_signal,
+ G_CALLBACK (pseudo_property_added),
+ ppi, NULL);
+
+ dbus_g_proxy_add_signal (proxy, removed_signal,
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (proxy, removed_signal,
+ G_CALLBACK (pseudo_property_removed),
+ ppi, NULL);
+
+ g_free (added_signal);
+ g_free (removed_signal);
}
-gboolean
-_nm_object_get_boolean_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+void
+_nm_object_reload_pseudo_property (NMObject *object,
+ const char *name)
{
- gboolean b = FALSE;
- GValue value = {0,};
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ PseudoPropertyInfo *ppi;
+ GPtrArray *temp;
+ GError *error = NULL;
+ GValue value = { 0, };
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- b = g_value_get_boolean (&value);
- g_value_unset (&value);
+ g_return_if_fail (NM_IS_OBJECT (object));
+ g_return_if_fail (name != NULL);
+
+ ppi = g_hash_table_lookup (priv->pseudo_properties, name);
+ g_return_if_fail (ppi != NULL);
+
+ if (!dbus_g_proxy_call (ppi->proxy, ppi->get_method, &error,
+ G_TYPE_INVALID,
+ DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &temp,
+ G_TYPE_INVALID)) {
+ g_warning ("%s: error calling %s: %s", __func__, ppi->get_method, error->message);
+ g_error_free (error);
+ return;
}
- return b;
+ g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
+ g_value_take_boxed (&value, temp);
+ handle_object_array_property (object, NULL, &value, &ppi->pi, TRUE);
+ g_value_unset (&value);
}
-gint8
-_nm_object_get_byte_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+static void
+reload_complete (NMObject *object)
{
- gint8 b = G_MAXINT8;
- GValue value = {0,};
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GSimpleAsyncResult *simple;
+ GSList *results, *iter;
+ GError *error;
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- b = g_value_get_uchar (&value);
- g_value_unset (&value);
- }
+ results = priv->reload_results;
+ priv->reload_results = NULL;
+ error = priv->reload_error;
+ priv->reload_error = NULL;
+
+ for (iter = results; iter; iter = iter->next) {
+ simple = results->data;
- return b;
+ if (error)
+ g_simple_async_result_set_from_error (simple, error);
+ else
+ g_simple_async_result_set_op_res_gboolean (simple, TRUE);
+
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
+ }
+ g_slist_free (results);
+ g_clear_error (&error);
}
-gdouble
-_nm_object_get_double_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+static void
+reload_got_properties (DBusGProxy *proxy, DBusGProxyCall *call,
+ gpointer user_data)
{
- gdouble d = G_MAXDOUBLE;
- GValue value = {0,};
+ NMObject *object = user_data;
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GHashTable *props = NULL;
+ GError *error = NULL;
+
+ if (dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_MAP_OF_VARIANT, &props,
+ G_TYPE_INVALID)) {
+ process_properties_changed (object, props, FALSE);
+ g_hash_table_destroy (props);
+ } else {
+ if (priv->reload_error)
+ g_error_free (error);
+ else
+ priv->reload_error = error;
+ }
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- d = g_value_get_double (&value);
+ if (--priv->reload_remaining == 0)
+ reload_complete (object);
+}
+
+static void
+reload_got_pseudo_property (DBusGProxy *proxy, DBusGProxyCall *call,
+ gpointer user_data)
+{
+ PseudoPropertyInfo *ppi = user_data;
+ NMObject *object = ppi->self;
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GPtrArray *temp;
+ GValue value = { 0, };
+ GError *error = NULL;
+
+ if (dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &temp,
+ G_TYPE_INVALID)) {
+ g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
+ g_value_take_boxed (&value, temp);
+ if (!priv->suppress_property_updates)
+ handle_object_array_property (object, NULL, &value, &ppi->pi, FALSE);
g_value_unset (&value);
+ } else {
+ if (priv->reload_error)
+ g_error_free (error);
+ else
+ priv->reload_error = error;
}
- return d;
+ if (--priv->reload_remaining == 0)
+ reload_complete (object);
}
-GByteArray *
-_nm_object_get_byte_array_property (NMObject *object,
- const char *interface,
- const char *prop_name,
- GError **error)
+void
+_nm_object_reload_properties_async (NMObject *object, GAsyncReadyCallback callback, gpointer user_data)
{
- GByteArray *array = NULL;
- GValue value = {0,};
+ NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
+ GSimpleAsyncResult *simple;
+ GSList *p;
- if (_nm_object_get_property (object, interface, prop_name, &value, error)) {
- GArray * tmp = g_value_get_boxed (&value);
- int i;
- unsigned char byte;
+ simple = g_simple_async_result_new (G_OBJECT (object), callback,
+ user_data, _nm_object_reload_properties_async);
+
+ if (!priv->property_interfaces && !priv->pseudo_properties) {
+ g_simple_async_result_complete_in_idle (simple);
+ return;
+ }
+
+ priv->reload_results = g_slist_prepend (priv->reload_results, simple);
+
+ /* If there was already a reload happening, we don't need to
+ * re-read the properties again, we just need to wait for the
+ * existing reload to finish.
+ */
+ if (priv->reload_results->next)
+ return;
- array = g_byte_array_sized_new (tmp->len);
- for (i = 0; i < tmp->len; i++) {
- byte = g_array_index (tmp, unsigned char, i);
- g_byte_array_append (array, &byte, 1);
+ for (p = priv->property_interfaces; p; p = p->next) {
+ priv->reload_remaining++;
+ dbus_g_proxy_begin_call (priv->properties_proxy, "GetAll",
+ reload_got_properties, object, NULL,
+ G_TYPE_STRING, p->data,
+ G_TYPE_INVALID);
+ }
+
+ if (priv->pseudo_properties) {
+ GHashTableIter iter;
+ gpointer key, value;
+ PseudoPropertyInfo *ppi;
+
+ g_hash_table_iter_init (&iter, priv->pseudo_properties);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ ppi = value;
+ priv->reload_remaining++;
+ dbus_g_proxy_begin_call (ppi->proxy, ppi->get_method,
+ reload_got_pseudo_property, ppi, NULL,
+ G_TYPE_INVALID);
}
- g_value_unset (&value);
}
+}
+
+gboolean
+_nm_object_reload_properties_finish (NMObject *object, GAsyncResult *result, GError **error)
+{
+ GSimpleAsyncResult *simple;
+
+ g_return_val_if_fail (NM_IS_OBJECT (object), FALSE);
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (object), _nm_object_reload_properties_async), FALSE);
+
+ simple = G_SIMPLE_ASYNC_RESULT (result);
+ if (g_simple_async_result_propagate_error (simple, error))
+ return FALSE;
- return array;
+ return g_simple_async_result_get_op_res_gboolean (simple);
}
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
index 9e190d9e6..c5e386439 100644
--- a/libnm-glib/nm-remote-connection.c
+++ b/libnm-glib/nm-remote-connection.c
@@ -22,6 +22,7 @@
*/
#include <string.h>
+#include <gio/gio.h>
#include <NetworkManager.h>
#include <nm-utils.h>
@@ -29,16 +30,21 @@
#include "nm-remote-connection.h"
#include "nm-remote-connection-private.h"
#include "nm-dbus-glib-types.h"
-#include "nm-settings-connection-bindings.h"
+#include "nm-glib-compat.h"
#define NM_REMOTE_CONNECTION_BUS "bus"
-G_DEFINE_TYPE (NMRemoteConnection, nm_remote_connection, NM_TYPE_CONNECTION)
+static void nm_remote_connection_initable_iface_init (GInitableIface *iface);
+static void nm_remote_connection_async_initable_iface_init (GAsyncInitableIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (NMRemoteConnection, nm_remote_connection, NM_TYPE_CONNECTION,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_remote_connection_initable_iface_init);
+ G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_remote_connection_async_initable_iface_init);
+ )
enum {
PROP_0,
PROP_BUS,
- PROP_INIT_RESULT,
LAST_PROP
};
@@ -65,7 +71,6 @@ typedef struct {
DBusGProxy *proxy;
GSList *calls;
- NMRemoteConnectionInitResult init_result;
gboolean visible;
gboolean disposed;
} NMRemoteConnectionPrivate;
@@ -89,13 +94,17 @@ remote_call_complete (NMRemoteConnection *self, RemoteCall *call)
}
static void
-update_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
+update_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data)
{
RemoteCall *call = user_data;
NMRemoteConnectionCommitFunc func = (NMRemoteConnectionCommitFunc) call->callback;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, proxy_call, &error,
+ G_TYPE_INVALID);
if (func != NULL)
(*func)(call->self, error, call->user_data);
+ g_clear_error (&error);
remote_call_complete (call->self, call);
}
@@ -131,10 +140,10 @@ nm_remote_connection_commit_changes (NMRemoteConnection *self,
settings = nm_connection_to_hash (NM_CONNECTION (self), NM_SETTING_HASH_FLAG_ALL);
- call->call = org_freedesktop_NetworkManager_Settings_Connection_update_async (priv->proxy,
- settings,
- update_cb,
- call);
+ call->call = dbus_g_proxy_begin_call (priv->proxy, "Update",
+ update_cb, call, NULL,
+ DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, settings,
+ G_TYPE_INVALID);
g_assert (call->call);
priv->calls = g_slist_append (priv->calls, call);
@@ -142,13 +151,17 @@ nm_remote_connection_commit_changes (NMRemoteConnection *self,
}
static void
-delete_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
+delete_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data)
{
RemoteCall *call = user_data;
NMRemoteConnectionDeleteFunc func = (NMRemoteConnectionDeleteFunc) call->callback;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, proxy_call, &error,
+ G_TYPE_INVALID);
if (func != NULL)
(*func)(call->self, error, call->user_data);
+ g_clear_error (&error);
remote_call_complete (call->self, call);
}
@@ -178,20 +191,26 @@ nm_remote_connection_delete (NMRemoteConnection *self,
call->callback = (GFunc) callback;
call->user_data = user_data;
- call->call = org_freedesktop_NetworkManager_Settings_Connection_delete_async (priv->proxy,
- delete_cb,
- call);
+ call->call = dbus_g_proxy_begin_call (priv->proxy, "Delete",
+ delete_cb, call, NULL,
+ G_TYPE_INVALID);
g_assert (call->call);
priv->calls = g_slist_append (priv->calls, call);
}
static void
-get_secrets_cb (DBusGProxy *proxy, GHashTable *secrets, GError *error, gpointer user_data)
+get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data)
{
RemoteCall *call = user_data;
NMRemoteConnectionGetSecretsFunc func = (NMRemoteConnectionGetSecretsFunc) call->callback;
+ GHashTable *secrets;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, proxy_call, &error,
+ DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &secrets,
+ G_TYPE_INVALID);
(*func)(call->self, error ? NULL : secrets, error, call->user_data);
+ g_clear_error (&error);
remote_call_complete (call->self, call);
}
@@ -225,10 +244,10 @@ nm_remote_connection_get_secrets (NMRemoteConnection *self,
call->callback = (GFunc) callback;
call->user_data = user_data;
- call->call = org_freedesktop_NetworkManager_Settings_Connection_get_secrets_async (priv->proxy,
- setting_name,
- get_secrets_cb,
- call);
+ call->call = dbus_g_proxy_begin_call (priv->proxy, "GetSecrets",
+ get_secrets_cb, call, NULL,
+ G_TYPE_STRING, setting_name,
+ G_TYPE_INVALID);
g_assert (call->call);
priv->calls = g_slist_append (priv->calls, call);
}
@@ -255,43 +274,23 @@ replace_settings (NMRemoteConnection *self, GHashTable *new_settings)
}
static void
-init_get_settings_cb (DBusGProxy *proxy,
- GHashTable *new_settings,
- GError *error,
- gpointer user_data)
-{
- NMRemoteConnection *self = user_data;
- NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
-
- if (error) {
- /* Connection doesn't exist, or isn't visible to this user */
- if (dbus_g_error_has_name (error, "org.freedesktop.NetworkManager.Settings.PermissionDenied"))
- priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_INVISIBLE;
- else
- priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_ERROR;
-
- g_object_notify (G_OBJECT (self), NM_REMOTE_CONNECTION_INIT_RESULT);
- } else {
- priv->visible = TRUE;
- replace_settings (self, new_settings);
- g_hash_table_destroy (new_settings);
- priv->init_result = NM_REMOTE_CONNECTION_INIT_RESULT_SUCCESS;
- g_object_notify (G_OBJECT (self), NM_REMOTE_CONNECTION_INIT_RESULT);
- }
-}
-
-static void
updated_get_settings_cb (DBusGProxy *proxy,
- GHashTable *new_settings,
- GError *error,
+ DBusGProxyCall *call,
gpointer user_data)
{
NMRemoteConnection *self = user_data;
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
+ GHashTable *new_settings;
+ GError *error = NULL;
+ dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &new_settings,
+ G_TYPE_INVALID);
if (error) {
GHashTable *hash;
+ g_error_free (error);
+
/* Connection is no longer visible to this user. Let the settings
* service handle this via 'visible'. The settings service will emit
* the "removed" signal for us since it handles the lifetime of this
@@ -322,9 +321,9 @@ updated_cb (DBusGProxy *proxy, gpointer user_data)
NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
/* The connection got updated; request the replacement settings */
- org_freedesktop_NetworkManager_Settings_Connection_get_settings_async (priv->proxy,
- updated_get_settings_cb,
- self);
+ dbus_g_proxy_begin_call (priv->proxy, "GetSettings",
+ updated_get_settings_cb, self, NULL,
+ G_TYPE_INVALID);
}
static void
@@ -357,18 +356,11 @@ nm_remote_connection_new (DBusGConnection *bus,
NULL);
}
-static GObject *
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
NMRemoteConnectionPrivate *priv;
- object = G_OBJECT_CLASS (nm_remote_connection_parent_class)->constructor (type, n_construct_params, construct_params);
- if (!object)
- return NULL;
-
priv = NM_REMOTE_CONNECTION_GET_PRIVATE (object);
g_assert (priv->bus);
g_assert (nm_connection_get_path (NM_CONNECTION (object)));
@@ -385,11 +377,76 @@ constructor (GType type,
dbus_g_proxy_add_signal (priv->proxy, "Removed", G_TYPE_INVALID);
dbus_g_proxy_connect_signal (priv->proxy, "Removed", G_CALLBACK (removed_cb), object, NULL);
+}
+
+static gboolean
+init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
+{
+ NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (initable);
+ GHashTable *settings;
+
+ if (!dbus_g_proxy_call (priv->proxy, "GetSettings", error,
+ G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS,
+ G_TYPE_INVALID,
+ DBUS_TYPE_G_MAP_OF_VARIANT, &settings,
+ G_TYPE_INVALID))
+ return FALSE;
+
+ priv->visible = TRUE;
+ replace_settings (NM_REMOTE_CONNECTION (initable), settings);
+ g_hash_table_destroy (settings);
+ return TRUE;
+}
+
+typedef struct {
+ NMRemoteConnection *connection;
+ GSimpleAsyncResult *result;
+} NMRemoteConnectionInitData;
+
+static void
+init_get_settings_cb (DBusGProxy *proxy,
+ DBusGProxyCall *call,
+ gpointer user_data)
+{
+ NMRemoteConnectionInitData *init_data = user_data;
+ NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (init_data->connection);
+ GHashTable *settings;
+ GError *error = NULL;
+
+ dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings,
+ G_TYPE_INVALID);
+ if (error) {
+ g_simple_async_result_take_error (init_data->result, error);
+ } else {
+ priv->visible = TRUE;
+ replace_settings (init_data->connection, settings);
+ g_hash_table_destroy (settings);
+ g_simple_async_result_set_op_res_gboolean (init_data->result, TRUE);
+ }
+
+ g_simple_async_result_complete (init_data->result);
+ g_slice_free (NMRemoteConnectionInitData, init_data);
+}
+
+static void
+init_async (GAsyncInitable *initable, int io_priority,
+ GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMRemoteConnectionInitData *init_data;
+ NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (initable);
+
+
+ init_data = g_slice_new0 (NMRemoteConnectionInitData);
+ init_data->connection = NM_REMOTE_CONNECTION (initable);
+ init_data->result = g_simple_async_result_new (G_OBJECT (initable), callback,
+ user_data, init_async);
+
+ dbus_g_proxy_begin_call (priv->proxy, "GetSettings",
+ init_get_settings_cb, init_data, NULL,
+ G_TYPE_INVALID);
- org_freedesktop_NetworkManager_Settings_Connection_get_settings_async (priv->proxy,
- init_get_settings_cb,
- object);
- return object;
}
static void
@@ -415,23 +472,6 @@ set_property (GObject *object, guint prop_id,
}
static void
-get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- NMRemoteConnection *self = NM_REMOTE_CONNECTION (object);
- NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (self);
-
- switch (prop_id) {
- case PROP_INIT_RESULT:
- g_value_set_uint (value, priv->init_result);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
dispose (GObject *object)
{
NMRemoteConnection *self = NM_REMOTE_CONNECTION (object);
@@ -459,9 +499,8 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
/* virtual methods */
object_class->set_property = set_property;
- object_class->get_property = get_property;
object_class->dispose = dispose;
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
/* Properties */
g_object_class_install_property
@@ -472,16 +511,6 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
DBUS_TYPE_G_CONNECTION,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property
- (object_class, PROP_INIT_RESULT,
- g_param_spec_uint (NM_REMOTE_CONNECTION_INIT_RESULT,
- "Initialization result (PRIVATE)",
- "Initialization result (PRIVATE)",
- NM_REMOTE_CONNECTION_INIT_RESULT_UNKNOWN,
- NM_REMOTE_CONNECTION_INIT_RESULT_ERROR,
- NM_REMOTE_CONNECTION_INIT_RESULT_UNKNOWN,
- G_PARAM_READABLE));
-
/* Signals */
/**
* NMRemoteConnection::updated:
@@ -524,3 +553,15 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}
+
+static void
+nm_remote_connection_initable_iface_init (GInitableIface *iface)
+{
+ iface->init = init_sync;
+}
+
+static void
+nm_remote_connection_async_initable_iface_init (GAsyncInitableIface *iface)
+{
+ iface->init_async = init_async;
+}
diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c
index 7658623f6..8f213f9ef 100644
--- a/libnm-glib/nm-remote-settings.c
+++ b/libnm-glib/nm-remote-settings.c
@@ -18,25 +18,32 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2008 Novell, Inc.
- * Copyright (C) 2009 - 2011 Red Hat, Inc.
+ * Copyright (C) 2009 - 2012 Red Hat, Inc.
*/
#include <string.h>
#include <NetworkManager.h>
#include <nm-connection.h>
-#include "nm-marshal.h"
+#include "nm-glib-marshal.h"
#include "nm-dbus-glib-types.h"
#include "nm-remote-settings.h"
-#include "nm-settings-bindings.h"
#include "nm-remote-connection-private.h"
+#include "nm-glib-compat.h"
-G_DEFINE_TYPE (NMRemoteSettings, nm_remote_settings, G_TYPE_OBJECT)
+static void nm_remote_settings_initable_iface_init (GInitableIface *iface);
+static void nm_remote_settings_async_initable_iface_init (GAsyncInitableIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (NMRemoteSettings, nm_remote_settings, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_remote_settings_initable_iface_init);
+ G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, nm_remote_settings_async_initable_iface_init);
+ )
#define NM_REMOTE_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_REMOTE_SETTINGS, NMRemoteSettingsPrivate))
typedef struct {
DBusGConnection *bus;
+ gboolean inited;
DBusGProxy *proxy;
GHashTable *connections;
@@ -96,24 +103,27 @@ nm_remote_settings_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
+/**********************************************************************/
-GType
-nm_remote_settings_error_get_type (void)
+static void
+_nm_remote_settings_ensure_inited (NMRemoteSettings *self)
{
- static GType etype = 0;
+ NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (self);
+ GError *error;
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_REMOTE_SETTINGS_ERROR_UNKNOWN, "UnknownError"),
- ENUM_ENTRY (NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED, "ConnectionRemoved"),
- ENUM_ENTRY (NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE, "ConnectionUnavailable"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMRemoteSettingsError", values);
+ if (!priv->inited) {
+ if (!g_initable_init (G_INITABLE (self), NULL, &error)) {
+ /* Don't warn when the call times out because the settings service can't
+ * be activated or whatever.
+ */
+ if (!g_error_matches (error, DBUS_GERROR, DBUS_GERROR_NO_REPLY)) {
+ g_warning ("%s: (NMRemoteSettings) error initializing: %s\n",
+ __func__, error->message);
+ }
+ g_error_free (error);
+ }
+ priv->inited = TRUE;
}
- return etype;
}
/**********************************************************************/
@@ -175,11 +185,17 @@ add_connection_info_complete (NMRemoteSettings *self,
NMRemoteConnection *
nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings, const char *path)
{
+ NMRemoteSettingsPrivate *priv;
+
g_return_val_if_fail (settings != NULL, NULL);
g_return_val_if_fail (NM_IS_REMOTE_SETTINGS (settings), NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_hash_table_lookup (NM_REMOTE_SETTINGS_GET_PRIVATE (settings)->connections, path);
+ priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings);
+
+ _nm_remote_settings_ensure_inited (settings);
+
+ return priv->service_running ? g_hash_table_lookup (priv->connections, path) : NULL;
}
/**
@@ -195,6 +211,7 @@ nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings, const cha
NMRemoteConnection *
nm_remote_settings_get_connection_by_uuid (NMRemoteSettings *settings, const char *uuid)
{
+ NMRemoteSettingsPrivate *priv;
GHashTableIter iter;
NMRemoteConnection *candidate;
@@ -202,10 +219,16 @@ nm_remote_settings_get_connection_by_uuid (NMRemoteSettings *settings, const cha
g_return_val_if_fail (NM_IS_REMOTE_SETTINGS (settings), NULL);
g_return_val_if_fail (uuid != NULL, NULL);
- g_hash_table_iter_init (&iter, NM_REMOTE_SETTINGS_GET_PRIVATE (settings)->connections);
- while (g_hash_table_iter_next (&iter, NULL, (gpointer) &candidate)) {
- if (g_strcmp0 (uuid, nm_connection_get_uuid (NM_CONNECTION (candidate))) == 0)
- return candidate;
+ priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings);
+
+ _nm_remote_settings_ensure_inited (settings);
+
+ if (priv->service_running) {
+ g_hash_table_iter_init (&iter, priv->connections);
+ while (g_hash_table_iter_next (&iter, NULL, (gpointer) &candidate)) {
+ if (g_strcmp0 (uuid, nm_connection_get_uuid (NM_CONNECTION (candidate))) == 0)
+ return candidate;
+ }
}
return NULL;
@@ -278,37 +301,20 @@ connection_visible_cb (NMRemoteConnection *remote,
}
static void
-connection_init_result_cb (NMRemoteConnection *remote,
- GParamSpec *pspec,
- gpointer user_data)
+connection_inited (GObject *source, GAsyncResult *result, gpointer user_data)
{
+ NMRemoteConnection *remote = NM_REMOTE_CONNECTION (source);
NMRemoteSettings *self = NM_REMOTE_SETTINGS (user_data);
NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (self);
- guint32 init_result = NM_REMOTE_CONNECTION_INIT_RESULT_UNKNOWN;
AddConnectionInfo *addinfo;
const char *path;
- GError *add_error = NULL;
+ GError *error = NULL;
gboolean remove_from_pending = TRUE;
- /* Disconnect from the init-result signal just to be safe */
- g_signal_handlers_disconnect_matched (remote,
- G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
- 0,
- 0,
- NULL,
- G_CALLBACK (connection_init_result_cb),
- self);
-
path = nm_connection_get_path (NM_CONNECTION (remote));
-
- g_object_get (G_OBJECT (remote),
- NM_REMOTE_CONNECTION_INIT_RESULT, &init_result,
- NULL);
-
addinfo = add_connection_info_find (self, remote);
- switch (init_result) {
- case NM_REMOTE_CONNECTION_INIT_RESULT_SUCCESS:
+ if (g_async_initable_init_finish (G_ASYNC_INITABLE (remote), result, &error)) {
/* ref it when adding to ->connections, since removing it from ->pending
* will unref it.
*/
@@ -324,22 +330,20 @@ connection_init_result_cb (NMRemoteConnection *remote,
* its settings and is valid.
*/
g_signal_emit (self, signals[NEW_CONNECTION], 0, remote);
- break;
- case NM_REMOTE_CONNECTION_INIT_RESULT_INVISIBLE:
- remove_from_pending = FALSE;
- /* fall through */
- case NM_REMOTE_CONNECTION_INIT_RESULT_ERROR:
- /* Complete pending AddConnection callbacks */
+ } else {
+ if (dbus_g_error_has_name (error, "org.freedesktop.NetworkManager.Settings.PermissionDenied")) {
+ /* Connection doesn't exist, or isn't visible to this user */
+ remove_from_pending = FALSE;
+ }
+ g_error_free (error);
+
if (addinfo) {
- add_error = g_error_new_literal (NM_REMOTE_SETTINGS_ERROR,
- NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE,
- "Connection not visible or not available");
- add_connection_info_complete (self, addinfo, add_error);
- g_error_free (add_error);
+ error = g_error_new_literal (NM_REMOTE_SETTINGS_ERROR,
+ NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE,
+ "Connection not visible or not available");
+ add_connection_info_complete (self, addinfo, error);
+ g_error_free (error);
}
- break;
- default:
- break;
}
if (remove_from_pending)
@@ -377,9 +381,9 @@ new_connection_cb (DBusGProxy *proxy, const char *path, gpointer user_data)
G_CALLBACK (connection_visible_cb),
self);
- g_signal_connect (connection, "notify::" NM_REMOTE_CONNECTION_INIT_RESULT,
- G_CALLBACK (connection_init_result_cb),
- self);
+ g_async_initable_init_async (G_ASYNC_INITABLE (connection),
+ G_PRIORITY_DEFAULT, NULL,
+ connection_inited, self);
/* Add the connection to the pending table to wait for it to retrieve
* it's settings asynchronously over D-Bus. The connection isn't
@@ -392,15 +396,18 @@ new_connection_cb (DBusGProxy *proxy, const char *path, gpointer user_data)
static void
fetch_connections_done (DBusGProxy *proxy,
- GPtrArray *connections,
- GError *error,
+ DBusGProxyCall *call,
gpointer user_data)
{
NMRemoteSettings *self = NM_REMOTE_SETTINGS (user_data);
NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (self);
+ GPtrArray *connections;
+ GError *error = NULL;
int i;
- if (error) {
+ if (!dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &connections,
+ G_TYPE_INVALID)) {
/* Ignore settings service spawn errors */
if ( !g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN)
&& !g_error_matches (error, DBUS_GERROR, DBUS_GERROR_NAME_HAS_NO_OWNER)) {
@@ -440,9 +447,9 @@ fetch_connections (gpointer user_data)
priv->fetch_id = 0;
- org_freedesktop_NetworkManager_Settings_list_connections_async (priv->proxy,
- fetch_connections_done,
- self);
+ dbus_g_proxy_begin_call (priv->proxy, "ListConnections",
+ fetch_connections_done, self, NULL,
+ G_TYPE_INVALID);
return FALSE;
}
@@ -470,9 +477,13 @@ nm_remote_settings_list_connections (NMRemoteSettings *settings)
priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings);
- g_hash_table_iter_init (&iter, priv->connections);
- while (g_hash_table_iter_next (&iter, NULL, &value))
- list = g_slist_prepend (list, NM_REMOTE_CONNECTION (value));
+ _nm_remote_settings_ensure_inited (settings);
+
+ if (priv->service_running) {
+ g_hash_table_iter_init (&iter, priv->connections);
+ while (g_hash_table_iter_next (&iter, NULL, &value))
+ list = g_slist_prepend (list, NM_REMOTE_CONNECTION (value));
+ }
return list;
}
@@ -525,7 +536,9 @@ nm_remote_settings_add_connection (NMRemoteSettings *settings,
g_return_val_if_fail (callback != NULL, FALSE);
priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings);
-
+
+ _nm_remote_settings_ensure_inited (settings);
+
info = g_malloc0 (sizeof (AddConnectionInfo));
info->self = settings;
info->callback = callback;
@@ -629,6 +642,8 @@ nm_remote_settings_save_hostname (NMRemoteSettings *settings,
priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings);
+ _nm_remote_settings_ensure_inited (settings);
+
info = g_malloc0 (sizeof (SaveHostnameInfo));
info->settings = settings;
info->callback = callback;
@@ -696,35 +711,6 @@ properties_changed_cb (DBusGProxy *proxy,
}
}
-static void
-get_all_cb (DBusGProxy *proxy,
- DBusGProxyCall *call,
- gpointer user_data)
-{
- NMRemoteSettings *self = NM_REMOTE_SETTINGS (user_data);
- GHashTable *props = NULL;
- GError *error = NULL;
-
- if (!dbus_g_proxy_end_call (proxy, call, &error,
- DBUS_TYPE_G_MAP_OF_VARIANT, &props,
- G_TYPE_INVALID)) {
- /* Don't warn when the call times out because the settings service can't
- * be activated or whatever.
- */
- if (!(error->domain == DBUS_GERROR && error->code == DBUS_GERROR_NO_REPLY)) {
- g_warning ("%s: couldn't retrieve system settings properties: (%d) %s.",
- __func__,
- error ? error->code : -1,
- (error && error->message) ? error->message : "(unknown)");
- }
- g_clear_error (&error);
- return;
- }
-
- properties_changed_cb (NULL, props, self);
- g_hash_table_destroy (props);
-}
-
/****************************************************************/
/**
@@ -733,16 +719,84 @@ get_all_cb (DBusGProxy *proxy,
*
* Creates a new object representing the remote settings service.
*
+ * Note that this will do blocking D-Bus calls to initialize the
+ * settings object. You can use nm_remote_settings_new_async() if you
+ * want to avoid that.
+ *
* Returns: the new remote settings object on success, or %NULL on failure
**/
NMRemoteSettings *
nm_remote_settings_new (DBusGConnection *bus)
{
- return (NMRemoteSettings *) g_object_new (NM_TYPE_REMOTE_SETTINGS,
- NM_REMOTE_SETTINGS_BUS, bus,
- NULL);
+ return g_object_new (NM_TYPE_REMOTE_SETTINGS, NM_REMOTE_SETTINGS_BUS, bus, NULL);
+}
+
+static void
+remote_settings_inited (GObject *source, GAsyncResult *result, gpointer user_data)
+{
+ GSimpleAsyncResult *simple = user_data;
+ GError *error = NULL;
+
+ if (!g_async_initable_init_finish (G_ASYNC_INITABLE (source), result, &error))
+ g_simple_async_result_take_error (simple, error);
+ else
+ g_simple_async_result_set_op_res_gpointer (simple, source, g_object_unref);
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
+}
+
+/**
+ * nm_remote_settings_new_async:
+ * @bus: (allow-none): a valid and connected D-Bus connection
+ * @cancellable: a #GCancellable, or %NULL
+ * @callback: callback to call when the settings object is created
+ * @user_data: data for @callback
+ *
+ * Creates a new object representing the remote settings service and
+ * begins asynchronously initializing it. @callback will be called
+ * when it is done; use nm_remote_settings_new_finish() to get the
+ * result.
+ **/
+void
+nm_remote_settings_new_async (DBusGConnection *bus, GCancellable *cancellable,
+ GAsyncReadyCallback callback, gpointer user_data)
+{
+ NMRemoteSettings *self;
+ GSimpleAsyncResult *simple;
+
+ simple = g_simple_async_result_new (NULL, callback, user_data, nm_remote_settings_new_async);
+
+ self = g_object_new (NM_TYPE_REMOTE_SETTINGS,
+ NM_REMOTE_SETTINGS_BUS, bus,
+ NULL);
+ g_async_initable_init_async (G_ASYNC_INITABLE (self), G_PRIORITY_DEFAULT,
+ cancellable, remote_settings_inited, simple);
+}
+
+/**
+ * nm_remote_settings_new_finish:
+ * @result: a #GAsyncResult
+ * @error: location for a #GError, or %NULL
+ *
+ * Gets the result of an nm_remote_settings_new_async() call.
+ *
+ * Returns: a new #NMRemoteSettings object, or %NULL on error
+ **/
+NMRemoteSettings *
+nm_remote_settings_new_finish (GAsyncResult *result, GError **error)
+{
+ GSimpleAsyncResult *simple;
+
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL, nm_remote_settings_new_async), NULL);
+
+ simple = G_SIMPLE_ASYNC_RESULT (result);
+ if (g_simple_async_result_propagate_error (simple, error))
+ return NULL;
+ else
+ return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
+
static void
nm_remote_settings_init (NMRemoteSettings *self)
{
@@ -752,18 +806,10 @@ nm_remote_settings_init (NMRemoteSettings *self)
priv->pending = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
}
-static GObject *
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- GObject *object;
NMRemoteSettingsPrivate *priv;
- GError *error = NULL;
-
- object = G_OBJECT_CLASS (nm_remote_settings_parent_class)->constructor (type, n_construct_params, construct_params);
- if (!object)
- return NULL;
priv = NM_REMOTE_SETTINGS_GET_PRIVATE (object);
@@ -774,7 +820,7 @@ constructor (GType type,
"org.freedesktop.DBus");
g_assert (priv->dbus_proxy);
- dbus_g_object_register_marshaller (_nm_marshal_VOID__STRING_STRING_STRING,
+ dbus_g_object_register_marshaller (_nm_glib_marshal_VOID__STRING_STRING_STRING,
G_TYPE_NONE,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_INVALID);
@@ -786,19 +832,6 @@ constructor (GType type,
G_CALLBACK (name_owner_changed),
object, NULL);
- if (!dbus_g_proxy_call (priv->dbus_proxy, "NameHasOwner", &error,
- G_TYPE_STRING, NM_DBUS_SERVICE,
- G_TYPE_INVALID,
- G_TYPE_BOOLEAN, &priv->service_running,
- G_TYPE_INVALID)) {
- g_warning ("%s (NMRemoteSettings) error getting remote settings service status: (%d) %s\n",
- __func__,
- error ? error->code : -1,
- error && error->message ? error->message : "(unknown)");
- g_error_free (error);
- priv->service_running = FALSE;
- }
-
priv->proxy = dbus_g_proxy_new_for_name (priv->bus,
NM_DBUS_SERVICE,
NM_DBUS_PATH_SETTINGS,
@@ -836,16 +869,136 @@ constructor (GType type,
G_CALLBACK (properties_changed_cb),
object,
NULL);
+}
+
+static gboolean
+init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
+{
+ NMRemoteSettings *settings = NM_REMOTE_SETTINGS (initable);
+ NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (settings);
+ GHashTable *props;
+
+ if (!dbus_g_proxy_call (priv->dbus_proxy, "NameHasOwner", error,
+ G_TYPE_STRING, NM_DBUS_SERVICE,
+ G_TYPE_INVALID,
+ G_TYPE_BOOLEAN, &priv->service_running,
+ G_TYPE_INVALID)) {
+ priv->service_running = FALSE;
+ return FALSE;
+ }
/* Get properties */
+ if (!dbus_g_proxy_call (priv->props_proxy, "GetAll", error,
+ G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS,
+ G_TYPE_INVALID,
+ DBUS_TYPE_G_MAP_OF_VARIANT, &props,
+ G_TYPE_INVALID))
+ return FALSE;
+ properties_changed_cb (priv->props_proxy, props, settings);
+ g_hash_table_destroy (props);
+
+ /* FIXME: need a synchronous fetch_connections too */
+
+ return TRUE;
+}
+
+typedef struct {
+ NMRemoteSettings *settings;
+ GSimpleAsyncResult *result;
+} NMRemoteSettingsInitData;
+
+static void
+init_async_complete (NMRemoteSettingsInitData *init_data)
+{
+ g_simple_async_result_complete (init_data->result);
+ g_object_unref (init_data->result);
+ g_slice_free (NMRemoteSettingsInitData, init_data);
+}
+
+static void
+init_read_connections (NMRemoteSettings *settings, gpointer user_data)
+{
+ NMRemoteSettingsInitData *init_data = user_data;
+
+ g_signal_handlers_disconnect_by_func (settings, G_CALLBACK (init_read_connections), user_data);
+ init_async_complete (init_data);
+}
+
+static void
+init_async_got_properties (DBusGProxy *proxy, DBusGProxyCall *call,
+ gpointer user_data)
+{
+ NMRemoteSettingsInitData *init_data = user_data;
+ NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (init_data->settings);
+ GHashTable *props;
+ GError *error = NULL;
+
+ if (dbus_g_proxy_end_call (proxy, call, &error,
+ DBUS_TYPE_G_MAP_OF_VARIANT, &props,
+ G_TYPE_INVALID)) {
+ properties_changed_cb (priv->props_proxy, props, init_data->settings);
+ g_hash_table_destroy (props);
+ g_simple_async_result_set_op_res_gboolean (init_data->result, TRUE);
+ } else
+ g_simple_async_result_take_error (init_data->result, error);
+
+ if (priv->init_left) {
+ /* Still creating initial connections; wait for that to complete */
+ g_signal_connect (init_data->settings, "connections-read",
+ G_CALLBACK (init_read_connections), init_data);
+ return;
+ }
+
+ init_async_complete (init_data);
+}
+
+static void
+init_async_got_manager_running (DBusGProxy *proxy, DBusGProxyCall *call,
+ gpointer user_data)
+{
+ NMRemoteSettingsInitData *init_data = user_data;
+ NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (init_data->settings);
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call, &error,
+ G_TYPE_BOOLEAN, &priv->service_running,
+ G_TYPE_INVALID)) {
+ g_simple_async_result_take_error (init_data->result, error);
+ init_async_complete (init_data);
+ return;
+ }
+
+ if (!priv->service_running) {
+ g_simple_async_result_set_op_res_gboolean (init_data->result, TRUE);
+ init_async_complete (init_data);
+ return;
+ }
+
dbus_g_proxy_begin_call (priv->props_proxy, "GetAll",
- get_all_cb,
- object,
- NULL,
+ init_async_got_properties, init_data, NULL,
G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS,
- G_TYPE_INVALID);
+ G_TYPE_INVALID);
+}
- return object;
+static void
+init_async (GAsyncInitable *initable, int io_priority,
+ GCancellable *cancellable, GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMRemoteSettingsInitData *init_data;
+ NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (initable);
+
+ init_data = g_slice_new0 (NMRemoteSettingsInitData);
+ init_data->settings = NM_REMOTE_SETTINGS (initable);
+ init_data->result = g_simple_async_result_new (G_OBJECT (initable), callback,
+ user_data, init_async);
+
+ /* Check if NM is running */
+ dbus_g_proxy_begin_call (priv->dbus_proxy, "NameHasOwner",
+ init_async_got_manager_running,
+ init_data, NULL,
+ G_TYPE_STRING, NM_DBUS_SERVICE,
+ G_TYPE_INVALID);
}
static void
@@ -935,7 +1088,7 @@ nm_remote_settings_class_init (NMRemoteSettingsClass *class)
g_type_class_add_private (class, sizeof (NMRemoteSettingsPrivate));
/* Virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->dispose = dispose;
@@ -993,3 +1146,14 @@ nm_remote_settings_class_init (NMRemoteSettingsClass *class)
G_TYPE_NONE, 0);
}
+static void
+nm_remote_settings_initable_iface_init (GInitableIface *iface)
+{
+ iface->init = init_sync;
+}
+
+static void
+nm_remote_settings_async_initable_iface_init (GAsyncInitableIface *iface)
+{
+ iface->init_async = init_async;
+}
diff --git a/libnm-glib/nm-remote-settings.h b/libnm-glib/nm-remote-settings.h
index e882e4fa1..dd6c5a344 100644
--- a/libnm-glib/nm-remote-settings.h
+++ b/libnm-glib/nm-remote-settings.h
@@ -24,7 +24,7 @@
#ifndef NM_REMOTE_SETTINGS_H
#define NM_REMOTE_SETTINGS_H
-#include <glib.h>
+#include <gio/gio.h>
#include <dbus/dbus-glib.h>
#include <nm-connection.h>
#include <nm-remote-connection.h>
@@ -50,14 +50,11 @@ G_BEGIN_DECLS
*
**/
typedef enum {
- NM_REMOTE_SETTINGS_ERROR_UNKNOWN = 0,
- NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED,
- NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE,
+ NM_REMOTE_SETTINGS_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED, /*< nick=ConnectionRemoved >*/
+ NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE, /*< nick=ConnectionUnavailable >*/
} NMRemoteSettingsError;
-#define NM_TYPE_REMOTE_SETTINGS_ERROR (nm_remote_settings_error_get_type ())
-GType nm_remote_settings_error_get_type (void);
-
#define NM_REMOTE_SETTINGS_ERROR nm_remote_settings_error_quark ()
GQuark nm_remote_settings_error_quark (void);
@@ -110,6 +107,13 @@ GType nm_remote_settings_get_type (void);
NMRemoteSettings *nm_remote_settings_new (DBusGConnection *bus);
+void nm_remote_settings_new_async (DBusGConnection *bus,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+NMRemoteSettings *nm_remote_settings_new_finish (GAsyncResult *result,
+ GError **error);
+
GSList *nm_remote_settings_list_connections (NMRemoteSettings *settings);
NMRemoteConnection * nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings,
diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c
index 1b4131710..19f55c0e2 100644
--- a/libnm-glib/nm-secret-agent.c
+++ b/libnm-glib/nm-secret-agent.c
@@ -25,7 +25,8 @@
#include <dbus/dbus-glib-lowlevel.h>
#include "nm-secret-agent.h"
-#include "nm-marshal.h"
+#include "nm-glib-enum-types.h"
+#include "nm-glib-marshal.h"
#include "NetworkManager.h"
static void impl_secret_agent_get_secrets (NMSecretAgent *self,
@@ -86,6 +87,7 @@ enum {
PROP_0,
PROP_IDENTIFIER,
PROP_AUTO_REGISTER,
+ PROP_REGISTERED,
LAST_PROP
};
@@ -111,34 +113,6 @@ nm_secret_agent_error_quark (void)
return ret;
}
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_secret_agent_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Sender is not authorized to make this request */
- ENUM_ENTRY (NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED, "NotAuthorized"),
- /* Given connection details do not make a valid connection */
- ENUM_ENTRY (NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, "InvalidConnection"),
- /* The request was canceled explicitly by the user */
- ENUM_ENTRY (NM_SECRET_AGENT_ERROR_USER_CANCELED, "UserCanceled"),
- /* The request was canceled, but not by the user */
- ENUM_ENTRY (NM_SECRET_AGENT_ERROR_AGENT_CANCELED, "AgentCanceled"),
- /* Some internal error prevented returning secrets */
- ENUM_ENTRY (NM_SECRET_AGENT_ERROR_INTERNAL_ERROR, "InternalError"),
- /* No secrets could be found to fulfill the request */
- ENUM_ENTRY (NM_SECRET_AGENT_ERROR_NO_SECRETS, "NoSecrets"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSecretAgentError", values);
- }
- return etype;
-}
-
/*************************************************************/
static const char *
@@ -172,6 +146,7 @@ _internal_unregister (NMSecretAgent *self)
if (priv->registered) {
dbus_g_connection_unregister_g_object (priv->bus, G_OBJECT (self));
priv->registered = FALSE;
+ g_object_notify (G_OBJECT (self), NM_SECRET_AGENT_REGISTERED);
}
}
@@ -536,9 +511,10 @@ reg_request_cb (DBusGProxy *proxy,
priv->reg_call = NULL;
- if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID))
+ if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) {
priv->registered = TRUE;
- else {
+ g_object_notify (G_OBJECT (self), NM_SECRET_AGENT_REGISTERED);
+ } else {
/* If registration failed we shouldn't expose ourselves on the bus */
_internal_unregister (self);
}
@@ -634,6 +610,21 @@ nm_secret_agent_unregister (NMSecretAgent *self)
return TRUE;
}
+/**
+ * nm_secret_agent_get_registered:
+ * @self: a #NMSecretAgent
+ *
+ * Returns: a %TRUE if the agent is registered, %FALSE if it is not.
+ **/
+gboolean
+nm_secret_agent_get_registered (NMSecretAgent *self)
+{
+ g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_SECRET_AGENT (self), FALSE);
+
+ return NM_SECRET_AGENT_GET_PRIVATE (self)->registered;
+}
+
static gboolean
auto_register_cb (gpointer user_data)
{
@@ -655,7 +646,7 @@ auto_register_cb (gpointer user_data)
* @setting_name: the name of the secret setting
* @hints: (array zero-terminated=1): hints to the agent
* @flags: flags that modify the behavior of the request
- * @callback: (scope async): a callback, invoked when the operation is done
+ * @callback: (scope async): a callback, to be invoked when the operation is done
* @user_data: (closure): caller-specific data to be passed to @callback
*
* Asyncronously retrieve secrets belonging to @connection for the
@@ -698,7 +689,7 @@ nm_secret_agent_get_secrets (NMSecretAgent *self,
* nm_secret_agent_save_secrets:
* @self: a #NMSecretAgent
* @connection: a #NMConnection
- * @callback: (scope async): a callback, invoked when the operation is done
+ * @callback: (scope async): a callback, to be invoked when the operation is done
* @user_data: (closure): caller-specific data to be passed to @callback
*
* Asyncronously ensure that all secrets inside @connection
@@ -729,7 +720,7 @@ nm_secret_agent_save_secrets (NMSecretAgent *self,
* nm_secret_agent_delete_secrets:
* @self: a #NMSecretAgent
* @connection: a #NMConnection
- * @callback: (scope async): a callback, invoked when the operation is done
+ * @callback: (scope async): a callback, to be invoked when the operation is done
* @user_data: (closure): caller-specific data to be passed to @callback
*
* Asynchronously ask the agent to delete all saved secrets belonging to
@@ -806,7 +797,7 @@ nm_secret_agent_init (NMSecretAgent *self)
return;
}
- dbus_g_object_register_marshaller (_nm_marshal_VOID__STRING_STRING_STRING,
+ dbus_g_object_register_marshaller (_nm_glib_marshal_VOID__STRING_STRING_STRING,
G_TYPE_NONE,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_INVALID);
@@ -845,6 +836,9 @@ get_property (GObject *object,
case PROP_AUTO_REGISTER:
g_value_set_boolean (value, priv->auto_register);
break;
+ case PROP_REGISTERED:
+ g_value_set_boolean (value, priv->registered);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -963,6 +957,19 @@ nm_secret_agent_class_init (NMSecretAgentClass *class)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
/**
+ * NMSecretAgent:registered:
+ *
+ * %TRUE if the agent is registered with NetworkManager, %FALSE if not.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_REGISTERED,
+ g_param_spec_boolean (NM_SECRET_AGENT_REGISTERED,
+ "Registered",
+ "Registered",
+ FALSE,
+ G_PARAM_READABLE));
+
+ /**
* NMSecretAgent::registration-result:
* @agent: the agent that received the signal
* @error: the error, if any, that occured while registering
diff --git a/libnm-glib/nm-secret-agent.h b/libnm-glib/nm-secret-agent.h
index 2e0cce407..c367f9167 100644
--- a/libnm-glib/nm-secret-agent.h
+++ b/libnm-glib/nm-secret-agent.h
@@ -26,18 +26,16 @@
G_BEGIN_DECLS
#define NM_SECRET_AGENT_ERROR (nm_secret_agent_error_quark ())
-#define NM_TYPE_SECRET_AGENT_ERROR (nm_secret_agent_error_get_type ())
GQuark nm_secret_agent_error_quark (void);
-GType nm_secret_agent_error_get_type (void);
typedef enum {
- NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED = 0,
- NM_SECRET_AGENT_ERROR_INVALID_CONNECTION,
- NM_SECRET_AGENT_ERROR_USER_CANCELED,
- NM_SECRET_AGENT_ERROR_AGENT_CANCELED,
- NM_SECRET_AGENT_ERROR_INTERNAL_ERROR,
- NM_SECRET_AGENT_ERROR_NO_SECRETS,
+ NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED = 0, /*< nick=NotAuthorized >*/
+ NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, /*< nick=InvalidConnection >*/
+ NM_SECRET_AGENT_ERROR_USER_CANCELED, /*< nick=UserCanceled >*/
+ NM_SECRET_AGENT_ERROR_AGENT_CANCELED, /*< nick=AgentCanceled >*/
+ NM_SECRET_AGENT_ERROR_INTERNAL_ERROR, /*< nick=InternalError >*/
+ NM_SECRET_AGENT_ERROR_NO_SECRETS, /*< nick=NoSecrets >*/
} NMSecretAgentError;
/**
@@ -70,6 +68,7 @@ typedef enum {
#define NM_SECRET_AGENT_IDENTIFIER "identifier"
#define NM_SECRET_AGENT_AUTO_REGISTER "auto-register"
+#define NM_SECRET_AGENT_REGISTERED "registered"
#define NM_SECRET_AGENT_REGISTRATION_RESULT "registration-result"
@@ -77,17 +76,82 @@ typedef struct {
GObject parent;
} NMSecretAgent;
+/**
+ * NMSecretAgentGetSecretsFunc:
+ * @agent: the secret agent object
+ * @connection: the connection for which secrets were requested
+ * @secrets: (element-type utf8 GLib.HashTable): the #GHashTable containing
+ * the requested secrets in the same format as an #NMConnection hash (as
+ * created by nm_connection_to_hash() for example). Each key in @secrets
+ * should be the name of a #NMSetting object (like "802-11-wireless-security")
+ * and each value should be a #GHashTable. The sub-hashes map string:#GValue
+ * where the string is the setting property name (like "psk") and the value
+ * is the secret
+ * @error: if the secrets request failed, give a descriptive error here
+ * @user_data: caller-specific data to be passed to the function
+ *
+ * Called as a result of a request by NM to retrieve secrets. When the
+ * #NMSecretAgent subclass has finished retrieving secrets and is ready to
+ * return them, or to return an error, this function should be called with
+ * those secrets or the error.
+ *
+ * To easily create the hash table to return the WiFi PSK, you could do
+ * something like this:
+ * <example>
+ * <title>Creating a secrets hash</title>
+ * <programlisting>
+ * NMConnection *secrets;
+ * NMSettingWirelessSecurity *s_wsec;
+ * GHashTable *secrets_hash;
+ *
+ * secrets = nm_connection_new ();
+ * s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+ * g_object_set (G_OBJECT (s_wsec),
+ * NM_SETTING_WIRELESS_SECURITY_PSK, "my really cool PSK",
+ * NULL);
+ * nm_connection_add_setting (secrets, NM_SETTING (s_wsec));
+ * secrets_hash = nm_connection_to_hash (secrets);
+ *
+ * (call the NMSecretAgentGetSecretsFunc with secrets_hash)
+ *
+ * g_object_unref (secrets);
+ * g_hash_table_unref (secrets_hash);
+ * </programlisting>
+ * </example>
+ */
typedef void (*NMSecretAgentGetSecretsFunc) (NMSecretAgent *agent,
NMConnection *connection,
GHashTable *secrets,
GError *error,
gpointer user_data);
+/**
+ * NMSecretAgentSaveSecretsFunc:
+ * @agent: the secret agent object
+ * @connection: the connection for which secrets were to be saved
+ * @error: if the saving secrets failed, give a descriptive error here
+ * @user_data: caller-specific data to be passed to the function
+ *
+ * Called as a result of a request by NM to save secrets. When the
+ * #NMSecretAgent subclass has finished saving the secrets, this function
+ * should be called.
+ */
typedef void (*NMSecretAgentSaveSecretsFunc) (NMSecretAgent *agent,
NMConnection *connection,
GError *error,
gpointer user_data);
+/**
+ * NMSecretAgentDeleteSecretsFunc:
+ * @agent: the secret agent object
+ * @connection: the connection for which secrets were to be deleted
+ * @error: if the deleting secrets failed, give a descriptive error here
+ * @user_data: caller-specific data to be passed to the function
+ *
+ * Called as a result of a request by NM to delete secrets. When the
+ * #NMSecretAgent subclass has finished deleting the secrets, this function
+ * should be called.
+ */
typedef void (*NMSecretAgentDeleteSecretsFunc) (NMSecretAgent *agent,
NMConnection *connection,
GError *error,
@@ -166,6 +230,8 @@ gboolean nm_secret_agent_register (NMSecretAgent *self);
gboolean nm_secret_agent_unregister (NMSecretAgent *self);
+gboolean nm_secret_agent_get_registered (NMSecretAgent *self);
+
void nm_secret_agent_get_secrets (NMSecretAgent *self,
NMConnection *connection,
const char *setting_name,
diff --git a/libnm-glib/nm-types.c b/libnm-glib/nm-types.c
index 6d76787d0..098af8d8e 100644
--- a/libnm-glib/nm-types.c
+++ b/libnm-glib/nm-types.c
@@ -172,9 +172,9 @@ nm_string_array_get_type (void)
gboolean
_nm_string_array_demarshal (GValue *value, GPtrArray **dest)
{
- GPtrArray *array;
+ char **array;
- if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_STRING))
+ if (!G_VALUE_HOLDS (value, G_TYPE_STRV))
return FALSE;
if (*dest) {
@@ -182,13 +182,13 @@ _nm_string_array_demarshal (GValue *value, GPtrArray **dest)
*dest = NULL;
}
- array = (GPtrArray *) g_value_get_boxed (value);
- if (array && array->len) {
+ array = (char **) g_value_get_boxed (value);
+ if (array && array[0]) {
int i;
- *dest = g_ptr_array_sized_new (array->len);
- for (i = 0; i < array->len; i++)
- g_ptr_array_add (*dest, g_strdup (g_ptr_array_index (array, i)));
+ *dest = g_ptr_array_new ();
+ for (i = 0; array[i]; i++)
+ g_ptr_array_add (*dest, g_strdup (array[i]));
}
return TRUE;
@@ -323,11 +323,11 @@ _nm_ip6_address_array_copy (GPtrArray *src)
dest = g_ptr_array_sized_new (src->len);
for (i = 0; i < src->len; i++) {
struct in6_addr *addr = g_ptr_array_index (src, i);
- struct in6_addr *dup;
+ struct in6_addr *copy;
- dup = g_malloc0 (sizeof (struct in6_addr));
- memcpy (dup, addr, sizeof (struct in6_addr));
- g_ptr_array_add (dest, dup);
+ copy = g_malloc0 (sizeof (struct in6_addr));
+ memcpy (copy, addr, sizeof (struct in6_addr));
+ g_ptr_array_add (dest, copy);
}
return dest;
}
diff --git a/libnm-glib/nm-types.h b/libnm-glib/nm-types.h
index cb1bf872e..adccafb72 100644
--- a/libnm-glib/nm-types.h
+++ b/libnm-glib/nm-types.h
@@ -26,6 +26,8 @@
#include <glib.h>
#include <glib-object.h>
+#include <nm-glib-enum-types.h>
+
G_BEGIN_DECLS
#define NM_TYPE_SSID (nm_ssid_get_type ())
diff --git a/libnm-glib/nm-vpn-connection.c b/libnm-glib/nm-vpn-connection.c
index dd219b2a1..539342169 100644
--- a/libnm-glib/nm-vpn-connection.c
+++ b/libnm-glib/nm-vpn-connection.c
@@ -18,15 +18,14 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <string.h>
#include "nm-vpn-connection.h"
#include "NetworkManager.h"
#include "nm-utils.h"
-#include "nm-vpn-connection-bindings.h"
-#include "nm-marshal.h"
+#include "nm-glib-marshal.h"
#include "nm-object-private.h"
#include "nm-active-connection.h"
@@ -81,6 +80,15 @@ nm_vpn_connection_new (DBusGConnection *connection, const char *path)
NULL);
}
+/**
+ * nm_vpn_connection_get_banner:
+ * @vpn: a #NMVPNConnection
+ *
+ * Gets the VPN login banner of the active #NMVPNConnection.
+ *
+ * Returns: the VPN login banner of the VPN connection. This is the internal
+ * string used by the connection, and must not be modified.
+ **/
const char *
nm_vpn_connection_get_banner (NMVPNConnection *vpn)
{
@@ -89,37 +97,31 @@ nm_vpn_connection_get_banner (NMVPNConnection *vpn)
g_return_val_if_fail (NM_IS_VPN_CONNECTION (vpn), NULL);
priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn);
+
+ /* We need to update vpn_state first in case it's unknown. */
+ _nm_object_ensure_inited (NM_OBJECT (vpn));
+
if (priv->vpn_state != NM_VPN_CONNECTION_STATE_ACTIVATED)
return NULL;
- if (!priv->banner) {
- priv->banner = _nm_object_get_string_property (NM_OBJECT (vpn),
- NM_DBUS_INTERFACE_VPN_CONNECTION,
- DBUS_PROP_BANNER,
- NULL);
- if (priv->banner && !strlen (priv->banner)) {
- g_free (priv->banner);
- priv->banner = NULL;
- }
- }
return priv->banner;
}
+/**
+ * nm_vpn_connection_get_vpn_state:
+ * @vpn: a #NMVPNConnection
+ *
+ * Gets the current #NMVPNConnection state.
+ *
+ * Returns: the VPN state of the active VPN connection.
+ **/
NMVPNConnectionState
nm_vpn_connection_get_vpn_state (NMVPNConnection *vpn)
{
- NMVPNConnectionPrivate *priv;
-
g_return_val_if_fail (NM_IS_VPN_CONNECTION (vpn), NM_VPN_CONNECTION_STATE_UNKNOWN);
- priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn);
- if (priv->vpn_state == NM_VPN_CONNECTION_STATE_UNKNOWN) {
- priv->vpn_state = _nm_object_get_uint_property (NM_OBJECT (vpn),
- NM_DBUS_INTERFACE_VPN_CONNECTION,
- DBUS_PROP_VPN_STATE,
- NULL);
- }
- return priv->vpn_state;
+ _nm_object_ensure_inited (NM_OBJECT (vpn));
+ return NM_VPN_CONNECTION_GET_PRIVATE (vpn)->vpn_state;
}
static void
@@ -147,28 +149,36 @@ nm_vpn_connection_init (NMVPNConnection *connection)
priv->vpn_state = NM_VPN_CONNECTION_STATE_UNKNOWN;
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+register_properties (NMVPNConnection *connection)
+{
+ NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection);
+ const NMPropertiesInfo property_info[] = {
+ { NM_VPN_CONNECTION_BANNER, &priv->banner },
+ { NM_VPN_CONNECTION_VPN_STATE, &priv->vpn_state },
+ { NULL },
+ };
+
+ _nm_object_register_properties (NM_OBJECT (connection),
+ priv->proxy,
+ property_info);
+}
+
+static void
+constructed (GObject *object)
{
- NMObject *object;
NMVPNConnectionPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_vpn_connection_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_vpn_connection_parent_class)->constructed (object);
priv = NM_VPN_CONNECTION_GET_PRIVATE (object);
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (object),
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_VPN_CONNECTION);
- dbus_g_object_register_marshaller (_nm_marshal_VOID__UINT_UINT,
+ dbus_g_object_register_marshaller (_nm_glib_marshal_VOID__UINT_UINT,
G_TYPE_NONE,
G_TYPE_UINT, G_TYPE_UINT,
G_TYPE_INVALID);
@@ -178,7 +188,8 @@ constructor (GType type,
G_CALLBACK (vpn_state_changed_proxy),
object,
NULL);
- return G_OBJECT (object);
+
+ register_properties (NM_VPN_CONNECTION (object));
}
static void
@@ -221,7 +232,7 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class)
g_type_class_add_private (connection_class, sizeof (NMVPNConnectionPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->finalize = finalize;
@@ -260,7 +271,7 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMVPNConnectionClass, vpn_state_changed),
NULL, NULL,
- _nm_marshal_VOID__UINT_UINT,
+ _nm_glib_marshal_VOID__UINT_UINT,
G_TYPE_NONE, 2,
G_TYPE_UINT, G_TYPE_UINT);
}
diff --git a/libnm-glib/nm-vpn-enum-types.c b/libnm-glib/nm-vpn-enum-types.c
new file mode 100644
index 000000000..fb0de17c5
--- /dev/null
+++ b/libnm-glib/nm-vpn-enum-types.c
@@ -0,0 +1,61 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#include "nm-vpn-enum-types.h"
+
+#include "nm-vpn-plugin.h"
+#include "nm-vpn-plugin-ui-interface.h"
+#include "nm-vpn-plugin-utils.h"
+
+GType
+nm_vpn_plugin_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_VPN_PLUGIN_ERROR_GENERAL, "NM_VPN_PLUGIN_ERROR_GENERAL", "General" },
+ { NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, "NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS", "StartingInProgress" },
+ { NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, "NM_VPN_PLUGIN_ERROR_ALREADY_STARTED", "AlreadyStarted" },
+ { NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, "NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS", "StoppingInProgress" },
+ { NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, "NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED", "AlreadyStopped" },
+ { NM_VPN_PLUGIN_ERROR_WRONG_STATE, "NM_VPN_PLUGIN_ERROR_WRONG_STATE", "WrongState" },
+ { NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, "NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS", "BadArguments" },
+ { NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, "NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED", "LaunchFailed" },
+ { NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, "NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMVPNPluginError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_vpn_plugin_ui_interface_prop_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_VPN_PLUGIN_UI_INTERFACE_PROP_FIRST, "NM_VPN_PLUGIN_UI_INTERFACE_PROP_FIRST", "first" },
+ { NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME, "NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME", "name" },
+ { NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC, "NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC", "desc" },
+ { NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE, "NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE", "service" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMVpnPluginUiInterfaceProp"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+
+
diff --git a/libnm-glib/nm-vpn-enum-types.h b/libnm-glib/nm-vpn-enum-types.h
new file mode 100644
index 000000000..86bb97f18
--- /dev/null
+++ b/libnm-glib/nm-vpn-enum-types.h
@@ -0,0 +1,21 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#ifndef __NM_VPN_ENUM_TYPES_H__
+#define __NM_VPN_ENUM_TYPES_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+GType nm_vpn_plugin_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_VPN_PLUGIN_ERROR (nm_vpn_plugin_error_get_type ())
+GType nm_vpn_plugin_ui_interface_prop_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_VPN_PLUGIN_UI_INTERFACE_PROP (nm_vpn_plugin_ui_interface_prop_get_type ())
+G_END_DECLS
+
+#endif /* __NM_VPN_ENUM_TYPES_H__ */
+
+
+
diff --git a/libnm-glib/nm-vpn-plugin.c b/libnm-glib/nm-vpn-plugin.c
index 4c3813e34..23685384a 100644
--- a/libnm-glib/nm-vpn-plugin.c
+++ b/libnm-glib/nm-vpn-plugin.c
@@ -24,6 +24,7 @@
#include <signal.h>
#include "nm-glib-compat.h"
#include "nm-vpn-plugin.h"
+#include "nm-vpn-enum-types.h"
#include "nm-utils.h"
#include "nm-connection.h"
#include "nm-dbus-glib-types.h"
@@ -107,33 +108,6 @@ nm_vpn_plugin_error_quark (void)
return quark;
}
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_vpn_plugin_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_GENERAL, "General"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, "StartingInProgress"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, "AlreadyStarted"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, "StoppingInProgress"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, "AlreadyStopped"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_WRONG_STATE, "WrongState"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, "BadArguments"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, "LaunchFailed"),
- ENUM_ENTRY (NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- { 0, 0, 0 }
- };
-
- etype = g_enum_register_static ("NMVPNPluginError", values);
- }
-
- return etype;
-}
-
static void
nm_vpn_plugin_set_connection (NMVPNPlugin *plugin,
diff --git a/libnm-glib/nm-vpn-plugin.h b/libnm-glib/nm-vpn-plugin.h
index 8a3c2f1d6..15cbf686c 100644
--- a/libnm-glib/nm-vpn-plugin.h
+++ b/libnm-glib/nm-vpn-plugin.h
@@ -43,19 +43,18 @@ G_BEGIN_DECLS
#define NM_VPN_PLUGIN_STATE "state"
typedef enum {
- NM_VPN_PLUGIN_ERROR_GENERAL,
- NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS,
- NM_VPN_PLUGIN_ERROR_ALREADY_STARTED,
- NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS,
- NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED,
- NM_VPN_PLUGIN_ERROR_WRONG_STATE,
- NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
- NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
- NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
+ NM_VPN_PLUGIN_ERROR_GENERAL, /*< nick=General >*/
+ NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, /*< nick=StartingInProgress >*/
+ NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, /*< nick=AlreadyStarted >*/
+ NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, /*< nick=StoppingInProgress >*/
+ NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, /*< nick=AlreadyStopped >*/
+ NM_VPN_PLUGIN_ERROR_WRONG_STATE, /*< nick=WrongState >*/
+ NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, /*< nick=BadArguments >*/
+ NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, /*< nick=LaunchFailed >*/
+ NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
} NMVPNPluginError;
#define NM_VPN_PLUGIN_ERROR (nm_vpn_plugin_error_quark ())
-#define NM_TYPE_VPN_PLUGIN_ERROR (nm_vpn_plugin_error_get_type ())
typedef struct {
GObject parent;
diff --git a/libnm-glib/nm-wimax-nsp.c b/libnm-glib/nm-wimax-nsp.c
index 214784990..c3b222df1 100644
--- a/libnm-glib/nm-wimax-nsp.c
+++ b/libnm-glib/nm-wimax-nsp.c
@@ -90,18 +90,10 @@ nm_wimax_nsp_new (DBusGConnection *connection, const char *path)
const char *
nm_wimax_nsp_get_name (NMWimaxNsp *nsp)
{
- NMWimaxNspPrivate *priv;
-
g_return_val_if_fail (NM_IS_WIMAX_NSP (nsp), NULL);
- priv = NM_WIMAX_NSP_GET_PRIVATE (nsp);
- if (!priv->name)
- priv->name = _nm_object_get_string_property (NM_OBJECT (nsp),
- NM_DBUS_INTERFACE_WIMAX_NSP,
- DBUS_PROP_NAME,
- NULL);
-
- return priv->name;
+ _nm_object_ensure_inited (NM_OBJECT (nsp));
+ return NM_WIMAX_NSP_GET_PRIVATE (nsp)->name;
}
/**
@@ -115,19 +107,10 @@ nm_wimax_nsp_get_name (NMWimaxNsp *nsp)
guint32
nm_wimax_nsp_get_signal_quality (NMWimaxNsp *nsp)
{
- NMWimaxNspPrivate *priv;
-
g_return_val_if_fail (NM_IS_WIMAX_NSP (nsp), 0);
- priv = NM_WIMAX_NSP_GET_PRIVATE (nsp);
- if (!priv->signal_quality) {
- priv->signal_quality = _nm_object_get_uint_property (NM_OBJECT (nsp),
- NM_DBUS_INTERFACE_WIMAX_NSP,
- DBUS_PROP_SIGNAL_QUALITY,
- NULL);
- }
-
- return priv->signal_quality;
+ _nm_object_ensure_inited (NM_OBJECT (nsp));
+ return NM_WIMAX_NSP_GET_PRIVATE (nsp)->signal_quality;
}
/**
@@ -141,19 +124,10 @@ nm_wimax_nsp_get_signal_quality (NMWimaxNsp *nsp)
NMWimaxNspNetworkType
nm_wimax_nsp_get_network_type (NMWimaxNsp *nsp)
{
- NMWimaxNspPrivate *priv;
-
g_return_val_if_fail (NM_IS_WIMAX_NSP (nsp), NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN);
- priv = NM_WIMAX_NSP_GET_PRIVATE (nsp);
- if (!priv->network_type) {
- priv->network_type = _nm_object_get_uint_property (NM_OBJECT (nsp),
- NM_DBUS_INTERFACE_WIMAX_NSP,
- DBUS_PROP_NETWORK_TYPE,
- NULL);
- }
-
- return priv->network_type;
+ _nm_object_ensure_inited (NM_OBJECT (nsp));
+ return NM_WIMAX_NSP_GET_PRIVATE (nsp)->network_type;
}
/**
@@ -290,43 +264,36 @@ get_property (GObject *object,
}
static void
-register_for_property_changed (NMWimaxNsp *nsp)
+register_properties (NMWimaxNsp *nsp)
{
NMWimaxNspPrivate *priv = NM_WIMAX_NSP_GET_PRIVATE (nsp);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_WIMAX_NSP_SIGNAL_QUALITY, _nm_object_demarshal_generic, &priv->signal_quality },
+ const NMPropertiesInfo property_info[] = {
+ { NM_WIMAX_NSP_NAME, &priv->name },
+ { NM_WIMAX_NSP_SIGNAL_QUALITY, &priv->signal_quality },
+ { NM_WIMAX_NSP_NETWORK_TYPE, &priv->network_type },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (nsp),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (nsp),
+ priv->proxy,
+ property_info);
}
-static GObject*
-constructor (GType type,
- guint n_construct_params,
- GObjectConstructParam *construct_params)
+static void
+constructed (GObject *object)
{
- NMObject *object;
NMWimaxNspPrivate *priv;
- object = (NMObject *) G_OBJECT_CLASS (nm_wimax_nsp_parent_class)->constructor (type,
- n_construct_params,
- construct_params);
- if (!object)
- return NULL;
+ G_OBJECT_CLASS (nm_wimax_nsp_parent_class)->constructed (object);
priv = NM_WIMAX_NSP_GET_PRIVATE (object);
- priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (object),
+ priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
- nm_object_get_path (object),
+ nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_WIMAX_NSP);
- register_for_property_changed (NM_WIMAX_NSP (object));
-
- return G_OBJECT (object);
+ register_properties (NM_WIMAX_NSP (object));
}
@@ -338,7 +305,7 @@ nm_wimax_nsp_class_init (NMWimaxNspClass *nsp_class)
g_type_class_add_private (nsp_class, sizeof (NMWimaxNspPrivate));
/* virtual methods */
- object_class->constructor = constructor;
+ object_class->constructed = constructed;
object_class->get_property = get_property;
object_class->dispose = dispose;
object_class->finalize = finalize;
diff --git a/libnm-glib/tests/Makefile.am b/libnm-glib/tests/Makefile.am
index 06aee7125..0dba0793c 100644
--- a/libnm-glib/tests/Makefile.am
+++ b/libnm-glib/tests/Makefile.am
@@ -1,6 +1,8 @@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib
noinst_PROGRAMS = test-remote-settings-client
diff --git a/libnm-glib/tests/Makefile.in b/libnm-glib/tests/Makefile.in
index 0fcd5f86d..ad4d1c447 100644
--- a/libnm-glib/tests/Makefile.in
+++ b/libnm-glib/tests/Makefile.in
@@ -143,6 +143,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -197,11 +199,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -212,6 +218,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -251,6 +258,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,7 +325,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib
diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am
index 1327565ae..4d3afc828 100644
--- a/libnm-util/Makefile.am
+++ b/libnm-util/Makefile.am
@@ -1,6 +1,8 @@
+include $(GLIB_MAKEFILE)
+
SUBDIRS=. tests
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/include
+INCLUDES = -I${top_srcdir} -I${top_srcdir}/include -I${top_builddir}/include
lib_LTLIBRARIES=libnm-util.la
@@ -15,8 +17,11 @@ libnm_util_include_HEADERS = \
nm-setting.h \
nm-setting-8021x.h \
nm-setting-bluetooth.h \
+ nm-setting-bond.h \
nm-setting-connection.h \
+ nm-setting-infiniband.h \
nm-setting-ip4-config.h \
+ nm-setting-vlan.h \
nm-setting-ip6-config.h \
nm-setting-ppp.h \
nm-setting-pppoe.h \
@@ -29,6 +34,7 @@ libnm_util_include_HEADERS = \
nm-setting-wireless.h \
nm-setting-wireless-security.h \
nm-setting-vpn.h \
+ nm-utils-enum-types.h \
nm-utils.h
libnm_util_la_private_headers = \
@@ -44,8 +50,11 @@ libnm_util_la_csources = \
nm-setting.c \
nm-setting-8021x.c \
nm-setting-bluetooth.c \
+ nm-setting-bond.c \
nm-setting-connection.c \
+ nm-setting-infiniband.c \
nm-setting-ip4-config.c \
+ nm-setting-vlan.c \
nm-setting-ip6-config.c \
nm-setting-ppp.c \
nm-setting-pppoe.c \
@@ -58,18 +67,25 @@ libnm_util_la_csources = \
nm-setting-wireless.c \
nm-setting-wireless-security.c \
nm-setting-vpn.c \
+ nm-utils-enum-types.c \
nm-utils.c
libnm_util_la_SOURCES = \
$(libnm_util_la_csources) \
$(libnm_util_la_private_headers)
+GLIB_GENERATED = nm-utils-enum-types.h nm-utils-enum-types.c
+BUILT_SOURCES = $(GLIB_GENERATED)
+nm_utils_enum_types_sources = $(libnm_util_include_HEADERS)
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
+
libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS)
SYMBOL_VIS_FILE=$(srcdir)/libnm-util.ver
libnm_util_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \
- -version-info "4:0:2"
+ -version-info "5:0:3"
if WITH_GNUTLS
libnm_util_la_SOURCES += crypto_gnutls.c
diff --git a/libnm-util/Makefile.in b/libnm-util/Makefile.in
index 69af0cfb0..e17da2243 100644
--- a/libnm-util/Makefile.in
+++ b/libnm-util/Makefile.in
@@ -105,20 +105,25 @@ libnm_util_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
am__libnm_util_la_SOURCES_DIST = crypto.c nm-connection.c \
nm-param-spec-specialized.c nm-setting.c nm-setting-8021x.c \
- nm-setting-bluetooth.c nm-setting-connection.c \
- nm-setting-ip4-config.c nm-setting-ip6-config.c \
- nm-setting-ppp.c nm-setting-pppoe.c nm-setting-serial.c \
- nm-setting-gsm.c nm-setting-cdma.c nm-setting-olpc-mesh.c \
- nm-setting-wimax.c nm-setting-wired.c nm-setting-wireless.c \
- nm-setting-wireless-security.c nm-setting-vpn.c nm-utils.c \
- crypto.h nm-param-spec-specialized.h nm-utils-private.h \
+ nm-setting-bluetooth.c nm-setting-bond.c \
+ nm-setting-connection.c nm-setting-infiniband.c \
+ nm-setting-ip4-config.c nm-setting-vlan.c \
+ nm-setting-ip6-config.c nm-setting-ppp.c nm-setting-pppoe.c \
+ nm-setting-serial.c nm-setting-gsm.c nm-setting-cdma.c \
+ nm-setting-olpc-mesh.c nm-setting-wimax.c nm-setting-wired.c \
+ nm-setting-wireless.c nm-setting-wireless-security.c \
+ nm-setting-vpn.c nm-utils-enum-types.c nm-utils.c crypto.h \
+ nm-param-spec-specialized.h nm-utils-private.h \
nm-setting-private.h crypto_gnutls.c crypto_nss.c
am__objects_1 = libnm_util_la-crypto.lo libnm_util_la-nm-connection.lo \
libnm_util_la-nm-param-spec-specialized.lo \
libnm_util_la-nm-setting.lo libnm_util_la-nm-setting-8021x.lo \
libnm_util_la-nm-setting-bluetooth.lo \
+ libnm_util_la-nm-setting-bond.lo \
libnm_util_la-nm-setting-connection.lo \
+ libnm_util_la-nm-setting-infiniband.lo \
libnm_util_la-nm-setting-ip4-config.lo \
+ libnm_util_la-nm-setting-vlan.lo \
libnm_util_la-nm-setting-ip6-config.lo \
libnm_util_la-nm-setting-ppp.lo \
libnm_util_la-nm-setting-pppoe.lo \
@@ -130,7 +135,8 @@ am__objects_1 = libnm_util_la-crypto.lo libnm_util_la-nm-connection.lo \
libnm_util_la-nm-setting-wired.lo \
libnm_util_la-nm-setting-wireless.lo \
libnm_util_la-nm-setting-wireless-security.lo \
- libnm_util_la-nm-setting-vpn.lo libnm_util_la-nm-utils.lo
+ libnm_util_la-nm-setting-vpn.lo \
+ libnm_util_la-nm-utils-enum-types.lo libnm_util_la-nm-utils.lo
am__objects_2 =
@WITH_GNUTLS_TRUE@am__objects_3 = libnm_util_la-crypto_gnutls.lo
@WITH_NSS_TRUE@am__objects_4 = libnm_util_la-crypto_nss.lo
@@ -269,6 +275,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -323,11 +331,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -338,6 +350,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -377,6 +390,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -441,7 +456,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = . tests
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/include
+INCLUDES = -I${top_srcdir} -I${top_srcdir}/include -I${top_builddir}/include
lib_LTLIBRARIES = libnm-util.la
libnm_util_la_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(UUID_CFLAGS) \
-DG_DISABLE_DEPRECATED $(am__append_2) $(am__append_5)
@@ -450,8 +465,11 @@ libnm_util_include_HEADERS = \
nm-setting.h \
nm-setting-8021x.h \
nm-setting-bluetooth.h \
+ nm-setting-bond.h \
nm-setting-connection.h \
+ nm-setting-infiniband.h \
nm-setting-ip4-config.h \
+ nm-setting-vlan.h \
nm-setting-ip6-config.h \
nm-setting-ppp.h \
nm-setting-pppoe.h \
@@ -464,6 +482,7 @@ libnm_util_include_HEADERS = \
nm-setting-wireless.h \
nm-setting-wireless-security.h \
nm-setting-vpn.h \
+ nm-utils-enum-types.h \
nm-utils.h
libnm_util_la_private_headers = \
@@ -479,8 +498,11 @@ libnm_util_la_csources = \
nm-setting.c \
nm-setting-8021x.c \
nm-setting-bluetooth.c \
+ nm-setting-bond.c \
nm-setting-connection.c \
+ nm-setting-infiniband.c \
nm-setting-ip4-config.c \
+ nm-setting-vlan.c \
nm-setting-ip6-config.c \
nm-setting-ppp.c \
nm-setting-pppoe.c \
@@ -493,16 +515,22 @@ libnm_util_la_csources = \
nm-setting-wireless.c \
nm-setting-wireless-security.c \
nm-setting-vpn.c \
+ nm-utils-enum-types.c \
nm-utils.c
libnm_util_la_SOURCES = $(libnm_util_la_csources) \
$(libnm_util_la_private_headers) $(am__append_1) \
$(am__append_4)
+GLIB_GENERATED = nm-utils-enum-types.h nm-utils-enum-types.c
+BUILT_SOURCES = $(GLIB_GENERATED)
+nm_utils_enum_types_sources = $(libnm_util_include_HEADERS)
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS) \
$(am__append_3) $(am__append_6)
SYMBOL_VIS_FILE = $(srcdir)/libnm-util.ver
libnm_util_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \
- -version-info "4:0:2"
+ -version-info "5:0:3"
libnm_util_includedir = $(includedir)/NetworkManager
@@ -534,7 +562,8 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
@HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS)
@HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0
@HAVE_INTROSPECTION_TRUE@typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-all: all-recursive
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
@@ -628,21 +657,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-param-spec-specialized.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-8021x.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-bluetooth.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-bond.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-cdma.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-gsm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-infiniband.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-ip4-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-ip6-config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-olpc-mesh.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-ppp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-pppoe.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-serial.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-vlan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-vpn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-wimax.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-wired.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-wireless-security.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting-wireless.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-setting.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-utils-enum-types.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_util_la-nm-utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_crypto_la-crypto.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_crypto_la-crypto_gnutls.Plo@am__quote@
@@ -723,6 +756,14 @@ libnm_util_la-nm-setting-bluetooth.lo: nm-setting-bluetooth.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-bluetooth.lo `test -f 'nm-setting-bluetooth.c' || echo '$(srcdir)/'`nm-setting-bluetooth.c
+libnm_util_la-nm-setting-bond.lo: nm-setting-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-setting-bond.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-setting-bond.Tpo -c -o libnm_util_la-nm-setting-bond.lo `test -f 'nm-setting-bond.c' || echo '$(srcdir)/'`nm-setting-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-setting-bond.Tpo $(DEPDIR)/libnm_util_la-nm-setting-bond.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-setting-bond.c' object='libnm_util_la-nm-setting-bond.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-bond.lo `test -f 'nm-setting-bond.c' || echo '$(srcdir)/'`nm-setting-bond.c
+
libnm_util_la-nm-setting-connection.lo: nm-setting-connection.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-setting-connection.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-setting-connection.Tpo -c -o libnm_util_la-nm-setting-connection.lo `test -f 'nm-setting-connection.c' || echo '$(srcdir)/'`nm-setting-connection.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-setting-connection.Tpo $(DEPDIR)/libnm_util_la-nm-setting-connection.Plo
@@ -731,6 +772,14 @@ libnm_util_la-nm-setting-connection.lo: nm-setting-connection.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-connection.lo `test -f 'nm-setting-connection.c' || echo '$(srcdir)/'`nm-setting-connection.c
+libnm_util_la-nm-setting-infiniband.lo: nm-setting-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-setting-infiniband.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-setting-infiniband.Tpo -c -o libnm_util_la-nm-setting-infiniband.lo `test -f 'nm-setting-infiniband.c' || echo '$(srcdir)/'`nm-setting-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-setting-infiniband.Tpo $(DEPDIR)/libnm_util_la-nm-setting-infiniband.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-setting-infiniband.c' object='libnm_util_la-nm-setting-infiniband.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-infiniband.lo `test -f 'nm-setting-infiniband.c' || echo '$(srcdir)/'`nm-setting-infiniband.c
+
libnm_util_la-nm-setting-ip4-config.lo: nm-setting-ip4-config.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-setting-ip4-config.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-setting-ip4-config.Tpo -c -o libnm_util_la-nm-setting-ip4-config.lo `test -f 'nm-setting-ip4-config.c' || echo '$(srcdir)/'`nm-setting-ip4-config.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-setting-ip4-config.Tpo $(DEPDIR)/libnm_util_la-nm-setting-ip4-config.Plo
@@ -739,6 +788,14 @@ libnm_util_la-nm-setting-ip4-config.lo: nm-setting-ip4-config.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-ip4-config.lo `test -f 'nm-setting-ip4-config.c' || echo '$(srcdir)/'`nm-setting-ip4-config.c
+libnm_util_la-nm-setting-vlan.lo: nm-setting-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-setting-vlan.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-setting-vlan.Tpo -c -o libnm_util_la-nm-setting-vlan.lo `test -f 'nm-setting-vlan.c' || echo '$(srcdir)/'`nm-setting-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-setting-vlan.Tpo $(DEPDIR)/libnm_util_la-nm-setting-vlan.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-setting-vlan.c' object='libnm_util_la-nm-setting-vlan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-vlan.lo `test -f 'nm-setting-vlan.c' || echo '$(srcdir)/'`nm-setting-vlan.c
+
libnm_util_la-nm-setting-ip6-config.lo: nm-setting-ip6-config.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-setting-ip6-config.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-setting-ip6-config.Tpo -c -o libnm_util_la-nm-setting-ip6-config.lo `test -f 'nm-setting-ip6-config.c' || echo '$(srcdir)/'`nm-setting-ip6-config.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-setting-ip6-config.Tpo $(DEPDIR)/libnm_util_la-nm-setting-ip6-config.Plo
@@ -835,6 +892,14 @@ libnm_util_la-nm-setting-vpn.lo: nm-setting-vpn.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-setting-vpn.lo `test -f 'nm-setting-vpn.c' || echo '$(srcdir)/'`nm-setting-vpn.c
+libnm_util_la-nm-utils-enum-types.lo: nm-utils-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-utils-enum-types.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-utils-enum-types.Tpo -c -o libnm_util_la-nm-utils-enum-types.lo `test -f 'nm-utils-enum-types.c' || echo '$(srcdir)/'`nm-utils-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-utils-enum-types.Tpo $(DEPDIR)/libnm_util_la-nm-utils-enum-types.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-utils-enum-types.c' object='libnm_util_la-nm-utils-enum-types.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_util_la-nm-utils-enum-types.lo `test -f 'nm-utils-enum-types.c' || echo '$(srcdir)/'`nm-utils-enum-types.c
+
libnm_util_la-nm-utils.lo: nm-utils.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_util_la-nm-utils.lo -MD -MP -MF $(DEPDIR)/libnm_util_la-nm-utils.Tpo -c -o libnm_util_la-nm-utils.lo `test -f 'nm-utils.c' || echo '$(srcdir)/'`nm-utils.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_util_la-nm-utils.Tpo $(DEPDIR)/libnm_util_la-nm-utils.Plo
@@ -1165,14 +1230,16 @@ distdir: $(DISTFILES)
@WITH_TESTS_FALSE@check-local:
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
-check: check-recursive
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libnm_util_includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: install-recursive
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
@@ -1199,6 +1266,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-recursive
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
@@ -1273,8 +1341,9 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
uninstall-libnm_util_includeHEADERS uninstall-pkgconfigDATA \
uninstall-typelibDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
- ctags-recursive install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ check-am ctags-recursive install install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am check-local clean clean-generic \
@@ -1296,6 +1365,7 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
uninstall-libnm_util_includeHEADERS uninstall-pkgconfigDATA \
uninstall-typelibDATA
+include $(GLIB_MAKEFILE)
-include $(INTROSPECTION_MAKEFILE)
diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver
index 53c2482e2..eb3f1f324 100644
--- a/libnm-util/libnm-util.ver
+++ b/libnm-util/libnm-util.ver
@@ -16,15 +16,19 @@ global:
nm_connection_get_setting;
nm_connection_get_setting_802_1x;
nm_connection_get_setting_bluetooth;
+ nm_connection_get_setting_bond;
nm_connection_get_setting_by_name;
nm_connection_get_setting_cdma;
nm_connection_get_setting_connection;
nm_connection_get_setting_gsm;
+ nm_connection_get_setting_infiniband;
nm_connection_get_setting_ip4_config;
nm_connection_get_setting_ip6_config;
nm_connection_get_setting_olpc_mesh;
nm_connection_get_setting_ppp;
nm_connection_get_setting_pppoe;
+ nm_connection_get_setting_serial;
+ nm_connection_get_setting_vlan;
nm_connection_get_setting_vpn;
nm_connection_get_setting_wimax;
nm_connection_get_setting_wired;
@@ -32,6 +36,7 @@ global:
nm_connection_get_setting_wireless_security;
nm_connection_get_type;
nm_connection_get_uuid;
+ nm_connection_get_virtual_iface_name;
nm_connection_is_type;
nm_connection_lookup_setting_type;
nm_connection_lookup_setting_type_by_quark;
@@ -99,6 +104,8 @@ global:
nm_setting_802_1x_add_altsubject_match;
nm_setting_802_1x_add_eap_method;
nm_setting_802_1x_add_phase2_altsubject_match;
+ nm_setting_802_1x_ck_format_get_type;
+ nm_setting_802_1x_ck_scheme_get_type;
nm_setting_802_1x_clear_altsubject_matches;
nm_setting_802_1x_clear_eap_methods;
nm_setting_802_1x_clear_phase2_altsubject_matches;
@@ -118,8 +125,11 @@ global:
nm_setting_802_1x_get_num_altsubject_matches;
nm_setting_802_1x_get_num_eap_methods;
nm_setting_802_1x_get_num_phase2_altsubject_matches;
+ nm_setting_802_1x_get_pac_file;
nm_setting_802_1x_get_password;
nm_setting_802_1x_get_password_flags;
+ nm_setting_802_1x_get_password_raw;
+ nm_setting_802_1x_get_password_raw_flags;
nm_setting_802_1x_get_phase1_fast_provisioning;
nm_setting_802_1x_get_phase1_peaplabel;
nm_setting_802_1x_get_phase1_peapver;
@@ -167,6 +177,18 @@ global:
nm_setting_bluetooth_get_connection_type;
nm_setting_bluetooth_get_type;
nm_setting_bluetooth_new;
+ nm_setting_bond_add_option;
+ nm_setting_bond_error_get_type;
+ nm_setting_bond_error_quark;
+ nm_setting_bond_get_interface_name;
+ nm_setting_bond_get_num_options;
+ nm_setting_bond_get_option;
+ nm_setting_bond_get_option_by_name;
+ nm_setting_bond_get_option_default;
+ nm_setting_bond_get_type;
+ nm_setting_bond_get_valid_options;
+ nm_setting_bond_new;
+ nm_setting_bond_remove_option;
nm_setting_cdma_error_get_type;
nm_setting_cdma_error_quark;
nm_setting_cdma_get_number;
@@ -178,22 +200,28 @@ global:
nm_setting_clear_secrets;
nm_setting_clear_secrets_with_flags;
nm_setting_compare;
+ nm_setting_compare_flags_get_type;
nm_setting_connection_add_permission;
nm_setting_connection_error_get_type;
nm_setting_connection_error_quark;
nm_setting_connection_get_autoconnect;
nm_setting_connection_get_connection_type;
nm_setting_connection_get_id;
+ nm_setting_connection_get_master;
nm_setting_connection_get_num_permissions;
nm_setting_connection_get_permission;
nm_setting_connection_get_read_only;
+ nm_setting_connection_get_slave_type;
nm_setting_connection_get_timestamp;
nm_setting_connection_get_type;
nm_setting_connection_get_uuid;
+ nm_setting_connection_get_zone;
+ nm_setting_connection_is_slave_type;
nm_setting_connection_new;
nm_setting_connection_permissions_user_allowed;
nm_setting_connection_remove_permission;
nm_setting_diff;
+ nm_setting_diff_result_get_type;
nm_setting_duplicate;
nm_setting_enumerate_values;
nm_setting_error_get_type;
@@ -201,6 +229,7 @@ global:
nm_setting_get_name;
nm_setting_get_secret_flags;
nm_setting_get_type;
+ nm_setting_get_virtual_iface_name;
nm_setting_gsm_error_get_type;
nm_setting_gsm_error_quark;
nm_setting_gsm_get_allowed_bands;
@@ -215,7 +244,17 @@ global:
nm_setting_gsm_get_pin_flags;
nm_setting_gsm_get_type;
nm_setting_gsm_get_username;
+ nm_setting_gsm_network_band_get_type;
+ nm_setting_gsm_network_type_get_type;
nm_setting_gsm_new;
+ nm_setting_hash_flags_get_type;
+ nm_setting_infiniband_error_get_type;
+ nm_setting_infiniband_error_quark;
+ nm_setting_infiniband_get_mac_address;
+ nm_setting_infiniband_get_mtu;
+ nm_setting_infiniband_get_transport_mode;
+ nm_setting_infiniband_get_type;
+ nm_setting_infiniband_new;
nm_setting_ip4_config_add_address;
nm_setting_ip4_config_add_dns;
nm_setting_ip4_config_add_dns_search;
@@ -263,6 +302,7 @@ global:
nm_setting_ip6_config_get_dns_search;
nm_setting_ip6_config_get_ignore_auto_dns;
nm_setting_ip6_config_get_ignore_auto_routes;
+ nm_setting_ip6_config_get_ip6_privacy;
nm_setting_ip6_config_get_may_fail;
nm_setting_ip6_config_get_method;
nm_setting_ip6_config_get_never_default;
@@ -273,6 +313,7 @@ global:
nm_setting_ip6_config_get_route;
nm_setting_ip6_config_get_type;
nm_setting_ip6_config_new;
+ nm_setting_ip6_config_privacy_get_type;
nm_setting_ip6_config_remove_address;
nm_setting_ip6_config_remove_dns;
nm_setting_ip6_config_remove_dns_search;
@@ -316,6 +357,7 @@ global:
nm_setting_pppoe_get_type;
nm_setting_pppoe_get_username;
nm_setting_pppoe_new;
+ nm_setting_secret_flags_get_type;
nm_setting_serial_error_get_type;
nm_setting_serial_error_quark;
nm_setting_serial_get_baud;
@@ -330,6 +372,20 @@ global:
nm_setting_to_string;
nm_setting_update_secrets;
nm_setting_verify;
+ nm_setting_vlan_add_priority;
+ nm_setting_vlan_add_priority_str;
+ nm_setting_vlan_clear_priorities;
+ nm_setting_vlan_error_get_type;
+ nm_setting_vlan_error_quark;
+ nm_setting_vlan_get_flags;
+ nm_setting_vlan_get_id;
+ nm_setting_vlan_get_interface_name;
+ nm_setting_vlan_get_num_priorities;
+ nm_setting_vlan_get_parent;
+ nm_setting_vlan_get_priority;
+ nm_setting_vlan_get_type;
+ nm_setting_vlan_new;
+ nm_setting_vlan_remove_priority;
nm_setting_vpn_add_data_item;
nm_setting_vpn_add_secret;
nm_setting_vpn_error_get_type;
@@ -337,6 +393,8 @@ global:
nm_setting_vpn_foreach_data_item;
nm_setting_vpn_foreach_secret;
nm_setting_vpn_get_data_item;
+ nm_setting_vpn_get_num_data_items;
+ nm_setting_vpn_get_num_secrets;
nm_setting_vpn_get_secret;
nm_setting_vpn_get_service_type;
nm_setting_vpn_get_type;
@@ -423,6 +481,11 @@ global:
nm_utils_deinit;
nm_utils_escape_ssid;
nm_utils_gvalue_hash_dup;
+ nm_utils_hwaddr_atoba;
+ nm_utils_hwaddr_aton;
+ nm_utils_hwaddr_len;
+ nm_utils_hwaddr_ntoa;
+ nm_utils_hwaddr_type;
nm_utils_init;
nm_utils_ip4_addresses_from_gvalue;
nm_utils_ip4_addresses_to_gvalue;
@@ -440,6 +503,7 @@ global:
nm_utils_is_empty_ssid;
nm_utils_rsa_key_encrypt;
nm_utils_same_ssid;
+ nm_utils_security_type_get_type;
nm_utils_security_valid;
nm_utils_slist_free;
nm_utils_ssid_to_utf8;
@@ -449,6 +513,9 @@ global:
nm_utils_wifi_find_next_channel;
nm_utils_wifi_freq_to_channel;
nm_utils_wifi_is_channel_valid;
+ nm_vlan_flags_get_type;
+ nm_vlan_priority_map_get_type;
+ nm_wep_key_type_get_type;
local:
*;
};
diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index cdc3b81f0..13099998f 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -34,6 +34,7 @@
#include "nm-setting-8021x.h"
#include "nm-setting-bluetooth.h"
#include "nm-setting-connection.h"
+#include "nm-setting-infiniband.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-setting-ppp.h"
@@ -42,9 +43,11 @@
#include "nm-setting-wired.h"
#include "nm-setting-wireless.h"
#include "nm-setting-wireless-security.h"
+#include "nm-setting-serial.h"
#include "nm-setting-vpn.h"
#include "nm-setting-olpc-mesh.h"
-
+#include "nm-setting-bond.h"
+#include "nm-setting-vlan.h"
#include "nm-setting-serial.h"
#include "nm-setting-gsm.h"
#include "nm-setting-cdma.h"
@@ -86,27 +89,6 @@ nm_connection_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_connection_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_CONNECTION_ERROR_UNKNOWN, "UnknownError"),
- ENUM_ENTRY (NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, "ConnectionSettingNotFound"),
- ENUM_ENTRY (NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID, "ConnectionTypeInvalid"),
- ENUM_ENTRY (NM_CONNECTION_ERROR_SETTING_NOT_FOUND, "SettingNotFound"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMConnectionError", values);
- }
- return etype;
-}
-
typedef struct {
GHashTable *settings;
@@ -135,7 +117,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static GHashTable *registered_settings = NULL;
-#define DEFAULT_MAP_SIZE 16
+#define DEFAULT_MAP_SIZE 19
static struct SettingInfo {
const char *name;
@@ -242,6 +224,21 @@ register_default_settings (void)
NM_SETTING_WIMAX_ERROR,
1, TRUE);
+ register_one_setting (NM_SETTING_BOND_SETTING_NAME,
+ NM_TYPE_SETTING_BOND,
+ NM_SETTING_BOND_ERROR,
+ 1, TRUE);
+
+ register_one_setting (NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_TYPE_SETTING_INFINIBAND,
+ NM_SETTING_INFINIBAND_ERROR,
+ 1, TRUE);
+
+ register_one_setting (NM_SETTING_VLAN_SETTING_NAME,
+ NM_TYPE_SETTING_VLAN,
+ NM_SETTING_VLAN_ERROR,
+ 1, TRUE);
+
register_one_setting (NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
NM_TYPE_SETTING_WIRELESS_SECURITY,
NM_SETTING_WIRELESS_SECURITY_ERROR,
@@ -483,6 +480,33 @@ nm_connection_get_setting_by_name (NMConnection *connection, const char *name)
return type ? nm_connection_get_setting (connection, type) : NULL;
}
+/**
+ * nm_connection_get_type_setting:
+ * @connection: a #NMConnection
+ *
+ * Returns: (transfer none): the #NMSetting of the connection base type
+ */
+static NMSetting *
+nm_connection_get_type_setting (NMConnection *connection)
+{
+ NMSettingConnection *s_con;
+ const char *type;
+ NMSetting *base;
+
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ type = nm_setting_connection_get_connection_type (s_con);
+ g_assert (type);
+
+ base = nm_connection_get_setting_by_name (connection, type);
+ g_assert (base);
+
+ return base;
+}
+
static gboolean
validate_permissions_type (GHashTable *hash, GError **error)
{
@@ -709,7 +733,7 @@ gboolean
nm_connection_verify (NMConnection *connection, GError **error)
{
NMConnectionPrivate *priv;
- NMSetting *s_con;
+ NMSettingConnection *s_con;
GHashTableIter iter;
gpointer value;
GSList *all_settings = NULL;
@@ -731,7 +755,7 @@ nm_connection_verify (NMConnection *connection, GError **error)
priv = NM_CONNECTION_GET_PRIVATE (connection);
/* First, make sure there's at least 'connection' setting */
- s_con = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (!s_con) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
@@ -757,7 +781,7 @@ nm_connection_verify (NMConnection *connection, GError **error)
/* Now make sure the given 'type' setting can actually be the base setting
* of the connection. Can't have type=ppp for example.
*/
- ctype = nm_setting_connection_get_connection_type (NM_SETTING_CONNECTION (s_con));
+ ctype = nm_setting_connection_get_connection_type (s_con);
if (!ctype) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
@@ -1176,6 +1200,30 @@ nm_connection_get_path (NMConnection *connection)
}
/**
+ * nm_connection_get_virtual_iface_name:
+ * @connection: The #NMConnection
+ *
+ * Returns the name of the virtual kernel interface which the connection
+ * needs to use if specified in the settings. This function abstracts all
+ * connection types which require this functionality. For all other
+ * connection types, this function will return NULL.
+ *
+ * Returns: Name of the kernel interface or NULL
+ */
+const char *
+nm_connection_get_virtual_iface_name (NMConnection *connection)
+{
+ NMSetting *base;
+
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ base = nm_connection_get_type_setting (connection);
+ g_assert (base);
+
+ return nm_setting_get_virtual_iface_name (base);
+}
+
+/**
* nm_connection_new:
*
* Creates a new #NMConnection object with no #NMSetting objects.
@@ -1274,7 +1322,7 @@ nm_connection_get_uuid (NMConnection *connection)
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_return_val_if_fail (s_con != NULL, NULL);
return nm_setting_connection_get_uuid (s_con);
@@ -1296,7 +1344,7 @@ nm_connection_get_id (NMConnection *connection)
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_return_val_if_fail (s_con != NULL, NULL);
return nm_setting_connection_get_id (s_con);
@@ -1339,6 +1387,23 @@ nm_connection_get_setting_bluetooth (NMConnection *connection)
}
/**
+ * nm_connection_get_setting_bond:
+ * @connection: the #NMConnection
+ *
+ * A shortcut to return any #NMSettingBond the connection might contain.
+ *
+ * Returns: (transfer none): an #NMSettingBond if the connection contains one, otherwise NULL
+ **/
+NMSettingBond *
+nm_connection_get_setting_bond (NMConnection *connection)
+{
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ return (NMSettingBond *) nm_connection_get_setting (connection, NM_TYPE_SETTING_BOND);
+}
+
+/**
* nm_connection_get_setting_cdma:
* @connection: the #NMConnection
*
@@ -1390,6 +1455,23 @@ nm_connection_get_setting_gsm (NMConnection *connection)
}
/**
+ * nm_connection_get_setting_infiniband:
+ * @connection: the #NMConnection
+ *
+ * A shortcut to return any #NMSettingInfiniband the connection might contain.
+ *
+ * Returns: (transfer none): an #NMSettingInfiniband if the connection contains one, otherwise NULL
+ **/
+NMSettingInfiniband *
+nm_connection_get_setting_infiniband (NMConnection *connection)
+{
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ return (NMSettingInfiniband *) nm_connection_get_setting (connection, NM_TYPE_SETTING_INFINIBAND);
+}
+
+/**
* nm_connection_get_setting_ip4_config:
* @connection: the #NMConnection
*
@@ -1475,6 +1557,23 @@ nm_connection_get_setting_pppoe (NMConnection *connection)
}
/**
+ * nm_connection_get_setting_serial:
+ * @connection: the #NMConnection
+ *
+ * A shortcut to return any #NMSettingSerial the connection might contain.
+ *
+ * Returns: (transfer none): an #NMSettingSerial if the connection contains one, otherwise NULL
+ **/
+NMSettingSerial *
+nm_connection_get_setting_serial (NMConnection *connection)
+{
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ return (NMSettingSerial *) nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL);
+}
+
+/**
* nm_connection_get_setting_vpn:
* @connection: the #NMConnection
*
@@ -1559,6 +1658,23 @@ nm_connection_get_setting_wireless_security (NMConnection *connection)
return (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
}
+/**
+ * nm_connection_get_setting_vlan:
+ * @connection: the #NMConnection
+ *
+ * A shortcut to return any #NMSettingVlan the connection might contain.
+ *
+ * Returns: (transfer none): an #NMSettingVlan if the connection contains one, otherwise NULL
+ **/
+NMSettingVlan *
+nm_connection_get_setting_vlan (NMConnection *connection)
+{
+ g_return_val_if_fail (connection != NULL, NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ return (NMSettingVlan *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VLAN);
+}
+
/*************************************************************/
static void
diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h
index 069dc84c1..6df74f573 100644
--- a/libnm-util/nm-connection.h
+++ b/libnm-util/nm-connection.h
@@ -32,19 +32,23 @@
#include <nm-setting-8021x.h>
#include <nm-setting-bluetooth.h>
+#include <nm-setting-bond.h>
#include <nm-setting-cdma.h>
#include <nm-setting-connection.h>
#include <nm-setting-gsm.h>
+#include <nm-setting-infiniband.h>
#include <nm-setting-ip4-config.h>
#include <nm-setting-ip6-config.h>
#include <nm-setting-olpc-mesh.h>
#include <nm-setting-ppp.h>
#include <nm-setting-pppoe.h>
+#include <nm-setting-serial.h>
#include <nm-setting-vpn.h>
#include <nm-setting-wimax.h>
#include <nm-setting-wired.h>
#include <nm-setting-wireless.h>
#include <nm-setting-wireless-security.h>
+#include <nm-setting-vlan.h>
G_BEGIN_DECLS
@@ -74,15 +78,12 @@ G_BEGIN_DECLS
**/
typedef enum
{
- NM_CONNECTION_ERROR_UNKNOWN = 0,
- NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND,
- NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID,
- NM_CONNECTION_ERROR_SETTING_NOT_FOUND
+ NM_CONNECTION_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, /*< nick=ConnectionSettingNotFound >*/
+ NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID, /*< nick=ConnectionTypeInvalid >*/
+ NM_CONNECTION_ERROR_SETTING_NOT_FOUND /*< nick=SettingNotFound >*/
} NMConnectionError;
-#define NM_TYPE_CONNECTION_ERROR (nm_connection_error_get_type ())
-GType nm_connection_error_get_type (void);
-
#define NM_CONNECTION_ERROR nm_connection_error_quark ()
GQuark nm_connection_error_quark (void);
@@ -161,6 +162,8 @@ void nm_connection_set_path (NMConnection *connection,
const char * nm_connection_get_path (NMConnection *connection);
+const char * nm_connection_get_virtual_iface_name (NMConnection *connection);
+
gboolean nm_connection_is_type (NMConnection *connection, const char *type);
void nm_connection_for_each_setting_value (NMConnection *connection,
@@ -183,19 +186,23 @@ const char * nm_connection_get_id (NMConnection *connection);
NMSetting8021x * nm_connection_get_setting_802_1x (NMConnection *connection);
NMSettingBluetooth * nm_connection_get_setting_bluetooth (NMConnection *connection);
+NMSettingBond * nm_connection_get_setting_bond (NMConnection *connection);
NMSettingCdma * nm_connection_get_setting_cdma (NMConnection *connection);
NMSettingConnection * nm_connection_get_setting_connection (NMConnection *connection);
NMSettingGsm * nm_connection_get_setting_gsm (NMConnection *connection);
+NMSettingInfiniband * nm_connection_get_setting_infiniband (NMConnection *connection);
NMSettingIP4Config * nm_connection_get_setting_ip4_config (NMConnection *connection);
NMSettingIP6Config * nm_connection_get_setting_ip6_config (NMConnection *connection);
NMSettingOlpcMesh * nm_connection_get_setting_olpc_mesh (NMConnection *connection);
NMSettingPPP * nm_connection_get_setting_ppp (NMConnection *connection);
NMSettingPPPOE * nm_connection_get_setting_pppoe (NMConnection *connection);
+NMSettingSerial * nm_connection_get_setting_serial (NMConnection *connection);
NMSettingVPN * nm_connection_get_setting_vpn (NMConnection *connection);
NMSettingWimax * nm_connection_get_setting_wimax (NMConnection *connection);
NMSettingWired * nm_connection_get_setting_wired (NMConnection *connection);
NMSettingWireless * nm_connection_get_setting_wireless (NMConnection *connection);
NMSettingWirelessSecurity *nm_connection_get_setting_wireless_security (NMConnection *connection);
+NMSettingVlan * nm_connection_get_setting_vlan (NMConnection *connection);
G_END_DECLS
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c
index 07fdcc214..28c0d3f95 100644
--- a/libnm-util/nm-setting-8021x.c
+++ b/libnm-util/nm-setting-8021x.c
@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2011 Red Hat, Inc.
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
* (C) Copyright 2007 - 2008 Novell, Inc.
*/
@@ -82,30 +82,6 @@ nm_setting_802_1x_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_802_1x_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_802_1X_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_802_1X_ERROR_MISSING_PROPERTY, "MissingProperty"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSetting8021xError", values);
- }
- return etype;
-}
-
-
G_DEFINE_TYPE (NMSetting8021x, nm_setting_802_1x, NM_TYPE_SETTING)
#define NM_SETTING_802_1X_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_802_1X, NMSetting8021xPrivate))
@@ -114,6 +90,7 @@ typedef struct {
GSList *eap; /* GSList of strings */
char *identity;
char *anonymous_identity;
+ char *pac_file;
GByteArray *ca_cert;
char *ca_path;
char *subject_match;
@@ -131,6 +108,8 @@ typedef struct {
GByteArray *phase2_client_cert;
char *password;
NMSettingSecretFlags password_flags;
+ GByteArray *password_raw;
+ NMSettingSecretFlags password_raw_flags;
char *pin;
NMSettingSecretFlags pin_flags;
GByteArray *private_key;
@@ -147,6 +126,7 @@ enum {
PROP_EAP,
PROP_IDENTITY,
PROP_ANONYMOUS_IDENTITY,
+ PROP_PAC_FILE,
PROP_CA_CERT,
PROP_CA_PATH,
PROP_SUBJECT_MATCH,
@@ -164,6 +144,8 @@ enum {
PROP_PHASE2_CLIENT_CERT,
PROP_PASSWORD,
PROP_PASSWORD_FLAGS,
+ PROP_PASSWORD_RAW,
+ PROP_PASSWORD_RAW_FLAGS,
PROP_PRIVATE_KEY,
PROP_PRIVATE_KEY_PASSWORD,
PROP_PRIVATE_KEY_PASSWORD_FLAGS,
@@ -341,6 +323,22 @@ nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting)
}
/**
+ * nm_setting_802_1x_get_pac_file:
+ * @setting: the #NMSetting8021x
+ *
+ * Returns the file containing PAC credentials used by EAP-FAST method.
+ *
+ * Returns: the PAC file
+ **/
+const char *
+nm_setting_802_1x_get_pac_file (NMSetting8021x *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL);
+
+ return NM_SETTING_802_1X_GET_PRIVATE (setting)->pac_file;
+}
+
+/**
* nm_setting_802_1x_get_ca_path:
* @setting: the #NMSetting8021x
*
@@ -1423,6 +1421,37 @@ nm_setting_802_1x_get_password_flags (NMSetting8021x *setting)
}
/**
+ * nm_setting_802_1x_get_password_raw:
+ * @setting: the #NMSetting8021x
+ *
+ * Returns: the password used by the authentication method as a
+ * UTF-8-encoded array of bytes, as specified by the
+ * #NMSetting8021x:password-raw property
+ **/
+const GByteArray *
+nm_setting_802_1x_get_password_raw (NMSetting8021x *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL);
+
+ return NM_SETTING_802_1X_GET_PRIVATE (setting)->password_raw;
+}
+
+/**
+ * nm_setting_802_1x_get_password_raw_flags:
+ * @setting: the #NMSetting8021x
+ *
+ * Returns: the #NMSettingSecretFlags pertaining to the
+ * #NMSetting8021x:password-raw
+ **/
+NMSettingSecretFlags
+nm_setting_802_1x_get_password_raw_flags (NMSetting8021x *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NM_SETTING_SECRET_FLAG_NONE);
+
+ return NM_SETTING_802_1X_GET_PRIVATE (setting)->password_raw_flags;
+}
+
+/**
* nm_setting_802_1x_get_pin:
* @setting: the #NMSetting8021x
*
@@ -2001,8 +2030,11 @@ need_secrets_password (NMSetting8021x *self,
{
NMSetting8021xPrivate *priv = NM_SETTING_802_1X_GET_PRIVATE (self);
- if (!priv->password || !strlen (priv->password))
+ if ( (!priv->password || !strlen (priv->password))
+ && (!priv->password_raw || !priv->password_raw->len)) {
g_ptr_array_add (secrets, NM_SETTING_802_1X_PASSWORD);
+ g_ptr_array_add (secrets, NM_SETTING_802_1X_PASSWORD_RAW);
+ }
}
static void
@@ -2542,6 +2574,8 @@ finalize (GObject *object)
g_free (priv->phase2_ca_path);
g_free (priv->phase2_subject_match);
g_free (priv->password);
+ if (priv->password_raw)
+ g_byte_array_free (priv->password_raw, TRUE);
nm_utils_slist_free (priv->eap, g_free);
nm_utils_slist_free (priv->altsubject_matches, g_free);
@@ -2604,6 +2638,10 @@ set_property (GObject *object, guint prop_id,
g_free (priv->anonymous_identity);
priv->anonymous_identity = g_value_dup_string (value);
break;
+ case PROP_PAC_FILE:
+ g_free (priv->pac_file);
+ priv->pac_file = g_value_dup_string (value);
+ break;
case PROP_CA_CERT:
if (priv->ca_cert) {
g_byte_array_free (priv->ca_cert, TRUE);
@@ -2703,6 +2741,14 @@ set_property (GObject *object, guint prop_id,
case PROP_PASSWORD_FLAGS:
priv->password_flags = g_value_get_uint (value);
break;
+ case PROP_PASSWORD_RAW:
+ if (priv->password_raw)
+ g_byte_array_free (priv->password_raw, TRUE);
+ priv->password_raw = g_value_dup_boxed (value);
+ break;
+ case PROP_PASSWORD_RAW_FLAGS:
+ priv->password_raw_flags = g_value_get_uint (value);
+ break;
case PROP_PRIVATE_KEY:
if (priv->private_key) {
g_byte_array_free (priv->private_key, TRUE);
@@ -2767,6 +2813,9 @@ get_property (GObject *object, guint prop_id,
case PROP_ANONYMOUS_IDENTITY:
g_value_set_string (value, priv->anonymous_identity);
break;
+ case PROP_PAC_FILE:
+ g_value_set_string (value, priv->pac_file);
+ break;
case PROP_CA_CERT:
g_value_set_boxed (value, priv->ca_cert);
break;
@@ -2818,6 +2867,12 @@ get_property (GObject *object, guint prop_id,
case PROP_PASSWORD_FLAGS:
g_value_set_uint (value, priv->password_flags);
break;
+ case PROP_PASSWORD_RAW:
+ g_value_set_boxed (value, priv->password_raw);
+ break;
+ case PROP_PASSWORD_RAW_FLAGS:
+ g_value_set_uint (value, priv->password_raw_flags);
+ break;
case PROP_PRIVATE_KEY:
g_value_set_boxed (value, priv->private_key);
break;
@@ -2921,6 +2976,19 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
/**
+ * NMSetting8021x:pac-file:
+ *
+ * UTF-8 encoded file path containing PAC for EAP-FAST.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_PAC_FILE,
+ g_param_spec_string (NM_SETTING_802_1X_PAC_FILE,
+ "PAC file",
+ "UTF-8 encoded file path containing PAC for EAP-FAST.",
+ NULL,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
* NMSetting8021x:ca-cert:
*
* Contains the CA certificate if used by the EAP method specified in the
@@ -3274,7 +3342,9 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
/**
* NMSetting8021x:password:
*
- * Password used for EAP authentication methods.
+ * Password used for EAP authentication methods. If both
+ * #NMSetting8021x:password and #NMSetting8021x:password-raw are
+ * specified, #NMSetting8021x:password is preferred.
**/
g_object_class_install_property
(object_class, PROP_PASSWORD,
@@ -3299,6 +3369,36 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
/**
+ * NMSetting8021x:password-raw:
+ *
+ * Password used for EAP authentication methods delivered as a
+ * UTF-8-encoded array of bytes. If both #NMSetting8021x:password
+ * and #NMSetting8021x:password-raw are specified,
+ * #NMSetting8021x:password is preferred.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_PASSWORD_RAW,
+ _nm_param_spec_specialized (NM_SETTING_802_1X_PASSWORD_RAW,
+ "Password byte array",
+ "Password used for EAP authentication methods as a byte array",
+ DBUS_TYPE_G_UCHAR_ARRAY,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_SECRET));
+
+ /**
+ * NMSetting8021x:password-raw-flags:
+ *
+ * Flags indicating how to handle #NMSetting8021x:password-raw:.
+ **/
+ g_object_class_install_property (object_class, PROP_PASSWORD_RAW_FLAGS,
+ g_param_spec_uint (NM_SETTING_802_1X_PASSWORD_RAW_FLAGS,
+ "Password byte array Flags",
+ "Flags indicating how to handle the 802.1x password byte array.",
+ NM_SETTING_SECRET_FLAG_NONE,
+ NM_SETTING_SECRET_FLAGS_ALL,
+ NM_SETTING_SECRET_FLAG_NONE,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
* NMSetting8021x:private-key:
*
* Contains the private key if the #NMSetting8021x:eap property is set to
diff --git a/libnm-util/nm-setting-8021x.h b/libnm-util/nm-setting-8021x.h
index a6016aea2..eaca344d9 100644
--- a/libnm-util/nm-setting-8021x.h
+++ b/libnm-util/nm-setting-8021x.h
@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2011 Red Hat, Inc.
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
* (C) Copyright 2007 - 2008 Novell, Inc.
*/
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
* #NMSetting8021xCKFormat values indicate the general type of a certificate
* or private key
*/
-typedef enum {
+typedef enum { /*< underscore_name=nm_setting_802_1x_ck_format >*/
NM_SETTING_802_1X_CK_FORMAT_UNKNOWN = 0,
NM_SETTING_802_1X_CK_FORMAT_X509,
NM_SETTING_802_1X_CK_FORMAT_RAW_KEY,
@@ -62,7 +62,7 @@ typedef enum {
* stored in the setting properties, either as a blob of the item's data, or as
* a path to a certificate or private key file on the filesystem
*/
-typedef enum {
+typedef enum { /*< underscore_name=nm_setting_802_1x_ck_scheme >*/
NM_SETTING_802_1X_CK_SCHEME_UNKNOWN = 0,
NM_SETTING_802_1X_CK_SCHEME_BLOB,
NM_SETTING_802_1X_CK_SCHEME_PATH
@@ -85,15 +85,12 @@ typedef enum {
* @NM_SETTING_802_1X_ERROR_MISSING_PROPERTY: the property was missing and is
* required
*/
-typedef enum {
- NM_SETTING_802_1X_ERROR_UNKNOWN = 0,
- NM_SETTING_802_1X_ERROR_INVALID_PROPERTY,
- NM_SETTING_802_1X_ERROR_MISSING_PROPERTY
+typedef enum { /*< underscore_name=nm_setting_802_1x_error >*/
+ NM_SETTING_802_1X_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_802_1X_ERROR_MISSING_PROPERTY /*< nick=MissingProperty >*/
} NMSetting8021xError;
-#define NM_TYPE_SETTING_802_1X_ERROR (nm_setting_802_1x_error_get_type ())
-GType nm_setting_802_1x_error_get_type (void);
-
#define NM_SETTING_802_1X_ERROR nm_setting_802_1x_error_quark ()
GQuark nm_setting_802_1x_error_quark (void);
@@ -101,6 +98,7 @@ GQuark nm_setting_802_1x_error_quark (void);
#define NM_SETTING_802_1X_EAP "eap"
#define NM_SETTING_802_1X_IDENTITY "identity"
#define NM_SETTING_802_1X_ANONYMOUS_IDENTITY "anonymous-identity"
+#define NM_SETTING_802_1X_PAC_FILE "pac-file"
#define NM_SETTING_802_1X_CA_CERT "ca-cert"
#define NM_SETTING_802_1X_CA_PATH "ca-path"
#define NM_SETTING_802_1X_SUBJECT_MATCH "subject-match"
@@ -118,6 +116,8 @@ GQuark nm_setting_802_1x_error_quark (void);
#define NM_SETTING_802_1X_PHASE2_CLIENT_CERT "phase2-client-cert"
#define NM_SETTING_802_1X_PASSWORD "password"
#define NM_SETTING_802_1X_PASSWORD_FLAGS "password-flags"
+#define NM_SETTING_802_1X_PASSWORD_RAW "password-raw"
+#define NM_SETTING_802_1X_PASSWORD_RAW_FLAGS "password-raw-flags"
#define NM_SETTING_802_1X_PRIVATE_KEY "private-key"
#define NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD "private-key-password"
#define NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD_FLAGS "private-key-password-flags"
@@ -176,6 +176,8 @@ const char * nm_setting_802_1x_get_identity (NMSetting8
const char * nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting);
+const char * nm_setting_802_1x_get_pac_file (NMSetting8021x *setting);
+
gboolean nm_setting_802_1x_get_system_ca_certs (NMSetting8021x *setting);
const char * nm_setting_802_1x_get_ca_path (NMSetting8021x *setting);
const char * nm_setting_802_1x_get_phase2_ca_path (NMSetting8021x *setting);
@@ -250,6 +252,8 @@ gboolean nm_setting_802_1x_set_phase2_client_cert (NMSett
const char * nm_setting_802_1x_get_password (NMSetting8021x *setting);
NMSettingSecretFlags nm_setting_802_1x_get_password_flags (NMSetting8021x *setting);
+const GByteArray * nm_setting_802_1x_get_password_raw (NMSetting8021x *setting);
+NMSettingSecretFlags nm_setting_802_1x_get_password_raw_flags (NMSetting8021x *setting);
const char * nm_setting_802_1x_get_pin (NMSetting8021x *setting);
NMSettingSecretFlags nm_setting_802_1x_get_pin_flags (NMSetting8021x *setting);
diff --git a/libnm-util/nm-setting-bluetooth.c b/libnm-util/nm-setting-bluetooth.c
index 1b1178b24..6a2fed74f 100644
--- a/libnm-util/nm-setting-bluetooth.c
+++ b/libnm-util/nm-setting-bluetooth.c
@@ -62,27 +62,6 @@ nm_setting_bluetooth_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_bluetooth_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_SETTING_BLUETOOTH_ERROR_UNKNOWN, "UnknownError"),
- ENUM_ENTRY (NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- ENUM_ENTRY (NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY, "MissingProperty"),
- ENUM_ENTRY (NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND, "TypeSettingNotFound"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingBluetoothError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingBluetooth, nm_setting_bluetooth, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-bluetooth.h b/libnm-util/nm-setting-bluetooth.h
index a17a72bf4..d76da8dbc 100644
--- a/libnm-util/nm-setting-bluetooth.h
+++ b/libnm-util/nm-setting-bluetooth.h
@@ -51,15 +51,12 @@ G_BEGIN_DECLS
* must also contain an #NMSettingGsm or #NMSettingCdma as appropriate
*/
typedef enum {
- NM_SETTING_BLUETOOTH_ERROR_UNKNOWN = 0,
- NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY,
- NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY,
- NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND,
+ NM_SETTING_BLUETOOTH_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND, /*< nick=TypeSettingNotFound >*/
} NMSettingBluetoothError;
-#define NM_TYPE_SETTING_BLUETOOTH_ERROR (nm_setting_bluetooth_error_get_type ())
-GType nm_setting_bluetooth_error_get_type (void);
-
#define NM_SETTING_BLUETOOTH_ERROR nm_setting_bluetooth_error_quark ()
GQuark nm_setting_bluetooth_error_quark (void);
diff --git a/libnm-util/nm-setting-bond.c b/libnm-util/nm-setting-bond.c
new file mode 100644
index 000000000..9f9f43894
--- /dev/null
+++ b/libnm-util/nm-setting-bond.c
@@ -0,0 +1,663 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Thomas Graf <tgraf@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2011 - 2012 Red Hat, Inc.
+ */
+
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <dbus/dbus-glib.h>
+
+#include "nm-setting-bond.h"
+#include "nm-param-spec-specialized.h"
+#include "nm-utils.h"
+#include "nm-utils-private.h"
+#include "nm-dbus-glib-types.h"
+
+/**
+ * SECTION:nm-setting-bond
+ * @short_description: Describes connection properties for bonds
+ * @include: nm-setting-bond.h
+ *
+ * The #NMSettingBond object is a #NMSetting subclass that describes properties
+ * necessary for bond connections.
+ **/
+
+/**
+ * nm_setting_bond_error_quark:
+ *
+ * Registers an error quark for #NMSettingBond if necessary.
+ *
+ * Returns: the error quark used for #NMSettingBond errors.
+ **/
+GQuark
+nm_setting_bond_error_quark (void)
+{
+ static GQuark quark;
+
+ if (G_UNLIKELY (!quark))
+ quark = g_quark_from_static_string ("nm-setting-bond-error-quark");
+ return quark;
+}
+
+
+G_DEFINE_TYPE (NMSettingBond, nm_setting_bond, NM_TYPE_SETTING)
+
+#define NM_SETTING_BOND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_BOND, NMSettingBondPrivate))
+
+typedef struct {
+ char *interface_name;
+ GHashTable *options;
+} NMSettingBondPrivate;
+
+enum {
+ PROP_0,
+ PROP_INTERFACE_NAME,
+ PROP_OPTIONS,
+ LAST_PROP
+};
+
+typedef struct {
+ const char *opt;
+ const char *val;
+} BondDefault;
+
+static const BondDefault defaults[] = {
+ { NM_SETTING_BOND_OPTION_MODE, "balance-rr" },
+ { NM_SETTING_BOND_OPTION_MIIMON, "100" },
+ { NM_SETTING_BOND_OPTION_DOWNDELAY, "0" },
+ { NM_SETTING_BOND_OPTION_UPDELAY, "0" },
+ { NM_SETTING_BOND_OPTION_ARP_INTERVAL, "0" },
+ { NM_SETTING_BOND_OPTION_ARP_IP_TARGET, "" },
+};
+
+/**
+ * nm_setting_bond_new:
+ *
+ * Creates a new #NMSettingBond object with default values.
+ *
+ * Returns: (transfer full): the new empty #NMSettingBond object
+ **/
+NMSetting *
+nm_setting_bond_new (void)
+{
+ return (NMSetting *) g_object_new (NM_TYPE_SETTING_BOND, NULL);
+}
+
+/**
+ * nm_setting_bond_get_interface_name
+ * @setting: the #NMSettingBond
+ *
+ * Returns: the #NMSettingBond:interface-name property of the setting
+ **/
+const char *
+nm_setting_bond_get_interface_name (NMSettingBond *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), 0);
+
+ return NM_SETTING_BOND_GET_PRIVATE (setting)->interface_name;
+}
+
+/**
+ * nm_setting_bond_get_num_options:
+ * @setting: the #NMSettingBond
+ *
+ * Returns the number of options that should be set for this bond when it
+ * is activated. This can be used to retrieve each option individually
+ * using nm_setting_bond_get_option().
+ *
+ * Returns: the number of bonding options
+ **/
+guint32
+nm_setting_bond_get_num_options (NMSettingBond *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), 0);
+
+ return g_hash_table_size (NM_SETTING_BOND_GET_PRIVATE (setting)->options);
+}
+
+/**
+ * nm_setting_bond_get_option:
+ * @setting: the #NMSettingBond
+ * @idx: index of the desired option, from 0 to
+ * nm_setting_bond_get_num_options() - 1
+ * @out_name: (out): on return, the name of the bonding option; this
+ * value is owned by the setting and should not be modified
+ * @out_value: (out): on return, the value of the name of the bonding
+ * option; this value is owned by the setting and should not be modified
+ *
+ * Given an index, return the value of the bonding option at that index. Indexes
+ * are *not* guaranteed to be static across modifications to options done by
+ * nm_setting_bond_add_option() and nm_setting_bond_remove_option(),
+ * and should not be used to refer to options except for short periods of time
+ * such as during option iteration.
+ *
+ * Returns: %TRUE on success if the index was valid and an option was found,
+ * %FALSE if the index was invalid (ie, greater than the number of options
+ * currently held by the setting)
+ **/
+gboolean
+nm_setting_bond_get_option (NMSettingBond *setting,
+ guint32 idx,
+ const char **out_name,
+ const char **out_value)
+{
+ NMSettingBondPrivate *priv;
+ GList *keys;
+ const char *_key = NULL, *_value = NULL;
+
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
+
+ priv = NM_SETTING_BOND_GET_PRIVATE (setting);
+
+ if (idx >= nm_setting_bond_get_num_options (setting))
+ return FALSE;
+
+ keys = g_hash_table_get_keys (priv->options);
+ _key = g_list_nth_data (keys, idx);
+ _value = g_hash_table_lookup (priv->options, _key);
+
+ if (out_name)
+ *out_name = _key;
+ if (out_value)
+ *out_value = _value;
+
+ g_list_free (keys);
+ return TRUE;
+}
+
+static gboolean
+validate_option (const char *name)
+{
+ guint i;
+
+ g_return_val_if_fail (name != NULL, FALSE);
+ g_return_val_if_fail (name[0] != '\0', FALSE);
+
+ for (i = 0; i < G_N_ELEMENTS (defaults); i++) {
+ if (g_strcmp0 (defaults[i].opt, name) == 0)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/**
+ * nm_setting_bond_get_option_by_name:
+ * @setting: the #NMSettingBond
+ * @name: the option name for which to retrieve the value
+ *
+ * Returns the value associated with the bonding option specified by
+ * @name, if it exists.
+ *
+ * Returns: the value, or %NULL if the key/value pair was never added to the
+ * setting; the value is owned by the setting and must not be modified
+ **/
+const char *
+nm_setting_bond_get_option_by_name (NMSettingBond *setting,
+ const char *name)
+{
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NULL);
+ g_return_val_if_fail (validate_option (name), NULL);
+
+ return g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options, name);
+}
+
+/**
+ * nm_setting_bond_add_option:
+ * @setting: the #NMSettingBond
+ * @name: name for the option
+ * @value: value for the option
+ *
+ * Add an option to the table. The option is compared to an internal list
+ * of allowed options. Option names may contain only alphanumeric characters
+ * (ie [a-zA-Z0-9]). Adding a new name replaces any existing name/value pair
+ * that may already exist.
+ *
+ * Returns: %TRUE if the option was valid and was added to the internal option
+ * list, %FALSE if it was not.
+ **/
+gboolean nm_setting_bond_add_option (NMSettingBond *setting,
+ const char *name,
+ const char *value)
+{
+ NMSettingBondPrivate *priv;
+ size_t value_len;
+
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
+ g_return_val_if_fail (validate_option (name), FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ priv = NM_SETTING_BOND_GET_PRIVATE (setting);
+
+ value_len = strlen (value);
+ g_return_val_if_fail (value_len > 0 && value_len < 200, FALSE);
+
+ g_hash_table_insert (priv->options, g_strdup (name), g_strdup (value));
+
+ if (!strcmp (name, NM_SETTING_BOND_OPTION_MIIMON)) {
+ g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
+ g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
+ } else if (!strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL))
+ g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_MIIMON);
+
+ return TRUE;
+}
+
+/**
+ * nm_setting_bond_remove_option:
+ * @setting: the #NMSettingBond
+ * @name: name of the option to remove
+ *
+ * Remove the bonding option referenced by @name from the internal option
+ * list.
+ *
+ * Returns: %TRUE if the option was found and removed from the internal option
+ * list, %FALSE if it was not.
+ **/
+gboolean
+nm_setting_bond_remove_option (NMSettingBond *setting,
+ const char *name)
+{
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
+ g_return_val_if_fail (validate_option (name), FALSE);
+
+ return g_hash_table_remove (NM_SETTING_BOND_GET_PRIVATE (setting)->options, name);
+}
+
+/**
+ * nm_setting_bond_get_valid_options:
+ * @setting: the #NMSettingBond
+ *
+ * Returns a list of valid bond options.
+ *
+ * Returns: a NULL-terminated array of strings of valid bond options.
+ **/
+const char **
+nm_setting_bond_get_valid_options (NMSettingBond *setting)
+{
+ static const char *array[G_N_ELEMENTS (defaults) + 1] = { NULL };
+ int i;
+
+ /* initialize the array once */
+ if (G_UNLIKELY (array[0] == NULL)) {
+ for (i = 0; i < G_N_ELEMENTS (defaults); i++)
+ array[i] = defaults[i].opt;
+ array[i] = NULL;
+ }
+ return array;
+}
+
+/**
+ * nm_setting_bond_get_option_default:
+ * @setting: the #NMSettingBond
+ * @name: the name of the option
+ *
+ * Returns: the value of the bond option if not overridden by an entry in
+ * the #NMSettingBond:options property.
+ **/
+const char *
+nm_setting_bond_get_option_default (NMSettingBond *setting, const char *name)
+{
+ guint i;
+
+ g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NULL);
+ g_return_val_if_fail (validate_option (name), NULL);
+
+ for (i = 0; i < G_N_ELEMENTS (defaults); i++) {
+ if (g_strcmp0 (defaults[i].opt, name) == 0)
+ return defaults[i].val;
+ }
+ /* Any option that passes validate_option() should also be found in defaults */
+ g_assert_not_reached ();
+}
+
+/*
+ * This function is a 1:1 copy of the kernel's
+ * dev_valid_name() in net/core/dev.c
+ */
+static gboolean
+dev_valid_name(const char *name)
+{
+ if (*name == '\0')
+ return FALSE;
+
+ if (strlen (name) >= 16)
+ return FALSE;
+
+ if (!strcmp (name, ".") || !strcmp (name, ".."))
+ return FALSE;
+
+ while (*name) {
+ if (*name == '/' || isspace (*name))
+ return FALSE;
+ name++;
+ }
+
+ return TRUE;
+}
+
+static gint
+find_setting_by_name (gconstpointer a, gconstpointer b)
+{
+ NMSetting *setting = NM_SETTING (a);
+ const char *str = (const char *) b;
+
+ return strcmp (nm_setting_get_name (setting), str);
+}
+
+static gboolean
+verify (NMSetting *setting, GSList *all_settings, GError **error)
+{
+ NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (setting);
+ GHashTableIter iter;
+ const char *key, *value;
+ const char *valid_modes[] = { "balance-rr",
+ "active-backup",
+ "balance-xor",
+ "broadcast",
+ "802.3ad",
+ "balance-tlb",
+ "balance-alb",
+ NULL };
+ int miimon = 0, arp_interval = 0;
+ const char *arp_ip_target = NULL;
+
+ if (!priv->interface_name || !strlen(priv->interface_name)) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_MISSING_PROPERTY,
+ NM_SETTING_BOND_INTERFACE_NAME);
+ return FALSE;
+ }
+
+ if (!dev_valid_name (priv->interface_name)) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_PROPERTY,
+ NM_SETTING_BOND_INTERFACE_NAME);
+ return FALSE;
+ }
+
+ g_hash_table_iter_init (&iter, priv->options);
+ while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) {
+ if ( !validate_option (key)
+ || !value[0]
+ || (strlen (value) > 200)
+ || strchr (value, ' ')) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ key);
+ return FALSE;
+ }
+ }
+
+ value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_MIIMON);
+ if (value)
+ miimon = atoi (value);
+ value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
+ if (value)
+ arp_interval = atoi (value);
+
+ /* Can only set one of miimon and arp_interval */
+ if (miimon > 0 && arp_interval > 0) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_ARP_INTERVAL);
+ }
+
+ value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_MODE);
+ if (!value) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_MISSING_OPTION,
+ NM_SETTING_BOND_OPTION_MODE);
+ return FALSE;
+ }
+ if (!_nm_utils_string_in_list (value, valid_modes)) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_MODE);
+ return FALSE;
+ }
+
+ /* Make sure mode is compatible with other settings */
+ if ( strcmp (value, "balance-alb") == 0
+ || strcmp (value, "balance-tlb") == 0) {
+ if (arp_interval > 0) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_ARP_INTERVAL);
+ }
+ }
+ if (g_slist_find_custom (all_settings, NM_SETTING_INFINIBAND_SETTING_NAME, find_setting_by_name)) {
+ if (strcmp (value, "active-backup") != 0) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_MODE);
+ return FALSE;
+ }
+ }
+
+ if (miimon == 0) {
+ /* updelay and downdelay can only be used with miimon */
+ if (g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_UPDELAY)) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_UPDELAY);
+ return FALSE;
+ }
+ if (g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY)) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_DOWNDELAY);
+ return FALSE;
+ }
+ }
+
+ /* arp_ip_target can only be used with arp_interval, and must
+ * contain a comma-separated list of IPv4 addresses.
+ */
+ arp_ip_target = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
+ if (arp_interval > 0) {
+ char **addrs;
+ guint32 addr;
+ int i;
+
+ if (!arp_ip_target) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_MISSING_OPTION,
+ NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
+ return FALSE;
+ }
+
+ addrs = g_strsplit (arp_ip_target, ",", -1);
+ if (!addrs[0]) {
+ g_strfreev (addrs);
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
+ return FALSE;
+ }
+
+ for (i = 0; addrs[i]; i++) {
+ if (!inet_pton (AF_INET, addrs[i], &addr)) {
+ g_strfreev (addrs);
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
+ return FALSE;
+ }
+ }
+ g_strfreev (addrs);
+ } else {
+ if (arp_ip_target) {
+ g_set_error (error,
+ NM_SETTING_BOND_ERROR,
+ NM_SETTING_BOND_ERROR_INVALID_OPTION,
+ NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static const char *
+get_virtual_iface_name (NMSetting *setting)
+{
+ NMSettingBond *self = NM_SETTING_BOND (setting);
+
+ return nm_setting_bond_get_interface_name (self);
+}
+
+static void
+nm_setting_bond_init (NMSettingBond *setting)
+{
+ NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (setting);
+
+ g_object_set (setting, NM_SETTING_NAME, NM_SETTING_BOND_SETTING_NAME,
+ NULL);
+
+ priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+
+ /* Default values: */
+ nm_setting_bond_add_option (setting, NM_SETTING_BOND_OPTION_MODE, "balance-rr");
+ nm_setting_bond_add_option (setting, NM_SETTING_BOND_OPTION_MIIMON, "100");
+}
+
+static void
+finalize (GObject *object)
+{
+ NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (object);
+
+ g_free (priv->interface_name);
+ g_hash_table_destroy (priv->options);
+
+ G_OBJECT_CLASS (nm_setting_bond_parent_class)->finalize (object);
+}
+
+static void
+copy_hash (gpointer key, gpointer value, gpointer user_data)
+{
+ g_hash_table_insert ((GHashTable *) user_data, g_strdup (key), g_strdup (value));
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (object);
+ GHashTable *new_hash;
+
+ switch (prop_id) {
+ case PROP_INTERFACE_NAME:
+ priv->interface_name = g_value_dup_string (value);
+ break;
+ case PROP_OPTIONS:
+ /* Must make a deep copy of the hash table here... */
+ g_hash_table_remove_all (priv->options);
+ new_hash = g_value_get_boxed (value);
+ if (new_hash)
+ g_hash_table_foreach (new_hash, copy_hash, priv->options);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (object);
+ NMSettingBond *setting = NM_SETTING_BOND (object);
+
+ switch (prop_id) {
+ case PROP_INTERFACE_NAME:
+ g_value_set_string (value, nm_setting_bond_get_interface_name (setting));
+ break;
+ case PROP_OPTIONS:
+ g_value_set_boxed (value, priv->options);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_setting_bond_class_init (NMSettingBondClass *setting_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
+ NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
+
+ g_type_class_add_private (setting_class, sizeof (NMSettingBondPrivate));
+
+ /* virtual methods */
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->finalize = finalize;
+ parent_class->verify = verify;
+ parent_class->get_virtual_iface_name = get_virtual_iface_name;
+
+ /* Properties */
+ /**
+ * NMSettingBond:interface-name:
+ *
+ * The name of the virtual in-kernel bonding network interface
+ **/
+ g_object_class_install_property
+ (object_class, PROP_INTERFACE_NAME,
+ g_param_spec_string (NM_SETTING_BOND_INTERFACE_NAME,
+ "InterfaceName",
+ "The name of the virtual in-kernel bonding network interface",
+ NULL,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingBond:options:
+ *
+ * Dictionary of key/value pairs of bonding options. Both keys
+ * and values must be strings. Option names must contain only
+ * alphanumeric characters (ie, [a-zA-Z0-9]).
+ **/
+ g_object_class_install_property
+ (object_class, PROP_OPTIONS,
+ _nm_param_spec_specialized (NM_SETTING_BOND_OPTIONS,
+ "Options",
+ "Dictionary of key/value pairs of bonding "
+ "options. Both keys and values must be "
+ "strings. Option names must contain only "
+ "alphanumeric characters (ie, [a-zA-Z0-9]).",
+ DBUS_TYPE_G_MAP_OF_STRING,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+}
diff --git a/libnm-util/nm-setting-bond.h b/libnm-util/nm-setting-bond.h
new file mode 100644
index 000000000..9d494d3d1
--- /dev/null
+++ b/libnm-util/nm-setting-bond.h
@@ -0,0 +1,107 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Thomas Graf <tgraf@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2011 - 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_SETTING_BOND_H
+#define NM_SETTING_BOND_H
+
+#include <nm-setting.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_SETTING_BOND (nm_setting_bond_get_type ())
+#define NM_SETTING_BOND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_BOND, NMSettingBond))
+#define NM_SETTING_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_BOND, NMSettingBondClass))
+#define NM_IS_SETTING_BOND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_BOND))
+#define NM_IS_SETTING_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_BOND))
+#define NM_SETTING_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_BOND, NMSettingBondClass))
+
+#define NM_SETTING_BOND_SETTING_NAME "bond"
+
+/**
+ * NMSettingBondError:
+ * @NM_SETTING_BOND_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_SETTING_BOND_ERROR_INVALID_PROPERTY: the property was invalid
+ * @NM_SETTING_BOND_ERROR_MISSING_PROPERTY: the property was missing and is
+ * required
+ */
+typedef enum {
+ NM_SETTING_BOND_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_BOND_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_BOND_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_BOND_ERROR_INVALID_OPTION, /*< nick=InvalidOption >*/
+ NM_SETTING_BOND_ERROR_MISSING_OPTION, /*< nick=MissingOption >*/
+} NMSettingBondError;
+
+#define NM_SETTING_BOND_ERROR nm_setting_bond_error_quark ()
+GQuark nm_setting_bond_error_quark (void);
+
+#define NM_SETTING_BOND_INTERFACE_NAME "interface-name"
+#define NM_SETTING_BOND_OPTIONS "options"
+
+/* Valid options for the 'options' property */
+#define NM_SETTING_BOND_OPTION_MODE "mode"
+#define NM_SETTING_BOND_OPTION_MIIMON "miimon"
+#define NM_SETTING_BOND_OPTION_DOWNDELAY "downdelay"
+#define NM_SETTING_BOND_OPTION_UPDELAY "updelay"
+#define NM_SETTING_BOND_OPTION_ARP_INTERVAL "arp_interval"
+#define NM_SETTING_BOND_OPTION_ARP_IP_TARGET "arp_ip_target"
+
+typedef struct {
+ NMSetting parent;
+} NMSettingBond;
+
+typedef struct {
+ NMSettingClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+} NMSettingBondClass;
+
+GType nm_setting_bond_get_type (void);
+
+NMSetting * nm_setting_bond_new (void);
+const char * nm_setting_bond_get_interface_name (NMSettingBond *setting);
+guint32 nm_setting_bond_get_num_options (NMSettingBond *setting);
+gboolean nm_setting_bond_get_option (NMSettingBond *setting,
+ guint32 idx,
+ const char **out_name,
+ const char **out_value);
+const char * nm_setting_bond_get_option_by_name (NMSettingBond *setting,
+ const char *name);
+gboolean nm_setting_bond_add_option (NMSettingBond *setting,
+ const char *name,
+ const char *value);
+gboolean nm_setting_bond_remove_option (NMSettingBond *setting,
+ const char *name);
+
+const char **nm_setting_bond_get_valid_options (NMSettingBond *setting);
+
+const char * nm_setting_bond_get_option_default (NMSettingBond *setting,
+ const char *name);
+
+G_END_DECLS
+
+#endif /* NM_SETTING_BOND_H */
diff --git a/libnm-util/nm-setting-cdma.c b/libnm-util/nm-setting-cdma.c
index cb5b27e88..43bf93b19 100644
--- a/libnm-util/nm-setting-cdma.c
+++ b/libnm-util/nm-setting-cdma.c
@@ -53,31 +53,6 @@ nm_setting_cdma_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_cdma_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_CDMA_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_CDMA_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_CDMA_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The required serial setting is missing (DEPRECATED) */
- ENUM_ENTRY (NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING, "MissingSerialSetting"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingCdmaError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingCdma, nm_setting_cdma, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-cdma.h b/libnm-util/nm-setting-cdma.h
index d0a5de4cb..a9491efb6 100644
--- a/libnm-util/nm-setting-cdma.h
+++ b/libnm-util/nm-setting-cdma.h
@@ -49,15 +49,12 @@ G_BEGIN_DECLS
* is missing in the connection
*/
typedef enum {
- NM_SETTING_CDMA_ERROR_UNKNOWN = 0,
- NM_SETTING_CDMA_ERROR_INVALID_PROPERTY,
- NM_SETTING_CDMA_ERROR_MISSING_PROPERTY,
- NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING
+ NM_SETTING_CDMA_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_CDMA_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_CDMA_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING /*< nick=MissingSerialSetting >*/
} NMSettingCdmaError;
-#define NM_TYPE_SETTING_CDMA_ERROR (nm_setting_cdma_error_get_type ())
-GType nm_setting_cdma_error_get_type (void);
-
#define NM_SETTING_CDMA_ERROR nm_setting_cdma_error_quark ()
GQuark nm_setting_cdma_error_quark (void);
diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c
index e9030b107..94ca91120 100644
--- a/libnm-util/nm-setting-connection.c
+++ b/libnm-util/nm-setting-connection.c
@@ -58,27 +58,6 @@ nm_setting_connection_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_connection_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_SETTING_CONNECTION_ERROR_UNKNOWN, "UnknownError"),
- ENUM_ENTRY (NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- ENUM_ENTRY (NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY, "MissingProperty"),
- ENUM_ENTRY (NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND, "TypeSettingNotFound"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingConnectionError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingConnection, nm_setting_connection, NM_TYPE_SETTING)
@@ -97,10 +76,13 @@ typedef struct {
char *id;
char *uuid;
char *type;
+ char *master;
+ char *slave_type;
GSList *permissions; /* list of Permission structs */
gboolean autoconnect;
guint64 timestamp;
gboolean read_only;
+ char *zone;
} NMSettingConnectionPrivate;
enum {
@@ -112,6 +94,9 @@ enum {
PROP_AUTOCONNECT,
PROP_TIMESTAMP,
PROP_READ_ONLY,
+ PROP_ZONE,
+ PROP_MASTER,
+ PROP_SLAVE_TYPE,
LAST_PROP
};
@@ -478,6 +463,72 @@ nm_setting_connection_get_read_only (NMSettingConnection *setting)
return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->read_only;
}
+/**
+ * nm_setting_connection_get_zone:
+ * @setting: the #NMSettingConnection
+ *
+ * Returns the #NMSettingConnection:zone property of the connection.
+ *
+ * Returns: the trust level of a connection
+ **/
+const char *
+nm_setting_connection_get_zone (NMSettingConnection *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), NULL);
+
+ return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->zone;
+}
+
+/**
+ * nm_setting_connection_get_master:
+ * @setting: the #NMSettingConnection
+ *
+ * Returns the #NMSettingConnection:master property of the connection.
+ *
+ * Returns: interface name of the master device or UUID of the master
+ * connection.
+ */
+const char *
+nm_setting_connection_get_master (NMSettingConnection *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), NULL);
+
+ return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->master;
+}
+
+/**
+ * nm_setting_connection_get_slave_type:
+ * @setting: the #NMSettingConnection
+ *
+ * Returns the #NMSettingConnection:slave-type property of the connection.
+ *
+ * Returns: the type of slave this connection is, if any
+ */
+const char *
+nm_setting_connection_get_slave_type (NMSettingConnection *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), NULL);
+
+ return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->slave_type;
+}
+
+/**
+ * nm_setting_connection_is_slave_type:
+ * @setting: the #NMSettingConnection
+ * @type: the setting name (ie #NM_SETTING_BOND_SETTING_NAME) to be matched
+ * against @setting's slave type
+ *
+ * Returns: TRUE if connection is of the given slave @type
+ */
+gboolean
+nm_setting_connection_is_slave_type (NMSettingConnection *setting,
+ const char *type)
+{
+ g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), FALSE);
+
+ return !g_strcmp0 (NM_SETTING_CONNECTION_GET_PRIVATE (setting)->slave_type, type);
+}
+
static gint
find_setting_by_name (gconstpointer a, gconstpointer b)
{
@@ -550,6 +601,14 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
return FALSE;
}
+ if (priv->zone && !priv->zone[0]) {
+ g_set_error (error,
+ NM_SETTING_CONNECTION_ERROR,
+ NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY,
+ NM_SETTING_CONNECTION_TYPE);
+ return FALSE;
+ }
+
/* Make sure the corresponding 'type' item is present */
if (all_settings && !g_slist_find_custom (all_settings, priv->type, find_setting_by_name)) {
g_set_error (error,
@@ -559,6 +618,46 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
return FALSE;
}
+ /*
+ * Bonding: Slaves are not allowed to have any IP configuration.
+ */
+ if (priv->slave_type && all_settings &&
+ !strcmp(priv->slave_type, NM_SETTING_BOND_SETTING_NAME)) {
+ GSList *list;
+
+ list = g_slist_find_custom (all_settings, NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ find_setting_by_name);
+ if (list) {
+ NMSettingIP4Config *s_ip4 = g_slist_nth_data (list, 0);
+ g_assert (s_ip4);
+
+ if (strcmp (nm_setting_ip4_config_get_method (s_ip4),
+ NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
+ g_set_error (error,
+ NM_SETTING_CONNECTION_ERROR,
+ NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED,
+ "No IP configuration allowed for bonding slave");
+ return FALSE;
+ }
+ }
+
+ list = g_slist_find_custom (all_settings, NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ find_setting_by_name);
+ if (list) {
+ NMSettingIP6Config *s_ip6 = g_slist_nth_data (list, 0);
+ g_assert (s_ip6);
+
+ if (strcmp (nm_setting_ip6_config_get_method (s_ip6),
+ NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
+ g_set_error (error,
+ NM_SETTING_CONNECTION_ERROR,
+ NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED,
+ "No IPv6 configuration allowed for bonding slave");
+ return FALSE;
+ }
+ }
+ }
+
return TRUE;
}
@@ -591,6 +690,9 @@ finalize (GObject *object)
g_free (priv->id);
g_free (priv->uuid);
g_free (priv->type);
+ g_free (priv->zone);
+ g_free (priv->master);
+ g_free (priv->slave_type);
nm_utils_slist_free (priv->permissions, (GDestroyNotify) permission_free);
G_OBJECT_CLASS (nm_setting_connection_parent_class)->finalize (object);
@@ -644,6 +746,18 @@ set_property (GObject *object, guint prop_id,
case PROP_READ_ONLY:
priv->read_only = g_value_get_boolean (value);
break;
+ case PROP_ZONE:
+ g_free (priv->zone);
+ priv->zone = g_value_dup_string (value);
+ break;
+ case PROP_MASTER:
+ g_free (priv->master);
+ priv->master = g_value_dup_string (value);
+ break;
+ case PROP_SLAVE_TYPE:
+ g_free (priv->slave_type);
+ priv->slave_type = g_value_dup_string (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -689,6 +803,15 @@ get_property (GObject *object, guint prop_id,
case PROP_READ_ONLY:
g_value_set_boolean (value, nm_setting_connection_get_read_only (setting));
break;
+ case PROP_ZONE:
+ g_value_set_string (value, nm_setting_connection_get_zone (setting));
+ break;
+ case PROP_MASTER:
+ g_value_set_string (value, nm_setting_connection_get_master (setting));
+ break;
+ case PROP_SLAVE_TYPE:
+ g_value_set_string (value, nm_setting_connection_get_slave_type (setting));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -876,4 +999,55 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
"cannot yet write updated connections back out.",
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
+
+ /**
+ * NMSettingConnection:zone:
+ *
+ * The trust level of a the connection.
+ * Free form case-insensitive string (for example "Home", "Work", "Public").
+ * NULL or unspecified zone means the connection will be placed in the
+ * default zone as defined by the firewall.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_ZONE,
+ g_param_spec_string (NM_SETTING_CONNECTION_ZONE,
+ "Zone",
+ "The trust level of a the connection."
+ "Free form case-insensitive string (for example "
+ "\"Home\", \"Work\", \"Public\"). NULL or "
+ "unspecified zone means the connection will be "
+ "placed in the default zone as defined by the "
+ "firewall.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
+
+ /**
+ * NMSettingConnection:master:
+ *
+ * Interface name of the master device or UUID of the master connection.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_MASTER,
+ g_param_spec_string (NM_SETTING_CONNECTION_MASTER,
+ "Master",
+ "Interface name of the master device or UUID of "
+ "the master connection",
+ NULL,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
+
+ /**
+ * NMSettingConnection:slave-type:
+ *
+ * Setting name describing the type of slave device (ie
+ * #NM_SETTING_BOND_SETTING_NAME) or NULL if this connection is not a slave.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_SLAVE_TYPE,
+ g_param_spec_string (NM_SETTING_CONNECTION_SLAVE_TYPE,
+ "Slave-Type",
+ "Setting name describing the type of slave "
+ "this connection is (ie, 'bond') or NULL if this "
+ "connection is not a slave.",
+ NULL,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
}
diff --git a/libnm-util/nm-setting-connection.h b/libnm-util/nm-setting-connection.h
index 1ec5bf120..198748451 100644
--- a/libnm-util/nm-setting-connection.h
+++ b/libnm-util/nm-setting-connection.h
@@ -49,6 +49,8 @@ G_BEGIN_DECLS
* @NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND: the #NMSetting object
* referenced by the setting name contained in the
* #NMSettingConnection:type property was not present in the #NMConnection
+ * @NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED: ip configuration is not
+ * allowed to be present.
*
* Describes errors that may result from operations involving a
* #NMSettingConnection.
@@ -56,15 +58,13 @@ G_BEGIN_DECLS
**/
typedef enum
{
- NM_SETTING_CONNECTION_ERROR_UNKNOWN = 0,
- NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY,
- NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
- NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND
+ NM_SETTING_CONNECTION_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND, /*< nick=TypeSettingNotFound >*/
+ NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED, /*< nick=IpConfigNotAllowed >*/
} NMSettingConnectionError;
-#define NM_TYPE_SETTING_CONNECTION_ERROR (nm_setting_connection_error_get_type ())
-GType nm_setting_connection_error_get_type (void);
-
#define NM_SETTING_CONNECTION_ERROR nm_setting_connection_error_quark ()
GQuark nm_setting_connection_error_quark (void);
@@ -75,6 +75,16 @@ GQuark nm_setting_connection_error_quark (void);
#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
#define NM_SETTING_CONNECTION_READ_ONLY "read-only"
#define NM_SETTING_CONNECTION_PERMISSIONS "permissions"
+#define NM_SETTING_CONNECTION_ZONE "zone"
+#define NM_SETTING_CONNECTION_MASTER "master"
+#define NM_SETTING_CONNECTION_SLAVE_TYPE "slave-type"
+
+/* Well-known zone names */
+#define NM_SETTING_CONNECTION_ZONE_TRUSTED "trusted"
+#define NM_SETTING_CONNECTION_ZONE_HOME "home"
+#define NM_SETTING_CONNECTION_ZONE_WORK "work"
+#define NM_SETTING_CONNECTION_ZONE_PUBLIC "public"
+#define NM_SETTING_CONNECTION_ZONE_BLOCK "block"
/**
* NMSettingConnection:
@@ -112,6 +122,7 @@ gboolean nm_setting_connection_get_permission (NMSettingConnection *set
const char **out_ptype,
const char **out_pitem,
const char **out_detail);
+const char *nm_setting_connection_get_zone (NMSettingConnection *setting);
gboolean nm_setting_connection_permissions_user_allowed (NMSettingConnection *setting, const char *uname);
gboolean nm_setting_connection_add_permission (NMSettingConnection *setting,
const char *ptype,
@@ -119,6 +130,10 @@ gboolean nm_setting_connection_add_permission (NMSettingConnection *set
const char *detail);
void nm_setting_connection_remove_permission (NMSettingConnection *setting,
guint32 idx);
+const char *nm_setting_connection_get_master (NMSettingConnection *setting);
+gboolean nm_setting_connection_is_slave_type (NMSettingConnection *setting,
+ const char *type);
+const char *nm_setting_connection_get_slave_type (NMSettingConnection *setting);
G_END_DECLS
diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c
index 80d3fd313..2264d008c 100644
--- a/libnm-util/nm-setting-gsm.c
+++ b/libnm-util/nm-setting-gsm.c
@@ -56,31 +56,6 @@ nm_setting_gsm_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_gsm_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_GSM_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_GSM_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_GSM_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The required serial setting is missing (DEPRECATED) */
- ENUM_ENTRY (NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING, "MissingSerialSetting"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingGsmError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingGsm, nm_setting_gsm, NM_TYPE_SETTING)
@@ -292,13 +267,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
{
NMSettingGsmPrivate *priv = NM_SETTING_GSM_GET_PRIVATE (setting);
- if (!priv->number) {
- g_set_error (error,
- NM_SETTING_GSM_ERROR,
- NM_SETTING_GSM_ERROR_MISSING_PROPERTY,
- NM_SETTING_GSM_NUMBER);
- return FALSE;
- } else if (!strlen (priv->number)) {
+ if (priv->number && !priv->number[0]) {
g_set_error (error,
NM_SETTING_GSM_ERROR,
NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
diff --git a/libnm-util/nm-setting-gsm.h b/libnm-util/nm-setting-gsm.h
index 6459a4abf..af3efc2cd 100644
--- a/libnm-util/nm-setting-gsm.h
+++ b/libnm-util/nm-setting-gsm.h
@@ -49,15 +49,12 @@ G_BEGIN_DECLS
* is missing in the connection
*/
typedef enum {
- NM_SETTING_GSM_ERROR_UNKNOWN = 0,
- NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
- NM_SETTING_GSM_ERROR_MISSING_PROPERTY,
- NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING
+ NM_SETTING_GSM_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_GSM_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_GSM_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING /*< nick=MissingSerialSetting >*/
} NMSettingGsmError;
-#define NM_TYPE_SETTING_GSM_ERROR (nm_setting_gsm_error_get_type ())
-GType nm_setting_gsm_error_get_type (void);
-
#define NM_SETTING_GSM_ERROR nm_setting_gsm_error_quark ()
GQuark nm_setting_gsm_error_quark (void);
diff --git a/libnm-util/nm-setting-infiniband.c b/libnm-util/nm-setting-infiniband.c
new file mode 100644
index 000000000..dbef5b8a7
--- /dev/null
+++ b/libnm-util/nm-setting-infiniband.c
@@ -0,0 +1,291 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011 Red Hat, Inc.
+ */
+
+#include <dbus/dbus-glib.h>
+#include <linux/if_infiniband.h>
+
+#include "nm-setting-infiniband.h"
+#include "nm-param-spec-specialized.h"
+#include "nm-utils-private.h"
+
+/**
+ * SECTION:nm-setting-infiniband
+ * @short_description: Describes connection properties for IP-over-InfiniBand networks
+ * @include: nm-setting-infiniband.h
+ *
+ * The #NMSettingInfiniband object is a #NMSetting subclass that describes properties
+ * necessary for connection to IP-over-InfiniBand networks.
+ **/
+
+/**
+ * nm_setting_infiniband_error_quark:
+ *
+ * Registers an error quark for #NMSettingInfiniband if necessary.
+ *
+ * Returns: the error quark used for #NMSettingInfiniband errors.
+ **/
+GQuark
+nm_setting_infiniband_error_quark (void)
+{
+ static GQuark quark;
+
+ if (G_UNLIKELY (!quark))
+ quark = g_quark_from_static_string ("nm-setting-infiniband-error-quark");
+ return quark;
+}
+
+G_DEFINE_TYPE (NMSettingInfiniband, nm_setting_infiniband, NM_TYPE_SETTING)
+
+#define NM_SETTING_INFINIBAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_INFINIBAND, NMSettingInfinibandPrivate))
+
+typedef struct {
+ GByteArray *mac_address;
+ char *transport_mode;
+ guint32 mtu;
+} NMSettingInfinibandPrivate;
+
+enum {
+ PROP_0,
+ PROP_MAC_ADDRESS,
+ PROP_MTU,
+ PROP_TRANSPORT_MODE,
+
+ LAST_PROP
+};
+
+/**
+ * nm_setting_infiniband_new:
+ *
+ * Creates a new #NMSettingInfiniband object with default values.
+ *
+ * Returns: (transfer full): the new empty #NMSettingInfiniband object
+ **/
+NMSetting *
+nm_setting_infiniband_new (void)
+{
+ return (NMSetting *) g_object_new (NM_TYPE_SETTING_INFINIBAND, NULL);
+}
+
+/**
+ * nm_setting_infiniband_get_mac_address:
+ * @setting: the #NMSettingInfiniband
+ *
+ * Returns: the #NMSettingInfiniband:mac-address property of the setting
+ **/
+const GByteArray *
+nm_setting_infiniband_get_mac_address (NMSettingInfiniband *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_INFINIBAND (setting), NULL);
+
+ return NM_SETTING_INFINIBAND_GET_PRIVATE (setting)->mac_address;
+}
+
+/**
+ * nm_setting_infiniband_get_mtu:
+ * @setting: the #NMSettingInfiniband
+ *
+ * Returns: the #NMSettingInfiniband:mtu property of the setting
+ **/
+guint32
+nm_setting_infiniband_get_mtu (NMSettingInfiniband *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_INFINIBAND (setting), 0);
+
+ return NM_SETTING_INFINIBAND_GET_PRIVATE (setting)->mtu;
+}
+
+/**
+ * nm_setting_infiniband_get_transport_mode:
+ * @setting: the #NMSettingInfiniband
+ *
+ * Returns the transport mode for this device. Either 'datagram' or
+ * 'connected'.
+ *
+ * Returns: the IPoIB transport mode
+ **/
+const char *
+nm_setting_infiniband_get_transport_mode (NMSettingInfiniband *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_INFINIBAND (setting), NULL);
+
+ return NM_SETTING_INFINIBAND_GET_PRIVATE (setting)->transport_mode;
+}
+
+
+static gboolean
+verify (NMSetting *setting, GSList *all_settings, GError **error)
+{
+ NMSettingInfinibandPrivate *priv = NM_SETTING_INFINIBAND_GET_PRIVATE (setting);
+
+ if (priv->mac_address && priv->mac_address->len != INFINIBAND_ALEN) {
+ g_set_error (error,
+ NM_SETTING_INFINIBAND_ERROR,
+ NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS);
+ return FALSE;
+ }
+
+ if (!g_strcmp0 (priv->transport_mode, "datagram")) {
+ if (priv->mtu > 2044)
+ priv->mtu = 2044;
+ } else if (!g_strcmp0 (priv->transport_mode, "connected")) {
+ if (priv->mtu > 65520)
+ priv->mtu = 65520;
+ } else {
+ g_set_error (error,
+ NM_SETTING_INFINIBAND_ERROR,
+ NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY,
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+nm_setting_infiniband_init (NMSettingInfiniband *setting)
+{
+ g_object_set (setting, NM_SETTING_NAME, NM_SETTING_INFINIBAND_SETTING_NAME, NULL);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMSettingInfinibandPrivate *priv = NM_SETTING_INFINIBAND_GET_PRIVATE (object);
+
+ g_free (priv->transport_mode);
+ if (priv->mac_address)
+ g_byte_array_free (priv->mac_address, TRUE);
+
+ G_OBJECT_CLASS (nm_setting_infiniband_parent_class)->finalize (object);
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMSettingInfinibandPrivate *priv = NM_SETTING_INFINIBAND_GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MAC_ADDRESS:
+ if (priv->mac_address)
+ g_byte_array_free (priv->mac_address, TRUE);
+ priv->mac_address = g_value_dup_boxed (value);
+ break;
+ case PROP_MTU:
+ priv->mtu = g_value_get_uint (value);
+ break;
+ case PROP_TRANSPORT_MODE:
+ g_free (priv->transport_mode);
+ priv->transport_mode = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMSettingInfiniband *setting = NM_SETTING_INFINIBAND (object);
+
+ switch (prop_id) {
+ case PROP_MAC_ADDRESS:
+ g_value_set_boxed (value, nm_setting_infiniband_get_mac_address (setting));
+ break;
+ case PROP_MTU:
+ g_value_set_uint (value, nm_setting_infiniband_get_mtu (setting));
+ break;
+ case PROP_TRANSPORT_MODE:
+ g_value_set_string (value, nm_setting_infiniband_get_transport_mode (setting));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_setting_infiniband_class_init (NMSettingInfinibandClass *setting_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
+ NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
+
+ g_type_class_add_private (setting_class, sizeof (NMSettingInfinibandPrivate));
+
+ /* virtual methods */
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->finalize = finalize;
+ parent_class->verify = verify;
+
+ /* Properties */
+ /**
+ * NMSettingInfiniband:mac-address:
+ *
+ * If specified, this connection will only apply to the IPoIB
+ * device whose permanent MAC address matches. This property does
+ * not change the MAC address of the device (i.e. MAC spoofing).
+ **/
+ g_object_class_install_property
+ (object_class, PROP_MAC_ADDRESS,
+ _nm_param_spec_specialized (NM_SETTING_INFINIBAND_MAC_ADDRESS,
+ "Device MAC Address",
+ "If specified, this connection will only apply to "
+ "the IPoIB device whose permanent MAC address matches. "
+ "This property does not change the MAC address "
+ "of the device (i.e. MAC spoofing).",
+ DBUS_TYPE_G_UCHAR_ARRAY,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingInfiniband:mtu:
+ *
+ * If non-zero, only transmit packets of the specified size or smaller,
+ * breaking larger packets up into multiple frames.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_MTU,
+ g_param_spec_uint (NM_SETTING_INFINIBAND_MTU,
+ "MTU",
+ "If non-zero, only transmit packets of the specified "
+ "size or smaller, breaking larger packets up into "
+ "multiple frames.",
+ 0, G_MAXUINT32, 0,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
+
+ /**
+ * NMSettingInfiniband:transport-mode:
+ *
+ * The IP-over-InfiniBand transport mode. Either 'datagram' or
+ * 'connected'.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_TRANSPORT_MODE,
+ g_param_spec_string (NM_SETTING_INFINIBAND_TRANSPORT_MODE,
+ "Transport Mode",
+ "The IPoIB transport mode. Either 'datagram' or 'connected'.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+}
+
diff --git a/libnm-util/nm-setting-infiniband.h b/libnm-util/nm-setting-infiniband.h
new file mode 100644
index 000000000..dc8e8ad0e
--- /dev/null
+++ b/libnm-util/nm-setting-infiniband.h
@@ -0,0 +1,81 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011 Red Hat, Inc.
+ */
+
+#ifndef NM_SETTING_INFINIBAND_H
+#define NM_SETTING_INFINIBAND_H
+
+#include <nm-setting.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_SETTING_INFINIBAND (nm_setting_infiniband_get_type ())
+#define NM_SETTING_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_INFINIBAND, NMSettingInfiniband))
+#define NM_SETTING_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_INFINIBAND, NMSettingInfinibandClass))
+#define NM_IS_SETTING_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_INFINIBAND))
+#define NM_IS_SETTING_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_INFINIBAND))
+#define NM_SETTING_INFINIBAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_INFINIBAND, NMSettingInfinibandClass))
+
+#define NM_SETTING_INFINIBAND_SETTING_NAME "infiniband"
+
+/**
+ * NMSettingInfinibandError:
+ * @NM_SETTING_INFINIBAND_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY: the property was invalid
+ * @NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY: the property was missing and is
+ * required
+ */
+typedef enum {
+ NM_SETTING_INFINIBAND_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY /*< nick=MissingProperty >*/
+} NMSettingInfinibandError;
+
+#define NM_SETTING_INFINIBAND_ERROR nm_setting_infiniband_error_quark ()
+GQuark nm_setting_infiniband_error_quark (void);
+
+#define NM_SETTING_INFINIBAND_MAC_ADDRESS "mac-address"
+#define NM_SETTING_INFINIBAND_MTU "mtu"
+#define NM_SETTING_INFINIBAND_TRANSPORT_MODE "transport-mode"
+
+typedef struct {
+ NMSetting parent;
+} NMSettingInfiniband;
+
+typedef struct {
+ NMSettingClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+} NMSettingInfinibandClass;
+
+GType nm_setting_infiniband_get_type (void);
+
+NMSetting * nm_setting_infiniband_new (void);
+const GByteArray *nm_setting_infiniband_get_mac_address (NMSettingInfiniband *setting);
+guint32 nm_setting_infiniband_get_mtu (NMSettingInfiniband *setting);
+const char * nm_setting_infiniband_get_transport_mode (NMSettingInfiniband *setting);
+
+G_END_DECLS
+
+#endif /* NM_SETTING_INFINIBAND_H */
diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c
index 6b164ea88..54cf03647 100644
--- a/libnm-util/nm-setting-ip4-config.c
+++ b/libnm-util/nm-setting-ip4-config.c
@@ -57,31 +57,6 @@ nm_setting_ip4_config_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_ip4_config_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The specified property was not allowed in combination with the current 'method' */
- ENUM_ENTRY (NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, "NotAllowedForMethod"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingIP4ConfigError", values);
- }
- return etype;
-}
-
#if GLIB_CHECK_VERSION(2,26,0)
G_DEFINE_BOXED_TYPE (NMIP4Address, nm_ip4_address, nm_ip4_address_dup, nm_ip4_address_unref)
G_DEFINE_BOXED_TYPE (NMIP4Route, nm_ip4_route, nm_ip4_route_dup, nm_ip4_route_unref)
@@ -1256,7 +1231,7 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class)
"this property to TRUE allows the overall network "
"configuration to succeed if IPv4 configuration "
"fails but IPv6 configuration completes successfully.",
- FALSE,
+ TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
}
diff --git a/libnm-util/nm-setting-ip4-config.h b/libnm-util/nm-setting-ip4-config.h
index 76dcf37a6..52fa54e12 100644
--- a/libnm-util/nm-setting-ip4-config.h
+++ b/libnm-util/nm-setting-ip4-config.h
@@ -49,15 +49,12 @@ G_BEGIN_DECLS
* not valid with the given IP4 method
*/
typedef enum {
- NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN = 0,
- NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
- NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY,
- NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD
+ NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD /*< nick=NotAllowedForMethod >*/
} NMSettingIP4ConfigError;
-#define NM_TYPE_SETTING_IP4_CONFIG_ERROR (nm_setting_ip4_config_error_get_type ())
-GType nm_setting_ip4_config_error_get_type (void);
-
#define NM_SETTING_IP4_CONFIG_ERROR nm_setting_ip4_config_error_quark ()
GQuark nm_setting_ip4_config_error_quark (void);
diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c
index 4dc8f46ce..45e3e6350 100644
--- a/libnm-util/nm-setting-ip6-config.c
+++ b/libnm-util/nm-setting-ip6-config.c
@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2010 Red Hat, Inc.
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
*/
#include <string.h>
@@ -56,31 +56,6 @@ nm_setting_ip6_config_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_ip6_config_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The specified property was not allowed in combination with the current 'method' */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, "NotAllowedForMethod"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingIP6ConfigError", values);
- }
- return etype;
-}
-
#if GLIB_CHECK_VERSION(2,26,0)
G_DEFINE_BOXED_TYPE (NMIP6Address, nm_ip6_address, nm_ip6_address_dup, nm_ip6_address_unref)
G_DEFINE_BOXED_TYPE (NMIP6Route, nm_ip6_route, nm_ip6_route_dup, nm_ip6_route_unref)
@@ -100,6 +75,7 @@ typedef struct {
gboolean ignore_auto_dns;
gboolean never_default;
gboolean may_fail;
+ NMSettingIP6ConfigPrivacy ip6_privacy;
} NMSettingIP6ConfigPrivate;
@@ -114,6 +90,7 @@ enum {
PROP_IGNORE_AUTO_DNS,
PROP_NEVER_DEFAULT,
PROP_MAY_FAIL,
+ PROP_IP6_PRIVACY,
LAST_PROP
};
@@ -642,6 +619,23 @@ nm_setting_ip6_config_get_may_fail (NMSettingIP6Config *setting)
return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->may_fail;
}
+/**
+ * nm_setting_ip6_config_get_ip6_privacy:
+ * @setting: the #NMSettingIP6Config
+ *
+ * Returns the value contained in the #NMSettingIP6Config:ip6-privacy
+ * property.
+ *
+ * Returns: IPv6 Privacy Extensions configuration value (#NMSettingIP6ConfigPrivacy).
+ **/
+NMSettingIP6ConfigPrivacy
+nm_setting_ip6_config_get_ip6_privacy (NMSettingIP6Config *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_IP6_CONFIG (setting), FALSE);
+
+ return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->ip6_privacy;
+}
+
static gboolean
verify (NMSetting *setting, GSList *all_settings, GError **error)
{
@@ -764,6 +758,9 @@ set_property (GObject *object, guint prop_id,
case PROP_MAY_FAIL:
priv->may_fail = g_value_get_boolean (value);
break;
+ case PROP_IP6_PRIVACY:
+ priv->ip6_privacy = g_value_get_int (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -804,6 +801,9 @@ get_property (GObject *object, guint prop_id,
case PROP_MAY_FAIL:
g_value_set_boolean (value, priv->may_fail);
break;
+ case PROP_IP6_PRIVACY:
+ g_value_set_int (value, priv->ip6_privacy);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1058,6 +1058,35 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class)
"fails but IPv4 configuration completes successfully.",
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingIP6Config:ip6-privacy:
+ *
+ * Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941.
+ * If enabled, it makes the kernel generate a temporary IPv6 address
+ * in addition to the public one generated from MAC address via
+ * modified EUI-64. This enhances privacy, but could cause problems
+ * in some applications, on the other hand. The permitted values
+ * are: 0: disabled, 1: enabled (prefer public address),
+ * 2: enabled (prefer temporary addresses).
+ **/
+ g_object_class_install_property
+ (object_class, PROP_IP6_PRIVACY,
+ g_param_spec_int (NM_SETTING_IP6_CONFIG_IP6_PRIVACY,
+ "Configure IPv6 Privacy",
+ "Configure IPv6 Privacy Extensions for SLAAC, described "
+ "in RFC4941. If enabled, it makes the kernel generate "
+ "a temporary IPv6 address in addition to the public one "
+ "generated from MAC address via modified EUI-64. This "
+ "enhances privacy, but could cause problems in some "
+ "applications, on the other hand. The permitted values "
+ "are: 0: disabled, 1: enabled (prefer public address), "
+ "2: enabled (prefer temporary addresses).",
+ NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN,
+ NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR,
+ NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+
}
/********************************************************************/
diff --git a/libnm-util/nm-setting-ip6-config.h b/libnm-util/nm-setting-ip6-config.h
index 6b8fe5c44..55b48b2de 100644
--- a/libnm-util/nm-setting-ip6-config.h
+++ b/libnm-util/nm-setting-ip6-config.h
@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2010 Red Hat, Inc.
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_SETTING_IP6_CONFIG_H
@@ -50,15 +50,12 @@ G_BEGIN_DECLS
* not valid with the given IPv6 method
*/
typedef enum {
- NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN = 0,
- NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY,
- NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY,
- NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD
+ NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD /*< nick=NotAllowedForMethod >*/
} NMSettingIP6ConfigError;
-#define NM_TYPE_SETTING_IP6_CONFIG_ERROR (nm_setting_ip6_config_error_get_type ())
-GType nm_setting_ip6_config_error_get_type (void);
-
#define NM_SETTING_IP6_CONFIG_ERROR nm_setting_ip6_config_error_quark ()
GQuark nm_setting_ip6_config_error_quark (void);
@@ -71,6 +68,7 @@ GQuark nm_setting_ip6_config_error_quark (void);
#define NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS "ignore-auto-dns"
#define NM_SETTING_IP6_CONFIG_NEVER_DEFAULT "never-default"
#define NM_SETTING_IP6_CONFIG_MAY_FAIL "may-fail"
+#define NM_SETTING_IP6_CONFIG_IP6_PRIVACY "ip6-privacy"
/**
* NM_SETTING_IP6_CONFIG_METHOD_IGNORE:
@@ -126,6 +124,25 @@ GQuark nm_setting_ip6_config_error_quark (void);
*/
#define NM_SETTING_IP6_CONFIG_METHOD_SHARED "shared"
+/**
+ * NMSettingIP6ConfigPrivacy:
+ * @NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN: unknown or no value specified
+ * @NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED: IPv6 Privacy Extensions are disabled
+ * @NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR: IPv6 Privacy Extensions
+ * are enabled, but public addresses are preferred over temporary addresses
+ * @NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR: IPv6 Privacy Extensions
+ * are enabled and temporary addresses are preferred over public addresses
+ *
+ * #NMSettingIP6ConfigPrivacy values indicate if and how IPv6 Privacy
+ * Extensions are used (RFC4941).
+ */
+typedef enum {
+ NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN = -1,
+ NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED = 0,
+ NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR = 1,
+ NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR = 2
+} NMSettingIP6ConfigPrivacy;
+
typedef struct NMIP6Address NMIP6Address;
@@ -224,6 +241,7 @@ gboolean nm_setting_ip6_config_get_ignore_auto_routes (NMSettingIP
gboolean nm_setting_ip6_config_get_ignore_auto_dns (NMSettingIP6Config *setting);
gboolean nm_setting_ip6_config_get_never_default (NMSettingIP6Config *setting);
gboolean nm_setting_ip6_config_get_may_fail (NMSettingIP6Config *setting);
+NMSettingIP6ConfigPrivacy nm_setting_ip6_config_get_ip6_privacy (NMSettingIP6Config *setting);
G_END_DECLS
diff --git a/libnm-util/nm-setting-olpc-mesh.c b/libnm-util/nm-setting-olpc-mesh.c
index 1653bb076..96770e4fc 100644
--- a/libnm-util/nm-setting-olpc-mesh.c
+++ b/libnm-util/nm-setting-olpc-mesh.c
@@ -46,29 +46,6 @@ nm_setting_olpc_mesh_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_olpc_mesh_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_OLPC_MESH_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY, "MissingProperty"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingOlpcMeshError", values);
- }
- return etype;
-}
-
static void nm_setting_olpc_mesh_init (NMSettingOlpcMesh *setting);
G_DEFINE_TYPE (NMSettingOlpcMesh, nm_setting_olpc_mesh, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-olpc-mesh.h b/libnm-util/nm-setting-olpc-mesh.h
index 84abd1264..d6940401b 100644
--- a/libnm-util/nm-setting-olpc-mesh.h
+++ b/libnm-util/nm-setting-olpc-mesh.h
@@ -43,14 +43,11 @@ G_BEGIN_DECLS
typedef enum
{
- NM_SETTING_OLPC_MESH_ERROR_UNKNOWN = 0,
- NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY,
- NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY
+ NM_SETTING_OLPC_MESH_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY /*< nick=MissingProperty >*/
} NMSettingOlpcMeshError;
-#define NM_TYPE_SETTING_OLPC_MESH_ERROR (nm_setting_olpc_mesh_error_get_type ())
-GType nm_setting_olpc_mesh_error_get_type (void);
-
#define NM_SETTING_OLPC_MESH_ERROR nm_setting_olpc_mesh_error_quark ()
GQuark nm_setting_olpc_mesh_error_quark (void);
diff --git a/libnm-util/nm-setting-ppp.c b/libnm-util/nm-setting-ppp.c
index 893381311..6b1fd5aca 100644
--- a/libnm-util/nm-setting-ppp.c
+++ b/libnm-util/nm-setting-ppp.c
@@ -53,31 +53,6 @@ nm_setting_ppp_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_ppp_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_PPP_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_PPP_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_PPP_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The 'require-mppe' option is not allowed in conjunction with the specified authentication. */
- ENUM_ENTRY (NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED, "RequireMPPENotAllowed"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingPPPError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingPPP, nm_setting_ppp, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-ppp.h b/libnm-util/nm-setting-ppp.h
index 7a6e4e47b..072dd23c3 100644
--- a/libnm-util/nm-setting-ppp.h
+++ b/libnm-util/nm-setting-ppp.h
@@ -49,15 +49,12 @@ G_BEGIN_DECLS
* with other setting configuration parameters
*/
typedef enum {
- NM_SETTING_PPP_ERROR_UNKNOWN = 0,
- NM_SETTING_PPP_ERROR_INVALID_PROPERTY,
- NM_SETTING_PPP_ERROR_MISSING_PROPERTY,
- NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED
+ NM_SETTING_PPP_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_PPP_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_PPP_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED /*< nick=RequireMPPENotAllowed >*/
} NMSettingPPPError;
-#define NM_TYPE_SETTING_PPP_ERROR (nm_setting_ppp_error_get_type ())
-GType nm_setting_ppp_error_get_type (void);
-
#define NM_SETTING_PPP_ERROR nm_setting_ppp_error_quark ()
GQuark nm_setting_ppp_error_quark (void);
diff --git a/libnm-util/nm-setting-pppoe.c b/libnm-util/nm-setting-pppoe.c
index 4a9b8a229..e25c09262 100644
--- a/libnm-util/nm-setting-pppoe.c
+++ b/libnm-util/nm-setting-pppoe.c
@@ -55,31 +55,6 @@ nm_setting_pppoe_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_pppoe_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_PPPOE_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The required PPP setting is missing */
- ENUM_ENTRY (NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING, "MissingPPPSetting"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingPPPOEError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingPPPOE, nm_setting_pppoe, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-pppoe.h b/libnm-util/nm-setting-pppoe.h
index aef6bd686..087e99020 100644
--- a/libnm-util/nm-setting-pppoe.h
+++ b/libnm-util/nm-setting-pppoe.h
@@ -49,15 +49,12 @@ G_BEGIN_DECLS
* did not contain a required PPP setting for PPP related options
*/
typedef enum {
- NM_SETTING_PPPOE_ERROR_UNKNOWN = 0,
- NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY,
- NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY,
- NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING
+ NM_SETTING_PPPOE_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING /*< nick=MissingPPPSetting >*/
} NMSettingPPPOEError;
-#define NM_TYPE_SETTING_PPPOE_ERROR (nm_setting_pppoe_error_get_type ())
-GType nm_setting_pppoe_error_get_type (void);
-
#define NM_SETTING_PPPOE_ERROR nm_setting_pppoe_error_quark ()
GQuark nm_setting_pppoe_error_quark (void);
diff --git a/libnm-util/nm-setting-serial.c b/libnm-util/nm-setting-serial.c
index 24e6253ec..44f14986b 100644
--- a/libnm-util/nm-setting-serial.c
+++ b/libnm-util/nm-setting-serial.c
@@ -56,31 +56,6 @@ nm_setting_serial_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_serial_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The required PPP setting is missing (DEPRECATED) */
- ENUM_ENTRY (NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING, "MissingPPPSetting"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingSerialError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingSerial, nm_setting_serial, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-serial.h b/libnm-util/nm-setting-serial.h
index 9562950c9..8c2a79b94 100644
--- a/libnm-util/nm-setting-serial.h
+++ b/libnm-util/nm-setting-serial.h
@@ -49,15 +49,12 @@ G_BEGIN_DECLS
* setting requires the connection to contain an #NMSettingPPP setting
*/
typedef enum {
- NM_SETTING_SERIAL_ERROR_UNKNOWN = 0,
- NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY,
- NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY,
- NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING
+ NM_SETTING_SERIAL_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING /*< nick=MissingPPPSetting >*/
} NMSettingSerialError;
-#define NM_TYPE_SETTING_SERIAL_ERROR (nm_setting_serial_error_get_type ())
-GType nm_setting_serial_error_get_type (void);
-
#define NM_SETTING_SERIAL_ERROR nm_setting_serial_error_quark ()
GQuark nm_setting_serial_error_quark (void);
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c
new file mode 100644
index 000000000..71760dca4
--- /dev/null
+++ b/libnm-util/nm-setting-vlan.c
@@ -0,0 +1,728 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Weiping Pan <wpan@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2011 Red Hat, Inc.
+ */
+
+#include <dbus/dbus-glib.h>
+#include "nm-setting-vlan.h"
+#include "nm-param-spec-specialized.h"
+#include "nm-utils.h"
+#include "nm-dbus-glib-types.h"
+#include "nm-setting-connection.h"
+
+/**
+ * SECTION:nm-setting-vlan
+ * @short_description: Describes connection properties for VLAN interfaces
+ * @include: nm-setting-vlan.h
+ *
+ * The #NMSettingVlan object is a #NMSetting subclass that describes properties
+ * necessary for connection to VLAN interfaces.
+ **/
+
+/**
+ * nm_setting_vlan_error_quark:
+ *
+ * Registers an error quark for #NMSettingVlan if necessary.
+ *
+ * Returns: the error quark used for #NMSettingVlan errors.
+ **/
+GQuark
+nm_setting_vlan_error_quark (void)
+{
+ static GQuark quark;
+
+ if (G_UNLIKELY (!quark))
+ quark = g_quark_from_static_string ("nm-setting-vlan-error-quark");
+ return quark;
+}
+
+G_DEFINE_TYPE (NMSettingVlan, nm_setting_vlan, NM_TYPE_SETTING)
+
+#define NM_SETTING_VLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_VLAN, NMSettingVlanPrivate))
+
+typedef struct {
+ char *iface_name;
+ char *parent;
+ guint32 id;
+ guint32 flags;
+ GSList *ingress_priority_map;
+ GSList *egress_priority_map;
+} NMSettingVlanPrivate;
+
+enum {
+ PROP_0,
+ PROP_IFACE_NAME,
+ PROP_PARENT,
+ PROP_ID,
+ PROP_FLAGS,
+ PROP_INGRESS_PRIORITY_MAP,
+ PROP_EGRESS_PRIORITY_MAP,
+ LAST_PROP
+};
+
+#define MAX_SKB_PRIO G_MAXUINT32
+#define MAX_8021P_PRIO 7 /* Max 802.1p priority */
+
+typedef struct {
+ guint32 from;
+ guint32 to;
+} PriorityMap;
+
+/**
+ * nm_setting_vlan_new:
+ * Creates a new #NMSettingVlan object with default values.
+ *
+ * Returns: (transfer full): the new empty #NMSettingVlan object
+ **/
+NMSetting *
+nm_setting_vlan_new (void)
+{
+ return (NMSetting *) g_object_new (NM_TYPE_SETTING_VLAN, NULL);
+}
+
+/**
+ * nm_setting_vlan_get_interface_name:
+ * @setting: the #NMSettingVlan
+ *
+ * Returns: the #NMSettingVlan:interface_name property of the setting
+ **/
+const char *
+nm_setting_vlan_get_interface_name (NMSettingVlan *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), NULL);
+ return NM_SETTING_VLAN_GET_PRIVATE (setting)->iface_name;
+}
+
+/**
+ * nm_setting_vlan_get_parent:
+ * @setting: the #NMSettingVlan
+ *
+ * Returns: the #NMSettingVlan:parent property of the setting
+ **/
+const char *
+nm_setting_vlan_get_parent (NMSettingVlan *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), NULL);
+ return NM_SETTING_VLAN_GET_PRIVATE (setting)->parent;
+}
+
+/**
+ * nm_setting_vlan_get_id:
+ * @setting: the #NMSettingVlan
+ *
+ * Returns: the #NMSettingVlan:id property of the setting
+ **/
+guint32
+nm_setting_vlan_get_id (NMSettingVlan *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), 0);
+ return NM_SETTING_VLAN_GET_PRIVATE (setting)->id;
+}
+
+/**
+ * nm_setting_vlan_get_flags:
+ * @setting: the #NMSettingVlan
+ *
+ * Returns: the #NMSettingVlan:flags property of the setting
+ **/
+guint32
+nm_setting_vlan_get_flags (NMSettingVlan *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), 0);
+ return NM_SETTING_VLAN_GET_PRIVATE (setting)->flags;
+}
+
+static guint32
+get_max_prio (NMVlanPriorityMap map, gboolean from)
+{
+ if (map == NM_VLAN_INGRESS_MAP)
+ return from ? MAX_8021P_PRIO : MAX_SKB_PRIO;
+ else if (map == NM_VLAN_EGRESS_MAP)
+ return from ? MAX_SKB_PRIO : MAX_8021P_PRIO;
+ g_assert_not_reached ();
+}
+
+static PriorityMap *
+priority_map_new_from_str (NMVlanPriorityMap map, const char *str)
+{
+ PriorityMap *p = NULL;
+ gchar **t = NULL;
+ guint32 len;
+ guint64 from, to;
+
+ g_return_val_if_fail (str && str[0], NULL);
+
+ t = g_strsplit (str, ":", 0);
+ len = g_strv_length (t);
+ if (len == 2) {
+ from = g_ascii_strtoull (t[0], NULL, 10);
+ to = g_ascii_strtoull (t[1], NULL, 10);
+
+ if ((from <= get_max_prio (map, TRUE)) && (to <= get_max_prio (map, FALSE))) {
+ p = g_malloc0 (sizeof (PriorityMap));
+ p->from = from;
+ p->to = to;
+ }
+ } else {
+ /* Warn */
+ g_warn_if_fail (len == 2);
+ }
+
+ g_strfreev (t);
+ return p;
+}
+
+static void
+priority_map_free (PriorityMap *map)
+{
+ g_return_if_fail (map != NULL);
+ g_free (map);
+}
+
+static GSList *
+get_map (NMSettingVlan *self, NMVlanPriorityMap map)
+{
+ if (map == NM_VLAN_INGRESS_MAP)
+ return NM_SETTING_VLAN_GET_PRIVATE (self)->ingress_priority_map;
+ else if (map == NM_VLAN_EGRESS_MAP)
+ return NM_SETTING_VLAN_GET_PRIVATE (self)->egress_priority_map;
+ g_assert_not_reached ();
+ return NULL;
+}
+
+static void
+set_map (NMSettingVlan *self, NMVlanPriorityMap map, GSList *list)
+{
+ if (map == NM_VLAN_INGRESS_MAP)
+ NM_SETTING_VLAN_GET_PRIVATE (self)->ingress_priority_map = list;
+ else if (map == NM_VLAN_EGRESS_MAP)
+ NM_SETTING_VLAN_GET_PRIVATE (self)->egress_priority_map = list;
+ else
+ g_assert_not_reached ();
+}
+
+/**
+ * nm_setting_vlan_add_priority_str
+ * @setting: the #NMSettingVlan
+ * @map: the type of priority map
+ * @str: the string which contains a priority map, like "3:7"
+ *
+ * Adds a priority map entry into either the #NMSettingVlan:ingress_priority_map
+ * or the #NMSettingVlan:egress_priority_map properties. The priority map maps
+ * the Linux SKB priorities to 802.1p priorities.
+ *
+ * Returns: TRUE if the entry was successfully added to the list, or it
+ * overwrote the old value, FALSE if error
+ */
+gboolean
+nm_setting_vlan_add_priority_str (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ const char *str)
+{
+ NMSettingVlanPrivate *priv = NULL;
+ GSList *list = NULL, *iter = NULL;
+ PriorityMap *item = NULL;
+
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), FALSE);
+ g_return_val_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP, FALSE);
+ g_return_val_if_fail (str && str[0], FALSE);
+
+ priv = NM_SETTING_VLAN_GET_PRIVATE (setting);
+ list = get_map (setting, map);
+
+ item = priority_map_new_from_str (map, str);
+ g_return_val_if_fail (item != NULL, FALSE);
+
+ /* Duplicates get replaced */
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ PriorityMap *p = iter->data;
+
+ if (p->from == item->from) {
+ p->to = item->to;
+ g_free (item);
+ return TRUE;
+ }
+ }
+
+ set_map (setting, map, g_slist_append (list, item));
+ return TRUE;
+}
+
+/**
+ * nm_setting_vlan_get_num_priorities:
+ * @map: the type of priority map
+ * @setting: the #NMSettingVlan
+ *
+ * Returns the number of entires in the
+ * #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
+ * properties of this setting.
+ *
+ * Returns: return the number of ingress/egress priority entries, -1 if error
+ **/
+gint32
+nm_setting_vlan_get_num_priorities (NMSettingVlan *setting, NMVlanPriorityMap map)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), -1);
+ g_return_val_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP, -1);
+
+ return g_slist_length (get_map (setting, map));
+}
+
+/**
+ * nm_setting_vlan_get_priority:
+ * @map: the type of priority map
+ * @setting: the #NMSettingVlan
+ * @idx: the zero-based index of the ingress/egress priority map entry
+ * @out_from: (out): on return the value of the priority map's 'from' item
+ * @out_to: (out): on return the value of priority map's 'to' item
+ *
+ * Retrieve one of the entries of the #NMSettingVlan:ingress_priority_map
+ * or #NMSettingVlan:egress_priority_map properties of this setting.
+ *
+ * Returns: %TRUE if a priority map was returned, %FALSE if error
+ **/
+gboolean
+nm_setting_vlan_get_priority (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ guint32 idx,
+ guint32 *out_from,
+ guint32 *out_to)
+{
+ GSList *list = NULL;
+ PriorityMap *item = NULL;
+
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), FALSE);
+ g_return_val_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP, FALSE);
+ g_return_val_if_fail (out_from != NULL, FALSE);
+ g_return_val_if_fail (out_to != NULL, FALSE);
+
+ list = get_map (setting, map);
+ g_return_val_if_fail (idx < g_slist_length (list), FALSE);
+
+ item = g_slist_nth_data (list, idx);
+ g_assert (item);
+ *out_from = item->from;
+ *out_to = item->to;
+ return TRUE;
+}
+
+/**
+ * nm_setting_vlan_add_priority:
+ * @map: the type of priority map
+ * @setting: the #NMSettingVlan
+ * @from: the priority to map to @to
+ * @to: the priority to map @from to
+ *
+ * Adds a priority mapping to the #NMSettingVlan:ingress_priority_map or
+ * #NMSettingVlan:egress_priority_map properties of the setting. If @from is
+ * already in the given priority map, this function will overwrite the
+ * existing entry with the new @to.
+ *
+ * If @map is #NM_VLAN_INGRESS_MAP then @from is the incoming 802.1q VLAN
+ * Priority Code Point (PCP) value, and @to is the Linux SKB priority value.
+ *
+ * If @map is #NM_VLAN_EGRESS_MAP then @from is the Linux SKB priority value and
+ * @to is the outgoing 802.1q VLAN Priority Code Point (PCP) value.
+ *
+ * Returns: TRUE if the new priority mapping was successfully added to the
+ * list, FALSE if error
+ */
+gboolean
+nm_setting_vlan_add_priority (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ guint32 from,
+ guint32 to)
+{
+ GSList *list = NULL, *iter = NULL;
+ PriorityMap *item;
+
+ g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), FALSE);
+ g_return_val_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP, FALSE);
+
+ list = get_map (setting, map);
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ item = iter->data;
+ if (item->from == from) {
+ item->to = to;
+ return TRUE;
+ }
+ }
+
+ item = g_malloc0 (sizeof (PriorityMap));
+ item->from = from;
+ item->to = to;
+ set_map (setting, map, g_slist_append (list, item));
+
+ return TRUE;
+}
+
+/**
+ * nm_setting_vlan_remove_priority:
+ * @map: the type of priority map
+ * @setting: the #NMSettingVlan
+ * @idx: the zero-based index of the priority map to remove
+ *
+ * Removes the priority map at index @idx from the
+ * #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
+ * properties.
+ */
+void
+nm_setting_vlan_remove_priority (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ guint32 idx)
+{
+ GSList *list = NULL, *item = NULL;
+
+ g_return_if_fail (NM_IS_SETTING_VLAN (setting));
+ g_return_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP);
+
+ list = get_map (setting, map);
+ g_return_if_fail (idx < g_slist_length (list));
+
+ item = g_slist_nth_data (list, idx);
+ priority_map_free ((PriorityMap *) item);
+ set_map (setting, map, g_slist_delete_link (list, item));
+}
+
+/**
+ * nm_setting_vlan_clear_priorities:
+ * @map: the type of priority map
+ * @setting: the #NMSettingVlan
+ *
+ * Clear all the entires from #NMSettingVlan:ingress_priority_map or
+ * #NMSettingVlan:egress_priority_map properties.
+ */
+void
+nm_setting_vlan_clear_priorities (NMSettingVlan *setting, NMVlanPriorityMap map)
+{
+ GSList *list = NULL;
+
+ g_return_if_fail (NM_IS_SETTING_VLAN (setting));
+ g_return_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP);
+
+ list = get_map (setting, map);
+ nm_utils_slist_free (list, g_free);
+ set_map (setting, map, NULL);
+}
+
+/*********************************************************************/
+
+static void
+nm_setting_vlan_init (NMSettingVlan *setting)
+{
+ g_object_set (setting, NM_SETTING_NAME, NM_SETTING_VLAN_SETTING_NAME, NULL);
+}
+
+static gboolean
+verify (NMSetting *setting, GSList *all_settings, GError **error)
+{
+ NMSettingVlanPrivate *priv = NM_SETTING_VLAN_GET_PRIVATE (setting);
+
+ if (priv->iface_name && !priv->iface_name[0]) {
+ g_set_error (error,
+ NM_SETTING_VLAN_ERROR,
+ NM_SETTING_VLAN_ERROR_INVALID_PROPERTY,
+ NM_SETTING_VLAN_INTERFACE_NAME);
+ return FALSE;
+ }
+
+ if (priv->parent && !priv->parent[0]) {
+ g_set_error (error,
+ NM_SETTING_VLAN_ERROR,
+ NM_SETTING_VLAN_ERROR_INVALID_PROPERTY,
+ NM_SETTING_VLAN_PARENT);
+ return FALSE;
+ }
+
+ if (priv->id > 4095) {
+ g_set_error (error,
+ NM_SETTING_VLAN_ERROR,
+ NM_SETTING_VLAN_ERROR_INVALID_PROPERTY,
+ NM_SETTING_VLAN_ID);
+ return FALSE;
+ }
+
+ if (priv->flags & !(NM_VLAN_FLAG_REORDER_HEADERS |
+ NM_VLAN_FLAG_GVRP |
+ NM_VLAN_FLAG_LOOSE_BINDING)) {
+ g_set_error (error,
+ NM_SETTING_VLAN_ERROR,
+ NM_SETTING_VLAN_ERROR_INVALID_PROPERTY,
+ NM_SETTING_VLAN_FLAGS);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static const char *
+get_virtual_iface_name (NMSetting *setting)
+{
+ return nm_setting_vlan_get_interface_name (NM_SETTING_VLAN (setting));
+}
+
+static GSList *
+priority_stringlist_to_maplist (NMVlanPriorityMap map, GSList *strlist)
+{
+ GSList *list = NULL, *iter;
+
+ for (iter = strlist; iter; iter = g_slist_next (iter)) {
+ PriorityMap *item;
+
+ item = priority_map_new_from_str (map, (const char *) iter->data);
+ if (item)
+ list = g_slist_prepend (list, item);
+ }
+ return g_slist_reverse (list);
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMSettingVlan *setting = NM_SETTING_VLAN (object);
+ NMSettingVlanPrivate *priv = NM_SETTING_VLAN_GET_PRIVATE (setting);
+
+ switch (prop_id) {
+ case PROP_IFACE_NAME:
+ g_free (priv->iface_name);
+ priv->iface_name = g_value_dup_string (value);
+ break;
+ case PROP_PARENT:
+ g_free (priv->parent);
+ priv->parent = g_value_dup_string (value);
+ break;
+ case PROP_ID:
+ priv->id = g_value_get_uint (value);
+ break;
+ case PROP_FLAGS:
+ priv->flags = g_value_get_uint (value);
+ break;
+ case PROP_INGRESS_PRIORITY_MAP:
+ nm_utils_slist_free (priv->ingress_priority_map, g_free);
+ priv->ingress_priority_map =
+ priority_stringlist_to_maplist (NM_VLAN_INGRESS_MAP, g_value_get_boxed (value));
+ break;
+ case PROP_EGRESS_PRIORITY_MAP:
+ nm_utils_slist_free (priv->egress_priority_map, g_free);
+ priv->egress_priority_map =
+ priority_stringlist_to_maplist (NM_VLAN_EGRESS_MAP, g_value_get_boxed (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static GSList *
+priority_maplist_to_stringlist (GSList *list)
+{
+ GSList *strlist = NULL, *iter;
+
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ PriorityMap *item = iter->data;
+
+ strlist = g_slist_prepend (strlist, g_strdup_printf ("%d:%d", item->from, item->to));
+ }
+ return g_slist_reverse (strlist);
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMSettingVlan *setting = NM_SETTING_VLAN (object);
+ NMSettingVlanPrivate *priv = NM_SETTING_VLAN_GET_PRIVATE (setting);
+
+ switch (prop_id) {
+ case PROP_IFACE_NAME:
+ g_value_set_string (value, priv->iface_name);
+ break;
+ case PROP_PARENT:
+ g_value_set_string (value, priv->parent);
+ break;
+ case PROP_ID:
+ g_value_set_uint (value, priv->id);
+ break;
+ case PROP_FLAGS:
+ g_value_set_uint (value, priv->flags);
+ break;
+ case PROP_INGRESS_PRIORITY_MAP:
+ g_value_take_boxed (value, priority_maplist_to_stringlist (priv->ingress_priority_map));
+ break;
+ case PROP_EGRESS_PRIORITY_MAP:
+ g_value_take_boxed (value, priority_maplist_to_stringlist (priv->egress_priority_map));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+finalize (GObject *object)
+{
+ NMSettingVlan *setting = NM_SETTING_VLAN (object);
+ NMSettingVlanPrivate *priv = NM_SETTING_VLAN_GET_PRIVATE (setting);
+
+ g_free (priv->iface_name);
+ g_free (priv->parent);
+ nm_utils_slist_free (priv->ingress_priority_map, g_free);
+ nm_utils_slist_free (priv->egress_priority_map, g_free);
+}
+
+static void
+nm_setting_vlan_class_init (NMSettingVlanClass *setting_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
+ NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
+
+ g_type_class_add_private (setting_class, sizeof (NMSettingVlanPrivate));
+
+ /* virtual methods */
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->finalize = finalize;
+ parent_class->verify = verify;
+ parent_class->get_virtual_iface_name = get_virtual_iface_name;
+
+ /* Properties */
+
+ /**
+ * NMSettingVlan:interface-name:
+ *
+ * If given, specifies the kernel name of the VLAN interface. If not given,
+ * a default name will be constructed from the interface described by the
+ * parent interface and the #NMSettingVlan:id , ex 'eth2.1'. The parent
+ * interface may be given by the #NMSettingVlan:parent property or by a
+ * hardware address property, eg #NMSettingWired:mac-address or
+ * #NMSettingInfiniband:mac-address.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_IFACE_NAME,
+ g_param_spec_string (NM_SETTING_VLAN_INTERFACE_NAME,
+ "InterfaceName",
+ "If given, specifies the kernel name of the VLAN "
+ "interface. If not given, a default name will be "
+ "constructed from the interface described by the "
+ "parent interface and the 'id' property, ex "
+ "'eth2.1'. The parent interface may be given by "
+ "the 'parent' property or by a hardware address "
+ "property, eg the 'wired' or 'infiniband' "
+ "settings' 'mac-address' property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingVlan:parent:
+ *
+ * If given, specifies the parent interface name or parent connection UUID
+ * from which this VLAN interface should be created. If this property is
+ * not specified, the connection must contain a hardware address in a
+ * hardware-specific setting, like #NMSettingWired:mac-address or
+ * #NMSettingInfiniband:mac-address.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_PARENT,
+ g_param_spec_string (NM_SETTING_VLAN_PARENT,
+ "Parent",
+ "If given, specifies the parent interface name or "
+ "parent connection UUID from which this VLAN "
+ "interface should be created. If this property is "
+ "not specified, the connection must contain a "
+ "hardware address in a hardware-specific setting, "
+ "like the 'wired' or 'infiniband' settings' "
+ "'mac-address' property.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingVlan:id:
+ *
+ * The VLAN identifier the interface created by this connection should be
+ * assigned.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_ID,
+ g_param_spec_uint (NM_SETTING_VLAN_ID,
+ "VLAN ID",
+ "The VLAN indentifier the interface created by "
+ "this connection should be assigned.",
+ 0, 4095, 0,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingVlan:flags:
+ *
+ * One or more of %NMVlanFlags which control the behavior and features of
+ * the VLAN interface.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_FLAGS,
+ g_param_spec_uint (NM_SETTING_VLAN_FLAGS,
+ "VLAN flags",
+ "One or more flags which control the behavior and "
+ "features of the VLAN interface. Flags include "
+ "reordering of output packet headers (0x01), use "
+ "of the GVRP protocol (0x02), and loose binding "
+ "of the interface to its master device's operating "
+ "state (0x04).",
+ 0, G_MAXUINT32, 0,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingVlan:ingress-priority-map:
+ *
+ * For incoming packets, a list of mappings from 802.1p priorities to Linux
+ * SKB priorities. The mapping is given in the format 'from:to' where both
+ * 'from' and 'to' are unsigned integers, ie '7:3'.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_INGRESS_PRIORITY_MAP,
+ _nm_param_spec_specialized (NM_SETTING_VLAN_INGRESS_PRIORITY_MAP,
+ "VLAN ingress priority mapping",
+ "For incoming packets, a list of mappings "
+ "from 802.1p priorities to Linux SKB "
+ "priorities. The mapping is given in the "
+ "format 'from:to' where both 'from' and "
+ "'to' are unsigned integers, ie '7:3'.",
+ DBUS_TYPE_G_LIST_OF_STRING,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+
+ /**
+ * NMSettingVlan:egress-priority-map:
+ *
+ * For outgoing packets, a list of mappings from Linux SKB priorities to
+ * 802.1p priorities. The mapping is given in the format 'from:to'
+ * where both 'from' and 'to' are unsigned integers, ie '7:3'.
+ **/
+ g_object_class_install_property
+ (object_class, PROP_EGRESS_PRIORITY_MAP,
+ _nm_param_spec_specialized (NM_SETTING_VLAN_EGRESS_PRIORITY_MAP,
+ "VLAN egress priority mapping",
+ "For outgoing packets, a list of mappings "
+ "from Linux SKB priorities to 802.1p "
+ "priorities. The mapping is given in the "
+ "format 'from:to' where both 'from' and "
+ "'to' are unsigned integers, ie '7:3'.",
+ DBUS_TYPE_G_LIST_OF_STRING,
+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
+}
diff --git a/libnm-util/nm-setting-vlan.h b/libnm-util/nm-setting-vlan.h
new file mode 100644
index 000000000..18c7ed29a
--- /dev/null
+++ b/libnm-util/nm-setting-vlan.h
@@ -0,0 +1,144 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Weiping Pan <wpan@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2011 Red Hat, Inc.
+ */
+
+#ifndef NM_SETTING_VLAN_H
+#define NM_SETTING_VLAN_H
+
+#include "nm-setting.h"
+#include <linux/if_vlan.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_SETTING_VLAN (nm_setting_vlan_get_type ())
+#define NM_SETTING_VLAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_VLAN, NMSettingVlan))
+#define NM_SETTING_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_VLANCONFIG, NMSettingVlanClass))
+#define NM_IS_SETTING_VLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_VLAN))
+#define NM_IS_SETTING_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_VLAN))
+#define NM_SETTING_VLAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_VLAN, NMSettingVlanClass))
+
+#define NM_SETTING_VLAN_SETTING_NAME "vlan"
+
+/**
+ * NMSettingVlanError:
+ * @NM_SETTING_VLAN_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_SETTING_VLAN_ERROR_INVALID_PROPERTY: the property was invalid
+ * @NM_SETTING_VLAN_ERROR_MISSING_PROPERTY: the property was missing and is
+ * required
+ */
+typedef enum {
+ NM_SETTING_VLAN_ERROR_UNKNOWN = 0, /*< nick=Unknown >*/
+ NM_SETTING_VLAN_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_VLAN_ERROR_MISSING_PROPERTY /*< nick=MissingProperty >*/
+} NMSettingVlanError;
+
+#define NM_SETTING_VLAN_ERROR nm_setting_vlan_error_quark ()
+GQuark nm_setting_vlan_error_quark (void);
+
+#define NM_SETTING_VLAN_INTERFACE_NAME "interface-name"
+#define NM_SETTING_VLAN_PARENT "parent"
+#define NM_SETTING_VLAN_ID "id"
+#define NM_SETTING_VLAN_FLAGS "flags"
+#define NM_SETTING_VLAN_INGRESS_PRIORITY_MAP "ingress-priority-map"
+#define NM_SETTING_VLAN_EGRESS_PRIORITY_MAP "egress-priority-map"
+
+typedef struct {
+ NMSetting parent;
+} NMSettingVlan;
+
+typedef struct {
+ NMSettingClass parent;
+
+ /* Padding for future expansion */
+ void (*_reserved1) (void);
+ void (*_reserved2) (void);
+ void (*_reserved3) (void);
+ void (*_reserved4) (void);
+} NMSettingVlanClass;
+
+/**
+ * NMVlanPriorityMap:
+ * @NM_VLAN_INGRESS_MAP: map for incoming data
+ * @NM_VLAN_EGRESS_MAP: map for outgoing data
+ *
+ * A selector for traffic priority maps; these map Linux SKB priorities
+ * to 802.1p priorities used in VLANs.
+ **/
+typedef enum {
+ NM_VLAN_INGRESS_MAP,
+ NM_VLAN_EGRESS_MAP
+} NMVlanPriorityMap;
+
+/**
+ * NMVlanFlags:
+ * @NM_VLAN_FLAG_REORDER_HEADERS: indicates that this interface should reorder
+ * outgoing packet headers to look more like a non-VLAN ethernet interface
+ * @NM_VLAN_FLAG_GVRP: indicates that this interface should use GVRP to register
+ * itself with it's switch
+ * @NM_VLAN_FLAG_LOOSE_BINDING: indicates that this interface's operating
+ * state is tied to the underlying network interface but other details
+ * (like routing) are not.
+ *
+ * #NMVlanFlags values control the behavior of the VLAN interface.
+ **/
+typedef enum {
+ NM_VLAN_FLAG_REORDER_HEADERS = 0x1,
+ NM_VLAN_FLAG_GVRP = 0x2,
+ NM_VLAN_FLAG_LOOSE_BINDING = 0x4,
+
+ /* NOTE: if adding flags update nm-setting-vlan.c::verify() */
+} NMVlanFlags;
+
+GType nm_setting_vlan_get_type (void);
+NMSetting *nm_setting_vlan_new (void);
+
+const char *nm_setting_vlan_get_interface_name (NMSettingVlan *setting);
+const char *nm_setting_vlan_get_parent (NMSettingVlan *setting);
+guint32 nm_setting_vlan_get_id (NMSettingVlan *setting);
+guint32 nm_setting_vlan_get_flags (NMSettingVlan *setting);
+
+gint32 nm_setting_vlan_get_num_priorities (NMSettingVlan *setting, NMVlanPriorityMap map);
+
+gboolean nm_setting_vlan_get_priority (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ guint32 idx,
+ guint32 *out_from,
+ guint32 *out_to);
+
+gboolean nm_setting_vlan_add_priority (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ guint32 from,
+ guint32 to);
+
+void nm_setting_vlan_remove_priority (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ guint32 idx);
+
+void nm_setting_vlan_clear_priorities (NMSettingVlan *setting, NMVlanPriorityMap map);
+
+gboolean nm_setting_vlan_add_priority_str (NMSettingVlan *setting,
+ NMVlanPriorityMap map,
+ const char *str);
+
+G_END_DECLS
+
+#endif /* NM_SETTING_VLAN_H */
diff --git a/libnm-util/nm-setting-vpn.c b/libnm-util/nm-setting-vpn.c
index 755c1a452..d1fc8b767 100644
--- a/libnm-util/nm-setting-vpn.c
+++ b/libnm-util/nm-setting-vpn.c
@@ -18,7 +18,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2011 Red Hat, Inc.
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
* (C) Copyright 2007 - 2008 Novell, Inc.
*/
@@ -63,29 +63,6 @@ nm_setting_vpn_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_vpn_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_VPN_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_VPN_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_VPN_ERROR_MISSING_PROPERTY, "MissingProperty"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingVpnError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingVPN, nm_setting_vpn, NM_TYPE_SETTING)
@@ -174,6 +151,22 @@ nm_setting_vpn_get_user_name (NMSettingVPN *setting)
}
/**
+ * nm_setting_vpn_get_num_data_items:
+ * @setting: the #NMSettingVPN
+ *
+ * Gets number of key/value pairs of VPN configuration data.
+ *
+ * Returns: the number of VPN plugin specific configuration data items
+ **/
+guint32
+nm_setting_vpn_get_num_data_items (NMSettingVPN *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VPN (setting), 0);
+
+ return g_hash_table_size (NM_SETTING_VPN_GET_PRIVATE (setting)->data);
+}
+
+/**
* nm_setting_vpn_add_data_item:
* @setting: the #NMSettingVPN
* @key: a name that uniquely identifies the given value @item
@@ -284,6 +277,22 @@ nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
}
/**
+ * nm_setting_vpn_get_num_secrets:
+ * @setting: the #NMSettingVPN
+ *
+ * Gets number of VPN plugin specific secrets in the setting.
+ *
+ * Returns: the number of VPN plugin specific secrets
+ **/
+guint32
+nm_setting_vpn_get_num_secrets (NMSettingVPN *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING_VPN (setting), 0);
+
+ return g_hash_table_size (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets);
+}
+
+/**
* nm_setting_vpn_add_secret:
* @setting: the #NMSettingVPN
* @key: a name that uniquely identifies the given secret @secret
@@ -779,7 +788,7 @@ nm_setting_vpn_class_init (NMSettingVPNClass *setting_class)
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
/**
- * NMSettinVPN:user-name:
+ * NMSettingVPN:user-name:
*
* If the VPN connection requires a user name for authentication, that name
* should be provided here. If the connection is available to more than
diff --git a/libnm-util/nm-setting-vpn.h b/libnm-util/nm-setting-vpn.h
index 94fd650f3..59068f883 100644
--- a/libnm-util/nm-setting-vpn.h
+++ b/libnm-util/nm-setting-vpn.h
@@ -47,14 +47,11 @@ G_BEGIN_DECLS
* required
*/
typedef enum {
- NM_SETTING_VPN_ERROR_UNKNOWN = 0,
- NM_SETTING_VPN_ERROR_INVALID_PROPERTY,
- NM_SETTING_VPN_ERROR_MISSING_PROPERTY,
+ NM_SETTING_VPN_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_VPN_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_VPN_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
} NMSettingVpnError;
-#define NM_TYPE_SETTING_VPN_ERROR (nm_setting_vpn_error_get_type ())
-GType nm_setting_vpn_error_get_type (void);
-
#define NM_SETTING_VPN_ERROR nm_setting_vpn_error_quark ()
GQuark nm_setting_vpn_error_quark (void);
@@ -92,6 +89,7 @@ NMSetting *nm_setting_vpn_new (void);
const char *nm_setting_vpn_get_service_type (NMSettingVPN *setting);
const char *nm_setting_vpn_get_user_name (NMSettingVPN *setting);
+guint32 nm_setting_vpn_get_num_data_items (NMSettingVPN *setting);
void nm_setting_vpn_add_data_item (NMSettingVPN *setting,
const char *key,
const char *item);
@@ -103,6 +101,7 @@ void nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
NMVPNIterFunc func,
gpointer user_data);
+guint32 nm_setting_vpn_get_num_secrets (NMSettingVPN *setting);
void nm_setting_vpn_add_secret (NMSettingVPN *setting,
const char *key,
const char *secret);
diff --git a/libnm-util/nm-setting-wimax.c b/libnm-util/nm-setting-wimax.c
index 38a442f62..a099cad20 100644
--- a/libnm-util/nm-setting-wimax.c
+++ b/libnm-util/nm-setting-wimax.c
@@ -53,29 +53,6 @@ nm_setting_wimax_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_wimax_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_WIMAX_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY, "MissingProperty"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingWimaxError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingWimax, nm_setting_wimax, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-wimax.h b/libnm-util/nm-setting-wimax.h
index 2462ac06a..be3a47e50 100644
--- a/libnm-util/nm-setting-wimax.h
+++ b/libnm-util/nm-setting-wimax.h
@@ -43,14 +43,11 @@ G_BEGIN_DECLS
* required
*/
typedef enum {
- NM_SETTING_WIMAX_ERROR_UNKNOWN = 0,
- NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY
+ NM_SETTING_WIMAX_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY /*< nick=MissingProperty >*/
} NMSettingWimaxError;
-#define NM_TYPE_SETTING_WIMAX_ERROR (nm_setting_wimax_error_get_type ())
-GType nm_setting_wimax_error_get_type (void);
-
#define NM_SETTING_WIMAX_ERROR nm_setting_wimax_error_quark ()
GQuark nm_setting_wimax_error_quark (void);
diff --git a/libnm-util/nm-setting-wired.c b/libnm-util/nm-setting-wired.c
index d4e52e031..fb21711d9 100644
--- a/libnm-util/nm-setting-wired.c
+++ b/libnm-util/nm-setting-wired.c
@@ -61,29 +61,6 @@ nm_setting_wired_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_wired_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_WIRED_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_WIRED_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_WIRED_ERROR_MISSING_PROPERTY, "MissingProperty"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingWiredError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingWired, nm_setting_wired, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-wired.h b/libnm-util/nm-setting-wired.h
index 36799fbe8..0189785fa 100644
--- a/libnm-util/nm-setting-wired.h
+++ b/libnm-util/nm-setting-wired.h
@@ -47,14 +47,11 @@ G_BEGIN_DECLS
* required
*/
typedef enum {
- NM_SETTING_WIRED_ERROR_UNKNOWN = 0,
- NM_SETTING_WIRED_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIRED_ERROR_MISSING_PROPERTY
+ NM_SETTING_WIRED_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_WIRED_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_WIRED_ERROR_MISSING_PROPERTY /*< nick=MissingProperty >*/
} NMSettingWiredError;
-#define NM_TYPE_SETTING_WIRED_ERROR (nm_setting_wired_error_get_type ())
-GType nm_setting_wired_error_get_type (void);
-
#define NM_SETTING_WIRED_ERROR nm_setting_wired_error_quark ()
GQuark nm_setting_wired_error_quark (void);
diff --git a/libnm-util/nm-setting-wireless-security.c b/libnm-util/nm-setting-wireless-security.c
index cb9a60810..98473120a 100644
--- a/libnm-util/nm-setting-wireless-security.c
+++ b/libnm-util/nm-setting-wireless-security.c
@@ -75,37 +75,6 @@ nm_setting_wireless_security_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_wireless_security_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The required 802.1x setting is missing */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING, "Missing8021xSetting"),
- /* The LEAP authentication algorithm requires use of 802.1x key management. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X, "LEAPRequires8021x"),
- /* The LEAP authentication algorithm requires a username. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME, "LEAPRequiresUsername"),
- /* Shared Key authentication can only be used with WEP encryption. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP, "SharedKeyRequiresWEP"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingWirelessSecurityError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingWirelessSecurity, nm_setting_wireless_security, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-wireless-security.h b/libnm-util/nm-setting-wireless-security.h
index 5f23893aa..54dfcce81 100644
--- a/libnm-util/nm-setting-wireless-security.h
+++ b/libnm-util/nm-setting-wireless-security.h
@@ -56,18 +56,15 @@ G_BEGIN_DECLS
* encryption protocol
*/
typedef enum {
- NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN = 0,
- NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY,
- NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING,
- NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X,
- NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME,
- NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP
+ NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING, /*< nick=Missing8021xSetting >*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X, /*< nick=LEAPRequires8021x >*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME, /*< nick=LEAPRequiresUsername >*/
+ NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP /*< nick=SharedKeyRequiresWEP >*/
} NMSettingWirelessSecurityError;
-#define NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR (nm_setting_wireless_security_error_get_type ())
-GType nm_setting_wireless_security_error_get_type (void);
-
#define NM_SETTING_WIRELESS_SECURITY_ERROR nm_setting_wireless_security_error_quark ()
GQuark nm_setting_wireless_security_error_quark (void);
diff --git a/libnm-util/nm-setting-wireless.c b/libnm-util/nm-setting-wireless.c
index 37ad07ab5..31882516d 100644
--- a/libnm-util/nm-setting-wireless.c
+++ b/libnm-util/nm-setting-wireless.c
@@ -28,8 +28,6 @@
#include <netinet/ether.h>
#include <dbus/dbus-glib.h>
-#include "wireless-helper.h"
-
#include "NetworkManager.h"
#include "nm-setting-wireless.h"
#include "nm-param-spec-specialized.h"
@@ -63,33 +61,6 @@ nm_setting_wireless_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_wireless_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The required security setting is missing */
- ENUM_ENTRY (NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING, "MissingSecuritySetting"),
- /* The 'channel' property requires a valid 'band' */
- ENUM_ENTRY (NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND, "ChannelRequiresBand"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingWirelessError", values);
- }
- return etype;
-}
-
G_DEFINE_TYPE (NMSettingWireless, nm_setting_wireless, NM_TYPE_SETTING)
diff --git a/libnm-util/nm-setting-wireless.h b/libnm-util/nm-setting-wireless.h
index 746466be9..3182f419b 100644
--- a/libnm-util/nm-setting-wireless.h
+++ b/libnm-util/nm-setting-wireless.h
@@ -53,16 +53,13 @@ G_BEGIN_DECLS
* set to a value that requires the #NMSettingWireless:band property to be set
*/
typedef enum {
- NM_SETTING_WIRELESS_ERROR_UNKNOWN = 0,
- NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY,
- NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY,
- NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING,
- NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND
+ NM_SETTING_WIRELESS_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
+ NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
+ NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING, /*< nick=MissingSecuritySetting >*/
+ NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND /*< nick=ChannelRequiresBand >*/
} NMSettingWirelessError;
-#define NM_TYPE_SETTING_WIRELESS_ERROR (nm_setting_wireless_error_get_type ())
-GType nm_setting_wireless_error_get_type (void);
-
#define NM_SETTING_WIRELESS_ERROR nm_setting_wireless_error_quark ()
GQuark nm_setting_wireless_error_quark (void);
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
index 2b3bdc58d..21dab0ba6 100644
--- a/libnm-util/nm-setting.c
+++ b/libnm-util/nm-setting.c
@@ -60,27 +60,6 @@ nm_setting_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_SETTING_ERROR_UNKNOWN, "UnknownError"),
- ENUM_ENTRY (NM_SETTING_ERROR_PROPERTY_NOT_FOUND, "PropertyNotFound"),
- ENUM_ENTRY (NM_SETTING_ERROR_PROPERTY_NOT_SECRET, "PropertyNotSecret"),
- ENUM_ENTRY (NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH, "PropertyTypeMismatch"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingError", values);
- }
- return etype;
-}
-
G_DEFINE_ABSTRACT_TYPE (NMSetting, nm_setting, G_TYPE_OBJECT)
#define NM_SETTING_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING, NMSettingPrivate))
@@ -992,6 +971,27 @@ nm_setting_to_string (NMSetting *setting)
return g_string_free (string, FALSE);
}
+/**
+ * nm_setting_get_virtual_iface_name:
+ * @setting: the #NMSetting
+ *
+ * Returns the name of the virtual kernel interface which the connection
+ * needs to use if specified in the settings.
+ *
+ * Returns: Name of the virtual interface or %NULL if the setting does not
+ * support this feature
+ **/
+const char *
+nm_setting_get_virtual_iface_name (NMSetting *setting)
+{
+ g_return_val_if_fail (NM_IS_SETTING (setting), NULL);
+
+ if (NM_SETTING_GET_CLASS (setting)->get_virtual_iface_name)
+ return NM_SETTING_GET_CLASS (setting)->get_virtual_iface_name (setting);
+
+ return NULL;
+}
+
/*****************************************************************************/
static void
diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h
index 3edf2a1f3..6cc6ed3e8 100644
--- a/libnm-util/nm-setting.h
+++ b/libnm-util/nm-setting.h
@@ -54,15 +54,12 @@ G_BEGIN_DECLS
**/
typedef enum
{
- NM_SETTING_ERROR_UNKNOWN = 0,
- NM_SETTING_ERROR_PROPERTY_NOT_FOUND,
- NM_SETTING_ERROR_PROPERTY_NOT_SECRET,
- NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH
+ NM_SETTING_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
+ NM_SETTING_ERROR_PROPERTY_NOT_FOUND, /*< nick=PropertyNotFound >*/
+ NM_SETTING_ERROR_PROPERTY_NOT_SECRET, /*< nick=PropertyNotSecret >*/
+ NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH /*< nick=PropertyTypeMismatch >*/
} NMSettingError;
-#define NM_TYPE_SETTING_ERROR (nm_setting_error_get_type ())
-GType nm_setting_error_get_type (void);
-
#define NM_SETTING_ERROR nm_setting_error_quark ()
GQuark nm_setting_error_quark (void);
@@ -203,9 +200,10 @@ typedef struct {
NMSettingClearSecretsWithFlagsFn func,
gpointer user_data);
+ const char *(*get_virtual_iface_name) (NMSetting *setting);
+
/* Padding for future expansion */
void (*_reserved1) (void);
- void (*_reserved2) (void);
} NMSettingClass;
/**
@@ -308,6 +306,8 @@ gboolean nm_setting_set_secret_flags (NMSetting *setting,
NMSettingSecretFlags flags,
GError **error);
+const char *nm_setting_get_virtual_iface_name (NMSetting *setting);
+
G_END_DECLS
#endif /* NM_SETTING_H */
diff --git a/libnm-util/nm-utils-enum-types.c b/libnm-util/nm-utils-enum-types.c
new file mode 100644
index 000000000..dcf51dee0
--- /dev/null
+++ b/libnm-util/nm-utils-enum-types.c
@@ -0,0 +1,759 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#include "nm-utils-enum-types.h"
+
+#include "nm-connection.h"
+#include "nm-setting.h"
+#include "nm-setting-8021x.h"
+#include "nm-setting-bluetooth.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-infiniband.h"
+#include "nm-setting-ip4-config.h"
+#include "nm-setting-vlan.h"
+#include "nm-setting-ip6-config.h"
+#include "nm-setting-ppp.h"
+#include "nm-setting-pppoe.h"
+#include "nm-setting-serial.h"
+#include "nm-setting-gsm.h"
+#include "nm-setting-cdma.h"
+#include "nm-setting-olpc-mesh.h"
+#include "nm-setting-wimax.h"
+#include "nm-setting-wired.h"
+#include "nm-setting-wireless.h"
+#include "nm-setting-wireless-security.h"
+#include "nm-setting-vpn.h"
+#include "nm-utils.h"
+
+GType
+nm_connection_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_CONNECTION_ERROR_UNKNOWN, "NM_CONNECTION_ERROR_UNKNOWN", "UnknownError" },
+ { NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, "NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND", "ConnectionSettingNotFound" },
+ { NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID, "NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID", "ConnectionTypeInvalid" },
+ { NM_CONNECTION_ERROR_SETTING_NOT_FOUND, "NM_CONNECTION_ERROR_SETTING_NOT_FOUND", "SettingNotFound" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMConnectionError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_ERROR_UNKNOWN, "NM_SETTING_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_ERROR_PROPERTY_NOT_FOUND, "NM_SETTING_ERROR_PROPERTY_NOT_FOUND", "PropertyNotFound" },
+ { NM_SETTING_ERROR_PROPERTY_NOT_SECRET, "NM_SETTING_ERROR_PROPERTY_NOT_SECRET", "PropertyNotSecret" },
+ { NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH, "NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH", "PropertyTypeMismatch" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_secret_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_SECRET_FLAG_NONE, "NM_SETTING_SECRET_FLAG_NONE", "none" },
+ { NM_SETTING_SECRET_FLAG_AGENT_OWNED, "NM_SETTING_SECRET_FLAG_AGENT_OWNED", "agent-owned" },
+ { NM_SETTING_SECRET_FLAG_NOT_SAVED, "NM_SETTING_SECRET_FLAG_NOT_SAVED", "not-saved" },
+ { NM_SETTING_SECRET_FLAG_NOT_REQUIRED, "NM_SETTING_SECRET_FLAG_NOT_REQUIRED", "not-required" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingSecretFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_compare_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_COMPARE_FLAG_EXACT, "NM_SETTING_COMPARE_FLAG_EXACT", "exact" },
+ { NM_SETTING_COMPARE_FLAG_FUZZY, "NM_SETTING_COMPARE_FLAG_FUZZY", "fuzzy" },
+ { NM_SETTING_COMPARE_FLAG_IGNORE_ID, "NM_SETTING_COMPARE_FLAG_IGNORE_ID", "ignore-id" },
+ { NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS, "NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS", "ignore-secrets" },
+ { NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS, "NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS", "ignore-agent-owned-secrets" },
+ { NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS, "NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS", "ignore-not-saved-secrets" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingCompareFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_hash_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_HASH_FLAG_ALL, "NM_SETTING_HASH_FLAG_ALL", "all" },
+ { NM_SETTING_HASH_FLAG_NO_SECRETS, "NM_SETTING_HASH_FLAG_NO_SECRETS", "no-secrets" },
+ { NM_SETTING_HASH_FLAG_ONLY_SECRETS, "NM_SETTING_HASH_FLAG_ONLY_SECRETS", "only-secrets" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingHashFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_diff_result_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_DIFF_RESULT_UNKNOWN, "NM_SETTING_DIFF_RESULT_UNKNOWN", "unknown" },
+ { NM_SETTING_DIFF_RESULT_IN_A, "NM_SETTING_DIFF_RESULT_IN_A", "in-a" },
+ { NM_SETTING_DIFF_RESULT_IN_B, "NM_SETTING_DIFF_RESULT_IN_B", "in-b" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingDiffResult"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_802_1x_ck_format_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_802_1X_CK_FORMAT_UNKNOWN, "NM_SETTING_802_1X_CK_FORMAT_UNKNOWN", "unknown" },
+ { NM_SETTING_802_1X_CK_FORMAT_X509, "NM_SETTING_802_1X_CK_FORMAT_X509", "x509" },
+ { NM_SETTING_802_1X_CK_FORMAT_RAW_KEY, "NM_SETTING_802_1X_CK_FORMAT_RAW_KEY", "raw-key" },
+ { NM_SETTING_802_1X_CK_FORMAT_PKCS12, "NM_SETTING_802_1X_CK_FORMAT_PKCS12", "pkcs12" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSetting8021xCKFormat"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_802_1x_ck_scheme_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_802_1X_CK_SCHEME_UNKNOWN, "NM_SETTING_802_1X_CK_SCHEME_UNKNOWN", "unknown" },
+ { NM_SETTING_802_1X_CK_SCHEME_BLOB, "NM_SETTING_802_1X_CK_SCHEME_BLOB", "blob" },
+ { NM_SETTING_802_1X_CK_SCHEME_PATH, "NM_SETTING_802_1X_CK_SCHEME_PATH", "path" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSetting8021xCKScheme"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_802_1x_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_802_1X_ERROR_UNKNOWN, "NM_SETTING_802_1X_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, "NM_SETTING_802_1X_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_802_1X_ERROR_MISSING_PROPERTY, "NM_SETTING_802_1X_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSetting8021xError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_bluetooth_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_BLUETOOTH_ERROR_UNKNOWN, "NM_SETTING_BLUETOOTH_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY, "NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY, "NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND, "NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND", "TypeSettingNotFound" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingBluetoothError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_bond_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_BOND_ERROR_UNKNOWN, "NM_SETTING_BOND_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_BOND_ERROR_INVALID_PROPERTY, "NM_SETTING_BOND_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_BOND_ERROR_MISSING_PROPERTY, "NM_SETTING_BOND_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_BOND_ERROR_INVALID_OPTION, "NM_SETTING_BOND_ERROR_INVALID_OPTION", "InvalidOption" },
+ { NM_SETTING_BOND_ERROR_MISSING_OPTION, "NM_SETTING_BOND_ERROR_MISSING_OPTION", "MissingOption" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingBondError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_connection_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_CONNECTION_ERROR_UNKNOWN, "NM_SETTING_CONNECTION_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY, "NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY, "NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND, "NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND", "TypeSettingNotFound" },
+ { NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED, "NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED", "IpConfigNotAllowed" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingConnectionError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_infiniband_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_INFINIBAND_ERROR_UNKNOWN, "NM_SETTING_INFINIBAND_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY, "NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY, "NM_SETTING_INFINIBAND_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingInfinibandError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_ip4_config_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN, "NM_SETTING_IP4_CONFIG_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY, "NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY, "NM_SETTING_IP4_CONFIG_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, "NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD", "NotAllowedForMethod" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingIP4ConfigError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_vlan_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_VLAN_ERROR_UNKNOWN, "NM_SETTING_VLAN_ERROR_UNKNOWN", "Unknown" },
+ { NM_SETTING_VLAN_ERROR_INVALID_PROPERTY, "NM_SETTING_VLAN_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_VLAN_ERROR_MISSING_PROPERTY, "NM_SETTING_VLAN_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingVlanError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_vlan_priority_map_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_VLAN_INGRESS_MAP, "NM_VLAN_INGRESS_MAP", "ingress-map" },
+ { NM_VLAN_EGRESS_MAP, "NM_VLAN_EGRESS_MAP", "egress-map" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMVlanPriorityMap"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_vlan_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_VLAN_FLAG_REORDER_HEADERS, "NM_VLAN_FLAG_REORDER_HEADERS", "reorder-headers" },
+ { NM_VLAN_FLAG_GVRP, "NM_VLAN_FLAG_GVRP", "gvrp" },
+ { NM_VLAN_FLAG_LOOSE_BINDING, "NM_VLAN_FLAG_LOOSE_BINDING", "loose-binding" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMVlanFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_ip6_config_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN, "NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY, "NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY, "NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, "NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD", "NotAllowedForMethod" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingIP6ConfigError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_ip6_config_privacy_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN, "NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN", "unknown" },
+ { NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED, "NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED", "disabled" },
+ { NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR, "NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR", "prefer-public-addr" },
+ { NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR, "NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR", "prefer-temp-addr" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingIP6ConfigPrivacy"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_ppp_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_PPP_ERROR_UNKNOWN, "NM_SETTING_PPP_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_PPP_ERROR_INVALID_PROPERTY, "NM_SETTING_PPP_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_PPP_ERROR_MISSING_PROPERTY, "NM_SETTING_PPP_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED, "NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED", "RequireMPPENotAllowed" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingPPPError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_pppoe_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_PPPOE_ERROR_UNKNOWN, "NM_SETTING_PPPOE_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY, "NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY, "NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING, "NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING", "MissingPPPSetting" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingPPPOEError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_serial_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_SERIAL_ERROR_UNKNOWN, "NM_SETTING_SERIAL_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY, "NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY, "NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING, "NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING", "MissingPPPSetting" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingSerialError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_gsm_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_GSM_ERROR_UNKNOWN, "NM_SETTING_GSM_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_GSM_ERROR_INVALID_PROPERTY, "NM_SETTING_GSM_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_GSM_ERROR_MISSING_PROPERTY, "NM_SETTING_GSM_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING, "NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING", "MissingSerialSetting" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingGsmError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_gsm_network_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_GSM_NETWORK_TYPE_ANY, "NM_SETTING_GSM_NETWORK_TYPE_ANY", "any" },
+ { NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA, "NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA", "umts-hspa" },
+ { NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE, "NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE", "gprs-edge" },
+ { NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA, "NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA", "prefer-umts-hspa" },
+ { NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE, "NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE", "prefer-gprs-edge" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingGsmNetworkType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_gsm_network_band_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_GSM_BAND_UNKNOWN, "NM_SETTING_GSM_BAND_UNKNOWN", "unknown" },
+ { NM_SETTING_GSM_BAND_ANY, "NM_SETTING_GSM_BAND_ANY", "any" },
+ { NM_SETTING_GSM_BAND_EGSM, "NM_SETTING_GSM_BAND_EGSM", "egsm" },
+ { NM_SETTING_GSM_BAND_DCS, "NM_SETTING_GSM_BAND_DCS", "dcs" },
+ { NM_SETTING_GSM_BAND_PCS, "NM_SETTING_GSM_BAND_PCS", "pcs" },
+ { NM_SETTING_GSM_BAND_G850, "NM_SETTING_GSM_BAND_G850", "g850" },
+ { NM_SETTING_GSM_BAND_U2100, "NM_SETTING_GSM_BAND_U2100", "u2100" },
+ { NM_SETTING_GSM_BAND_U1800, "NM_SETTING_GSM_BAND_U1800", "u1800" },
+ { NM_SETTING_GSM_BAND_U17IV, "NM_SETTING_GSM_BAND_U17IV", "u17iv" },
+ { NM_SETTING_GSM_BAND_U800, "NM_SETTING_GSM_BAND_U800", "u800" },
+ { NM_SETTING_GSM_BAND_U850, "NM_SETTING_GSM_BAND_U850", "u850" },
+ { NM_SETTING_GSM_BAND_U900, "NM_SETTING_GSM_BAND_U900", "u900" },
+ { NM_SETTING_GSM_BAND_U17IX, "NM_SETTING_GSM_BAND_U17IX", "u17ix" },
+ { NM_SETTING_GSM_BAND_U1900, "NM_SETTING_GSM_BAND_U1900", "u1900" },
+ { NM_SETTING_GSM_BAND_U2600, "NM_SETTING_GSM_BAND_U2600", "u2600" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingGsmNetworkBand"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_cdma_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_CDMA_ERROR_UNKNOWN, "NM_SETTING_CDMA_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_CDMA_ERROR_INVALID_PROPERTY, "NM_SETTING_CDMA_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_CDMA_ERROR_MISSING_PROPERTY, "NM_SETTING_CDMA_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING, "NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING", "MissingSerialSetting" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingCdmaError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_olpc_mesh_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_OLPC_MESH_ERROR_UNKNOWN, "NM_SETTING_OLPC_MESH_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY, "NM_SETTING_OLPC_MESH_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY, "NM_SETTING_OLPC_MESH_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingOlpcMeshError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_wimax_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_WIMAX_ERROR_UNKNOWN, "NM_SETTING_WIMAX_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY, "NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY, "NM_SETTING_WIMAX_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingWimaxError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_wired_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_WIRED_ERROR_UNKNOWN, "NM_SETTING_WIRED_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_WIRED_ERROR_INVALID_PROPERTY, "NM_SETTING_WIRED_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_WIRED_ERROR_MISSING_PROPERTY, "NM_SETTING_WIRED_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingWiredError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_wireless_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_WIRELESS_ERROR_UNKNOWN, "NM_SETTING_WIRELESS_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY, "NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY, "NM_SETTING_WIRELESS_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING, "NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING", "MissingSecuritySetting" },
+ { NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND, "NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND", "ChannelRequiresBand" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingWirelessError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_wireless_security_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN, "NM_SETTING_WIRELESS_SECURITY_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, "NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY, "NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING, "NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING", "Missing8021xSetting" },
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X, "NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X", "LEAPRequires8021x" },
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME, "NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME", "LEAPRequiresUsername" },
+ { NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP, "NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP", "SharedKeyRequiresWEP" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingWirelessSecurityError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_wep_key_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_WEP_KEY_TYPE_UNKNOWN, "NM_WEP_KEY_TYPE_UNKNOWN", "unknown" },
+ { NM_WEP_KEY_TYPE_KEY, "NM_WEP_KEY_TYPE_KEY", "key" },
+ { NM_WEP_KEY_TYPE_PASSPHRASE, "NM_WEP_KEY_TYPE_PASSPHRASE", "passphrase" },
+ { NM_WEP_KEY_TYPE_LAST, "NM_WEP_KEY_TYPE_LAST", "last" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMWepKeyType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_setting_vpn_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTING_VPN_ERROR_UNKNOWN, "NM_SETTING_VPN_ERROR_UNKNOWN", "UnknownError" },
+ { NM_SETTING_VPN_ERROR_INVALID_PROPERTY, "NM_SETTING_VPN_ERROR_INVALID_PROPERTY", "InvalidProperty" },
+ { NM_SETTING_VPN_ERROR_MISSING_PROPERTY, "NM_SETTING_VPN_ERROR_MISSING_PROPERTY", "MissingProperty" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingVpnError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_utils_security_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NMU_SEC_INVALID, "NMU_SEC_INVALID", "invalid" },
+ { NMU_SEC_NONE, "NMU_SEC_NONE", "none" },
+ { NMU_SEC_STATIC_WEP, "NMU_SEC_STATIC_WEP", "static-wep" },
+ { NMU_SEC_LEAP, "NMU_SEC_LEAP", "leap" },
+ { NMU_SEC_DYNAMIC_WEP, "NMU_SEC_DYNAMIC_WEP", "dynamic-wep" },
+ { NMU_SEC_WPA_PSK, "NMU_SEC_WPA_PSK", "wpa-psk" },
+ { NMU_SEC_WPA_ENTERPRISE, "NMU_SEC_WPA_ENTERPRISE", "wpa-enterprise" },
+ { NMU_SEC_WPA2_PSK, "NMU_SEC_WPA2_PSK", "wpa2-psk" },
+ { NMU_SEC_WPA2_ENTERPRISE, "NMU_SEC_WPA2_ENTERPRISE", "wpa2-enterprise" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMUtilsSecurityType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+
+
diff --git a/libnm-util/nm-utils-enum-types.h b/libnm-util/nm-utils-enum-types.h
new file mode 100644
index 000000000..d3bcf0498
--- /dev/null
+++ b/libnm-util/nm-utils-enum-types.h
@@ -0,0 +1,85 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#ifndef __NM_UTILS_ENUM_TYPES_H__
+#define __NM_UTILS_ENUM_TYPES_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+GType nm_connection_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_CONNECTION_ERROR (nm_connection_error_get_type ())
+GType nm_setting_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_ERROR (nm_setting_error_get_type ())
+GType nm_setting_secret_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_SECRET_FLAGS (nm_setting_secret_flags_get_type ())
+GType nm_setting_compare_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_COMPARE_FLAGS (nm_setting_compare_flags_get_type ())
+GType nm_setting_hash_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_HASH_FLAGS (nm_setting_hash_flags_get_type ())
+GType nm_setting_diff_result_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_DIFF_RESULT (nm_setting_diff_result_get_type ())
+GType nm_setting_802_1x_ck_format_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_802_1X_CK_FORMAT (nm_setting_802_1x_ck_format_get_type ())
+GType nm_setting_802_1x_ck_scheme_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_802_1X_CK_SCHEME (nm_setting_802_1x_ck_scheme_get_type ())
+GType nm_setting_802_1x_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_802_1X_ERROR (nm_setting_802_1x_error_get_type ())
+GType nm_setting_bluetooth_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_BLUETOOTH_ERROR (nm_setting_bluetooth_error_get_type ())
+GType nm_setting_bond_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_BOND_ERROR (nm_setting_bond_error_get_type ())
+GType nm_setting_connection_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_CONNECTION_ERROR (nm_setting_connection_error_get_type ())
+GType nm_setting_infiniband_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_INFINIBAND_ERROR (nm_setting_infiniband_error_get_type ())
+GType nm_setting_ip4_config_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_IP4_CONFIG_ERROR (nm_setting_ip4_config_error_get_type ())
+GType nm_setting_vlan_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_VLAN_ERROR (nm_setting_vlan_error_get_type ())
+GType nm_vlan_priority_map_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_VLAN_PRIORITY_MAP (nm_vlan_priority_map_get_type ())
+GType nm_vlan_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_VLAN_FLAGS (nm_vlan_flags_get_type ())
+GType nm_setting_ip6_config_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_IP6_CONFIG_ERROR (nm_setting_ip6_config_error_get_type ())
+GType nm_setting_ip6_config_privacy_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_IP6_CONFIG_PRIVACY (nm_setting_ip6_config_privacy_get_type ())
+GType nm_setting_ppp_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_PPP_ERROR (nm_setting_ppp_error_get_type ())
+GType nm_setting_pppoe_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_PPPOE_ERROR (nm_setting_pppoe_error_get_type ())
+GType nm_setting_serial_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_SERIAL_ERROR (nm_setting_serial_error_get_type ())
+GType nm_setting_gsm_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_GSM_ERROR (nm_setting_gsm_error_get_type ())
+GType nm_setting_gsm_network_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_GSM_NETWORK_TYPE (nm_setting_gsm_network_type_get_type ())
+GType nm_setting_gsm_network_band_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_GSM_NETWORK_BAND (nm_setting_gsm_network_band_get_type ())
+GType nm_setting_cdma_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_CDMA_ERROR (nm_setting_cdma_error_get_type ())
+GType nm_setting_olpc_mesh_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_OLPC_MESH_ERROR (nm_setting_olpc_mesh_error_get_type ())
+GType nm_setting_wimax_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_WIMAX_ERROR (nm_setting_wimax_error_get_type ())
+GType nm_setting_wired_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_WIRED_ERROR (nm_setting_wired_error_get_type ())
+GType nm_setting_wireless_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_WIRELESS_ERROR (nm_setting_wireless_error_get_type ())
+GType nm_setting_wireless_security_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR (nm_setting_wireless_security_error_get_type ())
+GType nm_wep_key_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_WEP_KEY_TYPE (nm_wep_key_type_get_type ())
+GType nm_setting_vpn_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTING_VPN_ERROR (nm_setting_vpn_error_get_type ())
+GType nm_utils_security_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_UTILS_SECURITY_TYPE (nm_utils_security_type_get_type ())
+G_END_DECLS
+
+#endif /* __NM_UTILS_ENUM_TYPES_H__ */
+
+
+
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
index 9d4418e45..a8806206d 100644
--- a/libnm-util/nm-utils.c
+++ b/libnm-util/nm-utils.c
@@ -25,13 +25,14 @@
*/
#include "config.h"
+#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <arpa/inet.h>
-
-#include "wireless-helper.h"
+#include <netinet/ether.h>
+#include <linux/if_infiniband.h>
#include <glib.h>
#include <glib-object.h>
@@ -360,6 +361,8 @@ nm_utils_is_empty_ssid (const guint8 * ssid, int len)
return TRUE;
}
+#define ESSID_MAX_SIZE 32
+
/**
* nm_utils_escape_ssid:
* @ssid: pointer to a buffer containing the SSID data
@@ -376,7 +379,7 @@ nm_utils_is_empty_ssid (const guint8 * ssid, int len)
const char *
nm_utils_escape_ssid (const guint8 * ssid, guint32 len)
{
- static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
+ static char escaped[ESSID_MAX_SIZE * 2 + 1];
const guint8 *s = ssid;
char *d = escaped;
@@ -385,7 +388,7 @@ nm_utils_escape_ssid (const guint8 * ssid, guint32 len)
return escaped;
}
- len = MIN (len, (guint32) IW_ESSID_MAX_SIZE);
+ len = MIN (len, (guint32) ESSID_MAX_SIZE);
while (len--) {
if (*s == '\0') {
*d++ = '\\';
@@ -534,6 +537,14 @@ _nm_utils_string_slist_validate (GSList *list, const char **valid_values)
}
static void
+_nm_utils_convert_op_to_string (const GValue *src_value, GValue *dest_value)
+{
+ g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_OBJECT_PATH));
+
+ g_value_set_string (dest_value, (const char *) g_value_get_boxed (src_value));
+}
+
+static void
_nm_utils_convert_strv_to_slist (const GValue *src_value, GValue *dest_value)
{
char **str;
@@ -595,16 +606,11 @@ _nm_utils_convert_strv_to_string (const GValue *src_value, GValue *dest_value)
}
static void
-_nm_utils_convert_string_array_to_string (const GValue *src_value, GValue *dest_value)
+_string_array_to_string (const GPtrArray *strings, GValue *dest_value)
{
- GPtrArray *strings;
GString *printable;
int i;
- g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_STRING));
-
- strings = (GPtrArray *) g_value_get_boxed (src_value);
-
printable = g_string_new ("[");
for (i = 0; strings && i < strings->len; i++) {
if (i > 0)
@@ -621,6 +627,28 @@ _nm_utils_convert_string_array_to_string (const GValue *src_value, GValue *dest_
}
static void
+_nm_utils_convert_string_array_to_string (const GValue *src_value, GValue *dest_value)
+{
+ const GPtrArray *strings;
+
+ g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_STRING));
+
+ strings = (const GPtrArray *) g_value_get_boxed (src_value);
+ _string_array_to_string (strings, dest_value);
+}
+
+static void
+_nm_utils_convert_op_array_to_string (const GValue *src_value, GValue *dest_value)
+{
+ const GPtrArray *strings;
+
+ g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH));
+
+ strings = (const GPtrArray *) g_value_get_boxed (src_value);
+ _string_array_to_string (strings, dest_value);
+}
+
+static void
_nm_utils_convert_uint_array_to_string (const GValue *src_value, GValue *dest_value)
{
GArray *array;
@@ -1079,6 +1107,9 @@ _nm_utils_register_value_transformations (void)
static gboolean registered = FALSE;
if (G_UNLIKELY (!registered)) {
+ g_value_register_transform_func (DBUS_TYPE_G_OBJECT_PATH,
+ G_TYPE_STRING,
+ _nm_utils_convert_op_to_string);
g_value_register_transform_func (G_TYPE_STRV,
DBUS_TYPE_G_LIST_OF_STRING,
_nm_utils_convert_strv_to_slist);
@@ -1091,6 +1122,9 @@ _nm_utils_register_value_transformations (void)
g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_STRING,
G_TYPE_STRING,
_nm_utils_convert_string_array_to_string);
+ g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
+ G_TYPE_STRING,
+ _nm_utils_convert_op_array_to_string);
g_value_register_transform_func (DBUS_TYPE_G_UINT_ARRAY,
G_TYPE_STRING,
_nm_utils_convert_uint_array_to_string);
@@ -1209,6 +1243,8 @@ nm_utils_security_valid (NMUtilsSecurityType type,
|| ((type == NMU_SEC_LEAP) && !adhoc)) {
if (wifi_caps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104))
return TRUE;
+ else
+ return FALSE;
}
}
@@ -1249,6 +1285,8 @@ nm_utils_security_valid (NMUtilsSecurityType type,
}
break;
case NMU_SEC_WPA_PSK:
+ if (adhoc)
+ return FALSE; /* FIXME: Kernel WPA Ad-Hoc support is buggy */
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA))
return FALSE;
if (have_ap) {
@@ -1275,6 +1313,8 @@ nm_utils_security_valid (NMUtilsSecurityType type,
}
break;
case NMU_SEC_WPA2_PSK:
+ if (adhoc)
+ return FALSE; /* FIXME: Kernel WPA Ad-Hoc support is buggy */
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN))
return FALSE;
if (have_ap) {
@@ -2386,3 +2426,145 @@ nm_utils_wifi_is_channel_valid (guint32 channel, const char *band)
return FALSE;
}
+/**
+ * nm_utils_hwaddr_len:
+ * @type: the type of address; either %ARPHRD_ETHER or %ARPHRD_INFINIBAND
+ *
+ * Returns the length in octets of a hardware address of type @type.
+ *
+ * Return value: the length
+ */
+int
+nm_utils_hwaddr_len (int type)
+{
+ if (type == ARPHRD_ETHER)
+ return ETH_ALEN;
+ else if (type == ARPHRD_INFINIBAND)
+ return INFINIBAND_ALEN;
+ else
+ g_return_val_if_reached (-1);
+}
+
+/**
+ * nm_utils_hwaddr_type:
+ * @len: the length of hardware address in bytes
+ *
+ * Returns the type (either %ARPHRD_ETHER or %ARPHRD_INFINIBAND) of the raw
+ * address given its length.
+ *
+ * Return value: the type, either %ARPHRD_ETHER or %ARPHRD_INFINIBAND, or -1 if
+ * the address length was not recognized
+ */
+int
+nm_utils_hwaddr_type (int len)
+{
+ if (len == ETH_ALEN)
+ return ARPHRD_ETHER;
+ else if (len == INFINIBAND_ALEN)
+ return ARPHRD_INFINIBAND;
+ else
+ g_return_val_if_reached (-1);
+}
+
+#define HEXVAL(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
+
+/**
+ * nm_utils_hwaddr_aton:
+ * @asc: the ASCII representation of a hardware address
+ * @type: the type of address; either %ARPHRD_ETHER or %ARPHRD_INFINIBAND
+ * @buffer: buffer to store the result into
+ *
+ * Parses @asc and converts it to binary form in @buffer. See
+ * nm_utils_hwaddr_atoba() if you'd rather have the result in a
+ * #GByteArray.
+ *
+ * Return value: @buffer, or %NULL if @asc couldn't be parsed
+ */
+guint8 *
+nm_utils_hwaddr_aton (const char *asc, int type, gpointer buffer)
+{
+ const char *in = asc;
+ guint8 *out = (guint8 *)buffer;
+ int left = nm_utils_hwaddr_len (type);
+
+ while (left && *in) {
+ guint8 d1 = in[0], d2 = in[1];
+
+ if (!isxdigit (d1))
+ return NULL;
+
+ /* If there's no leading zero (ie "aa:b:cc") then fake it */
+ if (d2 && isxdigit (d2)) {
+ *out++ = (HEXVAL (d1) << 4) + HEXVAL (d2);
+ in += 2;
+ } else {
+ /* Fake leading zero */
+ *out++ = (HEXVAL ('0') << 4) + HEXVAL (d1);
+ in += 1;
+ }
+
+ left--;
+ if (*in) {
+ if (*in != ':')
+ return NULL;
+ in++;
+ }
+ }
+
+ if (left == 0 && !*in)
+ return buffer;
+ else
+ return NULL;
+}
+
+/**
+ * nm_utils_hwaddr_atoba:
+ * @asc: the ASCII representation of a hardware address
+ * @type: the type of address; either %ARPHRD_ETHER or %ARPHRD_INFINIBAND
+ *
+ * Parses @asc and converts it to binary form in a #GByteArray. See
+ * nm_utils_hwaddr_aton() if you don't want a #GByteArray.
+ *
+ * Return value: (transfer full): a new #GByteArray, or %NULL if @asc couldn't
+ * be parsed
+ */
+GByteArray *
+nm_utils_hwaddr_atoba (const char *asc, int type)
+{
+ GByteArray *ba;
+ int len = nm_utils_hwaddr_len (type);
+
+ ba = g_byte_array_sized_new (len);
+ ba->len = len;
+ if (!nm_utils_hwaddr_aton (asc, type, ba->data)) {
+ g_byte_array_unref (ba);
+ return NULL;
+ }
+
+ return ba;
+}
+
+/**
+ * nm_utils_hwaddr_ntoa:
+ * @addr: a binary hardware address
+ * @type: the type of address; either %ARPHRD_ETHER or %ARPHRD_INFINIBAND
+ *
+ * Converts @addr to textual form.
+ *
+ * Return value: (transfer full): the textual form of @addr
+ */
+char *
+nm_utils_hwaddr_ntoa (gconstpointer addr, int type)
+{
+ const guint8 *in = addr;
+ GString *out = g_string_new (NULL);
+ int left = nm_utils_hwaddr_len (type);
+
+ while (left--) {
+ if (out->len)
+ g_string_append_c (out, ':');
+ g_string_append_printf (out, "%02X", *in++);
+ }
+
+ return g_string_free (out, FALSE);
+}
diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h
index 6a1792689..7bc536acc 100644
--- a/libnm-util/nm-utils.h
+++ b/libnm-util/nm-utils.h
@@ -29,6 +29,7 @@
#include <glib.h>
#include "nm-connection.h"
+#include "nm-utils-enum-types.h"
G_BEGIN_DECLS
@@ -118,6 +119,21 @@ guint32 nm_utils_wifi_channel_to_freq (guint32 channel, const char *band);
guint32 nm_utils_wifi_find_next_channel (guint32 channel, int direction, char *band);
gboolean nm_utils_wifi_is_channel_valid (guint32 channel, const char *band);
+/**
+ * NM_UTILS_HWADDR_LEN_MAX:
+ *
+ * The maximum length of a hardware address of a type known by
+ * nm_utils_hwaddr_len() or nm_utils_hwaddr_aton(). This can be used
+ * as the size of the buffer passed to nm_utils_hwaddr_aton().
+ */
+#define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */
+
+int nm_utils_hwaddr_len (int type) G_GNUC_PURE;
+int nm_utils_hwaddr_type (int len) G_GNUC_PURE;
+char *nm_utils_hwaddr_ntoa (gconstpointer addr, int type);
+GByteArray *nm_utils_hwaddr_atoba (const char *asc, int type);
+guint8 *nm_utils_hwaddr_aton (const char *asc, int type, gpointer buffer);
+
G_END_DECLS
#endif /* NM_UTILS_H */
diff --git a/libnm-util/tests/Makefile.am b/libnm-util/tests/Makefile.am
index 1d737d1aa..46a4d1429 100644
--- a/libnm-util/tests/Makefile.am
+++ b/libnm-util/tests/Makefile.am
@@ -2,7 +2,9 @@ SUBDIRS=certs
INCLUDES = \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-util
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util
noinst_PROGRAMS = \
test-settings-defaults \
diff --git a/libnm-util/tests/Makefile.in b/libnm-util/tests/Makefile.in
index 26711238c..10a1e20fa 100644
--- a/libnm-util/tests/Makefile.in
+++ b/libnm-util/tests/Makefile.in
@@ -205,6 +205,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -259,11 +261,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -274,6 +280,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -313,6 +320,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -379,7 +388,9 @@ top_srcdir = @top_srcdir@
SUBDIRS = certs
INCLUDES = \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-util
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util
test_settings_defaults_SOURCES = \
test-settings-defaults.c
diff --git a/libnm-util/tests/certs/Makefile.in b/libnm-util/tests/certs/Makefile.in
index d7f48d219..17289f48c 100644
--- a/libnm-util/tests/certs/Makefile.in
+++ b/libnm-util/tests/certs/Makefile.in
@@ -116,6 +116,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -170,11 +172,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -185,6 +191,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -224,6 +231,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c
index f2f7e8ffe..1eed88878 100644
--- a/libnm-util/tests/test-general.c
+++ b/libnm-util/tests/test-general.c
@@ -22,6 +22,8 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <string.h>
+#include <netinet/ether.h>
+#include <linux/if_infiniband.h>
#include "nm-test-helpers.h"
#include <nm-utils.h>
@@ -442,6 +444,26 @@ test_setting_gsm_apn_underscore (void)
g_assert (success == TRUE);
}
+static void
+test_setting_gsm_without_number (void)
+{
+ NMSettingGsm *s_gsm;
+ GError *error = NULL;
+ gboolean success;
+
+ s_gsm = (NMSettingGsm *) nm_setting_gsm_new ();
+ g_assert (s_gsm);
+
+ g_object_set (s_gsm, NM_SETTING_GSM_NUMBER, NULL, NULL);
+ success = nm_setting_verify (NM_SETTING (s_gsm), NULL, &error);
+ g_assert_no_error (error);
+ g_assert (success == TRUE);
+
+ g_object_set (s_gsm, NM_SETTING_GSM_NUMBER, "", NULL);
+ success = nm_setting_verify (NM_SETTING (s_gsm), NULL, &error);
+ g_assert_error (error, NM_SETTING_GSM_ERROR, NM_SETTING_GSM_ERROR_INVALID_PROPERTY);
+}
+
static NMSettingWirelessSecurity *
make_test_wsec_setting (const char *detail)
{
@@ -849,6 +871,9 @@ test_connection_diff_a_only (void)
{ NM_SETTING_CONNECTION_AUTOCONNECT, NM_SETTING_DIFF_RESULT_IN_A },
{ NM_SETTING_CONNECTION_READ_ONLY, NM_SETTING_DIFF_RESULT_IN_A },
{ NM_SETTING_CONNECTION_PERMISSIONS, NM_SETTING_DIFF_RESULT_IN_A },
+ { NM_SETTING_CONNECTION_ZONE, NM_SETTING_DIFF_RESULT_IN_A },
+ { NM_SETTING_CONNECTION_MASTER, NM_SETTING_DIFF_RESULT_IN_A },
+ { NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_DIFF_RESULT_IN_A },
{ NULL, NM_SETTING_DIFF_RESULT_UNKNOWN }
} },
{ NM_SETTING_WIRED_SETTING_NAME, {
@@ -916,7 +941,7 @@ test_connection_diff_different (void)
{
NMConnection *a, *b;
GHashTable *out_diffs = NULL;
- NMSetting *s_ip4;
+ NMSettingIP4Config *s_ip4;
gboolean same;
const DiffSetting settings[] = {
{ NM_SETTING_IP4_CONFIG_SETTING_NAME, {
@@ -927,7 +952,7 @@ test_connection_diff_different (void)
a = new_test_connection ();
b = nm_connection_duplicate (a);
- s_ip4 = nm_connection_get_setting (a, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (a);
g_assert (s_ip4);
g_object_set (G_OBJECT (s_ip4),
NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL,
@@ -968,7 +993,7 @@ test_connection_diff_no_secrets (void)
b = nm_connection_duplicate (a);
/* Add a secret to B */
- s_pppoe = nm_connection_get_setting (b, NM_TYPE_SETTING_PPPOE);
+ s_pppoe = NM_SETTING (nm_connection_get_setting_pppoe (b));
g_assert (s_pppoe);
g_object_set (G_OBJECT (s_pppoe),
NM_SETTING_PPPOE_PASSWORD, "secretpassword",
@@ -1295,6 +1320,47 @@ test_setting_compare_vpn_secrets (NMSettingSecretFlags secret_flags,
g_assert (success);
}
+static void
+test_hwaddr_aton_ether_normal (void)
+{
+ guint8 buf[100];
+ guint8 expected[ETH_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
+
+ g_assert (nm_utils_hwaddr_aton ("00:11:22:33:44:55", ARPHRD_ETHER, buf) != NULL);
+ g_assert (memcmp (buf, expected, sizeof (expected)) == 0);
+}
+
+static void
+test_hwaddr_aton_ib_normal (void)
+{
+ guint8 buf[100];
+ const char *source = "00:11:22:33:44:55:66:77:88:99:01:12:23:34:45:56:67:78:89:90";
+ guint8 expected[INFINIBAND_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
+ 0x77, 0x88, 0x99, 0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89,
+ 0x90 };
+
+ g_assert (nm_utils_hwaddr_aton (source, ARPHRD_INFINIBAND, buf) != NULL);
+ g_assert (memcmp (buf, expected, sizeof (expected)) == 0);
+}
+
+static void
+test_hwaddr_aton_no_leading_zeros (void)
+{
+ guint8 buf[100];
+ guint8 expected[ETH_ALEN] = { 0x00, 0x1A, 0x2B, 0x03, 0x44, 0x05 };
+
+ g_assert (nm_utils_hwaddr_aton ("0:1a:2B:3:44:5", ARPHRD_ETHER, buf) != NULL);
+ g_assert (memcmp (buf, expected, sizeof (expected)) == 0);
+}
+
+static void
+test_hwaddr_aton_malformed (void)
+{
+ guint8 buf[100];
+
+ g_assert (nm_utils_hwaddr_aton ("0:1a:2B:3:a@%%", ARPHRD_ETHER, buf) == NULL);
+}
+
int main (int argc, char **argv)
{
GError *error = NULL;
@@ -1313,6 +1379,7 @@ int main (int argc, char **argv)
test_setting_gsm_apn_spaces ();
test_setting_gsm_apn_bad_chars ();
test_setting_gsm_apn_underscore ();
+ test_setting_gsm_without_number ();
test_setting_to_hash_all ();
test_setting_to_hash_no_secrets ();
test_setting_to_hash_only_secrets ();
@@ -1336,6 +1403,11 @@ int main (int argc, char **argv)
test_connection_good_base_types ();
test_connection_bad_base_types ();
+ test_hwaddr_aton_ether_normal ();
+ test_hwaddr_aton_ib_normal ();
+ test_hwaddr_aton_no_leading_zeros ();
+ test_hwaddr_aton_malformed ();
+
base = g_path_get_basename (argv[0]);
fprintf (stdout, "%s: SUCCESS\n", base);
g_free (base);
diff --git a/libnm-util/tests/test-secrets.c b/libnm-util/tests/test-secrets.c
index 1fe3c4382..0e859abcc 100644
--- a/libnm-util/tests/test-secrets.c
+++ b/libnm-util/tests/test-secrets.c
@@ -527,7 +527,7 @@ test_update_secrets_wifi_single_setting (void)
g_assert (success);
/* Make sure the secret is now in the connection */
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
g_assert (s_wsec);
tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 0);
g_assert_cmpstr (tmp, ==, wepkey);
@@ -563,7 +563,7 @@ test_update_secrets_wifi_full_hash (void)
g_assert (success);
/* Make sure the secret is now in the connection */
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
g_assert (s_wsec);
tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 0);
g_assert_cmpstr (tmp, ==, wepkey);
diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4
index 575ea9a61..eeacfae85 100644
--- a/m4/compiler_warnings.m4
+++ b/m4/compiler_warnings.m4
@@ -1,7 +1,7 @@
AC_DEFUN([NM_COMPILER_WARNINGS],
[AC_ARG_ENABLE(more-warnings,
- AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
- set_more_warnings="$enableval",set_more_warnings=yes)
+ AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
+ set_more_warnings="$enableval",set_more_warnings=error)
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
@@ -26,7 +26,9 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
unset SAVE_CFLAGS
done
unset option
- CFLAGS="$CFLAGS -Werror"
+ if test "x$set_more_warnings" = xerror; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
else
AC_MSG_RESULT(no)
fi
diff --git a/man/Makefile.in b/man/Makefile.in
index 6171271cf..89bb3c89e 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -140,6 +140,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -194,11 +196,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -209,6 +215,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -248,6 +255,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5
index 9fe722c4c..84b4d751d 100644
--- a/man/NetworkManager.conf.5
+++ b/man/NetworkManager.conf.5
@@ -211,6 +211,26 @@ OLPC = OLPC Mesh device operations
.br
WIMAX = Wimax device operations
.br
+.SS [connectivity]
+This section controls NetworkManager's optional connectivity checking
+functionality. This allows NetworkManager to detect whether or not the system
+can actually access the internet or whether it is behind a captive portal.
+.TP
+.B uri=\fI<uri>\fP
+The URI of a web page to periodically request when connectivity is being checked.
+This page should return the header "X-NetworkManager-Status" with a value of
+"online". Alternatively, it's body content should be set to "NetworkManager
+is online". The body content check can be controlled by the \fIresponse\fP
+option. If this option is blank or missing, connectivity checking is disabled.
+.TP
+.B interval=\fI<seconds>\fP
+Controls how often connectivity is checked when a network connection exists. If
+set to 0 connectivity checking is disabled. If missing, the default is 300
+seconds.
+.TP
+.B response=\fI<response>\fP
+If set controls what body content NetworkManager checks for when requesting the
+URI for connectivity checking. If missing, defaults to "NetworkManager is online"
.SH "SEE ALSO"
.BR http://live.gnome.org/NetworkManager/SystemSettings
.sp
diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in
index 9fe722c4c..84b4d751d 100644
--- a/man/NetworkManager.conf.5.in
+++ b/man/NetworkManager.conf.5.in
@@ -211,6 +211,26 @@ OLPC = OLPC Mesh device operations
.br
WIMAX = Wimax device operations
.br
+.SS [connectivity]
+This section controls NetworkManager's optional connectivity checking
+functionality. This allows NetworkManager to detect whether or not the system
+can actually access the internet or whether it is behind a captive portal.
+.TP
+.B uri=\fI<uri>\fP
+The URI of a web page to periodically request when connectivity is being checked.
+This page should return the header "X-NetworkManager-Status" with a value of
+"online". Alternatively, it's body content should be set to "NetworkManager
+is online". The body content check can be controlled by the \fIresponse\fP
+option. If this option is blank or missing, connectivity checking is disabled.
+.TP
+.B interval=\fI<seconds>\fP
+Controls how often connectivity is checked when a network connection exists. If
+set to 0 connectivity checking is disabled. If missing, the default is 300
+seconds.
+.TP
+.B response=\fI<response>\fP
+If set controls what body content NetworkManager checks for when requesting the
+URI for connectivity checking. If missing, defaults to "NetworkManager is online"
.SH "SEE ALSO"
.BR http://live.gnome.org/NetworkManager/SystemSettings
.sp
diff --git a/marshallers/Makefile.am b/marshallers/Makefile.am
deleted file mode 100644
index 357029dd4..000000000
--- a/marshallers/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-noinst_LTLIBRARIES = libmarshallers.la
-
-BUILT_SOURCES = \
- nm-marshal.h \
- nm-marshal.c
-
-libmarshallers_la_SOURCES = \
- nm-marshal-main.c
-
-libmarshallers_la_CPPFLAGS = \
- $(GLIB_CFLAGS) \
- -DG_DISABLE_DEPRECATED
-
-
-libmarshallers_la_LIBADD = $(GLIB_LIBS)
-
-EXTRA_DIST = nm-marshal.list
-CLEANFILES = $(BUILT_SOURCES)
-
-nm-marshal.h: nm-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=_nm_marshal --header > $@
-
-nm-marshal.c: nm-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=_nm_marshal --body > $@
-
-nm-marshal-main.c: nm-marshal.c nm-marshal.h
-
diff --git a/marshallers/nm-marshal-main.c b/marshallers/nm-marshal-main.c
deleted file mode 100644
index 7c2091396..000000000
--- a/marshallers/nm-marshal-main.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "nm-marshal.h"
-#include "nm-marshal.c"
diff --git a/marshallers/nm-marshal.list b/marshallers/nm-marshal.list
deleted file mode 100644
index b152d9c1f..000000000
--- a/marshallers/nm-marshal.list
+++ /dev/null
@@ -1,30 +0,0 @@
-VOID:OBJECT
-VOID:OBJECT,STRING
-VOID:OBJECT,STRING,UINT
-VOID:OBJECT,UINT
-VOID:OBJECT,POINTER
-VOID:OBJECT,POINTER,UINT
-VOID:POINTER
-VOID:STRING,STRING,STRING
-VOID:UINT,UINT
-VOID:UINT,UINT,UINT
-VOID:STRING,STRING
-VOID:STRING,UCHAR
-VOID:STRING,OBJECT
-VOID:POINTER,POINTER
-VOID:STRING,STRING,STRING,UINT
-VOID:OBJECT,UINT,UINT
-VOID:STRING,INT
-VOID:INT,UINT
-VOID:INT,UINT,BOOLEAN
-VOID:OBJECT,OBJECT,ENUM
-VOID:POINTER,STRING
-VOID:STRING,BOXED
-BOOLEAN:POINTER,STRING,BOOLEAN,UINT,STRING,STRING
-VOID:STRING,BOOLEAN,UINT,STRING,STRING
-BOOLEAN:VOID
-VOID:STRING,BOOLEAN
-VOID:STRING,OBJECT,POINTER
-VOID:BOOLEAN,UINT
-UINT:STRING,STRING,POINTER,POINTER
-
diff --git a/po/LINGUAS b/po/LINGUAS
index f77d9c0d2..cddcbd13f 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -58,6 +58,7 @@ sv
ta
te
th
+tr
uk
vi
wa
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f021275ee..bfc65ac2a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,7 @@
[encoding: UTF-8]
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
+cli/src/common.c
cli/src/connections.c
cli/src/devices.c
cli/src/network-manager.c
@@ -20,12 +21,14 @@ src/dns-manager/nm-dns-manager.c
src/logging/nm-logging.c
src/modem-manager/nm-modem-cdma.c
src/modem-manager/nm-modem-gsm.c
+src/nm-device-bond.c
src/nm-device-bt.c
src/nm-device-ethernet.c
+src/nm-device-infiniband.c
src/nm-device-olpc-mesh.c
+src/nm-device-vlan.c
src/nm-manager.c
src/nm-netlink-monitor.c
src/settings/plugins/ifcfg-rh/reader.c
-src/settings/plugins/ifnet/connection_parser.c
src/settings/nm-settings-utils.c
diff --git a/po/cs.po b/po/cs.po
index 6c0d8630f..7335e726d 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2,897 +2,1085 @@
# Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 the author(s) of NetworkManager.
# Copyright (C) 2004, 2005, 2006 Miloslav Trmac <mitr@volny.cz>.
# This file is distributed under the same license as the NetworkManager package.
+#
# Miloslav Trmac <mitr@volny.cz>, 2004, 2005, 2006.
# Jakub Friedl <jfriedl@suse.cz>, 2006.
# Jiří Eischmann <jiri@eischmann.cz>, 2008.
-# Marek Černocký <marek@manet.cz>, 2010.
-# Vladimír Machat <atrament@seznam.cz>, 2010.
+# Vladimír Machat <atrament@seznam.cz>, 2010, 2011.
+# Marek Černocký <marek@manet.cz>, 2010, 2011.
+#
msgid ""
msgstr ""
"Project-Id-Version: NetworkManager\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
-"product=NetworkManager&component=general\n"
-"POT-Creation-Date: 2010-09-22 03:25+0000\n"
-"PO-Revision-Date: 2010-10-10 13:00+0100\n"
+"product=NetworkManager&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2011-11-18 03:24+0000\n"
+"PO-Revision-Date: 2011-11-24 15:48+0100\n"
"Last-Translator: Vladimír Machat <atrament@seznam.cz>\n"
"Language-Team: Czech <gnome-cs-list@gnome.org>\n"
"MIME-Version: 1.0\n"
+"Language: cs\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: ../cli/src/connections.c:60 ../cli/src/connections.c:75
-#: ../cli/src/devices.c:88 ../cli/src/devices.c:101 ../cli/src/devices.c:111
-#: ../cli/src/devices.c:121 ../cli/src/devices.c:134 ../cli/src/devices.c:145
-#: ../cli/src/devices.c:156 ../cli/src/devices.c:165 ../cli/src/devices.c:174
+#: ../cli/src/connections.c:64 ../cli/src/connections.c:79
+#: ../cli/src/devices.c:101 ../cli/src/devices.c:114 ../cli/src/devices.c:124
+#: ../cli/src/devices.c:134 ../cli/src/devices.c:148 ../cli/src/devices.c:162
+#: ../cli/src/devices.c:173 ../cli/src/devices.c:184 ../cli/src/devices.c:193
+#: ../cli/src/devices.c:202 ../cli/src/devices.c:224
msgid "NAME"
msgstr "NÁZEV"
#. 0
-#: ../cli/src/connections.c:61 ../cli/src/connections.c:76
+#: ../cli/src/connections.c:65 ../cli/src/connections.c:80
msgid "UUID"
msgstr "UUID"
#. 1
-#: ../cli/src/connections.c:62
+#: ../cli/src/connections.c:66
msgid "DEVICES"
msgstr "ZAŘÍZENÍ"
#. 2
-#: ../cli/src/connections.c:63 ../cli/src/connections.c:78
-msgid "SCOPE"
-msgstr "ROZSAH"
-
-#. 3
-#: ../cli/src/connections.c:64
+#: ../cli/src/connections.c:67
msgid "DEFAULT"
msgstr "VÝCHOZÍ"
-#. 4
-#: ../cli/src/connections.c:65
-msgid "DBUS-SERVICE"
-msgstr "SLUŽBA-DBUS"
-
-#. 5
-#: ../cli/src/connections.c:66
+#. 3
+#: ../cli/src/connections.c:68
msgid "SPEC-OBJECT"
msgstr "OBJEKT-SPEC"
-#. 6
-#: ../cli/src/connections.c:67
+#. 4
+#: ../cli/src/connections.c:69
msgid "VPN"
msgstr "VPN"
+#. 5
+#. 6
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:70 ../cli/src/connections.c:86
+#: ../cli/src/devices.c:69 ../cli/src/devices.c:214 ../cli/src/devices.c:230
+msgid "DBUS-PATH"
+msgstr "CESTA-DBUS"
+
+#. 6
+#: ../cli/src/connections.c:71
+msgid "ZONE"
+msgstr "ZÓNA"
+
#. 1
#. 0
#. 1
-#: ../cli/src/connections.c:77 ../cli/src/devices.c:62 ../cli/src/devices.c:90
+#. 2
+#: ../cli/src/connections.c:81 ../cli/src/devices.c:67
+#: ../cli/src/devices.c:103 ../cli/src/devices.c:227
msgid "TYPE"
msgstr "TYP"
-#. 3
-#: ../cli/src/connections.c:79
+#. 2
+#: ../cli/src/connections.c:82
msgid "TIMESTAMP"
msgstr "ČASOVÉ-RAZÍTKO"
-#. 4
-#: ../cli/src/connections.c:80
+#. 3
+#: ../cli/src/connections.c:83
msgid "TIMESTAMP-REAL"
msgstr "ČASOVÉ-RAZÍTKO-REÁLNÉ"
-#. 5
-#: ../cli/src/connections.c:81
+#. 4
+#: ../cli/src/connections.c:84
msgid "AUTOCONNECT"
msgstr "AUTOMATICKY-PŘIPOJIT"
-#. 6
-#: ../cli/src/connections.c:82
+#. 5
+#: ../cli/src/connections.c:85
msgid "READONLY"
msgstr "JEN-KE-ČTENÍ"
-#. 7
-#: ../cli/src/connections.c:83
-msgid "DBUS-PATH"
-msgstr "CESTA-DBUS"
-
-#: ../cli/src/connections.c:159
-#, c-format
+#: ../cli/src/connections.c:154
+#, c-format
+#| msgid ""
+#| "Usage: nmcli con { COMMAND | help }\n"
+#| " COMMAND := { list | status | up | down }\n"
+#| "\n"
+#| " list [id <id> | uuid <id> | system | user]\n"
+#| " status\n"
+#| " up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--"
+#| "timeout <timeout>]\n"
+#| " down id <id> | uuid <id>\n"
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
+" list [id <id> | uuid <id>]\n"
" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
+"nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
msgstr ""
"Použití: nmcli con {PŘÍKAZ | help}\n"
-" PŘÍKAZ := {list | status | up | down}\n"
+" PŘÍKAZ := {list | status | up | down | delete}\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
+" list [id <id> | uuid <id>\n"
" status\n"
-" up id <id> | uuid <id> [iface <rozhraní>] [ap <hw_adresa>] [--nowait] [--"
+" up id <id> | uuid <id> [iface <rozhraní>] [ap <BSSID>] [nsp <název>] [--"
+"nowait] [--timeout <časový_limit>]\n"
+" up id <id> | uuid <id> [iface <rozhraní>] [ap <BSSID>] [--nowait] [--"
"timeout <časový_limit>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
-#: ../cli/src/connections.c:199 ../cli/src/connections.c:540
+#: ../cli/src/connections.c:209 ../cli/src/connections.c:533
#, c-format
msgid "Error: 'con list': %s"
msgstr "Chyba: „con list“: %s"
-#: ../cli/src/connections.c:201 ../cli/src/connections.c:542
+#: ../cli/src/connections.c:211 ../cli/src/connections.c:535
#, c-format
msgid "Error: 'con list': %s; allowed fields: %s"
msgstr "Chyba: „con status“: %s; povolená pole: %s"
-#: ../cli/src/connections.c:209
+#: ../cli/src/connections.c:219
msgid "Connection details"
msgstr "Detaily připojení"
-#: ../cli/src/connections.c:384 ../cli/src/connections.c:605
-msgid "system"
-msgstr "systém"
-
-#: ../cli/src/connections.c:384 ../cli/src/connections.c:605
-msgid "user"
-msgstr "uživatel"
-
-#: ../cli/src/connections.c:386
+#: ../cli/src/connections.c:408
msgid "never"
msgstr "nikdy"
#. "CAPABILITIES"
#. Print header
#. "WIFI-PROPERTIES"
-#: ../cli/src/connections.c:387 ../cli/src/connections.c:388
-#: ../cli/src/connections.c:606 ../cli/src/connections.c:609
-#: ../cli/src/devices.c:432 ../cli/src/devices.c:557 ../cli/src/devices.c:583
-#: ../cli/src/devices.c:584 ../cli/src/devices.c:585 ../cli/src/devices.c:586
-#: ../cli/src/devices.c:587 ../cli/src/settings.c:508
-#: ../cli/src/settings.c:551 ../cli/src/settings.c:652
-#: ../cli/src/settings.c:926 ../cli/src/settings.c:927
-#: ../cli/src/settings.c:929 ../cli/src/settings.c:931
-#: ../cli/src/settings.c:1056 ../cli/src/settings.c:1057
-#: ../cli/src/settings.c:1058 ../cli/src/settings.c:1137
-#: ../cli/src/settings.c:1138 ../cli/src/settings.c:1139
-#: ../cli/src/settings.c:1140 ../cli/src/settings.c:1141
-#: ../cli/src/settings.c:1142 ../cli/src/settings.c:1143
-#: ../cli/src/settings.c:1144 ../cli/src/settings.c:1145
-#: ../cli/src/settings.c:1146 ../cli/src/settings.c:1147
-#: ../cli/src/settings.c:1148 ../cli/src/settings.c:1149
-#: ../cli/src/settings.c:1224
+#: ../cli/src/connections.c:409 ../cli/src/connections.c:410
+#: ../cli/src/connections.c:588 ../cli/src/connections.c:590
+#: ../cli/src/devices.c:499 ../cli/src/devices.c:552 ../cli/src/devices.c:677
+#: ../cli/src/devices.c:703 ../cli/src/devices.c:704 ../cli/src/devices.c:705
+#: ../cli/src/devices.c:706 ../cli/src/devices.c:707 ../cli/src/settings.c:560
+#: ../cli/src/settings.c:632 ../cli/src/settings.c:753
+#: ../cli/src/settings.c:1041 ../cli/src/settings.c:1042
+#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1046
+#: ../cli/src/settings.c:1047 ../cli/src/settings.c:1177
+#: ../cli/src/settings.c:1178 ../cli/src/settings.c:1179
+#: ../cli/src/settings.c:1180 ../cli/src/settings.c:1259
+#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268 ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270 ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1346
msgid "yes"
msgstr "ano"
-#: ../cli/src/connections.c:387 ../cli/src/connections.c:388
-#: ../cli/src/connections.c:606 ../cli/src/connections.c:609
-#: ../cli/src/devices.c:432 ../cli/src/devices.c:557 ../cli/src/devices.c:583
-#: ../cli/src/devices.c:584 ../cli/src/devices.c:585 ../cli/src/devices.c:586
-#: ../cli/src/devices.c:587 ../cli/src/settings.c:508
-#: ../cli/src/settings.c:510 ../cli/src/settings.c:551
-#: ../cli/src/settings.c:652 ../cli/src/settings.c:926
-#: ../cli/src/settings.c:927 ../cli/src/settings.c:929
-#: ../cli/src/settings.c:931 ../cli/src/settings.c:1056
-#: ../cli/src/settings.c:1057 ../cli/src/settings.c:1058
-#: ../cli/src/settings.c:1137 ../cli/src/settings.c:1138
-#: ../cli/src/settings.c:1139 ../cli/src/settings.c:1140
-#: ../cli/src/settings.c:1141 ../cli/src/settings.c:1142
-#: ../cli/src/settings.c:1143 ../cli/src/settings.c:1144
-#: ../cli/src/settings.c:1145 ../cli/src/settings.c:1146
-#: ../cli/src/settings.c:1147 ../cli/src/settings.c:1148
-#: ../cli/src/settings.c:1149 ../cli/src/settings.c:1224
+#: ../cli/src/connections.c:409 ../cli/src/connections.c:410
+#: ../cli/src/connections.c:588 ../cli/src/connections.c:590
+#: ../cli/src/devices.c:499 ../cli/src/devices.c:552 ../cli/src/devices.c:677
+#: ../cli/src/devices.c:703 ../cli/src/devices.c:704 ../cli/src/devices.c:705
+#: ../cli/src/devices.c:706 ../cli/src/devices.c:707 ../cli/src/settings.c:560
+#: ../cli/src/settings.c:562 ../cli/src/settings.c:632
+#: ../cli/src/settings.c:753 ../cli/src/settings.c:1041
+#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1044
+#: ../cli/src/settings.c:1046 ../cli/src/settings.c:1047
+#: ../cli/src/settings.c:1177 ../cli/src/settings.c:1178
+#: ../cli/src/settings.c:1179 ../cli/src/settings.c:1180
+#: ../cli/src/settings.c:1259 ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269 ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1346
msgid "no"
msgstr "ne"
-#: ../cli/src/connections.c:461 ../cli/src/connections.c:504
-msgid "System connections"
-msgstr "Systémové připojení"
+#: ../cli/src/connections.c:484
+#| msgid "Connection details"
+msgid "Connection list"
+msgstr "Seznam připojení"
-#: ../cli/src/connections.c:466 ../cli/src/connections.c:517
-msgid "User connections"
-msgstr "Uživatelské připojení"
-
-#: ../cli/src/connections.c:478 ../cli/src/connections.c:1338
-#: ../cli/src/connections.c:1354 ../cli/src/connections.c:1363
-#: ../cli/src/connections.c:1374 ../cli/src/connections.c:1459
-#: ../cli/src/devices.c:962 ../cli/src/devices.c:972 ../cli/src/devices.c:1074
-#: ../cli/src/devices.c:1081
+#: ../cli/src/connections.c:497 ../cli/src/connections.c:1358
+#: ../cli/src/connections.c:1373 ../cli/src/connections.c:1382
+#: ../cli/src/connections.c:1392 ../cli/src/connections.c:1404
+#: ../cli/src/connections.c:1499 ../cli/src/connections.c:1582
+#: ../cli/src/devices.c:1180 ../cli/src/devices.c:1190
+#: ../cli/src/devices.c:1304 ../cli/src/devices.c:1312
+#: ../cli/src/devices.c:1525 ../cli/src/devices.c:1532
#, c-format
msgid "Error: %s argument is missing."
msgstr "Chyba: schází argument %s."
-#: ../cli/src/connections.c:491
+#: ../cli/src/connections.c:510
#, c-format
msgid "Error: %s - no such connection."
msgstr "Chyba: %s - takové připojení neexistuje."
-#: ../cli/src/connections.c:523 ../cli/src/connections.c:1387
-#: ../cli/src/connections.c:1477 ../cli/src/devices.c:785
-#: ../cli/src/devices.c:852 ../cli/src/devices.c:986 ../cli/src/devices.c:1087
+#: ../cli/src/connections.c:516 ../cli/src/connections.c:1417
+#: ../cli/src/connections.c:1516 ../cli/src/connections.c:1589
+#: ../cli/src/devices.c:977 ../cli/src/devices.c:1057
+#: ../cli/src/devices.c:1204 ../cli/src/devices.c:1318
+#: ../cli/src/devices.c:1538
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "Neznámý parametr: %s\n"
-#: ../cli/src/connections.c:532
+#: ../cli/src/connections.c:525
#, c-format
msgid "Error: no valid parameter specified."
msgstr "Chyba: nezadán žádný platný parametr."
-#: ../cli/src/connections.c:547 ../cli/src/connections.c:1580
-#: ../cli/src/devices.c:1293 ../cli/src/network-manager.c:359
+#: ../cli/src/connections.c:540 ../cli/src/connections.c:1670
+#: ../cli/src/devices.c:1746 ../cli/src/network-manager.c:456
#, c-format
msgid "Error: %s."
msgstr "Chyba: %s."
-#: ../cli/src/connections.c:653
+#: ../cli/src/connections.c:629
#, c-format
msgid "Error: 'con status': %s"
msgstr "Chyba: „con status“: %s"
-#: ../cli/src/connections.c:655
+#: ../cli/src/connections.c:631
#, c-format
msgid "Error: 'con status': %s; allowed fields: %s"
msgstr "Chyba: „con status“: %s; povolená pole: %s"
-#: ../cli/src/connections.c:662
+#: ../cli/src/connections.c:639 ../cli/src/connections.c:1432
+#: ../cli/src/connections.c:1531 ../cli/src/connections.c:1603
+#: ../cli/src/devices.c:1004 ../cli/src/devices.c:1066
+#: ../cli/src/devices.c:1219 ../cli/src/devices.c:1348
+#: ../cli/src/devices.c:1567
+#, c-format
+#| msgid "Error: Could not connect to NetworkManager."
+msgid "Error: Can't find out if NetworkManager is running: %s."
+msgstr "Chyba: Nelze najít běžící NetworkManager: %s."
+
+#: ../cli/src/connections.c:643 ../cli/src/connections.c:1436
+#: ../cli/src/connections.c:1535 ../cli/src/connections.c:1607
+#: ../cli/src/devices.c:1008 ../cli/src/devices.c:1070
+#: ../cli/src/devices.c:1223 ../cli/src/devices.c:1352
+#: ../cli/src/devices.c:1571
+#, c-format
+#| msgid "NetworkManager status"
+msgid "Error: NetworkManager is not running."
+msgstr "Chyba: NetworkManager neběží."
+
+#: ../cli/src/connections.c:651
msgid "Active connections"
msgstr "Aktivní připojení"
-#: ../cli/src/connections.c:1030
+#: ../cli/src/connections.c:1075
#, c-format
msgid "no active connection on device '%s'"
msgstr "žádné aktivní připojení nebo zařízení „%s“"
-#: ../cli/src/connections.c:1038
+#: ../cli/src/connections.c:1083
#, c-format
msgid "no active connection or device"
msgstr "žádné aktivní připojení nebo zařízení"
-#: ../cli/src/connections.c:1088
+#: ../cli/src/connections.c:1154
#, c-format
msgid "device '%s' not compatible with connection '%s'"
msgstr "zařízení „%s“ není kompatibilní s připojením „%s“"
-#: ../cli/src/connections.c:1090
+#: ../cli/src/connections.c:1156
#, c-format
msgid "no device found for connection '%s'"
msgstr "pro připojení „%s“ nebylo nalezeno žádné zařízení"
-#: ../cli/src/connections.c:1101
+#: ../cli/src/connections.c:1167
msgid "activating"
msgstr "aktivuje se"
-#: ../cli/src/connections.c:1103
+#: ../cli/src/connections.c:1169
msgid "activated"
msgstr "aktivováno"
-#: ../cli/src/connections.c:1106 ../cli/src/connections.c:1129
-#: ../cli/src/connections.c:1162 ../cli/src/devices.c:246
-#: ../cli/src/devices.c:558 ../cli/src/network-manager.c:94
-#: ../cli/src/network-manager.c:149 ../cli/src/settings.c:473
+#: ../cli/src/connections.c:1171 ../cli/src/devices.c:294
+#| msgid "activating"
+msgid "deactivating"
+msgstr "deaktivuje se"
+
+#: ../cli/src/connections.c:1174 ../cli/src/connections.c:1197
+#: ../cli/src/connections.c:1230 ../cli/src/devices.c:298
+#: ../cli/src/devices.c:678 ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:513
+#: ../cli/src/utils.c:397
msgid "unknown"
msgstr "neznámé"
-#: ../cli/src/connections.c:1115
+#: ../cli/src/connections.c:1183
msgid "VPN connecting (prepare)"
msgstr "VPN se připojuje (příprava)"
-#: ../cli/src/connections.c:1117
+#: ../cli/src/connections.c:1185
msgid "VPN connecting (need authentication)"
msgstr "VPN se připojuje (požaduje ověření)"
-#: ../cli/src/connections.c:1119
+#: ../cli/src/connections.c:1187
msgid "VPN connecting"
msgstr "VPN se připojuje"
-#: ../cli/src/connections.c:1121
+#: ../cli/src/connections.c:1189
msgid "VPN connecting (getting IP configuration)"
msgstr "VPN se připojuje (získává se nastavení IP)"
-#: ../cli/src/connections.c:1123
+#: ../cli/src/connections.c:1191
msgid "VPN connected"
msgstr "VPN připojena"
-#: ../cli/src/connections.c:1125
+#: ../cli/src/connections.c:1193
msgid "VPN connection failed"
msgstr "VPN se nezdařilo připojit"
-#: ../cli/src/connections.c:1127
+#: ../cli/src/connections.c:1195
msgid "VPN disconnected"
msgstr "VPN odpojena"
-#: ../cli/src/connections.c:1138
+#: ../cli/src/connections.c:1206
msgid "unknown reason"
msgstr "neznámý důvod"
-#: ../cli/src/connections.c:1140
+#: ../cli/src/connections.c:1208
msgid "none"
msgstr "žádný"
-#: ../cli/src/connections.c:1142
+#: ../cli/src/connections.c:1210
msgid "the user was disconnected"
msgstr "uživatel byl odpojen"
-#: ../cli/src/connections.c:1144
+#: ../cli/src/connections.c:1212
msgid "the base network connection was interrupted"
msgstr "základní síťové připojení bylo přerušeno"
-#: ../cli/src/connections.c:1146
+#: ../cli/src/connections.c:1214
msgid "the VPN service stopped unexpectedly"
msgstr "služba VPN neočekávaně zastavena"
-#: ../cli/src/connections.c:1148
+#: ../cli/src/connections.c:1216
msgid "the VPN service returned invalid configuration"
msgstr "služba VPN vrátila neplatné nastavení"
-#: ../cli/src/connections.c:1150
+#: ../cli/src/connections.c:1218
msgid "the connection attempt timed out"
msgstr "pokusu o připojení vypršel časový limit"
-#: ../cli/src/connections.c:1152
+#: ../cli/src/connections.c:1220
msgid "the VPN service did not start in time"
msgstr "služba VPN se nespustila v časovém limitu"
-#: ../cli/src/connections.c:1154
+#: ../cli/src/connections.c:1222
msgid "the VPN service failed to start"
msgstr "službu VPN se nezdařilo spustit"
-#: ../cli/src/connections.c:1156
+#: ../cli/src/connections.c:1224
msgid "no valid VPN secrets"
msgstr "žádná platná utajení VPN"
-#: ../cli/src/connections.c:1158
+#: ../cli/src/connections.c:1226
msgid "invalid VPN secrets"
msgstr "neplatná utajení VPN"
-#: ../cli/src/connections.c:1160
+#: ../cli/src/connections.c:1228
msgid "the connection was removed"
msgstr "připojení odstraněno"
-#: ../cli/src/connections.c:1174
+#: ../cli/src/connections.c:1242
#, c-format
msgid "state: %s\n"
msgstr "stav: %s\n"
-#: ../cli/src/connections.c:1177 ../cli/src/connections.c:1203
+#: ../cli/src/connections.c:1245 ../cli/src/connections.c:1271
#, c-format
msgid "Connection activated\n"
msgstr "Připojení aktivováno\n"
-#: ../cli/src/connections.c:1180
+#: ../cli/src/connections.c:1248
#, c-format
msgid "Error: Connection activation failed."
msgstr "Chyba: Selhala aktivace připojení."
-#: ../cli/src/connections.c:1199
+#: ../cli/src/connections.c:1267
#, c-format
msgid "state: %s (%d)\n"
msgstr "stav: %s (%d)\n"
-#: ../cli/src/connections.c:1209
+#: ../cli/src/connections.c:1277
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "Chyba: Selhala aktivace připojení: %s"
-#: ../cli/src/connections.c:1226 ../cli/src/devices.c:909
+#: ../cli/src/connections.c:1294 ../cli/src/devices.c:1126
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "Chyba: Časový limit %d sekund vypršel."
-#: ../cli/src/connections.c:1269
+#: ../cli/src/connections.c:1307
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "Chyba: Selhala aktivace připojení: %s"
-#: ../cli/src/connections.c:1283
-#, c-format
-msgid "Error: Obtaining active connection for '%s' failed."
-msgstr "Chyba: Získání aktivního připojení pro „%s“ selhalo."
-
-#: ../cli/src/connections.c:1292
+#: ../cli/src/connections.c:1313
#, c-format
msgid "Active connection state: %s\n"
msgstr "Stav aktivního připojení: %s\n"
-#: ../cli/src/connections.c:1293
+#: ../cli/src/connections.c:1314
#, c-format
msgid "Active connection path: %s\n"
msgstr "Cesta aktivního připojení: %s\n"
-#: ../cli/src/connections.c:1347 ../cli/src/connections.c:1468
+#: ../cli/src/connections.c:1366 ../cli/src/connections.c:1507
+#: ../cli/src/connections.c:1616
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "Chyba: Neznámé připojení: %s."
-#: ../cli/src/connections.c:1382 ../cli/src/devices.c:980
+#: ../cli/src/connections.c:1412 ../cli/src/devices.c:1198
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "Chyba: hodnota časového limitu „%s“ není platná."
-#: ../cli/src/connections.c:1395 ../cli/src/connections.c:1485
+#: ../cli/src/connections.c:1425 ../cli/src/connections.c:1524
+#: ../cli/src/connections.c:1596
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "Chyba: nebylo určeno id nebo uuid."
-#: ../cli/src/connections.c:1415
+#: ../cli/src/connections.c:1453
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "Chyba: Nenalezeno vhodné zařízení: %s."
-#: ../cli/src/connections.c:1417
+#: ../cli/src/connections.c:1455
#, c-format
msgid "Error: No suitable device found."
msgstr "Chyba: Nenalezeno vhodné zařízení."
-#: ../cli/src/connections.c:1512
+#: ../cli/src/connections.c:1560
#, c-format
msgid "Warning: Connection not active\n"
msgstr "Varování: Připojení není aktivní\n"
-#: ../cli/src/connections.c:1569
+#: ../cli/src/connections.c:1661
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "Chyba: příkaz „%s“ není pro „con“ platný."
-#: ../cli/src/connections.c:1605
+#: ../cli/src/connections.c:1726
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "Chyba: nelze se připojit ke sběrnici D-Bus."
-#: ../cli/src/connections.c:1612
+#: ../cli/src/connections.c:1734
#, c-format
msgid "Error: Could not get system settings."
msgstr "Chyba: Nelze získat systémová nastavení."
-#: ../cli/src/connections.c:1620
+#: ../cli/src/connections.c:1744
#, c-format
-msgid "Error: Could not get user settings."
-msgstr "Chyba: Nelze získat uživatelská nastavení."
-
-#: ../cli/src/connections.c:1630
-#, c-format
-msgid "Error: Can't obtain connections: settings services are not running."
+#| msgid "Error: Can't obtain connections: settings services are not running."
+msgid "Error: Can't obtain connections: settings service is not running."
msgstr "Chyba: Nelze získat připojení: služba správy nastavení neběží."
#. 0
#. 9
-#: ../cli/src/devices.c:61 ../cli/src/devices.c:89 ../cli/src/devices.c:184
+#. 3
+#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:212
+#: ../cli/src/devices.c:228
msgid "DEVICE"
msgstr "ZAŘÍZENÍ"
#. 1
#. 4
-#. 0
-#: ../cli/src/devices.c:63 ../cli/src/devices.c:93
-#: ../cli/src/network-manager.c:36
+#. 1
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:106
+#: ../cli/src/network-manager.c:39
msgid "STATE"
msgstr "STAV"
-#: ../cli/src/devices.c:72
+#: ../cli/src/devices.c:78
msgid "GENERAL"
msgstr "OBECNÉ"
#. 0
-#: ../cli/src/devices.c:73
+#: ../cli/src/devices.c:79
msgid "CAPABILITIES"
msgstr "SCHOPNOSTI"
#. 1
-#: ../cli/src/devices.c:74
+#: ../cli/src/devices.c:80
msgid "WIFI-PROPERTIES"
msgstr "VLASTNOSTI-WIFI"
#. 2
-#: ../cli/src/devices.c:75
+#: ../cli/src/devices.c:81
msgid "AP"
msgstr "AP"
#. 3
-#: ../cli/src/devices.c:76
+#: ../cli/src/devices.c:82
msgid "WIRED-PROPERTIES"
msgstr "DRÁTOVÉ-VLASTNOSTI"
#. 4
-#: ../cli/src/devices.c:77
+#: ../cli/src/devices.c:83
+#| msgid "WIFI-PROPERTIES"
+msgid "WIMAX-PROPERTIES"
+msgstr "VLASTNOSTI-WIMAX"
+
+#. 5
+#. 0
+#: ../cli/src/devices.c:84 ../cli/src/devices.c:225
+#| msgid "DNS"
+msgid "NSP"
+msgstr "NSP"
+
+#. 6
+#: ../cli/src/devices.c:85
msgid "IP4-SETTINGS"
msgstr "NASTAVENÍ-IP4"
-#. 5
-#: ../cli/src/devices.c:78
+#. 7
+#: ../cli/src/devices.c:86
msgid "IP4-DNS"
msgstr "DNS-IP4"
-#. 6
-#: ../cli/src/devices.c:79
+#. 8
+#: ../cli/src/devices.c:87
msgid "IP6-SETTINGS"
msgstr "NASTAVENÍ-IP6"
-#. 7
-#: ../cli/src/devices.c:80
+#. 9
+#: ../cli/src/devices.c:88
msgid "IP6-DNS"
msgstr "DNS-IP6"
#. 2
-#: ../cli/src/devices.c:91
+#: ../cli/src/devices.c:104
msgid "DRIVER"
msgstr "OVLADAČ"
#. 3
-#: ../cli/src/devices.c:92
+#: ../cli/src/devices.c:105
msgid "HWADDR"
msgstr "HWADRESA"
#. 0
-#: ../cli/src/devices.c:102
+#: ../cli/src/devices.c:115
msgid "CARRIER-DETECT"
msgstr "DETEKCE-SIGNÁLU"
#. 1
-#: ../cli/src/devices.c:103
+#: ../cli/src/devices.c:116
msgid "SPEED"
msgstr "RYCHLOST"
#. 0
-#: ../cli/src/devices.c:112
+#: ../cli/src/devices.c:125
msgid "CARRIER"
msgstr "SIGNÁL"
#. 0
-#: ../cli/src/devices.c:122
+#: ../cli/src/devices.c:135
msgid "WEP"
msgstr "WEP"
#. 1
-#: ../cli/src/devices.c:123
+#: ../cli/src/devices.c:136
msgid "WPA"
msgstr "WPA"
#. 2
-#: ../cli/src/devices.c:124
+#: ../cli/src/devices.c:137
msgid "WPA2"
msgstr "WPA2"
#. 3
-#: ../cli/src/devices.c:125
+#: ../cli/src/devices.c:138
msgid "TKIP"
msgstr "TKIP"
#. 4
-#: ../cli/src/devices.c:126
+#: ../cli/src/devices.c:139
msgid "CCMP"
msgstr "CCMP"
#. 0
-#: ../cli/src/devices.c:135 ../cli/src/devices.c:146
+#: ../cli/src/devices.c:149
+#| msgid "FREQ"
+msgid "CTR-FREQ"
+msgstr "FREKV-CTR"
+
+#. 1
+#: ../cli/src/devices.c:150
+#| msgid "SSID"
+msgid "RSSI"
+msgstr "RSSI"
+
+#. 2
+#: ../cli/src/devices.c:151
+msgid "CINR"
+msgstr "CINR"
+
+#. 3
+#: ../cli/src/devices.c:152
+msgid "TX-POW"
+msgstr "VYSÍL-VÝKON"
+
+#. 4
+#: ../cli/src/devices.c:153
+#| msgid "BSSID"
+msgid "BSID"
+msgstr "BSID"
+
+#. 0
+#: ../cli/src/devices.c:163 ../cli/src/devices.c:174
msgid "ADDRESS"
msgstr "ADRESA"
#. 1
-#: ../cli/src/devices.c:136 ../cli/src/devices.c:147
+#: ../cli/src/devices.c:164 ../cli/src/devices.c:175
msgid "PREFIX"
msgstr "PREFIX"
#. 2
-#: ../cli/src/devices.c:137 ../cli/src/devices.c:148
+#: ../cli/src/devices.c:165 ../cli/src/devices.c:176
msgid "GATEWAY"
msgstr "BRÁNA"
#. 0
-#: ../cli/src/devices.c:157 ../cli/src/devices.c:166
+#: ../cli/src/devices.c:185 ../cli/src/devices.c:194
msgid "DNS"
msgstr "DNS"
#. 0
-#: ../cli/src/devices.c:175
+#: ../cli/src/devices.c:203
msgid "SSID"
msgstr "SSID"
#. 1
-#: ../cli/src/devices.c:176
+#: ../cli/src/devices.c:204
msgid "BSSID"
msgstr "BSSID"
#. 2
-#: ../cli/src/devices.c:177
+#: ../cli/src/devices.c:205
msgid "MODE"
msgstr "REŽIM"
#. 3
-#: ../cli/src/devices.c:178
+#: ../cli/src/devices.c:206
msgid "FREQ"
msgstr "FREKV"
#. 4
-#: ../cli/src/devices.c:179
+#: ../cli/src/devices.c:207
msgid "RATE"
msgstr "POMĚR"
#. 5
-#: ../cli/src/devices.c:180
+#. 1
+#: ../cli/src/devices.c:208 ../cli/src/devices.c:226
msgid "SIGNAL"
msgstr "SIGNÁL"
#. 6
-#: ../cli/src/devices.c:181
+#: ../cli/src/devices.c:209
msgid "SECURITY"
msgstr "BEZPEČNOST"
#. 7
-#: ../cli/src/devices.c:182
+#: ../cli/src/devices.c:210
msgid "WPA-FLAGS"
msgstr "PŘÍZNAKY-WPA"
#. 8
-#: ../cli/src/devices.c:183
+#: ../cli/src/devices.c:211
msgid "RSN-FLAGS"
msgstr "PŘÍZNAKY-RSN"
#. 10
-#: ../cli/src/devices.c:185
+#. 4
+#: ../cli/src/devices.c:213 ../cli/src/devices.c:229
msgid "ACTIVE"
msgstr "AKTIVNÍ"
-#: ../cli/src/devices.c:208
-#, c-format
+#: ../cli/src/devices.c:246
+#, c-format
+#| msgid ""
+#| "Usage: nmcli dev { COMMAND | help }\n"
+#| "\n"
+#| " COMMAND := { status | list | disconnect | wifi }\n"
+#| "\n"
+#| " status\n"
+#| " list [iface <iface>]\n"
+#| " disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
+#| " wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+#| "\n"
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
"\n"
+" COMMAND := { status | list | disconnect | wifi | wimax }\n"
+"\n"
" COMMAND := { status | list | disconnect | wifi }\n"
"\n"
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
msgstr ""
"Použití: nmcli dev {PŘÍKAZ | help}\n"
"\n"
-" PŘÍKAZ := {status | list | disconnect | wifi}\n"
+" PŘÍKAZ := {status | list | disconnect | wifi | wimax}\n"
"\n"
" status\n"
" list [iface <rozhraní>]\n"
" disconnect iface <rozhraní> [--nowait] [--timeout <časový_limit>]\n"
-" wifi [list [iface <rozhraní>] [hwaddr <hw_adresa>]]\n"
+" wifi [list [iface <rozhraní>] [hwaddr <BSSID>]]\n"
+" wimax [list [iface <rozhraní>] [nsp <název>]]\n"
"\n"
-#: ../cli/src/devices.c:228
+#: ../cli/src/devices.c:274
msgid "unmanaged"
msgstr "není pod správou"
-#: ../cli/src/devices.c:230
+#: ../cli/src/devices.c:276
msgid "unavailable"
msgstr "nedostupné"
-#: ../cli/src/devices.c:232 ../cli/src/network-manager.c:91
+#: ../cli/src/devices.c:278 ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "odpojeno"
-#: ../cli/src/devices.c:234
+#: ../cli/src/devices.c:280
msgid "connecting (prepare)"
msgstr "připojuje se (příprava)"
-#: ../cli/src/devices.c:236
+#: ../cli/src/devices.c:282
msgid "connecting (configuring)"
msgstr "připojuje se (nastavování)"
-#: ../cli/src/devices.c:238
+#: ../cli/src/devices.c:284
msgid "connecting (need authentication)"
msgstr "připojuje se (požadováno ověření)"
-#: ../cli/src/devices.c:240
+#: ../cli/src/devices.c:286
msgid "connecting (getting IP configuration)"
msgstr "připojuje se (získává se nastavení IP)"
-#: ../cli/src/devices.c:242 ../cli/src/network-manager.c:89
+#: ../cli/src/devices.c:288
+#| msgid "connecting (getting IP configuration)"
+msgid "connecting (checking IP connectivity)"
+msgstr "připojuje se (kontroluje se kontektivita IP)"
+
+#: ../cli/src/devices.c:290
+#| msgid "connecting (getting IP configuration)"
+msgid "connecting (starting secondary connections)"
+msgstr "připojuje se (spouští se druhé připojení)"
+
+#: ../cli/src/devices.c:292 ../cli/src/network-manager.c:104
msgid "connected"
msgstr "připojeno"
-#: ../cli/src/devices.c:244
+#: ../cli/src/devices.c:296
msgid "connection failed"
msgstr "připojení se nezdařilo"
-#: ../cli/src/devices.c:267 ../cli/src/devices.c:424
+#: ../cli/src/devices.c:321 ../cli/src/devices.c:331 ../cli/src/devices.c:491
+#: ../cli/src/devices.c:535
msgid "Unknown"
msgstr "Neznámý"
-#: ../cli/src/devices.c:299
+#: ../cli/src/devices.c:364
msgid "(none)"
msgstr "(nic)"
-#: ../cli/src/devices.c:324
+#: ../cli/src/devices.c:389
#, c-format
msgid "%s: error converting IP4 address 0x%X"
msgstr "%s: chyba převodu adresy IP4 0x%X"
-#: ../cli/src/devices.c:393
+#: ../cli/src/devices.c:460
#, c-format
msgid "%u MHz"
msgstr "%u MHz"
-#: ../cli/src/devices.c:394
+#: ../cli/src/devices.c:461
#, c-format
msgid "%u MB/s"
msgstr "%u MB/s"
-#: ../cli/src/devices.c:403
+#: ../cli/src/devices.c:470
msgid "Encrypted: "
msgstr "Šifrováno: "
-#: ../cli/src/devices.c:408
+#: ../cli/src/devices.c:475
msgid "WEP "
msgstr "WEP "
-#: ../cli/src/devices.c:410
+#: ../cli/src/devices.c:477
msgid "WPA "
msgstr "WPA "
-#: ../cli/src/devices.c:412
+#: ../cli/src/devices.c:479
msgid "WPA2 "
msgstr "WPA2 "
-#: ../cli/src/devices.c:415
+#: ../cli/src/devices.c:482
msgid "Enterprise "
msgstr "Podnikové "
-#: ../cli/src/devices.c:424
+#: ../cli/src/devices.c:491
msgid "Ad-Hoc"
msgstr "Ad-Hoc"
-#: ../cli/src/devices.c:424
+#: ../cli/src/devices.c:491
msgid "Infrastructure"
msgstr "Infrastruktura"
-#: ../cli/src/devices.c:486
+#: ../cli/src/devices.c:526
+msgid "Home"
+msgstr "Domácí"
+
+#: ../cli/src/devices.c:529
+#| msgid "AP parameters"
+msgid "Partner"
+msgstr "Partner"
+
+#: ../cli/src/devices.c:532
+msgid "Roaming"
+msgstr "Cestovní"
+
+#: ../cli/src/devices.c:602
#, c-format
msgid "Error: 'dev list': %s"
msgstr "Chyba: „dev list“: %s"
-#: ../cli/src/devices.c:488
+#: ../cli/src/devices.c:604
#, c-format
msgid "Error: 'dev list': %s; allowed fields: %s"
msgstr "Chyba: „dev list“: %s; povolená pole: %s"
-#: ../cli/src/devices.c:497
+#: ../cli/src/devices.c:613
msgid "Device details"
msgstr "Detaily zařízení"
-#: ../cli/src/devices.c:527 ../cli/src/devices.c:925
+#: ../cli/src/devices.c:647 ../cli/src/devices.c:648 ../cli/src/devices.c:1142
+#: ../cli/src/utils.c:343
msgid "(unknown)"
msgstr "(neznámo)"
-#: ../cli/src/devices.c:528
-msgid "unknown)"
-msgstr "neznámé)"
-
-#: ../cli/src/devices.c:554
+#: ../cli/src/devices.c:674
#, c-format
msgid "%u Mb/s"
msgstr "%u Mb/s"
#. Print header
#. "WIRED-PROPERTIES"
-#: ../cli/src/devices.c:627
+#: ../cli/src/devices.c:747
msgid "on"
msgstr "zapnut"
-#: ../cli/src/devices.c:627
+#: ../cli/src/devices.c:747
msgid "off"
msgstr "vypnut"
-#: ../cli/src/devices.c:808
+#: ../cli/src/devices.c:994
#, c-format
msgid "Error: 'dev status': %s"
msgstr "Chyba: „dev status“: %s"
-#: ../cli/src/devices.c:810
+#: ../cli/src/devices.c:996
#, c-format
msgid "Error: 'dev status': %s; allowed fields: %s"
msgstr "Chyba: „dev status“: %s; povolená pole: %s"
-#: ../cli/src/devices.c:817
+#: ../cli/src/devices.c:1019
msgid "Status of devices"
msgstr "Stav zařízení"
-#: ../cli/src/devices.c:845
+#: ../cli/src/devices.c:1050
#, c-format
msgid "Error: '%s' argument is missing."
msgstr "Chyba: schází argument „%s“."
-#: ../cli/src/devices.c:874 ../cli/src/devices.c:1013
-#: ../cli/src/devices.c:1136
+#: ../cli/src/devices.c:1091 ../cli/src/devices.c:1243
+#: ../cli/src/devices.c:1380 ../cli/src/devices.c:1599
#, c-format
msgid "Error: Device '%s' not found."
-msgstr "Chyba: Zařízení „%s“ nenalezeno."
+msgstr "Chyba: Zařízení „%s“ nebylo nalezeno."
-#: ../cli/src/devices.c:897
+#: ../cli/src/devices.c:1114
#, c-format
msgid "Success: Device '%s' successfully disconnected."
msgstr "Úspěch: Zařízení „%s“ úspěšně odpojeno."
-#: ../cli/src/devices.c:922
+#: ../cli/src/devices.c:1139
#, c-format
msgid "Error: Device '%s' (%s) disconnecting failed: %s"
msgstr "Chyba: Odpojení zařízení „%s“ (%s) selhalo: %s"
-#: ../cli/src/devices.c:930
+#: ../cli/src/devices.c:1147
#, c-format
msgid "Device state: %d (%s)\n"
msgstr "Stav zařízení: %d (%s)\n"
-#: ../cli/src/devices.c:994
+#: ../cli/src/devices.c:1212
#, c-format
msgid "Error: iface has to be specified."
msgstr "Chyba: nebylo určeno rozhraní."
-#: ../cli/src/devices.c:1112
+#: ../cli/src/devices.c:1338
#, c-format
msgid "Error: 'dev wifi': %s"
msgstr "Chyba: „dev wifi“: %s"
-#: ../cli/src/devices.c:1114
+#: ../cli/src/devices.c:1340
#, c-format
msgid "Error: 'dev wifi': %s; allowed fields: %s"
msgstr "Chyba: „dev wifi“: %s; povolená pole: %s"
-#: ../cli/src/devices.c:1121
+#: ../cli/src/devices.c:1363
msgid "WiFi scan list"
msgstr "Seznam prohledání WiFi"
-#: ../cli/src/devices.c:1156 ../cli/src/devices.c:1210
+#: ../cli/src/devices.c:1400 ../cli/src/devices.c:1454
#, c-format
-msgid "Error: Access point with hwaddr '%s' not found."
-msgstr "Chyba: Přístupový bod s hardwarovou adresou „%s“ nenalezen."
+#| msgid "Error: Access point with hwaddr '%s' not found."
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "Chyba: Přístupový bod s BSSID „%s“ nebyl nalezen."
-#: ../cli/src/devices.c:1173
+#: ../cli/src/devices.c:1417
#, c-format
msgid "Error: Device '%s' is not a WiFi device."
msgstr "Chyba: Zařízení „%s“ není zařízení WiFi."
-#: ../cli/src/devices.c:1237
+#: ../cli/src/devices.c:1481
#, c-format
msgid "Error: 'dev wifi' command '%s' is not valid."
msgstr "Chyba: příkaz „%s“ není pro „dev wifi“ platný."
-#: ../cli/src/devices.c:1284
+#: ../cli/src/devices.c:1557
+#, c-format
+#| msgid "Error: 'dev wifi': %s"
+msgid "Error: 'dev wimax': %s"
+msgstr "Chyba: „dev wimax“: %s"
+
+#: ../cli/src/devices.c:1559
+#, c-format
+#| msgid "Error: 'dev wifi': %s; allowed fields: %s"
+msgid "Error: 'dev wimax': %s; allowed fields: %s"
+msgstr "Chyba: „dev wimax“: %s; povolená pole: %s"
+
+#: ../cli/src/devices.c:1582
+msgid "WiMAX NSP list"
+msgstr "Seznam WiMAX NSP"
+
+#: ../cli/src/devices.c:1619
+#, c-format
+#| msgid "Error: Device '%s' not found."
+msgid "Error: NSP with name '%s' not found."
+msgstr "Chyba: NSP s názvem „%s“ nebylo nalezeno."
+
+#: ../cli/src/devices.c:1630
+#, c-format
+#| msgid "Error: Device '%s' is not a WiFi device."
+msgid "Error: Device '%s' is not a WiMAX device."
+msgstr "Chyba: Zařízení „%s“ není zařízení WiMAX."
+
+#: ../cli/src/devices.c:1661
+#, c-format
+#| msgid "Error: Access point with hwaddr '%s' not found."
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "Chyba: Přístupový bod s NSP „%s“ nebyl nalezen."
+
+#: ../cli/src/devices.c:1688
+#, c-format
+#| msgid "Error: 'dev wifi' command '%s' is not valid."
+msgid "Error: 'dev wimax' command '%s' is not valid."
+msgstr "Chyba: příkaz „%s“ není pro „dev wimax“ platný."
+
+#: ../cli/src/devices.c:1738
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "Chyba: příkaz „%s“ není pro „dev“ platný."
-#: ../cli/src/network-manager.c:35
+#: ../cli/src/network-manager.c:37
msgid "RUNNING"
msgstr "BĚŽÍCÍ"
-#. 1
-#: ../cli/src/network-manager.c:37
+#. 0
+#: ../cli/src/network-manager.c:38
+msgid "VERSION"
+msgstr "VERZE"
+
+#. 2
+#: ../cli/src/network-manager.c:40
msgid "NET-ENABLED"
msgstr "SÍŤ-POVOLENA"
-#. 2
-#: ../cli/src/network-manager.c:38
+#. 3
+#: ../cli/src/network-manager.c:41
msgid "WIFI-HARDWARE"
msgstr "WIFI-HARDWARE"
-#. 3
-#: ../cli/src/network-manager.c:39
+#. 4
+#: ../cli/src/network-manager.c:42
msgid "WIFI"
msgstr "WIFI"
-#. 4
-#: ../cli/src/network-manager.c:40
+#. 5
+#: ../cli/src/network-manager.c:43
msgid "WWAN-HARDWARE"
msgstr "WWAN-HARDWARE"
-#. 5
-#: ../cli/src/network-manager.c:41
+#. 6
+#: ../cli/src/network-manager.c:44
msgid "WWAN"
msgstr "WWAN"
-#: ../cli/src/network-manager.c:64
-#, c-format
+#. 7
+#: ../cli/src/network-manager.c:45
+#| msgid "WIFI-HARDWARE"
+msgid "WIMAX-HARDWARE"
+msgstr "WIMAX-HARDWARE"
+
+#. 8
+#: ../cli/src/network-manager.c:46
+msgid "WIMAX"
+msgstr "WIMAX"
+
+#: ../cli/src/network-manager.c:67
+#, c-format
+#| msgid ""
+#| "Usage: nmcli nm { COMMAND | help }\n"
+#| "\n"
+#| " COMMAND := { status | enable | sleep | wifi | wwan }\n"
+#| "\n"
+#| " status\n"
+#| " enable [true|false]\n"
+#| " sleep [true|false]\n"
+#| " wifi [on|off]\n"
+#| " wwan [on|off]\n"
+#| "\n"
msgid ""
"Usage: nmcli nm { COMMAND | help }\n"
"\n"
+" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n"
+"\n"
" COMMAND := { status | enable | sleep | wifi | wwan }\n"
"\n"
" status\n"
@@ -900,130 +1088,180 @@ msgid ""
" sleep [true|false]\n"
" wifi [on|off]\n"
" wwan [on|off]\n"
+" wimax [on|off]\n"
"\n"
msgstr ""
"Použití: nmcli nm { PŘÍKAZ | help}\n"
"\n"
-" PŘÍKAZ := {status | enable | sleep | wifi | wwan}\n"
+" PŘÍKAZ := {status | enable | sleep | wifi | wwan | wimax}\n"
"\n"
" status\n"
" enable [true|false]\n"
" sleep [true|false]\n"
" wifi [on|off]\n"
" wwan [on|off]\n"
+" wimax [on|off]\n"
"\n"
-#: ../cli/src/network-manager.c:85
+#: ../cli/src/network-manager.c:96
msgid "asleep"
msgstr "uspán"
-#: ../cli/src/network-manager.c:87
+#: ../cli/src/network-manager.c:98
msgid "connecting"
msgstr "připojuje se"
-#: ../cli/src/network-manager.c:128
+#: ../cli/src/network-manager.c:100
+msgid "connected (local only)"
+msgstr "připojeno (jen místně)"
+
+#: ../cli/src/network-manager.c:102
+#| msgid "connected"
+msgid "connected (site only)"
+msgstr "připojeno (pouze k serveru)"
+
+#: ../cli/src/network-manager.c:106
+#| msgid "connecting"
+msgid "disconnecting"
+msgstr "odpojuje se"
+
+#: ../cli/src/network-manager.c:146
#, c-format
msgid "Error: 'nm status': %s"
msgstr "Chyba: „nm status“: %s"
-#: ../cli/src/network-manager.c:130
+#: ../cli/src/network-manager.c:148
#, c-format
msgid "Error: 'nm status': %s; allowed fields: %s"
msgstr "Chyba: „nm status“: %s; povolená pole: %s"
-#: ../cli/src/network-manager.c:137
-msgid "NetworkManager status"
-msgstr "Stav správce sítě NetworkManager"
-
-#. Print header
-#: ../cli/src/network-manager.c:144 ../cli/src/network-manager.c:145
-#: ../cli/src/network-manager.c:146 ../cli/src/network-manager.c:147
-#: ../cli/src/network-manager.c:154 ../cli/src/network-manager.c:247
-#: ../cli/src/network-manager.c:296 ../cli/src/network-manager.c:328
+#. create NMClient
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "enabled"
msgstr "povoleno"
-#: ../cli/src/network-manager.c:144 ../cli/src/network-manager.c:145
-#: ../cli/src/network-manager.c:146 ../cli/src/network-manager.c:147
-#: ../cli/src/network-manager.c:154 ../cli/src/network-manager.c:247
-#: ../cli/src/network-manager.c:296 ../cli/src/network-manager.c:328
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "disabled"
msgstr "zakázáno"
-#: ../cli/src/network-manager.c:152
+#: ../cli/src/network-manager.c:181
+msgid "NetworkManager status"
+msgstr "Stav správce sítě NetworkManager"
+
+#. Print header
+#: ../cli/src/network-manager.c:184
msgid "running"
msgstr "běží"
-#: ../cli/src/network-manager.c:152
+#: ../cli/src/network-manager.c:184
msgid "not running"
msgstr "neběží"
-#: ../cli/src/network-manager.c:175
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:323
#, c-format
msgid "Error: Couldn't connect to system bus: %s"
msgstr "Chyba: Nelze se připojit k systémové sběrnici: %s"
-#: ../cli/src/network-manager.c:186
+#: ../cli/src/network-manager.c:226
#, c-format
msgid "Error: Couldn't create D-Bus object proxy."
msgstr "Chyba: Nelze vytvořit proxy objekt D-Bus."
-#: ../cli/src/network-manager.c:192
+#: ../cli/src/network-manager.c:232
#, c-format
msgid "Error in sleep: %s"
msgstr "Chyba při uspání: %s"
-#: ../cli/src/network-manager.c:237 ../cli/src/network-manager.c:286
-#: ../cli/src/network-manager.c:318
+#: ../cli/src/network-manager.c:276 ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369 ../cli/src/network-manager.c:408
#, c-format
msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
msgstr ""
"Chyba: hodnota „%s“ přepínače „--fields“ je zde neplatná; povolená pole: %s"
-#: ../cli/src/network-manager.c:245
+#: ../cli/src/network-manager.c:284
msgid "Networking enabled"
msgstr "Síť povolena"
-#: ../cli/src/network-manager.c:256
+#: ../cli/src/network-manager.c:300
#, c-format
msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
msgstr "Chyba: neplatný parametr „enable“: „%s“; použijte „true“ nebo „false“."
-#: ../cli/src/network-manager.c:265
+#: ../cli/src/network-manager.c:310
#, c-format
msgid "Error: Sleeping status is not exported by NetworkManager."
msgstr "Chyba: Network Manager neexportuje stav uspání."
-#: ../cli/src/network-manager.c:273
+#: ../cli/src/network-manager.c:318
#, c-format
msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
msgstr "Chyba: neplatný parametr „sleep“: „%s“; použijte „true“ nebo „false“."
-#: ../cli/src/network-manager.c:294
+#: ../cli/src/network-manager.c:339
msgid "WiFi enabled"
msgstr "WiFi povoleno"
-#: ../cli/src/network-manager.c:305
+#: ../cli/src/network-manager.c:355
#, c-format
msgid "Error: invalid 'wifi' parameter: '%s'."
msgstr "Chyba: neplatný parametr pro „wifi“: „%s“."
-#: ../cli/src/network-manager.c:326
+#: ../cli/src/network-manager.c:377
msgid "WWAN enabled"
msgstr "WWAN povoleno"
-#: ../cli/src/network-manager.c:337
+#: ../cli/src/network-manager.c:393
#, c-format
msgid "Error: invalid 'wwan' parameter: '%s'."
msgstr "Chyba: neplatný parametr pro „wwan“: „%s“."
-#: ../cli/src/network-manager.c:348
+#: ../cli/src/network-manager.c:416
+#| msgid "WiFi enabled"
+msgid "WiMAX enabled"
+msgstr "WiMAX povoleno"
+
+#: ../cli/src/network-manager.c:432
+#, c-format
+#| msgid "Error: invalid 'wifi' parameter: '%s'."
+msgid "Error: invalid 'wimax' parameter: '%s'."
+msgstr "Chyba: neplatný parametr pro „wimax“: „%s“."
+
+#: ../cli/src/network-manager.c:445
#, c-format
msgid "Error: 'nm' command '%s' is not valid."
msgstr "Chyba: příkaz „%s“ není pro „nm“ platný."
-#: ../cli/src/nmcli.c:69
-#, c-format
+#: ../cli/src/nmcli.c:64
+#, c-format
+#| msgid ""
+#| "Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
+#| "\n"
+#| "OPTIONS\n"
+#| " -t[erse] terse output\n"
+#| " -p[retty] pretty output\n"
+#| " -m[ode] tabular|multiline output mode\n"
+#| " -f[ields] <field1,field2,...>|all|common specify fields to output\n"
+#| " -e[scape] yes|no escape columns separators in "
+#| "values\n"
+#| " -v[ersion] show program version\n"
+#| " -h[elp] print this help\n"
+#| "\n"
+#| "OBJECT\n"
+#| " nm NetworkManager status\n"
+#| " con NetworkManager connections\n"
+#| " dev devices managed by NetworkManager\n"
+#| "\n"
msgid ""
"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
"\n"
@@ -1034,6 +1272,8 @@ msgid ""
" -f[ields] <field1,field2,...>|all|common specify fields to output\n"
" -e[scape] yes|no escape columns separators in "
"values\n"
+" -n[ocheck] don't check nmcli and "
+"NetworkManager versions\n"
" -v[ersion] show program version\n"
" -h[elp] print this help\n"
"\n"
@@ -1051,569 +1291,634 @@ msgstr ""
" -m[ode] tabular|multiline režim výstupu\n"
" -f[ields] <field1,field2,...>|all|common specifikace polí výstupu\n"
" -e[scape] yes|no oddělovače sloupců v hodnotách\n"
+" -n[ocheck] nekontrolovat verze programů "
+"nmcli a NetworkManager\n"
" -v[ersion] zobrazit verzi programu\n"
" -h[elp] zobrazit tuto nápovědu\n"
"\n"
"OBJEKT\n"
-" nm stav NetworkManageru\n"
-" con připojení NetworkManageru\n"
-" dev zařízení spravovaná NetworkManagerem\n"
+" nm stav programu NetworkManager\n"
+" con připojení v programu NetworkManager\n"
+" dev zařízení spravovaná programem NetworkManager\n"
"\n"
-#: ../cli/src/nmcli.c:113
+#: ../cli/src/nmcli.c:109
#, c-format
msgid "Error: Object '%s' is unknown, try 'nmcli help'."
msgstr "Chyba: Objekt „%s“ je neznámý, zkuste „nmcli help“."
-#: ../cli/src/nmcli.c:143
+#: ../cli/src/nmcli.c:139
#, c-format
msgid "Error: Option '--terse' is specified the second time."
msgstr "Chyba: Přepínač „--terse“ je specifikován dvakrát."
-#: ../cli/src/nmcli.c:148
+#: ../cli/src/nmcli.c:144
#, c-format
msgid "Error: Option '--terse' is mutually exclusive with '--pretty'."
msgstr "Chyba: Přepínač „--terse“ je vzájemně neslučitelný s „--pretty“."
-#: ../cli/src/nmcli.c:156
+#: ../cli/src/nmcli.c:152
#, c-format
msgid "Error: Option '--pretty' is specified the second time."
msgstr "Chyba: Přepínač „--pretty“ je specifikován dvakrát."
-#: ../cli/src/nmcli.c:161
+#: ../cli/src/nmcli.c:157
#, c-format
msgid "Error: Option '--pretty' is mutually exclusive with '--terse'."
msgstr "Chyba: Přepínač „--pretty“ je vzájemně neslučitelný s „--terse“."
-#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187
+#: ../cli/src/nmcli.c:167 ../cli/src/nmcli.c:183
#, c-format
msgid "Error: missing argument for '%s' option."
msgstr "Chyba: Chybí argument pro přepínač „%s“."
-#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196
+#: ../cli/src/nmcli.c:176 ../cli/src/nmcli.c:192
#, c-format
msgid "Error: '%s' is not valid argument for '%s' option."
msgstr "Chyba: „%s“ je neplatný argument pro přepínač „%s“."
-#: ../cli/src/nmcli.c:203
+#: ../cli/src/nmcli.c:199
#, c-format
msgid "Error: fields for '%s' options are missing."
msgstr "Chyba: pole pro přepínače „%s“ chybí."
-#: ../cli/src/nmcli.c:209
+#: ../cli/src/nmcli.c:207
#, c-format
msgid "nmcli tool, version %s\n"
msgstr "nástroj nmcli, verze %s\n"
-#: ../cli/src/nmcli.c:215
+#: ../cli/src/nmcli.c:213
#, c-format
msgid "Error: Option '%s' is unknown, try 'nmcli -help'."
msgstr "Chyba: Přepínač „%s“ je neznámý, zkuste „nmcli -help“."
-#: ../cli/src/nmcli.c:234
+#: ../cli/src/nmcli.c:232
#, c-format
msgid "Caught signal %d, shutting down..."
msgstr "Zachycen signál %d, vypíná se…"
-#: ../cli/src/nmcli.c:259
-#, c-format
-msgid "Error: Could not connect to NetworkManager."
-msgstr "Chyba: Nelze se připojit ke správci sítě NetworkManager."
+#: ../cli/src/nmcli.c:257
+#| msgid "Error: Couldn't create D-Bus object proxy."
+msgid "Error: Could not create NMClient object."
+msgstr "Chyba: Nelze vytvořit objekt NMClient."
-#: ../cli/src/nmcli.c:275
+#: ../cli/src/nmcli.c:273
msgid "Success"
msgstr "Úspěch"
-#: ../cli/src/settings.c:411
+#: ../cli/src/settings.c:447
#, c-format
msgid "%d (hex-ascii-key)"
msgstr "%d (hex-ascii-klíč)"
-#: ../cli/src/settings.c:413
+#: ../cli/src/settings.c:449
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (104/128bitové heslo)"
-#: ../cli/src/settings.c:416
+#: ../cli/src/settings.c:452
#, c-format
msgid "%d (unknown)"
msgstr "%d (neznámé)"
-#: ../cli/src/settings.c:442
+#: ../cli/src/settings.c:478
msgid "0 (unknown)"
msgstr "0 (neznámé)"
-#: ../cli/src/settings.c:448
+#: ../cli/src/settings.c:484
msgid "any, "
msgstr "jakékoliv, "
-#: ../cli/src/settings.c:450
+#: ../cli/src/settings.c:486
msgid "900 MHz, "
msgstr "900 MHz, "
-#: ../cli/src/settings.c:452
+#: ../cli/src/settings.c:488
msgid "1800 MHz, "
msgstr "1800 MHz, "
-#: ../cli/src/settings.c:454
+#: ../cli/src/settings.c:490
msgid "1900 MHz, "
msgstr "1900 MHz, "
-#: ../cli/src/settings.c:456
+#: ../cli/src/settings.c:492
msgid "850 MHz, "
msgstr "850 MHz, "
-#: ../cli/src/settings.c:458
+#: ../cli/src/settings.c:494
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 MHz, "
-#: ../cli/src/settings.c:460
+#: ../cli/src/settings.c:496
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 MHz, "
-#: ../cli/src/settings.c:462
+#: ../cli/src/settings.c:498
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
-#: ../cli/src/settings.c:464
+#: ../cli/src/settings.c:500
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 MHz, "
-#: ../cli/src/settings.c:466
+#: ../cli/src/settings.c:502
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 MHz, "
-#: ../cli/src/settings.c:468
+#: ../cli/src/settings.c:504
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 MHz, "
-#: ../cli/src/settings.c:470
+#: ../cli/src/settings.c:506
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 MHz, "
-#: ../cli/src/settings.c:554 ../cli/src/settings.c:721
+#: ../cli/src/settings.c:508
+#| msgid "WCDMA 3GPP UMTS 900 MHz, "
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 1900 MHz, "
+
+#: ../cli/src/settings.c:510
+#| msgid "WCDMA 3GPP UMTS 2100 MHz, "
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2600 MHz, "
+
+#: ../cli/src/settings.c:636 ../cli/src/settings.c:835
msgid "auto"
msgstr "automaticky"
-#: ../cli/src/settings.c:716 ../cli/src/settings.c:719
-#: ../cli/src/settings.c:720 ../cli/src/utils.c:172
+#: ../cli/src/settings.c:829 ../cli/src/settings.c:832
+#: ../cli/src/settings.c:833 ../cli/src/utils.c:176
msgid "not set"
msgstr "nenastaveno"
-#: ../cli/src/utils.c:124
+#: ../cli/src/utils.c:128
#, c-format
msgid "field '%s' has to be alone"
msgstr "pole „%s“ musí být samo"
-#: ../cli/src/utils.c:127
+#: ../cli/src/utils.c:131
#, c-format
msgid "invalid field '%s'"
msgstr "neplatné pole „%s“"
-#: ../cli/src/utils.c:146
+#: ../cli/src/utils.c:150
#, c-format
msgid "Option '--terse' requires specifying '--fields'"
msgstr "Přepínač „--terse“ vyžaduje určení „--fields“"
-#: ../cli/src/utils.c:150
+#: ../cli/src/utils.c:154
#, c-format
msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
msgstr ""
"Přepínač „--terse“ vyžaduje určité hodnoty přepínače „--fields“, ne „%s“"
-#: ../libnm-util/crypto.c:120
+#: ../cli/src/utils.c:334
+#, c-format
+#| msgid "Error: Couldn't create D-Bus object proxy."
+msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
+msgstr "Chyba: Nelze vytvořit proxy objekt D-Bus pro org.freedesktop.DBus"
+
+#: ../cli/src/utils.c:342
+#, c-format
+msgid "Error: NameHasOwner request failed: %s"
+msgstr "Chyba: selhal požadavek NameHasOwner: %s"
+
+#: ../cli/src/utils.c:387
+#, c-format
+msgid ""
+"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
+"nocheck to suppress the warning.\n"
+msgstr ""
+"Varování: verze programů nmcli (%s) a NetworkManager (%s) si neodpovídají. "
+"Pro potlačení varování použijte --nocheck.\n"
+
+#: ../cli/src/utils.c:396
+#, c-format
+msgid ""
+"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
+"execution using --nocheck, but the results are unpredictable."
+msgstr ""
+"Varování: verze programů nmcli (%s) a NetworkManager (%s) si neodpovídají. "
+"Pro spuštění použijte --nocheck, ale může dojít k nepředvídatelnému chování."
+
+#: ../libnm-util/crypto.c:133
#, c-format
msgid "PEM key file had no end tag '%s'."
msgstr "Soubor klíče PEM neměl koncovou značku „%s“."
-#: ../libnm-util/crypto.c:130
+#: ../libnm-util/crypto.c:146
#, c-format
msgid "Doesn't look like a PEM private key file."
msgstr "Nevypadá jako soubor soukromého klíče PEM."
-#: ../libnm-util/crypto.c:138
+#: ../libnm-util/crypto.c:154
#, c-format
msgid "Not enough memory to store PEM file data."
msgstr "Není dostatek paměti pro uložení dat souboru PEM."
-#: ../libnm-util/crypto.c:154
+#: ../libnm-util/crypto.c:170
#, c-format
msgid "Malformed PEM file: Proc-Type was not first tag."
msgstr "Vadný soubor PEM: značka Proc-Type nebyla první značkou."
-#: ../libnm-util/crypto.c:162
+#: ../libnm-util/crypto.c:178
#, c-format
msgid "Malformed PEM file: unknown Proc-Type tag '%s'."
msgstr "Vadný soubor PEM: neznámá značka Proc-Type „%s“."
-#: ../libnm-util/crypto.c:172
+#: ../libnm-util/crypto.c:188
#, c-format
msgid "Malformed PEM file: DEK-Info was not the second tag."
msgstr "Vadný soubor PEM: značka DEK-Info nebyla druhou značkou."
-#: ../libnm-util/crypto.c:183
+#: ../libnm-util/crypto.c:199
#, c-format
msgid "Malformed PEM file: no IV found in DEK-Info tag."
msgstr "Vadný soubor PEM: nebyl nalezen IV ve značce DEK-Info."
-#: ../libnm-util/crypto.c:190
+#: ../libnm-util/crypto.c:206
#, c-format
msgid "Malformed PEM file: invalid format of IV in DEK-Info tag."
msgstr "Vadný soubor PEM: neplatný formát IV ve značce DEK-Info."
-#: ../libnm-util/crypto.c:203
+#: ../libnm-util/crypto.c:219
#, c-format
msgid "Malformed PEM file: unknown private key cipher '%s'."
msgstr "Vadný soubor PEM: neznámá šifra soukromého klíče „%s“."
-#: ../libnm-util/crypto.c:222
+#: ../libnm-util/crypto.c:238
#, c-format
msgid "Could not decode private key."
msgstr "Nelze dekódovat soukromý klíč."
-#: ../libnm-util/crypto.c:267
-#, c-format
-msgid "PEM certificate '%s' had no end tag '%s'."
-msgstr "Certifikát PEM „%s“ nemá koncovou značku „%s“."
+#: ../libnm-util/crypto.c:284
+msgid "Failed to find expected PKCS#8 start tag."
+msgstr "Selhalo vyhledání očekávané počáteční značky PKCS#8."
-#: ../libnm-util/crypto.c:277
+#: ../libnm-util/crypto.c:292
#, c-format
-msgid "Failed to decode certificate."
-msgstr "Selhalo dekódování certifikátu."
+msgid "Failed to find expected PKCS#8 end tag '%s'."
+msgstr "Selhalo vyhledání očekávané koncové značky „%s“ PKCS#8."
+
+#: ../libnm-util/crypto.c:312
+#| msgid "Not enough memory to store file data."
+msgid "Not enough memory to store private key data."
+msgstr "Nedostatek paměti k uchování dat soukromého klíče."
-#: ../libnm-util/crypto.c:286
+#: ../libnm-util/crypto.c:317
+#| msgid "Failed to decrypt the private key."
+msgid "Failed to decode PKCS#8 private key."
+msgstr "Selhalo dešifrování soukromého klíče PKCS#8."
+
+#: ../libnm-util/crypto.c:339 ../libnm-util/crypto.c:625
#, c-format
msgid "Not enough memory to store certificate data."
msgstr "Nedostatek paměti pro uložení dat certifikátu."
-#: ../libnm-util/crypto.c:294
-#, c-format
-msgid "Not enough memory to store file data."
-msgstr "Nedostatek paměti na uložení dat souboru."
-
-#: ../libnm-util/crypto.c:324
+#: ../libnm-util/crypto.c:365
#, c-format
msgid "IV must be an even number of bytes in length."
msgstr "IV musí mít na délku sudý počet bajtů."
-#: ../libnm-util/crypto.c:333
+#: ../libnm-util/crypto.c:374
#, c-format
msgid "Not enough memory to store the IV."
msgstr "Nedostatek paměti pro uložení IV."
-#: ../libnm-util/crypto.c:344
+#: ../libnm-util/crypto.c:385
#, c-format
msgid "IV contains non-hexadecimal digits."
msgstr "IV obsahuje jiné než šestnáctkové číslice."
-#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148
-#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171
-#: ../libnm-util/crypto_nss.c:336
+#: ../libnm-util/crypto.c:423 ../libnm-util/crypto_gnutls.c:147
+#: ../libnm-util/crypto_gnutls.c:265 ../libnm-util/crypto_nss.c:167
+#: ../libnm-util/crypto_nss.c:332
#, c-format
msgid "Private key cipher '%s' was unknown."
msgstr "Šifra soukromého klíče „%s“ je neznámá."
-#: ../libnm-util/crypto.c:391
+#: ../libnm-util/crypto.c:432
#, c-format
msgid "Not enough memory to decrypt private key."
msgstr "Nedostatek paměti pro dešifrování soukromého klíče."
-#: ../libnm-util/crypto.c:511
+#: ../libnm-util/crypto.c:497
+#, c-format
+msgid "Not enough memory to store decrypted private key."
+msgstr "Nedostatek paměti pro uložení dešifrovaného soukromého klíče."
+
+#: ../libnm-util/crypto.c:542
#, c-format
msgid "Unable to determine private key type."
msgstr "Nelze určit typ soukromého klíče."
-#: ../libnm-util/crypto.c:530
+#: ../libnm-util/crypto.c:597
#, c-format
-msgid "Not enough memory to store decrypted private key."
-msgstr "Nedostatek paměti pro uložení dešifrovaného soukromého klíče."
+#| msgid "PEM certificate '%s' had no end tag '%s'."
+msgid "PEM certificate had no start tag '%s'."
+msgstr "Certifikát PEM nemá počáteční značku „%s“."
-#: ../libnm-util/crypto_gnutls.c:49
+#: ../libnm-util/crypto.c:606
+#, c-format
+#| msgid "PEM certificate '%s' had no end tag '%s'."
+msgid "PEM certificate had no end tag '%s'."
+msgstr "Certifikát PEM nemá koncovou značku „%s“."
+
+#: ../libnm-util/crypto.c:630
+#, c-format
+msgid "Failed to decode certificate."
+msgstr "Selhalo dekódování certifikátu."
+
+#: ../libnm-util/crypto_gnutls.c:50
msgid "Failed to initialize the crypto engine."
msgstr "Selhala inicializace šifrovacího programu."
-#: ../libnm-util/crypto_gnutls.c:93
+#: ../libnm-util/crypto_gnutls.c:92
#, c-format
msgid "Failed to initialize the MD5 engine: %s / %s."
msgstr "Selhala inicializace programu pro MD5: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:156
+#: ../libnm-util/crypto_gnutls.c:155
#, c-format
msgid "Invalid IV length (must be at least %zd)."
msgstr "Neplatná délka IV (musí být nejméně %zd)."
-#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188
+#: ../libnm-util/crypto_gnutls.c:164 ../libnm-util/crypto_nss.c:184
#, c-format
msgid "Not enough memory for decrypted key buffer."
msgstr "Nedostatek paměti pro vyrovnávací paměť dešifrovaného klíče."
-#: ../libnm-util/crypto_gnutls.c:173
+#: ../libnm-util/crypto_gnutls.c:172
#, c-format
msgid "Failed to initialize the decryption cipher context: %s / %s."
msgstr "Selhala inicializace kontextu dešifrovací šifry: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:182
+#: ../libnm-util/crypto_gnutls.c:181
#, c-format
msgid "Failed to set symmetric key for decryption: %s / %s."
msgstr "Selhalo nastavení symetrického klíče pro dešifrování: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:191
+#: ../libnm-util/crypto_gnutls.c:190
#, c-format
msgid "Failed to set IV for decryption: %s / %s."
msgstr "Selhalo nastavení IV pro dekódování: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:200
+#: ../libnm-util/crypto_gnutls.c:199
#, c-format
msgid "Failed to decrypt the private key: %s / %s."
msgstr "Selhalo dekódování soukromého klíče: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267
+#: ../libnm-util/crypto_gnutls.c:209 ../libnm-util/crypto_nss.c:263
#, c-format
msgid "Failed to decrypt the private key: unexpected padding length."
msgstr "Selhalo dešifrování soukromého klíče: neočekávané zarovnání délky."
-#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278
+#: ../libnm-util/crypto_gnutls.c:220 ../libnm-util/crypto_nss.c:274
#, c-format
msgid "Failed to decrypt the private key."
msgstr "Selhalo dešifrování soukromého klíče."
-#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356
+#: ../libnm-util/crypto_gnutls.c:285 ../libnm-util/crypto_nss.c:352
#, c-format
msgid "Could not allocate memory for encrypting."
msgstr "Nelze alokovat paměť pro šifrování."
-#: ../libnm-util/crypto_gnutls.c:294
+#: ../libnm-util/crypto_gnutls.c:293
#, c-format
msgid "Failed to initialize the encryption cipher context: %s / %s."
msgstr "Selhala inicializace kontextu šifrovací šifry: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:303
+#: ../libnm-util/crypto_gnutls.c:302
#, c-format
msgid "Failed to set symmetric key for encryption: %s / %s."
msgstr "Selhalo nastavení symetrického klíče pro šifrování: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:313
+#: ../libnm-util/crypto_gnutls.c:312
#, c-format
msgid "Failed to set IV for encryption: %s / %s."
msgstr "Selhalo nastavení IV pro šifrování: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:322
+#: ../libnm-util/crypto_gnutls.c:321
#, c-format
msgid "Failed to encrypt the data: %s / %s."
msgstr "Selhalo šifrování dat: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:362
+#: ../libnm-util/crypto_gnutls.c:361
#, c-format
msgid "Error initializing certificate data: %s"
msgstr "Chyba při inicializaci dat certifikátu: %s"
-#: ../libnm-util/crypto_gnutls.c:384
+#: ../libnm-util/crypto_gnutls.c:383
#, c-format
msgid "Couldn't decode certificate: %s"
msgstr "Nelze dekódovat certifikát: %s"
-#: ../libnm-util/crypto_gnutls.c:408
+#: ../libnm-util/crypto_gnutls.c:407
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %s"
msgstr "Nelze inicializovat dekodér PKCS#12: %s"
-#: ../libnm-util/crypto_gnutls.c:421
+#: ../libnm-util/crypto_gnutls.c:420
#, c-format
msgid "Couldn't decode PKCS#12 file: %s"
msgstr "Nelze dekódovat soubor PKCS#12: %s"
-#: ../libnm-util/crypto_gnutls.c:433
+#: ../libnm-util/crypto_gnutls.c:432
#, c-format
msgid "Couldn't verify PKCS#12 file: %s"
msgstr "Nelze ověřit soubor PKCS#12: %s"
+#: ../libnm-util/crypto_gnutls.c:460
+#, c-format
+#| msgid "Couldn't initialize PKCS#12 decoder: %s"
+msgid "Couldn't initialize PKCS#8 decoder: %s"
+msgstr "Nelze inicializovat dekodér PKCS#8: %s"
+
+#: ../libnm-util/crypto_gnutls.c:483
+#, c-format
+#| msgid "Couldn't decode PKCS#12 file: %s"
+msgid "Couldn't decode PKCS#8 file: %s"
+msgstr "Nelze dekódovat soubor PKCS#8: %s"
+
#: ../libnm-util/crypto_nss.c:56
#, c-format
msgid "Failed to initialize the crypto engine: %d."
msgstr "Selhala inicializace šifrovacího programu: %d."
-#: ../libnm-util/crypto_nss.c:111
+#: ../libnm-util/crypto_nss.c:107
#, c-format
msgid "Failed to initialize the MD5 context: %d."
msgstr "Selhala inicializace kontextu MD5: %d."
-#: ../libnm-util/crypto_nss.c:179
+#: ../libnm-util/crypto_nss.c:175
#, c-format
msgid "Invalid IV length (must be at least %d)."
msgstr "Neplatná délka IV (musí být nejméně %d)."
-#: ../libnm-util/crypto_nss.c:196
+#: ../libnm-util/crypto_nss.c:192
#, c-format
msgid "Failed to initialize the decryption cipher slot."
msgstr "Selhala inicializace slotu dešifrovací šifry."
-#: ../libnm-util/crypto_nss.c:206
+#: ../libnm-util/crypto_nss.c:202
#, c-format
msgid "Failed to set symmetric key for decryption."
msgstr "Selhalo nastavení symetrického klíče pro dešifrování."
-#: ../libnm-util/crypto_nss.c:216
+#: ../libnm-util/crypto_nss.c:212
#, c-format
msgid "Failed to set IV for decryption."
msgstr "Selhalo nastavení IV pro dešifrování."
-#: ../libnm-util/crypto_nss.c:224
+#: ../libnm-util/crypto_nss.c:220
#, c-format
msgid "Failed to initialize the decryption context."
msgstr "Selhala inicializace dešifrovacího kontextu."
-#: ../libnm-util/crypto_nss.c:237
+#: ../libnm-util/crypto_nss.c:233
#, c-format
msgid "Failed to decrypt the private key: %d."
msgstr "Selhalo dešifrování soukromého klíče: %d."
-#: ../libnm-util/crypto_nss.c:245
+#: ../libnm-util/crypto_nss.c:241
#, c-format
msgid "Failed to decrypt the private key: decrypted data too large."
msgstr ""
"Selhalo dešifrování soukromého klíče: dešifrovaná data jsou příliš velká."
-#: ../libnm-util/crypto_nss.c:256
+#: ../libnm-util/crypto_nss.c:252
#, c-format
msgid "Failed to finalize decryption of the private key: %d."
msgstr "Selhalo dokončení dešifrování soukromého klíče: %d."
-#: ../libnm-util/crypto_nss.c:364
+#: ../libnm-util/crypto_nss.c:360
#, c-format
msgid "Failed to initialize the encryption cipher slot."
msgstr "Selhala inicializace slotu šifrovací šifry."
-#: ../libnm-util/crypto_nss.c:372
+#: ../libnm-util/crypto_nss.c:368
#, c-format
msgid "Failed to set symmetric key for encryption."
msgstr "Selhalo nastavení symetrického klíče pro šifrování."
-#: ../libnm-util/crypto_nss.c:380
+#: ../libnm-util/crypto_nss.c:376
#, c-format
msgid "Failed to set IV for encryption."
msgstr "Selhalo nastavení IV pro šifrování."
-#: ../libnm-util/crypto_nss.c:388
+#: ../libnm-util/crypto_nss.c:384
#, c-format
msgid "Failed to initialize the encryption context."
msgstr "Selhala inicializace kontextu šifrování."
-#: ../libnm-util/crypto_nss.c:396
+#: ../libnm-util/crypto_nss.c:392
#, c-format
msgid "Failed to encrypt: %d."
msgstr "Selhalo šifrování: %d."
-#: ../libnm-util/crypto_nss.c:404
+#: ../libnm-util/crypto_nss.c:400
#, c-format
msgid "Unexpected amount of data after encrypting."
msgstr "Neočekávané množství dat po zašifrování."
-#: ../libnm-util/crypto_nss.c:447
+#: ../libnm-util/crypto_nss.c:443
#, c-format
msgid "Couldn't decode certificate: %d"
msgstr "Nelze dekódovat certifikát: %d"
-#: ../libnm-util/crypto_nss.c:482
+#: ../libnm-util/crypto_nss.c:478
#, c-format
msgid "Couldn't convert password to UCS2: %d"
msgstr "Nelze převést heslo na UCS2: %d"
-#: ../libnm-util/crypto_nss.c:510
+#: ../libnm-util/crypto_nss.c:506
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %d"
msgstr "Nelze inicializovat dekodér PKCS#12: %d"
-#: ../libnm-util/crypto_nss.c:519
+#: ../libnm-util/crypto_nss.c:515
#, c-format
msgid "Couldn't decode PKCS#12 file: %d"
msgstr "Nelze dekódovat soubor PKCS#12: %d"
-#: ../libnm-util/crypto_nss.c:528
+#: ../libnm-util/crypto_nss.c:524
#, c-format
msgid "Couldn't verify PKCS#12 file: %d"
msgstr "Nelze ověřit soubor PKCS#12: %d"
-#: ../libnm-util/crypto_nss.c:557
+#: ../libnm-util/crypto_nss.c:568
msgid "Could not generate random data."
msgstr "Nelze vygenerovat náhodná data."
-#: ../libnm-util/nm-utils.c:1975
+#: ../libnm-util/nm-utils.c:2003
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "Nedostatek paměti pro vytvoření šifrovacího klíče."
-#: ../libnm-util/nm-utils.c:2085
+#: ../libnm-util/nm-utils.c:2113
msgid "Could not allocate memory for PEM file creation."
msgstr "Nelze alokovat paměť pro vytvoření souboru PEM."
-#: ../libnm-util/nm-utils.c:2097
+#: ../libnm-util/nm-utils.c:2125
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "Nelze alokovat paměť pro zápis IV do souboru PEM."
-#: ../libnm-util/nm-utils.c:2109
+#: ../libnm-util/nm-utils.c:2137
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr "Nelze alokovat paměť pro zápis šifrovaného klíče do souboru PEM."
-#: ../libnm-util/nm-utils.c:2128
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "Nelze alokovat paměť pro data souboru PEM."
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1
-msgid "Connection sharing via a protected WiFi network"
-msgstr "Sdílení připojení přes chráněnou síť WiFi"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2
-msgid "Connection sharing via an open WiFi network"
-msgstr "Sdílení připojení přes otevřenou síť WiFi"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3
-msgid "Modify persistent system hostname"
-msgstr "Měnit trvalý systémový název počítače"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4
-msgid "Modify system connections"
-msgstr "Měnit systémová připojení"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5
-msgid "System policy prevents modification of system settings"
-msgstr "Systémová politika zabránila změně systémového nastavení"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6
-msgid "System policy prevents modification of the persistent system hostname"
-msgstr "Systémová politika zabránila změně trvalého systémového názvu počítače"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7
-msgid "System policy prevents sharing connections via a protected WiFi network"
-msgstr "Systémová politika zabránila sdílení připojení přes chráněnou síť WiFi"
-
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8
-msgid "System policy prevents sharing connections via an open WiFi network"
-msgstr "Systémová politika zabránila sdílení připojení přes otevřenou síť WiFi"
-
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
msgid "Allow control of network connections"
msgstr "Povolit ovládání síťových připojení"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
-msgid "Allow use of user-specific connections"
-msgstr "Povolit použití uživatelem specifikovaných připojení"
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Sdílení připojení přes chráněnou síť WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
+msgid "Connection sharing via an open WiFi network"
+msgstr "Sdílení připojení přes otevřenou síť WiFi"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
msgid "Enable or disable WiFi devices"
msgstr "Povolit nebo zakázat zařízení WiFi"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
+#| msgid "Enable or disable mobile broadband devices"
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "Povolit nebo zakázat mobilní širokopásmová zařízení WiMAX"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
msgid "Enable or disable mobile broadband devices"
msgstr "Povolit nebo zakázat mobilní širokopásmová zařízení"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
msgid "Enable or disable system networking"
msgstr "Povolit nebo zakázat systémovou síť"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
+#| msgid "Modify system connections"
+msgid "Modify network connections for all users"
+msgstr "Měnit síťová připojení pro všechny uživatele"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
+msgid "Modify persistent system hostname"
+msgstr "Měnit trvalý systémový název počítače"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
+#| msgid "Allow control of network connections"
+msgid "Modify personal network connections"
+msgstr "Měnit osobní síťová připojení"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
msgid ""
"Put NetworkManager to sleep or wake it up (should only be used by system "
"power management)"
@@ -1621,89 +1926,76 @@ msgstr ""
"Uspat Network Manager nebo jej probudit (mělo by být používáno pouze "
"systémovou správou napájení)"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
msgid "System policy prevents control of network connections"
-msgstr "Systémová politika zamezuje ovládání síťových připojení"
+msgstr "Systémová zásada zamezuje ovládání síťových připojení"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
msgid "System policy prevents enabling or disabling WiFi devices"
-msgstr "Systémová politika zamezuje povolit nebo zakázat zařízení WiFi"
+msgstr "Systémová zásada zamezuje povolit nebo zakázat zařízení WiFi"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
+#| msgid ""
+#| "System policy prevents enabling or disabling mobile broadband devices"
+msgid ""
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgstr ""
+"Systémová zásada zamezuje povolení nebo zakázání mobilních širokopásmových "
+"zařízení WiMAX"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
msgid "System policy prevents enabling or disabling mobile broadband devices"
msgstr ""
-"Systémová politika zamezuje povolení nebo zakázání mobilních širokopásmových "
+"Systémová zásada zamezuje povolení nebo zakázání mobilních širokopásmových "
"zařízení"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
msgid "System policy prevents enabling or disabling system networking"
-msgstr "Systémová politika zamezuje povolit nebo zakázat systémovou síť"
-
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
-msgid "System policy prevents putting NetworkManager to sleep or waking it up"
-msgstr "Systémová politika zamezuje NetworkManager uspat nebo probudit"
+msgstr "Systémová zásada zamezuje povolit nebo zakázat systémovou síť"
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
-msgid "System policy prevents use of user-specific connections"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
+#| msgid "System policy prevents modification of system settings"
+msgid "System policy prevents modification of network settings for all users"
msgstr ""
-"Systémová politika zamezuje použití uživatelsky specifikovaných připojení"
-
-#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231
-#: ../src/nm-netlink-monitor.c:653
-#, c-format
-msgid "error processing netlink message: %s"
-msgstr "chyba při zpracování zprávy netlink: %s"
-
-#: ../src/nm-netlink-monitor.c:214
-msgid "error occurred while waiting for data on socket"
-msgstr "vyskytla se chyba při čekání na data ze soketu"
+"Systémová zásada zabránila změně síťového nastavení pro všechny uživatele"
-#: ../src/nm-netlink-monitor.c:254
-#, c-format
-msgid "unable to connect to netlink for monitoring link status: %s"
-msgstr "nelze se připojit k netlinku pro sledování stavu spojení: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
+#| msgid "System policy prevents modification of system settings"
+msgid "System policy prevents modification of personal network settings"
+msgstr "Systémová zásada zabránila změně osobního síťového nastavení"
-#: ../src/nm-netlink-monitor.c:265
-#, c-format
-msgid "unable to enable netlink handle credential passing: %s"
-msgstr "nelze alokovat ovládání netlinku: %s"
-
-#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353
-#, c-format
-msgid "unable to allocate netlink handle for monitoring link status: %s"
-msgstr "nelze alokovat ovládání netlinku pro sledování stavu spojení: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
+msgid "System policy prevents modification of the persistent system hostname"
+msgstr "Systémová zásada zabránila změně trvalého systémového názvu počítače"
-#: ../src/nm-netlink-monitor.c:376
-#, c-format
-msgid "unable to allocate netlink link cache for monitoring link status: %s"
-msgstr "nelze alokovat mezipaměť netlinku pro sledování stavu spojení: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr "Systémová zásada zamezuje NetworkManager uspat nebo probudit"
-#: ../src/nm-netlink-monitor.c:502
-#, c-format
-msgid "unable to join netlink group: %s"
-msgstr "nelze se připojit ke skupině netlink: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
+msgid "System policy prevents sharing connections via a protected WiFi network"
+msgstr "Systémová zásada zabránila sdílení připojení přes chráněnou síť WiFi"
-#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642
-#, c-format
-msgid "error updating link cache: %s"
-msgstr "chyba při aktualizaci mezipaměti spojení: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
+msgid "System policy prevents sharing connections via an open WiFi network"
+msgstr "Systémová zásada zabránila sdílení připojení přes otevřenou síť WiFi"
-#: ../src/main.c:499
+#: ../src/main.c:478
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr ""
"Neplatný přepínač. Platné přepínače si můžete zobrazit pomocí --help.\n"
-#: ../src/main.c:570
+#: ../src/main.c:519
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. Pomocí --help si prosím zobrazte seznam platných přepínačů.\n"
-#: ../src/dhcp-manager/nm-dhcp-dhclient.c:328
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
msgstr "# Vytvořeno NetworkManagerem\n"
-#: ../src/dhcp-manager/nm-dhcp-dhclient.c:344
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69
#, c-format
msgid ""
"# Merged from %s\n"
@@ -1729,194 +2021,118 @@ msgstr "„dhcpcd“ byl nalezen."
msgid "unsupported DHCP client '%s'"
msgstr "nepodporovaný klient DHCP „%s“"
-#: ../src/logging/nm-logging.c:146
-#, c-format
-msgid "Unknown log level '%s'"
-msgstr "Neznámá úroveň evidence „%s“"
-
-#: ../src/logging/nm-logging.c:171
-#, c-format
-msgid "Unknown log domain '%s'"
-msgstr "Neznámá doména evidence „%s“"
-
-#: ../src/dns-manager/nm-dns-manager.c:384
+#: ../src/dns-manager/nm-dns-manager.c:376
msgid "NOTE: the libc resolver may not support more than 3 nameservers."
msgstr ""
"POZNÁMKA: překladač adres z libc nemůže podporovat více než 3 jmenné servery."
-#: ../src/dns-manager/nm-dns-manager.c:386
+#: ../src/dns-manager/nm-dns-manager.c:378
msgid "The nameservers listed below may not be recognized."
msgstr "Jmenné servery uvedené v následujícím seznamu nelze rozpoznat."
-#: ../src/settings/nm-default-wired-connection.c:157
+#: ../src/logging/nm-logging.c:152
#, c-format
-msgid "Auto %s"
-msgstr "Automaticky %s"
-
-#: ../system-settings/plugins/ifcfg-rh/reader.c:3412
-#: ../system-settings/plugins/ifnet/connection_parser.c:49
-msgid "System"
-msgstr "Systém"
-
-#~ msgid "Type"
-#~ msgstr "Typ"
-
-#~ msgid "Name"
-#~ msgstr "Název"
-
-#~ msgid "User connections:\n"
-#~ msgstr "Uživatelská připojení:\n"
-
-#~ msgid "System-wide connections"
-#~ msgstr "Připojení v rámci systému"
-
-#~ msgid "Default"
-#~ msgstr "Výchozí"
-
-#~ msgid "Service"
-#~ msgstr "Služba"
-
-#~ msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d"
-#~ msgstr "%s, %s, Frekv %d MHz, Rychlost %d Mb/s, Síla sig %d"
-
-#~ msgid "Device"
-#~ msgstr "Zařízení"
-
-#~ msgid "Driver"
-#~ msgstr "Ovladač"
-
-#~ msgid "State"
-#~ msgstr "Stav"
-
-#~ msgid "HW Address"
-#~ msgstr "HW adresa"
-
-#~ msgid ""
-#~ "\n"
-#~ " Capabilities:\n"
-#~ msgstr ""
-#~ "\n"
-#~ " Schopnosti:\n"
-
-#~ msgid "Carrier Detect"
-#~ msgstr "Detekce nosného signálu"
-
-#~ msgid "Speed"
-#~ msgstr "Rychlost"
-
-#~ msgid ""
-#~ "\n"
-#~ " Wireless Properties\n"
-#~ msgstr ""
-#~ "\n"
-#~ " Vlastnosti bezdrátové části\n"
-
-#~ msgid "WEP Encryption"
-#~ msgstr "Šifrování WEP"
-
-#~ msgid "WPA Encryption"
-#~ msgstr "Šifrování WPA"
-
-#~ msgid "WPA2 Encryption"
-#~ msgstr "Šifrování WPA2"
-
-#~ msgid "TKIP cipher"
-#~ msgstr "Šifra TKIP"
-
-#~ msgid "CCMP cipher"
-#~ msgstr "Šifra CCMP"
-
-#~ msgid ""
-#~ "\n"
-#~ " Wireless Access Points %s\n"
-#~ msgstr ""
-#~ "\n"
-#~ " Bezdrátový přístupový bod %s\n"
-
-#~ msgid "(* = current AP)"
-#~ msgstr "(* = aktuální přístupový bod)"
-
-#~ msgid ""
-#~ "\n"
-#~ " Wired Properties\n"
-#~ msgstr ""
-#~ "\n"
-#~ " Vlastnosti drátové části\n"
-
-#~ msgid "Carrier"
-#~ msgstr "Nosný signál"
-
-#~ msgid ""
-#~ "\n"
-#~ " IPv4 Settings:\n"
-#~ msgstr ""
-#~ "\n"
-#~ " Nastavení IPv4:\n"
-
-#~ msgid "Address"
-#~ msgstr "Adresa"
-
-#~ msgid "Prefix"
-#~ msgstr "Předčíslí"
-
-#~ msgid "Gateway"
-#~ msgstr "Brána"
+msgid "Unknown log level '%s'"
+msgstr "Neznámá úroveň evidence „%s“"
-#~ msgid "Device:"
-#~ msgstr "Zařízení:"
+#: ../src/logging/nm-logging.c:177
+#, c-format
+msgid "Unknown log domain '%s'"
+msgstr "Neznámá doména evidence „%s“"
-#~ msgid "Error: hwaddr has to be specified."
-#~ msgstr "Chyba: musí být určena hardwarová adresa."
+#: ../src/modem-manager/nm-modem-cdma.c:296 ../src/nm-device-bt.c:355
+#, c-format
+#| msgid "connection failed"
+msgid "CDMA connection %d"
+msgstr "Připojení CDMA %d"
-#~ msgid "AP parameters"
-#~ msgstr "Parametry přístupového bodu"
+#: ../src/modem-manager/nm-modem-gsm.c:521 ../src/nm-device-bt.c:351
+#, c-format
+#| msgid "connection failed"
+msgid "GSM connection %d"
+msgstr "Připojení GSM %d"
-#~ msgid "Frequency:"
-#~ msgstr "Kmitočet:"
+#: ../src/nm-device-bt.c:326
+#, c-format
+#| msgid "VPN connection failed"
+msgid "PAN connection %d"
+msgstr "Připojení PAN %d"
-#~ msgid "Mode:"
-#~ msgstr "Režim:"
+#: ../src/nm-device-bt.c:359
+#, c-format
+#| msgid "VPN connection failed"
+msgid "DUN connection %d"
+msgstr "Připojení DUN %d"
-#~ msgid "Ad-hoc"
-#~ msgstr "Ad-hoc"
+#: ../src/nm-device-ethernet.c:1722
+#, c-format
+#| msgid "VPN connection failed"
+msgid "PPPoE connection %d"
+msgstr "Připojení PPPoE %d"
-#~ msgid "Maximal bitrate:"
-#~ msgstr "Max. přenosová rychlost:"
+#: ../src/nm-device-ethernet.c:1722 ../src/settings/nm-settings-utils.c:50
+#, c-format
+#| msgid "Active connections"
+msgid "Wired connection %d"
+msgstr "Drátové připojení %d"
-#~ msgid "Strength:"
-#~ msgstr "Síla signálu:"
+#: ../src/nm-device-olpc-mesh.c:324
+#, c-format
+msgid "Mesh %d"
+msgstr "Mesh %d"
-#~ msgid "Flags:"
-#~ msgstr "Příznaky:"
+#: ../src/nm-manager.c:687
+#, c-format
+#| msgid "VPN connection failed"
+msgid "VPN connection %d"
+msgstr "Připojení VPN %d"
-#~ msgid "privacy"
-#~ msgstr "soukromé"
+#: ../src/nm-netlink-monitor.c:101 ../src/nm-netlink-monitor.c:234
+#: ../src/nm-netlink-monitor.c:661
+#, c-format
+msgid "error processing netlink message: %s"
+msgstr "chyba při zpracování zprávy netlink: %s"
-#~ msgid "WPA flags:"
-#~ msgstr "Příznaky WPA:"
+#: ../src/nm-netlink-monitor.c:216
+msgid "error occurred while waiting for data on socket"
+msgstr "vyskytla se chyba při čekání na data ze soketu"
-#~ msgid "RSN flags:"
-#~ msgstr "Příznaky RSN:"
+#: ../src/nm-netlink-monitor.c:260
+#, c-format
+msgid "unable to connect to netlink for monitoring link status: %s"
+msgstr "nelze se připojit k netlinku pro sledování stavu spojení: %s"
-#~ msgid "NM running:"
-#~ msgstr "Běh NM:"
+#: ../src/nm-netlink-monitor.c:271
+#, c-format
+msgid "unable to enable netlink handle credential passing: %s"
+msgstr "nelze alokovat ovládání netlinku: %s"
-#~ msgid "NM state:"
-#~ msgstr "Stav NM:"
+#: ../src/nm-netlink-monitor.c:294 ../src/nm-netlink-monitor.c:354
+#, c-format
+msgid "unable to allocate netlink handle for monitoring link status: %s"
+msgstr "nelze alokovat ovládání netlinku pro sledování stavu spojení: %s"
-#~ msgid "NM wireless hardware:"
-#~ msgstr "Bezdrátový hardware NM:"
+#: ../src/nm-netlink-monitor.c:379
+#, c-format
+msgid "unable to allocate netlink link cache for monitoring link status: %s"
+msgstr "nelze alokovat mezipaměť netlinku pro sledování stavu spojení: %s"
-#~ msgid "NM wireless:"
-#~ msgstr "Bezdrátové sítě NM:"
+#: ../src/nm-netlink-monitor.c:506
+#, c-format
+msgid "unable to join netlink group: %s"
+msgstr "nelze se připojit ke skupině netlink: %s"
-#~ msgid "NM WWAN hardware:"
-#~ msgstr "Hardware WWAN NM"
+#: ../src/nm-netlink-monitor.c:637 ../src/nm-netlink-monitor.c:650
+#, c-format
+msgid "error updating link cache: %s"
+msgstr "chyba při aktualizaci mezipaměti spojení: %s"
-#~ msgid "unable to join netlink group for monitoring link status: %s"
-#~ msgstr ""
-#~ "nelze se připojit ke skupině netlink pro sledování stavu spojení: %s"
+#: ../src/settings/plugins/ifcfg-rh/reader.c:97
+#: ../src/settings/plugins/ifnet/connection_parser.c:51
+msgid "System"
+msgstr "Systém"
-#~| msgid "unable to connect to netlink for monitoring link status: %s"
-#~ msgid "unable to connect to netlink: %s"
-#~ msgstr "nelze se připojit k netlinku: %s"
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3458
+#| msgid "on"
+msgid "Bond"
+msgstr "Svazek"
diff --git a/po/hu.po b/po/hu.po
index 4c3282f76..b422bcd6f 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -2,460 +2,615 @@
# This file is distributed under the same license as the NetworkManager package.
# Copyright (C) 2005, Free Software Foundation. Inc.
#
-# Gabor Kelemen <kelemeng at gnome dot hu>, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
+# Gabor Kelemen <kelemeng at gnome dot hu>, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012.
msgid ""
msgstr ""
"Project-Id-Version: NetworkManager master\n"
-"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
-"product=NetworkManager&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2011-03-14 15:25+0000\n"
-"PO-Revision-Date: 2011-03-14 22:36+0100\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
+"cgi?product=NetworkManager&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-02-09 15:25+0000\n"
+"PO-Revision-Date: 2012-02-16 04:41+0100\n"
"Last-Translator: Gabor Kelemen <kelemeng at gnome dot hu>\n"
-"Language-Team: Hungarian <gnome at fsf dot hu>\n"
+"Language-Team: Magyar <gnome-hu-list at gnome dot org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Launchpad-Export-Date: 2010-10-02 18:28+0000\n"
-"X-Generator: KBabel 1.11.4\n"
+"X-Generator: Lokalize 1.0\n"
-#: ../cli/src/connections.c:64 ../cli/src/connections.c:78
-#: ../cli/src/devices.c:101 ../cli/src/devices.c:114 ../cli/src/devices.c:124
-#: ../cli/src/devices.c:134 ../cli/src/devices.c:148 ../cli/src/devices.c:162
-#: ../cli/src/devices.c:173 ../cli/src/devices.c:184 ../cli/src/devices.c:193
-#: ../cli/src/devices.c:202 ../cli/src/devices.c:224
-msgid "NAME"
-msgstr "NÉV"
+#: ../cli/src/common.c:32 ../cli/src/common.c:44 ../cli/src/common.c:52
+#: ../cli/src/common.c:63 ../cli/src/connections.c:119
+#: ../cli/src/connections.c:153
+msgid "GROUP"
+msgstr "CSOPORT"
#. 0
-#: ../cli/src/connections.c:65 ../cli/src/connections.c:79
-msgid "UUID"
-msgstr "UUID"
+#: ../cli/src/common.c:33 ../cli/src/common.c:53
+msgid "ADDRESS"
+msgstr "CÍM"
#. 1
-#: ../cli/src/connections.c:66
-msgid "DEVICES"
-msgstr "ESZKÖZÖK"
+#: ../cli/src/common.c:34 ../cli/src/common.c:54
+#| msgid "RATE"
+msgid "ROUTE"
+msgstr "ÚTVONAL"
#. 2
-#: ../cli/src/connections.c:67
-msgid "DEFAULT"
-msgstr "ALAPÉRTELMEZETT"
+#: ../cli/src/common.c:35 ../cli/src/common.c:55
+msgid "DNS"
+msgstr "DNS"
#. 3
-#: ../cli/src/connections.c:68
-msgid "SPEC-OBJECT"
-msgstr "SPEC-OBJEKTUM"
+#: ../cli/src/common.c:36 ../cli/src/common.c:56
+msgid "DOMAIN"
+msgstr "TARTOMÁNY"
#. 4
-#: ../cli/src/connections.c:69
-msgid "VPN"
-msgstr "VPN"
+#: ../cli/src/common.c:37
+msgid "WINS"
+msgstr "WINS"
-#. 5
-#. 6
-#. 2
-#. 11
-#. 5
-#: ../cli/src/connections.c:70 ../cli/src/connections.c:85
-#: ../cli/src/devices.c:69 ../cli/src/devices.c:214 ../cli/src/devices.c:230
-msgid "DBUS-PATH"
-msgstr "DBUS-ÚTVONAL"
+#. 0
+#: ../cli/src/common.c:45 ../cli/src/common.c:64
+msgid "OPTION"
+msgstr "KAPCSOLÓ"
+
+#. 0
+#. used only for 'GENERAL' group listing
+#: ../cli/src/connections.c:56 ../cli/src/connections.c:120
+#: ../cli/src/devices.c:100 ../cli/src/devices.c:121 ../cli/src/devices.c:131
+#: ../cli/src/devices.c:141 ../cli/src/devices.c:155 ../cli/src/devices.c:169
+#: ../cli/src/devices.c:191
+msgid "NAME"
+msgstr "NÉV"
+
+#. 0
+#. 1
+#: ../cli/src/connections.c:57 ../cli/src/connections.c:121
+msgid "UUID"
+msgstr "UUID"
#. 1
#. 0
#. 1
#. 2
-#: ../cli/src/connections.c:80 ../cli/src/devices.c:67
-#: ../cli/src/devices.c:103 ../cli/src/devices.c:227
+#: ../cli/src/connections.c:58 ../cli/src/connections.c:154
+#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:194
msgid "TYPE"
msgstr "TÍPUS"
#. 2
-#: ../cli/src/connections.c:81
+#: ../cli/src/connections.c:59
msgid "TIMESTAMP"
msgstr "IDŐBÉLYEG"
#. 3
-#: ../cli/src/connections.c:82
+#: ../cli/src/connections.c:60
msgid "TIMESTAMP-REAL"
msgstr "IDŐBÉLYEG-VALÓDI"
#. 4
-#: ../cli/src/connections.c:83
+#: ../cli/src/connections.c:61
msgid "AUTOCONNECT"
msgstr "AUTO-CSATLAKOZÁS"
#. 5
-#: ../cli/src/connections.c:84
+#: ../cli/src/connections.c:62
msgid "READONLY"
msgstr "CSAK OLVASHATÓ"
-#: ../cli/src/connections.c:168
-#, c-format
+#. 6
+#. 8
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63 ../cli/src/connections.c:128
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:181 ../cli/src/devices.c:197
+msgid "DBUS-PATH"
+msgstr "DBUS-ÚTVONAL"
+
+#. 2
+#: ../cli/src/connections.c:122
+msgid "DEVICES"
+msgstr "ESZKÖZÖK"
+
+#. 3
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:123 ../cli/src/devices.c:67
+#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "ÁLLAPOT"
+
+#. 4
+#: ../cli/src/connections.c:124
+msgid "DEFAULT"
+msgstr "ALAPÉRTELMEZETT"
+
+#. 5
+#: ../cli/src/connections.c:125
+#| msgid "DEFAULT"
+msgid "DEFAULT6"
+msgstr "ALAPÉRTELMEZETT6"
+
+#. 6
+#: ../cli/src/connections.c:126
+msgid "SPEC-OBJECT"
+msgstr "SPEC-OBJEKTUM"
+
+#. 7
+#. 1
+#: ../cli/src/connections.c:127 ../cli/src/connections.c:141
+msgid "VPN"
+msgstr "VPN"
+
+#. 9
+#: ../cli/src/connections.c:129
+msgid "CON-PATH"
+msgstr "KAPCS-ÚTVONAL"
+
+#. 10
+#: ../cli/src/connections.c:130
+msgid "ZONE"
+msgstr "ZÓNA"
+
+#. 11
+#: ../cli/src/connections.c:131
+#| msgid "DBUS-PATH"
+msgid "MASTER-PATH"
+msgstr "ELSŐDLEGES-ÚTVONAL"
+
+#: ../cli/src/connections.c:139 ../cli/src/devices.c:77
+msgid "GENERAL"
+msgstr "ÁLTALÁNOS"
+
+#. 0
+#: ../cli/src/connections.c:140
+#| msgid "TKIP"
+msgid "IP"
+msgstr "IP"
+
+#. 1
+#: ../cli/src/connections.c:155
+#| msgid "NAME"
+msgid "USERNAME"
+msgstr "FELHASZNÁLÓNÉV"
+
+#. 2
+#: ../cli/src/connections.c:156
+msgid "GATEWAY"
+msgstr "ÁTJÁRÓ"
+
+#. 3
+#: ../cli/src/connections.c:157
+msgid "BANNER"
+msgstr "FEJLÉC"
+
+#. 4
+#: ../cli/src/connections.c:158
+#| msgid "STATE"
+msgid "VPN-STATE"
+msgstr "VPN-ÁLLAPOT"
+
+#. 5
+#: ../cli/src/connections.c:159
+msgid "CFG"
+msgstr "KFG"
+
+#: ../cli/src/connections.c:180
+#, c-format
+#| msgid ""
+#| "Usage: nmcli con { COMMAND | help }\n"
+#| " COMMAND := { list | status | up | down }\n"
+#| "\n"
+#| " list [id <id> | uuid <id>]\n"
+#| " status\n"
+#| " up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [nsp <name>] [--"
+#| "nowait] [--timeout <timeout>]\n"
+#| " up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--"
+#| "timeout <timeout>]\n"
+#| " down id <id> | uuid <id>\n"
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
" list [id <id> | uuid <id>]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [nsp <name>] [--"
+" status [id <id> | uuid <id> | path <path>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
"nowait] [--timeout <timeout>]\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
msgstr ""
"Használat: nmcli con { PARANCS | help }\n"
-" PARANCS := { list | status | up | down }\n"
+" PARANCS := { list | status | up | down | delete }\n"
"\n"
" list [id <azonosító> | uuid <azonosító> | system | user]\n"
-" status\n"
-" up id <azonosító> | uuid <azonosító> [iface <csatoló>] [ap <hwcím>] [nsp "
+" status [id <azonosító> | uuid <azonosító> | path <útvonal>]\n"
+" up id <azonosító> | uuid <azonosító> [iface <csatoló>] [ap <BSSID>] [nsp "
"<név>] [--nowait] [--timeout <időkorlát>]\n"
-" up id <azonosító> | uuid <azonosító> [iface <csatoló>] [ap <hwcím>] [--"
+" up id <azonosító> | uuid <azonosító> [iface <csatoló>] [ap <BSSID>] [--"
"nowait] [--timeout <időkorlát>]\n"
" down id <azonosító> | uuid <azonosító>\n"
+" delete id <azonosító> | uuid <azonosító>\n"
-#: ../cli/src/connections.c:221 ../cli/src/connections.c:543
+#: ../cli/src/connections.c:234 ../cli/src/connections.c:567
#, c-format
msgid "Error: 'con list': %s"
msgstr "Hiba: „con list”: %s"
-#: ../cli/src/connections.c:223 ../cli/src/connections.c:545
+#: ../cli/src/connections.c:236 ../cli/src/connections.c:569
#, c-format
msgid "Error: 'con list': %s; allowed fields: %s"
msgstr "Hiba: „con list”: %s; engedélyezett mezők: %s"
-#: ../cli/src/connections.c:231
+#: ../cli/src/connections.c:244
msgid "Connection details"
msgstr "Kapcsolat részletei"
-#: ../cli/src/connections.c:418
+#: ../cli/src/connections.c:442
msgid "never"
msgstr "soha"
#. "CAPABILITIES"
#. Print header
#. "WIFI-PROPERTIES"
-#: ../cli/src/connections.c:419 ../cli/src/connections.c:420
-#: ../cli/src/connections.c:598 ../cli/src/connections.c:600
-#: ../cli/src/devices.c:509 ../cli/src/devices.c:562 ../cli/src/devices.c:687
-#: ../cli/src/devices.c:713 ../cli/src/devices.c:714 ../cli/src/devices.c:715
-#: ../cli/src/devices.c:716 ../cli/src/devices.c:717 ../cli/src/settings.c:520
-#: ../cli/src/settings.c:563 ../cli/src/settings.c:663
-#: ../cli/src/settings.c:937 ../cli/src/settings.c:938
-#: ../cli/src/settings.c:940 ../cli/src/settings.c:942
-#: ../cli/src/settings.c:1067 ../cli/src/settings.c:1068
-#: ../cli/src/settings.c:1069 ../cli/src/settings.c:1148
-#: ../cli/src/settings.c:1149 ../cli/src/settings.c:1150
-#: ../cli/src/settings.c:1151 ../cli/src/settings.c:1152
-#: ../cli/src/settings.c:1153 ../cli/src/settings.c:1154
-#: ../cli/src/settings.c:1155 ../cli/src/settings.c:1156
-#: ../cli/src/settings.c:1157 ../cli/src/settings.c:1158
-#: ../cli/src/settings.c:1159 ../cli/src/settings.c:1160
-#: ../cli/src/settings.c:1235
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766 ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049 ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053 ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182 ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184 ../cli/src/settings.c:1185
+#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268 ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270 ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1272 ../cli/src/settings.c:1343
msgid "yes"
msgstr "igen"
-#: ../cli/src/connections.c:419 ../cli/src/connections.c:420
-#: ../cli/src/connections.c:598 ../cli/src/connections.c:600
-#: ../cli/src/devices.c:509 ../cli/src/devices.c:562 ../cli/src/devices.c:687
-#: ../cli/src/devices.c:713 ../cli/src/devices.c:714 ../cli/src/devices.c:715
-#: ../cli/src/devices.c:716 ../cli/src/devices.c:717 ../cli/src/settings.c:520
-#: ../cli/src/settings.c:522 ../cli/src/settings.c:563
-#: ../cli/src/settings.c:663 ../cli/src/settings.c:937
-#: ../cli/src/settings.c:938 ../cli/src/settings.c:940
-#: ../cli/src/settings.c:942 ../cli/src/settings.c:1067
-#: ../cli/src/settings.c:1068 ../cli/src/settings.c:1069
-#: ../cli/src/settings.c:1148 ../cli/src/settings.c:1149
-#: ../cli/src/settings.c:1150 ../cli/src/settings.c:1151
-#: ../cli/src/settings.c:1152 ../cli/src/settings.c:1153
-#: ../cli/src/settings.c:1154 ../cli/src/settings.c:1155
-#: ../cli/src/settings.c:1156 ../cli/src/settings.c:1157
-#: ../cli/src/settings.c:1158 ../cli/src/settings.c:1159
-#: ../cli/src/settings.c:1160 ../cli/src/settings.c:1235
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:578
+#: ../cli/src/settings.c:646 ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048 ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051 ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054 ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183 ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185 ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269 ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
msgid "no"
msgstr "nem"
-#: ../cli/src/connections.c:494
+#: ../cli/src/connections.c:518
msgid "Connection list"
msgstr "Kapcsolatlista"
-#: ../cli/src/connections.c:507 ../cli/src/connections.c:1459
-#: ../cli/src/connections.c:1474 ../cli/src/connections.c:1483
-#: ../cli/src/connections.c:1493 ../cli/src/connections.c:1505
-#: ../cli/src/connections.c:1600 ../cli/src/devices.c:1190
+#: ../cli/src/connections.c:531 ../cli/src/connections.c:1064
+#: ../cli/src/connections.c:1808 ../cli/src/connections.c:1823
+#: ../cli/src/connections.c:1832 ../cli/src/connections.c:1842
+#: ../cli/src/connections.c:1854 ../cli/src/connections.c:1949
+#: ../cli/src/connections.c:2051 ../cli/src/devices.c:1190
#: ../cli/src/devices.c:1200 ../cli/src/devices.c:1314
-#: ../cli/src/devices.c:1321 ../cli/src/devices.c:1534
-#: ../cli/src/devices.c:1541
+#: ../cli/src/devices.c:1322 ../cli/src/devices.c:1535
+#: ../cli/src/devices.c:1542
#, c-format
msgid "Error: %s argument is missing."
msgstr "Hiba: az argumentum (%s) hiányzik."
-#: ../cli/src/connections.c:520
+#: ../cli/src/connections.c:544
#, c-format
msgid "Error: %s - no such connection."
msgstr "Hiba: nincs ilyen kapcsolat: %s."
-#: ../cli/src/connections.c:526 ../cli/src/connections.c:1518
-#: ../cli/src/connections.c:1617 ../cli/src/devices.c:987
-#: ../cli/src/devices.c:1067 ../cli/src/devices.c:1214
-#: ../cli/src/devices.c:1327 ../cli/src/devices.c:1547
+#: ../cli/src/connections.c:550 ../cli/src/connections.c:1867
+#: ../cli/src/connections.c:1966 ../cli/src/connections.c:2058
+#: ../cli/src/devices.c:987 ../cli/src/devices.c:1067
+#: ../cli/src/devices.c:1214 ../cli/src/devices.c:1328
+#: ../cli/src/devices.c:1548
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "Ismeretlen paraméter: %s\n"
-#: ../cli/src/connections.c:535
+#: ../cli/src/connections.c:559
#, c-format
msgid "Error: no valid parameter specified."
msgstr "Hiba: nincs megadva érvényes paraméter."
-#: ../cli/src/connections.c:550 ../cli/src/connections.c:1708
-#: ../cli/src/devices.c:1755 ../cli/src/network-manager.c:463
+#: ../cli/src/connections.c:574 ../cli/src/connections.c:2151
+#: ../cli/src/devices.c:1756 ../cli/src/network-manager.c:456
#, c-format
msgid "Error: %s."
msgstr "Hiba: %s."
-#: ../cli/src/connections.c:638
+#: ../cli/src/connections.c:587
+msgid "activating"
+msgstr "aktiválás"
+
+#: ../cli/src/connections.c:589
+msgid "activated"
+msgstr "aktiválva"
+
+#: ../cli/src/connections.c:591 ../cli/src/devices.c:261
+msgid "deactivating"
+msgstr "kikapcsolás"
+
+#: ../cli/src/connections.c:594 ../cli/src/connections.c:617
+#: ../cli/src/connections.c:1680 ../cli/src/devices.c:265
+#: ../cli/src/devices.c:784 ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:531
+#: ../cli/src/utils.c:499 ../src/main.c:443 ../src/main.c:462
+msgid "unknown"
+msgstr "ismeretlen"
+
+#: ../cli/src/connections.c:603
+msgid "VPN connecting (prepare)"
+msgstr "VPN kapcsolódás (előkészítés)"
+
+#: ../cli/src/connections.c:605
+msgid "VPN connecting (need authentication)"
+msgstr "VPN csatlakozás (hitelesítés szükséges)"
+
+#: ../cli/src/connections.c:607
+msgid "VPN connecting"
+msgstr "VPN csatlakozás"
+
+#: ../cli/src/connections.c:609
+msgid "VPN connecting (getting IP configuration)"
+msgstr "VPN kapcsolódás (IP-beállítások lekérése)"
+
+#: ../cli/src/connections.c:611
+msgid "VPN connected"
+msgstr "VPN csatlakozott"
+
+#: ../cli/src/connections.c:613
+msgid "VPN connection failed"
+msgstr "VPN csatlakozás sikertelen"
+
+#: ../cli/src/connections.c:615
+msgid "VPN disconnected"
+msgstr "VPN leválasztva"
+
+#: ../cli/src/connections.c:868 ../cli/src/connections.c:1092
#, c-format
msgid "Error: 'con status': %s"
msgstr "Hiba: „con status”: %s"
-#: ../cli/src/connections.c:640
+#: ../cli/src/connections.c:870 ../cli/src/connections.c:1094
#, c-format
msgid "Error: 'con status': %s; allowed fields: %s"
msgstr "Hiba: „con status”: %s; engedélyezett mezők: %s"
-#: ../cli/src/connections.c:648 ../cli/src/connections.c:1533
-#: ../cli/src/connections.c:1632 ../cli/src/devices.c:1014
-#: ../cli/src/devices.c:1076 ../cli/src/devices.c:1229
-#: ../cli/src/devices.c:1357 ../cli/src/devices.c:1576
+#: ../cli/src/connections.c:878
+#| msgid "Active connections"
+msgid "Active connection details"
+msgstr "Aktív kapcsolat részletei"
+
+#: ../cli/src/connections.c:1014 ../cli/src/connections.c:1882
+#: ../cli/src/connections.c:1981 ../cli/src/connections.c:2072
+#: ../cli/src/devices.c:1014 ../cli/src/devices.c:1076
+#: ../cli/src/devices.c:1229 ../cli/src/devices.c:1358
+#: ../cli/src/devices.c:1577
#, c-format
msgid "Error: Can't find out if NetworkManager is running: %s."
msgstr "Hiba: nem lehet megállapítani, hogy a Hálózatkezelő fut-e: %s."
-#: ../cli/src/connections.c:652 ../cli/src/connections.c:1537
-#: ../cli/src/connections.c:1636 ../cli/src/devices.c:1018
-#: ../cli/src/devices.c:1080 ../cli/src/devices.c:1233
-#: ../cli/src/devices.c:1361 ../cli/src/devices.c:1580
+#: ../cli/src/connections.c:1018 ../cli/src/connections.c:1886
+#: ../cli/src/connections.c:1985 ../cli/src/connections.c:2076
+#: ../cli/src/devices.c:1018 ../cli/src/devices.c:1080
+#: ../cli/src/devices.c:1233 ../cli/src/devices.c:1362
+#: ../cli/src/devices.c:1581
#, c-format
msgid "Error: NetworkManager is not running."
msgstr "Hiba: a Hálózatkezelő nem fut."
-#: ../cli/src/connections.c:660
+#: ../cli/src/connections.c:1050
msgid "Active connections"
msgstr "Aktív kapcsolatok"
-#: ../cli/src/connections.c:1130
+#: ../cli/src/connections.c:1075
+#, c-format
+#| msgid "Error: %s - no such connection."
+msgid "Error: '%s' is not an active connection."
+msgstr "Hiba: a(z) „%s” nem egy aktív kapcsolat."
+
+#: ../cli/src/connections.c:1080
+#, c-format
+#| msgid "Unknown parameter: %s\n"
+msgid "Error: unknown parameter: %s"
+msgstr "Hiba: ismeretlen paraméter: %s"
+
+#: ../cli/src/connections.c:1564
#, c-format
msgid "no active connection on device '%s'"
msgstr "nincs aktív kapcsolat a(z) „%s” eszközön"
-#: ../cli/src/connections.c:1138
+#: ../cli/src/connections.c:1572
#, c-format
msgid "no active connection or device"
msgstr "nincs aktív kapcsolat vagy eszköz"
-#: ../cli/src/connections.c:1209
+#: ../cli/src/connections.c:1643
#, c-format
msgid "device '%s' not compatible with connection '%s'"
msgstr "a(z) „%s” eszköz nem kompatibilis a(z) „%s” kapcsolattal"
-#: ../cli/src/connections.c:1211
+#: ../cli/src/connections.c:1645
#, c-format
msgid "no device found for connection '%s'"
msgstr "nem található eszköz a(z) „%s” kapcsolathoz"
-#: ../cli/src/connections.c:1222
-msgid "activating"
-msgstr "aktiválás"
-
-#: ../cli/src/connections.c:1224
-msgid "activated"
-msgstr "aktiválva"
-
-#: ../cli/src/connections.c:1227 ../cli/src/connections.c:1250
-#: ../cli/src/connections.c:1283 ../cli/src/devices.c:308
-#: ../cli/src/devices.c:688 ../cli/src/network-manager.c:118
-#: ../cli/src/network-manager.c:180 ../cli/src/network-manager.c:183
-#: ../cli/src/network-manager.c:298 ../cli/src/network-manager.c:353
-#: ../cli/src/network-manager.c:391 ../cli/src/network-manager.c:430
-#: ../cli/src/settings.c:485 ../cli/src/utils.c:396
-msgid "unknown"
-msgstr "ismeretlen"
-
-#: ../cli/src/connections.c:1236
-msgid "VPN connecting (prepare)"
-msgstr "VPN kapcsolódás (előkészítés)"
-
-#: ../cli/src/connections.c:1238
-msgid "VPN connecting (need authentication)"
-msgstr "VPN csatlakozás (hitelesítés szükséges)"
-
-#: ../cli/src/connections.c:1240
-msgid "VPN connecting"
-msgstr "VPN csatlakozás"
-
-#: ../cli/src/connections.c:1242
-msgid "VPN connecting (getting IP configuration)"
-msgstr "VPN kapcsolódás (IP-beállítások lekérése)"
-
-#: ../cli/src/connections.c:1244
-msgid "VPN connected"
-msgstr "VPN csatlakozott"
-
-#: ../cli/src/connections.c:1246
-msgid "VPN connection failed"
-msgstr "VPN csatlakozás sikertelen"
-
-#: ../cli/src/connections.c:1248
-msgid "VPN disconnected"
-msgstr "VPN leválasztva"
-
-#: ../cli/src/connections.c:1259
+#: ../cli/src/connections.c:1656
msgid "unknown reason"
msgstr "ismeretlen ok"
-#: ../cli/src/connections.c:1261
+#: ../cli/src/connections.c:1658
msgid "none"
msgstr "nincs"
-#: ../cli/src/connections.c:1263
+#: ../cli/src/connections.c:1660
msgid "the user was disconnected"
msgstr "felhasználó leválasztva"
-#: ../cli/src/connections.c:1265
+#: ../cli/src/connections.c:1662
msgid "the base network connection was interrupted"
msgstr "az alap hálózati kapcsolat megszakadt"
-#: ../cli/src/connections.c:1267
+#: ../cli/src/connections.c:1664
msgid "the VPN service stopped unexpectedly"
msgstr "a VPN szolgáltatás váratlanul leállt"
-#: ../cli/src/connections.c:1269
+#: ../cli/src/connections.c:1666
msgid "the VPN service returned invalid configuration"
msgstr "a VPN szolgáltatás érvénytelen beállításokat adott"
-#: ../cli/src/connections.c:1271
+#: ../cli/src/connections.c:1668
msgid "the connection attempt timed out"
msgstr "a csatlakozási kísérlet túllépte az időkorlátot"
-#: ../cli/src/connections.c:1273
+#: ../cli/src/connections.c:1670
msgid "the VPN service did not start in time"
msgstr "a VPN szolgáltatás nem indult el időben"
-#: ../cli/src/connections.c:1275
+#: ../cli/src/connections.c:1672
msgid "the VPN service failed to start"
msgstr "a VPN szolgáltatás nem indult el"
-#: ../cli/src/connections.c:1277
+#: ../cli/src/connections.c:1674
msgid "no valid VPN secrets"
msgstr "nincsenek érvényes VPN titkok"
-#: ../cli/src/connections.c:1279
+#: ../cli/src/connections.c:1676
msgid "invalid VPN secrets"
msgstr "érvénytelen VPN titkok"
-#: ../cli/src/connections.c:1281
+#: ../cli/src/connections.c:1678
msgid "the connection was removed"
msgstr "a kapcsolat eltávolításra került"
-#: ../cli/src/connections.c:1295
+#: ../cli/src/connections.c:1692
#, c-format
msgid "state: %s\n"
msgstr "állapot: %s\n"
-#: ../cli/src/connections.c:1298 ../cli/src/connections.c:1324
+#: ../cli/src/connections.c:1695 ../cli/src/connections.c:1721
#, c-format
msgid "Connection activated\n"
msgstr "Kapcsolat aktiválva\n"
-#: ../cli/src/connections.c:1301
+#: ../cli/src/connections.c:1698
#, c-format
msgid "Error: Connection activation failed."
msgstr "Hiba: a kapcsolat aktiválása meghiúsult."
-#: ../cli/src/connections.c:1320
+#: ../cli/src/connections.c:1717
#, c-format
msgid "state: %s (%d)\n"
msgstr "állapot: %s (%d)\n"
-#: ../cli/src/connections.c:1330
+#: ../cli/src/connections.c:1727
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "Hiba: a kapcsolat aktiválása meghiúsult: %s."
-#: ../cli/src/connections.c:1347 ../cli/src/devices.c:1136
+#: ../cli/src/connections.c:1744 ../cli/src/devices.c:1136
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "Hiba: az időkorlát (%d mp) lejárt."
-#: ../cli/src/connections.c:1390
+#: ../cli/src/connections.c:1757
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "Hiba: a kapcsolat aktiválása meghiúsult: %s"
-#: ../cli/src/connections.c:1404
-#, c-format
-msgid "Error: Obtaining active connection for '%s' failed."
-msgstr "Hiba: az aktív kapcsolat létrehozása meghiúsult ehhez: „%s”."
-
-#: ../cli/src/connections.c:1413
+#: ../cli/src/connections.c:1763
#, c-format
msgid "Active connection state: %s\n"
msgstr "Aktív kapcsolat állapota: %s\n"
-#: ../cli/src/connections.c:1414
+#: ../cli/src/connections.c:1764
#, c-format
msgid "Active connection path: %s\n"
msgstr "Aktív kapcsolat útvonala: %s\n"
-#: ../cli/src/connections.c:1467 ../cli/src/connections.c:1608
+#: ../cli/src/connections.c:1816 ../cli/src/connections.c:1957
+#: ../cli/src/connections.c:2085
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "Hiba: ismeretlen kapcsolat: %s."
-#: ../cli/src/connections.c:1513 ../cli/src/devices.c:1208
+#: ../cli/src/connections.c:1862 ../cli/src/devices.c:1208
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "Hiba: a(z) „%s” időkorlát érvénytelen."
-#: ../cli/src/connections.c:1526 ../cli/src/connections.c:1625
+#: ../cli/src/connections.c:1875 ../cli/src/connections.c:1974
+#: ../cli/src/connections.c:2065
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "Hiba: meg kell adni az id vagy uuid egyikét."
-#: ../cli/src/connections.c:1556
+#: ../cli/src/connections.c:1903
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "Hiba: nem található megfelelő eszköz: %s."
-#: ../cli/src/connections.c:1558
+#: ../cli/src/connections.c:1905
#, c-format
msgid "Error: No suitable device found."
msgstr "Hiba: nem található megfelelő eszköz."
-#: ../cli/src/connections.c:1661
+#: ../cli/src/connections.c:2010
#, c-format
msgid "Warning: Connection not active\n"
msgstr "Figyelmeztetés: a kapcsolat nem aktív\n"
-#: ../cli/src/connections.c:1699
+#: ../cli/src/connections.c:2024
+#, c-format
+#| msgid "Error: Connection activation failed: %s"
+msgid "Error: Connection deletion failed: %s"
+msgstr "Hiba: a kapcsolat törlése meghiúsult: %s"
+
+#: ../cli/src/connections.c:2142
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "Hiba: a(z) „%s” „con” parancs nem érvényes."
-#: ../cli/src/connections.c:1764
+#: ../cli/src/connections.c:2207
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "Hiba: nem lehet a D-Bushoz kapcsolódni."
-#: ../cli/src/connections.c:1771
+#: ../cli/src/connections.c:2215
#, c-format
msgid "Error: Could not get system settings."
msgstr "Hiba: a rendszer beállításai nem kérhetők le."
-#: ../cli/src/connections.c:1781
+#: ../cli/src/connections.c:2225
#, c-format
msgid "Error: Can't obtain connections: settings service is not running."
msgstr "Hiba: nem kérhetők le a kapcsolatok: a beállító szolgáltatás nem fut."
@@ -463,223 +618,248 @@ msgstr "Hiba: nem kérhetők le a kapcsolatok: a beállító szolgáltatás nem
#. 0
#. 9
#. 3
-#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:212
-#: ../cli/src/devices.c:228
+#: ../cli/src/devices.c:65 ../cli/src/devices.c:101 ../cli/src/devices.c:179
+#: ../cli/src/devices.c:195
msgid "DEVICE"
msgstr "ESZKÖZ"
-#. 1
-#. 4
-#. 1
-#: ../cli/src/devices.c:68 ../cli/src/devices.c:106
-#: ../cli/src/network-manager.c:39
-msgid "STATE"
-msgstr "ÁLLAPOT"
-
-#: ../cli/src/devices.c:78
-msgid "GENERAL"
-msgstr "ÁLTALÁNOS"
-
#. 0
-#: ../cli/src/devices.c:79
+#: ../cli/src/devices.c:78
msgid "CAPABILITIES"
msgstr "KÉPESSÉGEK"
#. 1
-#: ../cli/src/devices.c:80
+#: ../cli/src/devices.c:79
msgid "WIFI-PROPERTIES"
msgstr "WIFI-KÉPESSÉGEK"
#. 2
-#: ../cli/src/devices.c:81
+#: ../cli/src/devices.c:80
msgid "AP"
msgstr "AP"
#. 3
-#: ../cli/src/devices.c:82
+#: ../cli/src/devices.c:81
msgid "WIRED-PROPERTIES"
msgstr "VEZETÉKES-TULAJDONSÁGOK"
#. 4
-#: ../cli/src/devices.c:83
+#: ../cli/src/devices.c:82
msgid "WIMAX-PROPERTIES"
msgstr "WIMAX-TULAJDONSÁGOK"
#. 5
#. 0
-#: ../cli/src/devices.c:84 ../cli/src/devices.c:225
+#: ../cli/src/devices.c:83 ../cli/src/devices.c:192
msgid "NSP"
msgstr "NSP"
#. 6
-#: ../cli/src/devices.c:85
-msgid "IP4-SETTINGS"
-msgstr "IP4-BEÁLLÍTÁSOK"
+#: ../cli/src/devices.c:84
+#| msgid "IP4-DNS"
+msgid "IP4"
+msgstr "IP4"
#. 7
-#: ../cli/src/devices.c:86
-msgid "IP4-DNS"
-msgstr "IP4-DNS"
+#: ../cli/src/devices.c:85
+msgid "DHCP4"
+msgstr "DHCP4"
#. 8
-#: ../cli/src/devices.c:87
-msgid "IP6-SETTINGS"
-msgstr "IP6-BEÁLLÍTÁSOK"
+#: ../cli/src/devices.c:86
+#| msgid "IP6-DNS"
+msgid "IP6"
+msgstr "IP6"
#. 9
-#: ../cli/src/devices.c:88
-msgid "IP6-DNS"
-msgstr "IP6-DNS"
+#: ../cli/src/devices.c:87
+msgid "DHCP6"
+msgstr "DHCP6"
#. 2
+#: ../cli/src/devices.c:103
+msgid "VENDOR"
+msgstr "GYÁRTÓ"
+
+#. 3
#: ../cli/src/devices.c:104
+msgid "PRODUCT"
+msgstr "TERMÉK"
+
+#. 4
+#: ../cli/src/devices.c:105
msgid "DRIVER"
msgstr "ILLESZTŐPROGRAM"
-#. 3
-#: ../cli/src/devices.c:105
+#. 5
+#: ../cli/src/devices.c:106
msgid "HWADDR"
msgstr "HWCÍM"
+#. 7
+#: ../cli/src/devices.c:108
+#| msgid "READONLY"
+msgid "REASON"
+msgstr "OK"
+
+#. 8
+#: ../cli/src/devices.c:109
+msgid "UDI"
+msgstr "UDI"
+
+#. 9
+#: ../cli/src/devices.c:110
+msgid "IP-IFACE"
+msgstr "IP-CSAT"
+
+#. 10
+#: ../cli/src/devices.c:111
+msgid "NM-MANAGED"
+msgstr "NM-KEZELT"
+
+#. 11
+#: ../cli/src/devices.c:112
+msgid "FIRMWARE-MISSING"
+msgstr "FIRMWARE-HIÁNYZIK"
+
+#. 12
+#: ../cli/src/devices.c:113
+#| msgid "AUTOCONNECT"
+msgid "CONNECTION"
+msgstr "CSATLAKOZÁS"
+
#. 0
-#: ../cli/src/devices.c:115
+#: ../cli/src/devices.c:122
msgid "CARRIER-DETECT"
-msgstr "HORDOZÓ-FELISMERÉS"
+msgstr "VIVŐJEL-FELISMERÉS"
#. 1
-#: ../cli/src/devices.c:116
+#: ../cli/src/devices.c:123
msgid "SPEED"
msgstr "SEBESSÉG"
#. 0
-#: ../cli/src/devices.c:125
+#: ../cli/src/devices.c:132
msgid "CARRIER"
-msgstr "HORDOZÓ"
+msgstr "VIVŐJEL"
#. 0
-#: ../cli/src/devices.c:135
+#: ../cli/src/devices.c:142
msgid "WEP"
msgstr "WEP"
#. 1
-#: ../cli/src/devices.c:136
+#: ../cli/src/devices.c:143
msgid "WPA"
msgstr "WPA"
#. 2
-#: ../cli/src/devices.c:137
+#: ../cli/src/devices.c:144
msgid "WPA2"
msgstr "WPA2"
#. 3
-#: ../cli/src/devices.c:138
+#: ../cli/src/devices.c:145
msgid "TKIP"
msgstr "TKIP"
#. 4
-#: ../cli/src/devices.c:139
+#: ../cli/src/devices.c:146
msgid "CCMP"
msgstr "CCMP"
#. 0
-#: ../cli/src/devices.c:149
+#: ../cli/src/devices.c:156
msgid "CTR-FREQ"
msgstr "CTR-FREK"
#. 1
-#: ../cli/src/devices.c:150
+#: ../cli/src/devices.c:157
msgid "RSSI"
msgstr "RSSI"
#. 2
-#: ../cli/src/devices.c:151
+#: ../cli/src/devices.c:158
msgid "CINR"
msgstr "CINR"
#. 3
-#: ../cli/src/devices.c:152
+#: ../cli/src/devices.c:159
msgid "TX-POW"
msgstr "TX-POW"
#. 4
-#: ../cli/src/devices.c:153
+#: ../cli/src/devices.c:160
msgid "BSID"
msgstr "BSID"
#. 0
-#: ../cli/src/devices.c:163 ../cli/src/devices.c:174
-msgid "ADDRESS"
-msgstr "CÍM"
-
-#. 1
-#: ../cli/src/devices.c:164 ../cli/src/devices.c:175
-msgid "PREFIX"
-msgstr "ELŐTAG"
-
-#. 2
-#: ../cli/src/devices.c:165 ../cli/src/devices.c:176
-msgid "GATEWAY"
-msgstr "ÁTJÁRÓ"
-
-#. 0
-#: ../cli/src/devices.c:185 ../cli/src/devices.c:194
-msgid "DNS"
-msgstr "DNS"
-
-#. 0
-#: ../cli/src/devices.c:203
+#: ../cli/src/devices.c:170
msgid "SSID"
msgstr "SSID"
#. 1
-#: ../cli/src/devices.c:204
+#: ../cli/src/devices.c:171
msgid "BSSID"
msgstr "BSSID"
#. 2
-#: ../cli/src/devices.c:205
+#: ../cli/src/devices.c:172
msgid "MODE"
msgstr "MÓD"
#. 3
-#: ../cli/src/devices.c:206
+#: ../cli/src/devices.c:173
msgid "FREQ"
msgstr "FREK"
#. 4
-#: ../cli/src/devices.c:207
+#: ../cli/src/devices.c:174
msgid "RATE"
msgstr "SEBESSÉG"
#. 5
#. 1
-#: ../cli/src/devices.c:208 ../cli/src/devices.c:226
+#: ../cli/src/devices.c:175 ../cli/src/devices.c:193
msgid "SIGNAL"
msgstr "SZIGNÁL"
#. 6
-#: ../cli/src/devices.c:209
+#: ../cli/src/devices.c:176
msgid "SECURITY"
msgstr "BIZTONSÁG"
#. 7
-#: ../cli/src/devices.c:210
+#: ../cli/src/devices.c:177
msgid "WPA-FLAGS"
msgstr "WPA-JELZŐK"
#. 8
-#: ../cli/src/devices.c:211
+#: ../cli/src/devices.c:178
msgid "RSN-FLAGS"
msgstr "RSN-JELZŐK"
#. 10
#. 4
-#: ../cli/src/devices.c:213 ../cli/src/devices.c:229
+#: ../cli/src/devices.c:180 ../cli/src/devices.c:196
msgid "ACTIVE"
msgstr "AKTÍV"
-#: ../cli/src/devices.c:256
-#, c-format
+#: ../cli/src/devices.c:213
+#, c-format
+#| msgid ""
+#| "Usage: nmcli dev { COMMAND | help }\n"
+#| "\n"
+#| " COMMAND := { status | list | disconnect | wifi | wimax }\n"
+#| "\n"
+#| " COMMAND := { status | list | disconnect | wifi }\n"
+#| "\n"
+#| " status\n"
+#| " list [iface <iface>]\n"
+#| " disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
+#| " wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+#| " wimax [list [iface <iface>] [nsp <name>]]\n"
+#| "\n"
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
"\n"
@@ -690,7 +870,7 @@ msgid ""
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
msgstr ""
@@ -703,156 +883,371 @@ msgstr ""
" status\n"
" list [iface <csatoló>]\n"
" disconnect iface <csatoló> [--nowait] [--timeout <időkorlát>]\n"
-" wifi [list [iface <csatoló>] [hwaddr <hwcím>]]\n"
+" wifi [list [iface <csatoló>] [bssid <hwcím>]]\n"
" wimax [list [iface <csatoló>] [nsp <név>]]\n"
"\n"
-#: ../cli/src/devices.c:284
+#: ../cli/src/devices.c:241
msgid "unmanaged"
msgstr "kezeletlen"
-#: ../cli/src/devices.c:286
+#: ../cli/src/devices.c:243
msgid "unavailable"
msgstr "elérhetetlen"
-#: ../cli/src/devices.c:288 ../cli/src/network-manager.c:115
+#: ../cli/src/devices.c:245 ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "leválasztva"
-#: ../cli/src/devices.c:290
+#: ../cli/src/devices.c:247
msgid "connecting (prepare)"
msgstr "kapcsolódás (előkészítés)"
-#: ../cli/src/devices.c:292
+#: ../cli/src/devices.c:249
msgid "connecting (configuring)"
msgstr "kapcsolódás (konfigurálás)"
-#: ../cli/src/devices.c:294
+#: ../cli/src/devices.c:251
msgid "connecting (need authentication)"
msgstr "kapcsolódás (hitelesítés szükséges)"
-#: ../cli/src/devices.c:296
+#: ../cli/src/devices.c:253
msgid "connecting (getting IP configuration)"
msgstr "kapcsolódás (IP-beállítások lekérése)"
-#: ../cli/src/devices.c:298
+#: ../cli/src/devices.c:255
msgid "connecting (checking IP connectivity)"
msgstr "kapcsolódás (IP-összekapcsolhatóság ellenőrzése)"
-#: ../cli/src/devices.c:300
+#: ../cli/src/devices.c:257
msgid "connecting (starting secondary connections)"
msgstr "kapcsolódás (másodlagos kapcsolatok indítása)"
-#: ../cli/src/devices.c:302 ../cli/src/network-manager.c:111
+#: ../cli/src/devices.c:259 ../cli/src/network-manager.c:104
msgid "connected"
msgstr "kapcsolódva"
-#: ../cli/src/devices.c:304
-msgid "deactivating"
-msgstr "kikapcsolás"
-
-#: ../cli/src/devices.c:306
+#: ../cli/src/devices.c:263
msgid "connection failed"
msgstr "kapcsolódás sikertelen"
-#: ../cli/src/devices.c:331 ../cli/src/devices.c:341 ../cli/src/devices.c:501
-#: ../cli/src/devices.c:545
+#: ../cli/src/devices.c:274
+msgid "No reason given"
+msgstr "Nincs megadva ok"
+
+#: ../cli/src/devices.c:277
+#| msgid "Unknown"
+msgid "Unknown error"
+msgstr "Ismeretlen hiba"
+
+#: ../cli/src/devices.c:280
+msgid "Device is now managed"
+msgstr "Az eszköz mostantól kezelt"
+
+#: ../cli/src/devices.c:283
+msgid "Device is now unmanaged"
+msgstr "Az eszköz mostantól nem kezelt"
+
+#: ../cli/src/devices.c:286
+#| msgid "the VPN service returned invalid configuration"
+msgid "The device could not be readied for configuration"
+msgstr "Az eszköz nem készíthető fel a beállításra"
+
+#: ../cli/src/devices.c:289
+msgid ""
+"IP configuration could not be reserved (no available address, timeout, etc)"
+msgstr ""
+"Az IP-beállítások nem foglalhatók le (nem érhető el cím, időkorlát stb.)"
+
+#: ../cli/src/devices.c:292
+msgid "The IP configuration is no longer valid"
+msgstr "Az IP-beállítások már nem érvényesek"
+
+#: ../cli/src/devices.c:295
+msgid "Secrets were required, but not provided"
+msgstr "Titkos információkra volt szükség, de nem lettek megadva"
+
+#: ../cli/src/devices.c:298
+msgid "802.1X supplicant disconnected"
+msgstr "A 802.1X-kliens bontotta a kapcsolatot"
+
+#: ../cli/src/devices.c:301
+msgid "802.1X supplicant configuration failed"
+msgstr "A 802.1X-kliens beállítása meghiúsult"
+
+#: ../cli/src/devices.c:304
+msgid "802.1X supplicant failed"
+msgstr "A 802.1X-kliens sikertelen"
+
+#: ../cli/src/devices.c:307
+msgid "802.1X supplicant took too long to authenticate"
+msgstr "A 802.1X-kliens hitelesítése túl sokáig tartott"
+
+#: ../cli/src/devices.c:310
+#| msgid "the VPN service failed to start"
+msgid "PPP service failed to start"
+msgstr "A PPP szolgáltatás nem indult el"
+
+#: ../cli/src/devices.c:313
+#| msgid "VPN disconnected"
+msgid "PPP service disconnected"
+msgstr "PPP szolgáltatás leválasztva"
+
+#: ../cli/src/devices.c:316
+msgid "PPP failed"
+msgstr "A PPP sikertelen"
+
+#: ../cli/src/devices.c:319
+#| msgid "the VPN service failed to start"
+msgid "DHCP client failed to start"
+msgstr "A DHCP kliens nem indult el"
+
+#: ../cli/src/devices.c:322
+msgid "DHCP client error"
+msgstr "DHCP-klienshiba"
+
+#: ../cli/src/devices.c:325
+#| msgid "VPN connection failed"
+msgid "DHCP client failed"
+msgstr "A DHCP-kliens sikertelen"
+
+#: ../cli/src/devices.c:328
+#| msgid "the VPN service failed to start"
+msgid "Shared connection service failed to start"
+msgstr "A megosztott kapcsolat szolgáltatás nem indult el"
+
+#: ../cli/src/devices.c:331
+#| msgid "connection failed"
+msgid "Shared connection service failed"
+msgstr "A megosztott kapcsolat szolgáltatás sikertelen"
+
+#: ../cli/src/devices.c:334
+#| msgid "the VPN service failed to start"
+msgid "AutoIP service failed to start"
+msgstr "Az AutoIP szolgáltatás nem indult el"
+
+#: ../cli/src/devices.c:337
+msgid "AutoIP service error"
+msgstr "AutoIP szolgáltatáshiba"
+
+#: ../cli/src/devices.c:340
+#| msgid "the VPN service failed to start"
+msgid "AutoIP service failed"
+msgstr "Az AutoIP szolgáltatás sikertelen"
+
+#: ../cli/src/devices.c:343
+msgid "The line is busy"
+msgstr "A vonal foglalt"
+
+#: ../cli/src/devices.c:346
+msgid "No dial tone"
+msgstr "Nincs tárcsahang"
+
+#: ../cli/src/devices.c:349
+msgid "No carrier could be established"
+msgstr "Nem hozható létre vivőjel"
+
+#: ../cli/src/devices.c:352
+msgid "The dialing request timed out"
+msgstr "A tárcsázási kérés túllépte az időkorlátot"
+
+#: ../cli/src/devices.c:355
+msgid "The dialing attempt failed"
+msgstr "A tárcsázási kísérlet meghiúsult"
+
+#: ../cli/src/devices.c:358
+#| msgid "Error: Connection activation failed."
+msgid "Modem initialization failed"
+msgstr "A modem előkészítése sikertelen"
+
+#: ../cli/src/devices.c:361
+#| msgid "Failed to decrypt the private key."
+msgid "Failed to select the specified APN"
+msgstr "A megadott APN kiválasztása meghiúsult"
+
+#: ../cli/src/devices.c:364
+msgid "Not searching for networks"
+msgstr "Nem keres hálózatokat"
+
+#: ../cli/src/devices.c:367
+#| msgid "Networking enabled"
+msgid "Network registration denied"
+msgstr "Hálózatregisztráció megtagadva"
+
+#: ../cli/src/devices.c:370
+msgid "Network registration timed out"
+msgstr "A hálózatregisztráció túllépte az időkorlátot"
+
+#: ../cli/src/devices.c:373
+msgid "Failed to register with the requested network"
+msgstr "A kért hálózaton való regisztráció sikertelen"
+
+#: ../cli/src/devices.c:376
+#| msgid "VPN connection failed"
+msgid "PIN check failed"
+msgstr "A PIN ellenőrzése sikertelen"
+
+#: ../cli/src/devices.c:379
+msgid "Necessary firmware for the device may be missing"
+msgstr "Az eszközhöz szükséges firmware hiányozhat"
+
+#: ../cli/src/devices.c:382
+#| msgid "the connection was removed"
+msgid "The device was removed"
+msgstr "Az eszköz eltávolításra került"
+
+#: ../cli/src/devices.c:385
+#| msgid "NetworkManager status"
+msgid "NetworkManager went to sleep"
+msgstr "A Hálózatkezelő altatva"
+
+#: ../cli/src/devices.c:388
+#| msgid "no active connection or device"
+msgid "The device's active connection disappeared"
+msgstr "Az eszköz aktív kapcsolata eltűnt"
+
+#: ../cli/src/devices.c:391
+msgid "Device disconnected by user or client"
+msgstr "Az eszközt a felhasználó vagy a kliens leválasztotta"
+
+#: ../cli/src/devices.c:394
+msgid "Carrier/link changed"
+msgstr "A vivőjel/kapcsolat megváltozott"
+
+#: ../cli/src/devices.c:397
+#| msgid "the connection was removed"
+msgid "The device's existing connection was assumed"
+msgstr "Az eszköz meglévő kapcsolata felvéve"
+
+#: ../cli/src/devices.c:400
+msgid "The supplicant is now available"
+msgstr "A kliens nem érhető el"
+
+#: ../cli/src/devices.c:403
+#| msgid "'dhcpcd' could be found."
+msgid "The modem could not be found"
+msgstr "A modem nem található"
+
+#: ../cli/src/devices.c:406
+#| msgid "the connection attempt timed out"
+msgid "The Bluetooth connection failed or timed out"
+msgstr "A Bluetooth kapcsolódás sikertelen, vagy túllépte az időkorlátot"
+
+#: ../cli/src/devices.c:409
+msgid "GSM Modem's SIM card not inserted"
+msgstr "A GSM modem SIM kártyája nincs behelyezve"
+
+#: ../cli/src/devices.c:412
+msgid "GSM Modem's SIM PIN required"
+msgstr "A GSM modem SIM PIN kódja szükséges"
+
+#: ../cli/src/devices.c:415
+msgid "GSM Modem's SIM PUK required"
+msgstr "A GSM modem SIM PUK kódja szükséges"
+
+#: ../cli/src/devices.c:418
+msgid "GSM Modem's SIM wrong"
+msgstr "A GSM modem SIM kódja hibás"
+
+#: ../cli/src/devices.c:421
+msgid "InfiniBand device does not support connected mode"
+msgstr "Az InfiniBand eszköz nem támogatja a csatlakoztatott módot"
+
+#: ../cli/src/devices.c:423 ../cli/src/devices.c:446 ../cli/src/devices.c:458
+#: ../cli/src/devices.c:578 ../cli/src/devices.c:622
msgid "Unknown"
msgstr "Ismeretlen"
-#: ../cli/src/devices.c:374
+#: ../cli/src/devices.c:491
msgid "(none)"
msgstr "(semmi)"
-#: ../cli/src/devices.c:399
-#, c-format
-msgid "%s: error converting IP4 address 0x%X"
-msgstr "%s: hiba az IP4 cím (0x%X) konvertálásakor"
-
-#: ../cli/src/devices.c:470
+#: ../cli/src/devices.c:547
#, c-format
msgid "%u MHz"
msgstr "%u MHz"
-#: ../cli/src/devices.c:471
+#: ../cli/src/devices.c:548
#, c-format
msgid "%u MB/s"
msgstr "%u MB/s"
-#: ../cli/src/devices.c:480
+#: ../cli/src/devices.c:557
msgid "Encrypted: "
msgstr "Titkosított: "
-#: ../cli/src/devices.c:485
+#: ../cli/src/devices.c:562
msgid "WEP "
msgstr "WEP "
-#: ../cli/src/devices.c:487
+#: ../cli/src/devices.c:564
msgid "WPA "
msgstr "WPA "
-#: ../cli/src/devices.c:489
+#: ../cli/src/devices.c:566
msgid "WPA2 "
msgstr "WPA2 "
-#: ../cli/src/devices.c:492
+#: ../cli/src/devices.c:569
msgid "Enterprise "
msgstr "Enterprise "
-#: ../cli/src/devices.c:501
+#: ../cli/src/devices.c:578
msgid "Ad-Hoc"
msgstr "Eseti"
-#: ../cli/src/devices.c:501
+#: ../cli/src/devices.c:578
msgid "Infrastructure"
msgstr "Infrastruktúra"
-#: ../cli/src/devices.c:536
+#: ../cli/src/devices.c:613
msgid "Home"
msgstr "Otthoni"
-#: ../cli/src/devices.c:539
+#: ../cli/src/devices.c:616
msgid "Partner"
msgstr "Partner"
-#: ../cli/src/devices.c:542
+#: ../cli/src/devices.c:619
msgid "Roaming"
msgstr "Barangoló"
-#: ../cli/src/devices.c:612
+#: ../cli/src/devices.c:691
#, c-format
msgid "Error: 'dev list': %s"
msgstr "Hiba: „dev list”: %s"
-#: ../cli/src/devices.c:614
+#: ../cli/src/devices.c:693
#, c-format
msgid "Error: 'dev list': %s; allowed fields: %s"
msgstr "Hiba: „dev list”: %s; engedélyezett mezők: %s"
-#: ../cli/src/devices.c:623
+#: ../cli/src/devices.c:702
msgid "Device details"
msgstr "Eszköz részletei"
-#: ../cli/src/devices.c:657 ../cli/src/devices.c:1152 ../cli/src/utils.c:342
+#: ../cli/src/devices.c:744 ../cli/src/devices.c:745 ../cli/src/devices.c:1152
+#: ../cli/src/utils.c:445
msgid "(unknown)"
msgstr "(ismeretlen)"
-#: ../cli/src/devices.c:658
-msgid "unknown)"
-msgstr "ismeretlen)"
+#: ../cli/src/devices.c:753
+#| msgid "connected"
+msgid "not connected"
+msgstr "nincs kapcsolat"
-#: ../cli/src/devices.c:684
+#: ../cli/src/devices.c:780
#, c-format
msgid "%u Mb/s"
msgstr "%u Mb/s"
#. Print header
#. "WIRED-PROPERTIES"
-#: ../cli/src/devices.c:757
+#: ../cli/src/devices.c:853
msgid "on"
msgstr "be"
-#: ../cli/src/devices.c:757
+#: ../cli/src/devices.c:853
msgid "off"
msgstr "ki"
@@ -876,7 +1271,7 @@ msgid "Error: '%s' argument is missing."
msgstr "Hiba: „%s” argumentum hiányzik."
#: ../cli/src/devices.c:1101 ../cli/src/devices.c:1253
-#: ../cli/src/devices.c:1389 ../cli/src/devices.c:1608
+#: ../cli/src/devices.c:1390 ../cli/src/devices.c:1609
#, c-format
msgid "Error: Device '%s' not found."
msgstr "Hiba: a(z) „%s” eszköz nem található."
@@ -901,66 +1296,72 @@ msgstr "Eszköz állapota: %d (%s)\n"
msgid "Error: iface has to be specified."
msgstr "Hiba: meg kell adni a csatolót."
-#: ../cli/src/devices.c:1347
+#: ../cli/src/devices.c:1348
#, c-format
msgid "Error: 'dev wifi': %s"
msgstr "Hiba: „dev wifi”: %s"
-#: ../cli/src/devices.c:1349
+#: ../cli/src/devices.c:1350
#, c-format
msgid "Error: 'dev wifi': %s; allowed fields: %s"
msgstr "Hiba: „dev wifi”: %s; engedélyezett mezők: %s"
-#: ../cli/src/devices.c:1372
+#: ../cli/src/devices.c:1373
msgid "WiFi scan list"
msgstr "WiFi-keresési lista"
-#: ../cli/src/devices.c:1409 ../cli/src/devices.c:1463
-#: ../cli/src/devices.c:1670
+#: ../cli/src/devices.c:1410 ../cli/src/devices.c:1464
#, c-format
-msgid "Error: Access point with hwaddr '%s' not found."
-msgstr "Hiba: nem található a(z) „%s” hwcímű hozzáférési pont,"
+#| msgid "Error: Access point with hwaddr '%s' not found."
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "Hiba: nem található a(z) „%s” BSSID-vel rendelkező hozzáférési pont,"
-#: ../cli/src/devices.c:1426
+#: ../cli/src/devices.c:1427
#, c-format
msgid "Error: Device '%s' is not a WiFi device."
msgstr "Hiba: a(z) „%s” eszköz nem WiFi-eszköz."
-#: ../cli/src/devices.c:1490
+#: ../cli/src/devices.c:1491
#, c-format
msgid "Error: 'dev wifi' command '%s' is not valid."
msgstr "Hiba: a „dev wifi” parancs („%s) nem érvényes."
-#: ../cli/src/devices.c:1566
+#: ../cli/src/devices.c:1567
#, c-format
msgid "Error: 'dev wimax': %s"
msgstr "Hiba: „dev wimax”: %s"
-#: ../cli/src/devices.c:1568
+#: ../cli/src/devices.c:1569
#, c-format
msgid "Error: 'dev wimax': %s; allowed fields: %s"
msgstr "Hiba: „dev wimax”: %s; engedélyezett mezők: %s"
-#: ../cli/src/devices.c:1591
+#: ../cli/src/devices.c:1592
msgid "WiMAX NSP list"
msgstr "WiMAX NSP-lista"
-#: ../cli/src/devices.c:1628
+#: ../cli/src/devices.c:1629
#, c-format
msgid "Error: NSP with name '%s' not found."
msgstr "Hiba: a(z) „%s” nevű NSP nem található."
-#: ../cli/src/devices.c:1639
+#: ../cli/src/devices.c:1640
#, c-format
msgid "Error: Device '%s' is not a WiMAX device."
msgstr "Hiba: a(z) „%s” eszköz nem WiMAX-eszköz."
-#: ../cli/src/devices.c:1697
+#: ../cli/src/devices.c:1671
+#, c-format
+#| msgid "Error: Access point with hwaddr '%s' not found."
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "Hiba: nem található a(z) „%s” NSP-vel rendelkező hozzáférési pont."
+
+#: ../cli/src/devices.c:1698
#, c-format
msgid "Error: 'dev wimax' command '%s' is not valid."
msgstr "Hiba: a „dev wimax” parancs („%s) nem érvényes."
-#: ../cli/src/devices.c:1747
+#: ../cli/src/devices.c:1748
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "Hiba: a „dev” parancs („%s) nem érvényes."
@@ -1009,7 +1410,7 @@ msgstr "WIMAX-HARDVER"
msgid "WIMAX"
msgstr "WIMAX"
-#: ../cli/src/network-manager.c:74
+#: ../cli/src/network-manager.c:67
#, c-format
msgid ""
"Usage: nmcli nm { COMMAND | help }\n"
@@ -1040,141 +1441,141 @@ msgstr ""
" wimax [on|off]\n"
"\n"
-#: ../cli/src/network-manager.c:103
+#: ../cli/src/network-manager.c:96
msgid "asleep"
msgstr "alszik"
-#: ../cli/src/network-manager.c:105
+#: ../cli/src/network-manager.c:98
msgid "connecting"
msgstr "csatlakozás"
-#: ../cli/src/network-manager.c:107
+#: ../cli/src/network-manager.c:100
msgid "connected (local only)"
msgstr "kapcsolódva (csak helyi)"
-#: ../cli/src/network-manager.c:109
+#: ../cli/src/network-manager.c:102
msgid "connected (site only)"
msgstr "kapcsolódva (csak hely)"
-#: ../cli/src/network-manager.c:113
+#: ../cli/src/network-manager.c:106
msgid "disconnecting"
msgstr "leválasztás"
-#: ../cli/src/network-manager.c:153
+#: ../cli/src/network-manager.c:146
#, c-format
msgid "Error: 'nm status': %s"
msgstr "Hiba: „nm status”: %s"
-#: ../cli/src/network-manager.c:155
+#: ../cli/src/network-manager.c:148
#, c-format
msgid "Error: 'nm status': %s; allowed fields: %s"
msgstr "Hiba: „nm status”: %s; engedélyezett mezők: %s"
#. create NMClient
-#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:169
-#: ../cli/src/network-manager.c:170 ../cli/src/network-manager.c:171
-#: ../cli/src/network-manager.c:172 ../cli/src/network-manager.c:174
-#: ../cli/src/network-manager.c:175 ../cli/src/network-manager.c:296
-#: ../cli/src/network-manager.c:351 ../cli/src/network-manager.c:389
-#: ../cli/src/network-manager.c:428
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "enabled"
msgstr "engedélyezve"
-#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:169
-#: ../cli/src/network-manager.c:170 ../cli/src/network-manager.c:171
-#: ../cli/src/network-manager.c:172 ../cli/src/network-manager.c:174
-#: ../cli/src/network-manager.c:175 ../cli/src/network-manager.c:296
-#: ../cli/src/network-manager.c:351 ../cli/src/network-manager.c:389
-#: ../cli/src/network-manager.c:428
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "disabled"
msgstr "letiltva"
-#: ../cli/src/network-manager.c:188
+#: ../cli/src/network-manager.c:181
msgid "NetworkManager status"
msgstr "Hálózatkezelő állapota"
#. Print header
-#: ../cli/src/network-manager.c:191
+#: ../cli/src/network-manager.c:184
msgid "running"
msgstr "fut"
-#: ../cli/src/network-manager.c:191
+#: ../cli/src/network-manager.c:184
msgid "not running"
msgstr "nem fut"
-#: ../cli/src/network-manager.c:222 ../cli/src/utils.c:322
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:425
#, c-format
msgid "Error: Couldn't connect to system bus: %s"
msgstr "Hiba: nem lehet a rendszerbuszhoz kapcsolódni: %s"
-#: ../cli/src/network-manager.c:233
+#: ../cli/src/network-manager.c:226
#, c-format
msgid "Error: Couldn't create D-Bus object proxy."
msgstr "Hiba: nem lehet a D-Bus objektumproxyhoz kapcsolódni."
-#: ../cli/src/network-manager.c:239
+#: ../cli/src/network-manager.c:232
#, c-format
msgid "Error in sleep: %s"
msgstr "Hiba az alváskor: %s"
-#: ../cli/src/network-manager.c:283 ../cli/src/network-manager.c:338
-#: ../cli/src/network-manager.c:376 ../cli/src/network-manager.c:415
+#: ../cli/src/network-manager.c:276 ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369 ../cli/src/network-manager.c:408
#, c-format
msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
msgstr ""
"Hiba: a(z) „%s” „--fields” érték itt nem érvényes; engedélyezett mezők: %s"
-#: ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:284
msgid "Networking enabled"
msgstr "Hálózatkezelés engedélyezve"
-#: ../cli/src/network-manager.c:307
+#: ../cli/src/network-manager.c:300
#, c-format
msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
msgstr ""
"Hiba: érvénytelen „enable” paraméter: „%s”; használja a „true” vagy „false” "
"egyikét."
-#: ../cli/src/network-manager.c:317
+#: ../cli/src/network-manager.c:310
#, c-format
msgid "Error: Sleeping status is not exported by NetworkManager."
msgstr "Hiba: a Hálózatkezelő nem exportálta az alvási állapotot."
-#: ../cli/src/network-manager.c:325
+#: ../cli/src/network-manager.c:318
#, c-format
msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
msgstr ""
"Hiba: érvénytelen „sleep” paraméter: „%s”; használja a „true” vagy „false” "
"egyikét."
-#: ../cli/src/network-manager.c:346
+#: ../cli/src/network-manager.c:339
msgid "WiFi enabled"
msgstr "WiFi engedélyezve"
-#: ../cli/src/network-manager.c:362
+#: ../cli/src/network-manager.c:355
#, c-format
msgid "Error: invalid 'wifi' parameter: '%s'."
msgstr "Hiba: érvénytelen „wifi” paraméter: „%s”."
-#: ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:377
msgid "WWAN enabled"
msgstr "WWAN engedélyezve"
-#: ../cli/src/network-manager.c:400
+#: ../cli/src/network-manager.c:393
#, c-format
msgid "Error: invalid 'wwan' parameter: '%s'."
msgstr "Hiba: érvénytelen „wwan” paraméter: „%s”."
-#: ../cli/src/network-manager.c:423
+#: ../cli/src/network-manager.c:416
msgid "WiMAX enabled"
msgstr "WiMAX engedélyezve"
-#: ../cli/src/network-manager.c:439
+#: ../cli/src/network-manager.c:432
#, c-format
msgid "Error: invalid 'wimax' parameter: '%s'."
msgstr "Hiba: érvénytelen „wimax” paraméter: „%s”."
-#: ../cli/src/network-manager.c:452
+#: ../cli/src/network-manager.c:445
#, c-format
msgid "Error: 'nm' command '%s' is not valid."
msgstr "Hiba: a(z) „%s” „nm” parancs nem érvényes."
@@ -1288,116 +1689,139 @@ msgstr "Hiba: nem sikerült a NMClient objektumot létrehozni."
msgid "Success"
msgstr "Siker"
-#: ../cli/src/settings.c:423
+#: ../cli/src/settings.c:465
#, c-format
msgid "%d (hex-ascii-key)"
msgstr "%d (hex-ascii-kulcs)"
-#: ../cli/src/settings.c:425
+#: ../cli/src/settings.c:467
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (104/128 bites jelmondat)"
-#: ../cli/src/settings.c:428
+#: ../cli/src/settings.c:470
#, c-format
msgid "%d (unknown)"
msgstr "%d (ismeretlen)"
-#: ../cli/src/settings.c:454
+#: ../cli/src/settings.c:496
msgid "0 (unknown)"
msgstr "0 (ismeretlen)"
-#: ../cli/src/settings.c:460
+#: ../cli/src/settings.c:502
msgid "any, "
msgstr "bármely, "
-#: ../cli/src/settings.c:462
+#: ../cli/src/settings.c:504
msgid "900 MHz, "
msgstr "900 MHz, "
-#: ../cli/src/settings.c:464
+#: ../cli/src/settings.c:506
msgid "1800 MHz, "
msgstr "1800 MHz, "
-#: ../cli/src/settings.c:466
+#: ../cli/src/settings.c:508
msgid "1900 MHz, "
msgstr "1900 MHz, "
-#: ../cli/src/settings.c:468
+#: ../cli/src/settings.c:510
msgid "850 MHz, "
msgstr "850 MHz, "
-#: ../cli/src/settings.c:470
+#: ../cli/src/settings.c:512
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 MHz, "
-#: ../cli/src/settings.c:472
+#: ../cli/src/settings.c:514
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 MHz, "
-#: ../cli/src/settings.c:474
+#: ../cli/src/settings.c:516
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
-#: ../cli/src/settings.c:476
+#: ../cli/src/settings.c:518
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 MHz, "
-#: ../cli/src/settings.c:478
+#: ../cli/src/settings.c:520
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 MHz, "
-#: ../cli/src/settings.c:480
+#: ../cli/src/settings.c:522
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 MHz, "
-#: ../cli/src/settings.c:482
+#: ../cli/src/settings.c:524
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 MHz, "
-#: ../cli/src/settings.c:566 ../cli/src/settings.c:732
+#: ../cli/src/settings.c:526
+#| msgid "WCDMA 3GPP UMTS 900 MHz, "
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 1900 MHz, "
+
+#: ../cli/src/settings.c:528
+#| msgid "WCDMA 3GPP UMTS 2100 MHz, "
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2600 MHz, "
+
+#: ../cli/src/settings.c:650 ../cli/src/settings.c:846
+#: ../cli/src/settings.c:1550
msgid "auto"
msgstr "auto"
-#: ../cli/src/settings.c:727 ../cli/src/settings.c:730
-#: ../cli/src/settings.c:731 ../cli/src/utils.c:176
+#: ../cli/src/settings.c:840 ../cli/src/settings.c:843
+#: ../cli/src/settings.c:844 ../cli/src/utils.c:247
msgid "not set"
msgstr "nincs beállítva"
-#: ../cli/src/utils.c:128
+#: ../cli/src/utils.c:103
+#, c-format
+#| msgid "%s: error converting IP4 address 0x%X"
+msgid "Error converting IP4 address '0x%X' to text form"
+msgstr "Hiba az IP4 cím („0x%X”) szöveges formátumúvá konvertálásakor"
+
+#: ../cli/src/utils.c:131
+#, c-format
+#| msgid "%s: error converting IP4 address 0x%X"
+msgid "Error converting IP6 address '%s' to text form"
+msgstr "Hiba az IP6 cím („%s”) szöveges formátumúvá konvertálásakor"
+
+#: ../cli/src/utils.c:200
#, c-format
msgid "field '%s' has to be alone"
msgstr "a(z) „%s” mezőnek önállónak kell lennie"
-#: ../cli/src/utils.c:131
+#: ../cli/src/utils.c:203
#, c-format
msgid "invalid field '%s'"
msgstr "érvénytelen mező: „%s”"
-#: ../cli/src/utils.c:150
+#: ../cli/src/utils.c:222
#, c-format
msgid "Option '--terse' requires specifying '--fields'"
msgstr "A „--terse” megköveteli a „--fields” megadását."
-#: ../cli/src/utils.c:154
+#: ../cli/src/utils.c:226
#, c-format
msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
msgstr ""
"A „--terse” adott „--fields” kapcsolóértékeket követel meg, nem ezt: „%s”."
-#: ../cli/src/utils.c:333
+#: ../cli/src/utils.c:436
#, c-format
msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
msgstr ""
"Hiba: nem sikerült a D-Bus objektumproxyt létrehozni az org.freedesktop.DBus "
"névtérhez"
-#: ../cli/src/utils.c:341
+#: ../cli/src/utils.c:444
#, c-format
msgid "Error: NameHasOwner request failed: %s"
msgstr "Hiba: a NameHasOwner kérés meghiúsult: %s"
-#: ../cli/src/utils.c:386
+#: ../cli/src/utils.c:489
#, c-format
msgid ""
"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
@@ -1406,7 +1830,7 @@ msgstr ""
"Figyelmeztetés: az nmcli (%s) és a Hálózatkezelő (%s) verziói nem egyeznek. "
"A figyelmeztetés kikapcsolásához használja a --nocheck kapcsolót.\n"
-#: ../cli/src/utils.c:395
+#: ../cli/src/utils.c:498
#, c-format
msgid ""
"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
@@ -1416,111 +1840,130 @@ msgstr ""
"A végrehajtás kikényszerítve a --nocheck kapcsolóval, de az eredmények "
"kiszámíthatatlanok."
-#: ../libnm-util/crypto.c:127
+#: ../libnm-util/crypto.c:133
#, c-format
msgid "PEM key file had no end tag '%s'."
msgstr "A PEM kulcsfájl nem rendelkezik „%s” zárócímkével."
-#: ../libnm-util/crypto.c:140
+#: ../libnm-util/crypto.c:146
#, c-format
msgid "Doesn't look like a PEM private key file."
msgstr "Nem tűnik PEM személyes kulcs fájlnak."
-#: ../libnm-util/crypto.c:148
+#: ../libnm-util/crypto.c:154
#, c-format
msgid "Not enough memory to store PEM file data."
msgstr "Nincs elég memória a PEM fájl adatainak tárolásához."
-#: ../libnm-util/crypto.c:164
+#: ../libnm-util/crypto.c:170
#, c-format
msgid "Malformed PEM file: Proc-Type was not first tag."
msgstr "Rosszul formázott PEM fájl: a Proc-Type nem az első címke."
-#: ../libnm-util/crypto.c:172
+#: ../libnm-util/crypto.c:178
#, c-format
msgid "Malformed PEM file: unknown Proc-Type tag '%s'."
msgstr "Rosszul formázott PEM fájl: ismeretlen Proc-Type címke („%s”)."
-#: ../libnm-util/crypto.c:182
+#: ../libnm-util/crypto.c:188
#, c-format
msgid "Malformed PEM file: DEK-Info was not the second tag."
msgstr "Rosszul formázott PEM fájl: A DEK-Info nem a második címke."
-#: ../libnm-util/crypto.c:193
+#: ../libnm-util/crypto.c:199
#, c-format
msgid "Malformed PEM file: no IV found in DEK-Info tag."
msgstr "Rosszul formázott PEM fájl: nem található IV a DEK-Info címkében."
-#: ../libnm-util/crypto.c:200
+#: ../libnm-util/crypto.c:206
#, c-format
msgid "Malformed PEM file: invalid format of IV in DEK-Info tag."
msgstr ""
"Rosszul formázott PEM fájl: az IV formátuma érvénytelen a DEK-Info címkében."
-#: ../libnm-util/crypto.c:213
+#: ../libnm-util/crypto.c:219
#, c-format
msgid "Malformed PEM file: unknown private key cipher '%s'."
msgstr ""
"Rosszul formázott PEM fájl: ismeretlen személyes kulcs titkosító: „%s”."
-#: ../libnm-util/crypto.c:232
+#: ../libnm-util/crypto.c:238
#, c-format
msgid "Could not decode private key."
msgstr "A személyes kulcs nem fejthető vissza."
-#: ../libnm-util/crypto.c:268 ../libnm-util/crypto.c:554
+#: ../libnm-util/crypto.c:284
+msgid "Failed to find expected PKCS#8 start tag."
+msgstr "A várt PKCS#8 kezdőcímke nem található."
+
+#: ../libnm-util/crypto.c:292
+#, c-format
+msgid "Failed to find expected PKCS#8 end tag '%s'."
+msgstr "A várt „%s” PKCS#8 zárócímke nem található."
+
+#: ../libnm-util/crypto.c:312
+#| msgid "Not enough memory to store certificate data."
+msgid "Not enough memory to store private key data."
+msgstr "Nincs elég memória a személyes kulcs adatainak tárolásához."
+
+#: ../libnm-util/crypto.c:317
+#| msgid "Failed to decrypt the private key."
+msgid "Failed to decode PKCS#8 private key."
+msgstr "A PKCS#8 személyes kulcs visszafejtése meghiúsult."
+
+#: ../libnm-util/crypto.c:339 ../libnm-util/crypto.c:625
#, c-format
msgid "Not enough memory to store certificate data."
msgstr "Nincs elég memória a tanúsítvány adatainak tárolásához."
-#: ../libnm-util/crypto.c:294
+#: ../libnm-util/crypto.c:365
#, c-format
msgid "IV must be an even number of bytes in length."
msgstr "Az IV hosszának páros számú bájtnak kell lennie."
-#: ../libnm-util/crypto.c:303
+#: ../libnm-util/crypto.c:374
#, c-format
msgid "Not enough memory to store the IV."
msgstr "Nincs elég memória az IV tárolásához."
-#: ../libnm-util/crypto.c:314
+#: ../libnm-util/crypto.c:385
#, c-format
msgid "IV contains non-hexadecimal digits."
msgstr "Az IV nem hexadecimális számjegyeket tartalmaz."
-#: ../libnm-util/crypto.c:352 ../libnm-util/crypto_gnutls.c:149
-#: ../libnm-util/crypto_gnutls.c:267 ../libnm-util/crypto_nss.c:171
-#: ../libnm-util/crypto_nss.c:336
+#: ../libnm-util/crypto.c:423 ../libnm-util/crypto_gnutls.c:147
+#: ../libnm-util/crypto_gnutls.c:265 ../libnm-util/crypto_nss.c:167
+#: ../libnm-util/crypto_nss.c:332
#, c-format
msgid "Private key cipher '%s' was unknown."
msgstr "A(z) „%s” személyeskulcs-titkosító ismeretlen."
-#: ../libnm-util/crypto.c:361
+#: ../libnm-util/crypto.c:432
#, c-format
msgid "Not enough memory to decrypt private key."
msgstr "Nincs elég memória a személyes kulcs visszafejtéséhez."
-#: ../libnm-util/crypto.c:426
+#: ../libnm-util/crypto.c:497
#, c-format
msgid "Not enough memory to store decrypted private key."
msgstr "Nincs elég memória a visszafejtett személyes kulcs tárolásához."
-#: ../libnm-util/crypto.c:471
+#: ../libnm-util/crypto.c:542
#, c-format
msgid "Unable to determine private key type."
msgstr "A személyes kulcs típusa nem határozható meg."
-#: ../libnm-util/crypto.c:526
+#: ../libnm-util/crypto.c:597
#, c-format
msgid "PEM certificate had no start tag '%s'."
msgstr "A PEM tanúsítvány nem tartalmaz kezdő „%s” címkét."
-#: ../libnm-util/crypto.c:535
+#: ../libnm-util/crypto.c:606
#, c-format
msgid "PEM certificate had no end tag '%s'."
msgstr "A PEM tanúsítvány nem tartalmaz záró „%s” címkét."
-#: ../libnm-util/crypto.c:559
+#: ../libnm-util/crypto.c:630
#, c-format
msgid "Failed to decode certificate."
msgstr "A tanúsítvány visszafejtése meghiúsult."
@@ -1529,285 +1972,307 @@ msgstr "A tanúsítvány visszafejtése meghiúsult."
msgid "Failed to initialize the crypto engine."
msgstr "A titkosító alrendszer előkészítése meghiúsult."
-#: ../libnm-util/crypto_gnutls.c:94
+#: ../libnm-util/crypto_gnutls.c:92
#, c-format
msgid "Failed to initialize the MD5 engine: %s / %s."
msgstr "Az MD5 alrendszer előkészítése meghiúsult: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:157
+#: ../libnm-util/crypto_gnutls.c:155
#, c-format
msgid "Invalid IV length (must be at least %zd)."
msgstr "Érvénytelen IV hossz (legalább %zd hosszúnak kell lennie)."
-#: ../libnm-util/crypto_gnutls.c:166 ../libnm-util/crypto_nss.c:188
+#: ../libnm-util/crypto_gnutls.c:164 ../libnm-util/crypto_nss.c:184
#, c-format
msgid "Not enough memory for decrypted key buffer."
msgstr "Nincs elég memória a visszafejtett kulcspufferhez."
-#: ../libnm-util/crypto_gnutls.c:174
+#: ../libnm-util/crypto_gnutls.c:172
#, c-format
msgid "Failed to initialize the decryption cipher context: %s / %s."
msgstr ""
"A visszafejtési titkosító kontextusának előkészítése meghiúsult: %s /%s."
-#: ../libnm-util/crypto_gnutls.c:183
+#: ../libnm-util/crypto_gnutls.c:181
#, c-format
msgid "Failed to set symmetric key for decryption: %s / %s."
msgstr "A szimmetrikus kulcs beállítása meghiúsult a visszafejtéshez: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:192
+#: ../libnm-util/crypto_gnutls.c:190
#, c-format
msgid "Failed to set IV for decryption: %s / %s."
msgstr "Az IV beállítása meghiúsult a visszafejtéshez: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:201
+#: ../libnm-util/crypto_gnutls.c:199
#, c-format
msgid "Failed to decrypt the private key: %s / %s."
msgstr "A személyes kulcs visszafejtése meghiúsult: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:211 ../libnm-util/crypto_nss.c:267
+#: ../libnm-util/crypto_gnutls.c:209 ../libnm-util/crypto_nss.c:263
#, c-format
msgid "Failed to decrypt the private key: unexpected padding length."
msgstr "A személyes kulcs visszafejtése meghiúsult: váratlan kitöltéshossz."
-#: ../libnm-util/crypto_gnutls.c:222 ../libnm-util/crypto_nss.c:278
+#: ../libnm-util/crypto_gnutls.c:220 ../libnm-util/crypto_nss.c:274
#, c-format
msgid "Failed to decrypt the private key."
msgstr "A személyes kulcs visszafejtése meghiúsult."
-#: ../libnm-util/crypto_gnutls.c:287 ../libnm-util/crypto_nss.c:356
+#: ../libnm-util/crypto_gnutls.c:285 ../libnm-util/crypto_nss.c:352
#, c-format
msgid "Could not allocate memory for encrypting."
msgstr "Nem sikerült memóriát foglalni a titkosításhoz."
-#: ../libnm-util/crypto_gnutls.c:295
+#: ../libnm-util/crypto_gnutls.c:293
#, c-format
msgid "Failed to initialize the encryption cipher context: %s / %s."
msgstr "A titkosító kontextusának előkészítése meghiúsult: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:304
+#: ../libnm-util/crypto_gnutls.c:302
#, c-format
msgid "Failed to set symmetric key for encryption: %s / %s."
msgstr "A szimmetrikus kulcs beállítása meghiúsult a titkosításhoz: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:314
+#: ../libnm-util/crypto_gnutls.c:312
#, c-format
msgid "Failed to set IV for encryption: %s / %s."
msgstr "Az IV beállítása meghiúsult a titkosításhoz: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:323
+#: ../libnm-util/crypto_gnutls.c:321
#, c-format
msgid "Failed to encrypt the data: %s / %s."
msgstr "Az adatot nem sikerült titkosítani: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:363
+#: ../libnm-util/crypto_gnutls.c:361
#, c-format
msgid "Error initializing certificate data: %s"
msgstr "Hiba a tanúsítvány adatainak előkészítésekor: %s"
-#: ../libnm-util/crypto_gnutls.c:385
+#: ../libnm-util/crypto_gnutls.c:383
#, c-format
msgid "Couldn't decode certificate: %s"
msgstr "A tanúsítvány nem fejthető vissza: %s"
-#: ../libnm-util/crypto_gnutls.c:409
+#: ../libnm-util/crypto_gnutls.c:407
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %s"
msgstr "A PKCS#12 dekódoló nem készíthető elő: %s"
-#: ../libnm-util/crypto_gnutls.c:422
+#: ../libnm-util/crypto_gnutls.c:420
#, c-format
msgid "Couldn't decode PKCS#12 file: %s"
msgstr "A PKCS#12 fájl nem fejthető vissza: %s"
-#: ../libnm-util/crypto_gnutls.c:434
+#: ../libnm-util/crypto_gnutls.c:432
#, c-format
msgid "Couldn't verify PKCS#12 file: %s"
msgstr "A PKCS#12 fájl nem ellenőrizhető: %s"
+#: ../libnm-util/crypto_gnutls.c:460
+#, c-format
+#| msgid "Couldn't initialize PKCS#12 decoder: %s"
+msgid "Couldn't initialize PKCS#8 decoder: %s"
+msgstr "A PKCS#8 dekódoló nem készíthető elő: %s"
+
+#: ../libnm-util/crypto_gnutls.c:483
+#, c-format
+#| msgid "Couldn't decode PKCS#12 file: %s"
+msgid "Couldn't decode PKCS#8 file: %s"
+msgstr "A PKCS#8 fájl nem fejthető vissza: %s"
+
#: ../libnm-util/crypto_nss.c:56
#, c-format
msgid "Failed to initialize the crypto engine: %d."
msgstr "A titkosító alrendszer előkészítése meghiúsult: %d."
-#: ../libnm-util/crypto_nss.c:111
+#: ../libnm-util/crypto_nss.c:107
#, c-format
msgid "Failed to initialize the MD5 context: %d."
msgstr "Az MD5 kontextus előkészítése meghiúsult: %d."
-#: ../libnm-util/crypto_nss.c:179
+#: ../libnm-util/crypto_nss.c:175
#, c-format
msgid "Invalid IV length (must be at least %d)."
msgstr "Érvénytelen IV hossz (legalább %d hosszúnak kell lennie)."
-#: ../libnm-util/crypto_nss.c:196
+#: ../libnm-util/crypto_nss.c:192
#, c-format
msgid "Failed to initialize the decryption cipher slot."
msgstr "A visszafejtési titkosítóhely előkészítése meghiúsult."
-#: ../libnm-util/crypto_nss.c:206
+#: ../libnm-util/crypto_nss.c:202
#, c-format
msgid "Failed to set symmetric key for decryption."
msgstr "A szimmetrikus kulcs nem állítható be a visszafejtéshez."
-#: ../libnm-util/crypto_nss.c:216
+#: ../libnm-util/crypto_nss.c:212
#, c-format
msgid "Failed to set IV for decryption."
msgstr "Az IV nem állítható be a visszafejtéshez."
-#: ../libnm-util/crypto_nss.c:224
+#: ../libnm-util/crypto_nss.c:220
#, c-format
msgid "Failed to initialize the decryption context."
msgstr "A visszafejtési kontextus előkészítése meghiúsult."
-#: ../libnm-util/crypto_nss.c:237
+#: ../libnm-util/crypto_nss.c:233
#, c-format
msgid "Failed to decrypt the private key: %d."
msgstr "A személyes kulcs visszafejtése meghiúsult: %d."
-#: ../libnm-util/crypto_nss.c:245
+#: ../libnm-util/crypto_nss.c:241
#, c-format
msgid "Failed to decrypt the private key: decrypted data too large."
msgstr ""
"A személyes kulcs visszafejtése meghiúsult: a visszafejtett adatok túl "
"nagyok."
-#: ../libnm-util/crypto_nss.c:256
+#: ../libnm-util/crypto_nss.c:252
#, c-format
msgid "Failed to finalize decryption of the private key: %d."
msgstr "A személyes kulcs visszafejtésének befejezése meghiúsult: %d."
-#: ../libnm-util/crypto_nss.c:364
+#: ../libnm-util/crypto_nss.c:360
#, c-format
msgid "Failed to initialize the encryption cipher slot."
msgstr "A titkosítóhely előkészítése meghiúsult."
-#: ../libnm-util/crypto_nss.c:372
+#: ../libnm-util/crypto_nss.c:368
#, c-format
msgid "Failed to set symmetric key for encryption."
msgstr "A szimmetrikus kulcs nem állítható be a titkosításhoz."
-#: ../libnm-util/crypto_nss.c:380
+#: ../libnm-util/crypto_nss.c:376
#, c-format
msgid "Failed to set IV for encryption."
msgstr "Az IV nem állítható be a titkosításhoz."
-#: ../libnm-util/crypto_nss.c:388
+#: ../libnm-util/crypto_nss.c:384
#, c-format
msgid "Failed to initialize the encryption context."
msgstr "A titkosítási kontextus előkészítése meghiúsult."
-#: ../libnm-util/crypto_nss.c:396
+#: ../libnm-util/crypto_nss.c:392
#, c-format
msgid "Failed to encrypt: %d."
msgstr "A titkosítás meghiúsult: %d."
-#: ../libnm-util/crypto_nss.c:404
+#: ../libnm-util/crypto_nss.c:400
#, c-format
msgid "Unexpected amount of data after encrypting."
msgstr "Váratlan mennyiségű adat a titkosítás után."
-#: ../libnm-util/crypto_nss.c:447
+#: ../libnm-util/crypto_nss.c:443
#, c-format
msgid "Couldn't decode certificate: %d"
msgstr "A tanúsítvány nem fejthető vissza: %d"
-#: ../libnm-util/crypto_nss.c:482
+#: ../libnm-util/crypto_nss.c:478
#, c-format
msgid "Couldn't convert password to UCS2: %d"
msgstr "A jelszó nem alakítható UCS2 formátumra: %d"
-#: ../libnm-util/crypto_nss.c:510
+#: ../libnm-util/crypto_nss.c:506
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %d"
msgstr "A PKCS#12 dekódoló nem készíthető elő: %d"
-#: ../libnm-util/crypto_nss.c:519
+#: ../libnm-util/crypto_nss.c:515
#, c-format
msgid "Couldn't decode PKCS#12 file: %d"
msgstr "A PKCS#12 fájl nem fejthető vissza: %d"
-#: ../libnm-util/crypto_nss.c:528
+#: ../libnm-util/crypto_nss.c:524
#, c-format
msgid "Couldn't verify PKCS#12 file: %d"
msgstr "A PKCS#12 fájl nem ellenőrizhető: %d"
-#: ../libnm-util/crypto_nss.c:557
+#: ../libnm-util/crypto_nss.c:568
msgid "Could not generate random data."
msgstr "Nem sikerült a véletlen adatok előállítása."
-#: ../libnm-util/nm-utils.c:1989
+#: ../libnm-util/nm-utils.c:2034
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "Nincs elég memória titkosítási kulcs készítéséhez."
-#: ../libnm-util/nm-utils.c:2099
+#: ../libnm-util/nm-utils.c:2144
msgid "Could not allocate memory for PEM file creation."
msgstr "Nem sikerült memóriát foglalni PEM fájl készítéséhez."
-#: ../libnm-util/nm-utils.c:2111
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "Nem sikerült memóriát foglalni az IV írásához PEM fájlba."
-#: ../libnm-util/nm-utils.c:2123
+#: ../libnm-util/nm-utils.c:2168
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr ""
"Nem sikerült memóriát foglalni a titkosított kulcs PEM fájlba írásához."
-#: ../libnm-util/nm-utils.c:2142
+#: ../libnm-util/nm-utils.c:2187
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "Nem sikerült memóriát foglalni a PEM fájl adatainak."
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
-msgid "Allow control of network connections"
-msgstr "Hálózati kapcsolatok felügyeletének engedélyezése"
+msgid "Enable or disable system networking"
+msgstr "Rendszer hálózatkezelésének be- és kikapcsolása"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
-msgid "Connection sharing via a protected WiFi network"
-msgstr "Kapcsolatmegosztás védett WiFi hálózaton"
+msgid "System policy prevents enabling or disabling system networking"
+msgstr ""
+"A rendszer házirendje megakadályozza a rendszer hálózatkezelésének be- vagy "
+"kikapcsolását"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
-msgid "Connection sharing via an open WiFi network"
-msgstr "Kapcsolatmegosztás nyílt WiFi hálózaton"
+msgid ""
+"Put NetworkManager to sleep or wake it up (should only be used by system "
+"power management)"
+msgstr ""
+"Hálózatkezelő elaltatása vagy felébresztése (csak a rendszer "
+"energiagazdálkodása által használandó)"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
-msgid "Enable or disable WiFi devices"
-msgstr "WiFi eszközök be- és kikapcsolása"
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr ""
+"A rendszer házirendje megakadályozza a Hálózatkezelő elaltatását vagy "
+"felébresztését"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
-msgid "Enable or disable WiMAX mobile broadband devices"
-msgstr "WiMAX mobil széles sávú eszközök be- és kikapcsolása"
+msgid "Enable or disable WiFi devices"
+msgstr "WiFi eszközök be- és kikapcsolása"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
-msgid "Enable or disable mobile broadband devices"
-msgstr "Mobil széles sávú eszközök be- és kikapcsolása"
+msgid "System policy prevents enabling or disabling WiFi devices"
+msgstr ""
+"A rendszer házirendje megakadályozza a WiFi eszközök be- vagy kikapcsolását"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
-msgid "Enable or disable system networking"
-msgstr "Rendszer hálózatkezelésének be- és kikapcsolása"
+msgid "Enable or disable mobile broadband devices"
+msgstr "Mobil széles sávú eszközök be- és kikapcsolása"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
-msgid "Modify network connections for all users"
-msgstr "Hálózati kapcsolatok módosítása minden felhasználó számára"
+msgid "System policy prevents enabling or disabling mobile broadband devices"
+msgstr ""
+"A rendszer házirendje megakadályozza a mobil széles sávú eszközök be- vagy "
+"kikapcsolását"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
-msgid "Modify persistent system hostname"
-msgstr "Állandó rendszergépnév módosítása"
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "WiMAX mobil széles sávú eszközök be- és kikapcsolása"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
-msgid "Modify personal network connections"
-msgstr "Személyes hálózati kapcsolatok módosítása"
-
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
msgid ""
-"Put NetworkManager to sleep or wake it up (should only be used by system "
-"power management)"
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
msgstr ""
-"Hálózatkezelő elaltatása vagy felébresztése (csak a rendszer "
-"energiagazdálkodása által használandó)"
+"A rendszer házirendje megakadályozza a WiMAX mobil széles sávú eszközök be- "
+"vagy kikapcsolását"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
+msgid "Allow control of network connections"
+msgstr "Hálózati kapcsolatok felügyeletének engedélyezése"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
msgid "System policy prevents control of network connections"
@@ -1815,34 +2280,28 @@ msgstr ""
"A rendszer házirendje megakadályozza a hálózati kapcsolatok felügyeletét"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
-msgid "System policy prevents enabling or disabling WiFi devices"
-msgstr ""
-"A rendszer házirendje megakadályozza a WiFi eszközök be- vagy kikapcsolását"
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Kapcsolatmegosztás védett WiFi hálózaton"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
-msgid ""
-"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgid "System policy prevents sharing connections via a protected WiFi network"
msgstr ""
-"A rendszer házirendje megakadályozza a WiMAX mobil széles sávú eszközök be- "
-"vagy kikapcsolását"
+"A rendszer házirendje megakadályozza a kapcsolatok megosztását védett WiFi "
+"hálózaton"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
-msgid "System policy prevents enabling or disabling mobile broadband devices"
-msgstr ""
-"A rendszer házirendje megakadályozza a mobil széles sávú eszközök be- vagy "
-"kikapcsolását"
+msgid "Connection sharing via an open WiFi network"
+msgstr "Kapcsolatmegosztás nyílt WiFi hálózaton"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
-msgid "System policy prevents enabling or disabling system networking"
+msgid "System policy prevents sharing connections via an open WiFi network"
msgstr ""
-"A rendszer házirendje megakadályozza a rendszer hálózatkezelésének be- vagy "
-"kikapcsolását"
+"A rendszer házirendje megakadályozza a kapcsolatok megosztását nyílt WiFi "
+"hálózaton"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
-msgid "System policy prevents modification of network settings for all users"
-msgstr ""
-"A rendszer házirendje megakadályozza a hálózati beállítások módosítását "
-"minden felhasználó számára"
+msgid "Modify personal network connections"
+msgstr "Személyes hálózati kapcsolatok módosítása"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
msgid "System policy prevents modification of personal network settings"
@@ -1851,41 +2310,175 @@ msgstr ""
"módosítását"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
-msgid "System policy prevents modification of the persistent system hostname"
-msgstr ""
-"A rendszer házirendje megakadályozza a rendszer állandó gépnevének "
-"módosítását"
+msgid "Modify network connections for all users"
+msgstr "Hálózati kapcsolatok módosítása minden felhasználó számára"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
-msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgid "System policy prevents modification of network settings for all users"
msgstr ""
-"A rendszer házirendje megakadályozza a Hálózatkezelő elaltatását vagy "
-"felébresztését"
+"A rendszer házirendje megakadályozza a hálózati beállítások módosítását "
+"minden felhasználó számára"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
-msgid "System policy prevents sharing connections via a protected WiFi network"
-msgstr ""
-"A rendszer házirendje megakadályozza a kapcsolatok megosztását védett WiFi "
-"hálózaton"
+msgid "Modify persistent system hostname"
+msgstr "Állandó rendszergépnév módosítása"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
-msgid "System policy prevents sharing connections via an open WiFi network"
+msgid "System policy prevents modification of the persistent system hostname"
msgstr ""
-"A rendszer házirendje megakadályozza a kapcsolatok megosztását nyílt WiFi "
-"hálózaton"
+"A rendszer házirendje megakadályozza a rendszer állandó gépnevének "
+"módosítását"
+
+#: ../src/main.c:143
+#, c-format
+#| msgid "Failed to initialize the crypto engine: %d."
+msgid "Failed to initialize SIGTERM pipe: %d"
+msgstr "A SIGTERM adatcsatorna előkészítése meghiúsult: %d"
-#: ../src/main.c:519
+#: ../src/main.c:174
+#, c-format
+msgid "Opening %s failed: %s\n"
+msgstr "%s megnyitása sikertelen: %s\n"
+
+#: ../src/main.c:180
+#, c-format
+msgid "Writing to %s failed: %s\n"
+msgstr "Nem sikerült írni a(z) %s fájlba: %s\n"
+
+#: ../src/main.c:185
+#, c-format
+msgid "Closing %s failed: %s\n"
+msgstr "%s lezárása sikertelen: %s\n"
+
+#: ../src/main.c:228
+#, c-format
+#| msgid "Error: NetworkManager is not running."
+msgid "NetworkManager is already running (pid %ld)\n"
+msgstr "A Hálózatkezelő már fut (pid: %ld)\n"
+
+#: ../src/main.c:365
+#| msgid "NetworkManager status"
+msgid "Print NetworkManager version and exit"
+msgstr "A Hálózatkezelő verziószámának kiírása és kilépés"
+
+#: ../src/main.c:366
+msgid "Don't become a daemon"
+msgstr "Ne démonként fusson"
+
+#: ../src/main.c:367
+msgid "Make all warnings fatal"
+msgstr "Minden figyelmeztetés végzetes legyen"
+
+#: ../src/main.c:368
+msgid "Specify the location of a PID file"
+msgstr "A PID fájl helyének megadása"
+
+#: ../src/main.c:368
+msgid "filename"
+msgstr "fájlnév"
+
+#: ../src/main.c:369
+msgid "State file location"
+msgstr "Állapotfájl helye"
+
+#: ../src/main.c:369
+msgid "/path/to/state.file"
+msgstr "/útvonal/állapot.fájl"
+
+#: ../src/main.c:370
+msgid "Config file location"
+msgstr "Beállítófájl helye"
+
+#: ../src/main.c:370
+msgid "/path/to/config.file"
+msgstr "/útvonal/beállító.fájl"
+
+#: ../src/main.c:371
+msgid "List of plugins separated by ','"
+msgstr "Bővítmények „,”-vel elválasztott listája"
+
+#: ../src/main.c:371
+msgid "plugin1,plugin2"
+msgstr "bővítmény1,bővítmény2"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:373
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgstr "Naplózási szint: az [ERR, WARN, INFO, DEBUG] egyike"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:376
+msgid ""
+"Log domains separated by ',': any combination of\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+msgstr ""
+"Naplózási tartományok „,”-vel elválasztva: az alábbiak tetszőleges "
+"kombinációja:\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+
+#: ../src/main.c:386
+#, c-format
+msgid "GModules are not supported on your platform!\n"
+msgstr "A platform nem támogatja a GModule-okat!\n"
+
+#: ../src/main.c:405
+msgid ""
+"NetworkManager monitors all network connections and automatically\n"
+"chooses the best connection to use. It also allows the user to\n"
+"specify wireless access points which wireless cards in the computer\n"
+"should associate with."
+msgstr ""
+"A Hálózatkezelő minden hálózati kapcsolatot felügyel, és automatikusan\n"
+"kiválasztja a használható legjobbat. Lehetővé teszi a felhasználónak azon\n"
+"vezeték nélküli hozzáférési pontok megadását, amelyekhez a számítógépben "
+"lévő\n"
+"vezeték nélküli kártyáknak kapcsolódniuk kell."
+
+#: ../src/main.c:411
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr ""
"Érvénytelen kapcsoló. Az érvényes kapcsolók listájáért használja a --help "
"kapcsolót.\n"
-#: ../src/main.c:590
+#: ../src/main.c:421
+#, c-format
+msgid "You must be root to run NetworkManager!\n"
+msgstr "A Hálózatkezelő futtatásához rendszergazdai jogosultság szükséges!\n"
+
+#: ../src/main.c:441
+#, c-format
+#| msgid "Failed to set IV for encryption: %s / %s."
+msgid "Failed to read configuration: (%d) %s\n"
+msgstr "A beállítások olvasása sikertelen: (%d) %s\n"
+
+#: ../src/main.c:452
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. Használja a --help kapcsolót az érvényes kapcsolókért.\n"
+#: ../src/main.c:459
+#, c-format
+msgid "State file %s parsing failed: (%d) %s\n"
+msgstr "A(z) %s állapotfájl feldolgozása sikertelen: (%d) %s\n"
+
+#: ../src/main.c:476
+#, c-format
+msgid "Could not daemonize: %s [error %u]\n"
+msgstr "Nem lehet démon módban elindulni: %s [hiba: %u]\n"
+
#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
msgstr "# Készítette a Hálózatkezelő\n"
@@ -1916,119 +2509,143 @@ msgstr "A „dhcpd” nem használható."
msgid "unsupported DHCP client '%s'"
msgstr "nem támogatott DHCP-kliens („%s”)"
-#: ../src/dns-manager/nm-dns-manager.c:367
+#: ../src/dns-manager/nm-dns-manager.c:376
msgid "NOTE: the libc resolver may not support more than 3 nameservers."
msgstr "MEGJEGYZÉS: a libc feloldó nem támogat háromnál több névkiszolgálót."
-#: ../src/dns-manager/nm-dns-manager.c:369
+#: ../src/dns-manager/nm-dns-manager.c:378
msgid "The nameservers listed below may not be recognized."
msgstr ""
"Az alább felsorolt névkiszolgálók lehet, hogy nem kerülnek felismerésre."
-#: ../src/logging/nm-logging.c:149
+#: ../src/logging/nm-logging.c:153
#, c-format
msgid "Unknown log level '%s'"
msgstr "Ismeretlen naplózási szint: „%s”"
-#: ../src/logging/nm-logging.c:174
+#: ../src/logging/nm-logging.c:178
#, c-format
msgid "Unknown log domain '%s'"
msgstr "Ismeretlen naplózási tartomány: „%s”"
-#: ../src/modem-manager/nm-modem-cdma.c:296 ../src/nm-device-bt.c:355
+#: ../src/modem-manager/nm-modem-cdma.c:308 ../src/nm-device-bt.c:354
#, c-format
msgid "CDMA connection %d"
msgstr "%d. CDMA kapcsolat"
-#: ../src/modem-manager/nm-modem-gsm.c:499 ../src/nm-device-bt.c:351
+#: ../src/modem-manager/nm-modem-gsm.c:542 ../src/nm-device-bt.c:350
#, c-format
msgid "GSM connection %d"
msgstr "%d. GSM kapcsolat"
-#: ../src/nm-device-bt.c:326
+#: ../src/nm-device-bt.c:325
#, c-format
msgid "PAN connection %d"
msgstr "%d. PAN kapcsolat"
-#: ../src/nm-device-bt.c:359
+#: ../src/nm-device-bt.c:358
#, c-format
msgid "DUN connection %d"
msgstr "%d. DUN kapcsolat"
-#: ../src/nm-device-ethernet.c:1682
+#: ../src/nm-device-ethernet.c:1382
#, c-format
msgid "PPPoE connection %d"
msgstr "%d. PPPoE kapcsolat"
-#: ../src/nm-device-ethernet.c:1682
+#: ../src/nm-device-ethernet.c:1382 ../src/settings/nm-settings-utils.c:50
#, c-format
msgid "Wired connection %d"
msgstr "%d. vezetékes kapcsolat"
-#: ../src/nm-device-olpc-mesh.c:423
+#: ../src/nm-device-infiniband.c:332
+#, c-format
+#| msgid "Wired connection %d"
+msgid "InfiniBand connection %d"
+msgstr "%d. InfiniBand kapcsolat"
+
+#: ../src/nm-device-olpc-mesh.c:323
#, c-format
msgid "Mesh %d"
msgstr "%d. háló"
-#: ../src/nm-manager.c:656
+#: ../src/nm-manager.c:680
#, c-format
msgid "VPN connection %d"
msgstr "%d. VPN kapcsolat"
-#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231
-#: ../src/nm-netlink-monitor.c:653
+#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
#, c-format
msgid "error processing netlink message: %s"
msgstr "hiba a netlink üzenet feldolgozásakor: %s"
-#: ../src/nm-netlink-monitor.c:214
+#: ../src/nm-netlink-monitor.c:251
msgid "error occurred while waiting for data on socket"
msgstr "hiba lépett fel adatokra várakozás közben a foglalaton"
-#: ../src/nm-netlink-monitor.c:254
+#: ../src/nm-netlink-monitor.c:296
#, c-format
msgid "unable to connect to netlink for monitoring link status: %s"
msgstr ""
"nem lehet kapcsolódni a netlinkhez a kapcsolat állapotának megfigyelése "
"érdekében: %s"
-#: ../src/nm-netlink-monitor.c:265
+#: ../src/nm-netlink-monitor.c:307
#, c-format
msgid "unable to enable netlink handle credential passing: %s"
msgstr ""
"nem engedélyezhető a hálózati kapcsolatkezelő hitelesítési adatainak "
"átadása: %s"
-#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353
+#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390
#, c-format
msgid "unable to allocate netlink handle for monitoring link status: %s"
msgstr ""
"nem lehet netlink kezelőt lefoglalni a kapcsolat állapotának megfigyelése "
"érdekében: %s"
-#: ../src/nm-netlink-monitor.c:376
+#: ../src/nm-netlink-monitor.c:415
#, c-format
msgid "unable to allocate netlink link cache for monitoring link status: %s"
msgstr ""
"nem lehet netlink kapcsolat-gyorsítótárat lefoglalni a kapcsolat állapotának "
"megfigyelése érdekében: %s"
-#: ../src/nm-netlink-monitor.c:502
+#: ../src/nm-netlink-monitor.c:542
#, c-format
msgid "unable to join netlink group: %s"
msgstr "nem lehet csatlakozni a netlink csoporthoz: %s"
-#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642
+#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684
#, c-format
msgid "error updating link cache: %s"
msgstr "hiba a kapcsolat gyorsítótárának frissítésekor: %s"
-#: ../src/settings/plugins/ifcfg-rh/reader.c:3464
+#: ../src/settings/plugins/ifcfg-rh/reader.c:91
#: ../src/settings/plugins/ifnet/connection_parser.c:51
msgid "System"
msgstr "Rendszer"
-#: ../src/settings/nm-default-wired-connection.c:145
-#, c-format
-msgid "Auto %s"
-msgstr "Automatikus %s"
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3660
+#| msgid "on"
+msgid "Bond"
+msgstr "Kapcsolódva"
+
+#~ msgid "Error: Obtaining active connection for '%s' failed."
+#~ msgstr "Hiba: az aktív kapcsolat létrehozása meghiúsult ehhez: „%s”."
+
+#~ msgid "IP4-SETTINGS"
+#~ msgstr "IP4-BEÁLLÍTÁSOK"
+
+#~ msgid "IP6-SETTINGS"
+#~ msgstr "IP6-BEÁLLÍTÁSOK"
+
+#~ msgid "PREFIX"
+#~ msgstr "ELŐTAG"
+
+#~ msgid "unknown)"
+#~ msgstr "ismeretlen)"
+
+#~ msgid "Auto %s"
+#~ msgstr "Automatikus %s"
diff --git a/po/ml.po b/po/ml.po
index 59b0b0f26..211601d1f 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -3,12 +3,14 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Ani Peter <apeter@redhat.com>, 2010
+# Mohammed <sadiqpkp@gmail.com>, 2012
#
msgid ""
msgstr ""
"Project-Id-Version: ml\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-06 14:31+0530\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-02-28 03:24+0000\n"
"PO-Revision-Date: 2010-05-10 15:31+0530\n"
"Last-Translator: \n"
"Language-Team: <en@li.org>\n"
@@ -17,949 +19,1508 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-#: ../cli/src/connections.c:59 ../cli/src/connections.c:74
-#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108
-#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142
-#: ../cli/src/devices.c:152
-msgid "NAME"
-msgstr "NAME"
+#: ../cli/src/common.c:32 ../cli/src/common.c:44 ../cli/src/common.c:52
+#: ../cli/src/common.c:63 ../cli/src/connections.c:119
+#: ../cli/src/connections.c:153
+msgid "GROUP"
+msgstr "GROUP"
#. 0
-#: ../cli/src/connections.c:60 ../cli/src/connections.c:75
-msgid "UUID"
-msgstr "UUID"
+#: ../cli/src/common.c:33 ../cli/src/common.c:53
+msgid "ADDRESS"
+msgstr "ADDRESS"
#. 1
-#: ../cli/src/connections.c:61
-msgid "DEVICES"
-msgstr "DEVICES"
+#: ../cli/src/common.c:34 ../cli/src/common.c:54
+msgid "ROUTE"
+msgstr "ROUTE"
#. 2
-#: ../cli/src/connections.c:62 ../cli/src/connections.c:77
-msgid "SCOPE"
-msgstr "SCOPE"
+#: ../cli/src/common.c:35 ../cli/src/common.c:55
+msgid "DNS"
+msgstr "DNS"
#. 3
-#: ../cli/src/connections.c:63
-msgid "DEFAULT"
-msgstr "DEFAULT"
+#: ../cli/src/common.c:36 ../cli/src/common.c:56
+msgid "DOMAIN"
+msgstr "DOMAIN"
#. 4
-#: ../cli/src/connections.c:64
-msgid "DBUS-SERVICE"
-msgstr "DBUS-SERVICE"
+#: ../cli/src/common.c:37
+msgid "WINS"
+msgstr "WINS"
-#. 5
-#: ../cli/src/connections.c:65
-msgid "SPEC-OBJECT"
-msgstr "SPEC-OBJECT"
+#. 0
+#: ../cli/src/common.c:45 ../cli/src/common.c:64
+msgid "OPTION"
+msgstr "OPTION"
-#. 6
-#: ../cli/src/connections.c:66
-msgid "VPN"
-msgstr "VPN"
+#. 0
+#. used only for 'GENERAL' group listing
+#: ../cli/src/connections.c:56 ../cli/src/connections.c:120
+#: ../cli/src/devices.c:100 ../cli/src/devices.c:121 ../cli/src/devices.c:131
+#: ../cli/src/devices.c:141 ../cli/src/devices.c:155 ../cli/src/devices.c:169
+#: ../cli/src/devices.c:191
+msgid "NAME"
+msgstr "NAME"
+
+#. 0
+#. 1
+#: ../cli/src/connections.c:57 ../cli/src/connections.c:121
+msgid "UUID"
+msgstr "UUID"
#. 1
#. 0
#. 1
-#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87
+#. 2
+#: ../cli/src/connections.c:58 ../cli/src/connections.c:154
+#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:194
msgid "TYPE"
msgstr "TYPE"
-#. 3
-#: ../cli/src/connections.c:78
+#. 2
+#: ../cli/src/connections.c:59
msgid "TIMESTAMP"
msgstr "TIMESTAMP"
-#. 4
-#: ../cli/src/connections.c:79
+#. 3
+#: ../cli/src/connections.c:60
msgid "TIMESTAMP-REAL"
msgstr "TIMESTAMP-REAL"
-#. 5
-#: ../cli/src/connections.c:80
+#. 4
+#: ../cli/src/connections.c:61
msgid "AUTOCONNECT"
msgstr "AUTOCONNECT"
-#. 6
-#: ../cli/src/connections.c:81
+#. 5
+#: ../cli/src/connections.c:62
msgid "READONLY"
msgstr "READONLY"
+#. 6
+#. 8
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63 ../cli/src/connections.c:128
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:181 ../cli/src/devices.c:197
+msgid "DBUS-PATH"
+msgstr "DBUS-PATH"
+
+#. 2
+#: ../cli/src/connections.c:122
+msgid "DEVICES"
+msgstr "DEVICES"
+
+#. 3
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:123 ../cli/src/devices.c:67
+#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "STATE"
+
+#. 4
+#: ../cli/src/connections.c:124
+msgid "DEFAULT"
+msgstr "DEFAULT"
+
+#. 5
+#: ../cli/src/connections.c:125
+msgid "DEFAULT6"
+msgstr "DEFAULT6"
+
+#. 6
+#: ../cli/src/connections.c:126
+msgid "SPEC-OBJECT"
+msgstr "SPEC-OBJECT"
+
+#. 7
+#. 1
+#: ../cli/src/connections.c:127 ../cli/src/connections.c:141
+msgid "VPN"
+msgstr "VPN"
+
+#. 9
+#: ../cli/src/connections.c:129
+msgid "CON-PATH"
+msgstr "CON-PATH"
+
+#. 10
+#: ../cli/src/connections.c:130
+msgid "ZONE"
+msgstr "ZONE"
+
+#. 11
+#: ../cli/src/connections.c:131
+msgid "MASTER-PATH"
+msgstr "MASTER-PATH"
+
+#: ../cli/src/connections.c:139 ../cli/src/devices.c:77
+msgid "GENERAL"
+msgstr "GENERAL"
+
+#. 0
+#: ../cli/src/connections.c:140
+msgid "IP"
+msgstr "IP"
+
+#. 1
+#: ../cli/src/connections.c:155
+msgid "USERNAME"
+msgstr "USERNAME"
+
+#. 2
+#: ../cli/src/connections.c:156
+msgid "GATEWAY"
+msgstr "GATEWAY"
+
+#. 3
#: ../cli/src/connections.c:157
+msgid "BANNER"
+msgstr "BANNER"
+
+#. 4
+#: ../cli/src/connections.c:158
+msgid "VPN-STATE"
+msgstr "VPN-STATE"
+
+#. 5
+#: ../cli/src/connections.c:159
+msgid "CFG"
+msgstr "CFG"
+
+#: ../cli/src/connections.c:180
#, c-format
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" list [id <id> | uuid <id>]\n"
+" status [id <id> | uuid <id> | path <path>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
+"nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
msgstr ""
-"ഉപയോഗിക്കേണ്ട വിധം: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+"ഉപയോഗക്രമം: nmcli con { COMMAND | help }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" list [id <id> | uuid <id>]\n"
+" status [id <id> | uuid <id> | path <path>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
+"nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
-#: ../cli/src/connections.c:197 ../cli/src/connections.c:536
+#: ../cli/src/connections.c:234 ../cli/src/connections.c:567
#, c-format
msgid "Error: 'con list': %s"
msgstr "പിശക്: 'con list': %s"
-#: ../cli/src/connections.c:199 ../cli/src/connections.c:538
+#: ../cli/src/connections.c:236 ../cli/src/connections.c:569
#, c-format
msgid "Error: 'con list': %s; allowed fields: %s"
msgstr "പിശക്: 'con list': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-#: ../cli/src/connections.c:207
+#: ../cli/src/connections.c:244
msgid "Connection details"
msgstr "കണക്ഷന്‍ വിശദാംശങ്ങള്‍"
-#: ../cli/src/connections.c:381 ../cli/src/connections.c:601
-msgid "system"
-msgstr "സിസ്റ്റം"
-
-#: ../cli/src/connections.c:381 ../cli/src/connections.c:601
-msgid "user"
-msgstr "ഉപയോക്താവു്"
-
-#: ../cli/src/connections.c:383
+#: ../cli/src/connections.c:442
msgid "never"
msgstr "ഒരിക്കലുമില്ല"
#. "CAPABILITIES"
#. Print header
#. "WIFI-PROPERTIES"
-#: ../cli/src/connections.c:384 ../cli/src/connections.c:385
-#: ../cli/src/connections.c:602 ../cli/src/connections.c:605
-#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539
-#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542
-#: ../cli/src/devices.c:543 ../cli/src/settings.c:504
-#: ../cli/src/settings.c:544 ../cli/src/settings.c:643
-#: ../cli/src/settings.c:912 ../cli/src/settings.c:913
-#: ../cli/src/settings.c:915 ../cli/src/settings.c:917
-#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043
-#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123
-#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125
-#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127
-#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129
-#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131
-#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133
-#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135
-#: ../cli/src/settings.c:1210
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766 ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049 ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053 ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182 ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184 ../cli/src/settings.c:1185
+#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268 ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270 ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1272 ../cli/src/settings.c:1343
msgid "yes"
msgstr "ഉവ്വു്"
-#: ../cli/src/connections.c:384 ../cli/src/connections.c:385
-#: ../cli/src/connections.c:602 ../cli/src/connections.c:605
-#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539
-#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542
-#: ../cli/src/devices.c:543 ../cli/src/settings.c:504
-#: ../cli/src/settings.c:506 ../cli/src/settings.c:544
-#: ../cli/src/settings.c:643 ../cli/src/settings.c:912
-#: ../cli/src/settings.c:913 ../cli/src/settings.c:915
-#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042
-#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044
-#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124
-#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126
-#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128
-#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130
-#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132
-#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134
-#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:578
+#: ../cli/src/settings.c:646 ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048 ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051 ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054 ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183 ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185 ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269 ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
msgid "no"
msgstr "ഇല്ല"
-#: ../cli/src/connections.c:457 ../cli/src/connections.c:500
-msgid "System connections"
-msgstr "സിസ്റ്റം കണക്ഷനുകള്‍"
-
-#: ../cli/src/connections.c:462 ../cli/src/connections.c:513
-msgid "User connections"
-msgstr "ഉപയോക്താവിനുള്ള കണക്ഷനുകള്‍"
+#: ../cli/src/connections.c:518
+msgid "Connection list"
+msgstr "കണക്ഷന്‍ പട്ടിക"
-#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334
-#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359
-#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452
-#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973
-#: ../cli/src/devices.c:980
+#: ../cli/src/connections.c:531 ../cli/src/connections.c:1064
+#: ../cli/src/connections.c:1808 ../cli/src/connections.c:1823
+#: ../cli/src/connections.c:1832 ../cli/src/connections.c:1842
+#: ../cli/src/connections.c:1854 ../cli/src/connections.c:1949
+#: ../cli/src/connections.c:2051 ../cli/src/devices.c:1190
+#: ../cli/src/devices.c:1200 ../cli/src/devices.c:1314
+#: ../cli/src/devices.c:1322 ../cli/src/devices.c:1535
+#: ../cli/src/devices.c:1542
#, c-format
msgid "Error: %s argument is missing."
msgstr "പിശക്: %s ആര്‍ഗ്യുമെന്റ് ലഭ്യമല്ല."
-#: ../cli/src/connections.c:487
+#: ../cli/src/connections.c:544
#, c-format
msgid "Error: %s - no such connection."
msgstr "പിശക്: %s - ഇത്തരം കണക്ഷന്‍ ലഭ്യമല്ല."
-#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383
-#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687
-#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986
+#: ../cli/src/connections.c:550 ../cli/src/connections.c:1867
+#: ../cli/src/connections.c:1966 ../cli/src/connections.c:2058
+#: ../cli/src/devices.c:987 ../cli/src/devices.c:1067
+#: ../cli/src/devices.c:1214 ../cli/src/devices.c:1328
+#: ../cli/src/devices.c:1548
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "അപരിചിതമായ പരാമീറ്റര്‍: %s\n"
-#: ../cli/src/connections.c:528
+#: ../cli/src/connections.c:559
#, c-format
msgid "Error: no valid parameter specified."
msgstr "പിശക്: ശരിയായ പരാമീറ്റര്‍ നല്‍കിയിട്ടില്ല."
-#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572
-#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274
+#: ../cli/src/connections.c:574 ../cli/src/connections.c:2151
+#: ../cli/src/devices.c:1756 ../cli/src/network-manager.c:456
#, c-format
msgid "Error: %s."
msgstr "പിശക്: %s."
-#: ../cli/src/connections.c:649
-#, c-format
-msgid "Error: 'con status': %s"
-msgstr "പിശക്: 'con status': %s"
-
-#: ../cli/src/connections.c:651
-#, c-format
-msgid "Error: 'con status': %s; allowed fields: %s"
-msgstr "പിശക്: 'con status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-
-#: ../cli/src/connections.c:658
-msgid "Active connections"
-msgstr "സജീവമായ കണക്ഷനുകള്‍"
-
-#: ../cli/src/connections.c:1026
-#, c-format
-msgid "no active connection on device '%s'"
-msgstr "ഡിവൈസ് '%s'-ല്‍ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ല"
-
-#: ../cli/src/connections.c:1034
-#, c-format
-msgid "no active connection or device"
-msgstr "സജീവമായ കണക്ഷന്‍ അല്ലെങ്കില്‍ ഡിവൈസ് ലഭ്യമല്ല"
-
-#: ../cli/src/connections.c:1084
-#, c-format
-msgid "device '%s' not compatible with connection '%s'"
-msgstr "'%s' ഡിവൈസ് '%s' കണക്ഷനുമായി പൊരുത്തപ്പെടുന്നില്ല"
-
-#: ../cli/src/connections.c:1086
-#, c-format
-msgid "no device found for connection '%s'"
-msgstr "ഡിവൈസ് '%s'-ല്‍ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ല"
-
-#: ../cli/src/connections.c:1097
+#: ../cli/src/connections.c:587
msgid "activating"
msgstr "സജീവമാക്കുന്നു"
-#: ../cli/src/connections.c:1099
+#: ../cli/src/connections.c:589
msgid "activated"
msgstr "സജീവമാക്കിയിരിക്കുന്നു"
-#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125
-#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224
-#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92
-#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469
+#: ../cli/src/connections.c:591 ../cli/src/devices.c:261
+msgid "deactivating"
+msgstr "സജീവമല്ലാതാക്കുന്നു"
+
+#: ../cli/src/connections.c:594 ../cli/src/connections.c:617
+#: ../cli/src/connections.c:1680 ../cli/src/devices.c:265
+#: ../cli/src/devices.c:784 ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:531
+#: ../cli/src/utils.c:499 ../src/main.c:450 ../src/main.c:469
msgid "unknown"
msgstr "അപരിചിതം"
-#: ../cli/src/connections.c:1111
+#: ../cli/src/connections.c:603
msgid "VPN connecting (prepare)"
msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു (തയ്യാറാകുക)"
-#: ../cli/src/connections.c:1113
+#: ../cli/src/connections.c:605
msgid "VPN connecting (need authentication)"
msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു (ആധികാരികത ഉറപ്പാക്കേണ്ടതുണ്ടു്)"
-#: ../cli/src/connections.c:1115
+#: ../cli/src/connections.c:607
msgid "VPN connecting"
msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു"
-#: ../cli/src/connections.c:1117
+#: ../cli/src/connections.c:609
msgid "VPN connecting (getting IP configuration)"
msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു (ഐപി ക്രമീകരണം ലഭ്യമാക്കുന്നു)"
-#: ../cli/src/connections.c:1119
+#: ../cli/src/connections.c:611
msgid "VPN connected"
msgstr "വിപിഎന്‍ കണക്ട് ചെയ്തിരിക്കുന്നു"
-#: ../cli/src/connections.c:1121
+#: ../cli/src/connections.c:613
msgid "VPN connection failed"
msgstr "വിപിഎന്‍ കണക്ഷന്‍ പരാജയപ്പെട്ടു"
-#: ../cli/src/connections.c:1123
+#: ../cli/src/connections.c:615
msgid "VPN disconnected"
msgstr "വിപിഎന്‍ വിഛേദിച്ചിരിക്കുന്നു"
-#: ../cli/src/connections.c:1134
+#: ../cli/src/connections.c:868 ../cli/src/connections.c:1092
+#, c-format
+msgid "Error: 'con status': %s"
+msgstr "പിശക്: 'con status': %s"
+
+#: ../cli/src/connections.c:870 ../cli/src/connections.c:1094
+#, c-format
+msgid "Error: 'con status': %s; allowed fields: %s"
+msgstr "പിശക്: 'con status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
+
+#: ../cli/src/connections.c:878
+msgid "Active connection details"
+msgstr "സജീവമായ കണക്ഷന്‍ വിശദാംശങ്ങള്‍"
+
+#: ../cli/src/connections.c:1014 ../cli/src/connections.c:1882
+#: ../cli/src/connections.c:1981 ../cli/src/connections.c:2072
+#: ../cli/src/devices.c:1014 ../cli/src/devices.c:1076
+#: ../cli/src/devices.c:1229 ../cli/src/devices.c:1358
+#: ../cli/src/devices.c:1577
+#, c-format
+msgid "Error: Can't find out if NetworkManager is running: %s."
+msgstr "പിശക്: നെറ്റ്‌വര്‍ക്ക്മാനേജര്‍ പ്രവര്‍ത്തിക്കുന്നുണ്ടോ എന്നറിയാന്‍ സാധിക്കുന്നില്ല: %s."
+
+#: ../cli/src/connections.c:1018 ../cli/src/connections.c:1886
+#: ../cli/src/connections.c:1985 ../cli/src/connections.c:2076
+#: ../cli/src/devices.c:1018 ../cli/src/devices.c:1080
+#: ../cli/src/devices.c:1233 ../cli/src/devices.c:1362
+#: ../cli/src/devices.c:1581
+#, c-format
+msgid "Error: NetworkManager is not running."
+msgstr "പിശക്: നെറ്റ്‌വര്‍ക്ക്മാനേജര്‍ പ്രവര്‍ത്തിക്കുന്നില്ല."
+
+#: ../cli/src/connections.c:1050
+msgid "Active connections"
+msgstr "സജീവമായ കണക്ഷനുകള്‍"
+
+#: ../cli/src/connections.c:1075
+#, c-format
+msgid "Error: '%s' is not an active connection."
+msgstr "പിശക്: '%s' ഒരു സജീവമായ കണക്ഷന്‍ അല്ല."
+
+#: ../cli/src/connections.c:1080
+#, c-format
+msgid "Error: unknown parameter: %s"
+msgstr "പിശക്: അപരിചിതമായ പരാമീറ്റര്‍: %s"
+
+#: ../cli/src/connections.c:1564
+#, c-format
+msgid "no active connection on device '%s'"
+msgstr "ഡിവൈസ് '%s'-ല്‍ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ല"
+
+#: ../cli/src/connections.c:1572
+#, c-format
+msgid "no active connection or device"
+msgstr "സജീവമായ കണക്ഷന്‍ അല്ലെങ്കില്‍ ഡിവൈസ് ലഭ്യമല്ല"
+
+#: ../cli/src/connections.c:1643
+#, c-format
+msgid "device '%s' not compatible with connection '%s'"
+msgstr "'%s' ഡിവൈസ് '%s' കണക്ഷനുമായി പൊരുത്തപ്പെടുന്നില്ല"
+
+#: ../cli/src/connections.c:1645
+#, c-format
+msgid "no device found for connection '%s'"
+msgstr "ഡിവൈസ് '%s'-ല്‍ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ല"
+
+#: ../cli/src/connections.c:1656
msgid "unknown reason"
msgstr "അപരിചിതമായ കാരണം"
-#: ../cli/src/connections.c:1136
+#: ../cli/src/connections.c:1658
msgid "none"
msgstr "ഒന്നുമില്ല"
-#: ../cli/src/connections.c:1138
+#: ../cli/src/connections.c:1660
msgid "the user was disconnected"
msgstr "ഉപയോക്താവു് വിഛേദിച്ചിരിക്കുന്നു"
-#: ../cli/src/connections.c:1140
+#: ../cli/src/connections.c:1662
msgid "the base network connection was interrupted"
msgstr "അടിസ്ഥാന നെറ്റ്‌വര്‍ക്ക് കണക്ഷന്‍ തടസ്സപ്പെടുത്തിയിരിക്കുന്നു"
-#: ../cli/src/connections.c:1142
+#: ../cli/src/connections.c:1664
msgid "the VPN service stopped unexpectedly"
msgstr "വിപിഎന്‍ സര്‍വീസ് അപ്രതീക്ഷിതമായി നിര്‍ത്തിയിരിക്കുന്നു"
-#: ../cli/src/connections.c:1144
+#: ../cli/src/connections.c:1666
msgid "the VPN service returned invalid configuration"
msgstr "വിപിഎന്‍ സര്‍വീസ് തെറ്റായ ക്രമീകരണം തിരികെ നല്‍കിയിരിക്കുന്നു"
-#: ../cli/src/connections.c:1146
+#: ../cli/src/connections.c:1668
msgid "the connection attempt timed out"
msgstr "കണക്ഷനുള്ള ശ്രമം കഴിഞ്ഞിരിക്കുന്നു"
-#: ../cli/src/connections.c:1148
+#: ../cli/src/connections.c:1670
msgid "the VPN service did not start in time"
msgstr "വിപിഎന്‍ സര്‍വീസ് സമയത്തിനു് ആരംഭിച്ചില്ല"
-#: ../cli/src/connections.c:1150
+#: ../cli/src/connections.c:1672
msgid "the VPN service failed to start"
msgstr "വിപിഎന്‍ സര്‍വീസ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു"
-#: ../cli/src/connections.c:1152
+#: ../cli/src/connections.c:1674
msgid "no valid VPN secrets"
msgstr "ശരിയായ വിപിഎന്‍ രഹസ്യങ്ങള്‍ ലഭ്യമല്ല"
-#: ../cli/src/connections.c:1154
+#: ../cli/src/connections.c:1676
msgid "invalid VPN secrets"
msgstr "തെറ്റായ വിപിഎന്‍ രഹസ്യങ്ങള്‍"
-#: ../cli/src/connections.c:1156
+#: ../cli/src/connections.c:1678
msgid "the connection was removed"
msgstr "കണക്ഷന്‍ നീക്കം ചെയ്തിരിക്കുന്നു"
-#: ../cli/src/connections.c:1170
+#: ../cli/src/connections.c:1692
#, c-format
msgid "state: %s\n"
msgstr "അവസ്ഥ: %s\n"
-#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199
+#: ../cli/src/connections.c:1695 ../cli/src/connections.c:1721
#, c-format
msgid "Connection activated\n"
msgstr "കണക്ഷന്‍ സജീവമാക്കിയിരിക്കുന്നു\n"
-#: ../cli/src/connections.c:1176
+#: ../cli/src/connections.c:1698
#, c-format
msgid "Error: Connection activation failed."
msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു."
-#: ../cli/src/connections.c:1195
+#: ../cli/src/connections.c:1717
#, c-format
msgid "state: %s (%d)\n"
msgstr "അവസ്ഥ: %s (%d)\n"
-#: ../cli/src/connections.c:1205
+#: ../cli/src/connections.c:1727
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു: %s."
-#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811
+#: ../cli/src/connections.c:1744 ../cli/src/devices.c:1136
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "പിശക്: സമയപരിധി %d നിമിഷത്തിന്റെ കാലാവധി കഴിഞ്ഞിരിക്കുന്നു."
-#: ../cli/src/connections.c:1265
+#: ../cli/src/connections.c:1757
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു: %s"
-#: ../cli/src/connections.c:1279
-#, c-format
-msgid "Error: Obtaining active connection for '%s' failed."
-msgstr "പിശക്: '%s'-നുള്ള സജീവമായ കണക്ഷന്‍ ലഭ്യമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-
-#: ../cli/src/connections.c:1288
+#: ../cli/src/connections.c:1763
#, c-format
msgid "Active connection state: %s\n"
msgstr "സജീവമായ കണക്ഷന്റെ അവസ്ഥ: %s\n"
-#: ../cli/src/connections.c:1289
+#: ../cli/src/connections.c:1764
#, c-format
msgid "Active connection path: %s\n"
msgstr "സജീവമായ കണക്ഷന്‍ പാഥ്: %s\n"
-#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461
+#: ../cli/src/connections.c:1816 ../cli/src/connections.c:1957
+#: ../cli/src/connections.c:2085
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "പിശക്: അപരിചിതമായ കണക്ഷന്‍: %s."
-#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882
+#: ../cli/src/connections.c:1862 ../cli/src/devices.c:1208
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "പിശഖ്: സമയപരിധിയുടെ മൂല്ല്യം '%s' തെറ്റാണു്."
-#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478
+#: ../cli/src/connections.c:1875 ../cli/src/connections.c:1974
+#: ../cli/src/connections.c:2065
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "പിശക്: id അല്ലെങ്കില്‍ uuid വ്യക്തമാക്കേണ്ടതുണ്ടു്."
-#: ../cli/src/connections.c:1411
+#: ../cli/src/connections.c:1903
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "പിശക്: ഉചിതമായ ഡിവൈസ് ലഭ്യമായില്ല: %s."
-#: ../cli/src/connections.c:1413
+#: ../cli/src/connections.c:1905
#, c-format
msgid "Error: No suitable device found."
msgstr "പിശക്: ഉചിതമായ ഡിവൈസ് ലഭ്യമായില്ല."
-#: ../cli/src/connections.c:1505
+#: ../cli/src/connections.c:2010
#, c-format
msgid "Warning: Connection not active\n"
msgstr "മുന്നറിയിപ്പു്: കണക്ഷന്‍ സജീവമല്ല\n"
-#: ../cli/src/connections.c:1561
+#: ../cli/src/connections.c:2024
+#, c-format
+msgid "Error: Connection deletion failed: %s"
+msgstr "പിശക്: കണക്ഷന്‍ നീക്കം ചെയ്യുന്നത് പരാജയപ്പെട്ടു: %s"
+
+#: ../cli/src/connections.c:2142
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "പിശക്: 'con' കമാന്‍ഡ് '%s' ശരിയല്ല."
-#: ../cli/src/connections.c:1597
+#: ../cli/src/connections.c:2207
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "പിശക്: D-Bus-ലേക്കു് കണക്ട് ചെയ്യുവാന്‍ സാധ്യമായില്ല."
-#: ../cli/src/connections.c:1604
+#: ../cli/src/connections.c:2215
#, c-format
msgid "Error: Could not get system settings."
msgstr "പിശക്: സിസ്റ്റം സജ്ജീകരണങ്ങള്‍ ലഭ്യമാക്കവാന്‍ സാധ്യമായില്ല."
-#: ../cli/src/connections.c:1612
+#: ../cli/src/connections.c:2225
#, c-format
-msgid "Error: Could not get user settings."
-msgstr "പിശക്: ഉപയോക്താവിനുള്ള സജ്ജീകരണങ്ങള്‍ ലഭ്യമാക്കുവാന്‍ സാധ്യമായില്ല."
-
-#: ../cli/src/connections.c:1622
-#, c-format
-msgid "Error: Can't obtain connections: settings services are not running."
-msgstr "പിശക്: കണക്ഷനുകള്‍ ലഭ്യമാക്കുവാന്‍ സാധ്യമല്ല: സജ്ജീകരണങ്ങള്‍ക്കുള്ള സര്‍വീസുകള്‍ പ്രവര്‍ത്തിക്കുന്നില്ല."
+msgid "Error: Can't obtain connections: settings service is not running."
+msgstr "പിശക്: കണക്ഷനുകള്‍ ലഭ്യമാക്കുവാന്‍ സാധ്യമല്ല: സജ്ജീകരണങ്ങള്‍ക്കുള്ള സര്‍വീസ് പ്രവര്‍ത്തിക്കുന്നില്ല."
#. 0
#. 9
-#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162
+#. 3
+#: ../cli/src/devices.c:65 ../cli/src/devices.c:101 ../cli/src/devices.c:179
+#: ../cli/src/devices.c:195
msgid "DEVICE"
msgstr "DEVICE"
-#. 1
-#. 4
-#. 0
-#: ../cli/src/devices.c:62 ../cli/src/devices.c:90
-#: ../cli/src/network-manager.c:36
-msgid "STATE"
-msgstr "STATE"
-
-#: ../cli/src/devices.c:71
-msgid "GENERAL"
-msgstr "GENERAL"
-
#. 0
-#: ../cli/src/devices.c:72
+#: ../cli/src/devices.c:78
msgid "CAPABILITIES"
msgstr "CAPABILITIES"
#. 1
-#: ../cli/src/devices.c:73
+#: ../cli/src/devices.c:79
msgid "WIFI-PROPERTIES"
msgstr "WIFI-PROPERTIES"
#. 2
-#: ../cli/src/devices.c:74
+#: ../cli/src/devices.c:80
msgid "AP"
msgstr "AP"
#. 3
-#: ../cli/src/devices.c:75
+#: ../cli/src/devices.c:81
msgid "WIRED-PROPERTIES"
msgstr "WIRED-PROPERTIES"
#. 4
-#: ../cli/src/devices.c:76
-msgid "IP4-SETTINGS"
-msgstr "IP4-SETTINGS"
+#: ../cli/src/devices.c:82
+msgid "WIMAX-PROPERTIES"
+msgstr "WIMAX-PROPERTIES"
#. 5
-#: ../cli/src/devices.c:77
-msgid "IP4-DNS"
-msgstr "IP4-DNS"
+#. 0
+#: ../cli/src/devices.c:83 ../cli/src/devices.c:192
+msgid "NSP"
+msgstr "NSP"
+
+#. 6
+#: ../cli/src/devices.c:84
+msgid "IP4"
+msgstr "IP4"
+
+#. 7
+#: ../cli/src/devices.c:85
+msgid "DHCP4"
+msgstr "DHCP4"
+
+#. 8
+#: ../cli/src/devices.c:86
+msgid "IP6"
+msgstr "IP6"
+
+#. 9
+#: ../cli/src/devices.c:87
+msgid "DHCP6"
+msgstr "DHCP6"
#. 2
-#: ../cli/src/devices.c:88
+#: ../cli/src/devices.c:103
+msgid "VENDOR"
+msgstr "VENDOR"
+
+#. 3
+#: ../cli/src/devices.c:104
+msgid "PRODUCT"
+msgstr "PRODUCT"
+
+#. 4
+#: ../cli/src/devices.c:105
msgid "DRIVER"
msgstr "DRIVER"
-#. 3
-#: ../cli/src/devices.c:89
+#. 5
+#: ../cli/src/devices.c:106
msgid "HWADDR"
msgstr "HWADDR"
+#. 7
+#: ../cli/src/devices.c:108
+msgid "REASON"
+msgstr "REASON"
+
+#. 8
+#: ../cli/src/devices.c:109
+msgid "UDI"
+msgstr "UDI"
+
+#. 9
+#: ../cli/src/devices.c:110
+msgid "IP-IFACE"
+msgstr "IP-IFACE"
+
+#. 10
+#: ../cli/src/devices.c:111
+msgid "NM-MANAGED"
+msgstr "NM-MANAGED"
+
+#. 11
+#: ../cli/src/devices.c:112
+msgid "FIRMWARE-MISSING"
+msgstr "FIRMWARE-MISSING"
+
+#. 12
+#: ../cli/src/devices.c:113
+msgid "CONNECTION"
+msgstr "CONNECTION"
+
#. 0
-#: ../cli/src/devices.c:99
+#: ../cli/src/devices.c:122
msgid "CARRIER-DETECT"
msgstr "CARRIER-DETECT"
#. 1
-#: ../cli/src/devices.c:100
+#: ../cli/src/devices.c:123
msgid "SPEED"
msgstr "SPEED"
#. 0
-#: ../cli/src/devices.c:109
+#: ../cli/src/devices.c:132
msgid "CARRIER"
msgstr "CARRIER"
#. 0
-#: ../cli/src/devices.c:119
+#: ../cli/src/devices.c:142
msgid "WEP"
msgstr "WEP"
#. 1
-#: ../cli/src/devices.c:120
+#: ../cli/src/devices.c:143
msgid "WPA"
msgstr "WPA"
#. 2
-#: ../cli/src/devices.c:121
+#: ../cli/src/devices.c:144
msgid "WPA2"
msgstr "WPA2"
#. 3
-#: ../cli/src/devices.c:122
+#: ../cli/src/devices.c:145
msgid "TKIP"
msgstr "TKIP"
#. 4
-#: ../cli/src/devices.c:123
+#: ../cli/src/devices.c:146
msgid "CCMP"
msgstr "CCMP"
#. 0
-#: ../cli/src/devices.c:132
-msgid "ADDRESS"
-msgstr "ADDRESS"
+#: ../cli/src/devices.c:156
+msgid "CTR-FREQ"
+msgstr "CTR-FREQ"
#. 1
-#: ../cli/src/devices.c:133
-msgid "PREFIX"
-msgstr "PREFIX"
+#: ../cli/src/devices.c:157
+msgid "RSSI"
+msgstr "RSSI"
#. 2
-#: ../cli/src/devices.c:134
-msgid "GATEWAY"
-msgstr "GATEWAY"
+#: ../cli/src/devices.c:158
+msgid "CINR"
+msgstr "CINR"
-#. 0
-#: ../cli/src/devices.c:143
-msgid "DNS"
-msgstr "DNS"
+#. 3
+#: ../cli/src/devices.c:159
+msgid "TX-POW"
+msgstr "TX-POW"
+
+#. 4
+#: ../cli/src/devices.c:160
+msgid "BSID"
+msgstr "BSID"
#. 0
-#: ../cli/src/devices.c:153
+#: ../cli/src/devices.c:170
msgid "SSID"
msgstr "SSID"
#. 1
-#: ../cli/src/devices.c:154
+#: ../cli/src/devices.c:171
msgid "BSSID"
msgstr "BSSID"
#. 2
-#: ../cli/src/devices.c:155
+#: ../cli/src/devices.c:172
msgid "MODE"
msgstr "MODE"
#. 3
-#: ../cli/src/devices.c:156
+#: ../cli/src/devices.c:173
msgid "FREQ"
msgstr "FREQ"
#. 4
-#: ../cli/src/devices.c:157
+#: ../cli/src/devices.c:174
msgid "RATE"
msgstr "RATE"
#. 5
-#: ../cli/src/devices.c:158
+#. 1
+#: ../cli/src/devices.c:175 ../cli/src/devices.c:193
msgid "SIGNAL"
msgstr "SIGNAL"
#. 6
-#: ../cli/src/devices.c:159
+#: ../cli/src/devices.c:176
msgid "SECURITY"
msgstr "SECURITY"
#. 7
-#: ../cli/src/devices.c:160
+#: ../cli/src/devices.c:177
msgid "WPA-FLAGS"
msgstr "WPA-FLAGS"
#. 8
-#: ../cli/src/devices.c:161
+#: ../cli/src/devices.c:178
msgid "RSN-FLAGS"
msgstr "RSN-FLAGS"
#. 10
-#: ../cli/src/devices.c:163
+#. 4
+#: ../cli/src/devices.c:180 ../cli/src/devices.c:196
msgid "ACTIVE"
msgstr "ACTIVE"
-#: ../cli/src/devices.c:186
+#: ../cli/src/devices.c:213
#, c-format
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
"\n"
+" COMMAND := { status | list | disconnect | wifi | wimax }\n"
+"\n"
" COMMAND := { status | list | disconnect | wifi }\n"
"\n"
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
msgstr ""
-"Usage: nmcli dev { COMMAND | help }\n"
+"ഉപയോഗക്രമം: nmcli dev { COMMAND | help }\n"
+"\n"
+" COMMAND := { status | list | disconnect | wifi | wimax }\n"
"\n"
" COMMAND := { status | list | disconnect | wifi }\n"
"\n"
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
-#: ../cli/src/devices.c:206
+#: ../cli/src/devices.c:241
msgid "unmanaged"
msgstr "കൈകാര്യം ചെയ്തിട്ടില്ലാത്തതു്"
-#: ../cli/src/devices.c:208
+#: ../cli/src/devices.c:243
msgid "unavailable"
msgstr "ലഭ്യമല്ലാത്തതു്"
-#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89
+#: ../cli/src/devices.c:245 ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "വിഛേദിച്ചിരിക്കുന്നു"
-#: ../cli/src/devices.c:212
+#: ../cli/src/devices.c:247
msgid "connecting (prepare)"
msgstr "കണക്ട് ചെയ്യുന്നു (തയ്യാറാക്കുക)"
-#: ../cli/src/devices.c:214
+#: ../cli/src/devices.c:249
msgid "connecting (configuring)"
msgstr "കണക്ട് ചെയ്യുന്നു (ക്രമീകരിക്കുന്നു)"
-#: ../cli/src/devices.c:216
+#: ../cli/src/devices.c:251
msgid "connecting (need authentication)"
msgstr "കണക്ട് ചെയ്യുന്നു (ആധികാരികത ഉറപ്പാക്കേണ്ടതുണ്ടു്)"
-#: ../cli/src/devices.c:218
+#: ../cli/src/devices.c:253
msgid "connecting (getting IP configuration)"
msgstr "കണക്ട് ചെയ്യുന്നു (ഐപി ക്രമീകരണം ലഭ്യമാക്കുന്നു)"
-#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87
+#: ../cli/src/devices.c:255
+msgid "connecting (checking IP connectivity)"
+msgstr "കണക്ട് ചെയ്യുന്നു (ഐപി കണക്ടിവിറ്റി പരിശോധിക്കുന്നു)"
+
+#: ../cli/src/devices.c:257
+msgid "connecting (starting secondary connections)"
+msgstr "കണക്ട് ചെയ്യുന്നു (രണ്ടാംഘട്ടത്തിലുള്ള കണക്ഷന്‍ തുടങ്ങുന്നു) "
+
+#: ../cli/src/devices.c:259 ../cli/src/network-manager.c:104
msgid "connected"
msgstr "കണക്ട് ചെയ്തിരിക്കുന്നു"
-#: ../cli/src/devices.c:222
+#: ../cli/src/devices.c:263
msgid "connection failed"
msgstr "കണക്ഷന്‍ പരാജയപ്പെട്ടു"
-#: ../cli/src/devices.c:245 ../cli/src/devices.c:380
+#: ../cli/src/devices.c:274
+msgid "No reason given"
+msgstr "കാരണം നല്‍കപ്പെട്ടിട്ടില്ല"
+
+#: ../cli/src/devices.c:277
+msgid "Unknown error"
+msgstr "അപരിചിതമായ പിശക്"
+
+#: ../cli/src/devices.c:280
+msgid "Device is now managed"
+msgstr "ഡിവൈസ് ഇപ്പോള്‍ കൈകാര്യം ചെയ്തിരിക്കുന്നു"
+
+#: ../cli/src/devices.c:283
+msgid "Device is now unmanaged"
+msgstr "ഡിവൈസ് ഇപ്പോള്‍ കൈകാര്യം ചെയ്യുന്നില്ല"
+
+#: ../cli/src/devices.c:286
+msgid "The device could not be readied for configuration"
+msgstr "ഡിവൈസ് ക്രമീകരിക്കാന്‍ സജ്ജമാക്കാന്‍ സാധിക്കുന്നില്ല"
+
+#: ../cli/src/devices.c:289
+msgid ""
+"IP configuration could not be reserved (no available address, timeout, etc)"
+msgstr ""
+"IP ക്രമീകരണം കരുതിവയ്ക്കാന്‍ സാധിക്കുന്നില്ല (മേല്‍വിലാസം ലഭ്യമല്ല, സമയപരിധി കഴിഞ്ഞു, മുതലായവ)"
+
+#: ../cli/src/devices.c:292
+msgid "The IP configuration is no longer valid"
+msgstr "IP ക്രമീകരണം സാധുവല്ല"
+
+#: ../cli/src/devices.c:295
+msgid "Secrets were required, but not provided"
+msgstr "രഹസ്യങ്ങള്‍ ആവിശ്യമായിരുന്നു, പക്ഷെ നല്‍കിയിട്ടില്ല"
+
+#: ../cli/src/devices.c:298
+msgid "802.1X supplicant disconnected"
+msgstr "802.1X സപ്ലിക്കെന്റ് വിച്ഛേദിച്ചിരിക്കുന്നു"
+
+#: ../cli/src/devices.c:301
+msgid "802.1X supplicant configuration failed"
+msgstr "802.1X സപ്ലിക്കെന്റ് ക്രമീകരണം പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:304
+msgid "802.1X supplicant failed"
+msgstr "802.1X സപ്ലിക്കെന്റ് പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:307
+msgid "802.1X supplicant took too long to authenticate"
+msgstr "802.1X സപ്ലിക്കെന്റ് ആധികാരികതക്കു വേണ്ടി കൂടുതല്‍ സമയമെടുത്തു"
+
+#: ../cli/src/devices.c:310
+msgid "PPP service failed to start"
+msgstr "പിപിപി സര്‍വീസ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:313
+msgid "PPP service disconnected"
+msgstr "പിപിപി സേവനം വിഛേദിച്ചിരിക്കുന്നു"
+
+#: ../cli/src/devices.c:316
+msgid "PPP failed"
+msgstr "പിപിപി പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:319
+msgid "DHCP client failed to start"
+msgstr "DHCP ക്ലയ്ന്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:322
+msgid "DHCP client error"
+msgstr "DHCP ക്ലയ്ന്റ് പിശക്"
+
+#: ../cli/src/devices.c:325
+msgid "DHCP client failed"
+msgstr "DHCP ക്ലയ്ന്റ് പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:328
+msgid "Shared connection service failed to start"
+msgstr "പങ്കുവെച്ച കണക്ഷന്‍ സേവനം ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:331
+msgid "Shared connection service failed"
+msgstr "പങ്കുവെച്ച കണക്ഷന്‍ സേവനം പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:334
+msgid "AutoIP service failed to start"
+msgstr "AutoIP സേവനം ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:337
+msgid "AutoIP service error"
+msgstr "AutoIP സേവനം പിശക്"
+
+#: ../cli/src/devices.c:340
+msgid "AutoIP service failed"
+msgstr "AutoIP സേവനം പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:343
+msgid "The line is busy"
+msgstr ""
+
+#: ../cli/src/devices.c:346
+msgid "No dial tone"
+msgstr ""
+
+#: ../cli/src/devices.c:349
+msgid "No carrier could be established"
+msgstr ""
+
+#: ../cli/src/devices.c:352
+msgid "The dialing request timed out"
+msgstr ""
+
+#: ../cli/src/devices.c:355
+msgid "The dialing attempt failed"
+msgstr ""
+
+#: ../cli/src/devices.c:358
+#, fuzzy
+#| msgid "Error: Connection activation failed."
+msgid "Modem initialization failed"
+msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു."
+
+#: ../cli/src/devices.c:361
+msgid "Failed to select the specified APN"
+msgstr "നിര്‍ദ്ദേശിച്ച APN തിരഞ്ഞെടുക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
+
+#: ../cli/src/devices.c:364
+msgid "Not searching for networks"
+msgstr "നെറ്റ്​വര്‍ക്കുന്നു വേണ്ടി തിരയുന്നില്ല്"
+
+#: ../cli/src/devices.c:367
+msgid "Network registration denied"
+msgstr ""
+
+#: ../cli/src/devices.c:370
+msgid "Network registration timed out"
+msgstr ""
+
+#: ../cli/src/devices.c:373
+msgid "Failed to register with the requested network"
+msgstr ""
+
+#: ../cli/src/devices.c:376
+msgid "PIN check failed"
+msgstr "PIN പരിശോധന പരാജയപ്പെട്ടു"
+
+#: ../cli/src/devices.c:379
+msgid "Necessary firmware for the device may be missing"
+msgstr "ആവശ്യമായ ഫേംവെയര്‍ ലഭ്യമല്ലെന്നു തോന്നുന്നു"
+
+#: ../cli/src/devices.c:382
+msgid "The device was removed"
+msgstr "ഡിവൈസ് നീക്കം ചെയ്തിരിക്കുന്നു"
+
+#: ../cli/src/devices.c:385
+msgid "NetworkManager went to sleep"
+msgstr "നെറ്റ്‌വര്‍ക്ക്മാനേജറിന്റെ ഉറക്കത്തിലേക്കു നീങ്ങി"
+
+#: ../cli/src/devices.c:388
+msgid "The device's active connection disappeared"
+msgstr "ഡിവൈസിന്റെ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ലാതായി"
+
+#: ../cli/src/devices.c:391
+msgid "Device disconnected by user or client"
+msgstr ""
+
+#: ../cli/src/devices.c:394
+msgid "Carrier/link changed"
+msgstr ""
+
+#: ../cli/src/devices.c:397
+msgid "The device's existing connection was assumed"
+msgstr "ഡിവൈസിന്റെ നിലവിലുള്ള കണക്ഷനാണെന്നു് ഊഹിച്ചിരിക്കുന്നു"
+
+#: ../cli/src/devices.c:400
+msgid "The supplicant is now available"
+msgstr "സപ്ലിക്കെന്റ് ഇപ്പോള്‍ ലഭ്യമാണ്"
+
+#: ../cli/src/devices.c:403
+msgid "The modem could not be found"
+msgstr "മോഡം കണ്ടെത്തുവാന്‍ സാധിക്കുന്നില്ല"
+
+#: ../cli/src/devices.c:406
+#, fuzzy
+#| msgid "the connection attempt timed out"
+msgid "The Bluetooth connection failed or timed out"
+msgstr "കണക്ഷനുള്ള ശ്രമം കഴിഞ്ഞിരിക്കുന്നു"
+
+#: ../cli/src/devices.c:409
+msgid "GSM Modem's SIM card not inserted"
+msgstr "GSM മോഡത്തില്‍ സിം കാര്‍ഡ് ഇല്ല"
+
+#: ../cli/src/devices.c:412
+msgid "GSM Modem's SIM PIN required"
+msgstr "GSM മോഡത്തിന്റെ സിം PIN ആവിശ്യമാണ്"
+
+#: ../cli/src/devices.c:415
+msgid "GSM Modem's SIM PUK required"
+msgstr "GSM മോഡത്തിന്റെ സിം PUK ആവിശ്യമാണ്"
+
+#: ../cli/src/devices.c:418
+msgid "GSM Modem's SIM wrong"
+msgstr "GSM മോഡത്തിന്റെ സിം തെറ്റാണ്"
+
+#: ../cli/src/devices.c:421
+msgid "InfiniBand device does not support connected mode"
+msgstr ""
+
+#: ../cli/src/devices.c:423 ../cli/src/devices.c:446 ../cli/src/devices.c:458
+#: ../cli/src/devices.c:578 ../cli/src/devices.c:622
msgid "Unknown"
msgstr "അപരിചിതം"
-#: ../cli/src/devices.c:277
+#: ../cli/src/devices.c:491
msgid "(none)"
msgstr "(ഒന്നുമില്ല)"
-#: ../cli/src/devices.c:302
-#, c-format
-msgid "%s: error converting IP4 address 0x%X"
-msgstr "%s:IP4 വിലാസം 0x%X വേര്‍തിരിക്കുന്നതില്‍ പിശക്"
-
-#: ../cli/src/devices.c:349
+#: ../cli/src/devices.c:547
#, c-format
msgid "%u MHz"
msgstr "%u MHz"
-#: ../cli/src/devices.c:350
+#: ../cli/src/devices.c:548
#, c-format
msgid "%u MB/s"
msgstr "%u MB/s"
-#: ../cli/src/devices.c:359
+#: ../cli/src/devices.c:557
msgid "Encrypted: "
msgstr "എന്‍ക്രിപ്റ്റ് ചെയ്തിരിക്കുന്നു: "
-#: ../cli/src/devices.c:364
+#: ../cli/src/devices.c:562
msgid "WEP "
msgstr "WEP "
-#: ../cli/src/devices.c:366
+#: ../cli/src/devices.c:564
msgid "WPA "
msgstr "WPA "
-#: ../cli/src/devices.c:368
+#: ../cli/src/devices.c:566
msgid "WPA2 "
msgstr "WPA2 "
-#: ../cli/src/devices.c:371
+#: ../cli/src/devices.c:569
msgid "Enterprise "
-msgstr "എന്റര്‍പ്രൈസ്"
+msgstr "എന്റര്‍പ്രൈസ് "
-#: ../cli/src/devices.c:380
+#: ../cli/src/devices.c:578
msgid "Ad-Hoc"
msgstr "അഡ്-ഹോക്"
-#: ../cli/src/devices.c:380
+#: ../cli/src/devices.c:578
msgid "Infrastructure"
msgstr "ഇന്‍ഫ്രാസ്ട്രക്ചര്‍"
-#: ../cli/src/devices.c:442
+#: ../cli/src/devices.c:613
+msgid "Home"
+msgstr "പാര്‍പ്പിടം"
+
+#: ../cli/src/devices.c:616
+msgid "Partner"
+msgstr ""
+
+#: ../cli/src/devices.c:619
+msgid "Roaming"
+msgstr ""
+
+#: ../cli/src/devices.c:691
#, c-format
msgid "Error: 'dev list': %s"
msgstr "പിശക്: 'dev list': %s"
-#: ../cli/src/devices.c:444
+#: ../cli/src/devices.c:693
#, c-format
msgid "Error: 'dev list': %s; allowed fields: %s"
msgstr "പിശക്: 'dev list': %s, അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-#: ../cli/src/devices.c:453
+#: ../cli/src/devices.c:702
msgid "Device details"
msgstr "ഡിവൈസിന്റെ വിശദാംശങ്ങള്‍"
-#: ../cli/src/devices.c:483 ../cli/src/devices.c:827
+#: ../cli/src/devices.c:744 ../cli/src/devices.c:745 ../cli/src/devices.c:1152
+#: ../cli/src/utils.c:445
msgid "(unknown)"
msgstr "(അപരിചിതം)"
-#: ../cli/src/devices.c:484
-msgid "unknown)"
-msgstr "(അപരിചിതം)"
+#: ../cli/src/devices.c:753
+msgid "not connected"
+msgstr "കണക്ട് ചെയ്തിട്ടില്ല"
-#: ../cli/src/devices.c:510
+#: ../cli/src/devices.c:780
#, c-format
msgid "%u Mb/s"
msgstr "%u Mb/s"
#. Print header
#. "WIRED-PROPERTIES"
-#: ../cli/src/devices.c:583
+#: ../cli/src/devices.c:853
msgid "on"
msgstr "ഓണ്‍"
-#: ../cli/src/devices.c:583
+#: ../cli/src/devices.c:853
msgid "off"
msgstr "ഓഫ്"
-#: ../cli/src/devices.c:710
+#: ../cli/src/devices.c:1004
#, c-format
msgid "Error: 'dev status': %s"
msgstr "പിശക്: 'dev status': %s"
-#: ../cli/src/devices.c:712
+#: ../cli/src/devices.c:1006
#, c-format
msgid "Error: 'dev status': %s; allowed fields: %s"
msgstr "പിശക്: 'dev status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-#: ../cli/src/devices.c:719
+#: ../cli/src/devices.c:1029
msgid "Status of devices"
msgstr "ഡിവൈസുകളുടെ അവസ്ഥ"
-#: ../cli/src/devices.c:747
+#: ../cli/src/devices.c:1060
#, c-format
msgid "Error: '%s' argument is missing."
msgstr "പിശക്: '%s' ആര്‍ഗ്യുമെന്റ് ലഭ്യമല്ല."
-#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035
+#: ../cli/src/devices.c:1101 ../cli/src/devices.c:1253
+#: ../cli/src/devices.c:1390 ../cli/src/devices.c:1609
#, c-format
msgid "Error: Device '%s' not found."
msgstr "പിശക്: ഡിവൈസ് '%s' ലഭ്യമായില്ല."
-#: ../cli/src/devices.c:799
+#: ../cli/src/devices.c:1124
#, c-format
msgid "Success: Device '%s' successfully disconnected."
msgstr "വിജയിച്ചു: ഡിവൈസ് '%s' വിജയകരമായി വിഛേദിച്ചിരിക്കുന്നു."
-#: ../cli/src/devices.c:824
+#: ../cli/src/devices.c:1149
#, c-format
msgid "Error: Device '%s' (%s) disconnecting failed: %s"
msgstr "പിശക്: ഡിവൈസ് '%s' (%s) വിഛേദിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s"
-#: ../cli/src/devices.c:832
+#: ../cli/src/devices.c:1157
#, c-format
msgid "Device state: %d (%s)\n"
msgstr "ഡിവൈസിന്റെ അവസ്ഥ: %d (%s)\n"
-#: ../cli/src/devices.c:896
+#: ../cli/src/devices.c:1222
#, c-format
msgid "Error: iface has to be specified."
msgstr "പിശക്: iface നല്‍കേണ്ടതുണ്ടു്."
-#: ../cli/src/devices.c:1011
+#: ../cli/src/devices.c:1348
#, c-format
msgid "Error: 'dev wifi': %s"
msgstr "പിശക്: 'dev wifi': %s"
-#: ../cli/src/devices.c:1013
+#: ../cli/src/devices.c:1350
#, c-format
msgid "Error: 'dev wifi': %s; allowed fields: %s"
msgstr "പിശക്: 'dev wifi': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-#: ../cli/src/devices.c:1020
+#: ../cli/src/devices.c:1373
msgid "WiFi scan list"
msgstr "WiFi പരിശോധന പട്ടിക"
-#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109
+#: ../cli/src/devices.c:1410 ../cli/src/devices.c:1464
#, c-format
-msgid "Error: Access point with hwaddr '%s' not found."
-msgstr "പിശക്: hwaddr '%s'-നുള്ള ആക്സെസ്സ് പോയിന്റ് ലഭ്യമല്ല."
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "പിശക്: '%s' എന്ന് bssid ഉള്ള ആക്സെസ്സ് പോയിന്റ് ലഭ്യമല്ല."
-#: ../cli/src/devices.c:1072
+#: ../cli/src/devices.c:1427
#, c-format
msgid "Error: Device '%s' is not a WiFi device."
msgstr "പിശക്: '%s' ഡിവൈസ് ഒരു വൈഫൈ ഡിവൈസല്ല."
-#: ../cli/src/devices.c:1136
+#: ../cli/src/devices.c:1491
#, c-format
msgid "Error: 'dev wifi' command '%s' is not valid."
msgstr "പിശക്: 'dev wifi' കമാന്‍ഡ് '%s' ശരിയല്ല."
-#: ../cli/src/devices.c:1183
+#: ../cli/src/devices.c:1567
+#, c-format
+msgid "Error: 'dev wimax': %s"
+msgstr "പിശക്: 'dev wimax': %s"
+
+#: ../cli/src/devices.c:1569
+#, c-format
+msgid "Error: 'dev wimax': %s; allowed fields: %s"
+msgstr "പിശക്: 'dev wimax': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
+
+#: ../cli/src/devices.c:1592
+msgid "WiMAX NSP list"
+msgstr "WiMAX NSP പട്ടിക"
+
+#: ../cli/src/devices.c:1629
+#, c-format
+msgid "Error: NSP with name '%s' not found."
+msgstr "പിശക്: '%s' എന്ന പേരിലുള്ള NSP ലഭ്യമായില്ല."
+
+#: ../cli/src/devices.c:1640
+#, c-format
+msgid "Error: Device '%s' is not a WiMAX device."
+msgstr "പിശക്: '%s' ഡിവൈസ് ഒരു വൈമാക്സ് ഡിവൈസല്ല."
+
+#: ../cli/src/devices.c:1671
+#, c-format
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "പിശക്: '%s' എന്ന nsp ഉള്ള ആക്സെസ്സ് പോയിന്റ് ലഭ്യമല്ല."
+
+#: ../cli/src/devices.c:1698
+#, c-format
+msgid "Error: 'dev wimax' command '%s' is not valid."
+msgstr "പിശക്: 'dev wimax' കമാന്‍ഡ് '%s' ശരിയല്ല."
+
+#: ../cli/src/devices.c:1748
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "പിശക്: 'dev' കമാന്‍ഡ് '%s' ശരിയല്ല."
-#: ../cli/src/network-manager.c:35
+#: ../cli/src/network-manager.c:37
msgid "RUNNING"
msgstr "RUNNING"
-#. 1
-#: ../cli/src/network-manager.c:37
+#. 0
+#: ../cli/src/network-manager.c:38
+msgid "VERSION"
+msgstr "VERSION"
+
+#. 2
+#: ../cli/src/network-manager.c:40
+msgid "NET-ENABLED"
+msgstr "NET-ENABLED"
+
+#. 3
+#: ../cli/src/network-manager.c:41
msgid "WIFI-HARDWARE"
msgstr "WIFI-HARDWARE"
-#. 2
-#: ../cli/src/network-manager.c:38
+#. 4
+#: ../cli/src/network-manager.c:42
msgid "WIFI"
msgstr "WIFI"
-#. 3
-#: ../cli/src/network-manager.c:39
+#. 5
+#: ../cli/src/network-manager.c:43
msgid "WWAN-HARDWARE"
msgstr "WWAN-HARDWARE"
-#. 4
-#: ../cli/src/network-manager.c:40
+#. 6
+#: ../cli/src/network-manager.c:44
msgid "WWAN"
msgstr "WWAN"
-#: ../cli/src/network-manager.c:62
+#. 7
+#: ../cli/src/network-manager.c:45
+msgid "WIMAX-HARDWARE"
+msgstr "WIMAX-HARDWARE"
+
+#. 8
+#: ../cli/src/network-manager.c:46
+msgid "WIMAX"
+msgstr "WIMAX"
+
+#: ../cli/src/network-manager.c:67
#, c-format
msgid ""
"Usage: nmcli nm { COMMAND | help }\n"
"\n"
-" COMMAND := { status | sleep | wakeup | wifi | wwan }\n"
+" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n"
+"\n"
+" COMMAND := { status | enable | sleep | wifi | wwan }\n"
"\n"
" status\n"
-" sleep\n"
-" wakeup\n"
+" enable [true|false]\n"
+" sleep [true|false]\n"
" wifi [on|off]\n"
" wwan [on|off]\n"
+" wimax [on|off]\n"
"\n"
msgstr ""
-"ഉപയോഗിക്കേണ്ട വിധം: nmcli nm { COMMAND | help }\n"
+"ഉപയോഗക്രമം: nmcli nm { COMMAND | help }\n"
+"\n"
+" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n"
"\n"
-" COMMAND := { status | sleep | wakeup | wifi | wwan }\n"
+" COMMAND := { status | enable | sleep | wifi | wwan }\n"
"\n"
" status\n"
-" sleep\n"
-" wakeup\n"
+" enable [true|false]\n"
+" sleep [true|false]\n"
" wifi [on|off]\n"
" wwan [on|off]\n"
+" wimax [on|off]\n"
"\n"
-#: ../cli/src/network-manager.c:83
+#: ../cli/src/network-manager.c:96
msgid "asleep"
-msgstr "asleep"
+msgstr "ഉറങ്ങുന്നു"
-#: ../cli/src/network-manager.c:85
+#: ../cli/src/network-manager.c:98
msgid "connecting"
msgstr "കണക്ട് ചെയ്യുന്നു"
-#: ../cli/src/network-manager.c:125
+#: ../cli/src/network-manager.c:100
+msgid "connected (local only)"
+msgstr "കണക്ട് ചെയ്തിരിക്കുന്നു (തദ്ദേശത്ത് മാത്രമായി)"
+
+#: ../cli/src/network-manager.c:102
+msgid "connected (site only)"
+msgstr "കണക്ട് ചെയ്തിരിക്കുന്നു (സൈറ്റ് മാത്രമായി)"
+
+#: ../cli/src/network-manager.c:106
+msgid "disconnecting"
+msgstr "വിച്ഛേദിച്ചുകൊണ്ടിരിക്കുന്നു"
+
+#: ../cli/src/network-manager.c:146
#, c-format
msgid "Error: 'nm status': %s"
msgstr "പിശക്: 'nm status': %s"
-#: ../cli/src/network-manager.c:127
+#: ../cli/src/network-manager.c:148
#, c-format
msgid "Error: 'nm status': %s; allowed fields: %s"
msgstr "പിശക്: 'nm status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-#: ../cli/src/network-manager.c:134
+#. create NMClient
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
+msgid "enabled"
+msgstr "പ്രവര്‍ത്തന സജ്ജമാക്കിയിരിക്കുന്നു"
+
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
+msgid "disabled"
+msgstr "പ്രവര്‍ത്തനരഹിതമാക്കിയിരിക്കുന്നു"
+
+#: ../cli/src/network-manager.c:181
msgid "NetworkManager status"
msgstr "നെറ്റ്‌വര്‍ക്ക്മാനേജറിന്റെ അവസ്ഥ"
#. Print header
-#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141
-#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143
-#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243
-msgid "enabled"
-msgstr "enabled"
-
-#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141
-#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143
-#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243
-msgid "disabled"
-msgstr "disabled"
-
-#: ../cli/src/network-manager.c:148
+#: ../cli/src/network-manager.c:184
msgid "running"
msgstr "പ്രവര്‍ത്തനത്തില്‍"
-#: ../cli/src/network-manager.c:148
+#: ../cli/src/network-manager.c:184
msgid "not running"
-msgstr "പ്രവര്‍ത്തനത്തിലില്ല"
+msgstr "പ്രവര്‍ത്തനത്തിലല്ല"
-#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:425
+#, c-format
+msgid "Error: Couldn't connect to system bus: %s"
+msgstr "പിശക്: സിസ്റ്റം bus-ലേക്കു് കണക്ട് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %s"
+
+#: ../cli/src/network-manager.c:226
+#, c-format
+msgid "Error: Couldn't create D-Bus object proxy."
+msgstr "പിശക്: D-Bus പ്രോക്സി നിര്‍മ്മിക്കുവാന്‍ സാധ്യമായില്ല."
+
+#: ../cli/src/network-manager.c:232
+#, c-format
+msgid "Error in sleep: %s"
+msgstr "ഉറങ്ങുന്നതില്‍ പിശക്: %s"
+
+#: ../cli/src/network-manager.c:276 ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369 ../cli/src/network-manager.c:408
#, c-format
msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
msgstr "പിശക്: '%s' എന്നു് '--fields'-നുള്ള മൂല്ല്യം അസാധുവാണു്; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s"
-#: ../cli/src/network-manager.c:209
+#: ../cli/src/network-manager.c:284
+msgid "Networking enabled"
+msgstr "നെറ്റ്​വര്‍ക്കിങ് സജ്ജമാക്കിയിരിക്കുന്നു"
+
+#: ../cli/src/network-manager.c:300
+#, c-format
+msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
+msgstr "പിശക്: തെറ്റായ 'wwan' പരാമീറ്റര്‍: '%s'; 'true' അല്ലെങ്കില്‍ 'false' ഉപയോഗിക്കുക."
+
+#: ../cli/src/network-manager.c:310
+#, fuzzy, c-format
+#| msgid "Error: Could not connect to NetworkManager."
+msgid "Error: Sleeping status is not exported by NetworkManager."
+msgstr "പിശക്: നെറ്റ്‌വര്‍ക്ക്മാനേജറിലേക്കു് കണക്ട് ചെയ്യുവാന്‍ സാധ്യമായില്ല."
+
+#: ../cli/src/network-manager.c:318
+#, fuzzy, c-format
+#| msgid "Error: invalid 'wifi' parameter: '%s'."
+msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
+msgstr "പിശക്: തെറ്റായ 'wifi' പരാമീറ്റര്‍: '%s'."
+
+#: ../cli/src/network-manager.c:339
msgid "WiFi enabled"
msgstr "WiFi സജ്ജം"
-#: ../cli/src/network-manager.c:220
+#: ../cli/src/network-manager.c:355
#, c-format
msgid "Error: invalid 'wifi' parameter: '%s'."
msgstr "പിശക്: തെറ്റായ 'wifi' പരാമീറ്റര്‍: '%s'."
-#: ../cli/src/network-manager.c:241
+#: ../cli/src/network-manager.c:377
msgid "WWAN enabled"
msgstr "WWAN സജ്ജം"
-#: ../cli/src/network-manager.c:252
+#: ../cli/src/network-manager.c:393
#, c-format
msgid "Error: invalid 'wwan' parameter: '%s'."
msgstr "പിശക്: തെറ്റായ 'wwan' പരാമീറ്റര്‍: '%s'."
-#: ../cli/src/network-manager.c:263
+#: ../cli/src/network-manager.c:416
+msgid "WiMAX enabled"
+msgstr "WiMAX സജ്ജം"
+
+#: ../cli/src/network-manager.c:432
+#, c-format
+msgid "Error: invalid 'wimax' parameter: '%s'."
+msgstr "പിശക്: തെറ്റായ 'wimax' പരാമീറ്റര്‍: '%s'."
+
+#: ../cli/src/network-manager.c:445
#, c-format
msgid "Error: 'nm' command '%s' is not valid."
msgstr "പിശക്: 'nm' കമാന്‍ഡ് '%s' ശരിയല്ല."
-#: ../cli/src/nmcli.c:69
+#: ../cli/src/nmcli.c:64
#, c-format
msgid ""
"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
@@ -971,6 +1532,8 @@ msgid ""
" -f[ields] <field1,field2,...>|all|common specify fields to output\n"
" -e[scape] yes|no escape columns separators in "
"values\n"
+" -n[ocheck] don't check nmcli and "
+"NetworkManager versions\n"
" -v[ersion] show program version\n"
" -h[elp] print this help\n"
"\n"
@@ -980,7 +1543,7 @@ msgid ""
" dev devices managed by NetworkManager\n"
"\n"
msgstr ""
-"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
+"ഉപയോഗക്രമം: %s [OPTIONS] OBJECT { COMMAND | help }\n"
"\n"
"OPTIONS\n"
" -t[erse] terse output\n"
@@ -989,6 +1552,8 @@ msgstr ""
" -f[ields] <field1,field2,...>|all|common specify fields to output\n"
" -e[scape] yes|no escape columns separators in "
"values\n"
+" -n[ocheck] don't check nmcli and "
+"NetworkManager versions\n"
" -v[ersion] show program version\n"
" -h[elp] print this help\n"
"\n"
@@ -998,559 +1563,812 @@ msgstr ""
" dev devices managed by NetworkManager\n"
"\n"
-#: ../cli/src/nmcli.c:113
+#: ../cli/src/nmcli.c:109
#, c-format
msgid "Error: Object '%s' is unknown, try 'nmcli help'."
msgstr "പിശക്: '%s'വസ്തു അപരിചിതം, 'nmcli help' ശ്രമിക്കുക."
-#: ../cli/src/nmcli.c:143
+#: ../cli/src/nmcli.c:139
#, c-format
msgid "Error: Option '--terse' is specified the second time."
msgstr "പിശക്: '--terse' രണ്ടാമതും നല്‍കിയിരിക്കുന്നു."
-#: ../cli/src/nmcli.c:148
+#: ../cli/src/nmcli.c:144
#, c-format
msgid "Error: Option '--terse' is mutually exclusive with '--pretty'."
msgstr "Error: Option '--terse' is mutually exclusive with '--pretty'."
-#: ../cli/src/nmcli.c:156
+#: ../cli/src/nmcli.c:152
#, c-format
msgid "Error: Option '--pretty' is specified the second time."
msgstr "പിശക്: '--pretty' രണ്ടാമതും നല്‍കിയിരിക്കുന്നു."
-#: ../cli/src/nmcli.c:161
+#: ../cli/src/nmcli.c:157
#, c-format
msgid "Error: Option '--pretty' is mutually exclusive with '--terse'."
msgstr "Error: Option '--pretty' is mutually exclusive with '--terse'."
-#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187
+#: ../cli/src/nmcli.c:167 ../cli/src/nmcli.c:183
#, c-format
msgid "Error: missing argument for '%s' option."
msgstr "പിശക്: '%s' ഐച്ഛികത്തിനുള്ള ആര്‍ഗ്യുമെന്റ് ലഭ്യമല്ല."
-#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196
+#: ../cli/src/nmcli.c:176 ../cli/src/nmcli.c:192
#, c-format
msgid "Error: '%s' is not valid argument for '%s' option."
msgstr "പിശക്: '%s' ഐച്ഛികത്തിനുള്ള '%s' ശരിയായ ആര്‍ഗ്യുമെന്റല്ല."
-#: ../cli/src/nmcli.c:203
+#: ../cli/src/nmcli.c:199
#, c-format
msgid "Error: fields for '%s' options are missing."
msgstr "പിശക്: '%s' ഐച്ഛികങ്ങള്‍ക്കുള്ള ഫീള്‍ഡുകള്‍ ലഭ്യമല്ല."
-#: ../cli/src/nmcli.c:209
+#: ../cli/src/nmcli.c:207
#, c-format
msgid "nmcli tool, version %s\n"
msgstr "nmcli പ്രയോഗം, പതിപ്പു് %s\n"
-#: ../cli/src/nmcli.c:215
+#: ../cli/src/nmcli.c:213
#, c-format
msgid "Error: Option '%s' is unknown, try 'nmcli -help'."
msgstr "പിശക്: '%s' ഐഛികം അപരിചിതം, 'nmcli -help' ശ്രമിക്കുക."
-#: ../cli/src/nmcli.c:234
+#: ../cli/src/nmcli.c:232
#, c-format
msgid "Caught signal %d, shutting down..."
msgstr "%d സിഗ്നല്‍ ലഭ്യമായി, അടച്ചു പൂട്ടുന്നു..."
-#: ../cli/src/nmcli.c:259
-#, c-format
-msgid "Error: Could not connect to NetworkManager."
-msgstr "പിശക്: നെറ്റ്‌വര്‍ക്ക്മാനേജറിലേക്കു് കണക്ട് ചെയ്യുവാന്‍ സാധ്യമായില്ല."
+#: ../cli/src/nmcli.c:257
+msgid "Error: Could not create NMClient object."
+msgstr "പിശക്: NMClient നിര്‍മ്മിക്കുവാന്‍ സാധമായില്ല"
-#: ../cli/src/nmcli.c:275
+#: ../cli/src/nmcli.c:273
msgid "Success"
msgstr "വിജയിച്ചു"
-#: ../cli/src/settings.c:407
+#: ../cli/src/settings.c:465
#, c-format
msgid "%d (hex-ascii-key)"
msgstr "%d (hex-ascii-key)"
-#: ../cli/src/settings.c:409
+#: ../cli/src/settings.c:467
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (104/128-ബിറ്റ് പാസ്ഫ്രെയിസ്)"
-#: ../cli/src/settings.c:412
+#: ../cli/src/settings.c:470
#, c-format
msgid "%d (unknown)"
msgstr "%d (അപരിചിതം)"
-#: ../cli/src/settings.c:438
+#: ../cli/src/settings.c:496
msgid "0 (unknown)"
msgstr "0 (അപരിചിതം)"
-#: ../cli/src/settings.c:444
+#: ../cli/src/settings.c:502
msgid "any, "
msgstr "ഏതെങ്കിലും,"
-#: ../cli/src/settings.c:446
+#: ../cli/src/settings.c:504
msgid "900 MHz, "
msgstr "900 MHz, "
-#: ../cli/src/settings.c:448
+#: ../cli/src/settings.c:506
msgid "1800 MHz, "
msgstr "1800 MHz, "
-#: ../cli/src/settings.c:450
+#: ../cli/src/settings.c:508
msgid "1900 MHz, "
msgstr "1900 MHz, "
-#: ../cli/src/settings.c:452
+#: ../cli/src/settings.c:510
msgid "850 MHz, "
msgstr "850 MHz, "
-#: ../cli/src/settings.c:454
+#: ../cli/src/settings.c:512
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 MHz, "
-#: ../cli/src/settings.c:456
+#: ../cli/src/settings.c:514
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 MHz, "
-#: ../cli/src/settings.c:458
+#: ../cli/src/settings.c:516
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
-#: ../cli/src/settings.c:460
+#: ../cli/src/settings.c:518
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 MHz, "
-#: ../cli/src/settings.c:462
+#: ../cli/src/settings.c:520
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 MHz, "
-#: ../cli/src/settings.c:464
+#: ../cli/src/settings.c:522
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 MHz, "
-#: ../cli/src/settings.c:466
+#: ../cli/src/settings.c:524
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 MHz, "
-#: ../cli/src/settings.c:546 ../cli/src/settings.c:708
+#: ../cli/src/settings.c:526
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 1900 MHz, "
+
+#: ../cli/src/settings.c:528
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2600 MHz, "
+
+#: ../cli/src/settings.c:650 ../cli/src/settings.c:846
+#: ../cli/src/settings.c:1550
msgid "auto"
msgstr "ഓട്ടോ"
-#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172
+#: ../cli/src/settings.c:840 ../cli/src/settings.c:843
+#: ../cli/src/settings.c:844 ../cli/src/utils.c:247
msgid "not set"
msgstr "സജ്ജമല്ല"
-#: ../cli/src/utils.c:124
+#: ../cli/src/utils.c:103
+#, c-format
+msgid "Error converting IP4 address '0x%X' to text form"
+msgstr "'0x%X' IP4 വിലാസം വാക്യത്തിലാക്കുന്നതില്‍ പിശക്"
+
+#: ../cli/src/utils.c:131
+#, c-format
+msgid "Error converting IP6 address '%s' to text form"
+msgstr "'%s' IP6 വിലാസം വാക്യത്തിലാക്കുന്നതില്‍ പിശക്"
+
+#: ../cli/src/utils.c:200
#, c-format
msgid "field '%s' has to be alone"
msgstr "ഫീള്‍ഡ് '%s' മാത്രമായിരിക്കണം"
-#: ../cli/src/utils.c:127
+#: ../cli/src/utils.c:203
#, c-format
msgid "invalid field '%s'"
msgstr "തെറ്റായ ഫീള്‍ഡ് '%s'"
-#: ../cli/src/utils.c:146
+#: ../cli/src/utils.c:222
#, c-format
msgid "Option '--terse' requires specifying '--fields'"
msgstr "'--terse' ഐച്ഛികത്തിനു് '--fields' നല്‍കേണ്ടതുണ്ടു്"
-#: ../cli/src/utils.c:150
+#: ../cli/src/utils.c:226
#, c-format
msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
msgstr "'--terse' എന്ന ഐച്ഛികത്തിനു് പ്രത്യേക '--fields' ഐച്ഛികം ആവശ്യമുണ്ടു്, '%s' അല്ല"
-#: ../libnm-util/crypto.c:120
+#: ../cli/src/utils.c:436
+#, c-format
+msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
+msgstr ""
+
+#: ../cli/src/utils.c:444
+#, c-format
+msgid "Error: NameHasOwner request failed: %s"
+msgstr ""
+
+#: ../cli/src/utils.c:489
+#, c-format
+msgid ""
+"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
+"nocheck to suppress the warning.\n"
+msgstr ""
+
+#: ../cli/src/utils.c:498
+#, c-format
+msgid ""
+"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
+"execution using --nocheck, but the results are unpredictable."
+msgstr ""
+
+#: ../libnm-util/crypto.c:133
#, c-format
msgid "PEM key file had no end tag '%s'."
msgstr "PEM കീ ഫയലിനു് അവസാനമുള്ള റ്റാഗ് '%s' ലഭ്യമല്ല."
-#: ../libnm-util/crypto.c:130
+#: ../libnm-util/crypto.c:146
#, c-format
msgid "Doesn't look like a PEM private key file."
msgstr "ഒരു PEM സ്വകാര്യ കീ ഫയല്‍ പോലെയല്ലിതു്."
-#: ../libnm-util/crypto.c:138
+#: ../libnm-util/crypto.c:154
#, c-format
msgid "Not enough memory to store PEM file data."
msgstr " ‌PEM ഫയല്‍ ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-#: ../libnm-util/crypto.c:154
+#: ../libnm-util/crypto.c:170
#, c-format
msgid "Malformed PEM file: Proc-Type was not first tag."
msgstr "തെറ്റായ PEM ഫയല്‍: Proc-രീതിയിലുള്ളതു് ആദ്യത്തെ റ്റാഗ് അല്ല."
-#: ../libnm-util/crypto.c:162
+#: ../libnm-util/crypto.c:178
#, c-format
msgid "Malformed PEM file: unknown Proc-Type tag '%s'."
msgstr "തെറ്റായ PEM ഫയല്‍: അപരിചിതമായ Proc-രീതിയിലുള്ള റ്റാഗ് '%s'."
-#: ../libnm-util/crypto.c:172
+#: ../libnm-util/crypto.c:188
#, c-format
msgid "Malformed PEM file: DEK-Info was not the second tag."
msgstr "തെറ്റായ PEM ഫയല്‍: DEK-Info രണ്ടാത്തെ റ്റാഗ് അല്ല."
-#: ../libnm-util/crypto.c:183
+#: ../libnm-util/crypto.c:199
#, c-format
msgid "Malformed PEM file: no IV found in DEK-Info tag."
msgstr "തെറ്റായ PEM ഫയല്‍: DEK-Info റ്റാഗില്‍ IV ലഭ്യമായില്ല."
-#: ../libnm-util/crypto.c:190
+#: ../libnm-util/crypto.c:206
#, c-format
msgid "Malformed PEM file: invalid format of IV in DEK-Info tag."
msgstr "തെറ്റായ PEM ഫയല്‍: DEK-Info റ്റാഗില്‍ IV-ന്റെ ശൈലി തെറ്റാണു്."
-#: ../libnm-util/crypto.c:203
+#: ../libnm-util/crypto.c:219
#, c-format
msgid "Malformed PEM file: unknown private key cipher '%s'."
msgstr "തെറ്റായ PEM ഫയല്‍: അപരിചിതമായ സ്വകാര്യ കീ സിഫര്‍ '%s'."
-#: ../libnm-util/crypto.c:222
+#: ../libnm-util/crypto.c:238
#, c-format
msgid "Could not decode private key."
msgstr "സ്വകാര്യ കീ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമല്ല."
-#: ../libnm-util/crypto.c:267
-#, c-format
-msgid "PEM certificate '%s' had no end tag '%s'."
-msgstr "PEM സര്‍ട്ടിഫിക്കേറ്റ് '%s'-നു് ഒടുവിലുള്ള റ്റാഗ് '%s' ലഭ്യമല്ല."
+#: ../libnm-util/crypto.c:284
+msgid "Failed to find expected PKCS#8 start tag."
+msgstr ""
-#: ../libnm-util/crypto.c:277
+#: ../libnm-util/crypto.c:292
#, c-format
-msgid "Failed to decode certificate."
-msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു."
+msgid "Failed to find expected PKCS#8 end tag '%s'."
+msgstr ""
+
+#: ../libnm-util/crypto.c:312
+msgid "Not enough memory to store private key data."
+msgstr "സ്വകാര്യ കീ ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
+
+#: ../libnm-util/crypto.c:317
+msgid "Failed to decode PKCS#8 private key."
+msgstr "PKCS#8 സ്വകാര്യ കീ ഡീകോഡ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto.c:286
+#: ../libnm-util/crypto.c:339 ../libnm-util/crypto.c:625
#, c-format
msgid "Not enough memory to store certificate data."
msgstr "‌സര്‍ട്ടിഫിക്കേറ്റ് ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-#: ../libnm-util/crypto.c:294
-#, c-format
-msgid "Not enough memory to store file data."
-msgstr "ഫയല്‍ ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-
-#: ../libnm-util/crypto.c:324
+#: ../libnm-util/crypto.c:365
#, c-format
msgid "IV must be an even number of bytes in length."
msgstr "IV-ന്റെ വ്യാപ്തി ഈവന്‍ അക്കത്തിലുള്ള ബൈറ്റുകളായിരിക്കണം."
-#: ../libnm-util/crypto.c:333
+#: ../libnm-util/crypto.c:374
#, c-format
msgid "Not enough memory to store the IV."
msgstr "IV സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-#: ../libnm-util/crypto.c:344
+#: ../libnm-util/crypto.c:385
#, c-format
msgid "IV contains non-hexadecimal digits."
msgstr "IV-ല്‍ നോണ്‍-ഹെക്സാഡെസിമല്‍ അക്കങ്ങളുണ്ടു്."
-#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148
-#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171
-#: ../libnm-util/crypto_nss.c:336
+#: ../libnm-util/crypto.c:423 ../libnm-util/crypto_gnutls.c:147
+#: ../libnm-util/crypto_gnutls.c:265 ../libnm-util/crypto_nss.c:167
+#: ../libnm-util/crypto_nss.c:332
#, c-format
msgid "Private key cipher '%s' was unknown."
msgstr "സ്വകാര്യ കീ സിഫര്‍ '%s' അപരിചിതം."
-#: ../libnm-util/crypto.c:391
+#: ../libnm-util/crypto.c:432
#, c-format
msgid "Not enough memory to decrypt private key."
msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-#: ../libnm-util/crypto.c:511
+#: ../libnm-util/crypto.c:497
+#, c-format
+msgid "Not enough memory to store decrypted private key."
+msgstr "ഡീക്രിപ്റ്റ് ചെയ്ത സ്വകാര്യ കീ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
+
+#: ../libnm-util/crypto.c:542
#, c-format
msgid "Unable to determine private key type."
msgstr "സ്വകാര്യ കീ രീതി കണ്ടുപിടിക്കുവാന്‍ സാധ്യമല്ല."
-#: ../libnm-util/crypto.c:530
+#: ../libnm-util/crypto.c:597
#, c-format
-msgid "Not enough memory to store decrypted private key."
-msgstr "ഡീക്രിപ്റ്റ് ചെയ്ത സ്വകാര്യ കീ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
+msgid "PEM certificate had no start tag '%s'."
+msgstr "PEM സര്‍ട്ടിഫിക്കേറ്റിനു തുടക്കത്തിലുള്ള റ്റാഗ് '%s' ലഭ്യമല്ല."
+
+#: ../libnm-util/crypto.c:606
+#, c-format
+msgid "PEM certificate had no end tag '%s'."
+msgstr "PEM സര്‍ട്ടിഫിക്കേറ്റിനു ഒടുവിലുള്ള റ്റാഗ് '%s' ലഭ്യമല്ല."
-#: ../libnm-util/crypto_gnutls.c:49
+#: ../libnm-util/crypto.c:630
+#, c-format
+msgid "Failed to decode certificate."
+msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു."
+
+#: ../libnm-util/crypto_gnutls.c:50
msgid "Failed to initialize the crypto engine."
msgstr "ക്രിപ്റ്റോ എഞ്ചില്‍ ആരംഭിക്കുന്നതില്‍ പരാജയം."
-#: ../libnm-util/crypto_gnutls.c:93
+#: ../libnm-util/crypto_gnutls.c:92
#, c-format
msgid "Failed to initialize the MD5 engine: %s / %s."
-msgstr "MD5 എഞ്ചില്‍ ആരംഭിക്കുവാന്‍ പരാജയപ്പെട്ടു: %s / %s."
+msgstr "MD5 എഞ്ചിന്‍ ആരംഭിക്കുവാന്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:156
+#: ../libnm-util/crypto_gnutls.c:155
#, c-format
msgid "Invalid IV length (must be at least %zd)."
msgstr "തെറ്റായ IV വ്യാപ്തി (കുറഞ്ഞതു് %zd ആയിരിക്കണം)"
-#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188
+#: ../libnm-util/crypto_gnutls.c:164 ../libnm-util/crypto_nss.c:184
#, c-format
msgid "Not enough memory for decrypted key buffer."
msgstr "ഡീക്രിപ്റ്റ് ചെയ്ത കീ ബഫറിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-#: ../libnm-util/crypto_gnutls.c:173
+#: ../libnm-util/crypto_gnutls.c:172
#, c-format
msgid "Failed to initialize the decryption cipher context: %s / %s."
msgstr "ഡീക്രിപ്ഷന്‍ സിഫര്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയം: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:182
+#: ../libnm-util/crypto_gnutls.c:181
#, c-format
msgid "Failed to set symmetric key for decryption: %s / %s."
msgstr "ഡീക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:191
+#: ../libnm-util/crypto_gnutls.c:190
#, c-format
msgid "Failed to set IV for decryption: %s / %s."
msgstr "ഡീക്രിപ്ഷനുള്ള IV സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:200
+#: ../libnm-util/crypto_gnutls.c:199
#, c-format
msgid "Failed to decrypt the private key: %s / %s."
msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267
+#: ../libnm-util/crypto_gnutls.c:209 ../libnm-util/crypto_nss.c:263
#, c-format
msgid "Failed to decrypt the private key: unexpected padding length."
msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: അപ്രതീക്ഷിതമായ പാഢിങ് നീളം."
-#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278
+#: ../libnm-util/crypto_gnutls.c:220 ../libnm-util/crypto_nss.c:274
#, c-format
msgid "Failed to decrypt the private key."
msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356
+#: ../libnm-util/crypto_gnutls.c:285 ../libnm-util/crypto_nss.c:352
#, c-format
msgid "Could not allocate memory for encrypting."
msgstr "എന്‍ക്രിപ്റ്റിങിനുള്ള മെമ്മറി അനുവദിക്കുന്നതില്‍ പരാജയപ്പെട്ടു,"
-#: ../libnm-util/crypto_gnutls.c:294
+#: ../libnm-util/crypto_gnutls.c:293
#, c-format
msgid "Failed to initialize the encryption cipher context: %s / %s."
msgstr "എന്‍ക്രിപ്ഷന്‍ സിഫര്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:303
+#: ../libnm-util/crypto_gnutls.c:302
#, c-format
msgid "Failed to set symmetric key for encryption: %s / %s."
msgstr "എന്‍ക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:313
+#: ../libnm-util/crypto_gnutls.c:312
#, c-format
msgid "Failed to set IV for encryption: %s / %s."
msgstr "എന്‍ക്രിപ്ഷനുള്ള IV സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:322
+#: ../libnm-util/crypto_gnutls.c:321
#, c-format
msgid "Failed to encrypt the data: %s / %s."
msgstr "ഡേറ്റാ എന്‍ക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:362
+#: ../libnm-util/crypto_gnutls.c:361
#, c-format
msgid "Error initializing certificate data: %s"
msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡേറ്റാ ആരംഭിക്കുന്നതില്‍ പിശക്: %s"
-#: ../libnm-util/crypto_gnutls.c:384
+#: ../libnm-util/crypto_gnutls.c:383
#, c-format
msgid "Couldn't decode certificate: %s"
msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമല്ല: %s"
-#: ../libnm-util/crypto_gnutls.c:408
+#: ../libnm-util/crypto_gnutls.c:407
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %s"
msgstr "PKCS#12 ഡീകോഡര്‍ ആരംഭിക്കുവാന്‍ സാധ്യമായില്ല: %s"
-#: ../libnm-util/crypto_gnutls.c:421
+#: ../libnm-util/crypto_gnutls.c:420
#, c-format
msgid "Couldn't decode PKCS#12 file: %s"
msgstr "PKCS#12 ഫയല്‍ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %s"
-#: ../libnm-util/crypto_gnutls.c:433
+#: ../libnm-util/crypto_gnutls.c:432
#, c-format
msgid "Couldn't verify PKCS#12 file: %s"
msgstr "PKCS#12 ഫയല്‍ ഉറപ്പാക്കുവാന്‍ സാധ്യമായില്ല: %s"
+#: ../libnm-util/crypto_gnutls.c:460
+#, c-format
+msgid "Couldn't initialize PKCS#8 decoder: %s"
+msgstr "PKCS#8 ഡീകോഡര്‍ ആരംഭിക്കുവാന്‍ സാധ്യമായില്ല: %s"
+
+#: ../libnm-util/crypto_gnutls.c:483
+#, c-format
+msgid "Couldn't decode PKCS#8 file: %s"
+msgstr "PKCS#8 ഫയല്‍ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %s"
+
#: ../libnm-util/crypto_nss.c:56
#, c-format
msgid "Failed to initialize the crypto engine: %d."
msgstr "ക്രിപ്റ്റോ എഞ്ചിന്‍ ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d."
-#: ../libnm-util/crypto_nss.c:111
+#: ../libnm-util/crypto_nss.c:107
#, c-format
msgid "Failed to initialize the MD5 context: %d."
msgstr "MD5 കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d."
-#: ../libnm-util/crypto_nss.c:179
+#: ../libnm-util/crypto_nss.c:175
#, c-format
msgid "Invalid IV length (must be at least %d)."
msgstr "തെറ്റായ IV നീളം (കുറഞ്ഞതു് %d ആയിരിക്കണം)."
-#: ../libnm-util/crypto_nss.c:196
+#: ../libnm-util/crypto_nss.c:192
#, c-format
msgid "Failed to initialize the decryption cipher slot."
msgstr "ഡീക്രിപ്ഷന്‍ സിഫര്‍ സ്ലോട്ട് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:206
+#: ../libnm-util/crypto_nss.c:202
#, c-format
msgid "Failed to set symmetric key for decryption."
msgstr "ഡീക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:216
+#: ../libnm-util/crypto_nss.c:212
#, c-format
msgid "Failed to set IV for decryption."
msgstr "ഡീക്രിപ്ഷനായി IV സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:224
+#: ../libnm-util/crypto_nss.c:220
#, c-format
msgid "Failed to initialize the decryption context."
msgstr "ഡീക്രിപ്ഷന്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:237
+#: ../libnm-util/crypto_nss.c:233
#, c-format
msgid "Failed to decrypt the private key: %d."
msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %d."
-#: ../libnm-util/crypto_nss.c:245
+#: ../libnm-util/crypto_nss.c:241
#, c-format
msgid "Failed to decrypt the private key: decrypted data too large."
-msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: ഡീക്രിപ്റ്റ് ചെയ്ത ഡേറ്റ വളരെ വലുതാണു്."
+msgstr ""
+"സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: ഡീക്രിപ്റ്റ് ചെയ്ത ഡേറ്റ വളരെ വലുതാണു്."
-#: ../libnm-util/crypto_nss.c:256
+#: ../libnm-util/crypto_nss.c:252
#, c-format
msgid "Failed to finalize decryption of the private key: %d."
msgstr "സ്വകാര്യ കീയുടെ ‍ഡീക്രിപ്ഷന്‍ ഉറപ്പാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d."
-#: ../libnm-util/crypto_nss.c:364
+#: ../libnm-util/crypto_nss.c:360
#, c-format
msgid "Failed to initialize the encryption cipher slot."
msgstr "എന്‍ക്രിപ്ഷന്‍ സിഫര്‍ സ്ലോട്ട് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:372
+#: ../libnm-util/crypto_nss.c:368
#, c-format
msgid "Failed to set symmetric key for encryption."
msgstr "എന്‍ക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:380
+#: ../libnm-util/crypto_nss.c:376
#, c-format
msgid "Failed to set IV for encryption."
msgstr "എന്‍ക്രിപ്ഷനുള്ള IV കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:388
+#: ../libnm-util/crypto_nss.c:384
#, c-format
msgid "Failed to initialize the encryption context."
msgstr "എന്‍ക്രിപ്ഷന്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
-#: ../libnm-util/crypto_nss.c:396
+#: ../libnm-util/crypto_nss.c:392
#, c-format
msgid "Failed to encrypt: %d."
msgstr "എന്‍ക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %d."
-#: ../libnm-util/crypto_nss.c:404
+#: ../libnm-util/crypto_nss.c:400
#, c-format
msgid "Unexpected amount of data after encrypting."
msgstr "എന്‍ക്രിപ്റ്റ് ചെയ്തതിനു് ശേഷം അപ്രതീക്ഷിതമായ ഡേറ്റാ"
-#: ../libnm-util/crypto_nss.c:447
+#: ../libnm-util/crypto_nss.c:443
#, c-format
msgid "Couldn't decode certificate: %d"
msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %d"
-#: ../libnm-util/crypto_nss.c:482
+#: ../libnm-util/crypto_nss.c:478
#, c-format
msgid "Couldn't convert password to UCS2: %d"
msgstr "രഹസ്യവാക്ക് UCS2-ലേക്ക് വേര്‍തിരിക്കുവാന്‍ സാധ്യമായില്ല: %d"
-#: ../libnm-util/crypto_nss.c:510
+#: ../libnm-util/crypto_nss.c:506
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %d"
msgstr "PKCS#12 ഡീകോഡര്‍ ആരംഭിക്കുവാന്‍ സാധ്യമായില്ല: %d"
-#: ../libnm-util/crypto_nss.c:519
+#: ../libnm-util/crypto_nss.c:515
#, c-format
msgid "Couldn't decode PKCS#12 file: %d"
msgstr "PKCS#12 ഫയല്‍ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %d"
-#: ../libnm-util/crypto_nss.c:528
+#: ../libnm-util/crypto_nss.c:524
#, c-format
msgid "Couldn't verify PKCS#12 file: %d"
msgstr "PKCS#12 ഫയല്‍ ഉറപ്പാക്കുവാന്‍ സാധ്യമായില്ല: %d"
-#: ../libnm-util/crypto_nss.c:557
+#: ../libnm-util/crypto_nss.c:568
msgid "Could not generate random data."
msgstr "വേഗത്തില്‍ ഡേറ്റാ തയ്യാറാക്കുവാന്‍ സാധ്യമായില്ല."
-#: ../libnm-util/nm-utils.c:1925
+#: ../libnm-util/nm-utils.c:2034
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "എന്‍ക്രിപ്ഷന്‍ കീ തയ്യാറാക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല."
-#: ../libnm-util/nm-utils.c:2035
+#: ../libnm-util/nm-utils.c:2144
msgid "Could not allocate memory for PEM file creation."
msgstr "PEM ഫയല്‍ ഉണ്ടാക്കുന്നതിനുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല."
-#: ../libnm-util/nm-utils.c:2047
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "PEM ഫയലിലേക്ക് IV സൂക്ഷിക്കുന്നതിനാവശ്യമുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല."
-#: ../libnm-util/nm-utils.c:2059
+#: ../libnm-util/nm-utils.c:2168
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
-msgstr "PEM ഫയലിലേക്ക് എന്‍ക്രിപ്റ്റ് ചെയ്ത കീ സൂക്ഷിക്കുന്നതിനുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല."
+msgstr ""
+"PEM ഫയലിലേക്ക് എന്‍ക്രിപ്റ്റ് ചെയ്ത കീ സൂക്ഷിക്കുന്നതിനുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല."
-#: ../libnm-util/nm-utils.c:2078
+#: ../libnm-util/nm-utils.c:2187
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "PEM ഫയല്‍ ഡേറ്റായ്ക്കുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല."
-#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231
-#: ../src/nm-netlink-monitor.c:653
-#, c-format
-msgid "error processing netlink message: %s"
-msgstr "നെറ്റ്ലിങ്ക് സന്ദേശം പ്രവര്‍ത്തിപ്പിക്കുമ്പോള്‍ പിശക്: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
+msgid "Enable or disable system networking"
+msgstr ""
-#: ../src/nm-netlink-monitor.c:214
-msgid "error occurred while waiting for data on socket"
-msgstr "സോക്കറ്റില്‍ ഡേറ്റായ്ക്കായി കാത്തിരിക്കുമ്പോള്‍ പിശകുണ്ടായിരിക്കുന്നു"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
+msgid "System policy prevents enabling or disabling system networking"
+msgstr ""
+" സിസ്റ്റം നെറ്റ്​വര്‍ക്കിങ് പ്രവര്‍ത്തനസജ്ജമാക്കുന്നതും പ്രവര്‍ത്തനരഹിതമാക്കുന്നതും സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
+msgid ""
+"Put NetworkManager to sleep or wake it up (should only be used by system "
+"power management)"
+msgstr ""
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr "നെറ്റ്​വര്‍ക്ക് മാനേജറിനെ ഉറക്കുന്നതും ഉണര്‍ത്തുന്നതും സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
+msgid "Enable or disable WiFi devices"
+msgstr " WiFi ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
+msgid "System policy prevents enabling or disabling WiFi devices"
+msgstr ""
+"WiFi ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുന്നത് സിസ്റ്റം പോളിസി തടയുന്നു"
-#: ../src/nm-netlink-monitor.c:254
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
+msgid "Enable or disable mobile broadband devices"
+msgstr "മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
+msgid "System policy prevents enabling or disabling mobile broadband devices"
+msgstr ""
+"മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുന്നത് സിസ്റ്റം "
+"പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "WiMAX മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
+msgid ""
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgstr ""
+"iMAX മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുന്നത് "
+"സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
+msgid "Allow control of network connections"
+msgstr "നെറ്റ്​വര്‍ക്ക് കണക്ഷനുകളെ നിയന്ത്രിക്കുന്നത് അനുവദിക്കുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
+msgid "System policy prevents control of network connections"
+msgstr " നെറ്റ്​വര്‍ക്ക് കണക്ഷനുകളെ നിയന്ത്രിക്കുന്നത് സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
+msgid "Connection sharing via a protected WiFi network"
+msgstr "സുരക്ഷിതമായ ഒരു വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷന്‍ പങ്കിടുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
+msgid "System policy prevents sharing connections via a protected WiFi network"
+msgstr "സുരക്ഷിതമായ ഒരു വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷനുകള്‍ പങ്കിടുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
+msgid "Connection sharing via an open WiFi network"
+msgstr "ഒരു തുറന്ന വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷന്‍ പങ്കിടുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
+msgid "System policy prevents sharing connections via an open WiFi network"
+msgstr "ഒരു തുറന്ന വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷനുകള്‍ പങ്കിടുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
+msgid "Modify personal network connections"
+msgstr "സ്വന്തമായ നെറ്റ്​വര്‍ക്ക് കണക്ഷനുകളില്‍ മാറ്റം വരുത്തുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
+msgid "System policy prevents modification of personal network settings"
+msgstr " സ്വന്തമായ നെറ്റ്​വര്‍ക്ക് സജ്ജീകരണങ്ങള്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
+#, fuzzy
+#| msgid "Modify system connections"
+msgid "Modify network connections for all users"
+msgstr "സിസ്റ്റം കണക്ഷനുകളില്‍ മാറ്റം വരുത്തുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
+#, fuzzy
+#| msgid "System policy prevents modification of system settings"
+msgid "System policy prevents modification of network settings for all users"
+msgstr " സിസ്റ്റത്തിന്റെ സജ്ജീകരണങ്ങളില്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
+msgid "Modify persistent system hostname"
+msgstr "സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമത്തില്‍ മാറ്റം വരുത്തുക"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
+msgid "System policy prevents modification of the persistent system hostname"
+msgstr "സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമത്തില്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+
+#: ../src/main.c:143
#, c-format
-msgid "unable to connect to netlink for monitoring link status: %s"
-msgstr "ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്കുമായി കണക്ട് ചെയ്യുവാന്‍ സാധ്യമല്ല: %s"
+msgid "Failed to initialize SIGTERM pipe: %d"
+msgstr "SIGTERM പൈപ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d"
-#: ../src/nm-netlink-monitor.c:265
+#: ../src/main.c:174
#, c-format
-msgid "unable to enable netlink handle credential passing: %s"
-msgstr "നെറ്റ്ലിങ്ക് ഹാന്‍ഡില്‍ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s"
+msgid "Opening %s failed: %s\n"
+msgstr "%s തുറക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s\n"
-#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353
+#: ../src/main.c:180
#, c-format
-msgid "unable to allocate netlink handle for monitoring link status: %s"
-msgstr "ലിിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്ക് ഹാന്‍ഡില്‍ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s"
+msgid "Writing to %s failed: %s\n"
+msgstr "%s ഇലേക്കു എഴുതുന്നത് പരാജയപ്പെട്ടു: %s\n"
-#: ../src/nm-netlink-monitor.c:376
+#: ../src/main.c:185
#, c-format
-msgid "unable to allocate netlink link cache for monitoring link status: %s"
-msgstr "ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്ക് ലിങ്ക് കാഷേ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s "
+msgid "Closing %s failed: %s\n"
+msgstr "%s അടയ്ക്കുന്നത് പരാജയപ്പെട്ടു: %s\n"
-#: ../src/nm-netlink-monitor.c:502
+#: ../src/main.c:228
#, c-format
-msgid "unable to join netlink group: %s"
-msgstr "നെറ്റ്ലിങ്ക് ഗ്രൂപ്പില്‍ ചേരുവാന്‍ സാധ്യമല്ല: %s"
+msgid "NetworkManager is already running (pid %ld)\n"
+msgstr "നെറ്റ്​വര്‍ക്ക് മാനേജര്‍ ആദ്യമേ പ്രവര്‍ത്തിച്ചുകൊണ്ടിരിക്കുന്നുണ്ട് (pid %ld)\n"
+
+#: ../src/main.c:368
+msgid "Print NetworkManager version and exit"
+msgstr "നെറ്റ്‌വര്‍ക്ക്മാനേജറിന്റെ പതിപ്പ് വിവരം കാണിച്ചു പുറത്തു കടക്കുക"
+
+#: ../src/main.c:369
+msgid "Don't become a daemon"
+msgstr ""
+
+#: ../src/main.c:370
+msgid "Make all warnings fatal"
+msgstr "എല്ലാ മുന്നറിയിപ്പുകളും സുപ്രധാനമാക്കുക"
+
+#: ../src/main.c:371
+msgid "Specify the location of a PID file"
+msgstr ""
+
+#: ../src/main.c:371
+msgid "filename"
+msgstr "പ്രമാണനാമം"
+
+#: ../src/main.c:372
+msgid "State file location"
+msgstr "പ്രമാണത്തിന്റെ സ്ഥാനം പ്രസ്താവിക്കുക"
+
+#: ../src/main.c:372
+msgid "/path/to/state.file"
+msgstr "/path/to/state.file"
+
+#: ../src/main.c:373
+msgid "Config file location"
+msgstr "ക്രമീകരണ പ്രമാണത്തിന്റെ സ്ഥാനം"
+
+#: ../src/main.c:373
+msgid "/path/to/config.file"
+msgstr "/path/to/config.file"
+
+#: ../src/main.c:374
+msgid "List of plugins separated by ','"
+msgstr ""
+
+#: ../src/main.c:374
+msgid "plugin1,plugin2"
+msgstr "plugin1,plugin2"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:376
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgstr ""
-#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:379
+msgid ""
+"Log domains separated by ',': any combination of\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+msgstr ""
+
+#: ../src/main.c:392
#, c-format
-msgid "error updating link cache: %s"
-msgstr "ലിങ്ക് കാഷേ പരിഷ്കരിക്കുന്നതില്‍ പിശക്: %s"
+msgid "GModules are not supported on your platform!\n"
+msgstr ""
+
+#: ../src/main.c:411
+msgid ""
+"NetworkManager monitors all network connections and automatically\n"
+"chooses the best connection to use. It also allows the user to\n"
+"specify wireless access points which wireless cards in the computer\n"
+"should associate with."
+msgstr ""
-#: ../src/main.c:502
+#: ../src/main.c:417
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr "തെറ്റായ ഉപാധി. ശരിയായ കൂടുതല്‍ ഉപാധികള്‍ക്കായി ദയവായി --help ഉപയോഗിക്കുക.\n"
-#: ../src/main.c:562
+#: ../src/main.c:427
+#, c-format
+msgid "You must be root to run NetworkManager!\n"
+msgstr "പിശക്: നെറ്റ്‌വര്‍ക്ക്മാനേജര്‍ പ്രവര്‍ത്തിക്കാന്‍ നിങ്ങള്‍ root ആയിരിക്കേണ്ടത് അത്യാവശ്യമാണ്\n"
+
+#: ../src/main.c:448
+#, c-format
+msgid "Failed to read configuration: (%d) %s\n"
+msgstr "ക്രമീകരണങ്ങള്‍ വായിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: (%d) %s\n"
+
+#: ../src/main.c:459
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. ശരിയായ കൂടുതല്‍ ഉപാധികള്‍ക്കായി ദയവായി --help ഉപയോഗിക്കുക.\n"
-#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325
+#: ../src/main.c:466
+#, c-format
+msgid "State file %s parsing failed: (%d) %s\n"
+msgstr ""
+
+#: ../src/main.c:483
+#, c-format
+msgid "Could not daemonize: %s [error %u]\n"
+msgstr ""
+
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
msgstr "# തയ്യാറാക്കിയതു് NetworkManager\n"
-#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69
#, c-format
msgid ""
"# Merged from %s\n"
@@ -1559,79 +2377,170 @@ msgstr ""
"# %s-ല്‍ നിന്നും കൂട്ടിചേര്‍ത്തിരിക്കുന്നു\n"
"\n"
-#: ../src/dhcp-manager/nm-dhcp-manager.c:279
+#: ../src/dhcp-manager/nm-dhcp-manager.c:266
msgid "no usable DHCP client could be found."
msgstr "ഉപയോഗിക്കുവാന്‍ സാധിക്കുന്ന DHCP ക്ലയന്റ് ലഭ്യമായില്ല."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:288
+#: ../src/dhcp-manager/nm-dhcp-manager.c:275
msgid "'dhclient' could be found."
msgstr "'dhclient' ലഭ്യമായില്ല."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:298
+#: ../src/dhcp-manager/nm-dhcp-manager.c:285
msgid "'dhcpcd' could be found."
msgstr "'dhcpcd' ലഭ്യമായില്ല."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:306
+#: ../src/dhcp-manager/nm-dhcp-manager.c:293
#, c-format
msgid "unsupported DHCP client '%s'"
msgstr "പിന്തണലഭ്യമല്ലാത്ത DHCP ക്ലയന്റ് '%s'"
-#: ../src/logging/nm-logging.c:146
+#: ../src/dns-manager/nm-dns-manager.c:376
+msgid "NOTE: the libc resolver may not support more than 3 nameservers."
+msgstr "കുറിപ്പു്: libc റിസോള്‍വര്‍ 3 നെയിംസര്‍വറുകളില്‍ കൂടതല്‍ പിന്തുണയ്ക്കുന്നതല്ല."
+
+#: ../src/dns-manager/nm-dns-manager.c:378
+msgid "The nameservers listed below may not be recognized."
+msgstr "താഴെ പറഞ്ഞിരിക്കുന്ന നെയിംസര്‍വറുകള്‍ തിരിച്ചറിയപ്പെടുന്നവയല്ല."
+
+#: ../src/logging/nm-logging.c:130
#, c-format
msgid "Unknown log level '%s'"
msgstr "അപരിചതമായ ലോഗ് ലവല്‍ '%s'"
-#: ../src/logging/nm-logging.c:171
+#: ../src/logging/nm-logging.c:155
#, c-format
msgid "Unknown log domain '%s'"
msgstr "അപരിചിതമായ ലോഗ് ഡൊമെയിന്‍ '%s'"
-#: ../src/dns-manager/nm-dns-manager.c:343
-msgid "NOTE: the libc resolver may not support more than 3 nameservers."
-msgstr "കുറിപ്പു്: libc റിസോള്‍വര്‍ 3 നെയിംസര്‍വറുകളില്‍ കൂടതല്‍ പിന്തുണയ്ക്കുന്നതല്ല."
+#: ../src/modem-manager/nm-modem-cdma.c:279 ../src/nm-device-bt.c:325
+#, c-format
+msgid "CDMA connection %d"
+msgstr "CDMA കണക്ഷന്‍ %d"
-#: ../src/dns-manager/nm-dns-manager.c:345
-msgid "The nameservers listed below may not be recognized."
-msgstr "താഴെ പറഞ്ഞിരിക്കുന്ന നെയിംസര്‍വറുകള്‍ തിരിച്ചറിയപ്പെടുന്നവയല്ല."
+#: ../src/modem-manager/nm-modem-gsm.c:512 ../src/nm-device-bt.c:321
+#, c-format
+msgid "GSM connection %d"
+msgstr "GSM കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-bond.c:190
+#, c-format
+msgid "Bond connection %d"
+msgstr "Bond കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-bt.c:296
+#, c-format
+msgid "PAN connection %d"
+msgstr "PAN കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-bt.c:329
+#, c-format
+msgid "DUN connection %d"
+msgstr "DUN കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-ethernet.c:1433
+#, c-format
+msgid "PPPoE connection %d"
+msgstr "PPPoE കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-ethernet.c:1433 ../src/settings/nm-settings-utils.c:50
+#, c-format
+msgid "Wired connection %d"
+msgstr "Wired കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-infiniband.c:303
+#, c-format
+msgid "InfiniBand connection %d"
+msgstr "InfiniBand കണക്ഷന്‍ %d"
+
+#: ../src/nm-device-olpc-mesh.c:293
+#, c-format
+msgid "Mesh %d"
+msgstr "മെഷ് %d"
+
+#: ../src/nm-manager.c:657
+#, c-format
+msgid "VPN connection %d"
+msgstr "വിപിഎന്‍ കണക്ഷന്‍ %d"
+
+#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
+#, c-format
+msgid "error processing netlink message: %s"
+msgstr "നെറ്റ്ലിങ്ക് സന്ദേശം പ്രവര്‍ത്തിപ്പിക്കുമ്പോള്‍ പിശക്: %s"
+
+#: ../src/nm-netlink-monitor.c:251
+msgid "error occurred while waiting for data on socket"
+msgstr "സോക്കറ്റില്‍ ഡേറ്റായ്ക്കായി കാത്തിരിക്കുമ്പോള്‍ പിശകുണ്ടായിരിക്കുന്നു"
+
+#: ../src/nm-netlink-monitor.c:296
+#, c-format
+msgid "unable to connect to netlink for monitoring link status: %s"
+msgstr "ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്കുമായി കണക്ട് ചെയ്യുവാന്‍ സാധ്യമല്ല: %s"
+
+#: ../src/nm-netlink-monitor.c:307
+#, c-format
+msgid "unable to enable netlink handle credential passing: %s"
+msgstr "നെറ്റ്ലിങ്ക് ഹാന്‍ഡില്‍ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s"
-#: ../src/settings/nm-default-wired-connection.c:157
+#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390
#, c-format
-msgid "Auto %s"
-msgstr "ഓട്ടോ %s"
+msgid "unable to allocate netlink handle for monitoring link status: %s"
+msgstr "ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്ക് ഹാന്‍ഡില്‍ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s"
-#: ../system-settings/plugins/ifcfg-rh/reader.c:3256
+#: ../src/nm-netlink-monitor.c:415
+#, c-format
+msgid "unable to allocate netlink link cache for monitoring link status: %s"
+msgstr ""
+"ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്ക് ലിങ്ക് കാഷേ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s "
+
+#: ../src/nm-netlink-monitor.c:542
+#, c-format
+msgid "unable to join netlink group: %s"
+msgstr "നെറ്റ്ലിങ്ക് ഗ്രൂപ്പില്‍ ചേരുവാന്‍ സാധ്യമല്ല: %s"
+
+#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684
+#, c-format
+msgid "error updating link cache: %s"
+msgstr "ലിങ്ക് കാഷേ പരിഷ്കരിക്കുന്നതില്‍ പിശക്: %s"
+
+#: ../src/settings/plugins/ifcfg-rh/reader.c:92
+#: ../src/settings/plugins/ifnet/connection_parser.c:51
msgid "System"
msgstr "സിസ്റ്റം"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1
-msgid "Connection sharing via a protected WiFi network"
-msgstr "സുരക്ഷിതമായ ഒരു വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷന്‍ പങ്കിടുക"
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3672
+msgid "Bond"
+msgstr "Bond"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2
-msgid "Connection sharing via an open WiFi network"
-msgstr "ഒരു തുറന്ന വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷന്‍ പങ്കിടുക"
+#~ msgid "SCOPE"
+#~ msgstr "SCOPE"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3
-msgid "Modify persistent system hostname"
-msgstr "സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമത്തില്‍ മാറ്റം വരുത്തുക"
+#~ msgid "DBUS-SERVICE"
+#~ msgstr "DBUS-SERVICE"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4
-msgid "Modify system connections"
-msgstr "സിസ്റ്റം കണക്ഷനുകളില്‍ മാറ്റം വരുത്തുക"
+#~ msgid "system"
+#~ msgstr "സിസ്റ്റം"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5
-msgid "System policy prevents modification of system settings"
-msgstr " സിസ്റ്റത്തിന്റെ സജ്ജീകരണങ്ങളില്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+#~ msgid "user"
+#~ msgstr "ഉപയോക്താവു്"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6
-msgid "System policy prevents modification of the persistent system hostname"
-msgstr "സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമത്തില്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+#~ msgid "System connections"
+#~ msgstr "സിസ്റ്റം കണക്ഷനുകള്‍"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7
-msgid "System policy prevents sharing connections via a protected WiFi network"
-msgstr "സുരക്ഷിതമായ ഒരു വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷനുകള്‍ പങ്കിടുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+#~ msgid "User connections"
+#~ msgstr "ഉപയോക്താവിനുള്ള കണക്ഷനുകള്‍"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8
-msgid "System policy prevents sharing connections via an open WiFi network"
-msgstr "ഒരു തുറന്ന വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷനുകള്‍ പങ്കിടുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു"
+#~ msgid "Error: Obtaining active connection for '%s' failed."
+#~ msgstr "പിശക്: '%s'-നുള്ള സജീവമായ കണക്ഷന്‍ ലഭ്യമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു."
+
+#~ msgid "IP4-SETTINGS"
+#~ msgstr "IP4-SETTINGS"
+
+#~ msgid "PREFIX"
+#~ msgstr "PREFIX"
+
+#~ msgid "unknown)"
+#~ msgstr "(അപരിചിതം)"
+#~ msgid "Auto %s"
+#~ msgstr "ഓട്ടോ %s"
diff --git a/po/pl.po b/po/pl.po
index 7aeb37330..4ad67c92d 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -9,99 +9,201 @@ msgstr ""
"Project-Id-Version: NetworkManager\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=NetworkManager&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2011-09-24 03:25+0000\n"
-"PO-Revision-Date: 2011-09-28 21:47+0200\n"
+"POT-Creation-Date: 2012-02-24 15:25+0000\n"
+"PO-Revision-Date: 2012-02-24 22:06+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <gnomepl@aviary.pl>\n"
+"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: pl\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n"
"X-Poedit-Language: Polish\n"
"X-Poedit-Country: Poland\n"
-#: ../cli/src/connections.c:64 ../cli/src/connections.c:78
-#: ../cli/src/devices.c:101 ../cli/src/devices.c:114 ../cli/src/devices.c:124
-#: ../cli/src/devices.c:134 ../cli/src/devices.c:148 ../cli/src/devices.c:162
-#: ../cli/src/devices.c:173 ../cli/src/devices.c:184 ../cli/src/devices.c:193
-#: ../cli/src/devices.c:202 ../cli/src/devices.c:224
-msgid "NAME"
-msgstr "NAZWA"
+#: ../cli/src/common.c:32 ../cli/src/common.c:44 ../cli/src/common.c:52
+#: ../cli/src/common.c:63 ../cli/src/connections.c:119
+#: ../cli/src/connections.c:153
+msgid "GROUP"
+msgstr "GRUPA"
#. 0
-#: ../cli/src/connections.c:65 ../cli/src/connections.c:79
-msgid "UUID"
-msgstr "UUID"
+#: ../cli/src/common.c:33 ../cli/src/common.c:53
+msgid "ADDRESS"
+msgstr "ADRES"
#. 1
-#: ../cli/src/connections.c:66
-msgid "DEVICES"
-msgstr "URZĄDZENIA"
+#: ../cli/src/common.c:34 ../cli/src/common.c:54
+msgid "ROUTE"
+msgstr "TRASA"
#. 2
-#: ../cli/src/connections.c:67
-msgid "DEFAULT"
-msgstr "DOMYŚLNE"
+#: ../cli/src/common.c:35 ../cli/src/common.c:55
+msgid "DNS"
+msgstr "DNS"
#. 3
-#: ../cli/src/connections.c:68
-msgid "SPEC-OBJECT"
-msgstr "KONKRETNY-OBIEKT"
+#: ../cli/src/common.c:36 ../cli/src/common.c:56
+msgid "DOMAIN"
+msgstr "DOMENA"
#. 4
-#: ../cli/src/connections.c:69
-msgid "VPN"
-msgstr "VPN"
+#: ../cli/src/common.c:37
+msgid "WINS"
+msgstr "WINS"
-#. 5
-#. 6
-#. 2
-#. 11
-#. 5
-#: ../cli/src/connections.c:70 ../cli/src/connections.c:85
-#: ../cli/src/devices.c:69 ../cli/src/devices.c:214 ../cli/src/devices.c:230
-msgid "DBUS-PATH"
-msgstr "ŚCIEŻKA-DO-DBUS"
+#. 0
+#: ../cli/src/common.c:45 ../cli/src/common.c:64
+msgid "OPTION"
+msgstr "OPCJA"
+
+#. 0
+#. used only for 'GENERAL' group listing
+#: ../cli/src/connections.c:56 ../cli/src/connections.c:120
+#: ../cli/src/devices.c:100 ../cli/src/devices.c:121 ../cli/src/devices.c:131
+#: ../cli/src/devices.c:141 ../cli/src/devices.c:155 ../cli/src/devices.c:169
+#: ../cli/src/devices.c:191
+msgid "NAME"
+msgstr "NAZWA"
+
+#. 0
+#. 1
+#: ../cli/src/connections.c:57 ../cli/src/connections.c:121
+msgid "UUID"
+msgstr "UUID"
#. 1
#. 0
#. 1
#. 2
-#: ../cli/src/connections.c:80 ../cli/src/devices.c:67
-#: ../cli/src/devices.c:103 ../cli/src/devices.c:227
+#: ../cli/src/connections.c:58 ../cli/src/connections.c:154
+#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:194
msgid "TYPE"
msgstr "TYP"
#. 2
-#: ../cli/src/connections.c:81
+#: ../cli/src/connections.c:59
msgid "TIMESTAMP"
msgstr "OKRES-CZASU"
#. 3
-#: ../cli/src/connections.c:82
+#: ../cli/src/connections.c:60
msgid "TIMESTAMP-REAL"
msgstr "RZECZYWISTY-OKRES-CZASU"
#. 4
-#: ../cli/src/connections.c:83
+#: ../cli/src/connections.c:61
msgid "AUTOCONNECT"
msgstr "ŁĄCZENIE-AUTOMATYCZNE"
#. 5
-#: ../cli/src/connections.c:84
+#: ../cli/src/connections.c:62
msgid "READONLY"
msgstr "TYLKO-DO-ODCZYTU"
-#: ../cli/src/connections.c:153
+#. 6
+#. 8
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63 ../cli/src/connections.c:128
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:181 ../cli/src/devices.c:197
+msgid "DBUS-PATH"
+msgstr "ŚCIEŻKA-DO-DBUS"
+
+#. 2
+#: ../cli/src/connections.c:122
+msgid "DEVICES"
+msgstr "URZĄDZENIA"
+
+#. 3
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:123 ../cli/src/devices.c:67
+#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "STAN"
+
+#. 4
+#: ../cli/src/connections.c:124
+msgid "DEFAULT"
+msgstr "DOMYŚLNE"
+
+#. 5
+#: ../cli/src/connections.c:125
+msgid "DEFAULT6"
+msgstr "DOMYŚLNE6"
+
+#. 6
+#: ../cli/src/connections.c:126
+msgid "SPEC-OBJECT"
+msgstr "KONKRETNY-OBIEKT"
+
+#. 7
+#. 1
+#: ../cli/src/connections.c:127 ../cli/src/connections.c:141
+msgid "VPN"
+msgstr "VPN"
+
+#. 9
+#: ../cli/src/connections.c:129
+msgid "CON-PATH"
+msgstr "ŚCIEŻKA-DO-POŁĄCZENIA"
+
+#. 10
+#: ../cli/src/connections.c:130
+msgid "ZONE"
+msgstr "STREFA"
+
+#. 11
+#: ../cli/src/connections.c:131
+msgid "MASTER-PATH"
+msgstr "GŁÓWNA-ŚCIEŻKA"
+
+#: ../cli/src/connections.c:139 ../cli/src/devices.c:77
+msgid "GENERAL"
+msgstr "OGÓLNE"
+
+#. 0
+#: ../cli/src/connections.c:140
+msgid "IP"
+msgstr "IP"
+
+#. 1
+#: ../cli/src/connections.c:155
+msgid "USERNAME"
+msgstr "NAZWA-UŻYTKOWNIKA"
+
+#. 2
+#: ../cli/src/connections.c:156
+msgid "GATEWAY"
+msgstr "BRAMA"
+
+#. 3
+#: ../cli/src/connections.c:157
+msgid "BANNER"
+msgstr "BANER"
+
+#. 4
+#: ../cli/src/connections.c:158
+msgid "VPN-STATE"
+msgstr "STAN-VPN"
+
+#. 5
+#: ../cli/src/connections.c:159
+msgid "CFG"
+msgstr "KONFIGURACJA"
+
+#: ../cli/src/connections.c:180
#, c-format
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
" COMMAND := { list | status | up | down | delete }\n"
"\n"
" list [id <id> | uuid <id>]\n"
-" status\n"
+" status [id <id> | uuid <id> | path <path>]\n"
" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
"nowait] [--timeout <timeout>]\n"
" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
@@ -113,7 +215,7 @@ msgstr ""
" POLECENIE := { list | status | up | down | delete }\n"
"\n"
" list [id <identyfikator> | uuid <identyfikator>]\n"
-" status\n"
+" status [id <identyfikator> | uuid <identyfikator> | path <ścieżka>]\n"
" up id <identyfikator> | uuid <identyfikator> [iface <interfejs>] [ap "
"<BSSID>] [nsp <nazwa>] [--nowait] [--timeout <czas>]\n"
" up id <identyfikator> | uuid <identyfikator> [iface <interfejs>] [ap "
@@ -121,354 +223,377 @@ msgstr ""
" down id <identyfikator> | uuid <identyfikator>\n"
" delete id <identyfikator> | uuid <identyfikator>\n"
-#: ../cli/src/connections.c:208 ../cli/src/connections.c:532
+#: ../cli/src/connections.c:234 ../cli/src/connections.c:567
#, c-format
msgid "Error: 'con list': %s"
msgstr "Błąd: \"con list\": %s"
-#: ../cli/src/connections.c:210 ../cli/src/connections.c:534
+#: ../cli/src/connections.c:236 ../cli/src/connections.c:569
#, c-format
msgid "Error: 'con list': %s; allowed fields: %s"
msgstr "Błąd: \"con list\": %s; dozwolone pola: %s"
-#: ../cli/src/connections.c:218
+#: ../cli/src/connections.c:244
msgid "Connection details"
msgstr "Szczegóły połączenia"
-#: ../cli/src/connections.c:407
+#: ../cli/src/connections.c:442
msgid "never"
msgstr "nigdy"
#. "CAPABILITIES"
#. Print header
#. "WIFI-PROPERTIES"
-#: ../cli/src/connections.c:408 ../cli/src/connections.c:409
-#: ../cli/src/connections.c:587 ../cli/src/connections.c:589
-#: ../cli/src/devices.c:499 ../cli/src/devices.c:552 ../cli/src/devices.c:677
-#: ../cli/src/devices.c:703 ../cli/src/devices.c:704 ../cli/src/devices.c:705
-#: ../cli/src/devices.c:706 ../cli/src/devices.c:707 ../cli/src/settings.c:560
-#: ../cli/src/settings.c:632 ../cli/src/settings.c:753
-#: ../cli/src/settings.c:1041 ../cli/src/settings.c:1042
-#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1046
-#: ../cli/src/settings.c:1047 ../cli/src/settings.c:1177
-#: ../cli/src/settings.c:1178 ../cli/src/settings.c:1179
-#: ../cli/src/settings.c:1180 ../cli/src/settings.c:1259
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766 ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049 ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053 ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182 ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184 ../cli/src/settings.c:1185
#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
#: ../cli/src/settings.c:1268 ../cli/src/settings.c:1269
#: ../cli/src/settings.c:1270 ../cli/src/settings.c:1271
-#: ../cli/src/settings.c:1346
+#: ../cli/src/settings.c:1272 ../cli/src/settings.c:1343
msgid "yes"
msgstr "tak"
-#: ../cli/src/connections.c:408 ../cli/src/connections.c:409
-#: ../cli/src/connections.c:587 ../cli/src/connections.c:589
-#: ../cli/src/devices.c:499 ../cli/src/devices.c:552 ../cli/src/devices.c:677
-#: ../cli/src/devices.c:703 ../cli/src/devices.c:704 ../cli/src/devices.c:705
-#: ../cli/src/devices.c:706 ../cli/src/devices.c:707 ../cli/src/settings.c:560
-#: ../cli/src/settings.c:562 ../cli/src/settings.c:632
-#: ../cli/src/settings.c:753 ../cli/src/settings.c:1041
-#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1044
-#: ../cli/src/settings.c:1046 ../cli/src/settings.c:1047
-#: ../cli/src/settings.c:1177 ../cli/src/settings.c:1178
-#: ../cli/src/settings.c:1179 ../cli/src/settings.c:1180
-#: ../cli/src/settings.c:1259 ../cli/src/settings.c:1260
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:578
+#: ../cli/src/settings.c:646 ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048 ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051 ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054 ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183 ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185 ../cli/src/settings.c:1260
#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1268
#: ../cli/src/settings.c:1269 ../cli/src/settings.c:1270
-#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1346
+#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
msgid "no"
msgstr "nie"
-#: ../cli/src/connections.c:483
+#: ../cli/src/connections.c:518
msgid "Connection list"
msgstr "Lista połączeń"
-#: ../cli/src/connections.c:496 ../cli/src/connections.c:1356
-#: ../cli/src/connections.c:1371 ../cli/src/connections.c:1380
-#: ../cli/src/connections.c:1390 ../cli/src/connections.c:1402
-#: ../cli/src/connections.c:1497 ../cli/src/connections.c:1580
-#: ../cli/src/devices.c:1180 ../cli/src/devices.c:1190
-#: ../cli/src/devices.c:1304 ../cli/src/devices.c:1312
-#: ../cli/src/devices.c:1525 ../cli/src/devices.c:1532
+#: ../cli/src/connections.c:531 ../cli/src/connections.c:1064
+#: ../cli/src/connections.c:1808 ../cli/src/connections.c:1823
+#: ../cli/src/connections.c:1832 ../cli/src/connections.c:1842
+#: ../cli/src/connections.c:1854 ../cli/src/connections.c:1949
+#: ../cli/src/connections.c:2051 ../cli/src/devices.c:1190
+#: ../cli/src/devices.c:1200 ../cli/src/devices.c:1314
+#: ../cli/src/devices.c:1322 ../cli/src/devices.c:1535
+#: ../cli/src/devices.c:1542
#, c-format
msgid "Error: %s argument is missing."
msgstr "Błąd: brak parametru %s."
-#: ../cli/src/connections.c:509
+#: ../cli/src/connections.c:544
#, c-format
msgid "Error: %s - no such connection."
msgstr "Błąd: %s - nie ma takiego połączenia."
-#: ../cli/src/connections.c:515 ../cli/src/connections.c:1415
-#: ../cli/src/connections.c:1514 ../cli/src/connections.c:1587
-#: ../cli/src/devices.c:977 ../cli/src/devices.c:1057
-#: ../cli/src/devices.c:1204 ../cli/src/devices.c:1318
-#: ../cli/src/devices.c:1538
+#: ../cli/src/connections.c:550 ../cli/src/connections.c:1867
+#: ../cli/src/connections.c:1966 ../cli/src/connections.c:2058
+#: ../cli/src/devices.c:987 ../cli/src/devices.c:1067
+#: ../cli/src/devices.c:1214 ../cli/src/devices.c:1328
+#: ../cli/src/devices.c:1548
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "Nieznany parametr: %s\n"
-#: ../cli/src/connections.c:524
+#: ../cli/src/connections.c:559
#, c-format
msgid "Error: no valid parameter specified."
msgstr "Błąd: nie podano prawidłowego parametru."
-#: ../cli/src/connections.c:539 ../cli/src/connections.c:1668
-#: ../cli/src/devices.c:1746 ../cli/src/network-manager.c:456
+#: ../cli/src/connections.c:574 ../cli/src/connections.c:2151
+#: ../cli/src/devices.c:1756 ../cli/src/network-manager.c:456
#, c-format
msgid "Error: %s."
msgstr "Błąd: %s."
-#: ../cli/src/connections.c:627
-#, c-format
-msgid "Error: 'con status': %s"
-msgstr "Błąd: \"con status\": %s"
-
-#: ../cli/src/connections.c:629
-#, c-format
-msgid "Error: 'con status': %s; allowed fields: %s"
-msgstr "Błąd: \"con status\": %s; dozwolone pola: %s"
-
-#: ../cli/src/connections.c:637 ../cli/src/connections.c:1430
-#: ../cli/src/connections.c:1529 ../cli/src/connections.c:1601
-#: ../cli/src/devices.c:1004 ../cli/src/devices.c:1066
-#: ../cli/src/devices.c:1219 ../cli/src/devices.c:1348
-#: ../cli/src/devices.c:1567
-#, c-format
-msgid "Error: Can't find out if NetworkManager is running: %s."
-msgstr ""
-"Błąd: nie można ustalić, czy usługa NetworkManager jest uruchomiona: %s."
-
-#: ../cli/src/connections.c:641 ../cli/src/connections.c:1434
-#: ../cli/src/connections.c:1533 ../cli/src/connections.c:1605
-#: ../cli/src/devices.c:1008 ../cli/src/devices.c:1070
-#: ../cli/src/devices.c:1223 ../cli/src/devices.c:1352
-#: ../cli/src/devices.c:1571
-#, c-format
-msgid "Error: NetworkManager is not running."
-msgstr "Błąd: usługa NetworkManager nie jest uruchomiona."
-
-#: ../cli/src/connections.c:649
-msgid "Active connections"
-msgstr "Aktywne połączenia"
-
-#: ../cli/src/connections.c:1073
-#, c-format
-msgid "no active connection on device '%s'"
-msgstr "brak aktywnych połączeń na urządzeniu \"%s\""
-
-#: ../cli/src/connections.c:1081
-#, c-format
-msgid "no active connection or device"
-msgstr "brak aktywnych połączeń na urządzeń"
-
-#: ../cli/src/connections.c:1152
-#, c-format
-msgid "device '%s' not compatible with connection '%s'"
-msgstr "urządzenie \"%s\" nie jest zgodne z połączeniem \"%s\""
-
-#: ../cli/src/connections.c:1154
-#, c-format
-msgid "no device found for connection '%s'"
-msgstr "nie odnaleziono urządzenia dla połączenia \"%s\""
-
-#: ../cli/src/connections.c:1165
+#: ../cli/src/connections.c:587
msgid "activating"
msgstr "aktywowanie"
-#: ../cli/src/connections.c:1167
+#: ../cli/src/connections.c:589
msgid "activated"
msgstr "aktywowano"
-#: ../cli/src/connections.c:1169 ../cli/src/devices.c:294
+#: ../cli/src/connections.c:591 ../cli/src/devices.c:261
msgid "deactivating"
msgstr "deaktywowanie"
-#: ../cli/src/connections.c:1172 ../cli/src/connections.c:1195
-#: ../cli/src/connections.c:1228 ../cli/src/devices.c:298
-#: ../cli/src/devices.c:678 ../cli/src/network-manager.c:111
+#: ../cli/src/connections.c:594 ../cli/src/connections.c:617
+#: ../cli/src/connections.c:1680 ../cli/src/devices.c:265
+#: ../cli/src/devices.c:784 ../cli/src/network-manager.c:111
#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
-#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:513
-#: ../cli/src/utils.c:397
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:531
+#: ../cli/src/utils.c:499 ../src/main.c:443 ../src/main.c:462
msgid "unknown"
msgstr "nieznane"
-#: ../cli/src/connections.c:1181
+#: ../cli/src/connections.c:603
msgid "VPN connecting (prepare)"
msgstr "Łączenie z VPN (przygotowanie)"
-#: ../cli/src/connections.c:1183
+#: ../cli/src/connections.c:605
msgid "VPN connecting (need authentication)"
msgstr "Łączenie z VPN (wymaga uwierzytelnienia)"
-#: ../cli/src/connections.c:1185
+#: ../cli/src/connections.c:607
msgid "VPN connecting"
msgstr "Łączenie z VPN"
-#: ../cli/src/connections.c:1187
+#: ../cli/src/connections.c:609
msgid "VPN connecting (getting IP configuration)"
msgstr "Łączenie z VPN (pobieranie konfiguracji adresu IP)"
-#: ../cli/src/connections.c:1189
+#: ../cli/src/connections.c:611
msgid "VPN connected"
msgstr "Połączono z VPN"
-#: ../cli/src/connections.c:1191
+#: ../cli/src/connections.c:613
msgid "VPN connection failed"
msgstr "Połączenie z VPN się nie powiodło"
-#: ../cli/src/connections.c:1193
+#: ../cli/src/connections.c:615
msgid "VPN disconnected"
msgstr "Rozłączono z VPN"
-#: ../cli/src/connections.c:1204
+#: ../cli/src/connections.c:868 ../cli/src/connections.c:1092
+#, c-format
+msgid "Error: 'con status': %s"
+msgstr "Błąd: \"con status\": %s"
+
+#: ../cli/src/connections.c:870 ../cli/src/connections.c:1094
+#, c-format
+msgid "Error: 'con status': %s; allowed fields: %s"
+msgstr "Błąd: \"con status\": %s; dozwolone pola: %s"
+
+#: ../cli/src/connections.c:878
+msgid "Active connection details"
+msgstr "Szczegóły aktywnego połączenia"
+
+#: ../cli/src/connections.c:1014 ../cli/src/connections.c:1882
+#: ../cli/src/connections.c:1981 ../cli/src/connections.c:2072
+#: ../cli/src/devices.c:1014 ../cli/src/devices.c:1076
+#: ../cli/src/devices.c:1229 ../cli/src/devices.c:1358
+#: ../cli/src/devices.c:1577
+#, c-format
+msgid "Error: Can't find out if NetworkManager is running: %s."
+msgstr ""
+"Błąd: nie można ustalić, czy usługa NetworkManager jest uruchomiona: %s."
+
+#: ../cli/src/connections.c:1018 ../cli/src/connections.c:1886
+#: ../cli/src/connections.c:1985 ../cli/src/connections.c:2076
+#: ../cli/src/devices.c:1018 ../cli/src/devices.c:1080
+#: ../cli/src/devices.c:1233 ../cli/src/devices.c:1362
+#: ../cli/src/devices.c:1581
+#, c-format
+msgid "Error: NetworkManager is not running."
+msgstr "Błąd: usługa NetworkManager nie jest uruchomiona."
+
+#: ../cli/src/connections.c:1050
+msgid "Active connections"
+msgstr "Aktywne połączenia"
+
+#: ../cli/src/connections.c:1075
+#, c-format
+msgid "Error: '%s' is not an active connection."
+msgstr "Błąd: \"%s\" nie jest aktywnym połączeniem."
+
+#: ../cli/src/connections.c:1080
+#, c-format
+msgid "Error: unknown parameter: %s"
+msgstr "Błąd nieznany parametr: %s"
+
+#: ../cli/src/connections.c:1564
+#, c-format
+msgid "no active connection on device '%s'"
+msgstr "brak aktywnych połączeń na urządzeniu \"%s\""
+
+#: ../cli/src/connections.c:1572
+#, c-format
+msgid "no active connection or device"
+msgstr "brak aktywnych połączeń na urządzeń"
+
+#: ../cli/src/connections.c:1643
+#, c-format
+msgid "device '%s' not compatible with connection '%s'"
+msgstr "urządzenie \"%s\" nie jest zgodne z połączeniem \"%s\""
+
+#: ../cli/src/connections.c:1645
+#, c-format
+msgid "no device found for connection '%s'"
+msgstr "nie odnaleziono urządzenia dla połączenia \"%s\""
+
+#: ../cli/src/connections.c:1656
msgid "unknown reason"
msgstr "nieznany powód"
-#: ../cli/src/connections.c:1206
+#: ../cli/src/connections.c:1658
msgid "none"
msgstr "brak"
-#: ../cli/src/connections.c:1208
+#: ../cli/src/connections.c:1660
msgid "the user was disconnected"
msgstr "użytkownik został rozłączony"
-#: ../cli/src/connections.c:1210
+#: ../cli/src/connections.c:1662
msgid "the base network connection was interrupted"
msgstr "podstawowe połączenie sieciowe zostało przerwane"
-#: ../cli/src/connections.c:1212
+#: ../cli/src/connections.c:1664
msgid "the VPN service stopped unexpectedly"
msgstr "usługa VPN została nieoczekiwanie zatrzymana"
-#: ../cli/src/connections.c:1214
+#: ../cli/src/connections.c:1666
msgid "the VPN service returned invalid configuration"
msgstr "usługa VPN zwróciła nieprawidłową konfigurację"
-#: ../cli/src/connections.c:1216
+#: ../cli/src/connections.c:1668
msgid "the connection attempt timed out"
msgstr "próba połączenia przekroczyła czas oczekiwania"
-#: ../cli/src/connections.c:1218
+#: ../cli/src/connections.c:1670
msgid "the VPN service did not start in time"
msgstr "usługa VPN nie została uruchomiona w czasie"
-#: ../cli/src/connections.c:1220
+#: ../cli/src/connections.c:1672
msgid "the VPN service failed to start"
msgstr "uruchomienie usługi VPN się nie powiodło"
-#: ../cli/src/connections.c:1222
+#: ../cli/src/connections.c:1674
msgid "no valid VPN secrets"
msgstr "brak prawidłowych haseł VPN"
-#: ../cli/src/connections.c:1224
+#: ../cli/src/connections.c:1676
msgid "invalid VPN secrets"
msgstr "nieprawidłowe hasła VPN"
-#: ../cli/src/connections.c:1226
+#: ../cli/src/connections.c:1678
msgid "the connection was removed"
msgstr "połączenie zostało usunięte"
-#: ../cli/src/connections.c:1240
+#: ../cli/src/connections.c:1692
#, c-format
msgid "state: %s\n"
msgstr "stan: %s\n"
-#: ../cli/src/connections.c:1243 ../cli/src/connections.c:1269
+#: ../cli/src/connections.c:1695 ../cli/src/connections.c:1721
#, c-format
msgid "Connection activated\n"
msgstr "Aktywowano połączenie\n"
-#: ../cli/src/connections.c:1246
+#: ../cli/src/connections.c:1698
#, c-format
msgid "Error: Connection activation failed."
msgstr "Błąd: aktywacja połączenia się nie powiodła."
-#: ../cli/src/connections.c:1265
+#: ../cli/src/connections.c:1717
#, c-format
msgid "state: %s (%d)\n"
msgstr "stan: %s (%d)\n"
-#: ../cli/src/connections.c:1275
+#: ../cli/src/connections.c:1727
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "Błąd: aktywacja połączenia się nie powiodła: %s."
-#: ../cli/src/connections.c:1292 ../cli/src/devices.c:1126
+#: ../cli/src/connections.c:1744 ../cli/src/devices.c:1136
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "Błąd: przekroczono czas oczekiwania o %d sekund."
-#: ../cli/src/connections.c:1305
+#: ../cli/src/connections.c:1757
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "Błąd: aktywacja połączenia się nie powiodła: %s"
-#: ../cli/src/connections.c:1311
+#: ../cli/src/connections.c:1763
#, c-format
msgid "Active connection state: %s\n"
msgstr "Stan aktywnego połączenia: %s\n"
-#: ../cli/src/connections.c:1312
+#: ../cli/src/connections.c:1764
#, c-format
msgid "Active connection path: %s\n"
msgstr "Ścieżka aktywnego połączenia: %s\n"
-#: ../cli/src/connections.c:1364 ../cli/src/connections.c:1505
-#: ../cli/src/connections.c:1614
+#: ../cli/src/connections.c:1816 ../cli/src/connections.c:1957
+#: ../cli/src/connections.c:2085
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "Błąd: nieznane połączenie: %s."
-#: ../cli/src/connections.c:1410 ../cli/src/devices.c:1198
+#: ../cli/src/connections.c:1862 ../cli/src/devices.c:1208
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "Błąd: wartość czasu oczekiwania \"%s\" jest nieprawidłowa."
-#: ../cli/src/connections.c:1423 ../cli/src/connections.c:1522
-#: ../cli/src/connections.c:1594
+#: ../cli/src/connections.c:1875 ../cli/src/connections.c:1974
+#: ../cli/src/connections.c:2065
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "Błąd: należy podać identyfikator lub UUID."
-#: ../cli/src/connections.c:1451
+#: ../cli/src/connections.c:1903
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "Błąd: nie odnaleziono odpowiedniego urządzenia: %s"
-#: ../cli/src/connections.c:1453
+#: ../cli/src/connections.c:1905
#, c-format
msgid "Error: No suitable device found."
msgstr "Błąd: nie odnaleziono odpowiedniego urządzenia."
-#: ../cli/src/connections.c:1558
+#: ../cli/src/connections.c:2010
#, c-format
msgid "Warning: Connection not active\n"
msgstr "Ostrzeżenie: połączenie nie jest aktywne\n"
-#: ../cli/src/connections.c:1659
+#: ../cli/src/connections.c:2024
+#, c-format
+msgid "Error: Connection deletion failed: %s"
+msgstr "Błąd: usunięcie połączenia się nie powiodło: %s"
+
+#: ../cli/src/connections.c:2142
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "Błąd: polecenie \"con\" \"%s\" jest nieprawidłowe."
-#: ../cli/src/connections.c:1724
+#: ../cli/src/connections.c:2207
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "Błąd: nie można połączyć się z D-Bus."
-#: ../cli/src/connections.c:1732
+#: ../cli/src/connections.c:2215
#, c-format
msgid "Error: Could not get system settings."
msgstr "Błąd: nie można uzyskać ustawień systemu."
-#: ../cli/src/connections.c:1742
+#: ../cli/src/connections.c:2225
#, c-format
msgid "Error: Can't obtain connections: settings service is not running."
msgstr ""
@@ -477,222 +602,230 @@ msgstr ""
#. 0
#. 9
#. 3
-#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:212
-#: ../cli/src/devices.c:228
+#: ../cli/src/devices.c:65 ../cli/src/devices.c:101 ../cli/src/devices.c:179
+#: ../cli/src/devices.c:195
msgid "DEVICE"
msgstr "URZĄDZENIE"
-#. 1
-#. 4
-#. 1
-#: ../cli/src/devices.c:68 ../cli/src/devices.c:106
-#: ../cli/src/network-manager.c:39
-msgid "STATE"
-msgstr "STAN"
-
-#: ../cli/src/devices.c:78
-msgid "GENERAL"
-msgstr "OGÓLNE"
-
#. 0
-#: ../cli/src/devices.c:79
+#: ../cli/src/devices.c:78
msgid "CAPABILITIES"
msgstr "MOŻLIWOŚCI"
#. 1
-#: ../cli/src/devices.c:80
+#: ../cli/src/devices.c:79
msgid "WIFI-PROPERTIES"
msgstr "WŁAŚCIWOŚCI-WIFI"
#. 2
-#: ../cli/src/devices.c:81
+#: ../cli/src/devices.c:80
msgid "AP"
msgstr "PUNKT-DOSTĘPOWY"
#. 3
-#: ../cli/src/devices.c:82
+#: ../cli/src/devices.c:81
msgid "WIRED-PROPERTIES"
msgstr "WŁAŚCIWOŚCI-POŁĄCZENIA-PRZEWODOWEGO"
#. 4
-#: ../cli/src/devices.c:83
+#: ../cli/src/devices.c:82
msgid "WIMAX-PROPERTIES"
msgstr "WŁAŚCIWOŚCI-WIMAX"
#. 5
#. 0
-#: ../cli/src/devices.c:84 ../cli/src/devices.c:225
+#: ../cli/src/devices.c:83 ../cli/src/devices.c:192
msgid "NSP"
msgstr "NSP"
#. 6
-#: ../cli/src/devices.c:85
-msgid "IP4-SETTINGS"
-msgstr "USTAWIENIA-IP4"
+#: ../cli/src/devices.c:84
+msgid "IP4"
+msgstr "IP4"
#. 7
-#: ../cli/src/devices.c:86
-msgid "IP4-DNS"
-msgstr "IP4-DNS"
+#: ../cli/src/devices.c:85
+msgid "DHCP4"
+msgstr "DHCP4"
#. 8
-#: ../cli/src/devices.c:87
-msgid "IP6-SETTINGS"
-msgstr "USTAWIENIA-IP6"
+#: ../cli/src/devices.c:86
+msgid "IP6"
+msgstr "IP6"
#. 9
-#: ../cli/src/devices.c:88
-msgid "IP6-DNS"
-msgstr "IP6-DNS"
+#: ../cli/src/devices.c:87
+msgid "DHCP6"
+msgstr "DHCP6"
#. 2
+#: ../cli/src/devices.c:103
+msgid "VENDOR"
+msgstr "PRODUCENT"
+
+#. 3
#: ../cli/src/devices.c:104
+msgid "PRODUCT"
+msgstr "PRODUKT"
+
+#. 4
+#: ../cli/src/devices.c:105
msgid "DRIVER"
msgstr "STEROWNIK"
-#. 3
-#: ../cli/src/devices.c:105
+#. 5
+#: ../cli/src/devices.c:106
msgid "HWADDR"
msgstr "ADRES-SPRZĘTOWY"
+#. 7
+#: ../cli/src/devices.c:108
+msgid "REASON"
+msgstr "PRZYCZYNA"
+
+#. 8
+#: ../cli/src/devices.c:109
+msgid "UDI"
+msgstr "UDI"
+
+#. 9
+#: ../cli/src/devices.c:110
+msgid "IP-IFACE"
+msgstr "INTERFEJS-IP"
+
+#. 10
+#: ../cli/src/devices.c:111
+msgid "NM-MANAGED"
+msgstr "ZARZĄDZANE-PRZEZ-NM"
+
+#. 11
+#: ../cli/src/devices.c:112
+msgid "FIRMWARE-MISSING"
+msgstr "BRAK-OPROGRAMOWANIA-SPRZĘTOWEGO"
+
+#. 12
+#: ../cli/src/devices.c:113
+msgid "CONNECTION"
+msgstr "POŁĄCZENIE"
+
#. 0
-#: ../cli/src/devices.c:115
+#: ../cli/src/devices.c:122
msgid "CARRIER-DETECT"
msgstr "WYKRYWANIE-OPERATORA"
#. 1
-#: ../cli/src/devices.c:116
+#: ../cli/src/devices.c:123
msgid "SPEED"
msgstr "PRĘDKOŚĆ"
#. 0
-#: ../cli/src/devices.c:125
+#: ../cli/src/devices.c:132
msgid "CARRIER"
msgstr "OPERATOR"
#. 0
-#: ../cli/src/devices.c:135
+#: ../cli/src/devices.c:142
msgid "WEP"
msgstr "WEP"
#. 1
-#: ../cli/src/devices.c:136
+#: ../cli/src/devices.c:143
msgid "WPA"
msgstr "WPA"
#. 2
-#: ../cli/src/devices.c:137
+#: ../cli/src/devices.c:144
msgid "WPA2"
msgstr "WPA2"
#. 3
-#: ../cli/src/devices.c:138
+#: ../cli/src/devices.c:145
msgid "TKIP"
msgstr "TKIP"
#. 4
-#: ../cli/src/devices.c:139
+#: ../cli/src/devices.c:146
msgid "CCMP"
msgstr "CCMP"
#. 0
-#: ../cli/src/devices.c:149
+#: ../cli/src/devices.c:156
msgid "CTR-FREQ"
msgstr "CZĘSTOTLIWOŚĆ-CTR"
#. 1
-#: ../cli/src/devices.c:150
+#: ../cli/src/devices.c:157
msgid "RSSI"
msgstr "RSSI"
#. 2
-#: ../cli/src/devices.c:151
+#: ../cli/src/devices.c:158
msgid "CINR"
msgstr "CINR"
#. 3
-#: ../cli/src/devices.c:152
+#: ../cli/src/devices.c:159
msgid "TX-POW"
msgstr "TX-POW"
#. 4
-#: ../cli/src/devices.c:153
+#: ../cli/src/devices.c:160
msgid "BSID"
msgstr "BSID"
#. 0
-#: ../cli/src/devices.c:163 ../cli/src/devices.c:174
-msgid "ADDRESS"
-msgstr "ADRES"
-
-#. 1
-#: ../cli/src/devices.c:164 ../cli/src/devices.c:175
-msgid "PREFIX"
-msgstr "PRZEDROSTEK"
-
-#. 2
-#: ../cli/src/devices.c:165 ../cli/src/devices.c:176
-msgid "GATEWAY"
-msgstr "BRAMA"
-
-#. 0
-#: ../cli/src/devices.c:185 ../cli/src/devices.c:194
-msgid "DNS"
-msgstr "DNS"
-
-#. 0
-#: ../cli/src/devices.c:203
+#: ../cli/src/devices.c:170
msgid "SSID"
msgstr "SSID"
#. 1
-#: ../cli/src/devices.c:204
+#: ../cli/src/devices.c:171
msgid "BSSID"
msgstr "BSSID"
#. 2
-#: ../cli/src/devices.c:205
+#: ../cli/src/devices.c:172
msgid "MODE"
msgstr "TRYB"
#. 3
-#: ../cli/src/devices.c:206
+#: ../cli/src/devices.c:173
msgid "FREQ"
msgstr "CZĘSTOTLIWOŚĆ"
#. 4
-#: ../cli/src/devices.c:207
+#: ../cli/src/devices.c:174
msgid "RATE"
msgstr "OCENA"
#. 5
#. 1
-#: ../cli/src/devices.c:208 ../cli/src/devices.c:226
+#: ../cli/src/devices.c:175 ../cli/src/devices.c:193
msgid "SIGNAL"
msgstr "SYGNAŁ"
#. 6
-#: ../cli/src/devices.c:209
+#: ../cli/src/devices.c:176
msgid "SECURITY"
msgstr "ZABEZPIECZENIA"
#. 7
-#: ../cli/src/devices.c:210
+#: ../cli/src/devices.c:177
msgid "WPA-FLAGS"
msgstr "FLAGI-WPA"
#. 8
-#: ../cli/src/devices.c:211
+#: ../cli/src/devices.c:178
msgid "RSN-FLAGS"
msgstr "FLAGI-RSN"
#. 10
#. 4
-#: ../cli/src/devices.c:213 ../cli/src/devices.c:229
+#: ../cli/src/devices.c:180 ../cli/src/devices.c:196
msgid "ACTIVE"
msgstr "AKTYWNOŚĆ"
-#: ../cli/src/devices.c:246
+#: ../cli/src/devices.c:213
#, c-format
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
@@ -720,260 +853,460 @@ msgstr ""
" wifi [list [iface <interfejs>] [bssid <BSSID>]]\n"
" wimax [list [iface <interfejs>] [nsp <nazwa>]]\n"
-#: ../cli/src/devices.c:274
+#: ../cli/src/devices.c:241
msgid "unmanaged"
msgstr "niezarządzane"
-#: ../cli/src/devices.c:276
+#: ../cli/src/devices.c:243
msgid "unavailable"
msgstr "niedostępne"
-#: ../cli/src/devices.c:278 ../cli/src/network-manager.c:108
+#: ../cli/src/devices.c:245 ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "rozłączono"
-#: ../cli/src/devices.c:280
+#: ../cli/src/devices.c:247
msgid "connecting (prepare)"
msgstr "łączenie (przygotowanie)"
-#: ../cli/src/devices.c:282
+#: ../cli/src/devices.c:249
msgid "connecting (configuring)"
msgstr "łączenie (konfigurowanie)"
-#: ../cli/src/devices.c:284
+#: ../cli/src/devices.c:251
msgid "connecting (need authentication)"
msgstr "łączenie (wymaga uwierzytelnienia)"
-#: ../cli/src/devices.c:286
+#: ../cli/src/devices.c:253
msgid "connecting (getting IP configuration)"
msgstr "łączenie (pobieranie konfiguracji adresu IP)"
-#: ../cli/src/devices.c:288
+#: ../cli/src/devices.c:255
msgid "connecting (checking IP connectivity)"
msgstr "łączenie (sprawdzanie łączności IP)"
-#: ../cli/src/devices.c:290
+#: ../cli/src/devices.c:257
msgid "connecting (starting secondary connections)"
msgstr "łączenie (uruchamianie drugorzędnych połączeń)"
-#: ../cli/src/devices.c:292 ../cli/src/network-manager.c:104
+#: ../cli/src/devices.c:259 ../cli/src/network-manager.c:104
msgid "connected"
msgstr "połączono"
-#: ../cli/src/devices.c:296
+#: ../cli/src/devices.c:263
msgid "connection failed"
msgstr "połączenie się nie powiodło"
-#: ../cli/src/devices.c:321 ../cli/src/devices.c:331 ../cli/src/devices.c:491
-#: ../cli/src/devices.c:535
+#: ../cli/src/devices.c:274
+msgid "No reason given"
+msgstr "Nie podano przyczyny"
+
+#: ../cli/src/devices.c:277
+msgid "Unknown error"
+msgstr "Nieznany błąd"
+
+#: ../cli/src/devices.c:280
+msgid "Device is now managed"
+msgstr "Urządzenie jest teraz zarządzane"
+
+#: ../cli/src/devices.c:283
+msgid "Device is now unmanaged"
+msgstr "Urządzenie nie jest teraz zarządzane"
+
+#: ../cli/src/devices.c:286
+msgid "The device could not be readied for configuration"
+msgstr "Urządzenie nie może zostać odczytane do konfiguracji"
+
+#: ../cli/src/devices.c:289
+msgid ""
+"IP configuration could not be reserved (no available address, timeout, etc)"
+msgstr ""
+"Konfiguracja IP nie mogła zostać zastrzeżona (brak dostępnego adresu, czasu "
+"oczekiwania itp.)"
+
+#: ../cli/src/devices.c:292
+msgid "The IP configuration is no longer valid"
+msgstr "Konfiguracja IP nie jest już prawidłowa"
+
+#: ../cli/src/devices.c:295
+msgid "Secrets were required, but not provided"
+msgstr "Hasła są wymagane, ale nie zostały podane"
+
+#: ../cli/src/devices.c:298
+msgid "802.1X supplicant disconnected"
+msgstr "Suplikant 802.1X został rozłączony"
+
+#: ../cli/src/devices.c:301
+msgid "802.1X supplicant configuration failed"
+msgstr "Konfiguracja suplikanta 802.1X się nie powiodła"
+
+#: ../cli/src/devices.c:304
+msgid "802.1X supplicant failed"
+msgstr "Suplikant 802.1X się nie powiódł"
+
+#: ../cli/src/devices.c:307
+msgid "802.1X supplicant took too long to authenticate"
+msgstr "Suplikant 802.1X za długo się uwierzytelniał"
+
+#: ../cli/src/devices.c:310
+msgid "PPP service failed to start"
+msgstr "uruchomienie usługi PPP się nie powiodło"
+
+#: ../cli/src/devices.c:313
+msgid "PPP service disconnected"
+msgstr "Rozłączono z usługą PPP"
+
+#: ../cli/src/devices.c:316
+msgid "PPP failed"
+msgstr "Usługa PPP się nie powiodła"
+
+#: ../cli/src/devices.c:319
+msgid "DHCP client failed to start"
+msgstr "uruchomienie klienta DHCP się nie powiodło"
+
+#: ../cli/src/devices.c:322
+msgid "DHCP client error"
+msgstr "Błąd klienta DHCP"
+
+#: ../cli/src/devices.c:325
+msgid "DHCP client failed"
+msgstr "Klient DHCP się nie powiódł"
+
+#: ../cli/src/devices.c:328
+msgid "Shared connection service failed to start"
+msgstr "Uruchomienie usługi współdzielenia połączenia się nie powiodło"
+
+#: ../cli/src/devices.c:331
+msgid "Shared connection service failed"
+msgstr "Usługa współdzielenia połączenia się nie powiodła"
+
+#: ../cli/src/devices.c:334
+msgid "AutoIP service failed to start"
+msgstr "Uruchomienie usługi AutoIP się nie powiodło"
+
+#: ../cli/src/devices.c:337
+msgid "AutoIP service error"
+msgstr "Błąd usługi AutoIP"
+
+#: ../cli/src/devices.c:340
+msgid "AutoIP service failed"
+msgstr "Usługa AutoIP się nie powiodła"
+
+#: ../cli/src/devices.c:343
+msgid "The line is busy"
+msgstr "Linia jest zajęta"
+
+#: ../cli/src/devices.c:346
+msgid "No dial tone"
+msgstr "Brak sygnału telefonicznego"
+
+#: ../cli/src/devices.c:349
+msgid "No carrier could be established"
+msgstr "Nie można ustanowić operatora"
+
+#: ../cli/src/devices.c:352
+msgid "The dialing request timed out"
+msgstr "Żądanie zadzwonienia przekroczyło czas oczekiwania"
+
+#: ../cli/src/devices.c:355
+msgid "The dialing attempt failed"
+msgstr "Próba zadzwonienia się nie powiodła"
+
+#: ../cli/src/devices.c:358
+msgid "Modem initialization failed"
+msgstr "Zainicjowanie modemu się nie powiodło"
+
+#: ../cli/src/devices.c:361
+msgid "Failed to select the specified APN"
+msgstr "Wybranie podanego APN się nie powiodło"
+
+#: ../cli/src/devices.c:364
+msgid "Not searching for networks"
+msgstr "Sieci nie są wyszukiwane"
+
+#: ../cli/src/devices.c:367
+msgid "Network registration denied"
+msgstr "Odmówiono rejestracji sieci"
+
+#: ../cli/src/devices.c:370
+msgid "Network registration timed out"
+msgstr "Przekroczono czas oczekiwania rejestracji sieci"
+
+#: ../cli/src/devices.c:373
+msgid "Failed to register with the requested network"
+msgstr "Zarejestrowanie w żądanej sieci się nie powiodło"
+
+#: ../cli/src/devices.c:376
+msgid "PIN check failed"
+msgstr "Sprawdzenie kodu PIN się nie powiodło"
+
+#: ../cli/src/devices.c:379
+msgid "Necessary firmware for the device may be missing"
+msgstr "Brak wymaganego oprogramowania sprzętowego dla urządzenia"
+
+#: ../cli/src/devices.c:382
+msgid "The device was removed"
+msgstr "Urządzenie zostało usunięte"
+
+#: ../cli/src/devices.c:385
+msgid "NetworkManager went to sleep"
+msgstr "Usługa NetworkManager została uśpiona"
+
+#: ../cli/src/devices.c:388
+msgid "The device's active connection disappeared"
+msgstr "Aktywne połączenie urządzenia zniknęło"
+
+#: ../cli/src/devices.c:391
+msgid "Device disconnected by user or client"
+msgstr "Urządzenie zostało rozłączone przez użytkownika lub klienta"
+
+#: ../cli/src/devices.c:394
+msgid "Carrier/link changed"
+msgstr "Zmieniono operatora/łącze"
+
+#: ../cli/src/devices.c:397
+msgid "The device's existing connection was assumed"
+msgstr "Przyjęto istniejące połączenie urządzenia"
+
+#: ../cli/src/devices.c:400
+msgid "The supplicant is now available"
+msgstr "Suplikant jest teraz dostępny"
+
+#: ../cli/src/devices.c:403
+msgid "The modem could not be found"
+msgstr "Nie można odnaleźć modemu"
+
+#: ../cli/src/devices.c:406
+msgid "The Bluetooth connection failed or timed out"
+msgstr ""
+"Połączenie Bluetooth się nie powiodło lub przekroczyło czas oczekiwania"
+
+#: ../cli/src/devices.c:409
+msgid "GSM Modem's SIM card not inserted"
+msgstr "Karta SIM modemu GSM nie została włożona"
+
+#: ../cli/src/devices.c:412
+msgid "GSM Modem's SIM PIN required"
+msgstr "Wymagany jest kod PIN karty SIM modemu GSM"
+
+#: ../cli/src/devices.c:415
+msgid "GSM Modem's SIM PUK required"
+msgstr "Wymagany jest kod PUK karty SIM modemu GSM"
+
+#: ../cli/src/devices.c:418
+msgid "GSM Modem's SIM wrong"
+msgstr "Karta SIM modemu GSM jest błędna"
+
+#: ../cli/src/devices.c:421
+msgid "InfiniBand device does not support connected mode"
+msgstr "Urządzenie InfiniBand nie obsługuje trybu połączonego"
+
+#: ../cli/src/devices.c:423 ../cli/src/devices.c:446 ../cli/src/devices.c:458
+#: ../cli/src/devices.c:578 ../cli/src/devices.c:622
msgid "Unknown"
msgstr "Nieznane"
-#: ../cli/src/devices.c:364
+#: ../cli/src/devices.c:491
msgid "(none)"
msgstr "(brak)"
-#: ../cli/src/devices.c:389
-#, c-format
-msgid "%s: error converting IP4 address 0x%X"
-msgstr "%s: błąd podczas konwertowania adresu IPv4 0x%X"
-
-#: ../cli/src/devices.c:460
+#: ../cli/src/devices.c:547
#, c-format
msgid "%u MHz"
msgstr "%u MHz"
-#: ../cli/src/devices.c:461
+#: ../cli/src/devices.c:548
#, c-format
msgid "%u MB/s"
msgstr "%u MB/s"
-#: ../cli/src/devices.c:470
+#: ../cli/src/devices.c:557
msgid "Encrypted: "
msgstr "Zaszyfrowane: "
-#: ../cli/src/devices.c:475
+#: ../cli/src/devices.c:562
msgid "WEP "
msgstr "WEP "
-#: ../cli/src/devices.c:477
+#: ../cli/src/devices.c:564
msgid "WPA "
msgstr "WPA "
-#: ../cli/src/devices.c:479
+#: ../cli/src/devices.c:566
msgid "WPA2 "
msgstr "WPA2 "
-#: ../cli/src/devices.c:482
+#: ../cli/src/devices.c:569
msgid "Enterprise "
msgstr "Enterprise "
-#: ../cli/src/devices.c:491
+#: ../cli/src/devices.c:578
msgid "Ad-Hoc"
msgstr "Ad-hoc"
-#: ../cli/src/devices.c:491
+#: ../cli/src/devices.c:578
msgid "Infrastructure"
msgstr "Infrastruktura"
-#: ../cli/src/devices.c:526
+#: ../cli/src/devices.c:613
msgid "Home"
msgstr "Dom"
-#: ../cli/src/devices.c:529
+#: ../cli/src/devices.c:616
msgid "Partner"
msgstr "Partner"
-#: ../cli/src/devices.c:532
+#: ../cli/src/devices.c:619
msgid "Roaming"
msgstr "Roaming"
-#: ../cli/src/devices.c:602
+#: ../cli/src/devices.c:691
#, c-format
msgid "Error: 'dev list': %s"
msgstr "Błąd: \"dev list\": %s"
-#: ../cli/src/devices.c:604
+#: ../cli/src/devices.c:693
#, c-format
msgid "Error: 'dev list': %s; allowed fields: %s"
msgstr "Błąd: \"dev list\": %s; dozwolone pola: %s"
-#: ../cli/src/devices.c:613
+#: ../cli/src/devices.c:702
msgid "Device details"
msgstr "Informacje o urządzeniu"
-#: ../cli/src/devices.c:647 ../cli/src/devices.c:1142 ../cli/src/utils.c:343
+#: ../cli/src/devices.c:744 ../cli/src/devices.c:745 ../cli/src/devices.c:1152
+#: ../cli/src/utils.c:445
msgid "(unknown)"
msgstr "(nieznane)"
-#: ../cli/src/devices.c:648
-msgid "unknown)"
-msgstr "nieznane)"
+#: ../cli/src/devices.c:753
+msgid "not connected"
+msgstr "niepołączono"
-#: ../cli/src/devices.c:674
+#: ../cli/src/devices.c:780
#, c-format
msgid "%u Mb/s"
msgstr "%u Mb/s"
#. Print header
#. "WIRED-PROPERTIES"
-#: ../cli/src/devices.c:747
+#: ../cli/src/devices.c:853
msgid "on"
msgstr "włączone"
-#: ../cli/src/devices.c:747
+#: ../cli/src/devices.c:853
msgid "off"
msgstr "wyłączone"
-#: ../cli/src/devices.c:994
+#: ../cli/src/devices.c:1004
#, c-format
msgid "Error: 'dev status': %s"
msgstr "Błąd: \"dev status\": %s"
-#: ../cli/src/devices.c:996
+#: ../cli/src/devices.c:1006
#, c-format
msgid "Error: 'dev status': %s; allowed fields: %s"
msgstr "Błąd: \"dev status\": %s; dozwolone pola: %s"
-#: ../cli/src/devices.c:1019
+#: ../cli/src/devices.c:1029
msgid "Status of devices"
msgstr "Stan urządzenia"
-#: ../cli/src/devices.c:1050
+#: ../cli/src/devices.c:1060
#, c-format
msgid "Error: '%s' argument is missing."
msgstr "Błąd: brak parametru \"%s\"."
-#: ../cli/src/devices.c:1091 ../cli/src/devices.c:1243
-#: ../cli/src/devices.c:1380 ../cli/src/devices.c:1599
+#: ../cli/src/devices.c:1101 ../cli/src/devices.c:1253
+#: ../cli/src/devices.c:1390 ../cli/src/devices.c:1609
#, c-format
msgid "Error: Device '%s' not found."
msgstr "Błąd: nie odnaleziono urządzenia \"%s\"."
-#: ../cli/src/devices.c:1114
+#: ../cli/src/devices.c:1124
#, c-format
msgid "Success: Device '%s' successfully disconnected."
msgstr "Powodzenie: urządzenie \"%s\" zostało rozłączone."
-#: ../cli/src/devices.c:1139
+#: ../cli/src/devices.c:1149
#, c-format
msgid "Error: Device '%s' (%s) disconnecting failed: %s"
msgstr "Błąd: rozłączenie urządzenia \"%s\" (%s) się nie powiodło: %s"
-#: ../cli/src/devices.c:1147
+#: ../cli/src/devices.c:1157
#, c-format
msgid "Device state: %d (%s)\n"
msgstr "Stan urządzenia: %d (%s)\n"
-#: ../cli/src/devices.c:1212
+#: ../cli/src/devices.c:1222
#, c-format
msgid "Error: iface has to be specified."
msgstr "Błąd: należy podać interfejs."
-#: ../cli/src/devices.c:1338
+#: ../cli/src/devices.c:1348
#, c-format
msgid "Error: 'dev wifi': %s"
msgstr "Błąd: \"dev wifi\": %s"
-#: ../cli/src/devices.c:1340
+#: ../cli/src/devices.c:1350
#, c-format
msgid "Error: 'dev wifi': %s; allowed fields: %s"
msgstr "Błąd: \"dev wifi\": %s; dozwolone pola: %s"
-#: ../cli/src/devices.c:1363
+#: ../cli/src/devices.c:1373
msgid "WiFi scan list"
msgstr "Lista skanowania sieci WiFi"
-#: ../cli/src/devices.c:1400 ../cli/src/devices.c:1454
+#: ../cli/src/devices.c:1410 ../cli/src/devices.c:1464
#, c-format
msgid "Error: Access point with bssid '%s' not found."
msgstr "Błąd: nie odnaleziono punktu dostępowego z BSSID \"%s\"."
-#: ../cli/src/devices.c:1417
+#: ../cli/src/devices.c:1427
#, c-format
msgid "Error: Device '%s' is not a WiFi device."
msgstr "Błąd: urządzenie \"%s\" nie jest urządzeniem WiFi."
-#: ../cli/src/devices.c:1481
+#: ../cli/src/devices.c:1491
#, c-format
msgid "Error: 'dev wifi' command '%s' is not valid."
msgstr "Błąd: polecenie \"dev wifi\" \"%s\" jest nieprawidłowe."
-#: ../cli/src/devices.c:1557
+#: ../cli/src/devices.c:1567
#, c-format
msgid "Error: 'dev wimax': %s"
msgstr "Błąd: \"dev wimax\": %s"
-#: ../cli/src/devices.c:1559
+#: ../cli/src/devices.c:1569
#, c-format
msgid "Error: 'dev wimax': %s; allowed fields: %s"
msgstr "Błąd: \"dev wimax\": %s; dozwolone pola: %s"
-#: ../cli/src/devices.c:1582
+#: ../cli/src/devices.c:1592
msgid "WiMAX NSP list"
msgstr "Lista NSP sieci WiMAX"
-#: ../cli/src/devices.c:1619
+#: ../cli/src/devices.c:1629
#, c-format
msgid "Error: NSP with name '%s' not found."
msgstr "Błąd: nie odnaleziono NSP o nazwie \"%s\"."
-#: ../cli/src/devices.c:1630
+#: ../cli/src/devices.c:1640
#, c-format
msgid "Error: Device '%s' is not a WiMAX device."
msgstr "Błąd: urządzenie \"%s\" nie jest urządzeniem WiMAX."
-#: ../cli/src/devices.c:1661
+#: ../cli/src/devices.c:1671
#, c-format
msgid "Error: Access point with nsp '%s' not found."
msgstr "Błąd: nie odnaleziono punktu dostępowego z NSP \"%s\"."
-#: ../cli/src/devices.c:1688
+#: ../cli/src/devices.c:1698
#, c-format
msgid "Error: 'dev wimax' command '%s' is not valid."
msgstr "Błąd: polecenie \"dev wimax\" \"%s\" jest nieprawidłowe."
-#: ../cli/src/devices.c:1738
+#: ../cli/src/devices.c:1748
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "Błąd: polecenie \"dev\" \"%s\" jest nieprawidłowe."
@@ -1114,7 +1447,7 @@ msgstr "uruchamiany"
msgid "not running"
msgstr "nieuruchomiony"
-#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:323
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:425
#, c-format
msgid "Error: Couldn't connect to system bus: %s"
msgstr "Błąd: nie można połączyć się z magistralą systemową: %s"
@@ -1134,8 +1467,8 @@ msgstr "Błąd w poleceniu sleep: %s"
#, c-format
msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
msgstr ""
-"Błąd: wartość \"%s\" opcji \"--fields\" jest nieprawidłowa; dozwolone pola: %"
-"s."
+"Błąd: wartość \"%s\" opcji \"--fields\" jest nieprawidłowa; dozwolone pola: "
+"%s."
#: ../cli/src/network-manager.c:284
msgid "Networking enabled"
@@ -1302,124 +1635,135 @@ msgstr "Błąd: nie można utworzyć obiektu NMClient."
msgid "Success"
msgstr "Powodzenie"
-#: ../cli/src/settings.c:447
+#: ../cli/src/settings.c:465
#, c-format
msgid "%d (hex-ascii-key)"
-msgstr "%d (klucz-szesnastkowy-acsii))"
+msgstr "%d (klucz-szesnastkowy-ascii))"
-#: ../cli/src/settings.c:449
+#: ../cli/src/settings.c:467
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (104/128-bitowe hasło)"
-#: ../cli/src/settings.c:452
+#: ../cli/src/settings.c:470
#, c-format
msgid "%d (unknown)"
msgstr "%d (nieznane)"
-#: ../cli/src/settings.c:478
+#: ../cli/src/settings.c:496
msgid "0 (unknown)"
msgstr "0 (nieznane)"
-#: ../cli/src/settings.c:484
+#: ../cli/src/settings.c:502
msgid "any, "
msgstr "dowolne, "
-#: ../cli/src/settings.c:486
+#: ../cli/src/settings.c:504
msgid "900 MHz, "
msgstr "900 MHz, "
-#: ../cli/src/settings.c:488
+#: ../cli/src/settings.c:506
msgid "1800 MHz, "
msgstr "1800 MHz, "
-#: ../cli/src/settings.c:490
+#: ../cli/src/settings.c:508
msgid "1900 MHz, "
msgstr "1900 MHz, "
-#: ../cli/src/settings.c:492
+#: ../cli/src/settings.c:510
msgid "850 MHz, "
msgstr "850 MHz, "
-#: ../cli/src/settings.c:494
+#: ../cli/src/settings.c:512
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 MHz, "
-#: ../cli/src/settings.c:496
+#: ../cli/src/settings.c:514
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 MHz, "
-#: ../cli/src/settings.c:498
+#: ../cli/src/settings.c:516
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
-#: ../cli/src/settings.c:500
+#: ../cli/src/settings.c:518
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 MHz, "
-#: ../cli/src/settings.c:502
+#: ../cli/src/settings.c:520
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 MHz, "
-#: ../cli/src/settings.c:504
+#: ../cli/src/settings.c:522
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 MHz, "
-#: ../cli/src/settings.c:506
+#: ../cli/src/settings.c:524
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 MHz, "
-#: ../cli/src/settings.c:508
+#: ../cli/src/settings.c:526
msgid "WCDMA 3GPP UMTS 1900 MHz, "
msgstr "WCDMA 3GPP UMTS 1900 MHz, "
-#: ../cli/src/settings.c:510
+#: ../cli/src/settings.c:528
msgid "WCDMA 3GPP UMTS 2600 MHz, "
msgstr "WCDMA 3GPP UMTS 2600 MHz, "
-#: ../cli/src/settings.c:636 ../cli/src/settings.c:835
+#: ../cli/src/settings.c:650 ../cli/src/settings.c:846
+#: ../cli/src/settings.c:1550
msgid "auto"
msgstr "automatyczne"
-#: ../cli/src/settings.c:829 ../cli/src/settings.c:832
-#: ../cli/src/settings.c:833 ../cli/src/utils.c:176
+#: ../cli/src/settings.c:840 ../cli/src/settings.c:843
+#: ../cli/src/settings.c:844 ../cli/src/utils.c:247
msgid "not set"
msgstr "nieustawione"
-#: ../cli/src/utils.c:128
+#: ../cli/src/utils.c:103
+#, c-format
+msgid "Error converting IP4 address '0x%X' to text form"
+msgstr "Błąd podczas konwertowania adresu IPv4 \"0x%X\" na formę tekstową"
+
+#: ../cli/src/utils.c:131
+#, c-format
+msgid "Error converting IP6 address '%s' to text form"
+msgstr "Błąd podczas konwertowania adresu IPv6 \"%s\" na formę tekstową"
+
+#: ../cli/src/utils.c:200
#, c-format
msgid "field '%s' has to be alone"
msgstr "pole \"%s\" musi być same"
-#: ../cli/src/utils.c:131
+#: ../cli/src/utils.c:203
#, c-format
msgid "invalid field '%s'"
msgstr "nieprawidłowe pole \"%s\""
-#: ../cli/src/utils.c:150
+#: ../cli/src/utils.c:222
#, c-format
msgid "Option '--terse' requires specifying '--fields'"
msgstr "Opcja \"--terse\" wymaga podania opcji \"--fields\""
-#: ../cli/src/utils.c:154
+#: ../cli/src/utils.c:226
#, c-format
msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
msgstr ""
"Opcja \"--terse\" wymaga konkretnej wartości opcji \"--fields\", nie \"%s\""
-#: ../cli/src/utils.c:334
+#: ../cli/src/utils.c:436
#, c-format
msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
msgstr ""
"Błąd: nie można utworzyć pośrednika obiektu usługi D-Bus dla org.freedesktop."
"DBus"
-#: ../cli/src/utils.c:342
+#: ../cli/src/utils.c:444
#, c-format
msgid "Error: NameHasOwner request failed: %s"
msgstr "Błąd: żądanie NameHasOwner się nie powiodło: %s"
-#: ../cli/src/utils.c:387
+#: ../cli/src/utils.c:489
#, c-format
msgid ""
"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
@@ -1428,7 +1772,7 @@ msgstr ""
"Ostrzeżenie: wersje programu nmcli (%s) i usługi NetworkManager (%s) się nie "
"zgadzają. Użycie opcji --nocheck ukrywa ostrzeżenie.\n"
-#: ../cli/src/utils.c:396
+#: ../cli/src/utils.c:498
#, c-format
msgid ""
"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
@@ -1793,110 +2137,113 @@ msgstr "Nie można zweryfikować pliku PKCS#12: %d"
msgid "Could not generate random data."
msgstr "Nie można utworzyć losowych danych."
-#: ../libnm-util/nm-utils.c:2000
+#: ../libnm-util/nm-utils.c:2034
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "Brak wystarczającej ilości pamięci, aby utworzyć klucz szyfrowania."
-#: ../libnm-util/nm-utils.c:2110
+#: ../libnm-util/nm-utils.c:2144
msgid "Could not allocate memory for PEM file creation."
msgstr "Nie można przydzielić pamięci do utworzenia pliku PEM."
-#: ../libnm-util/nm-utils.c:2122
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "Nie można przydzielić pamięci do zapisywania IV do pliku PEM."
-#: ../libnm-util/nm-utils.c:2134
+#: ../libnm-util/nm-utils.c:2168
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr ""
"Nie można przydzielić pamięci do zapisywania zaszyfrowanego klucza do pliku "
"PEM."
-#: ../libnm-util/nm-utils.c:2153
+#: ../libnm-util/nm-utils.c:2187
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "Nie można przydzielić pamięci dla danych pliku PEM."
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
-msgid "Allow control of network connections"
-msgstr "Umożliwienie kontroli połączeń sieciowych"
+msgid "Enable or disable system networking"
+msgstr "Włączenie lub wyłączenie sieci systemowej"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
-msgid "Connection sharing via a protected WiFi network"
-msgstr "Współdzielenie połączenia przez chronioną sieć WiFi"
+msgid "System policy prevents enabling or disabling system networking"
+msgstr ""
+"Polityka systemu powstrzymuje włączanie lub wyłączanie sieci systemowej"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
-msgid "Connection sharing via an open WiFi network"
-msgstr "Współdzielenie połączenia przez otwartą sieć WiFi"
+msgid ""
+"Put NetworkManager to sleep or wake it up (should only be used by system "
+"power management)"
+msgstr ""
+"Umieszczenie usługi NetworkManager w stanie uśpienia lub przebudzenie go "
+"(powinno być używane tylko przez systemowe zarządzanie zasilaniem)"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
-msgid "Enable or disable WiFi devices"
-msgstr "Włączenie lub wyłączenie urządzeń WiFi"
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr ""
+"Polityka systemu powstrzymuje umieszczenie usługi NetworkManager w stanie "
+"uśpienia lub przebudzenie go"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
-msgid "Enable or disable WiMAX mobile broadband devices"
-msgstr "Włączenie lub wyłączenie urządzeń komórkowych WiMAX"
+msgid "Enable or disable WiFi devices"
+msgstr "Włączenie lub wyłączenie urządzeń WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
-msgid "Enable or disable mobile broadband devices"
-msgstr "Włączenie lub wyłączenie urządzeń komórkowych"
+msgid "System policy prevents enabling or disabling WiFi devices"
+msgstr "Polityka systemu powstrzymuje włączanie lub wyłączanie urządzeń WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
-msgid "Enable or disable system networking"
-msgstr "Włączenie lub wyłączenie sieci systemowej"
+msgid "Enable or disable mobile broadband devices"
+msgstr "Włączenie lub wyłączenie urządzeń komórkowych"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
-msgid "Modify network connections for all users"
-msgstr "Modyfikacja połączeń sieciowych dla wszystkich użytkowników"
+msgid "System policy prevents enabling or disabling mobile broadband devices"
+msgstr ""
+"Polityka systemu powstrzymuje włączenie lub wyłączenie urządzeń komórkowych"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
-msgid "Modify persistent system hostname"
-msgstr "Modyfikacja trwałej systemowej nazwy komputera"
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "Włączenie lub wyłączenie urządzeń komórkowych WiMAX"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
-msgid "Modify personal network connections"
-msgstr "Modyfikacja osobistych połączeń sieciowych"
-
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
msgid ""
-"Put NetworkManager to sleep or wake it up (should only be used by system "
-"power management)"
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
msgstr ""
-"Umieszczenie usługi NetworkManager w stanie uśpienia lub przebudzenie go "
-"(powinno być używane tylko przez systemowe zarządzanie zasilaniem)"
+"Polityka systemu powstrzymuje włączenie lub wyłączenie urządzeń komórkowych "
+"WiMAX"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
+msgid "Allow control of network connections"
+msgstr "Umożliwienie kontroli połączeń sieciowych"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
msgid "System policy prevents control of network connections"
msgstr "Polityka systemu powstrzymuje kontrolę połączeń sieciowych"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
-msgid "System policy prevents enabling or disabling WiFi devices"
-msgstr "Polityka systemu powstrzymuje włączanie lub wyłączanie urządzeń WiFi"
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Współdzielenie połączenia przez chronioną sieć WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
-msgid ""
-"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgid "System policy prevents sharing connections via a protected WiFi network"
msgstr ""
-"Polityka systemu powstrzymuje włączenie lub wyłączenie urządzeń komórkowych "
-"WiMAX"
+"Polityka systemu powstrzymuje współdzielenie połączeń przez chronioną sieć "
+"WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
-msgid "System policy prevents enabling or disabling mobile broadband devices"
-msgstr ""
-"Polityka systemu powstrzymuje włączenie lub wyłączenie urządzeń komórkowych"
+msgid "Connection sharing via an open WiFi network"
+msgstr "Współdzielenie połączenia przez otwartą sieć WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
-msgid "System policy prevents enabling or disabling system networking"
+msgid "System policy prevents sharing connections via an open WiFi network"
msgstr ""
-"Polityka systemu powstrzymuje włączanie lub wyłączanie sieci systemowej"
+"Polityka systemu powstrzymuje współdzielenie połączeń przez otwartą sieć WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
-msgid "System policy prevents modification of network settings for all users"
-msgstr ""
-"Polityka systemu powstrzymuje modyfikację ustawień sieciowych dla wszystkich "
-"użytkowników"
+msgid "Modify personal network connections"
+msgstr "Modyfikacja osobistych połączeń sieciowych"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
msgid "System policy prevents modification of personal network settings"
@@ -1904,38 +2251,167 @@ msgstr ""
"Polityka systemu powstrzymuje modyfikację osobistych ustawień systemowych"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
-msgid "System policy prevents modification of the persistent system hostname"
-msgstr ""
-"Polityka systemu powstrzymuje modyfikację trwałej systemowej nazwy komputera"
+msgid "Modify network connections for all users"
+msgstr "Modyfikacja połączeń sieciowych dla wszystkich użytkowników"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
-msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgid "System policy prevents modification of network settings for all users"
msgstr ""
-"Polityka systemu powstrzymuje umieszczenie usługi NetworkManager w stanie "
-"uśpienia lub przebudzenie go"
+"Polityka systemu powstrzymuje modyfikację ustawień sieciowych dla wszystkich "
+"użytkowników"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
-msgid "System policy prevents sharing connections via a protected WiFi network"
-msgstr ""
-"Polityka systemu powstrzymuje współdzielenie połączeń przez chronioną sieć "
-"WiFi"
+msgid "Modify persistent system hostname"
+msgstr "Modyfikacja trwałej systemowej nazwy komputera"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
-msgid "System policy prevents sharing connections via an open WiFi network"
+msgid "System policy prevents modification of the persistent system hostname"
msgstr ""
-"Polityka systemu powstrzymuje współdzielenie połączeń przez otwartą sieć WiFi"
+"Polityka systemu powstrzymuje modyfikację trwałej systemowej nazwy komputera"
+
+#: ../src/main.c:143
+#, c-format
+msgid "Failed to initialize SIGTERM pipe: %d"
+msgstr "Zainicjowanie potoku SIGTERM się nie powiodło: %d"
+
+#: ../src/main.c:174
+#, c-format
+msgid "Opening %s failed: %s\n"
+msgstr "Otwarcie %s się nie powiodło: %s\n"
+
+#: ../src/main.c:180
+#, c-format
+msgid "Writing to %s failed: %s\n"
+msgstr "Zapisanie do %s się nie powiodło: %s\n"
+
+#: ../src/main.c:185
+#, c-format
+msgid "Closing %s failed: %s\n"
+msgstr "Zamknięcie %s się nie powiodło: %s\n"
-#: ../src/main.c:530
+#: ../src/main.c:228
+#, c-format
+msgid "NetworkManager is already running (pid %ld)\n"
+msgstr "Usługa NetworkManager jest już uruchomiona (PID %ld)\n"
+
+#: ../src/main.c:365
+msgid "Print NetworkManager version and exit"
+msgstr "Wyświetla wersję usługi NetworkManager i kończy działanie"
+
+#: ../src/main.c:366
+msgid "Don't become a daemon"
+msgstr "Bez zmiany w usługę"
+
+#: ../src/main.c:367
+msgid "Make all warnings fatal"
+msgstr "Wszystkie ostrzeżenia jako krytyczne"
+
+#: ../src/main.c:368
+msgid "Specify the location of a PID file"
+msgstr "Podaje położenie pliku PID"
+
+#: ../src/main.c:368
+msgid "filename"
+msgstr "nazwa pliku"
+
+#: ../src/main.c:369
+msgid "State file location"
+msgstr "Położenie pliku stanu"
+
+#: ../src/main.c:369
+msgid "/path/to/state.file"
+msgstr "/ścieżka/do/pliku.stanu"
+
+#: ../src/main.c:370
+msgid "Config file location"
+msgstr "Położenie pliku konfiguracji"
+
+#: ../src/main.c:370
+msgid "/path/to/config.file"
+msgstr "/ścieżka/do/pliku.konfiguracji"
+
+#: ../src/main.c:371
+msgid "List of plugins separated by ','"
+msgstr "Lista wtyczek oddzielonych \",\""
+
+#: ../src/main.c:371
+msgid "plugin1,plugin2"
+msgstr "wtyczka1,wtyczka2"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:373
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgstr "Poziom dziennika: jeden z [ERR, WARN, INFO, DEBUG]"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:376
+msgid ""
+"Log domains separated by ',': any combination of\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+msgstr ""
+"Domeny dziennika oddzielone przez \",\": dowolne połączenie z\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+
+#: ../src/main.c:386
+#, c-format
+msgid "GModules are not supported on your platform!\n"
+msgstr "GModules nie są obsługiwane na tej platformie.\n"
+
+#: ../src/main.c:405
+msgid ""
+"NetworkManager monitors all network connections and automatically\n"
+"chooses the best connection to use. It also allows the user to\n"
+"specify wireless access points which wireless cards in the computer\n"
+"should associate with."
+msgstr ""
+"Usługa NetworkManager monitoruje wszystkie połączenia sieciowe i\n"
+"automatycznie wybiera najlepsze. Umożliwia użytkownikowi także\n"
+"wybranie bezprzewodowych punktów dostępowych, z którymi karty\n"
+"sieciowe w komputerze powinny być powiązane."
+
+#: ../src/main.c:411
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr ""
"Nieprawidłowa opcja. Parametr --help wyświetli listę prawidłowych opcji.\n"
-#: ../src/main.c:611
+#: ../src/main.c:421
+#, c-format
+msgid "You must be root to run NetworkManager!\n"
+msgstr "Tylko root może uruchamiać usługę NetworkManager.\n"
+
+#: ../src/main.c:441
+#, c-format
+msgid "Failed to read configuration: (%d) %s\n"
+msgstr "Odczytanie konfiguracji się nie powiodło: (%d) %s\n"
+
+#: ../src/main.c:452
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. Parametr --help wyświetli listę prawidłowych opcji.\n"
+#: ../src/main.c:459
+#, c-format
+msgid "State file %s parsing failed: (%d) %s\n"
+msgstr "Przetworzenie pliku stanu %s się nie powiodło: (%d) %s\n"
+
+#: ../src/main.c:476
+#, c-format
+msgid "Could not daemonize: %s [error %u]\n"
+msgstr "Nie można zmienić w usługę: %s [błąd %u]\n"
+
#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
msgstr "# Utworzony przez usługę NetworkManager\n"
@@ -1949,19 +2425,19 @@ msgstr ""
"# Scalony od %s\n"
"\n"
-#: ../src/dhcp-manager/nm-dhcp-manager.c:284
+#: ../src/dhcp-manager/nm-dhcp-manager.c:266
msgid "no usable DHCP client could be found."
msgstr "nie odnaleziono używalnego klienta DHCP."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:293
+#: ../src/dhcp-manager/nm-dhcp-manager.c:275
msgid "'dhclient' could be found."
msgstr "nie można odnaleźć polecenia \"dhclient\"."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:303
+#: ../src/dhcp-manager/nm-dhcp-manager.c:285
msgid "'dhcpcd' could be found."
msgstr "nie można odnaleźć usługi \"dhcpcd\"."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:311
+#: ../src/dhcp-manager/nm-dhcp-manager.c:293
#, c-format
msgid "unsupported DHCP client '%s'"
msgstr "nieobsługiwany klient DHCP \"%s\""
@@ -1974,103 +2450,117 @@ msgstr "UWAGA: obsługa nazw libc nie obsługuje więcej niż 3 serwery nazw."
msgid "The nameservers listed below may not be recognized."
msgstr "Poniższe serwery nazw nie mogą nie zostać rozpoznane."
-#: ../src/logging/nm-logging.c:149
+#: ../src/logging/nm-logging.c:130
#, c-format
msgid "Unknown log level '%s'"
msgstr "Nieznany poziom dziennika \"%s\""
-#: ../src/logging/nm-logging.c:174
+#: ../src/logging/nm-logging.c:155
#, c-format
msgid "Unknown log domain '%s'"
msgstr "Nieznana domena dziennika \"%s\""
-#: ../src/modem-manager/nm-modem-cdma.c:296 ../src/nm-device-bt.c:355
+#: ../src/modem-manager/nm-modem-cdma.c:279 ../src/nm-device-bt.c:325
#, c-format
msgid "CDMA connection %d"
msgstr "Połączenie CDMA %d"
-#: ../src/modem-manager/nm-modem-gsm.c:499 ../src/nm-device-bt.c:351
+#: ../src/modem-manager/nm-modem-gsm.c:512 ../src/nm-device-bt.c:321
#, c-format
msgid "GSM connection %d"
msgstr "Połączenie GSM %d"
-#: ../src/nm-device-bt.c:326
+#: ../src/nm-device-bond.c:190
+#, c-format
+msgid "Bond connection %d"
+msgstr "Połączenie wiązane %d"
+
+#: ../src/nm-device-bt.c:296
#, c-format
msgid "PAN connection %d"
msgstr "Połączenie PAN %d"
-#: ../src/nm-device-bt.c:359
+#: ../src/nm-device-bt.c:329
#, c-format
msgid "DUN connection %d"
msgstr "Połączenie DUN %d"
-#: ../src/nm-device-ethernet.c:1724
+#: ../src/nm-device-ethernet.c:1433
#, c-format
msgid "PPPoE connection %d"
msgstr "Połączenie PPPoE %d"
-#: ../src/nm-device-ethernet.c:1724 ../src/settings/nm-settings-utils.c:50
+#: ../src/nm-device-ethernet.c:1433 ../src/settings/nm-settings-utils.c:50
#, c-format
msgid "Wired connection %d"
msgstr "Połączenie przewodowe %d"
-#: ../src/nm-device-olpc-mesh.c:393
+#: ../src/nm-device-infiniband.c:303
+#, c-format
+msgid "InfiniBand connection %d"
+msgstr "Połączenie InfiniBand %d"
+
+#: ../src/nm-device-olpc-mesh.c:293
#, c-format
msgid "Mesh %d"
msgstr "Sieć kratowa %d"
-#: ../src/nm-manager.c:670
+#: ../src/nm-manager.c:627
#, c-format
msgid "VPN connection %d"
msgstr "Połączenie VPN %d"
-#: ../src/nm-netlink-monitor.c:101 ../src/nm-netlink-monitor.c:234
-#: ../src/nm-netlink-monitor.c:661
+#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
#, c-format
msgid "error processing netlink message: %s"
msgstr "błąd podczas przetwarzania komunikatu netlink: %s"
-#: ../src/nm-netlink-monitor.c:216
+#: ../src/nm-netlink-monitor.c:251
msgid "error occurred while waiting for data on socket"
msgstr "wystąpił błąd podczas oczekiwania na dane na gnieździe"
-#: ../src/nm-netlink-monitor.c:260
+#: ../src/nm-netlink-monitor.c:296
#, c-format
msgid "unable to connect to netlink for monitoring link status: %s"
msgstr ""
"nie można połączyć się z netlink dla monitorowania stanu połączenia: %s"
-#: ../src/nm-netlink-monitor.c:271
+#: ../src/nm-netlink-monitor.c:307
#, c-format
msgid "unable to enable netlink handle credential passing: %s"
msgstr ""
-"nie można włączyć przekazywania danych uwierzytelniających uchwytu netlink: %"
-"s"
+"nie można włączyć przekazywania danych uwierzytelniających uchwytu netlink: "
+"%s"
-#: ../src/nm-netlink-monitor.c:294 ../src/nm-netlink-monitor.c:354
+#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390
#, c-format
msgid "unable to allocate netlink handle for monitoring link status: %s"
msgstr ""
"nie można przydzielić uchwytu netlink dla monitorowania stanu połączenia: %s"
-#: ../src/nm-netlink-monitor.c:379
+#: ../src/nm-netlink-monitor.c:415
#, c-format
msgid "unable to allocate netlink link cache for monitoring link status: %s"
msgstr ""
"nie można przydzielić pamięci podręcznej połączenia netlink dla "
"monitorowania stanu połączenia: %s"
-#: ../src/nm-netlink-monitor.c:506
+#: ../src/nm-netlink-monitor.c:542
#, c-format
msgid "unable to join netlink group: %s"
msgstr "nie można dołączyć do grupy netlink: %s"
-#: ../src/nm-netlink-monitor.c:637 ../src/nm-netlink-monitor.c:650
+#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684
#, c-format
msgid "error updating link cache: %s"
msgstr "błąd podczas aktualizowania pamięci podręcznej połączenia: %s"
-#: ../src/settings/plugins/ifcfg-rh/reader.c:3575
+#: ../src/settings/plugins/ifcfg-rh/reader.c:92
#: ../src/settings/plugins/ifnet/connection_parser.c:51
msgid "System"
msgstr "Systemowe"
+
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3652
+msgid "Bond"
+msgstr "Wiązane"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 3b364b50b..06339b0c3 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -3,7 +3,7 @@
# This file is distributed under the same license as the NetworkManager package.
# Raphael Higino <phhigino@gmail.com>, 2004-2007
# Luiz Armesto <luiz.armesto@gmail.com>, 2007.
-# Henrique P. Machado <hpmachado@gnome.org>, 2008, 2010.
+# Henrique P. Machado <hpmachado@gnome.org>, 2008, 2010, 2012.
# Og Maciel <ogmaciel@gnome.org>, 2008.
# Fabrício Godoy <skarllot@gmail.com>, 2008.
#
@@ -11,812 +11,1533 @@ msgid ""
msgstr ""
"Project-Id-Version: NetworkManager\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
-"product=NetworkManager&component=general\n"
-"POT-Creation-Date: 2010-04-27 15:25+0000\n"
-"PO-Revision-Date: 2010-06-06 18:36-0300\n"
+"product=NetworkManager&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-02-17 03:24+0000\n"
+"PO-Revision-Date: 2012-02-23 01:50-0200\n"
"Last-Translator: Henrique P. Machado <hpmachado@gnome.org>\n"
"Language-Team: Brazilian Portuguese <gnome-l10n-br@listas.cipsga.org.br>\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: ../cli/src/connections.c:86
+#: ../cli/src/common.c:32 ../cli/src/common.c:44 ../cli/src/common.c:52
+#: ../cli/src/common.c:63 ../cli/src/connections.c:119
+#: ../cli/src/connections.c:153
+msgid "GROUP"
+msgstr "GRUPO"
+
+#. 0
+#: ../cli/src/common.c:33 ../cli/src/common.c:53
+msgid "ADDRESS"
+msgstr "ENDEREÇO"
+
+#. 1
+#: ../cli/src/common.c:34 ../cli/src/common.c:54
+msgid "ROUTE"
+msgstr "ROTA"
+
+#. 2
+#: ../cli/src/common.c:35 ../cli/src/common.c:55
+msgid "DNS"
+msgstr "DNS"
+
+#. 3
+#: ../cli/src/common.c:36 ../cli/src/common.c:56
+msgid "DOMAIN"
+msgstr "DOMÍNIO"
+
+#. 4
+#: ../cli/src/common.c:37
+msgid "WINS"
+msgstr "WINS"
+
+#. 0
+#: ../cli/src/common.c:45 ../cli/src/common.c:64
+msgid "OPTION"
+msgstr "OPÇÃO"
+
+#. 0
+#. used only for 'GENERAL' group listing
+#: ../cli/src/connections.c:56 ../cli/src/connections.c:120
+#: ../cli/src/devices.c:100 ../cli/src/devices.c:121 ../cli/src/devices.c:131
+#: ../cli/src/devices.c:141 ../cli/src/devices.c:155 ../cli/src/devices.c:169
+#: ../cli/src/devices.c:191
+msgid "NAME"
+msgstr "NOME"
+
+#. 0
+#. 1
+#: ../cli/src/connections.c:57 ../cli/src/connections.c:121
+msgid "UUID"
+msgstr "UUID"
+
+#. 1
+#. 0
+#. 1
+#. 2
+#: ../cli/src/connections.c:58 ../cli/src/connections.c:154
+#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:194
+msgid "TYPE"
+msgstr "TIPO"
+
+#. 2
+#: ../cli/src/connections.c:59
+msgid "TIMESTAMP"
+msgstr "HORÁRIO"
+
+#. 3
+#: ../cli/src/connections.c:60
+msgid "TIMESTAMP-REAL"
+msgstr "HORÁRIO-REAL"
+
+#. 4
+#: ../cli/src/connections.c:61
+msgid "AUTOCONNECT"
+msgstr "AUTOCONECTAR"
+
+#. 5
+#: ../cli/src/connections.c:62
+msgid "READONLY"
+msgstr "SOMENTE-LEITURA"
+
+#. 6
+#. 8
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63 ../cli/src/connections.c:128
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:181 ../cli/src/devices.c:197
+msgid "DBUS-PATH"
+msgstr "CAMINHO DBUS"
+
+#. 2
+#: ../cli/src/connections.c:122
+msgid "DEVICES"
+msgstr "DISPOSITIVOS"
+
+#. 3
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:123 ../cli/src/devices.c:67
+#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "ESTADO"
+
+#. 4
+#: ../cli/src/connections.c:124
+msgid "DEFAULT"
+msgstr "PADRÃO"
+
+#. 5
+#: ../cli/src/connections.c:125
+msgid "DEFAULT6"
+msgstr "PADRÃO6"
+
+#. 6
+#: ../cli/src/connections.c:126
+msgid "SPEC-OBJECT"
+msgstr "OBJETO-ESPEC."
+
+#. 7
+#. 1
+#: ../cli/src/connections.c:127 ../cli/src/connections.c:141
+msgid "VPN"
+msgstr "VPN"
+
+#. 9
+#: ../cli/src/connections.c:129
+msgid "CON-PATH"
+msgstr "CAMINHO CON"
+
+#. 10
+#: ../cli/src/connections.c:130
+msgid "ZONE"
+msgstr "ZONA"
+
+#. 11
+#: ../cli/src/connections.c:131
+msgid "MASTER-PATH"
+msgstr "CAMINHO PRINCIPAL"
+
+#: ../cli/src/connections.c:139 ../cli/src/devices.c:77
+msgid "GENERAL"
+msgstr "GERAL"
+
+#. 0
+#: ../cli/src/connections.c:140
+msgid "IP"
+msgstr "IP"
+
+#. 1
+#: ../cli/src/connections.c:155
+msgid "USERNAME"
+msgstr "NOME DE USUÁRIO"
+
+#. 2
+#: ../cli/src/connections.c:156
+msgid "GATEWAY"
+msgstr "MÁQUINA"
+
+#. 3
+#: ../cli/src/connections.c:157
+msgid "BANNER"
+msgstr "BANNER"
+
+#. 4
+#: ../cli/src/connections.c:158
+msgid "VPN-STATE"
+msgstr "ESTADO VPN"
+
+#. 5
+#: ../cli/src/connections.c:159
+msgid "CFG"
+msgstr "CFG"
+
+#: ../cli/src/connections.c:180
#, c-format
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" list [id <id> | uuid <id>]\n"
+" status [id <id> | uuid <id> | path <path>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
+"nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
msgstr ""
"Uso: nmcli con { COMANDO | help }\n"
-" COMANDO := { list | status | up | down }\n"
+" COMANDO := { list | status | up | down | delete }\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" list [id <id> | uuid <id>]\n"
+" status [id <id> | uuid <id> | path <caminho>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <nome>] [--"
+"nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
+
+#: ../cli/src/connections.c:234 ../cli/src/connections.c:567
+#, c-format
+msgid "Error: 'con list': %s"
+msgstr "Erro: \"con list\": %s"
+
+#: ../cli/src/connections.c:236 ../cli/src/connections.c:569
+#, c-format
+msgid "Error: 'con list': %s; allowed fields: %s"
+msgstr "Erro: \"con list\": %s; campos permitidos: %s"
+
+#: ../cli/src/connections.c:244
+msgid "Connection details"
+msgstr "Detalhes da conexão"
+
+#: ../cli/src/connections.c:442
+msgid "never"
+msgstr "nunca"
+
+#. "CAPABILITIES"
+#. Print header
+#. "WIFI-PROPERTIES"
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766 ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049 ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053 ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182 ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184 ../cli/src/settings.c:1185
+#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268 ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270 ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1272 ../cli/src/settings.c:1343
+msgid "yes"
+msgstr "sim"
-#: ../cli/src/connections.c:158
-msgid "Connections"
-msgstr "Conexões"
-
-#: ../cli/src/connections.c:158 ../cli/src/connections.c:160
-#: ../cli/src/connections.c:196 ../cli/src/connections.c:198
-#: ../cli/src/connections.c:205 ../cli/src/connections.c:207
-#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460
-msgid "Type"
-msgstr "Tipo"
-
-#: ../cli/src/connections.c:158 ../cli/src/connections.c:160
-#: ../cli/src/connections.c:196 ../cli/src/connections.c:198
-#: ../cli/src/connections.c:205 ../cli/src/connections.c:207
-#: ../cli/src/connections.c:297 ../cli/src/connections.c:299
-msgid "UUID"
-msgstr "UUID"
-
-#: ../cli/src/connections.c:158 ../cli/src/connections.c:160
-#: ../cli/src/connections.c:196 ../cli/src/connections.c:198
-#: ../cli/src/connections.c:205 ../cli/src/connections.c:207
-#: ../cli/src/connections.c:297 ../cli/src/connections.c:299
-msgid "Name"
-msgstr "Nome"
-
-#: ../cli/src/connections.c:163
-#, c-format
-msgid "System connections:\n"
-msgstr "Conexões de sistema:\n"
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:578
+#: ../cli/src/settings.c:646 ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048 ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051 ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054 ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183 ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185 ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269 ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
+msgid "no"
+msgstr "não"
-#: ../cli/src/connections.c:167
-#, c-format
-msgid "User connections:\n"
-msgstr "Conexões de usuário:\n"
+#: ../cli/src/connections.c:518
+msgid "Connection list"
+msgstr "Lista de conexões"
-#: ../cli/src/connections.c:178 ../cli/src/connections.c:967
-#: ../cli/src/connections.c:983 ../cli/src/connections.c:992
-#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085
-#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699
-#: ../cli/src/devices.c:785 ../cli/src/devices.c:792
+#: ../cli/src/connections.c:531 ../cli/src/connections.c:1064
+#: ../cli/src/connections.c:1808 ../cli/src/connections.c:1823
+#: ../cli/src/connections.c:1832 ../cli/src/connections.c:1842
+#: ../cli/src/connections.c:1854 ../cli/src/connections.c:1949
+#: ../cli/src/connections.c:2051 ../cli/src/devices.c:1190
+#: ../cli/src/devices.c:1200 ../cli/src/devices.c:1314
+#: ../cli/src/devices.c:1322 ../cli/src/devices.c:1535
+#: ../cli/src/devices.c:1542
#, c-format
msgid "Error: %s argument is missing."
msgstr "Erro: faltando argumento %s."
-#: ../cli/src/connections.c:189
+#: ../cli/src/connections.c:544
#, c-format
msgid "Error: %s - no such connection."
msgstr "Erro: %s - não existe esta conexão."
-#: ../cli/src/connections.c:196
-msgid "System-wide connections"
-msgstr "Conexões de sistema"
-
-#: ../cli/src/connections.c:205
-msgid "User connections"
-msgstr "Conexões de usuário"
-
-#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016
-#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446
-#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706
-#: ../cli/src/devices.c:798
+#: ../cli/src/connections.c:550 ../cli/src/connections.c:1867
+#: ../cli/src/connections.c:1966 ../cli/src/connections.c:2058
+#: ../cli/src/devices.c:987 ../cli/src/devices.c:1067
+#: ../cli/src/devices.c:1214 ../cli/src/devices.c:1328
+#: ../cli/src/devices.c:1548
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "Parâmetro desconhecido: %s\n"
-#: ../cli/src/connections.c:221
+#: ../cli/src/connections.c:559
#, c-format
msgid "Error: no valid parameter specified."
msgstr "Erro: nenhum parâmetro válido especificado."
-#. FIXME: Fix the output
-#: ../cli/src/connections.c:268 ../cli/src/devices.c:302
-#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355
-#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361
-msgid "yes"
-msgstr "sim"
-
-#: ../cli/src/connections.c:268 ../cli/src/devices.c:304
-msgid "no"
-msgstr "não"
-
-#: ../cli/src/connections.c:297
-msgid "Active connections"
-msgstr "Conexões ativas"
-
-#: ../cli/src/connections.c:297 ../cli/src/connections.c:299
-#: ../cli/src/devices.c:302 ../cli/src/devices.c:304
-msgid "Default"
-msgstr "Padrão"
-
-#: ../cli/src/connections.c:297 ../cli/src/connections.c:299
-msgid "Service"
-msgstr "Serviço"
-
-#: ../cli/src/connections.c:297 ../cli/src/connections.c:299
-msgid "Devices"
-msgstr "Dispositivos"
-
-#: ../cli/src/connections.c:659
+#: ../cli/src/connections.c:574 ../cli/src/connections.c:2151
+#: ../cli/src/devices.c:1756 ../cli/src/network-manager.c:456
#, c-format
-msgid "no active connection on device '%s'"
-msgstr "nenhuma conexão ativa no dispositivo \"%s\""
-
-#: ../cli/src/connections.c:667
-#, c-format
-msgid "no active connection or device"
-msgstr "nenhuma conexão ou dispositivo ativo"
+msgid "Error: %s."
+msgstr "Erro: %s."
-#: ../cli/src/connections.c:730
+#: ../cli/src/connections.c:587
msgid "activating"
msgstr "ativando"
-#: ../cli/src/connections.c:732
+#: ../cli/src/connections.c:589
msgid "activated"
msgstr "ativado"
-#: ../cli/src/connections.c:735 ../cli/src/connections.c:758
-#: ../cli/src/connections.c:791 ../cli/src/devices.c:111
-#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98
+#: ../cli/src/connections.c:591 ../cli/src/devices.c:261
+msgid "deactivating"
+msgstr "desativando"
+
+#: ../cli/src/connections.c:594 ../cli/src/connections.c:617
+#: ../cli/src/connections.c:1680 ../cli/src/devices.c:265
+#: ../cli/src/devices.c:784 ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:531
+#: ../cli/src/utils.c:499 ../src/main.c:443 ../src/main.c:462
msgid "unknown"
msgstr "desconhecido"
-#: ../cli/src/connections.c:744
+#: ../cli/src/connections.c:603
msgid "VPN connecting (prepare)"
msgstr "Conexão VPN (preparando)"
-#: ../cli/src/connections.c:746
+#: ../cli/src/connections.c:605
msgid "VPN connecting (need authentication)"
msgstr "Conexão VPN (precisa de autenticação)"
-#: ../cli/src/connections.c:748
+#: ../cli/src/connections.c:607
msgid "VPN connecting"
msgstr "Conexão VPN"
-#: ../cli/src/connections.c:750
+#: ../cli/src/connections.c:609
msgid "VPN connecting (getting IP configuration)"
msgstr "Conexão VPN (obtendo configuração de IP)"
-#: ../cli/src/connections.c:752
+#: ../cli/src/connections.c:611
msgid "VPN connected"
msgstr "VPN conectada"
-#: ../cli/src/connections.c:754
+#: ../cli/src/connections.c:613
msgid "VPN connection failed"
msgstr "Conexão VPN falhou"
-#: ../cli/src/connections.c:756
+#: ../cli/src/connections.c:615
msgid "VPN disconnected"
msgstr "VPN desconectada"
-#: ../cli/src/connections.c:767
+#: ../cli/src/connections.c:868 ../cli/src/connections.c:1092
+#, c-format
+msgid "Error: 'con status': %s"
+msgstr "Erro: \"con status\": %s"
+
+#: ../cli/src/connections.c:870 ../cli/src/connections.c:1094
+#, c-format
+msgid "Error: 'con status': %s; allowed fields: %s"
+msgstr "Erro: \"con status\": %s; campos permitidos: %s"
+
+#: ../cli/src/connections.c:878
+msgid "Active connection details"
+msgstr "Detalhe das conexões ativas"
+
+#: ../cli/src/connections.c:1014 ../cli/src/connections.c:1882
+#: ../cli/src/connections.c:1981 ../cli/src/connections.c:2072
+#: ../cli/src/devices.c:1014 ../cli/src/devices.c:1076
+#: ../cli/src/devices.c:1229 ../cli/src/devices.c:1358
+#: ../cli/src/devices.c:1577
+#, c-format
+msgid "Error: Can't find out if NetworkManager is running: %s."
+msgstr ""
+"Erro: não foi possível descobrir se o NetworkManager está em execução: %s."
+
+#: ../cli/src/connections.c:1018 ../cli/src/connections.c:1886
+#: ../cli/src/connections.c:1985 ../cli/src/connections.c:2076
+#: ../cli/src/devices.c:1018 ../cli/src/devices.c:1080
+#: ../cli/src/devices.c:1233 ../cli/src/devices.c:1362
+#: ../cli/src/devices.c:1581
+#, c-format
+msgid "Error: NetworkManager is not running."
+msgstr "Erro: O NetworkManager não está em execução."
+
+#: ../cli/src/connections.c:1050
+msgid "Active connections"
+msgstr "Conexões ativas"
+
+#: ../cli/src/connections.c:1075
+#, c-format
+msgid "Error: '%s' is not an active connection."
+msgstr "Erro: \"%s\" - não é uma conexão ativa."
+
+#: ../cli/src/connections.c:1080
+#, c-format
+msgid "Error: unknown parameter: %s"
+msgstr "Erro: Parâmetro desconhecido: %s"
+
+#: ../cli/src/connections.c:1564
+#, c-format
+msgid "no active connection on device '%s'"
+msgstr "nenhuma conexão ativa no dispositivo \"%s\""
+
+#: ../cli/src/connections.c:1572
+#, c-format
+msgid "no active connection or device"
+msgstr "nenhuma conexão ou dispositivo ativo"
+
+#: ../cli/src/connections.c:1643
+#, c-format
+msgid "device '%s' not compatible with connection '%s'"
+msgstr "dispositivo \"%s\" não é compatível com a conexão \"%s\""
+
+#: ../cli/src/connections.c:1645
+#, c-format
+msgid "no device found for connection '%s'"
+msgstr "nenhum dispositivo encontrado para a conexão \"%s\""
+
+#: ../cli/src/connections.c:1656
msgid "unknown reason"
msgstr "razão desconhecida"
-#: ../cli/src/connections.c:769
+#: ../cli/src/connections.c:1658
msgid "none"
msgstr "nenhum(a)"
-#: ../cli/src/connections.c:771
+#: ../cli/src/connections.c:1660
msgid "the user was disconnected"
msgstr "o usuário foi desconectado"
-#: ../cli/src/connections.c:773
+#: ../cli/src/connections.c:1662
msgid "the base network connection was interrupted"
msgstr "a conexão de rede base foi interrompida"
-#: ../cli/src/connections.c:775
+#: ../cli/src/connections.c:1664
msgid "the VPN service stopped unexpectedly"
msgstr "o serviço VPN parou inesperadamente"
-#: ../cli/src/connections.c:777
+#: ../cli/src/connections.c:1666
msgid "the VPN service returned invalid configuration"
msgstr "o serviço VPN retornou uma configuração inválida"
-#: ../cli/src/connections.c:779
+#: ../cli/src/connections.c:1668
msgid "the connection attempt timed out"
msgstr "tentativa de conexão esgotada"
-#: ../cli/src/connections.c:781
+#: ../cli/src/connections.c:1670
msgid "the VPN service did not start in time"
msgstr "o serviço VPN não iniciou a tempo"
-#: ../cli/src/connections.c:783
+#: ../cli/src/connections.c:1672
msgid "the VPN service failed to start"
msgstr "o serviço VPN falhou ao iniciar"
-#: ../cli/src/connections.c:785
+#: ../cli/src/connections.c:1674
msgid "no valid VPN secrets"
msgstr "sem segredos VPN válidos"
-#: ../cli/src/connections.c:787
+#: ../cli/src/connections.c:1676
msgid "invalid VPN secrets"
msgstr "segredos VPN inválidos"
-#: ../cli/src/connections.c:789
+#: ../cli/src/connections.c:1678
msgid "the connection was removed"
msgstr "a conexão foi removida"
-#: ../cli/src/connections.c:803
+#: ../cli/src/connections.c:1692
#, c-format
msgid "state: %s\n"
msgstr "estado: %s\n"
-#: ../cli/src/connections.c:806 ../cli/src/connections.c:832
+#: ../cli/src/connections.c:1695 ../cli/src/connections.c:1721
#, c-format
msgid "Connection activated\n"
msgstr "Conexão ativada\n"
-#: ../cli/src/connections.c:809
+#: ../cli/src/connections.c:1698
#, c-format
msgid "Error: Connection activation failed."
msgstr "Erro: a ativação da conexão falhou."
-#: ../cli/src/connections.c:828
+#: ../cli/src/connections.c:1717
#, c-format
msgid "state: %s (%d)\n"
msgstr "estado: %s (%d)\n"
-#: ../cli/src/connections.c:838
+#: ../cli/src/connections.c:1727
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "Erro: a ativação da conexão falhou: %s."
-#: ../cli/src/connections.c:855 ../cli/src/devices.c:551
+#: ../cli/src/connections.c:1744 ../cli/src/devices.c:1136
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "Erro: tempo expirado - %d seg."
-#: ../cli/src/connections.c:898
+#: ../cli/src/connections.c:1757
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "Erro: a ativação da conexão falhou: %s"
-#: ../cli/src/connections.c:912
-#, c-format
-msgid "Error: Obtaining active connection for '%s' failed."
-msgstr "Erro: falha na obtenção da conexão ativa para \"%s\"."
-
-#: ../cli/src/connections.c:921
+#: ../cli/src/connections.c:1763
#, c-format
msgid "Active connection state: %s\n"
msgstr "Estado da conexão ativa: %s\n"
-#: ../cli/src/connections.c:922
+#: ../cli/src/connections.c:1764
#, c-format
msgid "Active connection path: %s\n"
msgstr "Caminho da conexão ativa: %s\n"
-#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094
+#: ../cli/src/connections.c:1816 ../cli/src/connections.c:1957
+#: ../cli/src/connections.c:2085
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "Erro: conexão desconhecida: %s."
-#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622
+#: ../cli/src/connections.c:1862 ../cli/src/devices.c:1208
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "Erro: valor do tempo de expiração \"%s\" não é válido."
-#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111
+#: ../cli/src/connections.c:1875 ../cli/src/connections.c:1974
+#: ../cli/src/connections.c:2065
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "Erro: id ou uuid tem que ser especificada."
-#: ../cli/src/connections.c:1044
+#: ../cli/src/connections.c:1903
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "Erro: nenhum dispositivo adequado encontrado: %s."
-#: ../cli/src/connections.c:1046
+#: ../cli/src/connections.c:1905
#, c-format
msgid "Error: No suitable device found."
msgstr "Erro: nenhum dispositivo adequado encontrado."
-#: ../cli/src/connections.c:1138
+#: ../cli/src/connections.c:2010
#, c-format
msgid "Warning: Connection not active\n"
msgstr "Aviso: conexão inativa\n"
-#: ../cli/src/connections.c:1189
+#: ../cli/src/connections.c:2024
+#, c-format
+msgid "Error: Connection deletion failed: %s"
+msgstr "Erro: a exclusão da conexão falhou: %s"
+
+#: ../cli/src/connections.c:2142
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "Erro: comando \"con\" \"%s\" não é válido."
-#: ../cli/src/connections.c:1216
+#: ../cli/src/connections.c:2207
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "Erro: não foi possível conectar ao D-Bus."
-#: ../cli/src/connections.c:1223
+#: ../cli/src/connections.c:2215
#, c-format
msgid "Error: Could not get system settings."
msgstr "Erro: não foi possível obter as configurações do sistema."
-#: ../cli/src/connections.c:1231
-#, c-format
-msgid "Error: Could not get user settings."
-msgstr "Erro: não foi possível obter as configurações do usuário."
-
-#: ../cli/src/connections.c:1241
+#: ../cli/src/connections.c:2225
#, c-format
-msgid "Error: Can't obtain connections: settings services are not running."
+msgid "Error: Can't obtain connections: settings service is not running."
msgstr ""
-"Erro: Não é possível obter conexões - serviços de configuração não estão em "
+"Erro: Não é possível obter conexões: o serviço de configurações não está em "
"execução."
-#: ../cli/src/devices.c:73
+#. 0
+#. 9
+#. 3
+#: ../cli/src/devices.c:65 ../cli/src/devices.c:101 ../cli/src/devices.c:179
+#: ../cli/src/devices.c:195
+msgid "DEVICE"
+msgstr "DISPOSITIVO"
+
+#. 0
+#: ../cli/src/devices.c:78
+msgid "CAPABILITIES"
+msgstr "CAPACIDADES"
+
+#. 1
+#: ../cli/src/devices.c:79
+msgid "WIFI-PROPERTIES"
+msgstr "PROPRIEDADES (WI-FI)"
+
+#. 2
+#: ../cli/src/devices.c:80
+msgid "AP"
+msgstr "AP"
+
+#. 3
+#: ../cli/src/devices.c:81
+msgid "WIRED-PROPERTIES"
+msgstr "PROPRIEDADES (CABO)"
+
+#. 4
+#: ../cli/src/devices.c:82
+msgid "WIMAX-PROPERTIES"
+msgstr "PROPRIEDADES (WIMAX)"
+
+#. 5
+#. 0
+#: ../cli/src/devices.c:83 ../cli/src/devices.c:192
+msgid "NSP"
+msgstr "NSP"
+
+#. 6
+#: ../cli/src/devices.c:84
+msgid "IP4"
+msgstr "IP4"
+
+#. 7
+#: ../cli/src/devices.c:85
+msgid "DHCP4"
+msgstr "DHCP4"
+
+#. 8
+#: ../cli/src/devices.c:86
+msgid "IP6"
+msgstr "IP6"
+
+#. 9
+#: ../cli/src/devices.c:87
+msgid "DHCP6"
+msgstr "DHCP6"
+
+#. 2
+#: ../cli/src/devices.c:103
+msgid "VENDOR"
+msgstr "FABRICANTE"
+
+#. 3
+#: ../cli/src/devices.c:104
+msgid "PRODUCT"
+msgstr "PRODUTO"
+
+#. 4
+#: ../cli/src/devices.c:105
+msgid "DRIVER"
+msgstr "CONTROLADOR"
+
+#. 5
+#: ../cli/src/devices.c:106
+msgid "HWADDR"
+msgstr "HWADDR"
+
+#. 7
+#: ../cli/src/devices.c:108
+msgid "REASON"
+msgstr "RAZÃO"
+
+#. 8
+#: ../cli/src/devices.c:109
+msgid "UDI"
+msgstr "UDI"
+
+#. 9
+#: ../cli/src/devices.c:110
+msgid "IP-IFACE"
+msgstr "IP (IFACE)"
+
+#. 10
+#: ../cli/src/devices.c:111
+msgid "NM-MANAGED"
+msgstr "GERENCIADO (NM)"
+
+#. 11
+#: ../cli/src/devices.c:112
+msgid "FIRMWARE-MISSING"
+msgstr "FALTANDO FIRMWARE"
+
+#. 12
+#: ../cli/src/devices.c:113
+msgid "CONNECTION"
+msgstr "CONEXÃO"
+
+#. 0
+#: ../cli/src/devices.c:122
+msgid "CARRIER-DETECT"
+msgstr "CARRIER-DETECT"
+
+#. 1
+#: ../cli/src/devices.c:123
+msgid "SPEED"
+msgstr "VELOCIDADE"
+
+#. 0
+#: ../cli/src/devices.c:132
+msgid "CARRIER"
+msgstr "PROVEDOR"
+
+#. 0
+#: ../cli/src/devices.c:142
+msgid "WEP"
+msgstr "WEP"
+
+#. 1
+#: ../cli/src/devices.c:143
+msgid "WPA"
+msgstr "WPA"
+
+#. 2
+#: ../cli/src/devices.c:144
+msgid "WPA2"
+msgstr "WPA2"
+
+#. 3
+#: ../cli/src/devices.c:145
+msgid "TKIP"
+msgstr "TKIP"
+
+#. 4
+#: ../cli/src/devices.c:146
+msgid "CCMP"
+msgstr "CCMP"
+
+#. 0
+#: ../cli/src/devices.c:156
+msgid "CTR-FREQ"
+msgstr "CTR FREQ"
+
+#. 1
+#: ../cli/src/devices.c:157
+msgid "RSSI"
+msgstr "RSSI"
+
+#. 2
+#: ../cli/src/devices.c:158
+msgid "CINR"
+msgstr "CINR"
+
+#. 3
+#: ../cli/src/devices.c:159
+msgid "TX-POW"
+msgstr "TX-POW"
+
+#. 4
+#: ../cli/src/devices.c:160
+msgid "BSID"
+msgstr "BSID"
+
+#. 0
+#: ../cli/src/devices.c:170
+msgid "SSID"
+msgstr "SSID"
+
+#. 1
+#: ../cli/src/devices.c:171
+msgid "BSSID"
+msgstr "BSSID"
+
+#. 2
+#: ../cli/src/devices.c:172
+msgid "MODE"
+msgstr "MODO"
+
+#. 3
+#: ../cli/src/devices.c:173
+msgid "FREQ"
+msgstr "FREQ"
+
+#. 4
+#: ../cli/src/devices.c:174
+msgid "RATE"
+msgstr "TAXA"
+
+#. 5
+#. 1
+#: ../cli/src/devices.c:175 ../cli/src/devices.c:193
+msgid "SIGNAL"
+msgstr "SINAL"
+
+#. 6
+#: ../cli/src/devices.c:176
+msgid "SECURITY"
+msgstr "SEGURANÇA"
+
+#. 7
+#: ../cli/src/devices.c:177
+msgid "WPA-FLAGS"
+msgstr "FLAGS WPA"
+
+#. 8
+#: ../cli/src/devices.c:178
+msgid "RSN-FLAGS"
+msgstr "FLAGS RSN"
+
+#. 10
+#. 4
+#: ../cli/src/devices.c:180 ../cli/src/devices.c:196
+msgid "ACTIVE"
+msgstr "ATIVO"
+
+#: ../cli/src/devices.c:213
#, c-format
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
"\n"
+" COMMAND := { status | list | disconnect | wifi | wimax }\n"
+"\n"
" COMMAND := { status | list | disconnect | wifi }\n"
"\n"
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] | apinfo iface <iface> hwaddr <hwaddr>]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
msgstr ""
"Uso: nmcli dev { COMANDO | help }\n"
"\n"
+" COMANDO := { status | list | disconnect | wifi | wimax }\n"
+"\n"
" COMANDO := { status | list | disconnect | wifi }\n"
"\n"
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] | apinfo iface <iface> hwaddr <hwaddr>]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <nome>]]\n"
"\n"
-#: ../cli/src/devices.c:93
+#: ../cli/src/devices.c:241
msgid "unmanaged"
msgstr "não gerenciável"
-#: ../cli/src/devices.c:95
+#: ../cli/src/devices.c:243
msgid "unavailable"
-msgstr "indisponível"
+msgstr "não disponível"
-#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73
+#: ../cli/src/devices.c:245 ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "desconectado"
-#: ../cli/src/devices.c:99
+#: ../cli/src/devices.c:247
msgid "connecting (prepare)"
msgstr "conectando (preparando)"
-#: ../cli/src/devices.c:101
+#: ../cli/src/devices.c:249
msgid "connecting (configuring)"
msgstr "conectando (configurando)"
-#: ../cli/src/devices.c:103
+#: ../cli/src/devices.c:251
msgid "connecting (need authentication)"
msgstr "conectando (precisa de autenticação)"
-#: ../cli/src/devices.c:105
+#: ../cli/src/devices.c:253
msgid "connecting (getting IP configuration)"
msgstr "conectando (obtendo configuração de IP)"
-#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71
+#: ../cli/src/devices.c:255
+msgid "connecting (checking IP connectivity)"
+msgstr "conectando (verificando conectividade de IP)"
+
+#: ../cli/src/devices.c:257
+msgid "connecting (starting secondary connections)"
+msgstr "conectando (iniciando conexões secundárias)"
+
+#: ../cli/src/devices.c:259 ../cli/src/network-manager.c:104
msgid "connected"
msgstr "conectado"
-#: ../cli/src/devices.c:109
+#: ../cli/src/devices.c:263
msgid "connection failed"
msgstr "falha na conexão"
-#: ../cli/src/devices.c:132 ../cli/src/devices.c:876
-msgid "Unknown"
-msgstr "Desconhecido"
-
-#. print them
-#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861
-#: ../cli/src/devices.c:879
-msgid "(none)"
-msgstr "(nenhum(a))"
+#: ../cli/src/devices.c:274
+msgid "No reason given"
+msgstr "Nenhuma razão fornecida"
-#: ../cli/src/devices.c:209
-#, c-format
-msgid "%s: error converting IP4 address 0x%X"
-msgstr "%s: erro ao converter endereço IP4 0x%X"
+#: ../cli/src/devices.c:277
+msgid "Unknown error"
+msgstr "Erro desconhecido"
-#: ../cli/src/devices.c:238
-#, c-format
-msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d"
-msgstr "%s, %s, Freq %d MHz, Taxa %d Mb/s, Força %d"
+#: ../cli/src/devices.c:280
+msgid "Device is now managed"
+msgstr "Dispositivo agora é gerenciável"
-#: ../cli/src/devices.c:239
-msgid "Ad-Hoc"
-msgstr "Ad-Hoc"
+#: ../cli/src/devices.c:283
+msgid "Device is now unmanaged"
+msgstr "Dispositivo agora não é gerenciável"
-#: ../cli/src/devices.c:248
-msgid ", Encrypted: "
-msgstr ", Criptografada:"
+#: ../cli/src/devices.c:286
+msgid "The device could not be readied for configuration"
+msgstr "O dispositivo pode não estar pronto para configuração"
-#: ../cli/src/devices.c:253
-msgid " WEP"
-msgstr " WEP"
+#: ../cli/src/devices.c:289
+msgid ""
+"IP configuration could not be reserved (no available address, timeout, etc)"
+msgstr ""
+"A configuração IP pode não estar reservada (nenhum endereço disponível, "
+"timeout, etc)"
-#: ../cli/src/devices.c:255
-msgid " WPA"
-msgstr " WPA"
+#: ../cli/src/devices.c:292
+msgid "The IP configuration is no longer valid"
+msgstr "A configuração IP não é mais válida"
-#: ../cli/src/devices.c:257
-msgid " WPA2"
-msgstr " WPA2"
+#: ../cli/src/devices.c:295
+msgid "Secrets were required, but not provided"
+msgstr "Segredos foram requisitados, mas não fornecidos"
-#: ../cli/src/devices.c:260
-msgid " Enterprise"
-msgstr " Enterprise"
+#: ../cli/src/devices.c:298
+msgid "802.1X supplicant disconnected"
+msgstr "802.1X supplicant - desconectado"
-#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460
-msgid "Device"
-msgstr "Dispositivo"
+#: ../cli/src/devices.c:301
+msgid "802.1X supplicant configuration failed"
+msgstr "802.1X supplicant - falha de configuração"
-#: ../cli/src/devices.c:299
-msgid "Driver"
-msgstr "Controlador"
+#: ../cli/src/devices.c:304
+msgid "802.1X supplicant failed"
+msgstr "802.1X supplicant - falhou"
-#: ../cli/src/devices.c:299 ../cli/src/devices.c:567
-msgid "(unknown)"
-msgstr "(desconhecido)"
+#: ../cli/src/devices.c:307
+msgid "802.1X supplicant took too long to authenticate"
+msgstr "802.1X supplicant - demorou muito para autenticar"
-#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460
-msgid "State"
-msgstr "Estado"
+#: ../cli/src/devices.c:310
+msgid "PPP service failed to start"
+msgstr "O serviço PPP falhou ao iniciar"
#: ../cli/src/devices.c:313
-msgid "HW Address"
-msgstr "Endereço de HW"
+msgid "PPP service disconnected"
+msgstr "Serviço PPP desconectado"
+
+#: ../cli/src/devices.c:316
+msgid "PPP failed"
+msgstr "O PPP falhou"
#: ../cli/src/devices.c:319
-#, c-format
-msgid ""
-"\n"
-" Capabilities:\n"
-msgstr ""
-"\n"
-" Capacidades:\n"
+msgid "DHCP client failed to start"
+msgstr "O cliente DHCP falhou ao iniciar"
-#: ../cli/src/devices.c:321
-msgid "Carrier Detect"
-msgstr "Detecção de Operadora"
+#: ../cli/src/devices.c:322
+msgid "DHCP client error"
+msgstr "Erro no cliente DHCP"
-#: ../cli/src/devices.c:336
-#, c-format
-msgid "%u Mb/s"
-msgstr "%u Mb/s"
+#: ../cli/src/devices.c:325
+msgid "DHCP client failed"
+msgstr "O cliente DHCP falhou"
+
+#: ../cli/src/devices.c:328
+msgid "Shared connection service failed to start"
+msgstr "O serviço de conexão compartilhada falhou ao iniciar"
+
+#: ../cli/src/devices.c:331
+msgid "Shared connection service failed"
+msgstr "falha no serviço de conexão compartilhada"
+
+#: ../cli/src/devices.c:334
+msgid "AutoIP service failed to start"
+msgstr "O serviço AutoIP falhou ao iniciar"
#: ../cli/src/devices.c:337
-msgid "Speed"
-msgstr "Velocidade"
+msgid "AutoIP service error"
+msgstr "Erro no serviço AutoIP"
-#: ../cli/src/devices.c:348
-#, c-format
-msgid ""
-"\n"
-" Wireless Properties\n"
-msgstr ""
-"\n"
-" Propriedades de rede sem fio\n"
+#: ../cli/src/devices.c:340
+msgid "AutoIP service failed"
+msgstr "O serviço AutoIP falhou"
-#: ../cli/src/devices.c:353
-msgid "WEP Encryption"
-msgstr "Criptografia WEP"
+#: ../cli/src/devices.c:343
+msgid "The line is busy"
+msgstr "A linha está ocupada"
-#: ../cli/src/devices.c:355
-msgid "WPA Encryption"
-msgstr "Criptografia WPA"
+#: ../cli/src/devices.c:346
+msgid "No dial tone"
+msgstr "Sem tom de discagem"
+
+#: ../cli/src/devices.c:349
+msgid "No carrier could be established"
+msgstr "Nenhum serviço de comunicação pôde ser estabelecido"
-#: ../cli/src/devices.c:357
-msgid "WPA2 Encryption"
-msgstr "Criptografia WPA2"
+#: ../cli/src/devices.c:352
+msgid "The dialing request timed out"
+msgstr "Tempo excedido durante a requisição de discagem"
+
+#: ../cli/src/devices.c:355
+msgid "The dialing attempt failed"
+msgstr "A tentativa de discagem falhou"
-#: ../cli/src/devices.c:359
-msgid "TKIP cipher"
-msgstr "Cifrador TKIP"
+#: ../cli/src/devices.c:358
+msgid "Modem initialization failed"
+msgstr "Falha na inicialização do modem"
#: ../cli/src/devices.c:361
-msgid "CCMP cipher"
-msgstr "Cifrador CCMP"
+msgid "Failed to select the specified APN"
+msgstr "Falha ao selecionar a APN especificada"
+
+#: ../cli/src/devices.c:364
+msgid "Not searching for networks"
+msgstr "Não procurando redes"
+
+#: ../cli/src/devices.c:367
+msgid "Network registration denied"
+msgstr "Registro na rede negado"
+
+#: ../cli/src/devices.c:370
+msgid "Network registration timed out"
+msgstr "Tempo excedido ao registrar na rede"
+
+#: ../cli/src/devices.c:373
+msgid "Failed to register with the requested network"
+msgstr "Falha ao registrar com a rede requisitada"
+
+#: ../cli/src/devices.c:376
+msgid "PIN check failed"
+msgstr "Verificação de PIN falhou"
+
+#: ../cli/src/devices.c:379
+msgid "Necessary firmware for the device may be missing"
+msgstr "O firmware necessário para o dispositivo pode estar faltando"
+
+#: ../cli/src/devices.c:382
+msgid "The device was removed"
+msgstr "O dispositivo foi removido"
-#: ../cli/src/devices.c:368
+#: ../cli/src/devices.c:385
+msgid "NetworkManager went to sleep"
+msgstr "NetworkManager posto para dormir"
+
+#: ../cli/src/devices.c:388
+msgid "The device's active connection disappeared"
+msgstr "A conexão do dispositivo ativo desapareceu"
+
+#: ../cli/src/devices.c:391
+msgid "Device disconnected by user or client"
+msgstr "Dispositivo desconectado pelo usuário ou cliente"
+
+#: ../cli/src/devices.c:394
+msgid "Carrier/link changed"
+msgstr "Comunicador/link alterado"
+
+#: ../cli/src/devices.c:397
+msgid "The device's existing connection was assumed"
+msgstr "A conexão do dispositivo existente foi assumida"
+
+#: ../cli/src/devices.c:400
+msgid "The supplicant is now available"
+msgstr "O supplicant agora está disponível"
+
+#: ../cli/src/devices.c:403
+msgid "The modem could not be found"
+msgstr "O modem não pôde ser encontrado."
+
+#: ../cli/src/devices.c:406
+msgid "The Bluetooth connection failed or timed out"
+msgstr "A conexão Bluetooth falhou ou teve seu tempo excedido"
+
+#: ../cli/src/devices.c:409
+msgid "GSM Modem's SIM card not inserted"
+msgstr "Cartão SIM do modem GSM não inserido"
+
+#: ../cli/src/devices.c:412
+msgid "GSM Modem's SIM PIN required"
+msgstr "PIN do modem GSM necessário"
+
+#: ../cli/src/devices.c:415
+msgid "GSM Modem's SIM PUK required"
+msgstr "PUK do modem GSM necessário"
+
+#: ../cli/src/devices.c:418
+msgid "GSM Modem's SIM wrong"
+msgstr "SIM do modem GSM errado"
+
+#: ../cli/src/devices.c:421
+msgid "InfiniBand device does not support connected mode"
+msgstr "Dispositivo InfiniBand não oferece suporte ao modo conectado"
+
+#: ../cli/src/devices.c:423 ../cli/src/devices.c:446 ../cli/src/devices.c:458
+#: ../cli/src/devices.c:578 ../cli/src/devices.c:622
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ../cli/src/devices.c:491
+msgid "(none)"
+msgstr "(nenhum(a))"
+
+#: ../cli/src/devices.c:547
#, c-format
-msgid ""
-"\n"
-" Wireless Access Points %s\n"
-msgstr ""
-"\n"
-" Pontos de acesso sem fio %s\n"
+msgid "%u MHz"
+msgstr "%u MHz"
+
+#: ../cli/src/devices.c:548
+#, c-format
+msgid "%u MB/s"
+msgstr "%u MB/s"
+
+#: ../cli/src/devices.c:557
+msgid "Encrypted: "
+msgstr "Criptografada:"
+
+#: ../cli/src/devices.c:562
+msgid "WEP "
+msgstr "WEP "
+
+#: ../cli/src/devices.c:564
+msgid "WPA "
+msgstr "WPA "
+
+#: ../cli/src/devices.c:566
+msgid "WPA2 "
+msgstr "WPA2 "
+
+#: ../cli/src/devices.c:569
+msgid "Enterprise "
+msgstr "Enterprise "
+
+#: ../cli/src/devices.c:578
+msgid "Ad-Hoc"
+msgstr "Ad-Hoc"
+
+#: ../cli/src/devices.c:578
+msgid "Infrastructure"
+msgstr "Infraestrutura"
-#: ../cli/src/devices.c:368
-msgid "(* = current AP)"
-msgstr "(* = PA atual)"
+#: ../cli/src/devices.c:613
+msgid "Home"
+msgstr "Home"
-#: ../cli/src/devices.c:374
+#: ../cli/src/devices.c:616
+msgid "Partner"
+msgstr "Parceiro"
+
+#: ../cli/src/devices.c:619
+msgid "Roaming"
+msgstr "Roaming"
+
+#: ../cli/src/devices.c:691
#, c-format
-msgid ""
-"\n"
-" Wired Properties\n"
-msgstr ""
-"\n"
-" Propriedades de rede com fio\n"
+msgid "Error: 'dev list': %s"
+msgstr "Erro: \"dev list\": %s"
+
+#: ../cli/src/devices.c:693
+#, c-format
+msgid "Error: 'dev list': %s; allowed fields: %s"
+msgstr "Erro: \"dev list\": %s; campos permitidos: %s"
+
+#: ../cli/src/devices.c:702
+msgid "Device details"
+msgstr "Detalhes do dispositivo"
+
+#: ../cli/src/devices.c:744 ../cli/src/devices.c:745 ../cli/src/devices.c:1152
+#: ../cli/src/utils.c:445
+msgid "(unknown)"
+msgstr "(desconhecido)"
+
+#: ../cli/src/devices.c:753
+msgid "not connected"
+msgstr "não conectado"
-#: ../cli/src/devices.c:377 ../cli/src/devices.c:379
-msgid "Carrier"
-msgstr "Operadora"
+#: ../cli/src/devices.c:780
+#, c-format
+msgid "%u Mb/s"
+msgstr "%u Mb/s"
-#: ../cli/src/devices.c:377
+#. Print header
+#. "WIRED-PROPERTIES"
+#: ../cli/src/devices.c:853
msgid "on"
msgstr "ligado"
-#: ../cli/src/devices.c:379
+#: ../cli/src/devices.c:853
msgid "off"
msgstr "desligado"
-#: ../cli/src/devices.c:387
+#: ../cli/src/devices.c:1004
#, c-format
-msgid ""
-"\n"
-" IPv4 Settings:\n"
-msgstr ""
-"\n"
-" Configurações IPv4\n"
-
-#: ../cli/src/devices.c:395
-msgid "Address"
-msgstr "Endereço"
+msgid "Error: 'dev status': %s"
+msgstr "Erro: \"dev status\": %s"
-#: ../cli/src/devices.c:401
-msgid "Prefix"
-msgstr "Prefixo"
-
-#: ../cli/src/devices.c:405
-msgid "Gateway"
-msgstr "Gateway"
-
-#: ../cli/src/devices.c:416
-msgid "DNS"
-msgstr "DNS"
+#: ../cli/src/devices.c:1006
+#, c-format
+msgid "Error: 'dev status': %s; allowed fields: %s"
+msgstr "Erro: \"dev status\": %s; campos permitidos: %s"
-#: ../cli/src/devices.c:458
+#: ../cli/src/devices.c:1029
msgid "Status of devices"
msgstr "Status dos dispositivos"
-#: ../cli/src/devices.c:487
+#: ../cli/src/devices.c:1060
#, c-format
msgid "Error: '%s' argument is missing."
msgstr "Erro: argumento \"%s\" está faltando."
-#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729
+#: ../cli/src/devices.c:1101 ../cli/src/devices.c:1253
+#: ../cli/src/devices.c:1390 ../cli/src/devices.c:1609
#, c-format
msgid "Error: Device '%s' not found."
msgstr "Erro: dispositivo \"%s\" não encontrado."
-#: ../cli/src/devices.c:539
+#: ../cli/src/devices.c:1124
#, c-format
msgid "Success: Device '%s' successfully disconnected."
msgstr "Sucesso: dispositivo \"%s\" desconectado com sucesso."
-#: ../cli/src/devices.c:564
+#: ../cli/src/devices.c:1149
#, c-format
msgid "Error: Device '%s' (%s) disconnecting failed: %s"
msgstr "Erro: desconexão do dispositivo \"%s\" (%s) falhou: %s"
-#: ../cli/src/devices.c:572
+#: ../cli/src/devices.c:1157
#, c-format
msgid "Device state: %d (%s)\n"
msgstr "Estado do dispositivo: %d (%s)\n"
-#: ../cli/src/devices.c:636
+#: ../cli/src/devices.c:1222
#, c-format
msgid "Error: iface has to be specified."
msgstr "Erro: iface tem que ser especificada."
-#: ../cli/src/devices.c:736 ../cli/src/devices.c:746
-msgid "WiFi scan list"
-msgstr "Lista de varredura de redes sem fio"
+#: ../cli/src/devices.c:1348
+#, c-format
+msgid "Error: 'dev wifi': %s"
+msgstr "Erro: \"dev wifi\": %s"
-#: ../cli/src/devices.c:740
+#: ../cli/src/devices.c:1350
#, c-format
-msgid "Error: Device '%s' is not a WiFi device."
-msgstr "Erro: dispositivo \"%s\" não é um dispositivo sem fio."
+msgid "Error: 'dev wifi': %s; allowed fields: %s"
+msgstr "Erro: \"dev wifi\": %s; campos permitidos: %s"
-#: ../cli/src/devices.c:754
-msgid "Device:"
-msgstr "Dispositivo:"
+#: ../cli/src/devices.c:1373
+msgid "WiFi scan list"
+msgstr "Lista de varredura de redes sem fio"
-#: ../cli/src/devices.c:806
+#: ../cli/src/devices.c:1410 ../cli/src/devices.c:1464
#, c-format
-msgid "Error: hwaddr has to be specified."
-msgstr "Erro: hwaddr tem que ser especificado."
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "Erro: Ponto de acesso com bssid \"%s\" não encontrado."
-#: ../cli/src/devices.c:844
+#: ../cli/src/devices.c:1427
#, c-format
-msgid "Error: Access point with hwaddr '%s' not found."
-msgstr "Erro: Ponto de acesso com hwaddr \"%s\" não encontrado."
+msgid "Error: Device '%s' is not a WiFi device."
+msgstr "Erro: dispositivo \"%s\" não é um dispositivo sem fio."
-#: ../cli/src/devices.c:862
+#: ../cli/src/devices.c:1491
#, c-format
-msgid "%u MHz"
-msgstr "%u MHz"
+msgid "Error: 'dev wifi' command '%s' is not valid."
+msgstr "Erro: comando \"dev wifi %s\" é inválido."
-#: ../cli/src/devices.c:863
+#: ../cli/src/devices.c:1567
#, c-format
-msgid "%u MB/s"
-msgstr "%u MB/s"
-
-#: ../cli/src/devices.c:869 ../cli/src/devices.c:871
-msgid "AP parameters"
-msgstr "Parâmetros do PA"
-
-#: ../cli/src/devices.c:873
-msgid "SSID:"
-msgstr "SSID:"
-
-#: ../cli/src/devices.c:874
-msgid "BSSID:"
-msgstr "BSSID:"
-
-#: ../cli/src/devices.c:875
-msgid "Frequency:"
-msgstr "Frequência:"
-
-#: ../cli/src/devices.c:876
-msgid "Mode:"
-msgstr "Modo:"
-
-#: ../cli/src/devices.c:876
-msgid "Ad-hoc"
-msgstr "Ad-hoc"
+msgid "Error: 'dev wimax': %s"
+msgstr "Erro: \"dev wimax\": %s"
-#: ../cli/src/devices.c:876
-msgid "Infrastructure"
-msgstr "Infraestrutura"
-
-#: ../cli/src/devices.c:877
-msgid "Maximal bitrate:"
-msgstr "Bitrate máxima:"
-
-#: ../cli/src/devices.c:878
-msgid "Strength:"
-msgstr "Potência:"
+#: ../cli/src/devices.c:1569
+#, c-format
+msgid "Error: 'dev wimax': %s; allowed fields: %s"
+msgstr "Erro: \"dev wimax\": %s; campos permitidos: %s"
-#: ../cli/src/devices.c:879
-msgid "Flags:"
-msgstr "Flags:"
+#: ../cli/src/devices.c:1592
+msgid "WiMAX NSP list"
+msgstr "lista WiMAX NSP"
-#: ../cli/src/devices.c:879
-msgid "privacy"
-msgstr "privacidade"
+#: ../cli/src/devices.c:1629
+#, c-format
+msgid "Error: NSP with name '%s' not found."
+msgstr "Erro: NSP chamado \"%s\" não encontrado."
-#: ../cli/src/devices.c:880
-msgid "WPA flags:"
-msgstr "Flags WPA:"
+#: ../cli/src/devices.c:1640
+#, c-format
+msgid "Error: Device '%s' is not a WiMAX device."
+msgstr "Erro: dispositivo \"%s\" não é um dispositivo WiMAX."
-#: ../cli/src/devices.c:881
-msgid "RSN flags:"
-msgstr "Flags RSN:"
+#: ../cli/src/devices.c:1671
+#, c-format
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "Erro: Ponto de acesso com nsp \"%s\" não encontrado."
-#: ../cli/src/devices.c:907
+#: ../cli/src/devices.c:1698
#, c-format
-msgid "Error: 'dev wifi' command '%s' is not valid."
-msgstr "Erro: comando \"dev wifi %s\" é inválido."
+msgid "Error: 'dev wimax' command '%s' is not valid."
+msgstr "Erro: comando \"dev wimax %s\" é inválido."
-#: ../cli/src/devices.c:943
+#: ../cli/src/devices.c:1748
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "Erro: comando \"dev %s\" é inválido."
+#: ../cli/src/network-manager.c:37
+msgid "RUNNING"
+msgstr "EXECUTANDO"
+
+#. 0
+#: ../cli/src/network-manager.c:38
+msgid "VERSION"
+msgstr "VERSÃO"
+
+#. 2
+#: ../cli/src/network-manager.c:40
+msgid "NET-ENABLED"
+msgstr "NET-ENABLED"
+
+#. 3
+#: ../cli/src/network-manager.c:41
+msgid "WIFI-HARDWARE"
+msgstr "HARDWARE WIFI"
+
+#. 4
+#: ../cli/src/network-manager.c:42
+msgid "WIFI"
+msgstr "WIFI"
+
+#. 5
+#: ../cli/src/network-manager.c:43
+msgid "WWAN-HARDWARE"
+msgstr "HARDWARE WWAN"
+
+#. 6
+#: ../cli/src/network-manager.c:44
+msgid "WWAN"
+msgstr "WWAN"
+
+#. 7
+#: ../cli/src/network-manager.c:45
+msgid "WIMAX-HARDWARE"
+msgstr "HARDWARE WIMAX"
+
+#. 8
#: ../cli/src/network-manager.c:46
+msgid "WIMAX"
+msgstr "WIMAX"
+
+#: ../cli/src/network-manager.c:67
#, c-format
msgid ""
"Usage: nmcli nm { COMMAND | help }\n"
"\n"
-" COMMAND := { status | sleep | wakeup | wifi | wwan }\n"
+" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n"
+"\n"
+" COMMAND := { status | enable | sleep | wifi | wwan }\n"
"\n"
" status\n"
-" sleep\n"
-" wakeup\n"
+" enable [true|false]\n"
+" sleep [true|false]\n"
" wifi [on|off]\n"
" wwan [on|off]\n"
+" wimax [on|off]\n"
"\n"
msgstr ""
"Uso: nmcli nm { COMANDO | help }\n"
"\n"
-" COMANDO := { status | sleep | wakeup | wifi | wwan }\n"
+" COMANDO := { status | enable | sleep | wifi | wwan | wimax }\n"
+"\n"
+" COMANDO := { status | enable | sleep | wifi | wwan }\n"
"\n"
" status\n"
-" sleep\n"
-" wakeup\n"
+" enable [true|false]\n"
+" sleep [true|false]\n"
" wifi [on|off]\n"
" wwan [on|off]\n"
+" wimax [on|off]\n"
"\n"
-#: ../cli/src/network-manager.c:67
+#: ../cli/src/network-manager.c:96
msgid "asleep"
msgstr "adormecido"
-#: ../cli/src/network-manager.c:69
+#: ../cli/src/network-manager.c:98
msgid "connecting"
msgstr "conectando"
-#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94
-#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96
-#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160
+#: ../cli/src/network-manager.c:100
+msgid "connected (local only)"
+msgstr "conectado (somente local)"
+
+#: ../cli/src/network-manager.c:102
+msgid "connected (site only)"
+msgstr "conectado (somente site)"
+
+#: ../cli/src/network-manager.c:106
+msgid "disconnecting"
+msgstr "desconectando"
+
+#: ../cli/src/network-manager.c:146
+#, c-format
+msgid "Error: 'nm status': %s"
+msgstr "Erro: \"nm status\": %s"
+
+#: ../cli/src/network-manager.c:148
+#, c-format
+msgid "Error: 'nm status': %s; allowed fields: %s"
+msgstr "Erro: \"nm status\": %s; campos permitidos: %s"
+
+#. create NMClient
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "enabled"
msgstr "habilitado"
-#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94
-#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96
-#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "disabled"
msgstr "desabilitado"
-#: ../cli/src/network-manager.c:102
+#: ../cli/src/network-manager.c:181
msgid "NetworkManager status"
msgstr "Status do NetworkManager"
-#: ../cli/src/network-manager.c:104
-msgid "NM running:"
-msgstr "NM rodando:"
-
-#: ../cli/src/network-manager.c:104
+#. Print header
+#: ../cli/src/network-manager.c:184
msgid "running"
msgstr "executando"
-#: ../cli/src/network-manager.c:104
+#: ../cli/src/network-manager.c:184
msgid "not running"
msgstr "não executando"
-#: ../cli/src/network-manager.c:105
-msgid "NM state:"
-msgstr "Estado do NM:"
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:425
+#, c-format
+msgid "Error: Couldn't connect to system bus: %s"
+msgstr "Erro: não foi possível conectar bus do sistema: %s"
+
+#: ../cli/src/network-manager.c:226
+#, c-format
+msgid "Error: Couldn't create D-Bus object proxy."
+msgstr "Erro: não foi possível criar um objeto proxy D-Bus."
-#: ../cli/src/network-manager.c:106
-msgid "NM wireless hardware:"
-msgstr "Hardware sem fio do NM:"
+#: ../cli/src/network-manager.c:232
+#, c-format
+msgid "Error in sleep: %s"
+msgstr "Erro ao dormir: %s"
-#. no argument, show current state
-#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143
-msgid "NM wireless:"
-msgstr "NM sem fio:"
+#: ../cli/src/network-manager.c:276 ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369 ../cli/src/network-manager.c:408
+#, c-format
+msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
+msgstr "Erro: valor \"--fields %s\" não é válido aqui; campos permitidos: %s"
-#: ../cli/src/network-manager.c:108
-msgid "NM WWAN hardware:"
-msgstr "Hardware NM WWAN:"
+#: ../cli/src/network-manager.c:284
+msgid "Networking enabled"
+msgstr "Comunicação em redes habilitada"
-#. no argument, show current state
-#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160
-msgid "NM WWAN:"
-msgstr "NM WWAN:"
+#: ../cli/src/network-manager.c:300
+#, c-format
+msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
+msgstr ""
+"Erro: parâmetro \"enable\" inválido: \"%s\"; use \"true\" ou \"false\"."
+
+#: ../cli/src/network-manager.c:310
+#, c-format
+msgid "Error: Sleeping status is not exported by NetworkManager."
+msgstr "Erro: Status de \"dormência\" não é exportado pelo NetworkManager."
-#: ../cli/src/network-manager.c:150
+#: ../cli/src/network-manager.c:318
+#, c-format
+msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
+msgstr "Erro: parâmetro \"sleep\" inválido: \"%s\"; use \"true\" ou \"false\"."
+
+#: ../cli/src/network-manager.c:339
+msgid "WiFi enabled"
+msgstr "WiFi habilitado"
+
+#: ../cli/src/network-manager.c:355
#, c-format
msgid "Error: invalid 'wifi' parameter: '%s'."
msgstr "Erro: parâmetro \"wifi\" inválido: \"%s\""
-#: ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:377
+msgid "WWAN enabled"
+msgstr "WWAN habilitado"
+
+#: ../cli/src/network-manager.c:393
#, c-format
msgid "Error: invalid 'wwan' parameter: '%s'."
msgstr "Erro: parâmetro \"wwan\" inválido: \"%s\""
-#: ../cli/src/network-manager.c:178
+#: ../cli/src/network-manager.c:416
+msgid "WiMAX enabled"
+msgstr "WiMAX habilitado"
+
+#: ../cli/src/network-manager.c:432
+#, c-format
+msgid "Error: invalid 'wimax' parameter: '%s'."
+msgstr "Erro: parâmetro \"wimax\" inválido: \"%s\"."
+
+#: ../cli/src/network-manager.c:445
#, c-format
msgid "Error: 'nm' command '%s' is not valid."
msgstr "Erro: comando \"nm %s\" é inválido."
-#: ../cli/src/nmcli.c:65
+#: ../cli/src/nmcli.c:64
#, c-format
msgid ""
"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
"\n"
"OPTIONS\n"
-" -t[erse] terse output\n"
-" -p[retty] pretty output\n"
-" -v[ersion] show program version\n"
-" -h[elp] print this help\n"
+" -t[erse] terse output\n"
+" -p[retty] pretty output\n"
+" -m[ode] tabular|multiline output mode\n"
+" -f[ields] <field1,field2,...>|all|common specify fields to output\n"
+" -e[scape] yes|no escape columns separators in "
+"values\n"
+" -n[ocheck] don't check nmcli and "
+"NetworkManager versions\n"
+" -v[ersion] show program version\n"
+" -h[elp] print this help\n"
"\n"
"OBJECT\n"
" nm NetworkManager status\n"
@@ -827,455 +1548,863 @@ msgstr ""
"Uso: %s [OPÇÕES] OBJETO { COMANDO | help }\n"
"\n"
"OPÇÕES\n"
-" -t[erse] saída concisa\n"
-" -p[retty] saída elegante\n"
-" -v[ersion] mostra a versão do programa\n"
-" -h[elp] imprime esta ajuda\n"
+" -t[erse] saída precisa\n"
+" -p[retty] saída elegante\n"
+" -m[ode] tabular|multiline modo de visão\n"
+" -f[ields] <field1,field2,...>|all|common especifica os campos para "
+"saída\n"
+" -e[scape] yes|no escapa separadores de coluunas "
+"em valores\n"
+" -n[ocheck] não verifica versões do nmcli e "
+"do NetworkManager\n"
+" -v[ersion] mostra a versão do programa\n"
+" -h[elp] imprime esta ajuda\n"
"\n"
"OBJETO\n"
" nm Status do NetworkManager\n"
" con Conexões do NetworkManager\n"
-" dev Dispositivos gerenciados pelo NetworkManager\n"
+" dev dispositivos gerenciados pelo NetworkManager\n"
"\n"
-#: ../cli/src/nmcli.c:106
+#: ../cli/src/nmcli.c:109
#, c-format
-msgid "Object '%s' is unknown, try 'nmcli help'."
-msgstr "Objeto \"%s\" é desconhecido, tente \"nmcli help\"."
+msgid "Error: Object '%s' is unknown, try 'nmcli help'."
+msgstr "Erro: Objeto \"%s\" é desconhecido, tente \"nmcli help\"."
#: ../cli/src/nmcli.c:139
#, c-format
+msgid "Error: Option '--terse' is specified the second time."
+msgstr "Erro: Opção \"--terse\" especificada pela segunda vez."
+
+#: ../cli/src/nmcli.c:144
+#, c-format
+msgid "Error: Option '--terse' is mutually exclusive with '--pretty'."
+msgstr "Erro: Opção \"--terse\" é mutualmente exclusiva com \"--pretty\"."
+
+#: ../cli/src/nmcli.c:152
+#, c-format
+msgid "Error: Option '--pretty' is specified the second time."
+msgstr "Erro: Opção \"--pretty\" especificada pela segunda vez."
+
+#: ../cli/src/nmcli.c:157
+#, c-format
+msgid "Error: Option '--pretty' is mutually exclusive with '--terse'."
+msgstr "Erro: Opção \"--pretty\" é mutualmente exclusiva com \"--terse\"."
+
+#: ../cli/src/nmcli.c:167 ../cli/src/nmcli.c:183
+#, c-format
+msgid "Error: missing argument for '%s' option."
+msgstr "Erro: faltando argumento para a opção \"%s\"."
+
+#: ../cli/src/nmcli.c:176 ../cli/src/nmcli.c:192
+#, c-format
+msgid "Error: '%s' is not valid argument for '%s' option."
+msgstr "Erro: argumento \"%s\" não é válido para a opção \"%s\"."
+
+#: ../cli/src/nmcli.c:199
+#, c-format
+msgid "Error: fields for '%s' options are missing."
+msgstr "Erro: faltando campos para as opções \"%s\"."
+
+#: ../cli/src/nmcli.c:207
+#, c-format
msgid "nmcli tool, version %s\n"
msgstr "ferramenta nmcli, versão %s\n"
-#: ../cli/src/nmcli.c:145
+#: ../cli/src/nmcli.c:213
#, c-format
-msgid "Option '%s' is unknown, try 'nmcli -help'."
-msgstr "Opção \"%s\" é desconhecida, tente \"nmcli -help\"."
+msgid "Error: Option '%s' is unknown, try 'nmcli -help'."
+msgstr "Erro: Opção \"%s\" é desconhecida, tente \"nmcli -help\"."
-#: ../cli/src/nmcli.c:164
+#: ../cli/src/nmcli.c:232
#, c-format
msgid "Caught signal %d, shutting down..."
msgstr "Sinal capturado %d, desligando..."
-#: ../cli/src/nmcli.c:189
-#, c-format
-msgid "Error: Could not connect to NetworkManager."
-msgstr "Erro: não foi possível conectar ao NetworkManager."
+#: ../cli/src/nmcli.c:257
+msgid "Error: Could not create NMClient object."
+msgstr "Erro: não foi possível criar objeto NMClient."
-#: ../cli/src/nmcli.c:205
+#: ../cli/src/nmcli.c:273
msgid "Success"
msgstr "Sucesso"
-#: ../libnm-util/crypto.c:120
+#: ../cli/src/settings.c:465
+#, c-format
+msgid "%d (hex-ascii-key)"
+msgstr "%d (chave-ascii-hex)"
+
+#: ../cli/src/settings.c:467
+#, c-format
+msgid "%d (104/128-bit passphrase)"
+msgstr "%d (palavra-chave de 104/128-bit)"
+
+#: ../cli/src/settings.c:470
+#, c-format
+msgid "%d (unknown)"
+msgstr "%d (desconhecido)"
+
+#: ../cli/src/settings.c:496
+msgid "0 (unknown)"
+msgstr "0 (desconhecido)"
+
+#: ../cli/src/settings.c:502
+msgid "any, "
+msgstr "qualquer, "
+
+#: ../cli/src/settings.c:504
+msgid "900 MHz, "
+msgstr "900 MHz, "
+
+#: ../cli/src/settings.c:506
+msgid "1800 MHz, "
+msgstr "1800 MHz, "
+
+#: ../cli/src/settings.c:508
+msgid "1900 MHz, "
+msgstr "1900 MHz, "
+
+#: ../cli/src/settings.c:510
+msgid "850 MHz, "
+msgstr "850 MHz, "
+
+#: ../cli/src/settings.c:512
+msgid "WCDMA 3GPP UMTS 2100 MHz, "
+msgstr "WCDMA 3GPP UMTS 2100 MHz, "
+
+#: ../cli/src/settings.c:514
+msgid "WCDMA 3GPP UMTS 1800 MHz, "
+msgstr "WCDMA 3GPP UMTS 1800 MHz, "
+
+#: ../cli/src/settings.c:516
+msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
+msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
+
+#: ../cli/src/settings.c:518
+msgid "WCDMA 3GPP UMTS 800 MHz, "
+msgstr "WCDMA 3GPP UMTS 800 MHz, "
+
+#: ../cli/src/settings.c:520
+msgid "WCDMA 3GPP UMTS 850 MHz, "
+msgstr "WCDMA 3GPP UMTS 850 MHz, "
+
+#: ../cli/src/settings.c:522
+msgid "WCDMA 3GPP UMTS 900 MHz, "
+msgstr "WCDMA 3GPP UMTS 900 MHz, "
+
+#: ../cli/src/settings.c:524
+msgid "WCDMA 3GPP UMTS 1700 MHz, "
+msgstr "WCDMA 3GPP UMTS 1700 MHz, "
+
+#: ../cli/src/settings.c:526
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 1900 MHz, "
+
+#: ../cli/src/settings.c:528
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2600 MHz, "
+
+#: ../cli/src/settings.c:650 ../cli/src/settings.c:846
+#: ../cli/src/settings.c:1550
+msgid "auto"
+msgstr "auto"
+
+#: ../cli/src/settings.c:840 ../cli/src/settings.c:843
+#: ../cli/src/settings.c:844 ../cli/src/utils.c:247
+msgid "not set"
+msgstr "não configurado"
+
+#: ../cli/src/utils.c:103
+#, c-format
+msgid "Error converting IP4 address '0x%X' to text form"
+msgstr "Erro ao converter endereço IP4 \"0x%X\" para o formato texto"
+
+#: ../cli/src/utils.c:131
+#, c-format
+msgid "Error converting IP6 address '%s' to text form"
+msgstr "Erro ao converter endereço IP6 \"%s\" para o formato texto"
+
+#: ../cli/src/utils.c:200
+#, c-format
+msgid "field '%s' has to be alone"
+msgstr "campo \"%s\" tem que ser um só"
+
+#: ../cli/src/utils.c:203
+#, c-format
+msgid "invalid field '%s'"
+msgstr "campo \"%s\" é inválido"
+
+#: ../cli/src/utils.c:222
+#, c-format
+msgid "Option '--terse' requires specifying '--fields'"
+msgstr "Opção \"--terse\" requer especificação de \"--fields\""
+
+#: ../cli/src/utils.c:226
+#, c-format
+msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
+msgstr "Opção \"--terse\" requer valores da opção \"--fields\", não \"%s\""
+
+#: ../cli/src/utils.c:436
+#, c-format
+msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
+msgstr ""
+"Erro: Não foi possível criar objeto proxy D-Bus para org.freedesktop.DBus"
+
+#: ../cli/src/utils.c:444
+#, c-format
+msgid "Error: NameHasOwner request failed: %s"
+msgstr "Erro: Requisição NameHasOwner falhou: %s"
+
+#: ../cli/src/utils.c:489
+#, c-format
+msgid ""
+"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
+"nocheck to suppress the warning.\n"
+msgstr ""
+"Aviso: As versões do nmcli (%s) e do NetworkManager (%s) não correspondem. "
+"Use --nocheck para omitir este aviso.\n"
+
+#: ../cli/src/utils.c:498
+#, c-format
+msgid ""
+"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
+"execution using --nocheck, but the results are unpredictable."
+msgstr ""
+"Aviso: As versões do nmcli (%s) e do NetworkManager (%s) não correspondem. "
+"Force a execução usando --nocheck, mas os resultados são imprevisíveis."
+
+#: ../libnm-util/crypto.c:133
#, c-format
msgid "PEM key file had no end tag '%s'."
msgstr "A chave do arquivo PEM não tinha a marca de finalização \"%s\"."
-#: ../libnm-util/crypto.c:130
+#: ../libnm-util/crypto.c:146
#, c-format
msgid "Doesn't look like a PEM private key file."
msgstr "Não se parece com um arquivo de chave privada PEM."
-#: ../libnm-util/crypto.c:138
+#: ../libnm-util/crypto.c:154
#, c-format
msgid "Not enough memory to store PEM file data."
msgstr "Memória insuficiente para armazenar os dados do arquivo PEM."
-#: ../libnm-util/crypto.c:154
+#: ../libnm-util/crypto.c:170
#, c-format
msgid "Malformed PEM file: Proc-Type was not first tag."
msgstr "Arquivo PEM defeituoso: Proc-Type não era a primeira marca."
-#: ../libnm-util/crypto.c:162
+#: ../libnm-util/crypto.c:178
#, c-format
msgid "Malformed PEM file: unknown Proc-Type tag '%s'."
msgstr "Arquivo PEM defeituoso: marca Proc-Type desconhecida: \"%s\"."
-#: ../libnm-util/crypto.c:172
+#: ../libnm-util/crypto.c:188
#, c-format
msgid "Malformed PEM file: DEK-Info was not the second tag."
msgstr "Arquivo PEM defeituoso: DEK-Info não era a segunda marca."
-#: ../libnm-util/crypto.c:183
+#: ../libnm-util/crypto.c:199
#, c-format
msgid "Malformed PEM file: no IV found in DEK-Info tag."
msgstr "Arquivo PEM defeituoso: nenhum IV localizado na marca DEK-Info."
-#: ../libnm-util/crypto.c:190
+#: ../libnm-util/crypto.c:206
#, c-format
msgid "Malformed PEM file: invalid format of IV in DEK-Info tag."
msgstr "Arquivo PEM defeituoso: formato inválido do IV na marca DEK-Info."
-#: ../libnm-util/crypto.c:203
+#: ../libnm-util/crypto.c:219
#, c-format
msgid "Malformed PEM file: unknown private key cipher '%s'."
msgstr "Arquivo PEM defeituoso: cifra de chave privada desconhecida \"%s\"."
-#: ../libnm-util/crypto.c:222
+#: ../libnm-util/crypto.c:238
#, c-format
msgid "Could not decode private key."
msgstr "Não foi possível decodificar chave privada."
-#: ../libnm-util/crypto.c:267
-#, c-format
-msgid "PEM certificate '%s' had no end tag '%s'."
-msgstr "Certificado PEM \"%s\" não tinha a marca de finalização \"%s\"."
+#: ../libnm-util/crypto.c:284
+msgid "Failed to find expected PKCS#8 start tag."
+msgstr "Falha ao procurar a marca de início PKCS#8 esperada."
-#: ../libnm-util/crypto.c:277
+#: ../libnm-util/crypto.c:292
#, c-format
-msgid "Failed to decode certificate."
-msgstr "Falha ao decodificar o certificado."
+msgid "Failed to find expected PKCS#8 end tag '%s'."
+msgstr "Falha ao procurar a marca de finalização PKCS#8 \"%s\" esperada."
+
+#: ../libnm-util/crypto.c:312
+msgid "Not enough memory to store private key data."
+msgstr "Memória insuficiente para armazenar dados da chave privada."
-#: ../libnm-util/crypto.c:286
+#: ../libnm-util/crypto.c:317
+msgid "Failed to decode PKCS#8 private key."
+msgstr "Falha ao descriptografar a chave privada PKCS#8."
+
+#: ../libnm-util/crypto.c:339 ../libnm-util/crypto.c:625
#, c-format
msgid "Not enough memory to store certificate data."
msgstr "Memória insuficiente para armazenar os dados do certificado."
-#: ../libnm-util/crypto.c:294
-#, c-format
-msgid "Not enough memory to store file data."
-msgstr "Memória insuficiente para armazenar dados no arquivo."
-
-#: ../libnm-util/crypto.c:324
+#: ../libnm-util/crypto.c:365
#, c-format
msgid "IV must be an even number of bytes in length."
msgstr "O tamanho do IV deve ser um número par de bytes."
-#: ../libnm-util/crypto.c:333
+#: ../libnm-util/crypto.c:374
#, c-format
msgid "Not enough memory to store the IV."
msgstr "Memória insuficiente para armazenar o IV."
-#: ../libnm-util/crypto.c:344
+#: ../libnm-util/crypto.c:385
#, c-format
msgid "IV contains non-hexadecimal digits."
msgstr "IV contém dígitos não-hexadecimais."
-#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148
-#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171
-#: ../libnm-util/crypto_nss.c:336
+#: ../libnm-util/crypto.c:423 ../libnm-util/crypto_gnutls.c:147
+#: ../libnm-util/crypto_gnutls.c:265 ../libnm-util/crypto_nss.c:167
+#: ../libnm-util/crypto_nss.c:332
#, c-format
msgid "Private key cipher '%s' was unknown."
msgstr "A cifra da chave privada \"%s\" era desconhecida."
-#: ../libnm-util/crypto.c:391
+#: ../libnm-util/crypto.c:432
#, c-format
msgid "Not enough memory to decrypt private key."
msgstr "Memória insuficiente para descriptografar a chave privada."
-#: ../libnm-util/crypto.c:511
+#: ../libnm-util/crypto.c:497
+#, c-format
+msgid "Not enough memory to store decrypted private key."
+msgstr ""
+"Memória insuficiente para armazenar a chave privada de descriptografia."
+
+#: ../libnm-util/crypto.c:542
#, c-format
msgid "Unable to determine private key type."
msgstr "Não foi possível determinar o tipo da chave privada."
-#: ../libnm-util/crypto.c:530
+#: ../libnm-util/crypto.c:597
#, c-format
-msgid "Not enough memory to store decrypted private key."
-msgstr ""
-"Memória insuficiente para armazenar a chave privada de descriptografia."
+msgid "PEM certificate had no start tag '%s'."
+msgstr "Certificado PEM não tinha a marca de inicialização \"%s\"."
+
+#: ../libnm-util/crypto.c:606
+#, c-format
+msgid "PEM certificate had no end tag '%s'."
+msgstr "Certificado PEM não tinha a marca de finalização \"%s\"."
-#: ../libnm-util/crypto_gnutls.c:49
+#: ../libnm-util/crypto.c:630
+#, c-format
+msgid "Failed to decode certificate."
+msgstr "Falha ao decodificar o certificado."
+
+#: ../libnm-util/crypto_gnutls.c:50
msgid "Failed to initialize the crypto engine."
msgstr "Falha ao inicializar o motor de criptografia."
-#: ../libnm-util/crypto_gnutls.c:93
+#: ../libnm-util/crypto_gnutls.c:92
#, c-format
msgid "Failed to initialize the MD5 engine: %s / %s."
msgstr "Falha ao inicializar o motor MD5: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:156
+#: ../libnm-util/crypto_gnutls.c:155
#, c-format
msgid "Invalid IV length (must be at least %zd)."
msgstr "Tamanho do IV inválido (tem que ser pelo menos %zd)."
-#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188
+#: ../libnm-util/crypto_gnutls.c:164 ../libnm-util/crypto_nss.c:184
#, c-format
msgid "Not enough memory for decrypted key buffer."
msgstr "Memória insuficiente para o buffer da chave descriptografada."
-#: ../libnm-util/crypto_gnutls.c:173
+#: ../libnm-util/crypto_gnutls.c:172
#, c-format
msgid "Failed to initialize the decryption cipher context: %s / %s."
msgstr "Falha ao inicializar o contexto da cifra de descriptografia: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:182
+#: ../libnm-util/crypto_gnutls.c:181
#, c-format
msgid "Failed to set symmetric key for decryption: %s / %s."
msgstr "Falha ao definir chave simétrica para descriptografia: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:191
+#: ../libnm-util/crypto_gnutls.c:190
#, c-format
msgid "Failed to set IV for decryption: %s / %s."
msgstr "Falha ao definir IV para descriptografia: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:200
+#: ../libnm-util/crypto_gnutls.c:199
#, c-format
msgid "Failed to decrypt the private key: %s / %s."
msgstr "Falha ao descriptografar a chave privada: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267
+#: ../libnm-util/crypto_gnutls.c:209 ../libnm-util/crypto_nss.c:263
#, c-format
msgid "Failed to decrypt the private key: unexpected padding length."
msgstr ""
"Falha ao descriptografar a chave privada: comprimento de preenchimento não "
"esperado."
-#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278
+#: ../libnm-util/crypto_gnutls.c:220 ../libnm-util/crypto_nss.c:274
#, c-format
msgid "Failed to decrypt the private key."
msgstr "Falha ao descriptografar a chave privada."
-#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356
+#: ../libnm-util/crypto_gnutls.c:285 ../libnm-util/crypto_nss.c:352
#, c-format
msgid "Could not allocate memory for encrypting."
msgstr "Não foi possível alocar memória para criptografia."
-#: ../libnm-util/crypto_gnutls.c:294
+#: ../libnm-util/crypto_gnutls.c:293
#, c-format
msgid "Failed to initialize the encryption cipher context: %s / %s."
msgstr "Falha ao inicializar o contexto da cifra de criptografia: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:303
+#: ../libnm-util/crypto_gnutls.c:302
#, c-format
msgid "Failed to set symmetric key for encryption: %s / %s."
msgstr "Falha ao definir chave simétrica para criptografia: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:313
+#: ../libnm-util/crypto_gnutls.c:312
#, c-format
msgid "Failed to set IV for encryption: %s / %s."
msgstr "Falha ao definir IV para criptografia: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:322
+#: ../libnm-util/crypto_gnutls.c:321
#, c-format
msgid "Failed to encrypt the data: %s / %s."
msgstr "Falha ao criptografar a chave privada: %s / %s."
-#: ../libnm-util/crypto_gnutls.c:362
+#: ../libnm-util/crypto_gnutls.c:361
#, c-format
msgid "Error initializing certificate data: %s"
msgstr "Erro ao inicializar os dados do certificado: %s"
-#: ../libnm-util/crypto_gnutls.c:384
+#: ../libnm-util/crypto_gnutls.c:383
#, c-format
msgid "Couldn't decode certificate: %s"
msgstr "Não foi possível decodificar o certificado: %s"
-#: ../libnm-util/crypto_gnutls.c:408
+#: ../libnm-util/crypto_gnutls.c:407
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %s"
msgstr "Não foi possível inicializar o decodificador PKCS#12: %s"
-#: ../libnm-util/crypto_gnutls.c:421
+#: ../libnm-util/crypto_gnutls.c:420
#, c-format
msgid "Couldn't decode PKCS#12 file: %s"
msgstr "Não foi possível decodificar o arquivo PKCS#12: %s"
-#: ../libnm-util/crypto_gnutls.c:433
+#: ../libnm-util/crypto_gnutls.c:432
#, c-format
msgid "Couldn't verify PKCS#12 file: %s"
msgstr "Não foi possível verificar o arquivo PKCS#12: %s"
+#: ../libnm-util/crypto_gnutls.c:460
+#, c-format
+msgid "Couldn't initialize PKCS#8 decoder: %s"
+msgstr "Não foi possível inicializar o decodificador PKCS#8: %s"
+
+#: ../libnm-util/crypto_gnutls.c:483
+#, c-format
+msgid "Couldn't decode PKCS#8 file: %s"
+msgstr "Não foi possível decodificar o arquivo PKCS#8: %s"
+
#: ../libnm-util/crypto_nss.c:56
#, c-format
msgid "Failed to initialize the crypto engine: %d."
msgstr "Falha ao inicializar o motor de criptografia: %d."
-#: ../libnm-util/crypto_nss.c:111
+#: ../libnm-util/crypto_nss.c:107
#, c-format
msgid "Failed to initialize the MD5 context: %d."
msgstr "Falha ao inicializar o contexto MD5: %d."
-#: ../libnm-util/crypto_nss.c:179
+#: ../libnm-util/crypto_nss.c:175
#, c-format
msgid "Invalid IV length (must be at least %d)."
msgstr "Tamanho inválido do IV (tem que ser pelo menos %d)."
-#: ../libnm-util/crypto_nss.c:196
+#: ../libnm-util/crypto_nss.c:192
#, c-format
msgid "Failed to initialize the decryption cipher slot."
msgstr "Falha ao inicializar o espaço de cifra de descriptografia."
-#: ../libnm-util/crypto_nss.c:206
+#: ../libnm-util/crypto_nss.c:202
#, c-format
msgid "Failed to set symmetric key for decryption."
msgstr "Falha ao definir chave simétrica para descriptografia."
-#: ../libnm-util/crypto_nss.c:216
+#: ../libnm-util/crypto_nss.c:212
#, c-format
msgid "Failed to set IV for decryption."
msgstr "Falha ao definir IV para descriptografia."
-#: ../libnm-util/crypto_nss.c:224
+#: ../libnm-util/crypto_nss.c:220
#, c-format
msgid "Failed to initialize the decryption context."
msgstr "Falha ao inicializar o contexto de descriptografia."
-#: ../libnm-util/crypto_nss.c:237
+#: ../libnm-util/crypto_nss.c:233
#, c-format
msgid "Failed to decrypt the private key: %d."
msgstr "Falha ao descriptografar a chave privada: %d."
-#: ../libnm-util/crypto_nss.c:245
+#: ../libnm-util/crypto_nss.c:241
#, c-format
msgid "Failed to decrypt the private key: decrypted data too large."
msgstr ""
"Falha ao descriptografar a chave privada: dados descriptografados muito "
"compridos."
-#: ../libnm-util/crypto_nss.c:256
+#: ../libnm-util/crypto_nss.c:252
#, c-format
msgid "Failed to finalize decryption of the private key: %d."
msgstr "Falha ao finalizar a descriptografia da chave privada: %d."
-#: ../libnm-util/crypto_nss.c:364
+#: ../libnm-util/crypto_nss.c:360
#, c-format
msgid "Failed to initialize the encryption cipher slot."
msgstr "Falha ao inicializar o espaço de cifra de criptografia."
-#: ../libnm-util/crypto_nss.c:372
+#: ../libnm-util/crypto_nss.c:368
#, c-format
msgid "Failed to set symmetric key for encryption."
msgstr "Falha ao definir chave simétrica para criptografia."
-#: ../libnm-util/crypto_nss.c:380
+#: ../libnm-util/crypto_nss.c:376
#, c-format
msgid "Failed to set IV for encryption."
msgstr "Falha ao definir IV para criptografia."
-#: ../libnm-util/crypto_nss.c:388
+#: ../libnm-util/crypto_nss.c:384
#, c-format
msgid "Failed to initialize the encryption context."
msgstr "Falha ao inicializar o contexto de criptografia."
-#: ../libnm-util/crypto_nss.c:396
+#: ../libnm-util/crypto_nss.c:392
#, c-format
msgid "Failed to encrypt: %d."
msgstr "Falha ao criptografar a chave privada: %d."
-#: ../libnm-util/crypto_nss.c:404
+#: ../libnm-util/crypto_nss.c:400
#, c-format
msgid "Unexpected amount of data after encrypting."
msgstr "Quantidade de dados inesperados depois da criptografia."
-#: ../libnm-util/crypto_nss.c:447
+#: ../libnm-util/crypto_nss.c:443
#, c-format
msgid "Couldn't decode certificate: %d"
msgstr "Não foi possível decodificar o certificado: %d"
-#: ../libnm-util/crypto_nss.c:482
+#: ../libnm-util/crypto_nss.c:478
#, c-format
msgid "Couldn't convert password to UCS2: %d"
msgstr "Não foi possível converter senha para o formato UCS2: %d"
-#: ../libnm-util/crypto_nss.c:510
+#: ../libnm-util/crypto_nss.c:506
#, c-format
msgid "Couldn't initialize PKCS#12 decoder: %d"
msgstr "Não foi possível inicializar o decodificador PKCS#12: %d"
-#: ../libnm-util/crypto_nss.c:519
+#: ../libnm-util/crypto_nss.c:515
#, c-format
msgid "Couldn't decode PKCS#12 file: %d"
msgstr "Não foi possível decodificar o arquivo PKCS#12: %d"
-#: ../libnm-util/crypto_nss.c:528
+#: ../libnm-util/crypto_nss.c:524
#, c-format
msgid "Couldn't verify PKCS#12 file: %d"
msgstr "Não foi possível verificar o arquivo PKCS#12: %d"
-#: ../libnm-util/crypto_nss.c:557
+#: ../libnm-util/crypto_nss.c:568
msgid "Could not generate random data."
msgstr "Não foi possível gerar dados aleatórios."
-#: ../libnm-util/nm-utils.c:1924
+#: ../libnm-util/nm-utils.c:2034
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "Memória insuficiente para criar a chave de criptografia."
-#: ../libnm-util/nm-utils.c:2034
+#: ../libnm-util/nm-utils.c:2144
msgid "Could not allocate memory for PEM file creation."
msgstr "Não foi possível alocar memória para criação do arquivo PEM."
-#: ../libnm-util/nm-utils.c:2046
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "Não foi possível alocar memória para gravar IV no arquivo PEM."
-#: ../libnm-util/nm-utils.c:2058
+#: ../libnm-util/nm-utils.c:2168
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr ""
"Não foi possível alocar memória para gravar a chave criptografada no arquivo "
"PEM."
-#: ../libnm-util/nm-utils.c:2077
+#: ../libnm-util/nm-utils.c:2187
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "Não foi possível alocar memória para os dados do arquivo PEM."
-#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231
-#: ../src/nm-netlink-monitor.c:653
-#, c-format
-msgid "error processing netlink message: %s"
-msgstr "erro ao processar mensagem do netlink: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
+msgid "Enable or disable system networking"
+msgstr "Habilita ou desabilita o sistema de redes"
-#: ../src/nm-netlink-monitor.c:214
-msgid "error occurred while waiting for data on socket"
-msgstr "ocorreu um erro ao esperar pelos dados da conexão"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
+msgid "System policy prevents enabling or disabling system networking"
+msgstr ""
+"Políticas de sistema previnem habilitação ou desabilitação do sistema de "
+"redes"
-#: ../src/nm-netlink-monitor.c:254
-#, c-format
-msgid "unable to connect to netlink for monitoring link status: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
+msgid ""
+"Put NetworkManager to sleep or wake it up (should only be used by system "
+"power management)"
msgstr ""
-"não foi possível conectar ao netlink para monitoração de status do link: %s"
+"Põe o NetworkManager para dormir ou acordar (deve ser usado somente pelo "
+"sistema de gerenciamento de energia"
-#: ../src/nm-netlink-monitor.c:265
-#, c-format
-msgid "unable to enable netlink handle credential passing: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
msgstr ""
-"não foi possível habilitar o manipulador de credencial de passagem do "
-"netlink: %s"
+"Políticas de sistema previnem que se coloque o NetworkManager para dormir ou "
+"acordar"
-#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353
-#, c-format
-msgid "unable to allocate netlink handle for monitoring link status: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
+msgid "Enable or disable WiFi devices"
+msgstr "Habilita ou desabilita dispositivos WiFi"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
+msgid "System policy prevents enabling or disabling WiFi devices"
msgstr ""
-"não foi possível alocar o manipulador do netlink para monitoração de status "
-"do link: %s"
+"Políticas de sistema previnem a habilitação ou desabilitação de dispositivos "
+"WiFi"
-#: ../src/nm-netlink-monitor.c:376
-#, c-format
-msgid "unable to allocate netlink link cache for monitoring link status: %s"
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
+msgid "Enable or disable mobile broadband devices"
+msgstr "Habilita ou desabilita dispositivos móveis de banda larga"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
+msgid "System policy prevents enabling or disabling mobile broadband devices"
msgstr ""
-"não foi possível alocar o cache de link do netlink para monitoração de "
-"status do link: %s"
+"Políticas de sistema previnem a habilitação ou desabilitação de dispositivos "
+"móveis de banda larga"
-#: ../src/nm-netlink-monitor.c:502
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "Habilita ou desabilita dispositivos móveis WiMAX"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
+msgid ""
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgstr ""
+"Políticas de sistema previnem a habilitação ou desabilitação de dispositivos "
+"móveis de banda larga WiMAX"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
+msgid "Allow control of network connections"
+msgstr "Permite o controle de conexões de rede"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
+msgid "System policy prevents control of network connections"
+msgstr "Políticas de sistema previnem o controle de conexões de rede"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Compartilhamento de conexão via rede sem fio protegida"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
+msgid "System policy prevents sharing connections via a protected WiFi network"
+msgstr ""
+"Políticas de sistema previnem compartilhamento de conexões através de uma "
+"rede sem fio protegida"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
+msgid "Connection sharing via an open WiFi network"
+msgstr "Compartilhamento de conexão via rede sem fio aberta"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
+msgid "System policy prevents sharing connections via an open WiFi network"
+msgstr ""
+"Políticas de sistema previnem compartilhamento de conexões através de uma "
+"rede sem fio aberta"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
+msgid "Modify personal network connections"
+msgstr "Modificar conexões pessoais de rede"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
+msgid "System policy prevents modification of personal network settings"
+msgstr ""
+"Políticas de sistema previnem modificação das configurações pessoais de redes"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
+msgid "Modify network connections for all users"
+msgstr "Modificar conexões de rede para todos os usuários"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
+msgid "System policy prevents modification of network settings for all users"
+msgstr ""
+"Políticas de sistema previnem modificação das configurações de rede para "
+"todos os usuários"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
+msgid "Modify persistent system hostname"
+msgstr "Modificar máquina de sistema persistente"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
+msgid "System policy prevents modification of the persistent system hostname"
+msgstr ""
+"Políticas de sistema previnem modificação da máquina persistente do sistema"
+
+#: ../src/main.c:143
#, c-format
-msgid "unable to join netlink group: %s"
-msgstr "não foi possível associar-se ao grupo do netlink: %s"
+msgid "Failed to initialize SIGTERM pipe: %d"
+msgstr "Falha ao inicializar \"pipe\" SIGTERM: %d."
-#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642
+#: ../src/main.c:174
#, c-format
-msgid "error updating link cache: %s"
-msgstr "erro ao atualizar o cache de link: %s"
+msgid "Opening %s failed: %s\n"
+msgstr "Falha ao abrir %s: %s\n"
+
+#: ../src/main.c:180
+#, c-format
+msgid "Writing to %s failed: %s\n"
+msgstr "Falha ao escrever para %s: %s\n"
+
+#: ../src/main.c:185
+#, c-format
+msgid "Closing %s failed: %s\n"
+msgstr "Falha ao fechar %s: %s\n"
+
+#: ../src/main.c:228
+#, c-format
+msgid "NetworkManager is already running (pid %ld)\n"
+msgstr "O NetworkManager já está em execução (pid %ld)\n"
+
+#: ../src/main.c:365
+msgid "Print NetworkManager version and exit"
+msgstr "Imprime a versão do NetworkManager e sai"
+
+#: ../src/main.c:366
+msgid "Don't become a daemon"
+msgstr "Não se tornar um daemon"
+
+#: ../src/main.c:367
+msgid "Make all warnings fatal"
+msgstr "Tornar todos os avisos fatais"
+
+#: ../src/main.c:368
+msgid "Specify the location of a PID file"
+msgstr "Especificar a localização de um arquivo PID"
+
+#: ../src/main.c:368
+msgid "filename"
+msgstr "nomedoarquivo"
+
+#: ../src/main.c:369
+msgid "State file location"
+msgstr "Localização do arquivo de estado"
+
+#: ../src/main.c:369
+msgid "/path/to/state.file"
+msgstr "/caminho/para/arquivo.de.estado"
+
+#: ../src/main.c:370
+msgid "Config file location"
+msgstr "Localização do arquivo de configuração"
+
+#: ../src/main.c:370
+msgid "/path/to/config.file"
+msgstr "/caminho/para/arquivo.de.configuração"
+
+#: ../src/main.c:371
+msgid "List of plugins separated by ','"
+msgstr "Lista de plug-ins separada por \",\""
-#: ../src/main.c:502
+#: ../src/main.c:371
+msgid "plugin1,plugin2"
+msgstr "plug-in1,plug-in2"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:373
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgstr "Nível de Log: um dos [ERR, WARN, INFO, DEBUG]"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:376
+msgid ""
+"Log domains separated by ',': any combination of\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+msgstr ""
+"Domínios de Log separados por \",\": qualquer combinação de\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+
+#: ../src/main.c:386
+#, c-format
+msgid "GModules are not supported on your platform!\n"
+msgstr "Não há suporte para GModules em sua plataforma!\n"
+
+#: ../src/main.c:405
+msgid ""
+"NetworkManager monitors all network connections and automatically\n"
+"chooses the best connection to use. It also allows the user to\n"
+"specify wireless access points which wireless cards in the computer\n"
+"should associate with."
+msgstr ""
+"O NetworkManager monitora todas as conexões de rede e automaticamente\n"
+"escolhe a melhor conexão para uso. Ele também permite que o usuário\n"
+"especifique pontos de acesso sem fio os quais cartões sem fio no\n"
+"computador podem ser associados."
+
+#: ../src/main.c:411
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr ""
"Opção inválida. Por favor, use --help para ver uma lista de opções válidas.\n"
-#: ../src/main.c:562
+#: ../src/main.c:421
+#, c-format
+msgid "You must be root to run NetworkManager!\n"
+msgstr "Você precisa ser superusuário para executar o NetworkManager!\n"
+
+#: ../src/main.c:441
+#, c-format
+msgid "Failed to read configuration: (%d) %s\n"
+msgstr "Falha ao ler configuração: (%d) %s\n"
+
+#: ../src/main.c:452
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. Por favor, use --help para ver uma lista de opções válidas.\n"
-#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325
+#: ../src/main.c:459
+#, c-format
+msgid "State file %s parsing failed: (%d) %s\n"
+msgstr "Falha ao analisar o arquivo de estado %s: (%d) %s\n"
+
+#: ../src/main.c:476
+#, c-format
+msgid "Could not daemonize: %s [error %u]\n"
+msgstr "Não pode ser daemonizado: %s [erro %u]\n"
+
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
msgstr "# Criado pelo NetworkManager\n"
-#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69
#, c-format
msgid ""
"# Merged from %s\n"
@@ -1284,85 +2413,338 @@ msgstr ""
"# Mesclado de %s\n"
"\n"
-#: ../src/dhcp-manager/nm-dhcp-manager.c:279
+#: ../src/dhcp-manager/nm-dhcp-manager.c:266
msgid "no usable DHCP client could be found."
msgstr "nenhum cliente DHCP utilizável pôde ser encontrado."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:288
+#: ../src/dhcp-manager/nm-dhcp-manager.c:275
msgid "'dhclient' could be found."
msgstr "\"dhclient\" não pôde ser encontrado."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:298
+#: ../src/dhcp-manager/nm-dhcp-manager.c:285
msgid "'dhcpcd' could be found."
msgstr "\"dhcpd\" não pôde ser encontrado."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:306
+#: ../src/dhcp-manager/nm-dhcp-manager.c:293
#, c-format
msgid "unsupported DHCP client '%s'"
msgstr "cliente DHCP \"%s\" não suportado"
-#: ../src/logging/nm-logging.c:146
+#: ../src/dns-manager/nm-dns-manager.c:376
+msgid "NOTE: the libc resolver may not support more than 3 nameservers."
+msgstr ""
+"NOTA: o resolvedor da libc não tem suporte a mais do que 3 servidores de "
+"nomes."
+
+#: ../src/dns-manager/nm-dns-manager.c:378
+msgid "The nameservers listed below may not be recognized."
+msgstr "Os servidores de nomes listados abaixo podem não ser reconhecidos."
+
+#: ../src/logging/nm-logging.c:130
#, c-format
msgid "Unknown log level '%s'"
msgstr "Nível de registro \"%s\" desconhecido"
-#: ../src/logging/nm-logging.c:171
+#: ../src/logging/nm-logging.c:155
#, c-format
msgid "Unknown log domain '%s'"
msgstr "Domínio de registro \"%s\" desconhecido"
-#: ../src/dns-manager/nm-dns-manager.c:343
-msgid "NOTE: the libc resolver may not support more than 3 nameservers."
-msgstr ""
-"NOTA: o resolvedor da libc não tem suporte a mais do que 3 servidores de "
-"nomes."
+#: ../src/modem-manager/nm-modem-cdma.c:279 ../src/nm-device-bt.c:325
+#, c-format
+msgid "CDMA connection %d"
+msgstr "Conexão CDMA %d"
-#: ../src/dns-manager/nm-dns-manager.c:345
-msgid "The nameservers listed below may not be recognized."
-msgstr "Os servidores de nomes listados abaixo podem não ser reconhecidos."
+#: ../src/modem-manager/nm-modem-gsm.c:512 ../src/nm-device-bt.c:321
+#, c-format
+msgid "GSM connection %d"
+msgstr "Conexão GSM %d"
-#: ../src/settings/nm-default-wired-connection.c:157
+#: ../src/nm-device-bond.c:189
#, c-format
-msgid "Auto %s"
-msgstr "Auto %s"
+msgid "Bond connection %d"
+msgstr "Conexão vinculada %d"
-#: ../system-settings/plugins/ifcfg-rh/reader.c:3254
-msgid "System"
-msgstr "Sistema"
+#: ../src/nm-device-bt.c:296
+#, c-format
+msgid "PAN connection %d"
+msgstr "Conexão PAN %d"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1
-msgid "Connection sharing via a protected WiFi network"
-msgstr "Compartilhamento de conexão via rede sem fio protegida"
+#: ../src/nm-device-bt.c:329
+#, c-format
+msgid "DUN connection %d"
+msgstr "Conexão DUN %d"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2
-msgid "Connection sharing via an open WiFi network"
-msgstr "Compartilhamento de conexão via rede sem fio aberta"
+#: ../src/nm-device-ethernet.c:1433
+#, c-format
+msgid "PPPoE connection %d"
+msgstr "Conexão PPPoE %d"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3
-msgid "Modify persistent system hostname"
-msgstr "Modificar máquina de sistema persistente"
+#: ../src/nm-device-ethernet.c:1433 ../src/settings/nm-settings-utils.c:50
+#, c-format
+msgid "Wired connection %d"
+msgstr "Conexão cabeada %d"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4
-msgid "Modify system connections"
-msgstr "Modificar conexões de sistema"
+#: ../src/nm-device-infiniband.c:302
+#, c-format
+msgid "InfiniBand connection %d"
+msgstr "Conexão InfiniBand %d"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5
-msgid "System policy prevents modification of system settings"
-msgstr "Políticas de sistema previnem modificação das configurações do sistema"
+#: ../src/nm-device-olpc-mesh.c:293
+#, c-format
+msgid "Mesh %d"
+msgstr "Malha %d"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6
-msgid "System policy prevents modification of the persistent system hostname"
+#: ../src/nm-manager.c:634
+#, c-format
+msgid "VPN connection %d"
+msgstr "Conexão VPN %d"
+
+#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
+#, c-format
+msgid "error processing netlink message: %s"
+msgstr "erro ao processar mensagem do netlink: %s"
+
+#: ../src/nm-netlink-monitor.c:251
+msgid "error occurred while waiting for data on socket"
+msgstr "ocorreu um erro ao esperar pelos dados da conexão"
+
+#: ../src/nm-netlink-monitor.c:296
+#, c-format
+msgid "unable to connect to netlink for monitoring link status: %s"
msgstr ""
-"Políticas de sistema previnem modificação da máquina persistente do sistema"
+"não foi possível conectar ao netlink para monitoração de status do link: %s"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7
-msgid "System policy prevents sharing connections via a protected WiFi network"
+#: ../src/nm-netlink-monitor.c:307
+#, c-format
+msgid "unable to enable netlink handle credential passing: %s"
msgstr ""
-"Políticas de sistema previnem compartilhamento de conexões através de uma "
-"rede sem fio protegida"
+"não foi possível habilitar o manipulador de credencial de passagem do "
+"netlink: %s"
-#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8
-msgid "System policy prevents sharing connections via an open WiFi network"
+#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390
+#, c-format
+msgid "unable to allocate netlink handle for monitoring link status: %s"
msgstr ""
-"Políticas de sistema previnem compartilhamento de conexões através de uma "
-"rede sem fio aberta"
+"não foi possível alocar o manipulador do netlink para monitoração de status "
+"do link: %s"
+
+#: ../src/nm-netlink-monitor.c:415
+#, c-format
+msgid "unable to allocate netlink link cache for monitoring link status: %s"
+msgstr ""
+"não foi possível alocar o cache de link do netlink para monitoração de "
+"status do link: %s"
+
+#: ../src/nm-netlink-monitor.c:542
+#, c-format
+msgid "unable to join netlink group: %s"
+msgstr "não foi possível associar-se ao grupo do netlink: %s"
+
+#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684
+#, c-format
+msgid "error updating link cache: %s"
+msgstr "erro ao atualizar o cache de link: %s"
+
+#: ../src/settings/plugins/ifcfg-rh/reader.c:92
+#: ../src/settings/plugins/ifnet/connection_parser.c:51
+msgid "System"
+msgstr "Sistema"
+
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3652
+msgid "Bond"
+msgstr "Vínculo"
+
+#~ msgid "Type"
+#~ msgstr "Tipo"
+
+#~ msgid "Name"
+#~ msgstr "Nome"
+
+#~ msgid "System connections:\n"
+#~ msgstr "Conexões de sistema:\n"
+
+#~ msgid "User connections:\n"
+#~ msgstr "Conexões de usuário:\n"
+
+#~ msgid "System-wide connections"
+#~ msgstr "Conexões de sistema"
+
+#~ msgid "User connections"
+#~ msgstr "Conexões de usuário"
+
+#~ msgid "Default"
+#~ msgstr "Padrão"
+
+#~ msgid "Service"
+#~ msgstr "Serviço"
+
+#~ msgid "Error: Obtaining active connection for '%s' failed."
+#~ msgstr "Erro: falha na obtenção da conexão ativa para \"%s\"."
+
+#~ msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d"
+#~ msgstr "%s, %s, Freq %d MHz, Taxa %d Mb/s, Força %d"
+
+#~ msgid "Device"
+#~ msgstr "Dispositivo"
+
+#~ msgid "Driver"
+#~ msgstr "Controlador"
+
+#~ msgid "State"
+#~ msgstr "Estado"
+
+#~ msgid "HW Address"
+#~ msgstr "Endereço de HW"
+
+#~ msgid ""
+#~ "\n"
+#~ " Capabilities:\n"
+#~ msgstr ""
+#~ "\n"
+#~ " Capacidades:\n"
+
+#~ msgid "Carrier Detect"
+#~ msgstr "Detecção de Operadora"
+
+#~ msgid "Speed"
+#~ msgstr "Velocidade"
+
+#~ msgid ""
+#~ "\n"
+#~ " Wireless Properties\n"
+#~ msgstr ""
+#~ "\n"
+#~ " Propriedades de rede sem fio\n"
+
+#~ msgid "WEP Encryption"
+#~ msgstr "Criptografia WEP"
+
+#~ msgid "WPA Encryption"
+#~ msgstr "Criptografia WPA"
+
+#~ msgid "WPA2 Encryption"
+#~ msgstr "Criptografia WPA2"
+
+#~ msgid "TKIP cipher"
+#~ msgstr "Cifrador TKIP"
+
+#~ msgid "CCMP cipher"
+#~ msgstr "Cifrador CCMP"
+
+#~ msgid ""
+#~ "\n"
+#~ " Wireless Access Points %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ " Pontos de acesso sem fio %s\n"
+
+#~ msgid "(* = current AP)"
+#~ msgstr "(* = PA atual)"
+
+#~ msgid ""
+#~ "\n"
+#~ " Wired Properties\n"
+#~ msgstr ""
+#~ "\n"
+#~ " Propriedades de rede com fio\n"
+
+#~ msgid "Carrier"
+#~ msgstr "Operadora"
+
+#~ msgid ""
+#~ "\n"
+#~ " IPv4 Settings:\n"
+#~ msgstr ""
+#~ "\n"
+#~ " Configurações IPv4\n"
+
+#~ msgid "Address"
+#~ msgstr "Endereço"
+
+#~ msgid "Prefix"
+#~ msgstr "Prefixo"
+
+#~ msgid "Gateway"
+#~ msgstr "Gateway"
+
+#~ msgid "Device:"
+#~ msgstr "Dispositivo:"
+
+#~ msgid "Error: hwaddr has to be specified."
+#~ msgstr "Erro: hwaddr tem que ser especificado."
+
+#~ msgid "Frequency:"
+#~ msgstr "Frequência:"
+
+#~ msgid "Mode:"
+#~ msgstr "Modo:"
+
+#~ msgid "Ad-hoc"
+#~ msgstr "Ad-hoc"
+
+#~ msgid "Maximal bitrate:"
+#~ msgstr "Bitrate máxima:"
+
+#~ msgid "Strength:"
+#~ msgstr "Potência:"
+
+#~ msgid "Flags:"
+#~ msgstr "Flags:"
+
+#~ msgid "privacy"
+#~ msgstr "privacidade"
+
+#~ msgid "WPA flags:"
+#~ msgstr "Flags WPA:"
+
+#~ msgid "RSN flags:"
+#~ msgstr "Flags RSN:"
+
+#~ msgid "NM running:"
+#~ msgstr "NM rodando:"
+
+#~ msgid "NM state:"
+#~ msgstr "Estado do NM:"
+
+#~ msgid "NM wireless hardware:"
+#~ msgstr "Hardware sem fio do NM:"
+
+#~ msgid "NM wireless:"
+#~ msgstr "NM sem fio:"
+
+#~ msgid "NM WWAN hardware:"
+#~ msgstr "Hardware NM WWAN:"
+
+#~ msgid ""
+#~ "Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
+#~ "\n"
+#~ "OPTIONS\n"
+#~ " -t[erse] terse output\n"
+#~ " -p[retty] pretty output\n"
+#~ " -v[ersion] show program version\n"
+#~ " -h[elp] print this help\n"
+#~ "\n"
+#~ "OBJECT\n"
+#~ " nm NetworkManager status\n"
+#~ " con NetworkManager connections\n"
+#~ " dev devices managed by NetworkManager\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Uso: %s [OPÇÕES] OBJETO { COMANDO | help }\n"
+#~ "\n"
+#~ "OPÇÕES\n"
+#~ " -t[erse] saída concisa\n"
+#~ " -p[retty] saída elegante\n"
+#~ " -v[ersion] mostra a versão do programa\n"
+#~ " -h[elp] imprime esta ajuda\n"
+#~ "\n"
+#~ "OBJETO\n"
+#~ " nm Status do NetworkManager\n"
+#~ " con Conexões do NetworkManager\n"
+#~ " dev Dispositivos gerenciados pelo NetworkManager\n"
+#~ "\n"
+
+#~ msgid "Auto %s"
+#~ msgstr "Auto %s"
diff --git a/po/sl.po b/po/sl.po
index 40b2741df..3a14c1799 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: NetworkManager master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2011-08-20 15:25+0000\n"
-"PO-Revision-Date: 2011-09-21 09:12+0100\n"
+"POT-Creation-Date: 2012-02-22 15:25+0000\n"
+"PO-Revision-Date: 2012-02-22 20:38+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"MIME-Version: 1.0\n"
@@ -24,527 +24,681 @@ msgstr ""
"X-Poedit-Language: Slovenian\n"
"X-Poedit-SourceCharset: utf-8\n"
-#: ../cli/src/connections.c:64
-#: ../cli/src/connections.c:78
-#: ../cli/src/devices.c:101
-#: ../cli/src/devices.c:114
-#: ../cli/src/devices.c:124
-#: ../cli/src/devices.c:134
-#: ../cli/src/devices.c:148
-#: ../cli/src/devices.c:162
-#: ../cli/src/devices.c:173
-#: ../cli/src/devices.c:184
-#: ../cli/src/devices.c:193
-#: ../cli/src/devices.c:202
-#: ../cli/src/devices.c:224
-msgid "NAME"
-msgstr "IME"
+#: ../cli/src/common.c:32
+#: ../cli/src/common.c:44
+#: ../cli/src/common.c:52
+#: ../cli/src/common.c:63
+#: ../cli/src/connections.c:119
+#: ../cli/src/connections.c:153
+msgid "GROUP"
+msgstr "SKUPINA"
#. 0
-#: ../cli/src/connections.c:65
-#: ../cli/src/connections.c:79
-msgid "UUID"
-msgstr "UUID"
+#: ../cli/src/common.c:33
+#: ../cli/src/common.c:53
+msgid "ADDRESS"
+msgstr "NASLOV"
#. 1
-#: ../cli/src/connections.c:66
-msgid "DEVICES"
-msgstr "NAPRAVE"
+#: ../cli/src/common.c:34
+#: ../cli/src/common.c:54
+msgid "ROUTE"
+msgstr "POT POVEZAVE"
#. 2
-#: ../cli/src/connections.c:67
-msgid "DEFAULT"
-msgstr "PRIVZETO"
+#: ../cli/src/common.c:35
+#: ../cli/src/common.c:55
+msgid "DNS"
+msgstr "DNS"
#. 3
-#: ../cli/src/connections.c:68
-msgid "SPEC-OBJECT"
-msgstr "SPEC-PREDMET"
+#: ../cli/src/common.c:36
+#: ../cli/src/common.c:56
+msgid "DOMAIN"
+msgstr "DOMENA"
#. 4
-#: ../cli/src/connections.c:69
-msgid "VPN"
-msgstr "VPN"
+#: ../cli/src/common.c:37
+msgid "WINS"
+msgstr "WINS"
-#. 5
-#. 6
-#. 2
-#. 11
-#. 5
-#: ../cli/src/connections.c:70
-#: ../cli/src/connections.c:85
-#: ../cli/src/devices.c:69
-#: ../cli/src/devices.c:214
-#: ../cli/src/devices.c:230
-msgid "DBUS-PATH"
-msgstr "DBUS-POT"
+#. 0
+#: ../cli/src/common.c:45
+#: ../cli/src/common.c:64
+msgid "OPTION"
+msgstr "MOŽNOST"
+
+#. 0
+#. used only for 'GENERAL' group listing
+#: ../cli/src/connections.c:56
+#: ../cli/src/connections.c:120
+#: ../cli/src/devices.c:100
+#: ../cli/src/devices.c:121
+#: ../cli/src/devices.c:131
+#: ../cli/src/devices.c:141
+#: ../cli/src/devices.c:155
+#: ../cli/src/devices.c:169
+#: ../cli/src/devices.c:191
+msgid "NAME"
+msgstr "IME"
+
+#. 0
+#. 1
+#: ../cli/src/connections.c:57
+#: ../cli/src/connections.c:121
+msgid "UUID"
+msgstr "UUID"
#. 1
#. 0
#. 1
#. 2
-#: ../cli/src/connections.c:80
-#: ../cli/src/devices.c:67
-#: ../cli/src/devices.c:103
-#: ../cli/src/devices.c:227
+#: ../cli/src/connections.c:58
+#: ../cli/src/connections.c:154
+#: ../cli/src/devices.c:66
+#: ../cli/src/devices.c:102
+#: ../cli/src/devices.c:194
msgid "TYPE"
msgstr "VRSTA"
#. 2
-#: ../cli/src/connections.c:81
+#: ../cli/src/connections.c:59
msgid "TIMESTAMP"
msgstr "ČASOVNI ŽIG"
#. 3
-#: ../cli/src/connections.c:82
+#: ../cli/src/connections.c:60
msgid "TIMESTAMP-REAL"
msgstr "REAL-ČASOVNI ŽIG"
#. 4
-#: ../cli/src/connections.c:83
+#: ../cli/src/connections.c:61
msgid "AUTOCONNECT"
msgstr "SAMODEJNO POVEŽI"
#. 5
-#: ../cli/src/connections.c:84
+#: ../cli/src/connections.c:62
msgid "READONLY"
msgstr "SAMO ZA BRANJE"
-#: ../cli/src/connections.c:167
+#. 6
+#. 8
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63
+#: ../cli/src/connections.c:128
+#: ../cli/src/devices.c:68
+#: ../cli/src/devices.c:181
+#: ../cli/src/devices.c:197
+msgid "DBUS-PATH"
+msgstr "DBUS-POT"
+
+#. 2
+#: ../cli/src/connections.c:122
+msgid "DEVICES"
+msgstr "NAPRAVE"
+
+#. 3
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:123
+#: ../cli/src/devices.c:67
+#: ../cli/src/devices.c:107
+#: ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "STANJE"
+
+#. 4
+#: ../cli/src/connections.c:124
+msgid "DEFAULT"
+msgstr "PRIVZETO"
+
+#. 5
+#: ../cli/src/connections.c:125
+msgid "DEFAULT6"
+msgstr "PRIVZETO6"
+
+#. 6
+#: ../cli/src/connections.c:126
+msgid "SPEC-OBJECT"
+msgstr "SPEC-PREDMET"
+
+#. 7
+#. 1
+#: ../cli/src/connections.c:127
+#: ../cli/src/connections.c:141
+msgid "VPN"
+msgstr "VPN"
+
+#. 9
+#: ../cli/src/connections.c:129
+msgid "CON-PATH"
+msgstr "POT POVEZAVE"
+
+#. 10
+#: ../cli/src/connections.c:130
+msgid "ZONE"
+msgstr "ČASOVNI PAS"
+
+#. 11
+#: ../cli/src/connections.c:131
+msgid "MASTER-PATH"
+msgstr "GLAVNA POT"
+
+#: ../cli/src/connections.c:139
+#: ../cli/src/devices.c:77
+msgid "GENERAL"
+msgstr "SPLOŠNO"
+
+#. 0
+#: ../cli/src/connections.c:140
+msgid "IP"
+msgstr "IP"
+
+#. 1
+#: ../cli/src/connections.c:155
+msgid "USERNAME"
+msgstr "UPORABNIŠKO IME"
+
+#. 2
+#: ../cli/src/connections.c:156
+msgid "GATEWAY"
+msgstr "PREHOD"
+
+#. 3
+#: ../cli/src/connections.c:157
+msgid "BANNER"
+msgstr "PASICA"
+
+#. 4
+#: ../cli/src/connections.c:158
+msgid "VPN-STATE"
+msgstr "STANJE-VPN"
+
+#. 5
+#: ../cli/src/connections.c:159
+msgid "CFG"
+msgstr "CFG"
+
+#: ../cli/src/connections.c:180
#, c-format
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
" list [id <id> | uuid <id>]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [nsp <name>] [--nowait] [--timeout <timeout>]\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout <timeout>]\n"
+" status [id <id> | uuid <id> | path <path>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout <timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
msgstr ""
"Uporaba: nmcli con { UKAZ | help }\n"
-" UKAZ := { list | status | up | down }\n"
+" UKAZ := { list | status | up | down | delete }\n"
"\n"
-" list [id <id> | uuid <id> | system | user]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <vmesnik>] [ap <strojni-naslov>] [nsp <ime>] [--nowait] [--timeout <zakasnitev>]\n"
-" up id <id> | uuid <id> [iface <vmesnik>] [ap <strojni-naslov>] [--nowait] [--timeout <zakasnitev>]\n"
+" list [id <id> | uuid <id>]\n"
+" status [id <id> | uuid <id> | path <pot>]\n"
+" up id <id> | uuid <id> [iface <vmesnik>] [ap <BSSID>] [nsp <ime>] [--nowait] [--timeout <zakasnitev>]\n"
+" up id <id> | uuid <id> [iface <vmesnik>] [ap <BSSID>] [--nowait] [--timeout <zakasnitev>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
-#: ../cli/src/connections.c:220
-#: ../cli/src/connections.c:544
+#: ../cli/src/connections.c:234
+#: ../cli/src/connections.c:567
#, c-format
msgid "Error: 'con list': %s"
msgstr "Napaka: 'con list': %s"
-#: ../cli/src/connections.c:222
-#: ../cli/src/connections.c:546
+#: ../cli/src/connections.c:236
+#: ../cli/src/connections.c:569
#, c-format
msgid "Error: 'con list': %s; allowed fields: %s"
msgstr "Napaka: 'con list': %s; dovoljena so polja: %s"
-#: ../cli/src/connections.c:230
+#: ../cli/src/connections.c:244
msgid "Connection details"
msgstr "Podatki o povezavi"
-#: ../cli/src/connections.c:419
+#: ../cli/src/connections.c:442
msgid "never"
msgstr "nikoli"
#. "CAPABILITIES"
#. Print header
#. "WIFI-PROPERTIES"
-#: ../cli/src/connections.c:420
-#: ../cli/src/connections.c:421
-#: ../cli/src/connections.c:599
-#: ../cli/src/connections.c:601
-#: ../cli/src/devices.c:509
-#: ../cli/src/devices.c:562
-#: ../cli/src/devices.c:687
-#: ../cli/src/devices.c:713
-#: ../cli/src/devices.c:714
-#: ../cli/src/devices.c:715
-#: ../cli/src/devices.c:716
-#: ../cli/src/devices.c:717
-#: ../cli/src/settings.c:520
-#: ../cli/src/settings.c:563
-#: ../cli/src/settings.c:663
-#: ../cli/src/settings.c:937
-#: ../cli/src/settings.c:938
-#: ../cli/src/settings.c:940
-#: ../cli/src/settings.c:942
-#: ../cli/src/settings.c:1067
-#: ../cli/src/settings.c:1068
-#: ../cli/src/settings.c:1069
-#: ../cli/src/settings.c:1148
-#: ../cli/src/settings.c:1149
-#: ../cli/src/settings.c:1150
-#: ../cli/src/settings.c:1151
-#: ../cli/src/settings.c:1152
-#: ../cli/src/settings.c:1153
-#: ../cli/src/settings.c:1154
-#: ../cli/src/settings.c:1155
-#: ../cli/src/settings.c:1156
-#: ../cli/src/settings.c:1157
-#: ../cli/src/settings.c:1158
-#: ../cli/src/settings.c:1159
-#: ../cli/src/settings.c:1160
-#: ../cli/src/settings.c:1235
+#: ../cli/src/connections.c:443
+#: ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681
+#: ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684
+#: ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639
+#: ../cli/src/devices.c:750
+#: ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783
+#: ../cli/src/devices.c:809
+#: ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811
+#: ../cli/src/devices.c:812
+#: ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576
+#: ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185
+#: ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
msgid "yes"
msgstr "da"
-#: ../cli/src/connections.c:420
-#: ../cli/src/connections.c:421
-#: ../cli/src/connections.c:599
-#: ../cli/src/connections.c:601
-#: ../cli/src/devices.c:509
-#: ../cli/src/devices.c:562
-#: ../cli/src/devices.c:687
-#: ../cli/src/devices.c:713
-#: ../cli/src/devices.c:714
-#: ../cli/src/devices.c:715
-#: ../cli/src/devices.c:716
-#: ../cli/src/devices.c:717
-#: ../cli/src/settings.c:520
-#: ../cli/src/settings.c:522
-#: ../cli/src/settings.c:563
-#: ../cli/src/settings.c:663
-#: ../cli/src/settings.c:937
-#: ../cli/src/settings.c:938
-#: ../cli/src/settings.c:940
-#: ../cli/src/settings.c:942
-#: ../cli/src/settings.c:1067
-#: ../cli/src/settings.c:1068
-#: ../cli/src/settings.c:1069
-#: ../cli/src/settings.c:1148
-#: ../cli/src/settings.c:1149
-#: ../cli/src/settings.c:1150
-#: ../cli/src/settings.c:1151
-#: ../cli/src/settings.c:1152
-#: ../cli/src/settings.c:1153
-#: ../cli/src/settings.c:1154
-#: ../cli/src/settings.c:1155
-#: ../cli/src/settings.c:1156
-#: ../cli/src/settings.c:1157
-#: ../cli/src/settings.c:1158
-#: ../cli/src/settings.c:1159
-#: ../cli/src/settings.c:1160
-#: ../cli/src/settings.c:1235
+#: ../cli/src/connections.c:443
+#: ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681
+#: ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684
+#: ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639
+#: ../cli/src/devices.c:750
+#: ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783
+#: ../cli/src/devices.c:809
+#: ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811
+#: ../cli/src/devices.c:812
+#: ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576
+#: ../cli/src/settings.c:578
+#: ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185
+#: ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
msgid "no"
msgstr "ne"
-#: ../cli/src/connections.c:495
+#: ../cli/src/connections.c:518
msgid "Connection list"
msgstr "Seznam povezav"
-#: ../cli/src/connections.c:508
-#: ../cli/src/connections.c:1368
-#: ../cli/src/connections.c:1383
-#: ../cli/src/connections.c:1392
-#: ../cli/src/connections.c:1402
-#: ../cli/src/connections.c:1414
-#: ../cli/src/connections.c:1509
+#: ../cli/src/connections.c:531
+#: ../cli/src/connections.c:1064
+#: ../cli/src/connections.c:1808
+#: ../cli/src/connections.c:1823
+#: ../cli/src/connections.c:1832
+#: ../cli/src/connections.c:1842
+#: ../cli/src/connections.c:1854
+#: ../cli/src/connections.c:1949
+#: ../cli/src/connections.c:2051
#: ../cli/src/devices.c:1190
#: ../cli/src/devices.c:1200
#: ../cli/src/devices.c:1314
-#: ../cli/src/devices.c:1321
-#: ../cli/src/devices.c:1534
-#: ../cli/src/devices.c:1541
+#: ../cli/src/devices.c:1322
+#: ../cli/src/devices.c:1535
+#: ../cli/src/devices.c:1542
#, c-format
msgid "Error: %s argument is missing."
msgstr "Napaka: manjka argument %s."
-#: ../cli/src/connections.c:521
+#: ../cli/src/connections.c:544
#, c-format
msgid "Error: %s - no such connection."
msgstr "Napaka: %s - povezava ne obstaja."
-#: ../cli/src/connections.c:527
-#: ../cli/src/connections.c:1427
-#: ../cli/src/connections.c:1526
+#: ../cli/src/connections.c:550
+#: ../cli/src/connections.c:1867
+#: ../cli/src/connections.c:1966
+#: ../cli/src/connections.c:2058
#: ../cli/src/devices.c:987
#: ../cli/src/devices.c:1067
#: ../cli/src/devices.c:1214
-#: ../cli/src/devices.c:1327
-#: ../cli/src/devices.c:1547
+#: ../cli/src/devices.c:1328
+#: ../cli/src/devices.c:1548
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "Neznan parameter: %s\n"
-#: ../cli/src/connections.c:536
+#: ../cli/src/connections.c:559
#, c-format
msgid "Error: no valid parameter specified."
msgstr "Napaka: ni podanega veljavnega parametra."
-#: ../cli/src/connections.c:551
-#: ../cli/src/connections.c:1617
-#: ../cli/src/devices.c:1755
-#: ../cli/src/network-manager.c:463
+#: ../cli/src/connections.c:574
+#: ../cli/src/connections.c:2151
+#: ../cli/src/devices.c:1756
+#: ../cli/src/network-manager.c:456
#, c-format
msgid "Error: %s."
msgstr "Napaka: %s."
-#: ../cli/src/connections.c:639
+#: ../cli/src/connections.c:587
+msgid "activating"
+msgstr "začenjanje"
+
+#: ../cli/src/connections.c:589
+msgid "activated"
+msgstr "začeto"
+
+#: ../cli/src/connections.c:591
+#: ../cli/src/devices.c:261
+msgid "deactivating"
+msgstr "onemogočanje"
+
+#: ../cli/src/connections.c:594
+#: ../cli/src/connections.c:617
+#: ../cli/src/connections.c:1680
+#: ../cli/src/devices.c:265
+#: ../cli/src/devices.c:784
+#: ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173
+#: ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185
+#: ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346
+#: ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423
+#: ../cli/src/settings.c:531
+#: ../cli/src/utils.c:499
+#: ../src/main.c:450
+#: ../src/main.c:469
+msgid "unknown"
+msgstr "neznano"
+
+#: ../cli/src/connections.c:603
+msgid "VPN connecting (prepare)"
+msgstr "VPN povezovanje (priprava)"
+
+#: ../cli/src/connections.c:605
+msgid "VPN connecting (need authentication)"
+msgstr "VPN povezovanje (zahtevana je overitev)"
+
+#: ../cli/src/connections.c:607
+msgid "VPN connecting"
+msgstr "VPN povezovanje"
+
+#: ../cli/src/connections.c:609
+msgid "VPN connecting (getting IP configuration)"
+msgstr "VPN povezovanje (pridobivanje nastavitev IP)"
+
+#: ../cli/src/connections.c:611
+msgid "VPN connected"
+msgstr "Povezan v VPN"
+
+#: ../cli/src/connections.c:613
+msgid "VPN connection failed"
+msgstr "Povezava z VPN je spodletela"
+
+#: ../cli/src/connections.c:615
+msgid "VPN disconnected"
+msgstr "Povezava z VPN je prekinjena"
+
+#: ../cli/src/connections.c:868
+#: ../cli/src/connections.c:1092
#, c-format
msgid "Error: 'con status': %s"
msgstr "Napaka: 'con status': %s"
-#: ../cli/src/connections.c:641
+#: ../cli/src/connections.c:870
+#: ../cli/src/connections.c:1094
#, c-format
msgid "Error: 'con status': %s; allowed fields: %s"
msgstr "Napaka: 'con status': %s; dovoljena polja: %s"
-#: ../cli/src/connections.c:649
-#: ../cli/src/connections.c:1442
-#: ../cli/src/connections.c:1541
+#: ../cli/src/connections.c:878
+msgid "Active connection details"
+msgstr "Podrobnosti dejavne povezave"
+
+#: ../cli/src/connections.c:1014
+#: ../cli/src/connections.c:1882
+#: ../cli/src/connections.c:1981
+#: ../cli/src/connections.c:2072
#: ../cli/src/devices.c:1014
#: ../cli/src/devices.c:1076
#: ../cli/src/devices.c:1229
-#: ../cli/src/devices.c:1357
-#: ../cli/src/devices.c:1576
+#: ../cli/src/devices.c:1358
+#: ../cli/src/devices.c:1577
#, c-format
msgid "Error: Can't find out if NetworkManager is running: %s."
msgstr "Napaka: ni mogoče ugotoviti, ali se program NetworkManager izvaja: %s."
-#: ../cli/src/connections.c:653
-#: ../cli/src/connections.c:1446
-#: ../cli/src/connections.c:1545
+#: ../cli/src/connections.c:1018
+#: ../cli/src/connections.c:1886
+#: ../cli/src/connections.c:1985
+#: ../cli/src/connections.c:2076
#: ../cli/src/devices.c:1018
#: ../cli/src/devices.c:1080
#: ../cli/src/devices.c:1233
-#: ../cli/src/devices.c:1361
-#: ../cli/src/devices.c:1580
+#: ../cli/src/devices.c:1362
+#: ../cli/src/devices.c:1581
#, c-format
msgid "Error: NetworkManager is not running."
msgstr "Napaka: program NetworkManager ni zagnan."
-#: ../cli/src/connections.c:661
+#: ../cli/src/connections.c:1050
msgid "Active connections"
msgstr "Dejavne povezave"
-#: ../cli/src/connections.c:1085
+#: ../cli/src/connections.c:1075
+#, c-format
+msgid "Error: '%s' is not an active connection."
+msgstr "Napaka: '%s' ni dejavna povezava."
+
+#: ../cli/src/connections.c:1080
+#, c-format
+msgid "Error: unknown parameter: %s"
+msgstr "Napaka: neznan parameter: %s"
+
+#: ../cli/src/connections.c:1564
#, c-format
msgid "no active connection on device '%s'"
msgstr "ni dejavnih povezav na napravi '%s'"
-#: ../cli/src/connections.c:1093
+#: ../cli/src/connections.c:1572
#, c-format
msgid "no active connection or device"
msgstr "ni dejavne povezave ali naprave"
-#: ../cli/src/connections.c:1164
+#: ../cli/src/connections.c:1643
#, c-format
msgid "device '%s' not compatible with connection '%s'"
msgstr "naprava '%s' ni združljiva s povezavo '%s'"
-#: ../cli/src/connections.c:1166
+#: ../cli/src/connections.c:1645
#, c-format
msgid "no device found for connection '%s'"
msgstr "ni naprave za povezavo '%s'"
-#: ../cli/src/connections.c:1177
-msgid "activating"
-msgstr "začenjanje"
-
-#: ../cli/src/connections.c:1179
-msgid "activated"
-msgstr "začeto"
-
-#: ../cli/src/connections.c:1181
-#: ../cli/src/devices.c:304
-msgid "deactivating"
-msgstr "onemogočanje"
-
-#: ../cli/src/connections.c:1184
-#: ../cli/src/connections.c:1207
-#: ../cli/src/connections.c:1240
-#: ../cli/src/devices.c:308
-#: ../cli/src/devices.c:688
-#: ../cli/src/network-manager.c:118
-#: ../cli/src/network-manager.c:180
-#: ../cli/src/network-manager.c:183
-#: ../cli/src/network-manager.c:192
-#: ../cli/src/network-manager.c:298
-#: ../cli/src/network-manager.c:353
-#: ../cli/src/network-manager.c:391
-#: ../cli/src/network-manager.c:430
-#: ../cli/src/settings.c:485
-#: ../cli/src/utils.c:396
-msgid "unknown"
-msgstr "neznano"
-
-#: ../cli/src/connections.c:1193
-msgid "VPN connecting (prepare)"
-msgstr "VPN povezovanje (priprava)"
-
-#: ../cli/src/connections.c:1195
-msgid "VPN connecting (need authentication)"
-msgstr "VPN povezovanje (zahtevana je overitev)"
-
-#: ../cli/src/connections.c:1197
-msgid "VPN connecting"
-msgstr "VPN povezovanje"
-
-#: ../cli/src/connections.c:1199
-msgid "VPN connecting (getting IP configuration)"
-msgstr "VPN povezovanje (pridobivanje nastavitev IP)"
-
-#: ../cli/src/connections.c:1201
-msgid "VPN connected"
-msgstr "Povezan v VPN"
-
-#: ../cli/src/connections.c:1203
-msgid "VPN connection failed"
-msgstr "Povezava z VPN je spodletela"
-
-#: ../cli/src/connections.c:1205
-msgid "VPN disconnected"
-msgstr "Povezava z VPN je prekinjena"
-
-#: ../cli/src/connections.c:1216
+#: ../cli/src/connections.c:1656
msgid "unknown reason"
msgstr "neznan vzrok"
-#: ../cli/src/connections.c:1218
+#: ../cli/src/connections.c:1658
msgid "none"
msgstr "brez"
-#: ../cli/src/connections.c:1220
+#: ../cli/src/connections.c:1660
msgid "the user was disconnected"
msgstr "povezava z uporabnikom je prekinjena"
-#: ../cli/src/connections.c:1222
+#: ../cli/src/connections.c:1662
msgid "the base network connection was interrupted"
msgstr "osnovna omrežna povezava je bila prekinjena"
-#: ../cli/src/connections.c:1224
+#: ../cli/src/connections.c:1664
msgid "the VPN service stopped unexpectedly"
msgstr "storitev VPN je nepričakovano zaustavljena"
-#: ../cli/src/connections.c:1226
+#: ../cli/src/connections.c:1666
msgid "the VPN service returned invalid configuration"
msgstr "storitev VPN je vrnila neveljavne nastavitve"
-#: ../cli/src/connections.c:1228
+#: ../cli/src/connections.c:1668
msgid "the connection attempt timed out"
msgstr "poskus povezave je časovno potekel"
-#: ../cli/src/connections.c:1230
+#: ../cli/src/connections.c:1670
msgid "the VPN service did not start in time"
msgstr "storitev VPN se ni pravočasno začela"
-#: ../cli/src/connections.c:1232
+#: ../cli/src/connections.c:1672
msgid "the VPN service failed to start"
msgstr "storitev VPN ni uspešno začeta"
-#: ../cli/src/connections.c:1234
+#: ../cli/src/connections.c:1674
msgid "no valid VPN secrets"
msgstr "ni veljavnih VPN skrivnosti"
-#: ../cli/src/connections.c:1236
+#: ../cli/src/connections.c:1676
msgid "invalid VPN secrets"
msgstr "neveljavne VPN skrivnosti"
-#: ../cli/src/connections.c:1238
+#: ../cli/src/connections.c:1678
msgid "the connection was removed"
msgstr "povezava je odstranjena"
-#: ../cli/src/connections.c:1252
+#: ../cli/src/connections.c:1692
#, c-format
msgid "state: %s\n"
msgstr "stanje: %s\n"
-#: ../cli/src/connections.c:1255
-#: ../cli/src/connections.c:1281
+#: ../cli/src/connections.c:1695
+#: ../cli/src/connections.c:1721
#, c-format
msgid "Connection activated\n"
msgstr "Povezava je omogočena\n"
-#: ../cli/src/connections.c:1258
+#: ../cli/src/connections.c:1698
#, c-format
msgid "Error: Connection activation failed."
msgstr "Napaka: začenjanje povezave ni uspelo."
-#: ../cli/src/connections.c:1277
+#: ../cli/src/connections.c:1717
#, c-format
msgid "state: %s (%d)\n"
msgstr "stanje: %s (%d)\n"
-#: ../cli/src/connections.c:1287
+#: ../cli/src/connections.c:1727
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "Napaka: začenjanje povezave ni uspelo: %s."
-#: ../cli/src/connections.c:1304
+#: ../cli/src/connections.c:1744
#: ../cli/src/devices.c:1136
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "Napaka: časovna omejitev %d sekund je potekla."
-#: ../cli/src/connections.c:1317
+#: ../cli/src/connections.c:1757
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "Napaka: začenjanje povezave ni uspelo: %s."
-#: ../cli/src/connections.c:1323
+#: ../cli/src/connections.c:1763
#, c-format
msgid "Active connection state: %s\n"
msgstr "Stanje dejavne povezave: %s\n"
-#: ../cli/src/connections.c:1324
+#: ../cli/src/connections.c:1764
#, c-format
msgid "Active connection path: %s\n"
msgstr "Pot dejavne povezave: %s\n"
-#: ../cli/src/connections.c:1376
-#: ../cli/src/connections.c:1517
+#: ../cli/src/connections.c:1816
+#: ../cli/src/connections.c:1957
+#: ../cli/src/connections.c:2085
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "Napaka: neznana povezava: %s."
-#: ../cli/src/connections.c:1422
+#: ../cli/src/connections.c:1862
#: ../cli/src/devices.c:1208
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "Napaka: vrednost časovne omejitve '%s' ni veljavna."
-#: ../cli/src/connections.c:1435
-#: ../cli/src/connections.c:1534
+#: ../cli/src/connections.c:1875
+#: ../cli/src/connections.c:1974
+#: ../cli/src/connections.c:2065
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "Napaka: podatek id ali uuid ni naveden."
-#: ../cli/src/connections.c:1463
+#: ../cli/src/connections.c:1903
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "Napaka: ni mogoče najti ustrezne naprave: %s."
-#: ../cli/src/connections.c:1465
+#: ../cli/src/connections.c:1905
#, c-format
msgid "Error: No suitable device found."
msgstr "Napaka: ni mogoče najti ustrezne naprave."
-#: ../cli/src/connections.c:1570
+#: ../cli/src/connections.c:2010
#, c-format
msgid "Warning: Connection not active\n"
msgstr "Opozorilo: povezava ni dejavna\n"
-#: ../cli/src/connections.c:1608
+#: ../cli/src/connections.c:2024
+#, c-format
+msgid "Error: Connection deletion failed: %s"
+msgstr "Napaka: brisanje povezave ni uspelo: %s"
+
+#: ../cli/src/connections.c:2142
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "Napaka: ukaz 'con' '%s' ni veljaven."
-#: ../cli/src/connections.c:1673
+#: ../cli/src/connections.c:2207
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "Napaka: povezava z D-Bus ni mogoča."
-#: ../cli/src/connections.c:1680
+#: ../cli/src/connections.c:2215
#, c-format
msgid "Error: Could not get system settings."
msgstr "Napaka: ni mogoče pridobiti sistemskih nastavitev."
-#: ../cli/src/connections.c:1690
+#: ../cli/src/connections.c:2225
#, c-format
msgid "Error: Can't obtain connections: settings service is not running."
msgstr "Napaka: ni mogoče pridobiti povezav: storitev nastavitev ni zagnana."
@@ -552,232 +706,235 @@ msgstr "Napaka: ni mogoče pridobiti povezav: storitev nastavitev ni zagnana."
#. 0
#. 9
#. 3
-#: ../cli/src/devices.c:66
-#: ../cli/src/devices.c:102
-#: ../cli/src/devices.c:212
-#: ../cli/src/devices.c:228
+#: ../cli/src/devices.c:65
+#: ../cli/src/devices.c:101
+#: ../cli/src/devices.c:179
+#: ../cli/src/devices.c:195
msgid "DEVICE"
msgstr "NAPRAVA"
-#. 1
-#. 4
-#. 1
-#: ../cli/src/devices.c:68
-#: ../cli/src/devices.c:106
-#: ../cli/src/network-manager.c:39
-msgid "STATE"
-msgstr "STANJE"
-
-#: ../cli/src/devices.c:78
-msgid "GENERAL"
-msgstr "SPLOŠNO"
-
#. 0
-#: ../cli/src/devices.c:79
+#: ../cli/src/devices.c:78
msgid "CAPABILITIES"
msgstr "ZMOŽNOSTI"
#. 1
-#: ../cli/src/devices.c:80
+#: ../cli/src/devices.c:79
msgid "WIFI-PROPERTIES"
msgstr "WIFI-LASTNOSTI"
#. 2
-#: ../cli/src/devices.c:81
+#: ../cli/src/devices.c:80
msgid "AP"
msgstr "AP"
#. 3
-#: ../cli/src/devices.c:82
+#: ../cli/src/devices.c:81
msgid "WIRED-PROPERTIES"
msgstr "LASTNOSTI ŽIČNE POVEZAVE"
#. 4
-#: ../cli/src/devices.c:83
+#: ../cli/src/devices.c:82
msgid "WIMAX-PROPERTIES"
msgstr "WIMAX-LASTNOSTI"
#. 5
#. 0
-#: ../cli/src/devices.c:84
-#: ../cli/src/devices.c:225
+#: ../cli/src/devices.c:83
+#: ../cli/src/devices.c:192
msgid "NSP"
msgstr "NSP"
#. 6
-#: ../cli/src/devices.c:85
-msgid "IP4-SETTINGS"
-msgstr "IP4-NASTAVITVE"
+#: ../cli/src/devices.c:84
+msgid "IP4"
+msgstr "IP4"
#. 7
-#: ../cli/src/devices.c:86
-msgid "IP4-DNS"
-msgstr "IP4-DNS"
+#: ../cli/src/devices.c:85
+msgid "DHCP4"
+msgstr "DHCP4"
#. 8
-#: ../cli/src/devices.c:87
-msgid "IP6-SETTINGS"
-msgstr "IP6-NASTAVITVE"
+#: ../cli/src/devices.c:86
+msgid "IP6"
+msgstr "IP6"
#. 9
-#: ../cli/src/devices.c:88
-msgid "IP6-DNS"
-msgstr "IP6-DNS"
+#: ../cli/src/devices.c:87
+msgid "DHCP6"
+msgstr "DHCP6"
#. 2
+#: ../cli/src/devices.c:103
+msgid "VENDOR"
+msgstr "PONUDNIK"
+
+#. 3
#: ../cli/src/devices.c:104
+msgid "PRODUCT"
+msgstr "IZDELEK"
+
+#. 4
+#: ../cli/src/devices.c:105
msgid "DRIVER"
msgstr "GONILNIK"
-#. 3
-#: ../cli/src/devices.c:105
+#. 5
+#: ../cli/src/devices.c:106
msgid "HWADDR"
msgstr "HWADDR"
+#. 7
+#: ../cli/src/devices.c:108
+msgid "REASON"
+msgstr "RAZLOG"
+
+#. 8
+#: ../cli/src/devices.c:109
+msgid "UDI"
+msgstr "UDI"
+
+#. 9
+#: ../cli/src/devices.c:110
+msgid "IP-IFACE"
+msgstr "IP-VMESNIK"
+
+#. 10
+#: ../cli/src/devices.c:111
+msgid "NM-MANAGED"
+msgstr "NM-UPRAVLJANO"
+
+#. 11
+#: ../cli/src/devices.c:112
+msgid "FIRMWARE-MISSING"
+msgstr "MANJKA STROJNA PROGRAMSKA OPREMA"
+
+#. 12
+#: ../cli/src/devices.c:113
+msgid "CONNECTION"
+msgstr "POVEZAVA"
+
#. 0
-#: ../cli/src/devices.c:115
+#: ../cli/src/devices.c:122
msgid "CARRIER-DETECT"
msgstr "ZAZNAVA-OPERATERJA"
#. 1
-#: ../cli/src/devices.c:116
+#: ../cli/src/devices.c:123
msgid "SPEED"
msgstr "HITROST"
#. 0
-#: ../cli/src/devices.c:125
+#: ../cli/src/devices.c:132
msgid "CARRIER"
msgstr "OPERATER"
#. 0
-#: ../cli/src/devices.c:135
+#: ../cli/src/devices.c:142
msgid "WEP"
msgstr "WEP"
#. 1
-#: ../cli/src/devices.c:136
+#: ../cli/src/devices.c:143
msgid "WPA"
msgstr "WPA"
#. 2
-#: ../cli/src/devices.c:137
+#: ../cli/src/devices.c:144
msgid "WPA2"
msgstr "WPA2"
#. 3
-#: ../cli/src/devices.c:138
+#: ../cli/src/devices.c:145
msgid "TKIP"
msgstr "TKIP"
#. 4
-#: ../cli/src/devices.c:139
+#: ../cli/src/devices.c:146
msgid "CCMP"
msgstr "CCMP"
#. 0
-#: ../cli/src/devices.c:149
+#: ../cli/src/devices.c:156
msgid "CTR-FREQ"
msgstr "CTR-FREQ"
#. 1
-#: ../cli/src/devices.c:150
+#: ../cli/src/devices.c:157
msgid "RSSI"
msgstr "RSSI"
#. 2
-#: ../cli/src/devices.c:151
+#: ../cli/src/devices.c:158
msgid "CINR"
msgstr "CINR"
#. 3
-#: ../cli/src/devices.c:152
+#: ../cli/src/devices.c:159
msgid "TX-POW"
msgstr "TX-POW"
#. 4
-#: ../cli/src/devices.c:153
+#: ../cli/src/devices.c:160
msgid "BSID"
msgstr "BSID"
#. 0
-#: ../cli/src/devices.c:163
-#: ../cli/src/devices.c:174
-msgid "ADDRESS"
-msgstr "NASLOV"
-
-#. 1
-#: ../cli/src/devices.c:164
-#: ../cli/src/devices.c:175
-msgid "PREFIX"
-msgstr "PREDPONA"
-
-#. 2
-#: ../cli/src/devices.c:165
-#: ../cli/src/devices.c:176
-msgid "GATEWAY"
-msgstr "PREHOD"
-
-#. 0
-#: ../cli/src/devices.c:185
-#: ../cli/src/devices.c:194
-msgid "DNS"
-msgstr "DNS"
-
-#. 0
-#: ../cli/src/devices.c:203
+#: ../cli/src/devices.c:170
msgid "SSID"
msgstr "SSID"
#. 1
-#: ../cli/src/devices.c:204
+#: ../cli/src/devices.c:171
msgid "BSSID"
msgstr "BSSID"
#. 2
-#: ../cli/src/devices.c:205
+#: ../cli/src/devices.c:172
msgid "MODE"
msgstr "NAČIN"
#. 3
-#: ../cli/src/devices.c:206
+#: ../cli/src/devices.c:173
msgid "FREQ"
msgstr "FREKVENCA"
#. 4
-#: ../cli/src/devices.c:207
+#: ../cli/src/devices.c:174
msgid "RATE"
msgstr "HITROST"
#. 5
#. 1
-#: ../cli/src/devices.c:208
-#: ../cli/src/devices.c:226
+#: ../cli/src/devices.c:175
+#: ../cli/src/devices.c:193
msgid "SIGNAL"
msgstr "SIGNAL"
#. 6
-#: ../cli/src/devices.c:209
+#: ../cli/src/devices.c:176
msgid "SECURITY"
msgstr "VARNOST"
#. 7
-#: ../cli/src/devices.c:210
+#: ../cli/src/devices.c:177
msgid "WPA-FLAGS"
msgstr "WPA-ZASTAVICE"
#. 8
-#: ../cli/src/devices.c:211
+#: ../cli/src/devices.c:178
msgid "RSN-FLAGS"
msgstr "RSN-ZASTAVICE"
#. 10
#. 4
-#: ../cli/src/devices.c:213
-#: ../cli/src/devices.c:229
+#: ../cli/src/devices.c:180
+#: ../cli/src/devices.c:196
msgid "ACTIVE"
msgstr "DEJAVNO"
-#: ../cli/src/devices.c:256
+#: ../cli/src/devices.c:213
#, c-format
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
@@ -789,171 +946,368 @@ msgid ""
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
msgstr ""
"Uporaba: nmcli dev { UKAZ | help }\n"
"\n"
-"UKAZ := { status | list | disconnect | wifi | wimax }\n"
+" UKAZ := { status | list | disconnect | wifi | wimax }\n"
"\n"
-"UKAZ := { status | list | disconnect | wifi }\n"
+" UKAZ := { status | list | disconnect | wifi }\n"
"\n"
" status\n"
-" list [iface <iface>]\n"
+" list [iface <vmesnik>]\n"
" disconnect iface <vmesnik> [--nowait] [--timeout <zakasnitev>]\n"
-" wifi [list [iface <vmesnik>] [hwaddr <strojna-oprema>]]\n"
+" wifi [list [iface <vmesnik>] [bssid <BSSID>]]\n"
" wimax [list [iface <vmesnik>] [nsp <ime>]]\n"
"\n"
-#: ../cli/src/devices.c:284
+#: ../cli/src/devices.c:241
msgid "unmanaged"
msgstr "neupravljano"
-#: ../cli/src/devices.c:286
+#: ../cli/src/devices.c:243
msgid "unavailable"
msgstr "ni razpoložljivo"
-#: ../cli/src/devices.c:288
-#: ../cli/src/network-manager.c:115
+#: ../cli/src/devices.c:245
+#: ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "povezava je prekinjena"
-#: ../cli/src/devices.c:290
+#: ../cli/src/devices.c:247
msgid "connecting (prepare)"
msgstr "povezovanje (priprava)"
-#: ../cli/src/devices.c:292
+#: ../cli/src/devices.c:249
msgid "connecting (configuring)"
msgstr "povezovanje (nastavljanje)"
-#: ../cli/src/devices.c:294
+#: ../cli/src/devices.c:251
msgid "connecting (need authentication)"
msgstr "povezovanje (zahteva overitev)"
-#: ../cli/src/devices.c:296
+#: ../cli/src/devices.c:253
msgid "connecting (getting IP configuration)"
msgstr "povezovanje (pridobivanje nastavitev IP)"
-#: ../cli/src/devices.c:298
+#: ../cli/src/devices.c:255
msgid "connecting (checking IP connectivity)"
msgstr "povezovanje (preverjanje povezljivosti IP)"
-#: ../cli/src/devices.c:300
+#: ../cli/src/devices.c:257
msgid "connecting (starting secondary connections)"
msgstr "povezovanje (zagon drugotnih povezav)"
-#: ../cli/src/devices.c:302
-#: ../cli/src/network-manager.c:111
+#: ../cli/src/devices.c:259
+#: ../cli/src/network-manager.c:104
msgid "connected"
msgstr "povezano"
-#: ../cli/src/devices.c:306
+#: ../cli/src/devices.c:263
msgid "connection failed"
msgstr "povezava je spodletela"
+#: ../cli/src/devices.c:274
+msgid "No reason given"
+msgstr "Razlog ni podan"
+
+#: ../cli/src/devices.c:277
+msgid "Unknown error"
+msgstr "Neznana napaka"
+
+#: ../cli/src/devices.c:280
+msgid "Device is now managed"
+msgstr "Naprava je zdaj upravljana"
+
+#: ../cli/src/devices.c:283
+msgid "Device is now unmanaged"
+msgstr "Naprava zdaj ni upravljana"
+
+#: ../cli/src/devices.c:286
+msgid "The device could not be readied for configuration"
+msgstr "Naprave ni mogoče pripraviti za prilagoditev"
+
+#: ../cli/src/devices.c:289
+msgid "IP configuration could not be reserved (no available address, timeout, etc)"
+msgstr "Prilagoditve IP ni mogoče rezervirati (naslov ni na voljo, časovna prekoračitev itn.)"
+
+#: ../cli/src/devices.c:292
+msgid "The IP configuration is no longer valid"
+msgstr "Prilagoditev IP ni več veljavna"
+
+#: ../cli/src/devices.c:295
+msgid "Secrets were required, but not provided"
+msgstr "Zahtevana so bila ustrezna gesla, ki pa niso bila podana"
+
+#: ../cli/src/devices.c:298
+msgid "802.1X supplicant disconnected"
+msgstr "Prosilnik 802.1X je odklopljen"
+
+#: ../cli/src/devices.c:301
+msgid "802.1X supplicant configuration failed"
+msgstr "Prilagoditev prosilnika 802.1X je spodletela"
+
+#: ../cli/src/devices.c:304
+msgid "802.1X supplicant failed"
+msgstr "Prosilnik 802.1X je spodletel"
+
+#: ../cli/src/devices.c:307
+msgid "802.1X supplicant took too long to authenticate"
+msgstr "Prosilnik 802.1X je potreboval preveč časa za overjanje"
+
+#: ../cli/src/devices.c:310
+msgid "PPP service failed to start"
+msgstr "Storitev PPP ni uspešno zagnana"
+
+#: ../cli/src/devices.c:313
+msgid "PPP service disconnected"
+msgstr "Storitev PPP je prekinjena"
+
+#: ../cli/src/devices.c:316
+msgid "PPP failed"
+msgstr "PPP je spodletel"
+
+#: ../cli/src/devices.c:319
+msgid "DHCP client failed to start"
+msgstr "Začenjanje odjemalca DHCP je spodletelo"
+
+#: ../cli/src/devices.c:322
+msgid "DHCP client error"
+msgstr "Napaka odjemalca DHCP"
+
+#: ../cli/src/devices.c:325
+msgid "DHCP client failed"
+msgstr "Odjemalec DHCP je spodletel"
+
+#: ../cli/src/devices.c:328
+msgid "Shared connection service failed to start"
+msgstr "Začenjanje storitve souporabe povezave je spodletelo."
+
#: ../cli/src/devices.c:331
-#: ../cli/src/devices.c:341
-#: ../cli/src/devices.c:501
-#: ../cli/src/devices.c:545
+msgid "Shared connection service failed"
+msgstr "Storitev souporabe povezave je spodletela."
+
+#: ../cli/src/devices.c:334
+msgid "AutoIP service failed to start"
+msgstr "Začenjanje storitve AutoIP je spodletelo."
+
+#: ../cli/src/devices.c:337
+msgid "AutoIP service error"
+msgstr "Napaka storitve AutoIP"
+
+#: ../cli/src/devices.c:340
+msgid "AutoIP service failed"
+msgstr "Storitev AutoIP je spodletela"
+
+#: ../cli/src/devices.c:343
+msgid "The line is busy"
+msgstr "Povezava je zasedena"
+
+#: ../cli/src/devices.c:346
+msgid "No dial tone"
+msgstr "Ni klicnega signala"
+
+#: ../cli/src/devices.c:349
+msgid "No carrier could be established"
+msgstr "Ni mogoče vzpostaviti signala povezave"
+
+#: ../cli/src/devices.c:352
+msgid "The dialing request timed out"
+msgstr "Zahteva klicanja je časovno potekla"
+
+#: ../cli/src/devices.c:355
+msgid "The dialing attempt failed"
+msgstr "Poskus klicanja je spodletel"
+
+#: ../cli/src/devices.c:358
+msgid "Modem initialization failed"
+msgstr "Začenjanje modema spodletelo"
+
+#: ../cli/src/devices.c:361
+msgid "Failed to select the specified APN"
+msgstr "Izbor določenega APN je spodletel"
+
+#: ../cli/src/devices.c:364
+msgid "Not searching for networks"
+msgstr "Iskanje omrežij ni dejavno"
+
+#: ../cli/src/devices.c:367
+msgid "Network registration denied"
+msgstr "Vpis omrežja je zavrnjen"
+
+#: ../cli/src/devices.c:370
+msgid "Network registration timed out"
+msgstr "Čas za vpis omrežja je potekel"
+
+#: ../cli/src/devices.c:373
+msgid "Failed to register with the requested network"
+msgstr "Vpis v zahtevano omrežje je spodletel"
+
+#: ../cli/src/devices.c:376
+msgid "PIN check failed"
+msgstr "Preverjanje PIN je spodletelo"
+
+#: ../cli/src/devices.c:379
+msgid "Necessary firmware for the device may be missing"
+msgstr "Morda napravi manjka zahtevana strojna programska oprema"
+
+#: ../cli/src/devices.c:382
+msgid "The device was removed"
+msgstr "Naprava je bila odstranjena"
+
+#: ../cli/src/devices.c:385
+msgid "NetworkManager went to sleep"
+msgstr "NetworkManager je prešel v pripravljenost"
+
+#: ../cli/src/devices.c:388
+msgid "The device's active connection disappeared"
+msgstr "Dejavna povezava naprave je izginila"
+
+#: ../cli/src/devices.c:391
+msgid "Device disconnected by user or client"
+msgstr "Uporabnik ali odjemalec je odklopil napravo"
+
+#: ../cli/src/devices.c:394
+msgid "Carrier/link changed"
+msgstr "Signal/Povezava se je spremenila"
+
+#: ../cli/src/devices.c:397
+msgid "The device's existing connection was assumed"
+msgstr "Predviden je bila obstoječa povezava naprave"
+
+#: ../cli/src/devices.c:400
+msgid "The supplicant is now available"
+msgstr "Prosilnik je zdaj na voljo"
+
+#: ../cli/src/devices.c:403
+msgid "The modem could not be found"
+msgstr "Modema ni mogoče najti."
+
+#: ../cli/src/devices.c:406
+msgid "The Bluetooth connection failed or timed out"
+msgstr "Povezava Bluetooth je spodletela ali pa je časovno potekla"
+
+#: ../cli/src/devices.c:409
+msgid "GSM Modem's SIM card not inserted"
+msgstr "Kartica SIM modema GSM ni vstavljena"
+
+#: ../cli/src/devices.c:412
+msgid "GSM Modem's SIM PIN required"
+msgstr "Zahtevana je koda PIN kartice SIM modema GSM"
+
+#: ../cli/src/devices.c:415
+msgid "GSM Modem's SIM PUK required"
+msgstr "Zahtevana je koda PUK kartice SIM modema GSM"
+
+#: ../cli/src/devices.c:418
+msgid "GSM Modem's SIM wrong"
+msgstr "Kartica SIM modema GSM ni ustrezna"
+
+#: ../cli/src/devices.c:421
+msgid "Infiniband device does not support connected mode"
+msgstr "Naprava Infiniband ne podpira povezanega načina"
+
+#: ../cli/src/devices.c:423
+#: ../cli/src/devices.c:446
+#: ../cli/src/devices.c:458
+#: ../cli/src/devices.c:578
+#: ../cli/src/devices.c:622
msgid "Unknown"
msgstr "Neznano"
-#: ../cli/src/devices.c:374
+#: ../cli/src/devices.c:491
msgid "(none)"
msgstr "(brez)"
-#: ../cli/src/devices.c:399
-#, c-format
-msgid "%s: error converting IP4 address 0x%X"
-msgstr "%s: napaka med pretvarjanjem naslova IP4 0x%X"
-
-#: ../cli/src/devices.c:470
+#: ../cli/src/devices.c:547
#, c-format
msgid "%u MHz"
msgstr "%u MHz"
-#: ../cli/src/devices.c:471
+#: ../cli/src/devices.c:548
#, c-format
msgid "%u MB/s"
msgstr "%u MB/s"
-#: ../cli/src/devices.c:480
+#: ../cli/src/devices.c:557
msgid "Encrypted: "
msgstr "Šifrirano: "
-#: ../cli/src/devices.c:485
+#: ../cli/src/devices.c:562
msgid "WEP "
msgstr "WEP "
-#: ../cli/src/devices.c:487
+#: ../cli/src/devices.c:564
msgid "WPA "
msgstr "WPA "
-#: ../cli/src/devices.c:489
+#: ../cli/src/devices.c:566
msgid "WPA2 "
msgstr "WPA2 "
-#: ../cli/src/devices.c:492
+#: ../cli/src/devices.c:569
msgid "Enterprise "
msgstr "Podjetniški "
-#: ../cli/src/devices.c:501
+#: ../cli/src/devices.c:578
msgid "Ad-Hoc"
msgstr "Ad-Hoc"
-#: ../cli/src/devices.c:501
+#: ../cli/src/devices.c:578
msgid "Infrastructure"
msgstr "infrastruktura"
-#: ../cli/src/devices.c:536
+#: ../cli/src/devices.c:613
msgid "Home"
msgstr "Domov"
-#: ../cli/src/devices.c:539
+#: ../cli/src/devices.c:616
msgid "Partner"
msgstr "Partner"
-#: ../cli/src/devices.c:542
+#: ../cli/src/devices.c:619
msgid "Roaming"
msgstr "Gostovanje"
-#: ../cli/src/devices.c:612
+#: ../cli/src/devices.c:691
#, c-format
msgid "Error: 'dev list': %s"
msgstr "Napaka: 'dev list': %s"
-#: ../cli/src/devices.c:614
+#: ../cli/src/devices.c:693
#, c-format
msgid "Error: 'dev list': %s; allowed fields: %s"
msgstr "Napaka: 'dev list': %s; dovoljena polja: %s"
-#: ../cli/src/devices.c:623
+#: ../cli/src/devices.c:702
msgid "Device details"
msgstr "Podrobnosti naprave"
-#: ../cli/src/devices.c:657
+#: ../cli/src/devices.c:744
+#: ../cli/src/devices.c:745
#: ../cli/src/devices.c:1152
-#: ../cli/src/utils.c:342
+#: ../cli/src/utils.c:445
msgid "(unknown)"
msgstr "(neznano)"
-#: ../cli/src/devices.c:658
-msgid "unknown)"
-msgstr "neznano)"
+#: ../cli/src/devices.c:753
+msgid "not connected"
+msgstr "brez povezave"
-#: ../cli/src/devices.c:684
+#: ../cli/src/devices.c:780
#, c-format
msgid "%u Mb/s"
msgstr "%u Mb/s"
#. Print header
#. "WIRED-PROPERTIES"
-#: ../cli/src/devices.c:757
+#: ../cli/src/devices.c:853
msgid "on"
msgstr "omogočeno"
-#: ../cli/src/devices.c:757
+#: ../cli/src/devices.c:853
msgid "off"
msgstr "onemogočeno"
@@ -978,8 +1332,8 @@ msgstr "Napaka: manjka argument '%s'"
#: ../cli/src/devices.c:1101
#: ../cli/src/devices.c:1253
-#: ../cli/src/devices.c:1389
-#: ../cli/src/devices.c:1608
+#: ../cli/src/devices.c:1390
+#: ../cli/src/devices.c:1609
#, c-format
msgid "Error: Device '%s' not found."
msgstr "Napaka: naprave '%s' ni mogoče najti"
@@ -1004,67 +1358,71 @@ msgstr "Stanje naprave: %d (%s)\n"
msgid "Error: iface has to be specified."
msgstr "Napaka: iface nastavitev mora določena."
-#: ../cli/src/devices.c:1347
+#: ../cli/src/devices.c:1348
#, c-format
msgid "Error: 'dev wifi': %s"
msgstr "Napaka: 'dev wifi': %s"
-#: ../cli/src/devices.c:1349
+#: ../cli/src/devices.c:1350
#, c-format
msgid "Error: 'dev wifi': %s; allowed fields: %s"
msgstr "Napaka: 'dev wifi': %s; dovoljena polja: %s"
-#: ../cli/src/devices.c:1372
+#: ../cli/src/devices.c:1373
msgid "WiFi scan list"
msgstr "WiFi seznam preiskovanja"
-#: ../cli/src/devices.c:1409
-#: ../cli/src/devices.c:1463
-#: ../cli/src/devices.c:1670
+#: ../cli/src/devices.c:1410
+#: ../cli/src/devices.c:1464
#, c-format
-msgid "Error: Access point with hwaddr '%s' not found."
-msgstr "Napaka: dostopne točke s strojnim naslovom '%s' ni mogoče najti."
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "Napaka: dostopne točke z bssid '%s' ni mogoče najti."
-#: ../cli/src/devices.c:1426
+#: ../cli/src/devices.c:1427
#, c-format
msgid "Error: Device '%s' is not a WiFi device."
msgstr "Napaka: naprava '%s' ni veljavna WiFi naprava."
-#: ../cli/src/devices.c:1490
+#: ../cli/src/devices.c:1491
#, c-format
msgid "Error: 'dev wifi' command '%s' is not valid."
msgstr "Napaka: 'dev wifi' ukaz '%s' ni veljaven."
-#: ../cli/src/devices.c:1566
+#: ../cli/src/devices.c:1567
#, c-format
msgid "Error: 'dev wimax': %s"
msgstr "Napaka: 'dev wimax': %s"
-#: ../cli/src/devices.c:1568
+#: ../cli/src/devices.c:1569
#, c-format
msgid "Error: 'dev wimax': %s; allowed fields: %s"
msgstr "Napaka: 'dev wimax': %s; dovoljena polja: %s"
-#: ../cli/src/devices.c:1591
+#: ../cli/src/devices.c:1592
msgid "WiMAX NSP list"
msgstr "Seznam ponudnikov storitev WiMAX"
-#: ../cli/src/devices.c:1628
+#: ../cli/src/devices.c:1629
#, c-format
msgid "Error: NSP with name '%s' not found."
msgstr "Napaka: ponudnika omrežnih storitev '%s' ni mogoče najti"
-#: ../cli/src/devices.c:1639
+#: ../cli/src/devices.c:1640
#, c-format
msgid "Error: Device '%s' is not a WiMAX device."
msgstr "Napaka: naprava '%s' ni naprava WiMAX."
-#: ../cli/src/devices.c:1697
+#: ../cli/src/devices.c:1671
+#, c-format
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "Napaka: dostopne točke z nsp '%s' ni mogoče najti."
+
+#: ../cli/src/devices.c:1698
#, c-format
msgid "Error: 'dev wimax' command '%s' is not valid."
msgstr "Napaka: 'dev wimax' ukaz '%s' ni veljaven."
-#: ../cli/src/devices.c:1747
+#: ../cli/src/devices.c:1748
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "Napaka: 'dev' ukaz '%s' ni veljaven."
@@ -1113,7 +1471,7 @@ msgstr "WIFI-STROJNA OPREMA"
msgid "WIMAX"
msgstr "WIMAX"
-#: ../cli/src/network-manager.c:74
+#: ../cli/src/network-manager.c:67
#, c-format
msgid ""
"Usage: nmcli nm { COMMAND | help }\n"
@@ -1144,149 +1502,149 @@ msgstr ""
" wimax [on|off]\n"
"\n"
-#: ../cli/src/network-manager.c:103
+#: ../cli/src/network-manager.c:96
msgid "asleep"
msgstr "v mirovanju"
-#: ../cli/src/network-manager.c:105
+#: ../cli/src/network-manager.c:98
msgid "connecting"
msgstr "povezovanje"
-#: ../cli/src/network-manager.c:107
+#: ../cli/src/network-manager.c:100
msgid "connected (local only)"
msgstr "povezan (le krajevno)"
-#: ../cli/src/network-manager.c:109
+#: ../cli/src/network-manager.c:102
msgid "connected (site only)"
msgstr "povezan (le mesto)"
-#: ../cli/src/network-manager.c:113
+#: ../cli/src/network-manager.c:106
msgid "disconnecting"
msgstr "prekinjanje povezave"
-#: ../cli/src/network-manager.c:153
+#: ../cli/src/network-manager.c:146
#, c-format
msgid "Error: 'nm status': %s"
msgstr "Napaka: 'nm status': %s"
-#: ../cli/src/network-manager.c:155
+#: ../cli/src/network-manager.c:148
#, c-format
msgid "Error: 'nm status': %s; allowed fields: %s"
msgstr "Napaka: 'nm status': %s; dovoljena polja: %s"
#. create NMClient
+#: ../cli/src/network-manager.c:161
+#: ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163
+#: ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165
+#: ../cli/src/network-manager.c:167
#: ../cli/src/network-manager.c:168
-#: ../cli/src/network-manager.c:169
-#: ../cli/src/network-manager.c:170
-#: ../cli/src/network-manager.c:171
-#: ../cli/src/network-manager.c:172
-#: ../cli/src/network-manager.c:174
-#: ../cli/src/network-manager.c:175
-#: ../cli/src/network-manager.c:296
-#: ../cli/src/network-manager.c:351
-#: ../cli/src/network-manager.c:389
-#: ../cli/src/network-manager.c:428
+#: ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344
+#: ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "enabled"
msgstr "omogočeno"
+#: ../cli/src/network-manager.c:161
+#: ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163
+#: ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165
+#: ../cli/src/network-manager.c:167
#: ../cli/src/network-manager.c:168
-#: ../cli/src/network-manager.c:169
-#: ../cli/src/network-manager.c:170
-#: ../cli/src/network-manager.c:171
-#: ../cli/src/network-manager.c:172
-#: ../cli/src/network-manager.c:174
-#: ../cli/src/network-manager.c:175
-#: ../cli/src/network-manager.c:296
-#: ../cli/src/network-manager.c:351
-#: ../cli/src/network-manager.c:389
-#: ../cli/src/network-manager.c:428
+#: ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344
+#: ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "disabled"
msgstr "onemogočeno"
-#: ../cli/src/network-manager.c:188
+#: ../cli/src/network-manager.c:181
msgid "NetworkManager status"
msgstr "Stanje NetworkManager"
#. Print header
-#: ../cli/src/network-manager.c:191
+#: ../cli/src/network-manager.c:184
msgid "running"
msgstr "v teku"
-#: ../cli/src/network-manager.c:191
+#: ../cli/src/network-manager.c:184
msgid "not running"
msgstr "ni v teku"
-#: ../cli/src/network-manager.c:222
-#: ../cli/src/utils.c:322
+#: ../cli/src/network-manager.c:215
+#: ../cli/src/utils.c:425
#, c-format
msgid "Error: Couldn't connect to system bus: %s"
msgstr "Napaka: ni se mogoče povezati s sistemskim vodilom: %s"
-#: ../cli/src/network-manager.c:233
+#: ../cli/src/network-manager.c:226
#, c-format
msgid "Error: Couldn't create D-Bus object proxy."
msgstr "Napaka: ni mogoče ustvariti posredniškega predmeta vodila D-Bus."
-#: ../cli/src/network-manager.c:239
+#: ../cli/src/network-manager.c:232
#, c-format
msgid "Error in sleep: %s"
msgstr "Napaka v mirovanju: %s"
-#: ../cli/src/network-manager.c:283
-#: ../cli/src/network-manager.c:338
-#: ../cli/src/network-manager.c:376
-#: ../cli/src/network-manager.c:415
+#: ../cli/src/network-manager.c:276
+#: ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369
+#: ../cli/src/network-manager.c:408
#, c-format
msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
msgstr "Napaka: vrednost '--fields' '%s' ni veljavna, dovoljena polja: %s"
-#: ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:284
msgid "Networking enabled"
msgstr "Omrežje je omogočeno"
-#: ../cli/src/network-manager.c:307
+#: ../cli/src/network-manager.c:300
#, c-format
msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
msgstr "Napaka: neveljaven parameter 'enable': '%s'; uporabite 'true' ali 'false'."
-#: ../cli/src/network-manager.c:317
+#: ../cli/src/network-manager.c:310
#, c-format
msgid "Error: Sleeping status is not exported by NetworkManager."
msgstr "Napaka: stanje v mirovanju ni izvoženo s programom NetworkManager."
-#: ../cli/src/network-manager.c:325
+#: ../cli/src/network-manager.c:318
#, c-format
msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
msgstr "Napaka: neveljaven parameter 'sleep': '%s'; uporabite 'true' ali 'false'."
-#: ../cli/src/network-manager.c:346
+#: ../cli/src/network-manager.c:339
msgid "WiFi enabled"
msgstr "WiFi je omogočen"
-#: ../cli/src/network-manager.c:362
+#: ../cli/src/network-manager.c:355
#, c-format
msgid "Error: invalid 'wifi' parameter: '%s'."
msgstr "Napaka: neveljaven 'wifi' parameter: '%s'."
-#: ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:377
msgid "WWAN enabled"
msgstr "WWAN je omogočen"
-#: ../cli/src/network-manager.c:400
+#: ../cli/src/network-manager.c:393
#, c-format
msgid "Error: invalid 'wwan' parameter: '%s'."
msgstr "Napaka: neveljaven 'wwan' parameter: '%s'."
-#: ../cli/src/network-manager.c:423
+#: ../cli/src/network-manager.c:416
msgid "WiMAX enabled"
msgstr "WiMAX je omogočen"
-#: ../cli/src/network-manager.c:439
+#: ../cli/src/network-manager.c:432
#, c-format
msgid "Error: invalid 'wimax' parameter: '%s'."
msgstr "Napaka: neveljaven parameter 'wimax': '%s'."
-#: ../cli/src/network-manager.c:452
+#: ../cli/src/network-manager.c:445
#, c-format
msgid "Error: 'nm' command '%s' is not valid."
msgstr "Napaka: ukaz 'nm' '%s' ni veljaven"
@@ -1395,121 +1753,140 @@ msgstr "Napaka: ni mogoče ustvariti predmeta NMClient."
msgid "Success"
msgstr "Uspešno zaključeno"
-#: ../cli/src/settings.c:423
+#: ../cli/src/settings.c:465
#, c-format
msgid "%d (hex-ascii-key)"
msgstr "%d (šestnajstiški-ascii-ključ)"
-#: ../cli/src/settings.c:425
+#: ../cli/src/settings.c:467
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (104/128-bitno šifrirno geslo)"
-#: ../cli/src/settings.c:428
+#: ../cli/src/settings.c:470
#, c-format
msgid "%d (unknown)"
msgstr "%d (neznano)"
-#: ../cli/src/settings.c:454
+#: ../cli/src/settings.c:496
msgid "0 (unknown)"
msgstr "0 (neznano)"
-#: ../cli/src/settings.c:460
+#: ../cli/src/settings.c:502
msgid "any, "
msgstr "karkoli, "
-#: ../cli/src/settings.c:462
+#: ../cli/src/settings.c:504
msgid "900 MHz, "
msgstr "900 MHz, "
-#: ../cli/src/settings.c:464
+#: ../cli/src/settings.c:506
msgid "1800 MHz, "
msgstr "1800 MHz, "
-#: ../cli/src/settings.c:466
+#: ../cli/src/settings.c:508
msgid "1900 MHz, "
msgstr "1900 MHz, "
-#: ../cli/src/settings.c:468
+#: ../cli/src/settings.c:510
msgid "850 MHz, "
msgstr "850 MHz, "
-#: ../cli/src/settings.c:470
+#: ../cli/src/settings.c:512
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 MHz, "
-#: ../cli/src/settings.c:472
+#: ../cli/src/settings.c:514
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 MHz, "
-#: ../cli/src/settings.c:474
+#: ../cli/src/settings.c:516
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
-#: ../cli/src/settings.c:476
+#: ../cli/src/settings.c:518
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 MHz, "
-#: ../cli/src/settings.c:478
+#: ../cli/src/settings.c:520
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 MHz, "
-#: ../cli/src/settings.c:480
+#: ../cli/src/settings.c:522
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 MHz, "
-#: ../cli/src/settings.c:482
+#: ../cli/src/settings.c:524
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 MHz, "
-#: ../cli/src/settings.c:566
-#: ../cli/src/settings.c:732
+#: ../cli/src/settings.c:526
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 900 MHz, "
+
+#: ../cli/src/settings.c:528
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2100 MHz, "
+
+#: ../cli/src/settings.c:650
+#: ../cli/src/settings.c:846
+#: ../cli/src/settings.c:1550
msgid "auto"
msgstr "samodejno"
-#: ../cli/src/settings.c:727
-#: ../cli/src/settings.c:730
-#: ../cli/src/settings.c:731
-#: ../cli/src/utils.c:176
+#: ../cli/src/settings.c:840
+#: ../cli/src/settings.c:843
+#: ../cli/src/settings.c:844
+#: ../cli/src/utils.c:247
msgid "not set"
msgstr "ni nastavljeno"
-#: ../cli/src/utils.c:128
+#: ../cli/src/utils.c:103
+#, c-format
+msgid "Error converting IP4 address '0x%X' to text form"
+msgstr "Napaka med pretvarjanjem naslova IP4 '0x%X' v besedilno obliko"
+
+#: ../cli/src/utils.c:131
+#, c-format
+msgid "Error converting IP6 address '%s' to text form"
+msgstr "Napaka med pretvarjanjem naslova IP6 '%s' v besedilno obliko"
+
+#: ../cli/src/utils.c:200
#, c-format
msgid "field '%s' has to be alone"
msgstr "polje '%s' mora biti samostojno."
-#: ../cli/src/utils.c:131
+#: ../cli/src/utils.c:203
#, c-format
msgid "invalid field '%s'"
msgstr "neveljavno polje '%s'"
-#: ../cli/src/utils.c:150
+#: ../cli/src/utils.c:222
#, c-format
msgid "Option '--terse' requires specifying '--fields'"
msgstr "Možnost '--terse' zahteva podan argument '--fields'"
-#: ../cli/src/utils.c:154
+#: ../cli/src/utils.c:226
#, c-format
msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
msgstr "Možnost '--terse' zahteva posebne vrednosti '--polja' in ne '%s'"
-#: ../cli/src/utils.c:333
+#: ../cli/src/utils.c:436
#, c-format
msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
msgstr "Napaka: ni mogoče ustvariti posredniškega predmeta D-Bus za org.freedesktop.DBus"
-#: ../cli/src/utils.c:341
+#: ../cli/src/utils.c:444
#, c-format
msgid "Error: NameHasOwner request failed: %s"
msgstr "Napaka: zahteva NameHasOwner ni uspela: %s"
-#: ../cli/src/utils.c:386
+#: ../cli/src/utils.c:489
#, c-format
msgid "Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --nocheck to suppress the warning.\n"
msgstr "Opozorilo: različici nmcli (%s) in NetworkManager (%s) se ne ujemata. Uporabite --nocheck, da onemogočite opozorilo.\n"
-#: ../cli/src/utils.c:395
+#: ../cli/src/utils.c:498
#, c-format
msgid "Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force execution using --nocheck, but the results are unpredictable."
msgstr "Napaka: različici nmcli (%s) in NetworkManager (%s) se ne ujemata. Izvajanje vsilite z --nocheck, rezultati pa niso napovedljivi."
@@ -1722,7 +2099,7 @@ msgstr "Šifriranje podatkov je spodletelo: %s / %s."
#: ../libnm-util/crypto_gnutls.c:361
#, c-format
msgid "Error initializing certificate data: %s"
-msgstr "Napaka med zaganjanjem podatkov potrdila: %s"
+msgstr "Napaka med začenjanjem nalaganja podatkov potrdila: %s"
#: ../libnm-util/crypto_gnutls.c:383
#, c-format
@@ -1863,128 +2240,254 @@ msgstr "Datoteke PCKS#12 ni mogoče preveriti: %d"
msgid "Could not generate random data."
msgstr "Naključnih podatkov ni mogoče ustvariti."
-#: ../libnm-util/nm-utils.c:2000
+#: ../libnm-util/nm-utils.c:2034
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "Ni dovolj pomnilnika za ustvarjanje šifrirnega ključa."
-#: ../libnm-util/nm-utils.c:2110
+#: ../libnm-util/nm-utils.c:2144
msgid "Could not allocate memory for PEM file creation."
msgstr "Ni mogoče dodeliti pomnilnika za ustvarjanje datoteke PEM."
-#: ../libnm-util/nm-utils.c:2122
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "Ni mogoče dodeliti pomnilnika za zapis IV v datoteko PEM."
-#: ../libnm-util/nm-utils.c:2134
+#: ../libnm-util/nm-utils.c:2168
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr "Ni mogoče dodeliti pomnilnika za zapis šifriranega ključa v datoteko PEM."
-#: ../libnm-util/nm-utils.c:2153
+#: ../libnm-util/nm-utils.c:2187
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "Ni mogoče dodeliti pomnilnika za podatke datoteke PEM."
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
-msgid "Allow control of network connections"
-msgstr "Dovoli nadzor omrežnih povezav"
+msgid "Enable or disable system networking"
+msgstr "Omogoči ali onemogoči sistemske omrežne povezave"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
-msgid "Connection sharing via a protected WiFi network"
-msgstr "Souporaba povezave preko zaščitenega WiFi omrežja"
+msgid "System policy prevents enabling or disabling system networking"
+msgstr "Sistemska določila preprečujejo omogočanje ali onemogočanje omrežnih povezav."
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
-msgid "Connection sharing via an open WiFi network"
-msgstr "Souporaba povezave preko odprtega WiFi omrežja"
+msgid "Put NetworkManager to sleep or wake it up (should only be used by system power management)"
+msgstr "Postavi program NetworkManager v mirovanje ali iz njega (možnost je namenjena upravljanju napajanja)"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
-msgid "Enable or disable WiFi devices"
-msgstr "Omogoči ali onemogoči naprave WiFi"
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr "Sistemska določila preprečujejo postavitev programa NetworkManager v mirovanje ali iz njega."
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
-msgid "Enable or disable WiMAX mobile broadband devices"
-msgstr "Omogoči ali onemogoči mobilne širokopasovne naprave WiMAX"
+msgid "Enable or disable WiFi devices"
+msgstr "Omogoči ali onemogoči naprave WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
-msgid "Enable or disable mobile broadband devices"
-msgstr "Omogoči ali onemogoči naprave mobilnih širokopasovnih storitev"
+msgid "System policy prevents enabling or disabling WiFi devices"
+msgstr "Sistemska določila preprečujejo omogočanja ali onemogočanje WiFi naprav"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
-msgid "Enable or disable system networking"
-msgstr "Omogoči ali onemogoči sistemske omrežne povezave"
+msgid "Enable or disable mobile broadband devices"
+msgstr "Omogoči ali onemogoči naprave mobilnih širokopasovnih storitev"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
-msgid "Modify network connections for all users"
-msgstr "Spremeni omrežne povezave za vse uporabnike"
+msgid "System policy prevents enabling or disabling mobile broadband devices"
+msgstr "Sistemska določila preprečuje omogočanja ali onemogočanje mobilne širokopasovne naprave"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
-msgid "Modify persistent system hostname"
-msgstr "Spremeni trajno sistemsko ime gostitelja"
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "Omogoči ali onemogoči mobilne širokopasovne naprave WiMAX"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
-msgid "Modify personal network connections"
-msgstr "Spremeni osebne omrežne povezave"
+msgid "System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgstr "Sistemska določila preprečujejo omogočanje ali onemogočanje mobilnih širokopasovnih naprav WiMAX"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
-msgid "Put NetworkManager to sleep or wake it up (should only be used by system power management)"
-msgstr "Postavi program NetworkManager v mirovanje ali iz njega (možnost je namenjena upravljanju napajanja)"
+msgid "Allow control of network connections"
+msgstr "Dovoli nadzor omrežnih povezav"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
msgid "System policy prevents control of network connections"
msgstr "Sistemska določila preprečujejo nadzor omrežnih povezav"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
-msgid "System policy prevents enabling or disabling WiFi devices"
-msgstr "Sistemska določila preprečujejo omogočanja ali onemogočanje WiFi naprav"
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Souporaba povezave preko zaščitenega WiFi omrežja"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
-msgid "System policy prevents enabling or disabling WiMAX mobile broadband devices"
-msgstr "Sistemska določila preprečujejo omogočanje ali onemogočanje mobilnih širokopasovnih naprav WiMAX"
+msgid "System policy prevents sharing connections via a protected WiFi network"
+msgstr "Sistemska pravila preprečujejo souporabo povezav preko zaščitenega WiFi omrežja"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
-msgid "System policy prevents enabling or disabling mobile broadband devices"
-msgstr "Sistemska določila preprečuje omogočanja ali onemogočanje mobilne širokopasovne naprave"
+msgid "Connection sharing via an open WiFi network"
+msgstr "Souporaba povezave preko odprtega WiFi omrežja"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
-msgid "System policy prevents enabling or disabling system networking"
-msgstr "Sistemska določila preprečujejo omogočanje ali onemogočanje omrežnih povezav."
+msgid "System policy prevents sharing connections via an open WiFi network"
+msgstr "Sistemska pravila preprečujejo souporabo povezav preko odprtega WiFi omrežja"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
-msgid "System policy prevents modification of network settings for all users"
-msgstr "Sistemska določila preprečujejo spreminjanje sistemskih nastavitev za vse uporabnike"
+msgid "Modify personal network connections"
+msgstr "Spremeni osebne omrežne povezave"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
msgid "System policy prevents modification of personal network settings"
msgstr "Sistemska določila preprečujejo spreminjanje osebnih omrežnih nastavitev"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
-msgid "System policy prevents modification of the persistent system hostname"
-msgstr "Sistemska pravila preprečujejo spremembo imena gostitelja trajnega sistema"
+msgid "Modify network connections for all users"
+msgstr "Spremeni omrežne povezave za vse uporabnike"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
-msgid "System policy prevents putting NetworkManager to sleep or waking it up"
-msgstr "Sistemska določila preprečujejo postavitev programa NetworkManager v mirovanje ali iz njega."
+msgid "System policy prevents modification of network settings for all users"
+msgstr "Sistemska določila preprečujejo spreminjanje sistemskih nastavitev za vse uporabnike"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
-msgid "System policy prevents sharing connections via a protected WiFi network"
-msgstr "Sistemska pravila preprečujejo souporabo povezav preko zaščitenega WiFi omrežja"
+msgid "Modify persistent system hostname"
+msgstr "Spremeni trajno sistemsko ime gostitelja"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
-msgid "System policy prevents sharing connections via an open WiFi network"
-msgstr "Sistemska pravila preprečujejo souporabo povezav preko odprtega WiFi omrežja"
+msgid "System policy prevents modification of the persistent system hostname"
+msgstr "Sistemska pravila preprečujejo spremembo imena gostitelja trajnega sistema"
+
+#: ../src/main.c:143
+#, c-format
+msgid "Failed to initialize SIGTERM pipe: %d"
+msgstr "Začenjanje veci SIGTERM je spodletelo: %d"
+
+#: ../src/main.c:174
+#, c-format
+msgid "Opening %s failed: %s\n"
+msgstr "Odpiranje %s je spodletelo: %s\n"
+
+#: ../src/main.c:180
+#, c-format
+msgid "Writing to %s failed: %s\n"
+msgstr "Zapisovanje v %s je spodletelo: %s\n"
+
+#: ../src/main.c:185
+#, c-format
+msgid "Closing %s failed: %s\n"
+msgstr "Zapiranje %s je spodletelo: %s\n"
+
+#: ../src/main.c:228
+#, c-format
+msgid "NetworkManager is already running (pid %ld)\n"
+msgstr "Program NetworkManager je že zagnan (pid %ld)\n"
+
+#: ../src/main.c:368
+msgid "Print NetworkManager version and exit"
+msgstr "Izpiši različico programa NetworkManager in končaj"
+
+#: ../src/main.c:369
+msgid "Don't become a daemon"
+msgstr "Ne postani ozadnji program"
-#: ../src/main.c:530
+#: ../src/main.c:370
+msgid "Make all warnings fatal"
+msgstr "Vsa opozorila naj bodo podana kot usodna"
+
+#: ../src/main.c:371
+msgid "Specify the location of a PID file"
+msgstr "Določite mesto datoteke PID"
+
+#: ../src/main.c:371
+msgid "filename"
+msgstr "ime datoteke"
+
+#: ../src/main.c:372
+msgid "State file location"
+msgstr "Mesto datoteke stanja"
+
+#: ../src/main.c:372
+msgid "/path/to/state.file"
+msgstr "/pot/do/state.file"
+
+#: ../src/main.c:373
+msgid "Config file location"
+msgstr "Mesto datoteke nastavitev"
+
+#: ../src/main.c:373
+msgid "/path/to/config.file"
+msgstr "/pot/do/config.file"
+
+#: ../src/main.c:374
+msgid "List of plugins separated by ','"
+msgstr "Seznam vstavkov, ločenih z vejico"
+
+#: ../src/main.c:374
+msgid "plugin1,plugin2"
+msgstr "vstavek1,vstavek2"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:376
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgstr "Raven beleženja: ena izmed [ERR, WARN, INFO, DEBUG]"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:379
+msgid ""
+"Log domains separated by ',': any combination of\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+msgstr ""
+"Beleži domene, ločene z vejico: poljubna kombinacija\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+
+#: ../src/main.c:392
+#, c-format
+msgid "GModules are not supported on your platform!\n"
+msgstr "V vašem sistemskem okolju Gmoduli niso podprti!\n"
+
+#: ../src/main.c:411
+msgid ""
+"NetworkManager monitors all network connections and automatically\n"
+"chooses the best connection to use. It also allows the user to\n"
+"specify wireless access points which wireless cards in the computer\n"
+"should associate with."
+msgstr ""
+"Program NetworkManager nadzoruje vse omrežne povezave in samodejno\n"
+"izbere najboljšo povezavo. Uporabniku dovoljuje tudi določanje\n"
+"brezžičnih dostopnih točk, s katerimi naj se povezujejo\n"
+"brezžični omrežni vmesniki računalnika."
+
+#: ../src/main.c:417
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr "Neveljavna možnost. Uporabite --help za seznam veljavnih možnosti.\n"
-#: ../src/main.c:611
+#: ../src/main.c:427
+#, c-format
+msgid "You must be root to run NetworkManager!\n"
+msgstr "Za zagon programa NetworkManager so zahtevana skrbniška dovoljenja!\n"
+
+#: ../src/main.c:448
+#, c-format
+msgid "Failed to read configuration: (%d) %s\n"
+msgstr "Branje nastavitev je spodletelo: (%d) %s\n"
+
+#: ../src/main.c:459
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr "%s. Uporabite --help za prikaz seznam veljavnih možnosti.\n"
+#: ../src/main.c:466
+#, c-format
+msgid "State file %s parsing failed: (%d) %s\n"
+msgstr "Razčlenjevanje datoteke stanja %s je spodletelo: (%d) %s\n"
+
+#: ../src/main.c:483
+#, c-format
+msgid "Could not daemonize: %s [error %u]\n"
+msgstr "Opravila ni mogoče pretvoriti za ozadnje delovanje: %s [napaka %u]\n"
+
#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
msgstr "#Ustvarjeno z upravljalnikom omrežij\n"
@@ -1998,19 +2501,19 @@ msgstr ""
"# Združeno iz %s\n"
"\n"
-#: ../src/dhcp-manager/nm-dhcp-manager.c:284
+#: ../src/dhcp-manager/nm-dhcp-manager.c:266
msgid "no usable DHCP client could be found."
msgstr "ni mogoče najti uporabnega odjemalca DHCP."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:293
+#: ../src/dhcp-manager/nm-dhcp-manager.c:275
msgid "'dhclient' could be found."
msgstr "'dhclient' je najden."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:303
+#: ../src/dhcp-manager/nm-dhcp-manager.c:285
msgid "'dhcpcd' could be found."
msgstr "'dhcpcd' ni mogoče najti."
-#: ../src/dhcp-manager/nm-dhcp-manager.c:311
+#: ../src/dhcp-manager/nm-dhcp-manager.c:293
#, c-format
msgid "unsupported DHCP client '%s'"
msgstr "nepodprt odjemalec DHCP '%s'"
@@ -2023,136 +2526,123 @@ msgstr "OPOMBA: razreševalnik libc morda ne podpira več kot 3 imenskih strežn
msgid "The nameservers listed below may not be recognized."
msgstr "Navedeni imenski strežniki morda ne bodo prepoznani."
-#: ../src/logging/nm-logging.c:149
+#: ../src/logging/nm-logging.c:130
#, c-format
msgid "Unknown log level '%s'"
msgstr "Neznana raven beleženja '%s'"
-#: ../src/logging/nm-logging.c:174
+#: ../src/logging/nm-logging.c:155
#, c-format
msgid "Unknown log domain '%s'"
msgstr "Neznana domena beleženja '%s'"
-#: ../src/modem-manager/nm-modem-cdma.c:296
-#: ../src/nm-device-bt.c:355
+#: ../src/modem-manager/nm-modem-cdma.c:279
+#: ../src/nm-device-bt.c:325
#, c-format
msgid "CDMA connection %d"
msgstr "Povezava CDMA %d"
-#: ../src/modem-manager/nm-modem-gsm.c:499
-#: ../src/nm-device-bt.c:351
+#: ../src/modem-manager/nm-modem-gsm.c:512
+#: ../src/nm-device-bt.c:321
#, c-format
msgid "GSM connection %d"
msgstr "Povezava GSM %d"
-#: ../src/nm-device-bt.c:326
+#: ../src/nm-device-bond.c:192
+#, c-format
+msgid "Bond connection %d"
+msgstr "Povezava vezi %d"
+
+#: ../src/nm-device-bt.c:296
#, c-format
msgid "PAN connection %d"
msgstr "Povezava PAN %d"
-#: ../src/nm-device-bt.c:359
+#: ../src/nm-device-bt.c:329
#, c-format
msgid "DUN connection %d"
msgstr "Povezava DUN %d"
-#: ../src/nm-device-ethernet.c:1723
+#: ../src/nm-device-ethernet.c:1326
#, c-format
msgid "PPPoE connection %d"
msgstr "Povezava PPPoE %d"
-#: ../src/nm-device-ethernet.c:1723
+#: ../src/nm-device-ethernet.c:1326
#: ../src/settings/nm-settings-utils.c:50
#, c-format
msgid "Wired connection %d"
msgstr "Žična povezava %d"
-#: ../src/nm-device-olpc-mesh.c:393
+#: ../src/nm-device-infiniband.c:303
+#, c-format
+msgid "Infiniband connection %d"
+msgstr "Povezava Infiniband %d"
+
+#: ../src/nm-device-olpc-mesh.c:293
#, c-format
msgid "Mesh %d"
msgstr "Mreža %d"
-#: ../src/nm-manager.c:657
+#: ../src/nm-device-vlan.c:311
+#, c-format
+#| msgid "VPN connection %d"
+msgid "VLAN connection %d"
+msgstr "Povezava VLAN %d"
+
+#: ../src/nm-manager.c:661
#, c-format
msgid "VPN connection %d"
msgstr "Povezava VPN %d"
-#: ../src/nm-netlink-monitor.c:100
-#: ../src/nm-netlink-monitor.c:231
-#: ../src/nm-netlink-monitor.c:653
+#: ../src/nm-netlink-monitor.c:148
+#: ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
#, c-format
msgid "error processing netlink message: %s"
msgstr "napaka med obdelovanjem sporočila netlink: %s"
-#: ../src/nm-netlink-monitor.c:214
+#: ../src/nm-netlink-monitor.c:251
msgid "error occurred while waiting for data on socket"
msgstr "med čakanjem na podatke na vtiču je prišlo do napake"
-#: ../src/nm-netlink-monitor.c:254
+#: ../src/nm-netlink-monitor.c:296
#, c-format
msgid "unable to connect to netlink for monitoring link status: %s"
msgstr "ni se mogoče povezati z netlink za nadziranje stanja povezave: %s"
-#: ../src/nm-netlink-monitor.c:265
+#: ../src/nm-netlink-monitor.c:307
#, c-format
msgid "unable to enable netlink handle credential passing: %s"
msgstr "ni mogoče omogočiti ročnika netlink overjanje:% s"
-#: ../src/nm-netlink-monitor.c:291
-#: ../src/nm-netlink-monitor.c:353
+#: ../src/nm-netlink-monitor.c:330
+#: ../src/nm-netlink-monitor.c:390
#, c-format
msgid "unable to allocate netlink handle for monitoring link status: %s"
msgstr "ni mogoče dodeliti ročice netlink za nadziranje stanja povezave: %s"
-#: ../src/nm-netlink-monitor.c:376
+#: ../src/nm-netlink-monitor.c:415
#, c-format
msgid "unable to allocate netlink link cache for monitoring link status: %s"
msgstr "ni mogoče dodeliti predpomnilnika netlink povezav za nadziranje stanja povezave: %s"
-#: ../src/nm-netlink-monitor.c:502
+#: ../src/nm-netlink-monitor.c:542
#, c-format
msgid "unable to join netlink group: %s"
msgstr "skupini netlink se ni mogoče pridružiti: %s"
-#: ../src/nm-netlink-monitor.c:629
-#: ../src/nm-netlink-monitor.c:642
+#: ../src/nm-netlink-monitor.c:671
+#: ../src/nm-netlink-monitor.c:684
#, c-format
msgid "error updating link cache: %s"
msgstr "napaka med posodabljanjem predpomnilnika povezave: %s"
-#: ../src/settings/plugins/ifcfg-rh/reader.c:3575
+#: ../src/settings/plugins/ifcfg-rh/reader.c:93
#: ../src/settings/plugins/ifnet/connection_parser.c:51
msgid "System"
msgstr "Sistem"
-#~ msgid "SCOPE"
-#~ msgstr "OBSEG"
-
-#~ msgid "DBUS-SERVICE"
-#~ msgstr "STORITEV-DBUS"
-
-#~ msgid "system"
-#~ msgstr "sistem"
-
-#~ msgid "user"
-#~ msgstr "uporabnik"
-
-#~ msgid "System connections"
-#~ msgstr "Sistemske povezave"
-
-#~ msgid "User connections"
-#~ msgstr "Uporabniške povezave"
-
-#~ msgid "Error: Obtaining active connection for '%s' failed."
-#~ msgstr "Napaka: pridobivanje dejavne povezave '%s' je spodletelo."
-
-#~ msgid "Error: Could not get user settings."
-#~ msgstr "Napaka: ni mogoče pridobiti uporabniških nastavitev."
-
-#~ msgid "Allow use of user-specific connections"
-#~ msgstr "Dovoli uporabo posebnih uporabniških povezav."
-
-#~ msgid "System policy prevents use of user-specific connections"
-#~ msgstr "Sistemska določila preprečujejo uporabo uporabniških povezav."
-
-#~ msgid "Auto %s"
-#~ msgstr "Samodejno %s"
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3632
+msgid "Bond"
+msgstr "Vez"
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 000000000..b1eb53662
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,2129 @@
+# Turkish translation for NetworkManager.
+# Copyright (c) 2006 Canonical Ltd, and Rosetta Contributors
+# This file is distributed under the same license as the NetworkManager package.
+#
+# Alperen Yusuf Aybar <alperen@aybar.biz>, 2006.
+# Muhammet Kara <muhammet.k@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: NetworkManager master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-01-03 03:24+0000\n"
+"PO-Revision-Date: 2012-01-03 22:59+0000\n"
+"Last-Translator: Muhammet Kara <muhammet.k@gmail.com>\n"
+"Language-Team: Turkish <gnome-turk@gnome.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Launchpad-Export-Date: 2012-01-03 09:56+0000\n"
+"X-Generator: Lokalize 1.2\n"
+"Language: tr\n"
+
+#: ../cli/src/connections.c:55 ../cli/src/connections.c:72
+#: ../cli/src/devices.c:103 ../cli/src/devices.c:123 ../cli/src/devices.c:133
+#: ../cli/src/devices.c:143 ../cli/src/devices.c:157 ../cli/src/devices.c:171
+#: ../cli/src/devices.c:182 ../cli/src/devices.c:193 ../cli/src/devices.c:202
+#: ../cli/src/devices.c:211 ../cli/src/devices.c:233
+msgid "NAME"
+msgstr "İSİM"
+
+#. 0
+#: ../cli/src/connections.c:56 ../cli/src/connections.c:73
+msgid "UUID"
+msgstr "Kullanıcı Kimliği"
+
+#. 1
+#: ../cli/src/connections.c:57
+msgid "DEVICES"
+msgstr "AYGITLAR"
+
+#. 2
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:58 ../cli/src/devices.c:70
+#: ../cli/src/devices.c:110 ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "DURUM"
+
+#. 3
+#: ../cli/src/connections.c:59
+msgid "DEFAULT"
+msgstr "ÖNTANIMLI"
+
+#. 4
+#: ../cli/src/connections.c:60
+#| msgid "DEFAULT"
+msgid "DEFAULT6"
+msgstr "ÖNTANIMLI6"
+
+#. 5
+#: ../cli/src/connections.c:61
+msgid "SPEC-OBJECT"
+msgstr "BELİRLİ-NESNE"
+
+#. 6
+#: ../cli/src/connections.c:62
+msgid "VPN"
+msgstr "VPN"
+
+#. 7
+#. 6
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63 ../cli/src/connections.c:79
+#: ../cli/src/devices.c:71 ../cli/src/devices.c:223 ../cli/src/devices.c:239
+msgid "DBUS-PATH"
+msgstr "DBUS-YOLU"
+
+#. 8
+#: ../cli/src/connections.c:64
+msgid "ZONE"
+msgstr "BÖLGE"
+
+#. 1
+#. 0
+#. 1
+#. 2
+#: ../cli/src/connections.c:74 ../cli/src/devices.c:69
+#: ../cli/src/devices.c:105 ../cli/src/devices.c:236
+msgid "TYPE"
+msgstr "TÜR"
+
+#. 2
+#: ../cli/src/connections.c:75
+msgid "TIMESTAMP"
+msgstr "ZAMANDAMGASI"
+
+#. 3
+#: ../cli/src/connections.c:76
+msgid "TIMESTAMP-REAL"
+msgstr "ZAMANDAMGASI-GERÇEK"
+
+#. 4
+#: ../cli/src/connections.c:77
+msgid "AUTOCONNECT"
+msgstr "OTOMATİK-BAĞLANTI"
+
+#. 5
+#: ../cli/src/connections.c:78
+msgid "READONLY"
+msgstr "SALT-OKUNUR"
+
+#: ../cli/src/connections.c:149
+#, c-format
+msgid ""
+"Usage: nmcli con { COMMAND | help }\n"
+" COMMAND := { list | status | up | down | delete }\n"
+"\n"
+" list [id <id> | uuid <id>]\n"
+" status\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
+"nowait] [--timeout <timeout>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
+"<timeout>]\n"
+" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
+msgstr ""
+"Kullanımı: nmcli con { KOMUT | help }\n"
+" KOMUT := { list | status | up | down | delete }\n"
+"\n"
+" list [id <id> | uuid <id>]\n"
+" status\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <isim>] [--"
+"nowait] [--timeout <zamanaşımı>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
+"<zamanaşımı>]\n"
+" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
+
+#: ../cli/src/connections.c:203 ../cli/src/connections.c:536
+#, c-format
+msgid "Error: 'con list': %s"
+msgstr "Hata: 'bağ. listesi': %s"
+
+#: ../cli/src/connections.c:205 ../cli/src/connections.c:538
+#, c-format
+msgid "Error: 'con list': %s; allowed fields: %s"
+msgstr "Hata: 'bağlantı listesi': %s; izin verilen alanlar :%s"
+
+#: ../cli/src/connections.c:213
+msgid "Connection details"
+msgstr "Bağlantı ayrıntıları"
+
+#: ../cli/src/connections.c:411
+msgid "never"
+msgstr "hiçbir zaman"
+
+#. "CAPABILITIES"
+#. Print header
+#. "WIFI-PROPERTIES"
+#: ../cli/src/connections.c:412 ../cli/src/connections.c:413
+#: ../cli/src/connections.c:610 ../cli/src/connections.c:611
+#: ../cli/src/connections.c:613 ../cli/src/devices.c:510
+#: ../cli/src/devices.c:563 ../cli/src/devices.c:668 ../cli/src/devices.c:669
+#: ../cli/src/devices.c:699 ../cli/src/devices.c:725 ../cli/src/devices.c:726
+#: ../cli/src/devices.c:727 ../cli/src/devices.c:728 ../cli/src/devices.c:729
+#: ../cli/src/settings.c:572 ../cli/src/settings.c:642
+#: ../cli/src/settings.c:761 ../cli/src/settings.c:1043
+#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1046
+#: ../cli/src/settings.c:1048 ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1177 ../cli/src/settings.c:1178
+#: ../cli/src/settings.c:1179 ../cli/src/settings.c:1180
+#: ../cli/src/settings.c:1255 ../cli/src/settings.c:1256
+#: ../cli/src/settings.c:1257 ../cli/src/settings.c:1258
+#: ../cli/src/settings.c:1259 ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1338
+msgid "yes"
+msgstr "evet"
+
+#: ../cli/src/connections.c:412 ../cli/src/connections.c:413
+#: ../cli/src/connections.c:610 ../cli/src/connections.c:611
+#: ../cli/src/connections.c:613 ../cli/src/devices.c:510
+#: ../cli/src/devices.c:563 ../cli/src/devices.c:668 ../cli/src/devices.c:669
+#: ../cli/src/devices.c:699 ../cli/src/devices.c:725 ../cli/src/devices.c:726
+#: ../cli/src/devices.c:727 ../cli/src/devices.c:728 ../cli/src/devices.c:729
+#: ../cli/src/settings.c:572 ../cli/src/settings.c:574
+#: ../cli/src/settings.c:642 ../cli/src/settings.c:761
+#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044
+#: ../cli/src/settings.c:1046 ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049 ../cli/src/settings.c:1177
+#: ../cli/src/settings.c:1178 ../cli/src/settings.c:1179
+#: ../cli/src/settings.c:1180 ../cli/src/settings.c:1255
+#: ../cli/src/settings.c:1256 ../cli/src/settings.c:1257
+#: ../cli/src/settings.c:1258 ../cli/src/settings.c:1259
+#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1338
+msgid "no"
+msgstr "hayır"
+
+#: ../cli/src/connections.c:487
+msgid "Connection list"
+msgstr "Bağlantı listesi"
+
+#: ../cli/src/connections.c:500 ../cli/src/connections.c:1416
+#: ../cli/src/connections.c:1431 ../cli/src/connections.c:1440
+#: ../cli/src/connections.c:1450 ../cli/src/connections.c:1462
+#: ../cli/src/connections.c:1557 ../cli/src/connections.c:1640
+#: ../cli/src/devices.c:1202 ../cli/src/devices.c:1212
+#: ../cli/src/devices.c:1326 ../cli/src/devices.c:1334
+#: ../cli/src/devices.c:1547 ../cli/src/devices.c:1554
+#, c-format
+msgid "Error: %s argument is missing."
+msgstr "Hata: %s bağımsız değişken eksik."
+
+#: ../cli/src/connections.c:513
+#, c-format
+msgid "Error: %s - no such connection."
+msgstr "Hata: %s - böyle bir bağlantı yok."
+
+#: ../cli/src/connections.c:519 ../cli/src/connections.c:1475
+#: ../cli/src/connections.c:1574 ../cli/src/connections.c:1647
+#: ../cli/src/devices.c:999 ../cli/src/devices.c:1079
+#: ../cli/src/devices.c:1226 ../cli/src/devices.c:1340
+#: ../cli/src/devices.c:1560
+#, c-format
+msgid "Unknown parameter: %s\n"
+msgstr "Bilinmeyen değiştirge: %s\n"
+
+#: ../cli/src/connections.c:528
+#, c-format
+msgid "Error: no valid parameter specified."
+msgstr "Hata: geçerli bir değiştirge belirtilmedi."
+
+#: ../cli/src/connections.c:543 ../cli/src/connections.c:1728
+#: ../cli/src/devices.c:1768 ../cli/src/network-manager.c:456
+#, c-format
+msgid "Error: %s."
+msgstr "Hata: %s."
+
+#: ../cli/src/connections.c:556
+msgid "activating"
+msgstr "etkinleştiriliyor"
+
+#: ../cli/src/connections.c:558
+msgid "activated"
+msgstr "etkinleştirildi"
+
+#: ../cli/src/connections.c:560 ../cli/src/devices.c:303
+msgid "deactivating"
+msgstr "etkisizleştiriliyor"
+
+#: ../cli/src/connections.c:563 ../cli/src/connections.c:1255
+#: ../cli/src/connections.c:1288 ../cli/src/devices.c:307
+#: ../cli/src/devices.c:700 ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:527
+#: ../cli/src/utils.c:397
+msgid "unknown"
+msgstr "bilinmeyen"
+
+#: ../cli/src/connections.c:652
+#, c-format
+msgid "Error: 'con status': %s"
+msgstr "Hata: 'bağlantı durumu':%s"
+
+#: ../cli/src/connections.c:654
+#, c-format
+msgid "Error: 'con status': %s; allowed fields: %s"
+msgstr "Hata: 'bağlantı durumu': %s; izin verilen alanlar :%s"
+
+#: ../cli/src/connections.c:662 ../cli/src/connections.c:1490
+#: ../cli/src/connections.c:1589 ../cli/src/connections.c:1661
+#: ../cli/src/devices.c:1026 ../cli/src/devices.c:1088
+#: ../cli/src/devices.c:1241 ../cli/src/devices.c:1370
+#: ../cli/src/devices.c:1589
+#, c-format
+msgid "Error: Can't find out if NetworkManager is running: %s."
+msgstr "Hata: Ağ Yöneticisi çalışıyorsa bulunamıyor: %s"
+
+#: ../cli/src/connections.c:666 ../cli/src/connections.c:1494
+#: ../cli/src/connections.c:1593 ../cli/src/connections.c:1665
+#: ../cli/src/devices.c:1030 ../cli/src/devices.c:1092
+#: ../cli/src/devices.c:1245 ../cli/src/devices.c:1374
+#: ../cli/src/devices.c:1593
+#, c-format
+msgid "Error: NetworkManager is not running."
+msgstr "Hata: Ağ Yöneticisi çalışmıyor."
+
+#: ../cli/src/connections.c:674
+msgid "Active connections"
+msgstr "Etkin bağlantılar"
+
+#: ../cli/src/connections.c:1149
+#, c-format
+msgid "no active connection on device '%s'"
+msgstr "'%s' aygıtı üzerinde etkin bir bağlantı yok"
+
+#: ../cli/src/connections.c:1157
+#, c-format
+msgid "no active connection or device"
+msgstr "etkin bağlantı veya aygıt yok"
+
+#: ../cli/src/connections.c:1228
+#, c-format
+msgid "device '%s' not compatible with connection '%s'"
+msgstr "'%s aygıtı '%s' bağlantısı ile uyumlu değil"
+
+#: ../cli/src/connections.c:1230
+#, c-format
+msgid "no device found for connection '%s'"
+msgstr "'%s' bağlantısı için aygıt bulunamadı"
+
+#: ../cli/src/connections.c:1241
+msgid "VPN connecting (prepare)"
+msgstr "VPN bağlantısı (hazırlama)"
+
+#: ../cli/src/connections.c:1243
+msgid "VPN connecting (need authentication)"
+msgstr "VPN bağlantısı (kimlik doğrulama gerekiyor)"
+
+#: ../cli/src/connections.c:1245
+msgid "VPN connecting"
+msgstr "VPN bağlantısı"
+
+#: ../cli/src/connections.c:1247
+msgid "VPN connecting (getting IP configuration)"
+msgstr "VPN bağlantısı (IP yapılandırması alınıyor)"
+
+#: ../cli/src/connections.c:1249
+msgid "VPN connected"
+msgstr "VPN bağlı"
+
+#: ../cli/src/connections.c:1251
+msgid "VPN connection failed"
+msgstr "VPN bağlantısı başarısız"
+
+#: ../cli/src/connections.c:1253
+msgid "VPN disconnected"
+msgstr "VPN bağlı değil"
+
+#: ../cli/src/connections.c:1264
+msgid "unknown reason"
+msgstr "bilinmeyen neden"
+
+#: ../cli/src/connections.c:1266
+msgid "none"
+msgstr "yok"
+
+#: ../cli/src/connections.c:1268
+msgid "the user was disconnected"
+msgstr "kullanıcı bağlantısı kesildi"
+
+#: ../cli/src/connections.c:1270
+msgid "the base network connection was interrupted"
+msgstr "ana ağ bağlantısı yarıda kesildi"
+
+#: ../cli/src/connections.c:1272
+msgid "the VPN service stopped unexpectedly"
+msgstr "VPN hizmeti beklenmedik bir biçimde durdu"
+
+#: ../cli/src/connections.c:1274
+msgid "the VPN service returned invalid configuration"
+msgstr "VPN hizmeti geçersiz bir yapılandırma döndürdü"
+
+#: ../cli/src/connections.c:1276
+msgid "the connection attempt timed out"
+msgstr "bağlantı denemesi zaman aşımına uğradı"
+
+#: ../cli/src/connections.c:1278
+msgid "the VPN service did not start in time"
+msgstr "VPN hizmeti zamanında başlatılmadı"
+
+#: ../cli/src/connections.c:1280
+msgid "the VPN service failed to start"
+msgstr "VPN hizmeti başlatılamadı"
+
+#: ../cli/src/connections.c:1282
+msgid "no valid VPN secrets"
+msgstr "geçerli bir VPN parolası yok"
+
+#: ../cli/src/connections.c:1284
+msgid "invalid VPN secrets"
+msgstr "geçersiz VPN parolaları"
+
+#: ../cli/src/connections.c:1286
+msgid "the connection was removed"
+msgstr "bağlantı kaldırıldı"
+
+#: ../cli/src/connections.c:1300
+#, c-format
+msgid "state: %s\n"
+msgstr "durum: %s\n"
+
+#: ../cli/src/connections.c:1303 ../cli/src/connections.c:1329
+#, c-format
+msgid "Connection activated\n"
+msgstr "Bağlantı etkinleştirildi\n"
+
+#: ../cli/src/connections.c:1306
+#, c-format
+msgid "Error: Connection activation failed."
+msgstr "Hata: Bağlantı etkinleştirilemedi."
+
+#: ../cli/src/connections.c:1325
+#, c-format
+msgid "state: %s (%d)\n"
+msgstr "durum: %s (%d)\n"
+
+#: ../cli/src/connections.c:1335
+#, c-format
+msgid "Error: Connection activation failed: %s."
+msgstr "Hata: Bağlantı etkinleştirilemedi: %s."
+
+#: ../cli/src/connections.c:1352 ../cli/src/devices.c:1148
+#, c-format
+msgid "Error: Timeout %d sec expired."
+msgstr "Hata: %d saniye zaman aşımı sona erdi."
+
+#: ../cli/src/connections.c:1365
+#, c-format
+msgid "Error: Connection activation failed: %s"
+msgstr "Hata: Bağlantı etkinleştirilemedi: %s"
+
+#: ../cli/src/connections.c:1371
+#, c-format
+msgid "Active connection state: %s\n"
+msgstr "Etkin bağlantı durumu: %s\n"
+
+#: ../cli/src/connections.c:1372
+#, c-format
+msgid "Active connection path: %s\n"
+msgstr "Etkin bağlantı yolu: %s\n"
+
+#: ../cli/src/connections.c:1424 ../cli/src/connections.c:1565
+#: ../cli/src/connections.c:1674
+#, c-format
+msgid "Error: Unknown connection: %s."
+msgstr "Hata: Bilinmeyen bağlantı: %s."
+
+#: ../cli/src/connections.c:1470 ../cli/src/devices.c:1220
+#, c-format
+msgid "Error: timeout value '%s' is not valid."
+msgstr "Hata: '%s' zaman aşımı değeri geçerli değil."
+
+#: ../cli/src/connections.c:1483 ../cli/src/connections.c:1582
+#: ../cli/src/connections.c:1654
+#, c-format
+msgid "Error: id or uuid has to be specified."
+msgstr "Hata: id veya uuid değeri belirtilmeli."
+
+#: ../cli/src/connections.c:1511
+#, c-format
+msgid "Error: No suitable device found: %s."
+msgstr "Hata: Uygun bir aygıt bulunamadı: %s."
+
+#: ../cli/src/connections.c:1513
+#, c-format
+msgid "Error: No suitable device found."
+msgstr "Hata: Uygun bir aygıt bulunamadı."
+
+#: ../cli/src/connections.c:1618
+#, c-format
+msgid "Warning: Connection not active\n"
+msgstr "Uyarı: Bağlantı etkin değil\n"
+
+#: ../cli/src/connections.c:1719
+#, c-format
+msgid "Error: 'con' command '%s' is not valid."
+msgstr "HATA: 'bağlantı' '%s' komutu geçerli değil"
+
+#: ../cli/src/connections.c:1784
+#, c-format
+msgid "Error: could not connect to D-Bus."
+msgstr "Hata: D-Bus'a bağlanılamadı."
+
+#: ../cli/src/connections.c:1792
+#, c-format
+msgid "Error: Could not get system settings."
+msgstr "Hata: Sistem ayarları alınamadı."
+
+#: ../cli/src/connections.c:1802
+#, c-format
+msgid "Error: Can't obtain connections: settings service is not running."
+msgstr "Hata: Bağlantılar alınamıyor: ayarlar hizmeti çalışmıyor."
+
+#. 0
+#. 9
+#. 3
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:104 ../cli/src/devices.c:221
+#: ../cli/src/devices.c:237
+msgid "DEVICE"
+msgstr "AYGIT"
+
+#: ../cli/src/devices.c:80
+msgid "GENERAL"
+msgstr "GENEL"
+
+#. 0
+#: ../cli/src/devices.c:81
+msgid "CAPABILITIES"
+msgstr "YETENEKLER"
+
+#. 1
+#: ../cli/src/devices.c:82
+msgid "WIFI-PROPERTIES"
+msgstr "WIFI-ÖZELLİKLER"
+
+#. 2
+#: ../cli/src/devices.c:83
+msgid "AP"
+msgstr "AP"
+
+#. 3
+#: ../cli/src/devices.c:84
+msgid "WIRED-PROPERTIES"
+msgstr "KABLOLU-ÖZELLİKLER"
+
+#. 4
+#: ../cli/src/devices.c:85
+msgid "WIMAX-PROPERTIES"
+msgstr "WIMAX-ÖZELLİKLERİ"
+
+#. 5
+#. 0
+#: ../cli/src/devices.c:86 ../cli/src/devices.c:234
+msgid "NSP"
+msgstr "NSP"
+
+#. 6
+#: ../cli/src/devices.c:87
+msgid "IP4-SETTINGS"
+msgstr "IP4-AYARLAR"
+
+#. 7
+#: ../cli/src/devices.c:88
+msgid "IP4-DNS"
+msgstr "IP4-DNS"
+
+#. 8
+#: ../cli/src/devices.c:89
+msgid "IP6-SETTINGS"
+msgstr "IP6-AYARLARL"
+
+#. 9
+#: ../cli/src/devices.c:90
+msgid "IP6-DNS"
+msgstr "IP6-DNS"
+
+#. 2
+#: ../cli/src/devices.c:106
+msgid "VENDOR"
+msgstr "SATICI"
+
+#. 3
+#: ../cli/src/devices.c:107
+msgid "PRODUCT"
+msgstr "ÜRÜN"
+
+#. 4
+#: ../cli/src/devices.c:108
+msgid "DRIVER"
+msgstr "SÜRÜCÜ"
+
+#. 5
+#: ../cli/src/devices.c:109
+msgid "HWADDR"
+msgstr "HWADDR"
+
+#. 7
+#: ../cli/src/devices.c:111
+msgid "UDI"
+msgstr "UDI"
+
+#. 8
+#: ../cli/src/devices.c:112
+msgid "IP-IFACE"
+msgstr "IP-IFACE"
+
+#. 9
+#: ../cli/src/devices.c:113
+msgid "NM-MANAGED"
+msgstr "AY-YÖNETİMLİ"
+
+#. 10
+#: ../cli/src/devices.c:114
+msgid "FIRMWARE-MISSING"
+msgstr "AYGIT-YAZILIMI-EKSİK"
+
+#. 11
+#: ../cli/src/devices.c:115
+#| msgid "AUTOCONNECT"
+msgid "CONNECTION"
+msgstr "BAĞLANTI"
+
+#. 0
+#: ../cli/src/devices.c:124
+msgid "CARRIER-DETECT"
+msgstr "TAŞIYICI-ALGILAMA"
+
+#. 1
+#: ../cli/src/devices.c:125
+msgid "SPEED"
+msgstr "HIZ"
+
+#. 0
+#: ../cli/src/devices.c:134
+msgid "CARRIER"
+msgstr "TAŞIYICI"
+
+#. 0
+#: ../cli/src/devices.c:144
+msgid "WEP"
+msgstr "WEP"
+
+#. 1
+#: ../cli/src/devices.c:145
+msgid "WPA"
+msgstr "WPA"
+
+#. 2
+#: ../cli/src/devices.c:146
+msgid "WPA2"
+msgstr "WPA2"
+
+#. 3
+#: ../cli/src/devices.c:147
+msgid "TKIP"
+msgstr "TKIP"
+
+#. 4
+#: ../cli/src/devices.c:148
+msgid "CCMP"
+msgstr "CCMP"
+
+#. 0
+#: ../cli/src/devices.c:158
+msgid "CTR-FREQ"
+msgstr "CTR-FREK"
+
+#. 1
+#: ../cli/src/devices.c:159
+msgid "RSSI"
+msgstr "RSSI"
+
+#. 2
+#: ../cli/src/devices.c:160
+msgid "CINR"
+msgstr "CINR"
+
+#. 3
+#: ../cli/src/devices.c:161
+msgid "TX-POW"
+msgstr "TX-POW"
+
+#. 4
+#: ../cli/src/devices.c:162
+msgid "BSID"
+msgstr "BSID"
+
+#. 0
+#: ../cli/src/devices.c:172 ../cli/src/devices.c:183
+msgid "ADDRESS"
+msgstr "ADRES"
+
+#. 1
+#: ../cli/src/devices.c:173 ../cli/src/devices.c:184
+msgid "PREFIX"
+msgstr "ÖNEK"
+
+#. 2
+#: ../cli/src/devices.c:174 ../cli/src/devices.c:185
+msgid "GATEWAY"
+msgstr "AĞ GEÇİDİ"
+
+#. 0
+#: ../cli/src/devices.c:194 ../cli/src/devices.c:203
+msgid "DNS"
+msgstr "DNS"
+
+#. 0
+#: ../cli/src/devices.c:212
+msgid "SSID"
+msgstr "SSID"
+
+#. 1
+#: ../cli/src/devices.c:213
+msgid "BSSID"
+msgstr "BSSID"
+
+#. 2
+#: ../cli/src/devices.c:214
+msgid "MODE"
+msgstr "KİP"
+
+#. 3
+#: ../cli/src/devices.c:215
+msgid "FREQ"
+msgstr "FREKANS"
+
+#. 4
+#: ../cli/src/devices.c:216
+msgid "RATE"
+msgstr "ORAN"
+
+#. 5
+#. 1
+#: ../cli/src/devices.c:217 ../cli/src/devices.c:235
+msgid "SIGNAL"
+msgstr "SiNYAL"
+
+#. 6
+#: ../cli/src/devices.c:218
+msgid "SECURITY"
+msgstr "GÜVENLİK"
+
+#. 7
+#: ../cli/src/devices.c:219
+msgid "WPA-FLAGS"
+msgstr "WPA-BAYRAKLAR"
+
+#. 8
+#: ../cli/src/devices.c:220
+msgid "RSN-FLAGS"
+msgstr "RSN-BAYRAKLAR"
+
+#. 10
+#. 4
+#: ../cli/src/devices.c:222 ../cli/src/devices.c:238
+msgid "ACTIVE"
+msgstr "ETKİN"
+
+#: ../cli/src/devices.c:255
+#, c-format
+msgid ""
+"Usage: nmcli dev { COMMAND | help }\n"
+"\n"
+" COMMAND := { status | list | disconnect | wifi | wimax }\n"
+"\n"
+" COMMAND := { status | list | disconnect | wifi }\n"
+"\n"
+" status\n"
+" list [iface <iface>]\n"
+" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <name>]]\n"
+"\n"
+msgstr ""
+"Kullanımı: nmcli dev { KOMUT | help }\n"
+"\n"
+" KOMUT := { status | list | disconnect | wifi | wimax }\n"
+"\n"
+" KOMUT := { status | list | disconnect | wifi }\n"
+"\n"
+" status\n"
+" list [iface <iface>]\n"
+" disconnect iface <iface> [--nowait] [--timeout <zamanaşımı>]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
+" wimax [list [iface <iface>] [nsp <isim>]]\n"
+"\n"
+
+#: ../cli/src/devices.c:283
+msgid "unmanaged"
+msgstr "yönetilmeyen"
+
+#: ../cli/src/devices.c:285
+msgid "unavailable"
+msgstr "mevcut değil"
+
+#: ../cli/src/devices.c:287 ../cli/src/network-manager.c:108
+msgid "disconnected"
+msgstr "bağlantı kesildi"
+
+#: ../cli/src/devices.c:289
+msgid "connecting (prepare)"
+msgstr "bağlanıyor (hazırlama)"
+
+#: ../cli/src/devices.c:291
+msgid "connecting (configuring)"
+msgstr "bağlanıyor (yapılandırılıyor)"
+
+#: ../cli/src/devices.c:293
+msgid "connecting (need authentication)"
+msgstr "bağlanıyor (kimlik doğrulama gerekiyor)"
+
+#: ../cli/src/devices.c:295
+msgid "connecting (getting IP configuration)"
+msgstr "bağlanıyor (IP yapılandırması alınıyor)"
+
+#: ../cli/src/devices.c:297
+msgid "connecting (checking IP connectivity)"
+msgstr "bağlanılıyor (IP bağlanılırlığı denetleniyor)"
+
+#: ../cli/src/devices.c:299
+msgid "connecting (starting secondary connections)"
+msgstr "bağlanılıyor (ikincil bağlantılar başlatılıyor)"
+
+#: ../cli/src/devices.c:301 ../cli/src/network-manager.c:104
+msgid "connected"
+msgstr "bağlandı"
+
+#: ../cli/src/devices.c:305
+msgid "connection failed"
+msgstr "bağlantı başarısız"
+
+#: ../cli/src/devices.c:330 ../cli/src/devices.c:342 ../cli/src/devices.c:502
+#: ../cli/src/devices.c:546
+msgid "Unknown"
+msgstr "Bilinmeyen"
+
+#: ../cli/src/devices.c:375
+msgid "(none)"
+msgstr "(hiçbiri)"
+
+#: ../cli/src/devices.c:400
+#, c-format
+msgid "%s: error converting IP4 address 0x%X"
+msgstr "%s: IPv4 adresi dönüştürülürken hata 0x%X"
+
+#: ../cli/src/devices.c:471
+#, c-format
+msgid "%u MHz"
+msgstr "%u MHz"
+
+#: ../cli/src/devices.c:472
+#, c-format
+msgid "%u MB/s"
+msgstr "%u MB/s"
+
+#: ../cli/src/devices.c:481
+msgid "Encrypted: "
+msgstr "Şifreli: "
+
+#: ../cli/src/devices.c:486
+msgid "WEP "
+msgstr "WEP "
+
+#: ../cli/src/devices.c:488
+msgid "WPA "
+msgstr "WPA "
+
+#: ../cli/src/devices.c:490
+msgid "WPA2 "
+msgstr "WPA2 "
+
+#: ../cli/src/devices.c:493
+msgid "Enterprise "
+msgstr "Kurumsal "
+
+#: ../cli/src/devices.c:502
+msgid "Ad-Hoc"
+msgstr "Ad-Hoc"
+
+#: ../cli/src/devices.c:502
+msgid "Infrastructure"
+msgstr "Altyapı"
+
+#: ../cli/src/devices.c:537
+msgid "Home"
+msgstr "Ev"
+
+#: ../cli/src/devices.c:540
+msgid "Partner"
+msgstr "Ortak"
+
+#: ../cli/src/devices.c:543
+msgid "Roaming"
+msgstr "Dolaşım"
+
+#: ../cli/src/devices.c:614
+#, c-format
+msgid "Error: 'dev list': %s"
+msgstr "Hata: 'dev list':%s"
+
+#: ../cli/src/devices.c:616
+#, c-format
+msgid "Error: 'dev list': %s; allowed fields: %s"
+msgstr "Hata: 'dev list':%s; izin verilen alanlar :%s"
+
+#: ../cli/src/devices.c:625
+msgid "Device details"
+msgstr "Aygıt ayrıntıları"
+
+#: ../cli/src/devices.c:663 ../cli/src/devices.c:664 ../cli/src/devices.c:1164
+#: ../cli/src/utils.c:343
+msgid "(unknown)"
+msgstr "(bilinmeyen)"
+
+#: ../cli/src/devices.c:671
+#| msgid "connected"
+msgid "not connected"
+msgstr "bağlı değil"
+
+#: ../cli/src/devices.c:696
+#, c-format
+msgid "%u Mb/s"
+msgstr "%u Mb/s"
+
+#. Print header
+#. "WIRED-PROPERTIES"
+#: ../cli/src/devices.c:769
+msgid "on"
+msgstr "açık"
+
+#: ../cli/src/devices.c:769
+msgid "off"
+msgstr "kapalı"
+
+#: ../cli/src/devices.c:1016
+#, c-format
+msgid "Error: 'dev status': %s"
+msgstr "Hata: 'dev status':%s"
+
+#: ../cli/src/devices.c:1018
+#, c-format
+msgid "Error: 'dev status': %s; allowed fields: %s"
+msgstr "Hata: 'dev status': %s; izin verilen alanlar: %s"
+
+#: ../cli/src/devices.c:1041
+msgid "Status of devices"
+msgstr "Aygıtların durumu"
+
+#: ../cli/src/devices.c:1072
+#, c-format
+msgid "Error: '%s' argument is missing."
+msgstr "Hata: '%s' değişkeni bulunamadı."
+
+#: ../cli/src/devices.c:1113 ../cli/src/devices.c:1265
+#: ../cli/src/devices.c:1402 ../cli/src/devices.c:1621
+#, c-format
+msgid "Error: Device '%s' not found."
+msgstr "Hata: '%s' aygıtı bulunamadı."
+
+#: ../cli/src/devices.c:1136
+#, c-format
+msgid "Success: Device '%s' successfully disconnected."
+msgstr "Başarılı: '%s' aygıtının bağlantısı başarıyla kesildi."
+
+#: ../cli/src/devices.c:1161
+#, c-format
+msgid "Error: Device '%s' (%s) disconnecting failed: %s"
+msgstr "Hata: '%s' aygıtının (%s) bağlantısı kesilemedi: %s"
+
+#: ../cli/src/devices.c:1169
+#, c-format
+msgid "Device state: %d (%s)\n"
+msgstr "Aygıt durumu: %d (%s)\n"
+
+#: ../cli/src/devices.c:1234
+#, c-format
+msgid "Error: iface has to be specified."
+msgstr "Hata: iface belirtilmeli."
+
+#: ../cli/src/devices.c:1360
+#, c-format
+msgid "Error: 'dev wifi': %s"
+msgstr "Hata: 'dev wifi': %s"
+
+#: ../cli/src/devices.c:1362
+#, c-format
+msgid "Error: 'dev wifi': %s; allowed fields: %s"
+msgstr "Hata: 'dev wifi': %s; izin verilen alanlar: %s"
+
+#: ../cli/src/devices.c:1385
+msgid "WiFi scan list"
+msgstr "WiFi tarama listesi"
+
+#: ../cli/src/devices.c:1422 ../cli/src/devices.c:1476
+#, c-format
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "Hata: '%s' bssid'li erişim noktası bulunamadı."
+
+#: ../cli/src/devices.c:1439
+#, c-format
+msgid "Error: Device '%s' is not a WiFi device."
+msgstr "Hata: '%s' aygıtı bir WiFi aygıtı değil."
+
+#: ../cli/src/devices.c:1503
+#, c-format
+msgid "Error: 'dev wifi' command '%s' is not valid."
+msgstr "Hata: 'dev wifi' komut '%s' tanımlı değil."
+
+#: ../cli/src/devices.c:1579
+#, c-format
+msgid "Error: 'dev wimax': %s"
+msgstr "Hata: 'dev wimax': %s"
+
+#: ../cli/src/devices.c:1581
+#, c-format
+msgid "Error: 'dev wimax': %s; allowed fields: %s"
+msgstr "Hara: 'dev wimax': %s; izin verilen alanlar: %s"
+
+#: ../cli/src/devices.c:1604
+msgid "WiMAX NSP list"
+msgstr "WiMAX NSP listesi"
+
+#: ../cli/src/devices.c:1641
+#, c-format
+msgid "Error: NSP with name '%s' not found."
+msgstr "Hata: '%s' adlı NSP bulunamadı."
+
+#: ../cli/src/devices.c:1652
+#, c-format
+msgid "Error: Device '%s' is not a WiMAX device."
+msgstr "Hata: '%s' aygıtı bir WiMAX aygıtı değil."
+
+#: ../cli/src/devices.c:1683
+#, c-format
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "Hata: '%s' nsp'li erişim noktası bulunamadı."
+
+#: ../cli/src/devices.c:1710
+#, c-format
+msgid "Error: 'dev wimax' command '%s' is not valid."
+msgstr "Hata: 'dev wimax' komutu '%s' geçerli değil."
+
+#: ../cli/src/devices.c:1760
+#, c-format
+msgid "Error: 'dev' command '%s' is not valid."
+msgstr "Hata: 'dev' komut '%s' tanımlı değil."
+
+#: ../cli/src/network-manager.c:37
+msgid "RUNNING"
+msgstr "ÇALIŞIYOR"
+
+#. 0
+#: ../cli/src/network-manager.c:38
+msgid "VERSION"
+msgstr "SÜRÜM"
+
+#. 2
+#: ../cli/src/network-manager.c:40
+msgid "NET-ENABLED"
+msgstr "NET-ENABLED"
+
+#. 3
+#: ../cli/src/network-manager.c:41
+msgid "WIFI-HARDWARE"
+msgstr "WIFI-DONANIM"
+
+#. 4
+#: ../cli/src/network-manager.c:42
+msgid "WIFI"
+msgstr "WIFI"
+
+#. 5
+#: ../cli/src/network-manager.c:43
+msgid "WWAN-HARDWARE"
+msgstr "WWAN-DONANIM"
+
+#. 6
+#: ../cli/src/network-manager.c:44
+msgid "WWAN"
+msgstr "WWAN"
+
+#. 7
+#: ../cli/src/network-manager.c:45
+msgid "WIMAX-HARDWARE"
+msgstr "WIMAX-DONANIMI"
+
+#. 8
+#: ../cli/src/network-manager.c:46
+msgid "WIMAX"
+msgstr "WIMAX"
+
+#: ../cli/src/network-manager.c:67
+#, c-format
+msgid ""
+"Usage: nmcli nm { COMMAND | help }\n"
+"\n"
+" COMMAND := { status | enable | sleep | wifi | wwan | wimax }\n"
+"\n"
+" COMMAND := { status | enable | sleep | wifi | wwan }\n"
+"\n"
+" status\n"
+" enable [true|false]\n"
+" sleep [true|false]\n"
+" wifi [on|off]\n"
+" wwan [on|off]\n"
+" wimax [on|off]\n"
+"\n"
+msgstr ""
+"Kullanımı: nmcli nm { KOMUT | help }\n"
+"\n"
+" KOMUT := { status | enable | sleep | wifi | wwan | wimax }\n"
+"\n"
+" KOMUT := { status | enable | sleep | wifi | wwan }\n"
+"\n"
+" status\n"
+" enable [true|false]\n"
+" sleep [true|false]\n"
+" wifi [on|off]\n"
+" wwan [on|off]\n"
+" wimax [on|off]\n"
+"\n"
+
+#: ../cli/src/network-manager.c:96
+msgid "asleep"
+msgstr "uykuda"
+
+#: ../cli/src/network-manager.c:98
+msgid "connecting"
+msgstr "bağlanıyor"
+
+#: ../cli/src/network-manager.c:100
+msgid "connected (local only)"
+msgstr "bağlandı (sadece yerel)"
+
+#: ../cli/src/network-manager.c:102
+msgid "connected (site only)"
+msgstr "bağlandı (sadece siteye)"
+
+#: ../cli/src/network-manager.c:106
+msgid "disconnecting"
+msgstr "bağlantı kesiliyor"
+
+#: ../cli/src/network-manager.c:146
+#, c-format
+msgid "Error: 'nm status': %s"
+msgstr "Hata: 'nm durumu': %s"
+
+#: ../cli/src/network-manager.c:148
+#, c-format
+msgid "Error: 'nm status': %s; allowed fields: %s"
+msgstr "Hata: 'nm status': %s; izin verilen alanlar: %s"
+
+#. create NMClient
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
+msgid "enabled"
+msgstr "etkin"
+
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
+msgid "disabled"
+msgstr "etkin değil"
+
+#: ../cli/src/network-manager.c:181
+msgid "NetworkManager status"
+msgstr "NetworkManager durumu"
+
+#. Print header
+#: ../cli/src/network-manager.c:184
+msgid "running"
+msgstr "çalışıyor"
+
+#: ../cli/src/network-manager.c:184
+msgid "not running"
+msgstr "çalışmıyor"
+
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:323
+#, c-format
+msgid "Error: Couldn't connect to system bus: %s"
+msgstr "Hata: Sistem veri yoluna bağlanamadı: %s"
+
+#: ../cli/src/network-manager.c:226
+#, c-format
+msgid "Error: Couldn't create D-Bus object proxy."
+msgstr "Hata: D-Bus nesnesi proxy oluşturamadı."
+
+#: ../cli/src/network-manager.c:232
+#, c-format
+msgid "Error in sleep: %s"
+msgstr "Uyku hatası: %s"
+
+#: ../cli/src/network-manager.c:276 ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369 ../cli/src/network-manager.c:408
+#, c-format
+msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
+msgstr ""
+"Hata: '--fields' değeri olan '%s' burada geçerli değil; izin verilen "
+"alanlar: %s"
+
+#: ../cli/src/network-manager.c:284
+msgid "Networking enabled"
+msgstr "Ağ oluşturma etkinleştirildi"
+
+#: ../cli/src/network-manager.c:300
+#, c-format
+msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
+msgstr ""
+"Hata: geçersiz 'enable' parametresi: %s'; kullanım 'true' yada 'false'."
+
+#: ../cli/src/network-manager.c:310
+#, c-format
+msgid "Error: Sleeping status is not exported by NetworkManager."
+msgstr "Hata: Uyku durumu Ağ Yöneticisi ile verilemez."
+
+#: ../cli/src/network-manager.c:318
+#, c-format
+msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
+msgstr "Hata: geçersiz 'sleep' parametresi: %s'; kullanım 'true' yada 'false'."
+
+#: ../cli/src/network-manager.c:339
+msgid "WiFi enabled"
+msgstr "WiFi etkin"
+
+#: ../cli/src/network-manager.c:355
+#, c-format
+msgid "Error: invalid 'wifi' parameter: '%s'."
+msgstr "Hata: geçersiz 'wifi' parametresi: '%s'."
+
+#: ../cli/src/network-manager.c:377
+msgid "WWAN enabled"
+msgstr "WWAN etkin"
+
+#: ../cli/src/network-manager.c:393
+#, c-format
+msgid "Error: invalid 'wwan' parameter: '%s'."
+msgstr "Hata: geçersiz 'wwan parametresi: '%s'."
+
+#: ../cli/src/network-manager.c:416
+msgid "WiMAX enabled"
+msgstr "WiMAX etkin"
+
+#: ../cli/src/network-manager.c:432
+#, c-format
+msgid "Error: invalid 'wimax' parameter: '%s'."
+msgstr "Hata: geçersiz 'wimax' değiştirgesi: '%s'."
+
+#: ../cli/src/network-manager.c:445
+#, c-format
+msgid "Error: 'nm' command '%s' is not valid."
+msgstr "Hata: '%s' nm komutu geçerli değil."
+
+#: ../cli/src/nmcli.c:64
+#, c-format
+msgid ""
+"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n"
+"\n"
+"OPTIONS\n"
+" -t[erse] terse output\n"
+" -p[retty] pretty output\n"
+" -m[ode] tabular|multiline output mode\n"
+" -f[ields] <field1,field2,...>|all|common specify fields to output\n"
+" -e[scape] yes|no escape columns separators in "
+"values\n"
+" -n[ocheck] don't check nmcli and "
+"NetworkManager versions\n"
+" -v[ersion] show program version\n"
+" -h[elp] print this help\n"
+"\n"
+"OBJECT\n"
+" nm NetworkManager status\n"
+" con NetworkManager connections\n"
+" dev devices managed by NetworkManager\n"
+"\n"
+msgstr ""
+"Kullanımı: %s [SEÇENEKLER] NESNE { KOMUT | help }\n"
+"\n"
+"SEÇENEKLER\n"
+" -t[erse] kısa ve öz çıktı\n"
+" -p[retty] güzel çıktı\n"
+" -m[ode] tabular|multiline çıktı kipi\n"
+" -f[ields] <field1,field2,...>|all|common çıktıda yer alacak alanları "
+"belirtir\n"
+" -e[scape] yes|no değerler arasındaki sütun "
+"ayraçları\n"
+" -n[ocheck] nmcli ve NetworkManager "
+"sürümlerini denetleme\n"
+" -v[ersion] program sürümünü göster\n"
+" -h[elp] bu yardımı ekrana yaz\n"
+"\n"
+"NESNE\n"
+" nm NetworkManager durumu\n"
+" con NetworkManager bağlantıları\n"
+" dev NetworkManager tarafından yönetilen aygıtlar\n"
+"\n"
+
+#: ../cli/src/nmcli.c:109
+#, c-format
+msgid "Error: Object '%s' is unknown, try 'nmcli help'."
+msgstr "Hata: '%s' nesnesi bilinmiyor, 'nmcli help' komutunu deneyin."
+
+#: ../cli/src/nmcli.c:139
+#, c-format
+msgid "Error: Option '--terse' is specified the second time."
+msgstr "Hata: '--terse' seçeneği ikinci zaman için belirlenmiş."
+
+#: ../cli/src/nmcli.c:144
+#, c-format
+msgid "Error: Option '--terse' is mutually exclusive with '--pretty'."
+msgstr "Hata: '--terse' parametresi '--pretty' parametresi ile çakışıyor."
+
+#: ../cli/src/nmcli.c:152
+#, c-format
+msgid "Error: Option '--pretty' is specified the second time."
+msgstr "Hata: '--pretty' seçeneği ikinci zaman için belirlenmiş."
+
+#: ../cli/src/nmcli.c:157
+#, c-format
+msgid "Error: Option '--pretty' is mutually exclusive with '--terse'."
+msgstr "Hata: '--pretty' parametresi '--terse' parametresi ile çakışıyor."
+
+#: ../cli/src/nmcli.c:167 ../cli/src/nmcli.c:183
+#, c-format
+msgid "Error: missing argument for '%s' option."
+msgstr "Hata: '%s' seçeneği için eksik değişken."
+
+#: ../cli/src/nmcli.c:176 ../cli/src/nmcli.c:192
+#, c-format
+msgid "Error: '%s' is not valid argument for '%s' option."
+msgstr "Hata: '%s', '%s' seçeneği için geçerli bir değişken değil."
+
+#: ../cli/src/nmcli.c:199
+#, c-format
+msgid "Error: fields for '%s' options are missing."
+msgstr "Hata: '%s' seçeneği için alanlar eksik."
+
+#: ../cli/src/nmcli.c:207
+#, c-format
+msgid "nmcli tool, version %s\n"
+msgstr "nmcli aracı, sürüm %s\n"
+
+#: ../cli/src/nmcli.c:213
+#, c-format
+msgid "Error: Option '%s' is unknown, try 'nmcli -help'."
+msgstr "Hata: '%s' seçeneği bilinmiyor, 'nmcli-help' komutunu deneyin."
+
+#: ../cli/src/nmcli.c:232
+#, c-format
+msgid "Caught signal %d, shutting down..."
+msgstr "%d sinyali yakalandı, kapatılıyor..."
+
+#: ../cli/src/nmcli.c:257
+msgid "Error: Could not create NMClient object."
+msgstr "Hata: NMClient nesnesi oluşturulamadı."
+
+#: ../cli/src/nmcli.c:273
+msgid "Success"
+msgstr "Başarılı"
+
+#: ../cli/src/settings.c:461
+#, c-format
+msgid "%d (hex-ascii-key)"
+msgstr "%d (hex-ascii-key)"
+
+#: ../cli/src/settings.c:463
+#, c-format
+msgid "%d (104/128-bit passphrase)"
+msgstr "%d (104/128-bit parola)"
+
+#: ../cli/src/settings.c:466
+#, c-format
+msgid "%d (unknown)"
+msgstr "%d (bilinmeyen)"
+
+#: ../cli/src/settings.c:492
+msgid "0 (unknown)"
+msgstr "0 (bilinmeyen)"
+
+#: ../cli/src/settings.c:498
+msgid "any, "
+msgstr "herhangi, "
+
+#: ../cli/src/settings.c:500
+msgid "900 MHz, "
+msgstr "900 MHz, "
+
+#: ../cli/src/settings.c:502
+msgid "1800 MHz, "
+msgstr "1800 MHz, "
+
+#: ../cli/src/settings.c:504
+msgid "1900 MHz, "
+msgstr "1900 MHz, "
+
+#: ../cli/src/settings.c:506
+msgid "850 MHz, "
+msgstr "850 MHz, "
+
+#: ../cli/src/settings.c:508
+msgid "WCDMA 3GPP UMTS 2100 MHz, "
+msgstr "WCDMA 3GPP UMTS 2100 MHz, "
+
+#: ../cli/src/settings.c:510
+msgid "WCDMA 3GPP UMTS 1800 MHz, "
+msgstr "WCDMA 3GPP UMTS 1800 MHz, "
+
+#: ../cli/src/settings.c:512
+msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
+msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, "
+
+#: ../cli/src/settings.c:514
+msgid "WCDMA 3GPP UMTS 800 MHz, "
+msgstr "WCDMA 3GPP UMTS 800 MHz, "
+
+#: ../cli/src/settings.c:516
+msgid "WCDMA 3GPP UMTS 850 MHz, "
+msgstr "WCDMA 3GPP UMTS 850 MHz, "
+
+#: ../cli/src/settings.c:518
+msgid "WCDMA 3GPP UMTS 900 MHz, "
+msgstr "WCDMA 3GPP UMTS 900 MHz, "
+
+#: ../cli/src/settings.c:520
+msgid "WCDMA 3GPP UMTS 1700 MHz, "
+msgstr "WCDMA 3GPP UMTS 1700 MHz, "
+
+#: ../cli/src/settings.c:522
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 1900 MHz, "
+
+#: ../cli/src/settings.c:524
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2600 MHz, "
+
+#: ../cli/src/settings.c:646 ../cli/src/settings.c:841
+#: ../cli/src/settings.c:1545
+msgid "auto"
+msgstr "otomatik"
+
+#: ../cli/src/settings.c:835 ../cli/src/settings.c:838
+#: ../cli/src/settings.c:839 ../cli/src/utils.c:176
+msgid "not set"
+msgstr "ayarlanmamış"
+
+#: ../cli/src/utils.c:128
+#, c-format
+msgid "field '%s' has to be alone"
+msgstr "'%s' alanı boş olmalı"
+
+#: ../cli/src/utils.c:131
+#, c-format
+msgid "invalid field '%s'"
+msgstr "geçersiz alan '%s'"
+
+#: ../cli/src/utils.c:150
+#, c-format
+msgid "Option '--terse' requires specifying '--fields'"
+msgstr "'--terse' parametresi özel '--fields' parametresine ihtiyaç duyar"
+
+#: ../cli/src/utils.c:154
+#, c-format
+msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
+msgstr ""
+"'--terse' seçeneği özel '--fields' seçeneği değerlerini gerektirir, '%s' "
+"değil"
+
+#: ../cli/src/utils.c:334
+#, c-format
+msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
+msgstr "Hata: D-Bus nesnesi proxy için org.freedesktop.DBus oluşturulamadı"
+
+#: ../cli/src/utils.c:342
+#, c-format
+msgid "Error: NameHasOwner request failed: %s"
+msgstr "Hata: NameHasOwner isteği başarısız oldu: %s"
+
+#: ../cli/src/utils.c:387
+#, c-format
+msgid ""
+"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
+"nocheck to suppress the warning.\n"
+msgstr ""
+"Uyarı: nmcli (%s) ve NetworkManager (%s) sürümleri uyuşmuyor. Uyarıyı "
+"bastırmak için --nocheck seçeneğini kullanın.\n"
+
+#: ../cli/src/utils.c:396
+#, c-format
+msgid ""
+"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
+"execution using --nocheck, but the results are unpredictable."
+msgstr ""
+"Hata: nmcli (%s) ve NetworkManager (%s) sürümleri uyuşmuyor. --nocheck "
+"seçeneğini "
+"kullanarak işlemi zorlayabilirsiniz, fakat sonuçlar öngörülemez.\n."
+
+#: ../libnm-util/crypto.c:133
+#, c-format
+msgid "PEM key file had no end tag '%s'."
+msgstr "PEM anahtar dosyası '%s' son etiketine sahip değil."
+
+#: ../libnm-util/crypto.c:146
+#, c-format
+msgid "Doesn't look like a PEM private key file."
+msgstr "Bir PEM özel anahtar dosyasına benzemiyor."
+
+#: ../libnm-util/crypto.c:154
+#, c-format
+msgid "Not enough memory to store PEM file data."
+msgstr "PEM dosyası verilerini depolamak için yeterli bellek yok."
+
+#: ../libnm-util/crypto.c:170
+#, c-format
+msgid "Malformed PEM file: Proc-Type was not first tag."
+msgstr "Bozuk PEM dosyası: Proc-Type ilk etiket değildi."
+
+#: ../libnm-util/crypto.c:178
+#, c-format
+msgid "Malformed PEM file: unknown Proc-Type tag '%s'."
+msgstr "Bozuk PEM dosyası: bilinmeyen Proc-Type etiketi '%s'."
+
+#: ../libnm-util/crypto.c:188
+#, c-format
+msgid "Malformed PEM file: DEK-Info was not the second tag."
+msgstr "Bozuk PEM dosyası: DEK-Info ikinci etiket değildi."
+
+#: ../libnm-util/crypto.c:199
+#, c-format
+msgid "Malformed PEM file: no IV found in DEK-Info tag."
+msgstr "Bozuk PEM dosyası: DEK-Info etiketinde IV mevcut değil."
+
+#: ../libnm-util/crypto.c:206
+#, c-format
+msgid "Malformed PEM file: invalid format of IV in DEK-Info tag."
+msgstr "Bozuk PEM dosyası: DEK-Info etiketi içerisinde IV'ün geçersiz biçimi."
+
+#: ../libnm-util/crypto.c:219
+#, c-format
+msgid "Malformed PEM file: unknown private key cipher '%s'."
+msgstr "Bozuk PEM dosyası: bilinmeyen özel anahtar şifresi '%s'."
+
+#: ../libnm-util/crypto.c:238
+#, c-format
+msgid "Could not decode private key."
+msgstr "Özel anahtar çözülemedi."
+
+#: ../libnm-util/crypto.c:284
+msgid "Failed to find expected PKCS#8 start tag."
+msgstr "Beklenen PKCS#8 başlama etiketi bulunamadı."
+
+#: ../libnm-util/crypto.c:292
+#, c-format
+msgid "Failed to find expected PKCS#8 end tag '%s'."
+msgstr "Beklenen PKCS#8 bitiş etiketi '%s' bulunamadı."
+
+#: ../libnm-util/crypto.c:312
+msgid "Not enough memory to store private key data."
+msgstr "Özel anahtar verisini kaydetmek için yeterli bellek yok."
+
+#: ../libnm-util/crypto.c:317
+msgid "Failed to decode PKCS#8 private key."
+msgstr "PKCS#8 özel anahtarının şifresi çözülemedi."
+
+#: ../libnm-util/crypto.c:339 ../libnm-util/crypto.c:625
+#, c-format
+msgid "Not enough memory to store certificate data."
+msgstr "Sertifika verisi depolamak için yetersiz bellek."
+
+#: ../libnm-util/crypto.c:365
+#, c-format
+msgid "IV must be an even number of bytes in length."
+msgstr "IV, uzunluk olarak bayt cinsinden bir çift sayı olmalıdır."
+
+#: ../libnm-util/crypto.c:374
+#, c-format
+msgid "Not enough memory to store the IV."
+msgstr "IV'ü depolamak için yeterli bellek yok."
+
+#: ../libnm-util/crypto.c:385
+#, c-format
+msgid "IV contains non-hexadecimal digits."
+msgstr "IV, onaltılık olmayan sayılar barınırıyor."
+
+#: ../libnm-util/crypto.c:423 ../libnm-util/crypto_gnutls.c:147
+#: ../libnm-util/crypto_gnutls.c:265 ../libnm-util/crypto_nss.c:167
+#: ../libnm-util/crypto_nss.c:332
+#, c-format
+msgid "Private key cipher '%s' was unknown."
+msgstr "'%s' özel anahtar şifresi bilinmiyor."
+
+#: ../libnm-util/crypto.c:432
+#, c-format
+msgid "Not enough memory to decrypt private key."
+msgstr "Özel anahtarı çözümlemek için yeterli bellek yok."
+
+#: ../libnm-util/crypto.c:497
+#, c-format
+msgid "Not enough memory to store decrypted private key."
+msgstr "Çözülmüş özel anahtarı depolamak için yeterli bellek yok."
+
+#: ../libnm-util/crypto.c:542
+#, c-format
+msgid "Unable to determine private key type."
+msgstr "Özel anahtar türü belirlenemedi."
+
+#: ../libnm-util/crypto.c:597
+#, c-format
+msgid "PEM certificate had no start tag '%s'."
+msgstr "PEM sertifikasının başlama etiketi '%s' yok."
+
+#: ../libnm-util/crypto.c:606
+#, c-format
+msgid "PEM certificate had no end tag '%s'."
+msgstr "PEM sertifikasının bitiş etiketi '%s' yok."
+
+#: ../libnm-util/crypto.c:630
+#, c-format
+msgid "Failed to decode certificate."
+msgstr "Sertifika çözülemedi."
+
+#: ../libnm-util/crypto_gnutls.c:50
+msgid "Failed to initialize the crypto engine."
+msgstr "Kripto cihazını sıfırlama başarısız."
+
+#: ../libnm-util/crypto_gnutls.c:92
+#, c-format
+msgid "Failed to initialize the MD5 engine: %s / %s."
+msgstr "MD5 cihazını başlatma başarısız oldu: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:155
+#, c-format
+msgid "Invalid IV length (must be at least %zd)."
+msgstr "Geçersiz IV uzunluğu (en az %zd olmalı)."
+
+#: ../libnm-util/crypto_gnutls.c:164 ../libnm-util/crypto_nss.c:184
+#, c-format
+msgid "Not enough memory for decrypted key buffer."
+msgstr "Çözümlenmiş anahtar ara belleği için yeterli bellek yok."
+
+#: ../libnm-util/crypto_gnutls.c:172
+#, c-format
+msgid "Failed to initialize the decryption cipher context: %s / %s."
+msgstr "Şifre çözümleme içeriğini başlatma başarısız oldu: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:181
+#, c-format
+msgid "Failed to set symmetric key for decryption: %s / %s."
+msgstr ""
+"Şifre çözümleme işlemi için simetrik anahtar oluşturma başarısız oldu: %s / %"
+"s."
+
+#: ../libnm-util/crypto_gnutls.c:190
+#, c-format
+msgid "Failed to set IV for decryption: %s / %s."
+msgstr "Şifre çözümleme için IV ayarlama hatası: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:199
+#, c-format
+msgid "Failed to decrypt the private key: %s / %s."
+msgstr "Özel anahtarın şifresini çözme başarısız oldu: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:209 ../libnm-util/crypto_nss.c:263
+#, c-format
+msgid "Failed to decrypt the private key: unexpected padding length."
+msgstr ""
+"Özel anahtarın şifresini çözme başarısız oldu: beklenmeyen dolgu uzunluğu."
+
+#: ../libnm-util/crypto_gnutls.c:220 ../libnm-util/crypto_nss.c:274
+#, c-format
+msgid "Failed to decrypt the private key."
+msgstr "Özel anahtarın şifresini çözme başarısız oldu."
+
+#: ../libnm-util/crypto_gnutls.c:285 ../libnm-util/crypto_nss.c:352
+#, c-format
+msgid "Could not allocate memory for encrypting."
+msgstr "Şifrelemek için bellek ayrılamadı."
+
+#: ../libnm-util/crypto_gnutls.c:293
+#, c-format
+msgid "Failed to initialize the encryption cipher context: %s / %s."
+msgstr "Şifreleme anahtarı içerik sıfırlama hatası: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:302
+#, c-format
+msgid "Failed to set symmetric key for encryption: %s / %s."
+msgstr "Şifreleme için simetrik anahtar ayarlama hatası: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:312
+#, c-format
+msgid "Failed to set IV for encryption: %s / %s."
+msgstr "Şifreleme için IV ayarlama hatası: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:321
+#, c-format
+msgid "Failed to encrypt the data: %s / %s."
+msgstr "Veri şifreleme başarısız: %s / %s."
+
+#: ../libnm-util/crypto_gnutls.c:361
+#, c-format
+msgid "Error initializing certificate data: %s"
+msgstr "Sertifika verisi başlatma hatası: %s"
+
+#: ../libnm-util/crypto_gnutls.c:383
+#, c-format
+msgid "Couldn't decode certificate: %s"
+msgstr "Sertifika çözülemedi: %s"
+
+#: ../libnm-util/crypto_gnutls.c:407
+#, c-format
+msgid "Couldn't initialize PKCS#12 decoder: %s"
+msgstr "PKCS#12 şifre çözücü sıfırlanamadı: %s"
+
+#: ../libnm-util/crypto_gnutls.c:420
+#, c-format
+msgid "Couldn't decode PKCS#12 file: %s"
+msgstr "PKCS#12 dosya şifresi çözülemedi: %s"
+
+#: ../libnm-util/crypto_gnutls.c:432
+#, c-format
+msgid "Couldn't verify PKCS#12 file: %s"
+msgstr "PKCS#12 dosyası doğrulanamadı: %s"
+
+#: ../libnm-util/crypto_gnutls.c:460
+#, c-format
+msgid "Couldn't initialize PKCS#8 decoder: %s"
+msgstr "PKCS#8 şifre çözücü ilklendirilemedi: %s"
+
+#: ../libnm-util/crypto_gnutls.c:483
+#, c-format
+msgid "Couldn't decode PKCS#8 file: %s"
+msgstr "PKCS#8 dosya şifresi çözülemedi: %s"
+
+#: ../libnm-util/crypto_nss.c:56
+#, c-format
+msgid "Failed to initialize the crypto engine: %d."
+msgstr "Kripto motoru başlatılamadı: %d."
+
+#: ../libnm-util/crypto_nss.c:107
+#, c-format
+msgid "Failed to initialize the MD5 context: %d."
+msgstr "MD5 içeriği sıfırlama başarısız: %d."
+
+#: ../libnm-util/crypto_nss.c:175
+#, c-format
+msgid "Invalid IV length (must be at least %d)."
+msgstr "Geçersiz IV uzunluğu (en azından %d olmalı)."
+
+#: ../libnm-util/crypto_nss.c:192
+#, c-format
+msgid "Failed to initialize the decryption cipher slot."
+msgstr "Şifre çözücü anahtar yuvası sıfırlama hatası."
+
+#: ../libnm-util/crypto_nss.c:202
+#, c-format
+msgid "Failed to set symmetric key for decryption."
+msgstr "Şifre çözümlemesi için simetrik anahtar ayarlama başarısız."
+
+#: ../libnm-util/crypto_nss.c:212
+#, c-format
+msgid "Failed to set IV for decryption."
+msgstr "Şifre çözümlemesi için IV ayarlama başarısız."
+
+#: ../libnm-util/crypto_nss.c:220
+#, c-format
+msgid "Failed to initialize the decryption context."
+msgstr "Şifre çözüm içeriği sıfırlanması başarısız."
+
+#: ../libnm-util/crypto_nss.c:233
+#, c-format
+msgid "Failed to decrypt the private key: %d."
+msgstr "Özel anahtar şifre çözme hatası: %d."
+
+#: ../libnm-util/crypto_nss.c:241
+#, c-format
+msgid "Failed to decrypt the private key: decrypted data too large."
+msgstr "Özel anahtar şifre çözme hatası: şifresi çözülen veri çok uzun."
+
+#: ../libnm-util/crypto_nss.c:252
+#, c-format
+msgid "Failed to finalize decryption of the private key: %d."
+msgstr "Özel anahtar şifre çözümleme bitirme hatası: %d."
+
+#: ../libnm-util/crypto_nss.c:360
+#, c-format
+msgid "Failed to initialize the encryption cipher slot."
+msgstr "Şifreleme anahtar yuvası sıfırlama hatası."
+
+#: ../libnm-util/crypto_nss.c:368
+#, c-format
+msgid "Failed to set symmetric key for encryption."
+msgstr "Şifreleme için simetrik anahtar ayarlama hatası."
+
+#: ../libnm-util/crypto_nss.c:376
+#, c-format
+msgid "Failed to set IV for encryption."
+msgstr "Şifreleme için IV ayarlama hatası."
+
+#: ../libnm-util/crypto_nss.c:384
+#, c-format
+msgid "Failed to initialize the encryption context."
+msgstr "Şifreleme içeriği sıfırlama hatası."
+
+#: ../libnm-util/crypto_nss.c:392
+#, c-format
+msgid "Failed to encrypt: %d."
+msgstr "Şifrelenemedi: %d."
+
+#: ../libnm-util/crypto_nss.c:400
+#, c-format
+msgid "Unexpected amount of data after encrypting."
+msgstr "Şifrelemeden sonra beklenmeyen miktarda veri."
+
+#: ../libnm-util/crypto_nss.c:443
+#, c-format
+msgid "Couldn't decode certificate: %d"
+msgstr "Sertifikanın kodu çözülemedi: %d"
+
+#: ../libnm-util/crypto_nss.c:478
+#, c-format
+msgid "Couldn't convert password to UCS2: %d"
+msgstr "Şifre UCS2'ye dönüştürülemedi: %d"
+
+#: ../libnm-util/crypto_nss.c:506
+#, c-format
+msgid "Couldn't initialize PKCS#12 decoder: %d"
+msgstr "PKCS#12 kod çözücü sıfırlanamadı: %d"
+
+#: ../libnm-util/crypto_nss.c:515
+#, c-format
+msgid "Couldn't decode PKCS#12 file: %d"
+msgstr "PKCS#12 dosyası kodu çözülemedi: %d"
+
+#: ../libnm-util/crypto_nss.c:524
+#, c-format
+msgid "Couldn't verify PKCS#12 file: %d"
+msgstr "PKCS#12 dosyası doğrulanamadı: %d"
+
+#: ../libnm-util/crypto_nss.c:568
+msgid "Could not generate random data."
+msgstr "Rastgele veri üretilemedi."
+
+#: ../libnm-util/nm-utils.c:2003
+#, c-format
+msgid "Not enough memory to make encryption key."
+msgstr "Şifreleme anahtarı yapmak için yeterli bellek yok."
+
+#: ../libnm-util/nm-utils.c:2113
+msgid "Could not allocate memory for PEM file creation."
+msgstr "PEM dosya oluşturma için bellek ayrılamadı."
+
+#: ../libnm-util/nm-utils.c:2125
+#, c-format
+msgid "Could not allocate memory for writing IV to PEM file."
+msgstr "IV'ü PEM dosyasına yazmak için bellek ayrılamadı."
+
+#: ../libnm-util/nm-utils.c:2137
+#, c-format
+msgid "Could not allocate memory for writing encrypted key to PEM file."
+msgstr "Şifrelenmiş anahtarı PEM dosyasına yazmak için bellek ayrılamadı."
+
+#: ../libnm-util/nm-utils.c:2156
+#, c-format
+msgid "Could not allocate memory for PEM file data."
+msgstr "PEM dosyası verisi için bellek ayrılamadı."
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
+msgid "Allow control of network connections"
+msgstr "Ağ bağlantılarının denetimine izin ver"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Korumalı bir WiFi ağı yoluyla bağlantı paylaşımı"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
+msgid "Connection sharing via an open WiFi network"
+msgstr "Açık bir Wfi ağı yoluyla bağlantı paylaşımı"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
+msgid "Enable or disable WiFi devices"
+msgstr "WiFi aygıtlarını etkinleştir ya da etkisizleştir"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "WiMAX mobil genişbant aygıtlarını etkinleştir ya da etkisizleştir"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
+msgid "Enable or disable mobile broadband devices"
+msgstr "Mobil genişbant aygıtlarını etkinleştir ya da etkisizleştir"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
+msgid "Enable or disable system networking"
+msgstr "Sistem ağını etkinleştir ya da etkisizleştir"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
+msgid "Modify network connections for all users"
+msgstr "Tüm kullanıcılar için ağ bağlantılarını düzenle"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
+msgid "Modify persistent system hostname"
+msgstr "Direşken sistemin adını değiştir"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
+msgid "Modify personal network connections"
+msgstr "Kişisel ağ bağlantılarını düzenle"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
+msgid ""
+"Put NetworkManager to sleep or wake it up (should only be used by system "
+"power management)"
+msgstr ""
+"NetworkManager'i uykuda konumuna getir veya uyandır (yalnızca sistem güç "
+"yönetimi tarafından kullanılmalıdır)"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
+msgid "System policy prevents control of network connections"
+msgstr "Sistem kuralları, ağ bağlantılarını denetlemeyi engelliyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
+msgid "System policy prevents enabling or disabling WiFi devices"
+msgstr ""
+"Sistem kuralları, WiFi aygıtlarını etkinleştirmeyi ya da etkisizleştirmeyi "
+"engelliyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
+msgid ""
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgstr ""
+"Sistem kuralları, WiMAX mobil genişbant aygıtlarını etkinleştirmeyi ya da "
+"etkisizleştirmeyi engelliyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
+msgid "System policy prevents enabling or disabling mobile broadband devices"
+msgstr ""
+"Sistem kuralları, mobil genişbant aygıtlarını etkinleştirmeyi ya da "
+"etkisizleştirmeyi engelliyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
+msgid "System policy prevents enabling or disabling system networking"
+msgstr ""
+"Sistem kuralları, sistem ağını etkinleştirmeyi ya da etkisizleştirmeyi "
+"engelliyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
+msgid "System policy prevents modification of network settings for all users"
+msgstr ""
+"Sistem kuralları, tüm kullanıcılar için ağ ayarlarının değiştirilmesine izin "
+"vermiyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
+msgid "System policy prevents modification of personal network settings"
+msgstr ""
+"Sistem kuralları, kişisel ağ ayarlarının değiştirilmesine izin vermiyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
+msgid "System policy prevents modification of the persistent system hostname"
+msgstr "Sistem kuralları, direşken sistemin adının değiştirilmesini önlüyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr ""
+"Sistem kuralları, NetworkManager'ı uykuda konumuna getirmeyi veya "
+"uyandırmayı engelliyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
+msgid "System policy prevents sharing connections via a protected WiFi network"
+msgstr ""
+"Sistem kuralları, korumalı kablosuz ağ yoluyla bağlantı paylaşımını önlüyor"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
+msgid "System policy prevents sharing connections via an open WiFi network"
+msgstr ""
+"Sistem kuralları, korumasız kablosuz ağ yoluyla bağlantı paylaşımını önlüyor"
+
+#: ../src/main.c:405
+#, c-format
+msgid "Invalid option. Please use --help to see a list of valid options.\n"
+msgstr ""
+"Geçersiz seçenek. Lütfen geçerli seçeneklerin listesini görmek için --help "
+"kullanın.\n"
+
+#: ../src/main.c:446
+#, c-format
+msgid "%s. Please use --help to see a list of valid options.\n"
+msgstr ""
+"%s. Geçerli seçeneklerin bir listesini görmek için lütfen --help komutunu "
+"kullanın.\n"
+
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
+msgid "# Created by NetworkManager\n"
+msgstr "# Ağ Yöneticisi Tarafından Oluşturuldu\n"
+
+#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69
+#, c-format
+msgid ""
+"# Merged from %s\n"
+"\n"
+msgstr ""
+"# %s'den birleşmiş\n"
+"\n"
+
+#: ../src/dhcp-manager/nm-dhcp-manager.c:284
+msgid "no usable DHCP client could be found."
+msgstr "kullanılabilir bir DHCP istemcisi bulunamadı."
+
+#: ../src/dhcp-manager/nm-dhcp-manager.c:293
+msgid "'dhclient' could be found."
+msgstr "'dhclient' bulunamadı."
+
+#: ../src/dhcp-manager/nm-dhcp-manager.c:303
+msgid "'dhcpcd' could be found."
+msgstr "'dhcpcd' bulunamadı."
+
+#: ../src/dhcp-manager/nm-dhcp-manager.c:311
+#, c-format
+msgid "unsupported DHCP client '%s'"
+msgstr "desteklenmeyen DHCP istemcisi '%s'"
+
+#: ../src/dns-manager/nm-dns-manager.c:376
+msgid "NOTE: the libc resolver may not support more than 3 nameservers."
+msgstr "NOT: libc çözücü 3'den fazla sunucu adını desteklemeyebilir."
+
+#: ../src/dns-manager/nm-dns-manager.c:378
+msgid "The nameservers listed below may not be recognized."
+msgstr "Aşağıda listelenen sunucu adları tanınmayabilir."
+
+#: ../src/logging/nm-logging.c:154
+#, c-format
+msgid "Unknown log level '%s'"
+msgstr "Bilinmeyen kayıt seviyesi '%s'"
+
+#: ../src/logging/nm-logging.c:179
+#, c-format
+msgid "Unknown log domain '%s'"
+msgstr "Bilinmeyen kayıt etki alanı '%s'"
+
+#: ../src/modem-manager/nm-modem-cdma.c:296 ../src/nm-device-bt.c:354
+#, c-format
+msgid "CDMA connection %d"
+msgstr "CDMA bağlantısı %d"
+
+#: ../src/modem-manager/nm-modem-gsm.c:521 ../src/nm-device-bt.c:350
+#, c-format
+msgid "GSM connection %d"
+msgstr "GSM bağlantısı %d"
+
+#: ../src/nm-device-bt.c:325
+#, c-format
+msgid "PAN connection %d"
+msgstr "PAN bağlantısı %d"
+
+#: ../src/nm-device-bt.c:358
+#, c-format
+msgid "DUN connection %d"
+msgstr "DUN bağlantısı %d"
+
+#: ../src/nm-device-ethernet.c:1425
+#, c-format
+msgid "PPPoE connection %d"
+msgstr "PPPoE bağlantısı %d"
+
+#: ../src/nm-device-ethernet.c:1425 ../src/settings/nm-settings-utils.c:50
+#, c-format
+msgid "Wired connection %d"
+msgstr "Kablolu bağlantı %d"
+
+#: ../src/nm-device-infiniband.c:292
+#, c-format
+msgid "InfiniBand connection %d"
+msgstr "InfiniBand bağlantısı %d"
+
+#: ../src/nm-device-olpc-mesh.c:323
+#, c-format
+msgid "Mesh %d"
+msgstr "Mesh %d"
+
+#: ../src/nm-manager.c:683
+#, c-format
+msgid "VPN connection %d"
+msgstr "VPN bağlantısı %d"
+
+#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
+#, c-format
+msgid "error processing netlink message: %s"
+msgstr "netlink iletisinin işlenmesinde hata: %s"
+
+#: ../src/nm-netlink-monitor.c:251
+msgid "error occurred while waiting for data on socket"
+msgstr "yuva üzerinde veri beklenirken hata oluştu"
+
+#: ../src/nm-netlink-monitor.c:296
+#, c-format
+msgid "unable to connect to netlink for monitoring link status: %s"
+msgstr "bağ durumunu izlemek için netlink'e bağlanılamadı: %s"
+
+#: ../src/nm-netlink-monitor.c:307
+#, c-format
+msgid "unable to enable netlink handle credential passing: %s"
+msgstr "kimlik gönderimi için ağ köprüsü etkinleştirilemiyor: %s"
+
+#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390
+#, c-format
+msgid "unable to allocate netlink handle for monitoring link status: %s"
+msgstr "adres durumunu izlemek için ağ-adresi paylaşımı yapılamadı: %s"
+
+#: ../src/nm-netlink-monitor.c:415
+#, c-format
+msgid "unable to allocate netlink link cache for monitoring link status: %s"
+msgstr ""
+"adres durumunu izlemek için ağ-adresi adres belleği paylaşımı yapılamadı: %s"
+
+#: ../src/nm-netlink-monitor.c:542
+#, c-format
+msgid "unable to join netlink group: %s"
+msgstr "netlink kümesine girilemedi: %s"
+
+#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684
+#, c-format
+msgid "error updating link cache: %s"
+msgstr "bağ önbelleğinin güncellenmesinde hata: %s"
+
+#: ../src/settings/plugins/ifcfg-rh/reader.c:97
+#: ../src/settings/plugins/ifnet/connection_parser.c:51
+msgid "System"
+msgstr "Sistem"
+
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3557
+msgid "Bond"
+msgstr "Bağ"
+
+#~ msgid "Allow use of user-specific connections"
+#~ msgstr "Kullanıcı tanımlı bağlantılara izin ver"
+
+#~ msgid "System policy prevents use of user-specific connections"
+#~ msgstr ""
+#~ "Sistem kuralları, kullanıcı tanımlı bağlantıların kullanımını engelliyor"
+
+#~ msgid "unknown)"
+#~ msgstr "bilinmeyen)"
diff --git a/po/uk.po b/po/uk.po
index 5bec199e0..3611f5b3e 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -1,14 +1,14 @@
# Copyright (C) 2011 Free Software Foundation, Inc.
# This file is distributed under the same license as the NetworkManager package.
#
-# Yuri Chornoivan <yurchor@ukr.net>, 2011.
+# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2012.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=NetworkManager&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2011-08-19 03:25+0000\n"
-"PO-Revision-Date: 2011-08-19 19:00+0300\n"
+"POT-Creation-Date: 2012-02-09 15:25+0000\n"
+"PO-Revision-Date: 2012-02-16 16:45+0200\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
"MIME-Version: 1.0\n"
@@ -18,445 +18,598 @@ msgstr ""
"X-Generator: Lokalize 1.2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: ../cli/src/connections.c:64 ../cli/src/connections.c:78
-#: ../cli/src/devices.c:101 ../cli/src/devices.c:114 ../cli/src/devices.c:124
-#: ../cli/src/devices.c:134 ../cli/src/devices.c:148 ../cli/src/devices.c:162
-#: ../cli/src/devices.c:173 ../cli/src/devices.c:184 ../cli/src/devices.c:193
-#: ../cli/src/devices.c:202 ../cli/src/devices.c:224
-msgid "NAME"
-msgstr "НАЗВА"
+#: ../cli/src/common.c:32 ../cli/src/common.c:44 ../cli/src/common.c:52
+#: ../cli/src/common.c:63 ../cli/src/connections.c:119
+#: ../cli/src/connections.c:153
+msgid "GROUP"
+msgstr "ГРУПА"
#. 0
-#: ../cli/src/connections.c:65 ../cli/src/connections.c:79
-msgid "UUID"
-msgstr "UUID"
+#: ../cli/src/common.c:33 ../cli/src/common.c:53
+msgid "ADDRESS"
+msgstr "АДРЕСА"
#. 1
-#: ../cli/src/connections.c:66
-msgid "DEVICES"
-msgstr "ПРИСТРОЇ"
+#: ../cli/src/common.c:34 ../cli/src/common.c:54
+#| msgid "RATE"
+msgid "ROUTE"
+msgstr "МАРШРУТ"
#. 2
-#: ../cli/src/connections.c:67
-msgid "DEFAULT"
-msgstr "ТИПОВЕ"
+#: ../cli/src/common.c:35 ../cli/src/common.c:55
+msgid "DNS"
+msgstr "DNS"
#. 3
-#: ../cli/src/connections.c:68
-msgid "SPEC-OBJECT"
-msgstr "SPEC-OBJECT"
+#: ../cli/src/common.c:36 ../cli/src/common.c:56
+msgid "DOMAIN"
+msgstr "ДОМЕН"
#. 4
-#: ../cli/src/connections.c:69
-msgid "VPN"
-msgstr "VPN"
+#: ../cli/src/common.c:37
+msgid "WINS"
+msgstr "WINS"
-#. 5
-#. 6
-#. 2
-#. 11
-#. 5
-#: ../cli/src/connections.c:70 ../cli/src/connections.c:85
-#: ../cli/src/devices.c:69 ../cli/src/devices.c:214 ../cli/src/devices.c:230
-msgid "DBUS-PATH"
-msgstr "DBUS-PATH"
+#. 0
+#: ../cli/src/common.c:45 ../cli/src/common.c:64
+msgid "OPTION"
+msgstr "ПАРАМЕТР"
+
+#. 0
+#. used only for 'GENERAL' group listing
+#: ../cli/src/connections.c:56 ../cli/src/connections.c:120
+#: ../cli/src/devices.c:100 ../cli/src/devices.c:121 ../cli/src/devices.c:131
+#: ../cli/src/devices.c:141 ../cli/src/devices.c:155 ../cli/src/devices.c:169
+#: ../cli/src/devices.c:191
+msgid "NAME"
+msgstr "НАЗВА"
+
+#. 0
+#. 1
+#: ../cli/src/connections.c:57 ../cli/src/connections.c:121
+msgid "UUID"
+msgstr "UUID"
#. 1
#. 0
#. 1
#. 2
-#: ../cli/src/connections.c:80 ../cli/src/devices.c:67
-#: ../cli/src/devices.c:103 ../cli/src/devices.c:227
+#: ../cli/src/connections.c:58 ../cli/src/connections.c:154
+#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:194
msgid "TYPE"
msgstr "ТИП"
#. 2
-#: ../cli/src/connections.c:81
+#: ../cli/src/connections.c:59
msgid "TIMESTAMP"
msgstr "ЧАСОВА МІТКА"
#. 3
-#: ../cli/src/connections.c:82
+#: ../cli/src/connections.c:60
msgid "TIMESTAMP-REAL"
msgstr "ДІЙСНА ЧАСОВА МІТКА"
#. 4
-#: ../cli/src/connections.c:83
+#: ../cli/src/connections.c:61
msgid "AUTOCONNECT"
msgstr "АВТОЗ’ЄДНАННЯ"
#. 5
-#: ../cli/src/connections.c:84
+#: ../cli/src/connections.c:62
msgid "READONLY"
msgstr "ЛИШЕ ЧИТАННЯ"
-#: ../cli/src/connections.c:167
-#, c-format
+#. 6
+#. 8
+#. 2
+#. 11
+#. 5
+#: ../cli/src/connections.c:63 ../cli/src/connections.c:128
+#: ../cli/src/devices.c:68 ../cli/src/devices.c:181 ../cli/src/devices.c:197
+msgid "DBUS-PATH"
+msgstr "DBUS-PATH"
+
+#. 2
+#: ../cli/src/connections.c:122
+msgid "DEVICES"
+msgstr "ПРИСТРОЇ"
+
+#. 3
+#. 1
+#. 6
+#. 1
+#: ../cli/src/connections.c:123 ../cli/src/devices.c:67
+#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:39
+msgid "STATE"
+msgstr "СТАН"
+
+#. 4
+#: ../cli/src/connections.c:124
+msgid "DEFAULT"
+msgstr "ТИПОВЕ"
+
+#. 5
+#: ../cli/src/connections.c:125
+#| msgid "DEFAULT"
+msgid "DEFAULT6"
+msgstr "ТИПОВИЙ6"
+
+#. 6
+#: ../cli/src/connections.c:126
+msgid "SPEC-OBJECT"
+msgstr "SPEC-OBJECT"
+
+#. 7
+#. 1
+#: ../cli/src/connections.c:127 ../cli/src/connections.c:141
+msgid "VPN"
+msgstr "VPN"
+
+#. 9
+#: ../cli/src/connections.c:129
+msgid "CON-PATH"
+msgstr "ШЛЯХ-ДО-CON"
+
+#. 10
+#: ../cli/src/connections.c:130
+msgid "ZONE"
+msgstr "ЗОНА"
+
+#. 11
+#: ../cli/src/connections.c:131
+#| msgid "DBUS-PATH"
+msgid "MASTER-PATH"
+msgstr "ОСНОВНИЙ-ШЛЯХ"
+
+#: ../cli/src/connections.c:139 ../cli/src/devices.c:77
+msgid "GENERAL"
+msgstr "ЗАГАЛЬНІ"
+
+#. 0
+#: ../cli/src/connections.c:140
+#| msgid "TKIP"
+msgid "IP"
+msgstr "IP"
+
+#. 1
+#: ../cli/src/connections.c:155
+#| msgid "NAME"
+msgid "USERNAME"
+msgstr "КОРИСТУВАЧ"
+
+#. 2
+#: ../cli/src/connections.c:156
+msgid "GATEWAY"
+msgstr "ШЛЮЗ"
+
+#. 3
+#: ../cli/src/connections.c:157
+msgid "BANNER"
+msgstr "БАНЕР"
+
+#. 4
+#: ../cli/src/connections.c:158
+#| msgid "STATE"
+msgid "VPN-STATE"
+msgstr "СТАН-VPN"
+
+#. 5
+#: ../cli/src/connections.c:159
+msgid "CFG"
+msgstr "КОНФ"
+
+#: ../cli/src/connections.c:180
+#, c-format
+#| msgid ""
+#| "Usage: nmcli con { COMMAND | help }\n"
+#| " COMMAND := { list | status | up | down }\n"
+#| "\n"
+#| " list [id <id> | uuid <id>]\n"
+#| " status\n"
+#| " up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [nsp <name>] [--"
+#| "nowait] [--timeout <timeout>]\n"
+#| " up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--"
+#| "timeout <timeout>]\n"
+#| " down id <id> | uuid <id>\n"
msgid ""
"Usage: nmcli con { COMMAND | help }\n"
-" COMMAND := { list | status | up | down }\n"
+" COMMAND := { list | status | up | down | delete }\n"
"\n"
" list [id <id> | uuid <id>]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [nsp <name>] [--"
+" status [id <id> | uuid <id> | path <path>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [--"
"nowait] [--timeout <timeout>]\n"
-" up id <id> | uuid <id> [iface <iface>] [ap <hwaddr>] [--nowait] [--timeout "
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
"<timeout>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
msgstr ""
"Використання: nmcli con { КОМАНДА | help }\n"
-" КОМАНДА := { list | status | up | down }\n"
+" КОМАНДА := { list | status | up | down | delete }\n"
"\n"
" list [id <id> | uuid <id>]\n"
-" status\n"
-" up id <id> | uuid <id> [iface <інтерфейс>] [ap <ап. адреса>] [nsp <назва>] "
-"[--"
-"nowait] [--timeout <очікування>]\n"
-" up id <id> | uuid <id> [iface <інтерфейс>] [ap <ап. адреса>] [--nowait] "
-"[--timeout "
-"<очікування>]\n"
+" status [id <id> | uuid <id> | path <шлях>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <назва>] [--"
+"nowait] [--timeout <час очікування>]\n"
+" up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout "
+"<час очікування>]\n"
" down id <id> | uuid <id>\n"
+" delete id <id> | uuid <id>\n"
-#: ../cli/src/connections.c:220 ../cli/src/connections.c:544
+#: ../cli/src/connections.c:234 ../cli/src/connections.c:567
#, c-format
msgid "Error: 'con list': %s"
msgstr "Помилка: «con list»: %s"
-#: ../cli/src/connections.c:222 ../cli/src/connections.c:546
+#: ../cli/src/connections.c:236 ../cli/src/connections.c:569
#, c-format
msgid "Error: 'con list': %s; allowed fields: %s"
msgstr "Помилка: «con list»: %s; дозволені поля: %s"
-#: ../cli/src/connections.c:230
+#: ../cli/src/connections.c:244
msgid "Connection details"
msgstr "Параметри з’єднання"
-#: ../cli/src/connections.c:419
+#: ../cli/src/connections.c:442
msgid "never"
msgstr "ніколи"
#. "CAPABILITIES"
#. Print header
#. "WIFI-PROPERTIES"
-#: ../cli/src/connections.c:420 ../cli/src/connections.c:421
-#: ../cli/src/connections.c:599 ../cli/src/connections.c:601
-#: ../cli/src/devices.c:509 ../cli/src/devices.c:562 ../cli/src/devices.c:687
-#: ../cli/src/devices.c:713 ../cli/src/devices.c:714 ../cli/src/devices.c:715
-#: ../cli/src/devices.c:716 ../cli/src/devices.c:717 ../cli/src/settings.c:520
-#: ../cli/src/settings.c:563 ../cli/src/settings.c:663
-#: ../cli/src/settings.c:937 ../cli/src/settings.c:938
-#: ../cli/src/settings.c:940 ../cli/src/settings.c:942
-#: ../cli/src/settings.c:1067 ../cli/src/settings.c:1068
-#: ../cli/src/settings.c:1069 ../cli/src/settings.c:1148
-#: ../cli/src/settings.c:1149 ../cli/src/settings.c:1150
-#: ../cli/src/settings.c:1151 ../cli/src/settings.c:1152
-#: ../cli/src/settings.c:1153 ../cli/src/settings.c:1154
-#: ../cli/src/settings.c:1155 ../cli/src/settings.c:1156
-#: ../cli/src/settings.c:1157 ../cli/src/settings.c:1158
-#: ../cli/src/settings.c:1159 ../cli/src/settings.c:1160
-#: ../cli/src/settings.c:1235
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:646
+#: ../cli/src/settings.c:766 ../cli/src/settings.c:1048
+#: ../cli/src/settings.c:1049 ../cli/src/settings.c:1051
+#: ../cli/src/settings.c:1053 ../cli/src/settings.c:1054
+#: ../cli/src/settings.c:1182 ../cli/src/settings.c:1183
+#: ../cli/src/settings.c:1184 ../cli/src/settings.c:1185
+#: ../cli/src/settings.c:1260 ../cli/src/settings.c:1261
+#: ../cli/src/settings.c:1262 ../cli/src/settings.c:1263
+#: ../cli/src/settings.c:1264 ../cli/src/settings.c:1265
+#: ../cli/src/settings.c:1266 ../cli/src/settings.c:1267
+#: ../cli/src/settings.c:1268 ../cli/src/settings.c:1269
+#: ../cli/src/settings.c:1270 ../cli/src/settings.c:1271
+#: ../cli/src/settings.c:1272 ../cli/src/settings.c:1343
msgid "yes"
msgstr "так"
-#: ../cli/src/connections.c:420 ../cli/src/connections.c:421
-#: ../cli/src/connections.c:599 ../cli/src/connections.c:601
-#: ../cli/src/devices.c:509 ../cli/src/devices.c:562 ../cli/src/devices.c:687
-#: ../cli/src/devices.c:713 ../cli/src/devices.c:714 ../cli/src/devices.c:715
-#: ../cli/src/devices.c:716 ../cli/src/devices.c:717 ../cli/src/settings.c:520
-#: ../cli/src/settings.c:522 ../cli/src/settings.c:563
-#: ../cli/src/settings.c:663 ../cli/src/settings.c:937
-#: ../cli/src/settings.c:938 ../cli/src/settings.c:940
-#: ../cli/src/settings.c:942 ../cli/src/settings.c:1067
-#: ../cli/src/settings.c:1068 ../cli/src/settings.c:1069
-#: ../cli/src/settings.c:1148 ../cli/src/settings.c:1149
-#: ../cli/src/settings.c:1150 ../cli/src/settings.c:1151
-#: ../cli/src/settings.c:1152 ../cli/src/settings.c:1153
-#: ../cli/src/settings.c:1154 ../cli/src/settings.c:1155
-#: ../cli/src/settings.c:1156 ../cli/src/settings.c:1157
-#: ../cli/src/settings.c:1158 ../cli/src/settings.c:1159
-#: ../cli/src/settings.c:1160 ../cli/src/settings.c:1235
+#: ../cli/src/connections.c:443 ../cli/src/connections.c:444
+#: ../cli/src/connections.c:681 ../cli/src/connections.c:682
+#: ../cli/src/connections.c:684 ../cli/src/devices.c:586
+#: ../cli/src/devices.c:639 ../cli/src/devices.c:750 ../cli/src/devices.c:751
+#: ../cli/src/devices.c:783 ../cli/src/devices.c:809 ../cli/src/devices.c:810
+#: ../cli/src/devices.c:811 ../cli/src/devices.c:812 ../cli/src/devices.c:813
+#: ../cli/src/settings.c:576 ../cli/src/settings.c:578
+#: ../cli/src/settings.c:646 ../cli/src/settings.c:766
+#: ../cli/src/settings.c:1048 ../cli/src/settings.c:1049
+#: ../cli/src/settings.c:1051 ../cli/src/settings.c:1053
+#: ../cli/src/settings.c:1054 ../cli/src/settings.c:1182
+#: ../cli/src/settings.c:1183 ../cli/src/settings.c:1184
+#: ../cli/src/settings.c:1185 ../cli/src/settings.c:1260
+#: ../cli/src/settings.c:1261 ../cli/src/settings.c:1262
+#: ../cli/src/settings.c:1263 ../cli/src/settings.c:1264
+#: ../cli/src/settings.c:1265 ../cli/src/settings.c:1266
+#: ../cli/src/settings.c:1267 ../cli/src/settings.c:1268
+#: ../cli/src/settings.c:1269 ../cli/src/settings.c:1270
+#: ../cli/src/settings.c:1271 ../cli/src/settings.c:1272
+#: ../cli/src/settings.c:1343
msgid "no"
msgstr "ні"
-#: ../cli/src/connections.c:495
+#: ../cli/src/connections.c:518
msgid "Connection list"
msgstr "Список з’єднань"
-#: ../cli/src/connections.c:508 ../cli/src/connections.c:1368
-#: ../cli/src/connections.c:1383 ../cli/src/connections.c:1392
-#: ../cli/src/connections.c:1402 ../cli/src/connections.c:1414
-#: ../cli/src/connections.c:1509 ../cli/src/devices.c:1190
+#: ../cli/src/connections.c:531 ../cli/src/connections.c:1064
+#: ../cli/src/connections.c:1808 ../cli/src/connections.c:1823
+#: ../cli/src/connections.c:1832 ../cli/src/connections.c:1842
+#: ../cli/src/connections.c:1854 ../cli/src/connections.c:1949
+#: ../cli/src/connections.c:2051 ../cli/src/devices.c:1190
#: ../cli/src/devices.c:1200 ../cli/src/devices.c:1314
-#: ../cli/src/devices.c:1321 ../cli/src/devices.c:1534
-#: ../cli/src/devices.c:1541
+#: ../cli/src/devices.c:1322 ../cli/src/devices.c:1535
+#: ../cli/src/devices.c:1542
#, c-format
msgid "Error: %s argument is missing."
msgstr "Помилка: пропущено аргумент %s."
-#: ../cli/src/connections.c:521
+#: ../cli/src/connections.c:544
#, c-format
msgid "Error: %s - no such connection."
msgstr "Помилка: невідоме з’єднання %s."
-#: ../cli/src/connections.c:527 ../cli/src/connections.c:1427
-#: ../cli/src/connections.c:1526 ../cli/src/devices.c:987
-#: ../cli/src/devices.c:1067 ../cli/src/devices.c:1214
-#: ../cli/src/devices.c:1327 ../cli/src/devices.c:1547
+#: ../cli/src/connections.c:550 ../cli/src/connections.c:1867
+#: ../cli/src/connections.c:1966 ../cli/src/connections.c:2058
+#: ../cli/src/devices.c:987 ../cli/src/devices.c:1067
+#: ../cli/src/devices.c:1214 ../cli/src/devices.c:1328
+#: ../cli/src/devices.c:1548
#, c-format
msgid "Unknown parameter: %s\n"
msgstr "Невідомий параметр: %s\n"
-#: ../cli/src/connections.c:536
+#: ../cli/src/connections.c:559
#, c-format
msgid "Error: no valid parameter specified."
msgstr "Помилка: не вказано коректних параметрів."
-#: ../cli/src/connections.c:551 ../cli/src/connections.c:1617
-#: ../cli/src/devices.c:1755 ../cli/src/network-manager.c:463
+#: ../cli/src/connections.c:574 ../cli/src/connections.c:2151
+#: ../cli/src/devices.c:1756 ../cli/src/network-manager.c:456
#, c-format
msgid "Error: %s."
msgstr "Помилка: %s."
-#: ../cli/src/connections.c:639
+#: ../cli/src/connections.c:587
+msgid "activating"
+msgstr "активація"
+
+#: ../cli/src/connections.c:589
+msgid "activated"
+msgstr "активовано"
+
+#: ../cli/src/connections.c:591 ../cli/src/devices.c:261
+msgid "deactivating"
+msgstr "деактивація"
+
+#: ../cli/src/connections.c:594 ../cli/src/connections.c:617
+#: ../cli/src/connections.c:1680 ../cli/src/devices.c:265
+#: ../cli/src/devices.c:784 ../cli/src/network-manager.c:111
+#: ../cli/src/network-manager.c:173 ../cli/src/network-manager.c:176
+#: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:346 ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:423 ../cli/src/settings.c:531
+#: ../cli/src/utils.c:499 ../src/main.c:443 ../src/main.c:462
+msgid "unknown"
+msgstr "невідомо"
+
+#: ../cli/src/connections.c:603
+msgid "VPN connecting (prepare)"
+msgstr "З’єднання VPN (приготування)"
+
+#: ../cli/src/connections.c:605
+msgid "VPN connecting (need authentication)"
+msgstr "З’єднання VPN (потрібне розпізнавання)"
+
+#: ../cli/src/connections.c:607
+msgid "VPN connecting"
+msgstr "З’єднання VPN"
+
+#: ../cli/src/connections.c:609
+msgid "VPN connecting (getting IP configuration)"
+msgstr "З’єднання VPN (отримання налаштувань IP)"
+
+#: ../cli/src/connections.c:611
+msgid "VPN connected"
+msgstr "VPN з’єднано"
+
+#: ../cli/src/connections.c:613
+msgid "VPN connection failed"
+msgstr "Невдала спроба з’єднання VPN"
+
+#: ../cli/src/connections.c:615
+msgid "VPN disconnected"
+msgstr "VPN роз’єднано"
+
+#: ../cli/src/connections.c:868 ../cli/src/connections.c:1092
#, c-format
msgid "Error: 'con status': %s"
msgstr "Помилка: «con status»: %s"
-#: ../cli/src/connections.c:641
+#: ../cli/src/connections.c:870 ../cli/src/connections.c:1094
#, c-format
msgid "Error: 'con status': %s; allowed fields: %s"
msgstr "Помилка: «con status»: %s; дозволені поля: %s"
-#: ../cli/src/connections.c:649 ../cli/src/connections.c:1442
-#: ../cli/src/connections.c:1541 ../cli/src/devices.c:1014
-#: ../cli/src/devices.c:1076 ../cli/src/devices.c:1229
-#: ../cli/src/devices.c:1357 ../cli/src/devices.c:1576
+#: ../cli/src/connections.c:878
+#| msgid "Active connections"
+msgid "Active connection details"
+msgstr "Параметри активного з’єднання"
+
+#: ../cli/src/connections.c:1014 ../cli/src/connections.c:1882
+#: ../cli/src/connections.c:1981 ../cli/src/connections.c:2072
+#: ../cli/src/devices.c:1014 ../cli/src/devices.c:1076
+#: ../cli/src/devices.c:1229 ../cli/src/devices.c:1358
+#: ../cli/src/devices.c:1577
#, c-format
msgid "Error: Can't find out if NetworkManager is running: %s."
msgstr "Помилка: не вдалося визначити, чи працює NetworkManager: %s."
-#: ../cli/src/connections.c:653 ../cli/src/connections.c:1446
-#: ../cli/src/connections.c:1545 ../cli/src/devices.c:1018
-#: ../cli/src/devices.c:1080 ../cli/src/devices.c:1233
-#: ../cli/src/devices.c:1361 ../cli/src/devices.c:1580
+#: ../cli/src/connections.c:1018 ../cli/src/connections.c:1886
+#: ../cli/src/connections.c:1985 ../cli/src/connections.c:2076
+#: ../cli/src/devices.c:1018 ../cli/src/devices.c:1080
+#: ../cli/src/devices.c:1233 ../cli/src/devices.c:1362
+#: ../cli/src/devices.c:1581
#, c-format
msgid "Error: NetworkManager is not running."
msgstr "Помилка: NetworkManager не працює."
-#: ../cli/src/connections.c:661
+#: ../cli/src/connections.c:1050
msgid "Active connections"
msgstr "Активні з’єднання"
-#: ../cli/src/connections.c:1085
+#: ../cli/src/connections.c:1075
+#, c-format
+#| msgid "Error: %s - no such connection."
+msgid "Error: '%s' is not an active connection."
+msgstr "Помилка: «%s» не є активним з’єднанням."
+
+#: ../cli/src/connections.c:1080
+#, c-format
+#| msgid "Unknown parameter: %s\n"
+msgid "Error: unknown parameter: %s"
+msgstr "Помилка: невідомий параметр: %s"
+
+#: ../cli/src/connections.c:1564
#, c-format
msgid "no active connection on device '%s'"
msgstr "на пристрої «%s» немає активних з’єднань"
-#: ../cli/src/connections.c:1093
+#: ../cli/src/connections.c:1572
#, c-format
msgid "no active connection or device"
msgstr "немає активних з’єднань або пристроїв"
-#: ../cli/src/connections.c:1164
+#: ../cli/src/connections.c:1643
#, c-format
msgid "device '%s' not compatible with connection '%s'"
msgstr "пристрій «%s» несумісний зі з’єднанням «%s»"
-#: ../cli/src/connections.c:1166
+#: ../cli/src/connections.c:1645
#, c-format
msgid "no device found for connection '%s'"
msgstr "не виявлено пристрою для з’єднання «%s»"
-#: ../cli/src/connections.c:1177
-msgid "activating"
-msgstr "активація"
-
-#: ../cli/src/connections.c:1179
-msgid "activated"
-msgstr "активовано"
-
-#: ../cli/src/connections.c:1181 ../cli/src/devices.c:304
-msgid "deactivating"
-msgstr "деактивація"
-
-#: ../cli/src/connections.c:1184 ../cli/src/connections.c:1207
-#: ../cli/src/connections.c:1240 ../cli/src/devices.c:308
-#: ../cli/src/devices.c:688 ../cli/src/network-manager.c:118
-#: ../cli/src/network-manager.c:180 ../cli/src/network-manager.c:183
-#: ../cli/src/network-manager.c:192 ../cli/src/network-manager.c:298
-#: ../cli/src/network-manager.c:353 ../cli/src/network-manager.c:391
-#: ../cli/src/network-manager.c:430 ../cli/src/settings.c:485
-#: ../cli/src/utils.c:396
-msgid "unknown"
-msgstr "невідомо"
-
-#: ../cli/src/connections.c:1193
-msgid "VPN connecting (prepare)"
-msgstr "З’єднання VPN (приготування)"
-
-#: ../cli/src/connections.c:1195
-msgid "VPN connecting (need authentication)"
-msgstr "З’єднання VPN (потрібне розпізнавання)"
-
-#: ../cli/src/connections.c:1197
-msgid "VPN connecting"
-msgstr "З’єднання VPN"
-
-#: ../cli/src/connections.c:1199
-msgid "VPN connecting (getting IP configuration)"
-msgstr "З’єднання VPN (отримання налаштувань IP)"
-
-#: ../cli/src/connections.c:1201
-msgid "VPN connected"
-msgstr "VPN з’єднано"
-
-#: ../cli/src/connections.c:1203
-msgid "VPN connection failed"
-msgstr "Невдала спроба з’єднання VPN"
-
-#: ../cli/src/connections.c:1205
-msgid "VPN disconnected"
-msgstr "VPN роз’єднано"
-
-#: ../cli/src/connections.c:1216
+#: ../cli/src/connections.c:1656
msgid "unknown reason"
msgstr "невідома причина"
-#: ../cli/src/connections.c:1218
+#: ../cli/src/connections.c:1658
msgid "none"
msgstr "немає"
-#: ../cli/src/connections.c:1220
+#: ../cli/src/connections.c:1660
msgid "the user was disconnected"
msgstr "користувача від’єднано"
-#: ../cli/src/connections.c:1222
+#: ../cli/src/connections.c:1662
msgid "the base network connection was interrupted"
msgstr "основне з’єднання з мережею розірвано"
-#: ../cli/src/connections.c:1224
+#: ../cli/src/connections.c:1664
msgid "the VPN service stopped unexpectedly"
msgstr "служба VPN неочікувано завершила роботу"
-#: ../cli/src/connections.c:1226
+#: ../cli/src/connections.c:1666
msgid "the VPN service returned invalid configuration"
msgstr "службою VPN повернуто неприпустимі налаштування"
-#: ../cli/src/connections.c:1228
+#: ../cli/src/connections.c:1668
msgid "the connection attempt timed out"
msgstr "перевищено час очікування на встановлення з’єднання"
-#: ../cli/src/connections.c:1230
+#: ../cli/src/connections.c:1670
msgid "the VPN service did not start in time"
msgstr "службу VPN не було вчасно запущено"
-#: ../cli/src/connections.c:1232
+#: ../cli/src/connections.c:1672
msgid "the VPN service failed to start"
msgstr "не вдалося запустити службу VPN"
-#: ../cli/src/connections.c:1234
+#: ../cli/src/connections.c:1674
msgid "no valid VPN secrets"
msgstr "не виявлено коректних реєстраційних даних VPN"
-#: ../cli/src/connections.c:1236
+#: ../cli/src/connections.c:1676
msgid "invalid VPN secrets"
msgstr "некоректні реєстраційні дані VPN"
-#: ../cli/src/connections.c:1238
+#: ../cli/src/connections.c:1678
msgid "the connection was removed"
msgstr "з’єднання було вилучено"
-#: ../cli/src/connections.c:1252
+#: ../cli/src/connections.c:1692
#, c-format
msgid "state: %s\n"
msgstr "стан: %s\n"
-#: ../cli/src/connections.c:1255 ../cli/src/connections.c:1281
+#: ../cli/src/connections.c:1695 ../cli/src/connections.c:1721
#, c-format
msgid "Connection activated\n"
msgstr "З’єднання активовано\n"
-#: ../cli/src/connections.c:1258
+#: ../cli/src/connections.c:1698
#, c-format
msgid "Error: Connection activation failed."
msgstr "Помилка: невдала спроба активації з’єднання."
-#: ../cli/src/connections.c:1277
+#: ../cli/src/connections.c:1717
#, c-format
msgid "state: %s (%d)\n"
msgstr "стан: %s (%d)\n"
-#: ../cli/src/connections.c:1287
+#: ../cli/src/connections.c:1727
#, c-format
msgid "Error: Connection activation failed: %s."
msgstr "Помилка: не вдалося активувати з’єднання: %s."
-#: ../cli/src/connections.c:1304 ../cli/src/devices.c:1136
+#: ../cli/src/connections.c:1744 ../cli/src/devices.c:1136
#, c-format
msgid "Error: Timeout %d sec expired."
msgstr "Помилка: перевищено час очікування у %d с."
-#: ../cli/src/connections.c:1317
+#: ../cli/src/connections.c:1757
#, c-format
msgid "Error: Connection activation failed: %s"
msgstr "Помилка: не вдалося активувати з’єднання: %s"
-#: ../cli/src/connections.c:1323
+#: ../cli/src/connections.c:1763
#, c-format
msgid "Active connection state: %s\n"
msgstr "Стан активного з’єднання: %s\n"
-#: ../cli/src/connections.c:1324
+#: ../cli/src/connections.c:1764
#, c-format
msgid "Active connection path: %s\n"
msgstr "Адреса активного з’єднання: %s\n"
-#: ../cli/src/connections.c:1376 ../cli/src/connections.c:1517
+#: ../cli/src/connections.c:1816 ../cli/src/connections.c:1957
+#: ../cli/src/connections.c:2085
#, c-format
msgid "Error: Unknown connection: %s."
msgstr "Помилка: невідоме з’єднання: %s."
-#: ../cli/src/connections.c:1422 ../cli/src/devices.c:1208
+#: ../cli/src/connections.c:1862 ../cli/src/devices.c:1208
#, c-format
msgid "Error: timeout value '%s' is not valid."
msgstr "Помилка: значення часу очікування «%s» є некоректним."
-#: ../cli/src/connections.c:1435 ../cli/src/connections.c:1534
+#: ../cli/src/connections.c:1875 ../cli/src/connections.c:1974
+#: ../cli/src/connections.c:2065
#, c-format
msgid "Error: id or uuid has to be specified."
msgstr "Помилка: мало бути вказано id або uuid."
-#: ../cli/src/connections.c:1463
+#: ../cli/src/connections.c:1903
#, c-format
msgid "Error: No suitable device found: %s."
msgstr "Помилка: не знайдено відповідних пристроїв: %s."
-#: ../cli/src/connections.c:1465
+#: ../cli/src/connections.c:1905
#, c-format
msgid "Error: No suitable device found."
msgstr "Помилка: не знайдено відповідних пристроїв."
-#: ../cli/src/connections.c:1570
+#: ../cli/src/connections.c:2010
#, c-format
msgid "Warning: Connection not active\n"
msgstr "Помилка: з’єднання не є активним\n"
-#: ../cli/src/connections.c:1608
+#: ../cli/src/connections.c:2024
+#, c-format
+#| msgid "Error: Connection activation failed: %s"
+msgid "Error: Connection deletion failed: %s"
+msgstr "Помилка: не вдалося вилучити з’єднання: %s"
+
+#: ../cli/src/connections.c:2142
#, c-format
msgid "Error: 'con' command '%s' is not valid."
msgstr "Помилка: команда «con» «%s» є некоректною."
-#: ../cli/src/connections.c:1673
+#: ../cli/src/connections.c:2207
#, c-format
msgid "Error: could not connect to D-Bus."
msgstr "Помилка: не вдалося встановити з’єднання з D-Bus."
-#: ../cli/src/connections.c:1680
+#: ../cli/src/connections.c:2215
#, c-format
msgid "Error: Could not get system settings."
msgstr "Помилка: не вдалося отримати параметри системи."
-#: ../cli/src/connections.c:1690
+#: ../cli/src/connections.c:2225
#, c-format
msgid "Error: Can't obtain connections: settings service is not running."
msgstr ""
@@ -465,223 +618,248 @@ msgstr ""
#. 0
#. 9
#. 3
-#: ../cli/src/devices.c:66 ../cli/src/devices.c:102 ../cli/src/devices.c:212
-#: ../cli/src/devices.c:228
+#: ../cli/src/devices.c:65 ../cli/src/devices.c:101 ../cli/src/devices.c:179
+#: ../cli/src/devices.c:195
msgid "DEVICE"
msgstr "ПРИСТРІЙ"
-#. 1
-#. 4
-#. 1
-#: ../cli/src/devices.c:68 ../cli/src/devices.c:106
-#: ../cli/src/network-manager.c:39
-msgid "STATE"
-msgstr "СТАН"
-
-#: ../cli/src/devices.c:78
-msgid "GENERAL"
-msgstr "ЗАГАЛЬНІ"
-
#. 0
-#: ../cli/src/devices.c:79
+#: ../cli/src/devices.c:78
msgid "CAPABILITIES"
msgstr "МОЖЛИВОСТІ"
#. 1
-#: ../cli/src/devices.c:80
+#: ../cli/src/devices.c:79
msgid "WIFI-PROPERTIES"
msgstr "ПАРАМЕТРИ WIFI"
#. 2
-#: ../cli/src/devices.c:81
+#: ../cli/src/devices.c:80
msgid "AP"
msgstr "ТД"
#. 3
-#: ../cli/src/devices.c:82
+#: ../cli/src/devices.c:81
msgid "WIRED-PROPERTIES"
msgstr "ПАРАМЕТРИ WIRED"
#. 4
-#: ../cli/src/devices.c:83
+#: ../cli/src/devices.c:82
msgid "WIMAX-PROPERTIES"
msgstr "ПАРАМЕТРИ WIMAX"
#. 5
#. 0
-#: ../cli/src/devices.c:84 ../cli/src/devices.c:225
+#: ../cli/src/devices.c:83 ../cli/src/devices.c:192
msgid "NSP"
msgstr "NSP"
#. 6
-#: ../cli/src/devices.c:85
-msgid "IP4-SETTINGS"
-msgstr "ПАРАМЕТРИ IP4"
+#: ../cli/src/devices.c:84
+#| msgid "IP4-DNS"
+msgid "IP4"
+msgstr "IP4"
#. 7
-#: ../cli/src/devices.c:86
-msgid "IP4-DNS"
-msgstr "IP4-DNS"
+#: ../cli/src/devices.c:85
+msgid "DHCP4"
+msgstr "DHCP4"
#. 8
-#: ../cli/src/devices.c:87
-msgid "IP6-SETTINGS"
-msgstr "ПАРАМЕТРИ IP6"
+#: ../cli/src/devices.c:86
+#| msgid "IP6-DNS"
+msgid "IP6"
+msgstr "IP6"
#. 9
-#: ../cli/src/devices.c:88
-msgid "IP6-DNS"
-msgstr "IP6-DNS"
+#: ../cli/src/devices.c:87
+msgid "DHCP6"
+msgstr "DHCP6"
#. 2
+#: ../cli/src/devices.c:103
+msgid "VENDOR"
+msgstr "ВИРОБНИК"
+
+#. 3
#: ../cli/src/devices.c:104
+msgid "PRODUCT"
+msgstr "ПРОДУКТ"
+
+#. 4
+#: ../cli/src/devices.c:105
msgid "DRIVER"
msgstr "ДРАЙВЕР"
-#. 3
-#: ../cli/src/devices.c:105
+#. 5
+#: ../cli/src/devices.c:106
msgid "HWADDR"
msgstr "АП.АДРЕСА"
+#. 7
+#: ../cli/src/devices.c:108
+#| msgid "READONLY"
+msgid "REASON"
+msgstr "ПРИЧИНА"
+
+#. 8
+#: ../cli/src/devices.c:109
+msgid "UDI"
+msgstr "UDI"
+
+#. 9
+#: ../cli/src/devices.c:110
+msgid "IP-IFACE"
+msgstr "IP-IFACE"
+
+#. 10
+#: ../cli/src/devices.c:111
+msgid "NM-MANAGED"
+msgstr "КЕРОВАНЕ-NM"
+
+#. 11
+#: ../cli/src/devices.c:112
+msgid "FIRMWARE-MISSING"
+msgstr "ПОТРІБНИЙ-МІКРОКОД"
+
+#. 12
+#: ../cli/src/devices.c:113
+#| msgid "AUTOCONNECT"
+msgid "CONNECTION"
+msgstr "З’ЄДНАННЯ"
+
#. 0
-#: ../cli/src/devices.c:115
+#: ../cli/src/devices.c:122
msgid "CARRIER-DETECT"
msgstr "ВИЗН.НОСІЯ"
#. 1
-#: ../cli/src/devices.c:116
+#: ../cli/src/devices.c:123
msgid "SPEED"
msgstr "ШВИДКІСТЬ"
#. 0
-#: ../cli/src/devices.c:125
+#: ../cli/src/devices.c:132
msgid "CARRIER"
msgstr "НОСІЙ"
#. 0
-#: ../cli/src/devices.c:135
+#: ../cli/src/devices.c:142
msgid "WEP"
msgstr "WEP"
#. 1
-#: ../cli/src/devices.c:136
+#: ../cli/src/devices.c:143
msgid "WPA"
msgstr "WPA"
#. 2
-#: ../cli/src/devices.c:137
+#: ../cli/src/devices.c:144
msgid "WPA2"
msgstr "WPA2"
#. 3
-#: ../cli/src/devices.c:138
+#: ../cli/src/devices.c:145
msgid "TKIP"
msgstr "TKIP"
#. 4
-#: ../cli/src/devices.c:139
+#: ../cli/src/devices.c:146
msgid "CCMP"
msgstr "CCMP"
#. 0
-#: ../cli/src/devices.c:149
+#: ../cli/src/devices.c:156
msgid "CTR-FREQ"
msgstr "CTR-FREQ"
#. 1
-#: ../cli/src/devices.c:150
+#: ../cli/src/devices.c:157
msgid "RSSI"
msgstr "RSSI"
#. 2
-#: ../cli/src/devices.c:151
+#: ../cli/src/devices.c:158
msgid "CINR"
msgstr "CINR"
#. 3
-#: ../cli/src/devices.c:152
+#: ../cli/src/devices.c:159
msgid "TX-POW"
msgstr "TX-POW"
#. 4
-#: ../cli/src/devices.c:153
+#: ../cli/src/devices.c:160
msgid "BSID"
msgstr "BSID"
#. 0
-#: ../cli/src/devices.c:163 ../cli/src/devices.c:174
-msgid "ADDRESS"
-msgstr "АДРЕСА"
-
-#. 1
-#: ../cli/src/devices.c:164 ../cli/src/devices.c:175
-msgid "PREFIX"
-msgstr "ПРЕФІКС"
-
-#. 2
-#: ../cli/src/devices.c:165 ../cli/src/devices.c:176
-msgid "GATEWAY"
-msgstr "ШЛЮЗ"
-
-#. 0
-#: ../cli/src/devices.c:185 ../cli/src/devices.c:194
-msgid "DNS"
-msgstr "DNS"
-
-#. 0
-#: ../cli/src/devices.c:203
+#: ../cli/src/devices.c:170
msgid "SSID"
msgstr "SSID"
#. 1
-#: ../cli/src/devices.c:204
+#: ../cli/src/devices.c:171
msgid "BSSID"
msgstr "BSSID"
#. 2
-#: ../cli/src/devices.c:205
+#: ../cli/src/devices.c:172
msgid "MODE"
msgstr "РЕЖИМ"
#. 3
-#: ../cli/src/devices.c:206
+#: ../cli/src/devices.c:173
msgid "FREQ"
msgstr "ЧАСТОТА"
#. 4
-#: ../cli/src/devices.c:207
+#: ../cli/src/devices.c:174
msgid "RATE"
msgstr "ШВИДКІСТЬ"
#. 5
#. 1
-#: ../cli/src/devices.c:208 ../cli/src/devices.c:226
+#: ../cli/src/devices.c:175 ../cli/src/devices.c:193
msgid "SIGNAL"
msgstr "СИГНАЛ"
#. 6
-#: ../cli/src/devices.c:209
+#: ../cli/src/devices.c:176
msgid "SECURITY"
msgstr "ЗАХИСТ"
#. 7
-#: ../cli/src/devices.c:210
+#: ../cli/src/devices.c:177
msgid "WPA-FLAGS"
msgstr "ПРАПОРЦІ WPA"
#. 8
-#: ../cli/src/devices.c:211
+#: ../cli/src/devices.c:178
msgid "RSN-FLAGS"
msgstr "ПРАПОРЦІ RSN"
#. 10
#. 4
-#: ../cli/src/devices.c:213 ../cli/src/devices.c:229
+#: ../cli/src/devices.c:180 ../cli/src/devices.c:196
msgid "ACTIVE"
msgstr "АКТИВНИЙ"
-#: ../cli/src/devices.c:256
-#, c-format
+#: ../cli/src/devices.c:213
+#, c-format
+#| msgid ""
+#| "Usage: nmcli dev { COMMAND | help }\n"
+#| "\n"
+#| " COMMAND := { status | list | disconnect | wifi | wimax }\n"
+#| "\n"
+#| " COMMAND := { status | list | disconnect | wifi }\n"
+#| "\n"
+#| " status\n"
+#| " list [iface <iface>]\n"
+#| " disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
+#| " wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+#| " wimax [list [iface <iface>] [nsp <name>]]\n"
+#| "\n"
msgid ""
"Usage: nmcli dev { COMMAND | help }\n"
"\n"
@@ -692,7 +870,7 @@ msgid ""
" status\n"
" list [iface <iface>]\n"
" disconnect iface <iface> [--nowait] [--timeout <timeout>]\n"
-" wifi [list [iface <iface>] [hwaddr <hwaddr>]]\n"
+" wifi [list [iface <iface>] [bssid <BSSID>]]\n"
" wimax [list [iface <iface>] [nsp <name>]]\n"
"\n"
msgstr ""
@@ -705,152 +883,376 @@ msgstr ""
" status\n"
" list [iface <інтерфейс>]\n"
" disconnect iface <інтерфейс> [--nowait] [--timeout <очікування>]\n"
-" wifi [list [iface <інтерфейс>] [hwaddr <ап. адреса>]]\n"
+" wifi [list [iface <інтерфейс>] [bssid <BSSID>]]\n"
" wimax [list [iface <інтерфейс>] [nsp <назва>]]\n"
"\n"
-#: ../cli/src/devices.c:284
+#: ../cli/src/devices.c:241
msgid "unmanaged"
msgstr "некерований"
-#: ../cli/src/devices.c:286
+#: ../cli/src/devices.c:243
msgid "unavailable"
msgstr "недоступний"
-#: ../cli/src/devices.c:288 ../cli/src/network-manager.c:115
+#: ../cli/src/devices.c:245 ../cli/src/network-manager.c:108
msgid "disconnected"
msgstr "роз'єднано"
-#: ../cli/src/devices.c:290
+#: ../cli/src/devices.c:247
msgid "connecting (prepare)"
msgstr "з’єднання (приготування)"
-#: ../cli/src/devices.c:292
+#: ../cli/src/devices.c:249
msgid "connecting (configuring)"
msgstr "з’єднання (налаштовування)"
-#: ../cli/src/devices.c:294
+#: ../cli/src/devices.c:251
msgid "connecting (need authentication)"
msgstr "з’єднання (потрібне розпізнавання)"
-#: ../cli/src/devices.c:296
+#: ../cli/src/devices.c:253
msgid "connecting (getting IP configuration)"
msgstr "з’єднання (отримання налаштувань IP)"
-#: ../cli/src/devices.c:298
+#: ../cli/src/devices.c:255
msgid "connecting (checking IP connectivity)"
msgstr "з’єднання (перевірка можливості з’єднання)"
-#: ../cli/src/devices.c:300
+#: ../cli/src/devices.c:257
msgid "connecting (starting secondary connections)"
msgstr "з’єднання (встановлення другорядних з’єднань)"
-#: ../cli/src/devices.c:302 ../cli/src/network-manager.c:111
+#: ../cli/src/devices.c:259 ../cli/src/network-manager.c:104
msgid "connected"
msgstr "з'єднано"
-#: ../cli/src/devices.c:306
+#: ../cli/src/devices.c:263
msgid "connection failed"
msgstr "невдала спроба з’єднання"
-#: ../cli/src/devices.c:331 ../cli/src/devices.c:341 ../cli/src/devices.c:501
-#: ../cli/src/devices.c:545
+#: ../cli/src/devices.c:274
+msgid "No reason given"
+msgstr "Причину не вказано"
+
+#: ../cli/src/devices.c:277
+#| msgid "Unknown"
+msgid "Unknown error"
+msgstr "Невідома помилка"
+
+#: ../cli/src/devices.c:280
+msgid "Device is now managed"
+msgstr "Тепер пристрій є керованим"
+
+#: ../cli/src/devices.c:283
+msgid "Device is now unmanaged"
+msgstr "Тепер пристрій є некерованим"
+
+#: ../cli/src/devices.c:286
+#| msgid "the VPN service returned invalid configuration"
+msgid "The device could not be readied for configuration"
+msgstr "Пристрій не може бути приготовано до налаштовування"
+
+#: ../cli/src/devices.c:289
+msgid ""
+"IP configuration could not be reserved (no available address, timeout, etc)"
+msgstr ""
+"Налаштування IP не можна резервувати (немає доступних адрес, часу очікування "
+"тощо)"
+
+#: ../cli/src/devices.c:292
+msgid "The IP configuration is no longer valid"
+msgstr "Налаштування IP вже не є коректними"
+
+#: ../cli/src/devices.c:295
+msgid "Secrets were required, but not provided"
+msgstr "Потрібні були реєстраційні дані, яких не було надано"
+
+#: ../cli/src/devices.c:298
+msgid "802.1X supplicant disconnected"
+msgstr "Допоміжну програму 802.1X від’єднано"
+
+#: ../cli/src/devices.c:301
+msgid "802.1X supplicant configuration failed"
+msgstr "Спроба налаштувати допоміжну програму 802.1X завершилася невдало"
+
+#: ../cli/src/devices.c:304
+msgid "802.1X supplicant failed"
+msgstr "Помилка допоміжної програми 802.1X"
+
+#: ../cli/src/devices.c:307
+msgid "802.1X supplicant took too long to authenticate"
+msgstr ""
+"Розпізнавання за допомогою допоміжної програми 802.1X триває занадто довго"
+
+#: ../cli/src/devices.c:310
+#| msgid "the VPN service failed to start"
+msgid "PPP service failed to start"
+msgstr "Не вдалося запустити службу PPP"
+
+#: ../cli/src/devices.c:313
+#| msgid "VPN disconnected"
+msgid "PPP service disconnected"
+msgstr "Службу PPP від’єднано"
+
+#: ../cli/src/devices.c:316
+msgid "PPP failed"
+msgstr "помилка PPP"
+
+#: ../cli/src/devices.c:319
+#| msgid "the VPN service failed to start"
+msgid "DHCP client failed to start"
+msgstr "Не вдалося запустити клієнтську програму DHCP"
+
+#: ../cli/src/devices.c:322
+msgid "DHCP client error"
+msgstr "помилка клієнтської програми DHCP"
+
+#: ../cli/src/devices.c:325
+#| msgid "VPN connection failed"
+msgid "DHCP client failed"
+msgstr "критична помилка клієнтської програми DHCP"
+
+#: ../cli/src/devices.c:328
+#| msgid "the VPN service failed to start"
+msgid "Shared connection service failed to start"
+msgstr "Не вдалося запустити службу спільного використання з’єднання"
+
+#: ../cli/src/devices.c:331
+#| msgid "connection failed"
+msgid "Shared connection service failed"
+msgstr "Критична помилка служби спільного використання з’єднання"
+
+#: ../cli/src/devices.c:334
+#| msgid "the VPN service failed to start"
+msgid "AutoIP service failed to start"
+msgstr "Не вдалося запустити службу AutoIP"
+
+#: ../cli/src/devices.c:337
+msgid "AutoIP service error"
+msgstr "Помилка служби AutoIP"
+
+#: ../cli/src/devices.c:340
+#| msgid "the VPN service failed to start"
+msgid "AutoIP service failed"
+msgstr "Помилка служби AutoIP"
+
+#: ../cli/src/devices.c:343
+msgid "The line is busy"
+msgstr "Лінію зайнято"
+
+#: ../cli/src/devices.c:346
+msgid "No dial tone"
+msgstr "Немає гудка"
+
+#: ../cli/src/devices.c:349
+msgid "No carrier could be established"
+msgstr "Не вдалося визначити носій сигналу"
+
+#: ../cli/src/devices.c:352
+msgid "The dialing request timed out"
+msgstr "Перевищено час очікування на підтвердження запиту щодо набору номера"
+
+#: ../cli/src/devices.c:355
+msgid "The dialing attempt failed"
+msgstr "Спроба набирання номера завершилася невдало"
+
+#: ../cli/src/devices.c:358
+#| msgid "Error: Connection activation failed."
+msgid "Modem initialization failed"
+msgstr "Не вдалося ініціалізувати модем"
+
+#: ../cli/src/devices.c:361
+#| msgid "Failed to decrypt the private key."
+msgid "Failed to select the specified APN"
+msgstr "Не вдалося вибрати вказаний APN"
+
+#: ../cli/src/devices.c:364
+msgid "Not searching for networks"
+msgstr "Пошук мереж не виконується"
+
+#: ../cli/src/devices.c:367
+#| msgid "Networking enabled"
+msgid "Network registration denied"
+msgstr "Реєстрацію у мережі заборонено"
+
+#: ../cli/src/devices.c:370
+msgid "Network registration timed out"
+msgstr "Перевищено час очікування на реєстрацію у мережі"
+
+#: ../cli/src/devices.c:373
+msgid "Failed to register with the requested network"
+msgstr "Не вдалося зареєструватися у потрібній мережі"
+
+#: ../cli/src/devices.c:376
+#| msgid "VPN connection failed"
+msgid "PIN check failed"
+msgstr "Помилка під час спроби перевірити PIN-код"
+
+#: ../cli/src/devices.c:379
+msgid "Necessary firmware for the device may be missing"
+msgstr "Можливо, не вистачає потрібної для роботи пристрою мікропрограми"
+
+#: ../cli/src/devices.c:382
+#| msgid "the connection was removed"
+msgid "The device was removed"
+msgstr "Пристрій вилучено"
+
+#: ../cli/src/devices.c:385
+#| msgid "NetworkManager status"
+msgid "NetworkManager went to sleep"
+msgstr "NetworkManager переведено у режим сну"
+
+#: ../cli/src/devices.c:388
+#| msgid "no active connection or device"
+msgid "The device's active connection disappeared"
+msgstr "Активне з’єднання з пристроєм зникло"
+
+#: ../cli/src/devices.c:391
+msgid "Device disconnected by user or client"
+msgstr "Пристрій роз’єднано з боку користувача або клієнтської програми"
+
+#: ../cli/src/devices.c:394
+msgid "Carrier/link changed"
+msgstr "Змінено носій або зв’язок"
+
+#: ../cli/src/devices.c:397
+#| msgid "the connection was removed"
+msgid "The device's existing connection was assumed"
+msgstr ""
+"Зроблено припущення щодо використання вже встановленого з’єднання з пристроєм"
+
+#: ../cli/src/devices.c:400
+msgid "The supplicant is now available"
+msgstr "Відкрито доступ до допоміжної програми"
+
+#: ../cli/src/devices.c:403
+#| msgid "'dhcpcd' could be found."
+msgid "The modem could not be found"
+msgstr "Не вдалося виявити модем"
+
+#: ../cli/src/devices.c:406
+#| msgid "the connection attempt timed out"
+msgid "The Bluetooth connection failed or timed out"
+msgstr ""
+"Помилка з’єднання Bluetooth або перевищення часу очікування на передавання "
+"даних з’єднанням"
+
+#: ../cli/src/devices.c:409
+msgid "GSM Modem's SIM card not inserted"
+msgstr "До модема GSM не вставлено SIM-картки"
+
+#: ../cli/src/devices.c:412
+msgid "GSM Modem's SIM PIN required"
+msgstr "Слід вказати PIN-код SIM-картки у модемі GSM"
+
+#: ../cli/src/devices.c:415
+msgid "GSM Modem's SIM PUK required"
+msgstr "Слід вказати код розпізнавання (PUK) SIM-картки у модемі GSM"
+
+#: ../cli/src/devices.c:418
+msgid "GSM Modem's SIM wrong"
+msgstr "Помилкова SIM-картка у модемі GSM"
+
+#: ../cli/src/devices.c:421
+msgid "InfiniBand device does not support connected mode"
+msgstr "У пристрої InfiniBand не передбачено режиму з’єднання"
+
+#: ../cli/src/devices.c:423 ../cli/src/devices.c:446 ../cli/src/devices.c:458
+#: ../cli/src/devices.c:578 ../cli/src/devices.c:622
msgid "Unknown"
msgstr "Невідомо"
-#: ../cli/src/devices.c:374
+#: ../cli/src/devices.c:491
msgid "(none)"
msgstr "(немає)"
-#: ../cli/src/devices.c:399
-#, c-format
-msgid "%s: error converting IP4 address 0x%X"
-msgstr "%s: помилка під час перетворення адреси IP4 0x%X"
-
-#: ../cli/src/devices.c:470
+#: ../cli/src/devices.c:547
#, c-format
msgid "%u MHz"
msgstr "%u МГц"
-#: ../cli/src/devices.c:471
+#: ../cli/src/devices.c:548
#, c-format
msgid "%u MB/s"
msgstr "%u МБ/с"
-#: ../cli/src/devices.c:480
+#: ../cli/src/devices.c:557
msgid "Encrypted: "
msgstr "Зашифровано: "
-#: ../cli/src/devices.c:485
+#: ../cli/src/devices.c:562
msgid "WEP "
msgstr "WEP "
-#: ../cli/src/devices.c:487
+#: ../cli/src/devices.c:564
msgid "WPA "
msgstr "WPA "
-#: ../cli/src/devices.c:489
+#: ../cli/src/devices.c:566
msgid "WPA2 "
msgstr "WPA2 "
-#: ../cli/src/devices.c:492
+#: ../cli/src/devices.c:569
msgid "Enterprise "
msgstr "Enterprise "
-#: ../cli/src/devices.c:501
+#: ../cli/src/devices.c:578
msgid "Ad-Hoc"
msgstr "Ad-Hoc"
-#: ../cli/src/devices.c:501
+#: ../cli/src/devices.c:578
msgid "Infrastructure"
msgstr "Інфраструктура"
-#: ../cli/src/devices.c:536
+#: ../cli/src/devices.c:613
msgid "Home"
msgstr "Домівка"
-#: ../cli/src/devices.c:539
+#: ../cli/src/devices.c:616
msgid "Partner"
msgstr "Партнер"
-#: ../cli/src/devices.c:542
+#: ../cli/src/devices.c:619
msgid "Roaming"
msgstr "Роумінг"
-#: ../cli/src/devices.c:612
+#: ../cli/src/devices.c:691
#, c-format
msgid "Error: 'dev list': %s"
msgstr "Помилка: «dev list»: %s"
-#: ../cli/src/devices.c:614
+#: ../cli/src/devices.c:693
#, c-format
msgid "Error: 'dev list': %s; allowed fields: %s"
msgstr "Помилка: «dev list»: %s; дозволені поля: %s"
-#: ../cli/src/devices.c:623
+#: ../cli/src/devices.c:702
msgid "Device details"
msgstr "Дані щодо пристрою"
-#: ../cli/src/devices.c:657 ../cli/src/devices.c:1152 ../cli/src/utils.c:342
+#: ../cli/src/devices.c:744 ../cli/src/devices.c:745 ../cli/src/devices.c:1152
+#: ../cli/src/utils.c:445
msgid "(unknown)"
msgstr "(невідомо)"
-#: ../cli/src/devices.c:658
-msgid "unknown)"
-msgstr "невідомо)"
+#: ../cli/src/devices.c:753
+#| msgid "connected"
+msgid "not connected"
+msgstr "не з’єднано"
-#: ../cli/src/devices.c:684
+#: ../cli/src/devices.c:780
#, c-format
msgid "%u Mb/s"
msgstr "%u Мб/с"
#. Print header
#. "WIRED-PROPERTIES"
-#: ../cli/src/devices.c:757
+#: ../cli/src/devices.c:853
msgid "on"
msgstr "увімкн."
-#: ../cli/src/devices.c:757
+#: ../cli/src/devices.c:853
msgid "off"
msgstr "вимкн."
@@ -874,7 +1276,7 @@ msgid "Error: '%s' argument is missing."
msgstr "Помилка: не вказано аргументу «%s»."
#: ../cli/src/devices.c:1101 ../cli/src/devices.c:1253
-#: ../cli/src/devices.c:1389 ../cli/src/devices.c:1608
+#: ../cli/src/devices.c:1390 ../cli/src/devices.c:1609
#, c-format
msgid "Error: Device '%s' not found."
msgstr "Помилка: не знайдено пристрій «%s»."
@@ -899,66 +1301,72 @@ msgstr "Стан пристрою: %d (%s)\n"
msgid "Error: iface has to be specified."
msgstr "Помилка: мало бути вказано інтерфейс."
-#: ../cli/src/devices.c:1347
+#: ../cli/src/devices.c:1348
#, c-format
msgid "Error: 'dev wifi': %s"
msgstr "Помилка: «dev wifi»: %s"
-#: ../cli/src/devices.c:1349
+#: ../cli/src/devices.c:1350
#, c-format
msgid "Error: 'dev wifi': %s; allowed fields: %s"
msgstr "Помилка: «dev wifi»: %s; дозволені поля: %s"
-#: ../cli/src/devices.c:1372
+#: ../cli/src/devices.c:1373
msgid "WiFi scan list"
msgstr "Список сканування WiFi"
-#: ../cli/src/devices.c:1409 ../cli/src/devices.c:1463
-#: ../cli/src/devices.c:1670
+#: ../cli/src/devices.c:1410 ../cli/src/devices.c:1464
#, c-format
-msgid "Error: Access point with hwaddr '%s' not found."
-msgstr "Помилка: не знайдено точки доступу з апаратною адресою «%s»."
+#| msgid "Error: Access point with hwaddr '%s' not found."
+msgid "Error: Access point with bssid '%s' not found."
+msgstr "Помилка: не знайдено точки доступу з bssid «%s»."
-#: ../cli/src/devices.c:1426
+#: ../cli/src/devices.c:1427
#, c-format
msgid "Error: Device '%s' is not a WiFi device."
msgstr "Помилка: пристрій «%s» не є пристроєм WiFi."
-#: ../cli/src/devices.c:1490
+#: ../cli/src/devices.c:1491
#, c-format
msgid "Error: 'dev wifi' command '%s' is not valid."
msgstr "Помилка: команда «dev wifi» «%s» є некоректною."
-#: ../cli/src/devices.c:1566
+#: ../cli/src/devices.c:1567
#, c-format
msgid "Error: 'dev wimax': %s"
msgstr "Помилка: «dev wimax»: %s"
-#: ../cli/src/devices.c:1568
+#: ../cli/src/devices.c:1569
#, c-format
msgid "Error: 'dev wimax': %s; allowed fields: %s"
msgstr "Помилка: «dev wimax»: %s; дозволені поля: %s"
-#: ../cli/src/devices.c:1591
+#: ../cli/src/devices.c:1592
msgid "WiMAX NSP list"
msgstr "Список WiMAX NSP"
-#: ../cli/src/devices.c:1628
+#: ../cli/src/devices.c:1629
#, c-format
msgid "Error: NSP with name '%s' not found."
msgstr "Помилка: не знайдено NSP з назвою «%s»."
-#: ../cli/src/devices.c:1639
+#: ../cli/src/devices.c:1640
#, c-format
msgid "Error: Device '%s' is not a WiMAX device."
msgstr "Помилка: пристрій «%s» не є пристроєм WiMAX."
-#: ../cli/src/devices.c:1697
+#: ../cli/src/devices.c:1671
+#, c-format
+#| msgid "Error: Access point with hwaddr '%s' not found."
+msgid "Error: Access point with nsp '%s' not found."
+msgstr "Помилка: не знайдено точки доступу з nsp «%s»."
+
+#: ../cli/src/devices.c:1698
#, c-format
msgid "Error: 'dev wimax' command '%s' is not valid."
msgstr "Помилка: команда «dev wimax» «%s» є некоректною."
-#: ../cli/src/devices.c:1747
+#: ../cli/src/devices.c:1748
#, c-format
msgid "Error: 'dev' command '%s' is not valid."
msgstr "Помилка: команда «dev» «%s» є некоректною."
@@ -1007,7 +1415,7 @@ msgstr "ОБЛАДНАННЯ WIMAX"
msgid "WIMAX"
msgstr "WIMAX"
-#: ../cli/src/network-manager.c:74
+#: ../cli/src/network-manager.c:67
#, c-format
msgid ""
"Usage: nmcli nm { COMMAND | help }\n"
@@ -1038,141 +1446,142 @@ msgstr ""
" wimax [on|off]\n"
"\n"
-#: ../cli/src/network-manager.c:103
+#: ../cli/src/network-manager.c:96
msgid "asleep"
msgstr "приспаний"
-#: ../cli/src/network-manager.c:105
+#: ../cli/src/network-manager.c:98
msgid "connecting"
msgstr "з’єднується"
-#: ../cli/src/network-manager.c:107
+#: ../cli/src/network-manager.c:100
msgid "connected (local only)"
msgstr "з’єднується (локально)"
-#: ../cli/src/network-manager.c:109
+#: ../cli/src/network-manager.c:102
msgid "connected (site only)"
msgstr "з’єднано (на вузлі)"
-#: ../cli/src/network-manager.c:113
+#: ../cli/src/network-manager.c:106
msgid "disconnecting"
msgstr "роз’єднується"
-#: ../cli/src/network-manager.c:153
+#: ../cli/src/network-manager.c:146
#, c-format
msgid "Error: 'nm status': %s"
msgstr "Помилка: «nm status»: %s"
-#: ../cli/src/network-manager.c:155
+#: ../cli/src/network-manager.c:148
#, c-format
msgid "Error: 'nm status': %s; allowed fields: %s"
msgstr "Помилка: «nm status»: %s; дозволені поля: %s"
#. create NMClient
-#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:169
-#: ../cli/src/network-manager.c:170 ../cli/src/network-manager.c:171
-#: ../cli/src/network-manager.c:172 ../cli/src/network-manager.c:174
-#: ../cli/src/network-manager.c:175 ../cli/src/network-manager.c:296
-#: ../cli/src/network-manager.c:351 ../cli/src/network-manager.c:389
-#: ../cli/src/network-manager.c:428
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "enabled"
msgstr "увімкнено"
-#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:169
-#: ../cli/src/network-manager.c:170 ../cli/src/network-manager.c:171
-#: ../cli/src/network-manager.c:172 ../cli/src/network-manager.c:174
-#: ../cli/src/network-manager.c:175 ../cli/src/network-manager.c:296
-#: ../cli/src/network-manager.c:351 ../cli/src/network-manager.c:389
-#: ../cli/src/network-manager.c:428
+#: ../cli/src/network-manager.c:161 ../cli/src/network-manager.c:162
+#: ../cli/src/network-manager.c:163 ../cli/src/network-manager.c:164
+#: ../cli/src/network-manager.c:165 ../cli/src/network-manager.c:167
+#: ../cli/src/network-manager.c:168 ../cli/src/network-manager.c:289
+#: ../cli/src/network-manager.c:344 ../cli/src/network-manager.c:382
+#: ../cli/src/network-manager.c:421
msgid "disabled"
msgstr "вимкнено"
-#: ../cli/src/network-manager.c:188
+#: ../cli/src/network-manager.c:181
msgid "NetworkManager status"
msgstr "Стан NetworkManager"
#. Print header
-#: ../cli/src/network-manager.c:191
+#: ../cli/src/network-manager.c:184
msgid "running"
msgstr "виконується"
-#: ../cli/src/network-manager.c:191
+#: ../cli/src/network-manager.c:184
msgid "not running"
msgstr "не виконується"
-#: ../cli/src/network-manager.c:222 ../cli/src/utils.c:322
+#: ../cli/src/network-manager.c:215 ../cli/src/utils.c:425
#, c-format
msgid "Error: Couldn't connect to system bus: %s"
msgstr ""
-"Помилка: не вдалося встановити з’єднання з системним каналом обміну даними: %s"
+"Помилка: не вдалося встановити з’єднання з системним каналом обміну даними: %"
+"s"
-#: ../cli/src/network-manager.c:233
+#: ../cli/src/network-manager.c:226
#, c-format
msgid "Error: Couldn't create D-Bus object proxy."
msgstr "Помилка: не вдалося створити проксі-об’єкт D-Bus."
-#: ../cli/src/network-manager.c:239
+#: ../cli/src/network-manager.c:232
#, c-format
msgid "Error in sleep: %s"
msgstr "Помилка у затримці: %s"
-#: ../cli/src/network-manager.c:283 ../cli/src/network-manager.c:338
-#: ../cli/src/network-manager.c:376 ../cli/src/network-manager.c:415
+#: ../cli/src/network-manager.c:276 ../cli/src/network-manager.c:331
+#: ../cli/src/network-manager.c:369 ../cli/src/network-manager.c:408
#, c-format
msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s"
msgstr ""
"Помилка: значення «--fields» «%s» не можна використовувати тут; дозволені "
"поля: %s"
-#: ../cli/src/network-manager.c:291
+#: ../cli/src/network-manager.c:284
msgid "Networking enabled"
msgstr "Мережу увімкнено"
-#: ../cli/src/network-manager.c:307
+#: ../cli/src/network-manager.c:300
#, c-format
msgid "Error: invalid 'enable' parameter: '%s'; use 'true' or 'false'."
msgstr ""
"Помилка: некоректний параметр «enable»: «%s»; мало бути «true» або «false»."
-#: ../cli/src/network-manager.c:317
+#: ../cli/src/network-manager.c:310
#, c-format
msgid "Error: Sleeping status is not exported by NetworkManager."
msgstr "Помилка: стан присипляння не експортовано NetworkManager."
-#: ../cli/src/network-manager.c:325
+#: ../cli/src/network-manager.c:318
#, c-format
msgid "Error: invalid 'sleep' parameter: '%s'; use 'true' or 'false'."
msgstr ""
"Помилка: некоректний параметр «sleep»: «%s»; мало бути «true» або «false»."
-#: ../cli/src/network-manager.c:346
+#: ../cli/src/network-manager.c:339
msgid "WiFi enabled"
msgstr "WiFi увімкнено"
-#: ../cli/src/network-manager.c:362
+#: ../cli/src/network-manager.c:355
#, c-format
msgid "Error: invalid 'wifi' parameter: '%s'."
msgstr "Помилка: некоректний параметр «wifi»: «%s»."
-#: ../cli/src/network-manager.c:384
+#: ../cli/src/network-manager.c:377
msgid "WWAN enabled"
msgstr "WWAN увімкнено"
-#: ../cli/src/network-manager.c:400
+#: ../cli/src/network-manager.c:393
#, c-format
msgid "Error: invalid 'wwan' parameter: '%s'."
msgstr "Помилка: некоректний параметр «wwan»: «%s»."
-#: ../cli/src/network-manager.c:423
+#: ../cli/src/network-manager.c:416
msgid "WiMAX enabled"
msgstr "WiMAX увімкнено"
-#: ../cli/src/network-manager.c:439
+#: ../cli/src/network-manager.c:432
#, c-format
msgid "Error: invalid 'wimax' parameter: '%s'."
msgstr "Помилка: некоректний параметр «wimax»: «%s»."
-#: ../cli/src/network-manager.c:452
+#: ../cli/src/network-manager.c:445
#, c-format
msgid "Error: 'nm' command '%s' is not valid."
msgstr "Помилка: команда «nm» «%s» є некоректною."
@@ -1285,115 +1694,139 @@ msgstr "Помилка: не вдалося створити об’єкт NMCli
msgid "Success"
msgstr "Виконано"
-#: ../cli/src/settings.c:423
+#: ../cli/src/settings.c:465
#, c-format
msgid "%d (hex-ascii-key)"
msgstr "%d (16-ковий ASCII-ключ)"
-#: ../cli/src/settings.c:425
+#: ../cli/src/settings.c:467
#, c-format
msgid "%d (104/128-bit passphrase)"
msgstr "%d (104/128-бітовий пароль)"
-#: ../cli/src/settings.c:428
+#: ../cli/src/settings.c:470
#, c-format
msgid "%d (unknown)"
msgstr "%d (невідомо)"
-#: ../cli/src/settings.c:454
+#: ../cli/src/settings.c:496
msgid "0 (unknown)"
msgstr "0 (невідомо)"
-#: ../cli/src/settings.c:460
+#: ../cli/src/settings.c:502
msgid "any, "
msgstr "будь-який, "
-#: ../cli/src/settings.c:462
+#: ../cli/src/settings.c:504
msgid "900 MHz, "
msgstr "900 МГц, "
-#: ../cli/src/settings.c:464
+#: ../cli/src/settings.c:506
msgid "1800 MHz, "
msgstr "1800 МГц, "
-#: ../cli/src/settings.c:466
+#: ../cli/src/settings.c:508
msgid "1900 MHz, "
msgstr "1900 МГц, "
-#: ../cli/src/settings.c:468
+#: ../cli/src/settings.c:510
msgid "850 MHz, "
msgstr "800 МГц, "
-#: ../cli/src/settings.c:470
+#: ../cli/src/settings.c:512
msgid "WCDMA 3GPP UMTS 2100 MHz, "
msgstr "WCDMA 3GPP UMTS 2100 МГц, "
-#: ../cli/src/settings.c:472
+#: ../cli/src/settings.c:514
msgid "WCDMA 3GPP UMTS 1800 MHz, "
msgstr "WCDMA 3GPP UMTS 1800 МГц, "
-#: ../cli/src/settings.c:474
+#: ../cli/src/settings.c:516
msgid "WCDMA 3GPP UMTS 1700/2100 MHz, "
msgstr "WCDMA 3GPP UMTS 1700/2100 МГц, "
-#: ../cli/src/settings.c:476
+#: ../cli/src/settings.c:518
msgid "WCDMA 3GPP UMTS 800 MHz, "
msgstr "WCDMA 3GPP UMTS 800 МГц, "
-#: ../cli/src/settings.c:478
+#: ../cli/src/settings.c:520
msgid "WCDMA 3GPP UMTS 850 MHz, "
msgstr "WCDMA 3GPP UMTS 850 МГц, "
-#: ../cli/src/settings.c:480
+#: ../cli/src/settings.c:522
msgid "WCDMA 3GPP UMTS 900 MHz, "
msgstr "WCDMA 3GPP UMTS 900 МГц, "
-#: ../cli/src/settings.c:482
+#: ../cli/src/settings.c:524
msgid "WCDMA 3GPP UMTS 1700 MHz, "
msgstr "WCDMA 3GPP UMTS 1700 МГц, "
-#: ../cli/src/settings.c:566 ../cli/src/settings.c:732
+#: ../cli/src/settings.c:526
+#| msgid "WCDMA 3GPP UMTS 900 MHz, "
+msgid "WCDMA 3GPP UMTS 1900 MHz, "
+msgstr "WCDMA 3GPP UMTS 1900 МГц, "
+
+#: ../cli/src/settings.c:528
+#| msgid "WCDMA 3GPP UMTS 2100 MHz, "
+msgid "WCDMA 3GPP UMTS 2600 MHz, "
+msgstr "WCDMA 3GPP UMTS 2600 МГц, "
+
+#: ../cli/src/settings.c:650 ../cli/src/settings.c:846
+#: ../cli/src/settings.c:1550
msgid "auto"
msgstr "авто"
-#: ../cli/src/settings.c:727 ../cli/src/settings.c:730
-#: ../cli/src/settings.c:731 ../cli/src/utils.c:176
+#: ../cli/src/settings.c:840 ../cli/src/settings.c:843
+#: ../cli/src/settings.c:844 ../cli/src/utils.c:247
msgid "not set"
msgstr "не встановлено"
-#: ../cli/src/utils.c:128
+#: ../cli/src/utils.c:103
+#, c-format
+#| msgid "%s: error converting IP4 address 0x%X"
+msgid "Error converting IP4 address '0x%X' to text form"
+msgstr ""
+"Помилка під час спроби перетворення адреси IP4 «0x%X» у текстовий формат"
+
+#: ../cli/src/utils.c:131
+#, c-format
+#| msgid "%s: error converting IP4 address 0x%X"
+msgid "Error converting IP6 address '%s' to text form"
+msgstr "Помилка під час спроби перетворення адреси IP6 «%s» у текстовий формат"
+
+#: ../cli/src/utils.c:200
#, c-format
msgid "field '%s' has to be alone"
msgstr "поле «%s» має бути єдиним"
-#: ../cli/src/utils.c:131
+#: ../cli/src/utils.c:203
#, c-format
msgid "invalid field '%s'"
msgstr "некоректне поле «%s»"
-#: ../cli/src/utils.c:150
+#: ../cli/src/utils.c:222
#, c-format
msgid "Option '--terse' requires specifying '--fields'"
msgstr "Використання параметра «--terse» потребує визначення «--fields»"
-#: ../cli/src/utils.c:154
+#: ../cli/src/utils.c:226
#, c-format
msgid "Option '--terse' requires specific '--fields' option values , not '%s'"
msgstr ""
"Параметр «--terse» потребує певних значень параметра «--fields», а не «%s»"
-#: ../cli/src/utils.c:333
+#: ../cli/src/utils.c:436
#, c-format
msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus"
msgstr ""
"Помилка: не вдалося створити проксі-об’єкт D-Bus для org.freedesktop.DBus"
-#: ../cli/src/utils.c:341
+#: ../cli/src/utils.c:444
#, c-format
msgid "Error: NameHasOwner request failed: %s"
msgstr "Помилка: невдала спроба запиту NameHasOwner: %s"
-#: ../cli/src/utils.c:386
+#: ../cli/src/utils.c:489
#, c-format
msgid ""
"Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --"
@@ -1402,15 +1835,16 @@ msgstr ""
"Увага: версії nmcli (%s) і NetworkManager (%s) не збігаються. Скористайтеся "
"параметром --nocheck для вимикання цього попередження.\n"
-#: ../cli/src/utils.c:395
+#: ../cli/src/utils.c:498
#, c-format
msgid ""
"Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force "
"execution using --nocheck, but the results are unpredictable."
msgstr ""
-"Помилка: версії nmcli (%s) і NetworkManager (%s) не збігаються. Для запуску у "
-"примусовому режимі скористайтеся параметром --nocheck, але результати можуть "
-"бути непередбачуваними.\n."
+"Помилка: версії nmcli (%s) і NetworkManager (%s) не збігаються. Для запуску "
+"у примусовому режимі скористайтеся параметром --nocheck, але результати "
+"можуть бути непередбачуваними.\n"
+"."
#: ../libnm-util/crypto.c:133
#, c-format
@@ -1757,112 +2191,115 @@ msgstr "Не вдалося перевірити файл PKCS#12: %d"
msgid "Could not generate random data."
msgstr "Не вдалося створити псевдовипадкові дані."
-#: ../libnm-util/nm-utils.c:2000
+#: ../libnm-util/nm-utils.c:2034
#, c-format
msgid "Not enough memory to make encryption key."
msgstr "Недостатньо пам’яті для створення ключа шифрування."
-#: ../libnm-util/nm-utils.c:2110
+#: ../libnm-util/nm-utils.c:2144
msgid "Could not allocate memory for PEM file creation."
msgstr "Не вдалося отримати область пам’яті для створення файла PEM."
-#: ../libnm-util/nm-utils.c:2122
+#: ../libnm-util/nm-utils.c:2156
#, c-format
msgid "Could not allocate memory for writing IV to PEM file."
msgstr "Не вдалося отримати область пам’яті для запису ВІ до файла PEM."
-#: ../libnm-util/nm-utils.c:2134
+#: ../libnm-util/nm-utils.c:2168
#, c-format
msgid "Could not allocate memory for writing encrypted key to PEM file."
msgstr ""
"Не вдалося отримати область пам’яті для запису зашифрованого ключа до файла "
"PEM."
-#: ../libnm-util/nm-utils.c:2153
+#: ../libnm-util/nm-utils.c:2187
#, c-format
msgid "Could not allocate memory for PEM file data."
msgstr "Не вдалося отримати область пам’яті для даних файла PEM."
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1
-msgid "Allow control of network connections"
-msgstr "Дозволити керування з’єднаннями мережею"
+msgid "Enable or disable system networking"
+msgstr "Увімкнути або вимкнути системну роботу у мережі"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2
-msgid "Connection sharing via a protected WiFi network"
-msgstr "Спільне використання з’єднання на основі захищеної мережі WiFi"
+msgid "System policy prevents enabling or disabling system networking"
+msgstr ""
+"Правила системи забороняють вмикання або вимикання з’єднань з мережею на "
+"системному рівні"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3
-msgid "Connection sharing via an open WiFi network"
-msgstr "Спільне використання з’єднання на основі відкритої мережі WiFi"
+msgid ""
+"Put NetworkManager to sleep or wake it up (should only be used by system "
+"power management)"
+msgstr ""
+"Призупинити або поновити роботу NetworkManager (має використовуватися лише "
+"інструментами керування живленням системи)"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4
-msgid "Enable or disable WiFi devices"
-msgstr "Увімкнути або вимкнути пристрої WiFi"
+msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgstr ""
+"Правила системи забороняють присипляння та поновлення роботи NetworkManager"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5
-msgid "Enable or disable WiMAX mobile broadband devices"
-msgstr "Увімкнути або вимкнути пристрої широкосмугових мобільних мереж WiMAX"
+msgid "Enable or disable WiFi devices"
+msgstr "Увімкнути або вимкнути пристрої WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6
-msgid "Enable or disable mobile broadband devices"
-msgstr "Увімкнути або вимкнути пристрої широкосмугових мобільних мереж"
+msgid "System policy prevents enabling or disabling WiFi devices"
+msgstr "Правила системи забороняють вмикання або вимикання пристроїв WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7
-msgid "Enable or disable system networking"
-msgstr "Увімкнути або вимкнути системну роботу у мережі"
+msgid "Enable or disable mobile broadband devices"
+msgstr "Увімкнути або вимкнути пристрої широкосмугових мобільних мереж"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8
-msgid "Modify network connections for all users"
-msgstr "Внести зміни до мережевих з’єднань всіх користувачів"
+msgid "System policy prevents enabling or disabling mobile broadband devices"
+msgstr ""
+"Правила системи забороняють вмикання або вимикання пристроїв широкосмугових "
+"мобільних мереж"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9
-msgid "Modify persistent system hostname"
-msgstr "Змінити постійну назву вузла у мережі"
+msgid "Enable or disable WiMAX mobile broadband devices"
+msgstr "Увімкнути або вимкнути пристрої широкосмугових мобільних мереж WiMAX"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10
-msgid "Modify personal network connections"
-msgstr "Змінити параметри особистих з’єднань з мережею"
-
-#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
msgid ""
-"Put NetworkManager to sleep or wake it up (should only be used by system "
-"power management)"
+"System policy prevents enabling or disabling WiMAX mobile broadband devices"
msgstr ""
-"Призупинити або поновити роботу NetworkManager (має використовуватися лише "
-"інструментами керування живленням системи)"
+"Правила системи забороняють вмикання або вимикання пристроїв широкосмугових "
+"мобільних мереж WiMAX"
+
+#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11
+msgid "Allow control of network connections"
+msgstr "Дозволити керування з’єднаннями мережею"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12
msgid "System policy prevents control of network connections"
msgstr "Правила системи забороняють керування з’єднаннями"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13
-msgid "System policy prevents enabling or disabling WiFi devices"
-msgstr "Правила системи забороняють вмикання або вимикання пристроїв WiFi"
+msgid "Connection sharing via a protected WiFi network"
+msgstr "Спільне використання з’єднання на основі захищеної мережі WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14
-msgid ""
-"System policy prevents enabling or disabling WiMAX mobile broadband devices"
+msgid "System policy prevents sharing connections via a protected WiFi network"
msgstr ""
-"Правила системи забороняють вмикання або вимикання пристроїв широкосмугових "
-"мобільних мереж WiMAX"
+"Правила системи забороняють спільне використання з’єднань за допомогою "
+"захищеної мережі WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15
-msgid "System policy prevents enabling or disabling mobile broadband devices"
-msgstr ""
-"Правила системи забороняють вмикання або вимикання пристроїв широкосмугових "
-"мобільних мереж"
+msgid "Connection sharing via an open WiFi network"
+msgstr "Спільне використання з’єднання на основі відкритої мережі WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16
-msgid "System policy prevents enabling or disabling system networking"
+msgid "System policy prevents sharing connections via an open WiFi network"
msgstr ""
-"Правила системи забороняють вмикання або вимикання з’єднань з мережею на "
-"системному рівні"
+"Правила системи забороняють спільне використання з’єднань за допомогою "
+"відкритої мережі WiFi"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17
-msgid "System policy prevents modification of network settings for all users"
-msgstr ""
-"Правила системи забороняють внесення змін до параметрів мережі для всіх "
-"користувачів"
+msgid "Modify personal network connections"
+msgstr "Змінити параметри особистих з’єднань з мережею"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18
msgid "System policy prevents modification of personal network settings"
@@ -1870,39 +2307,177 @@ msgstr ""
"Правила системи забороняють внесення змін до особистих параметрів мережі"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19
-msgid "System policy prevents modification of the persistent system hostname"
-msgstr ""
-"Правила системи забороняють внесення змін до постійної назви вузла у мережі"
+msgid "Modify network connections for all users"
+msgstr "Внести зміни до мережевих з’єднань всіх користувачів"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20
-msgid "System policy prevents putting NetworkManager to sleep or waking it up"
+msgid "System policy prevents modification of network settings for all users"
msgstr ""
-"Правила системи забороняють присипляння та поновлення роботи NetworkManager"
+"Правила системи забороняють внесення змін до параметрів мережі для всіх "
+"користувачів"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21
-msgid "System policy prevents sharing connections via a protected WiFi network"
-msgstr ""
-"Правила системи забороняють спільне використання з’єднань за допомогою "
-"захищеної мережі WiFi"
+msgid "Modify persistent system hostname"
+msgstr "Змінити постійну назву вузла у мережі"
#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22
-msgid "System policy prevents sharing connections via an open WiFi network"
+msgid "System policy prevents modification of the persistent system hostname"
msgstr ""
-"Правила системи забороняють спільне використання з’єднань за допомогою "
-"відкритої мережі WiFi"
+"Правила системи забороняють внесення змін до постійної назви вузла у мережі"
+
+#: ../src/main.c:143
+#, c-format
+#| msgid "Failed to initialize the crypto engine: %d."
+msgid "Failed to initialize SIGTERM pipe: %d"
+msgstr "Не вдалося ініціалізувати канал SIGTERM: %d"
+
+#: ../src/main.c:174
+#, c-format
+msgid "Opening %s failed: %s\n"
+msgstr "Помилка під час спроби відкрити %s: %s\n"
+
+#: ../src/main.c:180
+#, c-format
+msgid "Writing to %s failed: %s\n"
+msgstr "Помилка під час спроби запису даних до %s: %s\n"
+
+#: ../src/main.c:185
+#, c-format
+msgid "Closing %s failed: %s\n"
+msgstr "Не вдалося завершити роботу %s: %s\n"
+
+#: ../src/main.c:228
+#, c-format
+#| msgid "Error: NetworkManager is not running."
+msgid "NetworkManager is already running (pid %ld)\n"
+msgstr "NetworkManager вже запущено (pid %ld)\n"
+
+#: ../src/main.c:365
+#| msgid "NetworkManager status"
+msgid "Print NetworkManager version and exit"
+msgstr "Вивести дані щодо версії NetworkManager і завершити роботу"
+
+#: ../src/main.c:366
+msgid "Don't become a daemon"
+msgstr "Не переходити у стан фонової служби"
+
+#: ../src/main.c:367
+msgid "Make all warnings fatal"
+msgstr "Вважати всі попередження помилками"
+
+#: ../src/main.c:368
+msgid "Specify the location of a PID file"
+msgstr "Вказати розташування файла ідентифікатора процесу (PID)"
+
+#: ../src/main.c:368
+msgid "filename"
+msgstr "назва файла"
-#: ../src/main.c:530
+#: ../src/main.c:369
+msgid "State file location"
+msgstr "Розташування файла стану"
+
+#: ../src/main.c:369
+msgid "/path/to/state.file"
+msgstr "/шлях/до/файла.стану"
+
+#: ../src/main.c:370
+msgid "Config file location"
+msgstr "Розташування файла налаштувань"
+
+#: ../src/main.c:370
+msgid "/path/to/config.file"
+msgstr "/шлях/до/файла.налаштувань"
+
+#: ../src/main.c:371
+msgid "List of plugins separated by ','"
+msgstr "Список додатків, відокремлених комами («,»)"
+
+#: ../src/main.c:371
+msgid "plugin1,plugin2"
+msgstr "додаток1,додаток2"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:373
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgstr "Рівень докладності журналу, одне зі значень: ERR, WARN, INFO, DEBUG"
+
+#. Translators: Do not translate the values in the square brackets
+#: ../src/main.c:376
+msgid ""
+"Log domains separated by ',': any combination of\n"
+" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL]"
+msgstr ""
+"Області ведення журналу, відокремлені комами, довільна комбінація таких "
+"значень:\n"
+" NONE,HW,RFKILL,ETHER,WIFI,BT,MB,"
+"DHCP4,DHCP6,PPP,\n"
+" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,"
+"SHARING,SUPPLICANT,\n"
+" AGENTS,SETTINGS,SUSPEND,CORE,"
+"DEVICE,OLPC,WIMAX,\n"
+" INFINIBAND,FIREWALL"
+
+#: ../src/main.c:386
+#, c-format
+msgid "GModules are not supported on your platform!\n"
+msgstr "Підтримки GModules на цій платформі не передбачено!\n"
+
+#: ../src/main.c:405
+msgid ""
+"NetworkManager monitors all network connections and automatically\n"
+"chooses the best connection to use. It also allows the user to\n"
+"specify wireless access points which wireless cards in the computer\n"
+"should associate with."
+msgstr ""
+"NetworkManager виконує стеження за всіма з’єднаннями і автоматично\n"
+"вибирає з них найкраще для використання. Крім того, програма\n"
+"надає користувачеві змогу вказати точки бездротового доступу,\n"
+"з якими слід пов’язувати картки бездротового доступу на вашому\n"
+"комп’ютері."
+
+#: ../src/main.c:411
#, c-format
msgid "Invalid option. Please use --help to see a list of valid options.\n"
msgstr ""
"Некоректний параметр. Щоб ознайомитися зі списком параметрів, скористайтеся "
"параметром --help.\n"
-#: ../src/main.c:611
+#: ../src/main.c:421
+#, c-format
+msgid "You must be root to run NetworkManager!\n"
+msgstr ""
+"Запуск NetworkManager слід здійснювати з облікового запису адміністратора "
+"(root)!\n"
+
+#: ../src/main.c:441
+#, c-format
+#| msgid "Failed to set IV for encryption: %s / %s."
+msgid "Failed to read configuration: (%d) %s\n"
+msgstr "Не вдалося прочитати налаштування: (%d) %s\n"
+
+#: ../src/main.c:452
#, c-format
msgid "%s. Please use --help to see a list of valid options.\n"
msgstr ""
-"%s. Щоб ознайомитися зі списком параметрів, скористайтеся параметром --help.\n"
+"%s. Щоб ознайомитися зі списком параметрів, скористайтеся параметром --"
+"help.\n"
+
+#: ../src/main.c:459
+#, c-format
+msgid "State file %s parsing failed: (%d) %s\n"
+msgstr "Помилка під час обробки файла стану %s: (%d) %s\n"
+
+#: ../src/main.c:476
+#, c-format
+msgid "Could not daemonize: %s [error %u]\n"
+msgstr "Не вдалося створити фонову службу: %s [помилка %u]\n"
#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62
msgid "# Created by NetworkManager\n"
@@ -1944,106 +2519,127 @@ msgstr ""
msgid "The nameservers listed below may not be recognized."
msgstr "Вказані у наведеному нижче списку сервери назв може бути пропущено."
-#: ../src/logging/nm-logging.c:149
+#: ../src/logging/nm-logging.c:153
#, c-format
msgid "Unknown log level '%s'"
msgstr "Невідомий рівень журналювання «%s»"
-#: ../src/logging/nm-logging.c:174
+#: ../src/logging/nm-logging.c:178
#, c-format
msgid "Unknown log domain '%s'"
msgstr "Невідомий домен журналювання «%s»"
-#: ../src/modem-manager/nm-modem-cdma.c:296 ../src/nm-device-bt.c:355
+#: ../src/modem-manager/nm-modem-cdma.c:308 ../src/nm-device-bt.c:354
#, c-format
msgid "CDMA connection %d"
msgstr "З’єднання CDMA %d"
-#: ../src/modem-manager/nm-modem-gsm.c:499 ../src/nm-device-bt.c:351
+#: ../src/modem-manager/nm-modem-gsm.c:542 ../src/nm-device-bt.c:350
#, c-format
msgid "GSM connection %d"
msgstr "З’єднання GSM %d"
-#: ../src/nm-device-bt.c:326
+#: ../src/nm-device-bt.c:325
#, c-format
msgid "PAN connection %d"
msgstr "З’єднання PAN %d"
-#: ../src/nm-device-bt.c:359
+#: ../src/nm-device-bt.c:358
#, c-format
msgid "DUN connection %d"
msgstr "З’єднання DUN %d"
-#: ../src/nm-device-ethernet.c:1723
+#: ../src/nm-device-ethernet.c:1382
#, c-format
msgid "PPPoE connection %d"
msgstr "З’єднання PPPoE %d"
-#: ../src/nm-device-ethernet.c:1723 ../src/settings/nm-settings-utils.c:50
+#: ../src/nm-device-ethernet.c:1382 ../src/settings/nm-settings-utils.c:50
#, c-format
msgid "Wired connection %d"
msgstr "Дротове з’єднання %d"
-#: ../src/nm-device-olpc-mesh.c:393
+#: ../src/nm-device-infiniband.c:332
+#, c-format
+#| msgid "Wired connection %d"
+msgid "InfiniBand connection %d"
+msgstr "З’єднання InfiniBand %d"
+
+#: ../src/nm-device-olpc-mesh.c:323
#, c-format
msgid "Mesh %d"
msgstr "Mesh %d"
-#: ../src/nm-manager.c:657
+#: ../src/nm-manager.c:680
#, c-format
msgid "VPN connection %d"
msgstr "З’єднання VPN %d"
-#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231
-#: ../src/nm-netlink-monitor.c:653
+#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272
+#: ../src/nm-netlink-monitor.c:695
#, c-format
msgid "error processing netlink message: %s"
msgstr "помилка під час обробки повідомлення netlink: %s"
-#: ../src/nm-netlink-monitor.c:214
+#: ../src/nm-netlink-monitor.c:251
msgid "error occurred while waiting for data on socket"
msgstr "під час очікування на дані з сокета сталася помилка"
-#: ../src/nm-netlink-monitor.c:254
+#: ../src/nm-netlink-monitor.c:296
#, c-format
msgid "unable to connect to netlink for monitoring link status: %s"
msgstr ""
"не вдалося встановити з’єднання з netlink для спостереження за станом "
"з’єднання: %s"
-#: ../src/nm-netlink-monitor.c:265
+#: ../src/nm-netlink-monitor.c:307
#, c-format
msgid "unable to enable netlink handle credential passing: %s"
msgstr ""
"не вдалося увімкнути інструмент netlink передавання реєстраційних даних: %s"
-#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353
+#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390
#, c-format
msgid "unable to allocate netlink handle for monitoring link status: %s"
msgstr ""
"не вдалося розмістити у пам’яті інструмент netlink для спостереження за "
"станом з’єднання: %s"
-#: ../src/nm-netlink-monitor.c:376
+#: ../src/nm-netlink-monitor.c:415
#, c-format
msgid "unable to allocate netlink link cache for monitoring link status: %s"
msgstr ""
"не вдалося розмістити у пам’яті кеш з’єднань netlink для спостереження за "
"станом з’єднань: %s"
-#: ../src/nm-netlink-monitor.c:502
+#: ../src/nm-netlink-monitor.c:542
#, c-format
msgid "unable to join netlink group: %s"
msgstr "не вдалося долучитися до групи netlink: %s"
-#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642
+#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684
#, c-format
msgid "error updating link cache: %s"
msgstr "помилка під час спроби оновлення кешу з’єднання: %s"
-#: ../src/settings/plugins/ifcfg-rh/reader.c:3575
+#: ../src/settings/plugins/ifcfg-rh/reader.c:91
#: ../src/settings/plugins/ifnet/connection_parser.c:51
msgid "System"
msgstr "Система"
+#: ../src/settings/plugins/ifcfg-rh/reader.c:3660
+#| msgid "on"
+msgid "Bond"
+msgstr "Прив’язка"
+
+#~ msgid "IP4-SETTINGS"
+#~ msgstr "ПАРАМЕТРИ IP4"
+
+#~ msgid "IP6-SETTINGS"
+#~ msgstr "ПАРАМЕТРИ IP6"
+
+#~ msgid "PREFIX"
+#~ msgstr "ПРЕФІКС"
+#~ msgid "unknown)"
+#~ msgstr "невідомо)"
diff --git a/policy/Makefile.in b/policy/Makefile.in
index cbbc7cfc5..20001d372 100644
--- a/policy/Makefile.in
+++ b/policy/Makefile.in
@@ -132,6 +132,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -186,11 +188,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -201,6 +207,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -240,6 +247,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/policy/org.freedesktop.NetworkManager.policy b/policy/org.freedesktop.NetworkManager.policy
index 361c435d6..84a661065 100644
--- a/policy/org.freedesktop.NetworkManager.policy
+++ b/policy/org.freedesktop.NetworkManager.policy
@@ -31,18 +31,20 @@
<description xml:lang="or">ତନ୍ତ୍ର ନେଟୱର୍କିଙ୍ଗକୁ ସକ୍ରିୟ କିମ୍ବା ନିଷ୍କ୍ରିୟ କରନ୍ତୁ</description>
<description xml:lang="pa">ਸਿਸਟਮ ਨੈੱਟਵਰਕਿੰਗ ਚਾਲੂ ਜਾਂ ਬੰਦ</description>
<description xml:lang="pl">Włączenie lub wyłączenie sieci systemowej</description>
+ <description xml:lang="pt_BR">Habilita ou desabilita o sistema de redes</description>
<description xml:lang="ru">Включить или выключить системные соединения</description>
<description xml:lang="sl">Omogoči ali onemogoči sistemske omrežne povezave</description>
<description xml:lang="sr">Омогући или онемогући умрежавање на систему</description>
<description xml:lang="sr@latin">Omogući ili onemogući umrežavanje na sistemu</description>
<description xml:lang="sv">Aktivera eller inaktivera systemnätverk</description>
<description xml:lang="te">సిస్టమ్ నెట్వర్కింగ్‌ను చేతనము లేదా అచేతనము చేయుము</description>
+ <description xml:lang="tr">Sistem ağını etkinleştir ya da etkisizleştir</description>
<description xml:lang="uk">Увімкнути або вимкнути системну роботу у мережі</description>
<description xml:lang="zh_CN">启用或禁用系统网络</description>
<message>System policy prevents enabling or disabling system networking</message>
<message xml:lang="bg">Политиката на системата не позволява включване и изключване на мрежата на системно ниво</message>
<message xml:lang="ca">La política del sistema impedeix habilitar o inhabilitar la xarxa del sistema</message>
- <message xml:lang="cs">Systémová politika zamezuje povolit nebo zakázat systémovou síť</message>
+ <message xml:lang="cs">Systémová zásada zamezuje povolit nebo zakázat systémovou síť</message>
<message xml:lang="da">Systempolitik forhindrer aktivering eller deaktivering af systemnetværk</message>
<message xml:lang="de">Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung von System-Netzwerken</message>
<message xml:lang="el">Η πολιτική συστήματος δεν επιτρέπει ενεργοποίηση ή απενεργοποίηση της δικτύωσης του συστήματος</message>
@@ -57,16 +59,19 @@
<message xml:lang="kn">ವ್ಯವಸ್ಥೆಯ ಜಾಲಬಂಧವನ್ನು ಶಕ್ತ ಅಥವ ಅಶಕ್ತಗೊಳಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ಪಾಲಿಸಿಯು ತಡೆಯುತ್ತಿದೆ</message>
<message xml:lang="ko">시스템 정책이 시스템 네트워크의 사용 여부 설정을 금지합니다</message>
<message xml:lang="lt">Sistemos politika neleidžia įjungti arba išjungti sistemos prieigos prie tinklo</message>
+ <message xml:lang="ml"> സിസ്റ്റം നെറ്റ്​വര്‍ക്കിങ് പ്രവര്‍ത്തനസജ്ജമാക്കുന്നതും പ്രവര്‍ത്തനരഹിതമാക്കുന്നതും സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार प्रणाली नेटवर्किंगसा सुरू किंवा बंद होण्यापासून रोखते</message>
<message xml:lang="or">ତନ୍ତ୍ର ନିତୀ ତନ୍ତ୍ର ନେଟୱର୍କିଙ୍ଗକୁ ସକ୍ରିୟ କିମ୍ବା ନିଷ୍କ୍ରିୟ ହେବାରୁ ବାରଣ କରିଥାଏ</message>
<message xml:lang="pa">ਸਿਸਟਮ ਪਾਲਸੀ ਸਿਸਟਮ ਨੈੱਟਵਰਕਿੰਗ ਚਾਲੂ ਜਾਂ ਬੰਦ ਕਰਨ ਤੋਂ ਰੋਕਦੀ ਹੈ</message>
<message xml:lang="pl">Polityka systemu powstrzymuje włączanie lub wyłączanie sieci systemowej</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem habilitação ou desabilitação do sistema de redes</message>
<message xml:lang="ru">Системная политика запрещает включение и выключение системных подключений</message>
<message xml:lang="sl">Sistemska določila preprečujejo omogočanje ali onemogočanje omrežnih povezav.</message>
<message xml:lang="sr">Овлашћења система онемогућавају управљање мрежом на систему</message>
<message xml:lang="sr@latin">Ovlašćenja sistema onemogućavaju upravljanje mrežom na sistemu</message>
<message xml:lang="sv">Systemets policy förhindrar aktivering eller inaktivering av systemnätverk</message>
<message xml:lang="te">సిస్టమ్ నెట్వర్కింగ్‌ను చేతనము చేయుటకు లేదా అచేతనము చేయుటకు సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, sistem ağını etkinleştirmeyi ya da etkisizleştirmeyi engelliyor</message>
<message xml:lang="uk">Правила системи забороняють вмикання або вимикання з’єднань з мережею на системному рівні</message>
<message xml:lang="zh_CN">系统策略阻止启用或禁用系统网络</message>
<defaults>
@@ -98,18 +103,20 @@
<description xml:lang="or">NetworkManager କୁ ସୁପ୍ତ କିମ୍ବା ଜାଗ୍ରତ ରଖନ୍ତୁ (କେବଳ ତନ୍ତ୍ର ଶକ୍ତି ପରିଚାଳନା ଦ୍ୱାରା ବ୍ୟବହାର ହେବା ଉଚିତ)</description>
<description xml:lang="pa">ਨੈੱਟਵਰਕਮੈਨਜੇਰ ਨੂੰ ਸਲੀਪ ਕਰੋ ਜਾਂ ਵੇਕ ਅੱਪ ਕਰੋ (ਕੇਵਲ ਸਿਸਟਮ ਪਾਵਰ ਮੈਨਜੇਮੈਂਟ ਰਾਹੀਂ ਵਰਤਿਆ ਜਾਣਾ ਚਾਹੀਦਾ ਹੈ)</description>
<description xml:lang="pl">Umieszczenie usługi NetworkManager w stanie uśpienia lub przebudzenie go (powinno być używane tylko przez systemowe zarządzanie zasilaniem)</description>
+ <description xml:lang="pt_BR">Põe o NetworkManager para dormir ou acordar (deve ser usado somente pelo sistema de gerenciamento de energia</description>
<description xml:lang="ru">Перевести NetworkManager в режим сна или пробудить его (должно использоваться только системой управления питанием)</description>
<description xml:lang="sl">Postavi program NetworkManager v mirovanje ali iz njega (možnost je namenjena upravljanju napajanja)</description>
<description xml:lang="sr">Омогућава успављивање Управника мреже (користи се са Управником потрошње на систему)</description>
<description xml:lang="sr@latin">Omogućava uspavljivanje Upravnika mreže (koristi se sa Upravnikom potrošnje na sistemu)</description>
<description xml:lang="sv">Försätt Nätverkshanterare i vänteläge eller återställ efter det (bör endast användas av systemets strömhantering)</description>
<description xml:lang="te">నెట్వర్కుమేనేజర్‌ను స్లీప్‌నకు లేదా దానిని మెల్కొలుపుటకు వుంచండి (సిస్టమ్ పవర్ నిర్వహణ చేత మాత్రమే వుపయోగించబడాలి)</description>
+ <description xml:lang="tr">NetworkManager'i uykuda konumuna getir veya uyandır (yalnızca sistem güç yönetimi tarafından kullanılmalıdır)</description>
<description xml:lang="uk">Призупинити або поновити роботу NetworkManager (має використовуватися лише інструментами керування живленням системи)</description>
<description xml:lang="zh_CN">挂起或唤醒 NetworkManager (应仅用于系统电源管理)</description>
<message>System policy prevents putting NetworkManager to sleep or waking it up</message>
<message xml:lang="bg">Политиката на системата не позволява приспиване и събуждане на NetworkManager</message>
<message xml:lang="ca">La política del sistema impedeix posar el NetworkManager a dormir o despertar-lo</message>
- <message xml:lang="cs">Systémová politika zamezuje NetworkManager uspat nebo probudit</message>
+ <message xml:lang="cs">Systémová zásada zamezuje NetworkManager uspat nebo probudit</message>
<message xml:lang="da">Systempolitik forhindrer at sætte NetworkManager i hvile eller at vække den</message>
<message xml:lang="de">Die Systemrichtlinien verhindern das in den Schlaf versetzen oder Aufwecken von NetworkManager</message>
<message xml:lang="el">Η πολιτική του συστήματος δεν επιτρέπει να τίθεται η διαχείριση δικτύου σε αδράνεια ή να ενεργοποιείται.</message>
@@ -124,16 +131,19 @@
<message xml:lang="kn">NetworkManager ಅನ್ನು ನಿದ್ರಾಸ್ಥಿತಿಗೆ ಅಥವ ಎಚ್ಚರಸ್ಥಿತಿಗೆ ಕಳುಹಿಸುವುದನ್ನು ವ್ಯವಸ್ಥೆಯ ನಿಯಮವು ತಡೆಯುತ್ತಿದೆ</message>
<message xml:lang="ko">시스템 정책이 네트워크 관리 프로그램의 일시 중지나 다시 시작을 금지합니다</message>
<message xml:lang="lt">Sistemos politika neleidžia užmigdyti arba pažadinti NetworkManager</message>
+ <message xml:lang="ml">നെറ്റ്​വര്‍ക്ക് മാനേജറിനെ ഉറക്കുന്നതും ഉണര്‍ത്തുന്നതും സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार NetworkManager ला स्लीप किंवा वेकअप मध्ये जाण्यापासून रोखते</message>
<message xml:lang="or">ତନ୍ତ୍ର ନିତୀ NetworkManager କୁ ସୁପ୍ତ କିମ୍ବା ଜାଗ୍ରତ ରହିବାରୁ ବାରଣ କରିଥାଏ</message>
<message xml:lang="pa">ਸਿਸਟਮ ਪਾਲਸੀ ਨੈੱਟਵਰਕਮੈਨੇਜਰ ਨੂੰ ਸਲੀਪ ਜਾਂ ਵੇਕਅੱਪ ਕਰਨ ਤੋਂ ਰੋਕਦੀ ਹੈ</message>
<message xml:lang="pl">Polityka systemu powstrzymuje umieszczenie usługi NetworkManager w stanie uśpienia lub przebudzenie go</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem que se coloque o NetworkManager para dormir ou acordar</message>
<message xml:lang="ru">Системная политика не разрешает переводить NetworkManager в режим сна или пробуждать его</message>
<message xml:lang="sl">Sistemska določila preprečujejo postavitev programa NetworkManager v mirovanje ali iz njega.</message>
<message xml:lang="sr">Овлашћења система онемогућавају успављивање Управника мрежом</message>
<message xml:lang="sr@latin">Ovlašćenja sistema onemogućavaju uspavljivanje Upravnika mrežom</message>
<message xml:lang="sv">Systemets policy förhindrar att Nätverkshanterare försätts i vänteläge eller återställs efter det</message>
<message xml:lang="te">నెట్వర్కుమేనేజర్‌ను స్లీప్‌నకు లేదా దానిని మెల్కొలుపుటకు వుంచుటను సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, NetworkManager'ı uykuda konumuna getirmeyi veya uyandırmayı engelliyor</message>
<message xml:lang="uk">Правила системи забороняють присипляння та поновлення роботи NetworkManager</message>
<message xml:lang="zh_CN">系统策略阻止挂起或唤醒 NetworkManager</message>
<defaults>
@@ -162,22 +172,25 @@
<description xml:lang="kn">WiFi ಸಾಧನಗಳನ್ನು ಶಕ್ತಗೊಳಿಸಿ ಅಥವ ಅಶಕ್ತಗೊಳಿಸಿ</description>
<description xml:lang="ko">WiFi 장치 사용 여부</description>
<description xml:lang="lt">Įjungti arba išjungti WiFi įrenginius</description>
+ <description xml:lang="ml"> WiFi ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുക</description>
<description xml:lang="mr">WiFi साधने सुरू किंवा बंद करा</description>
<description xml:lang="or">WiFi ଉପକରଣଗୁଡ଼ିକୁ ସକ୍ରିୟ କିମ୍ବା ନିଷ୍କ୍ରିୟ କରନ୍ତୁ</description>
<description xml:lang="pa">ਵਾਈ-ਫਾਈ ਜੰਤਰ ਚਾਲੂ ਜਾਂ ਬੰਦ ਕਰੋ</description>
<description xml:lang="pl">Włączenie lub wyłączenie urządzeń WiFi</description>
+ <description xml:lang="pt_BR">Habilita ou desabilita dispositivos WiFi</description>
<description xml:lang="ru">Включить или выключить устройства WiFi</description>
<description xml:lang="sl">Omogoči ali onemogoči naprave WiFi</description>
<description xml:lang="sr">Омогући или онемогући бежичне уређаје</description>
<description xml:lang="sr@latin">Omogući ili onemogući bežične uređaje</description>
<description xml:lang="sv">Aktivera eller inaktivera WiFi-enheter</description>
<description xml:lang="te">WiFi పరికరములను చేతనము లేదా అచేతనము చేయుము</description>
+ <description xml:lang="tr">WiFi aygıtlarını etkinleştir ya da etkisizleştir</description>
<description xml:lang="uk">Увімкнути або вимкнути пристрої WiFi</description>
<description xml:lang="zh_CN">启用或禁用 WiFi 设备</description>
<message>System policy prevents enabling or disabling WiFi devices</message>
<message xml:lang="bg">Политиката на системата не позволява включване и изключване на устройства за безжични мрежи</message>
<message xml:lang="ca">La política del sistema impedeix habilitar o inhabilitar els dispositius Wi-Fi</message>
- <message xml:lang="cs">Systémová politika zamezuje povolit nebo zakázat zařízení WiFi</message>
+ <message xml:lang="cs">Systémová zásada zamezuje povolit nebo zakázat zařízení WiFi</message>
<message xml:lang="da">Systempolitik forhindrer aktivering eller deaktivering af WiFi-enheder</message>
<message xml:lang="de">Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung von WLAN-Geräten</message>
<message xml:lang="el">Η πολιτική συστήματος δεν επιτρέπει ενεργοποίηση ή απενεργοποίηση συσκευών ανοιχτού ασύρματου δικτύου (WiFi)</message>
@@ -192,16 +205,19 @@
<message xml:lang="kn">WiFi ಸಾಧನವನ್ನು ಶಕ್ತ ಅಥವ ಅಶಕ್ತಗೊಳಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತಿವೆ</message>
<message xml:lang="ko">시스템 정책이 WiFi 장치 사용 여부 설정을 금지합니다</message>
<message xml:lang="lt">Sistemos politika neleidžia įjungti arba išjungti WiFi įrenginių</message>
+ <message xml:lang="ml">WiFi ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുന്നത് സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार WiFi साधनांना सुरू किंवा बंद होण्यापासून रोखते</message>
<message xml:lang="or">ତନ୍ତ୍ର ନିତୀ WiFi ଉପକରଣଗୁଡ଼ିକୁ ସକ୍ରିୟ କିମ୍ବା ନିଷ୍କ୍ରିୟ ହେବାରୁ ବାରଣ କରିଥାଏ</message>
<message xml:lang="pa">ਸਿਸਟਮ ਪਾਲਸੀ ਵਾਈ-ਫਾਈ ਜੰਤਰ ਚਾਲੂ ਜਾਂ ਬੰਦ ਕਰਨੋਂ ਰੋਕਦੀ ਹੈ</message>
<message xml:lang="pl">Polityka systemu powstrzymuje włączanie lub wyłączanie urządzeń WiFi</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem a habilitação ou desabilitação de dispositivos WiFi</message>
<message xml:lang="ru">Системная политика запрещает включение и выключение WiFi устройств</message>
<message xml:lang="sl">Sistemska določila preprečujejo omogočanja ali onemogočanje WiFi naprav</message>
<message xml:lang="sr">Овлашћења система онемогућавају управљање бежичним уређајима</message>
<message xml:lang="sr@latin">Ovlašćenja sistema onemogućavaju upravljanje bežičnim uređajima</message>
<message xml:lang="sv">Systemets policy förhindrar aktivering eller inaktivering av WiFi-enheter</message>
<message xml:lang="te">WiFi పరికరములను చేతనము చేయుటకు లేదా అచేతనము చేయుటకు సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, WiFi aygıtlarını etkinleştirmeyi ya da etkisizleştirmeyi engelliyor</message>
<message xml:lang="uk">Правила системи забороняють вмикання або вимикання пристроїв WiFi</message>
<message xml:lang="zh_CN">系统策略阻止启用或禁用 WiFi 设备</message>
<defaults>
@@ -230,22 +246,25 @@
<description xml:lang="kn">ಮೊಬೈಲ್ ಬ್ರಾಡ್‌ಬ್ಯಾಂಡ್ ಸಾಧನಗಳನ್ನು ಶಕ್ತಗೊಳಿಸಿ ಅಥವ ಅಶಕ್ತಗೊಳಿಸಿ</description>
<description xml:lang="ko">모바일 광대역 장치 사용 여부</description>
<description xml:lang="lt">Įjungti arba išjungti mobiliojo plačiajuosčio ryšio įrenginius</description>
+ <description xml:lang="ml">മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുക</description>
<description xml:lang="mr">मोबाईल ब्रॉडबँड साधने सुरू किंवा बंद करा</description>
<description xml:lang="or">ମୋବାଇଲ ବ୍ରୋଡବ୍ୟାଣ୍ଡ ଉପକରଣଗୁଡ଼ିକୁ ସକ୍ରିୟ କିମ୍ବା ନିଷ୍କ୍ରିୟ କରନ୍ତୁ</description>
<description xml:lang="pa">ਮੋਬਾਇਲ ਬਰਾਡਬੈਂਡ ਜੰਤਰ ਚਾਲੂ ਜਾਂ ਬੰਦ</description>
<description xml:lang="pl">Włączenie lub wyłączenie urządzeń komórkowych</description>
+ <description xml:lang="pt_BR">Habilita ou desabilita dispositivos móveis de banda larga</description>
<description xml:lang="ru">Включить или выключить устройства мобильных сетей</description>
<description xml:lang="sl">Omogoči ali onemogoči naprave mobilnih širokopasovnih storitev</description>
<description xml:lang="sr">Омогући или онемогући мобилне широкопојасне уређаје</description>
<description xml:lang="sr@latin">Omogući ili onemogući mobilne širokopojasne uređaje</description>
<description xml:lang="sv">Aktivera eller inaktivera mobila bredbandsenheter</description>
<description xml:lang="te">మొబైల్ బ్రాడ్‌బాండ్ పరికరములను చేతనము లేదా అచేతనము చేయుము</description>
+ <description xml:lang="tr">Mobil genişbant aygıtlarını etkinleştir ya da etkisizleştir</description>
<description xml:lang="uk">Увімкнути або вимкнути пристрої широкосмугових мобільних мереж</description>
<description xml:lang="zh_CN">启用或禁用移动宽带设备</description>
<message>System policy prevents enabling or disabling mobile broadband devices</message>
<message xml:lang="bg">Политиката на системата не позволява включване и изключване на устройства за мобилни мрежи</message>
<message xml:lang="ca">La política del sistema impedeix habilitar o inhabilitar els dispositius de banda ampla mòbil</message>
- <message xml:lang="cs">Systémová politika zamezuje povolení nebo zakázání mobilních širokopásmových zařízení</message>
+ <message xml:lang="cs">Systémová zásada zamezuje povolení nebo zakázání mobilních širokopásmových zařízení</message>
<message xml:lang="da">Systempolitik forhindrer aktivering eller deaktivering af mobile bredbåndsenheder</message>
<message xml:lang="de">Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung mobiler Breitbandgeräte</message>
<message xml:lang="el">Η πολιτική του συστήματος δεν επιτρέπει την ενεργοποίηση ή απενεργοποίηση συσκευών ευρυζωνικότητας κινητής τηλεφωνίας</message>
@@ -260,16 +279,19 @@
<message xml:lang="kn">ಮೊಬೈಲ್ ಬ್ರಾಡ್‌ಬ್ಯಾಂಡ್ ಸಾಧನಗಳನ್ನು ಶಕ್ತ ಅಥವ ಅಶಕ್ತಗೊಳಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತಿವೆ</message>
<message xml:lang="ko">시스템 정책이 모바일 광대역 장치의 사용 여부 설정을 금지합니다</message>
<message xml:lang="lt">Sistemos politika neleidžia įjungti arba išjungti mobiliojo plačiajuosčio ryšio įrenginių</message>
+ <message xml:lang="ml">മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുന്നത് സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार मोबाईल ब्रॉडबँड साधनांना सुरू किंवा बंद होण्यापासून रोखते</message>
<message xml:lang="or">ତନ୍ତ୍ର ନିତୀ ମୋବାଇଲ ବ୍ରୋଡବ୍ୟାଣ୍ଡ ଉପକରଣଗୁଡ଼ିକୁ ସକ୍ରିୟ କିମ୍ବା ନିଷ୍କ୍ରିୟ ହେବାରୁ ବାରଣ କରିଥାଏ</message>
<message xml:lang="pa">ਸਿਸਟਮ ਪਾਲਸੀ ਮੋਬਾਇਲ ਬਰਾਡਬੈਂਡ ਜੰਤਰ ਚਾਲੂ ਜਾਂ ਬੰਦ ਕਰਨ ਤੋਂ ਰੋਕਦੀ ਹੈ</message>
<message xml:lang="pl">Polityka systemu powstrzymuje włączenie lub wyłączenie urządzeń komórkowych</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem a habilitação ou desabilitação de dispositivos móveis de banda larga</message>
<message xml:lang="ru">Системная политика запрещает включение или выключение устройств мобильной связи</message>
<message xml:lang="sl">Sistemska določila preprečuje omogočanja ali onemogočanje mobilne širokopasovne naprave</message>
<message xml:lang="sr">Овлашћења система онемогућавају управљање мобилним широкопојасним уређајима</message>
<message xml:lang="sr@latin">Ovlašćenja sistema onemogućavaju upravljanje mobilnim širokopojasnim uređajima</message>
<message xml:lang="sv">Systemets policy förhindrar aktivering eller inaktivering av mobila bredbandsenheter</message>
<message xml:lang="te">మొబైల్ బ్రాడ్‌బాండ్ పరికరములను చేతనముచేయుటకు లేదా అచేతనముచేయుటకు సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, mobil genişbant aygıtlarını etkinleştirmeyi ya da etkisizleştirmeyi engelliyor</message>
<message xml:lang="uk">Правила системи забороняють вмикання або вимикання пристроїв широкосмугових мобільних мереж</message>
<message xml:lang="zh_CN">系统策略阻止启用或禁用移动宽带设备</message>
<defaults>
@@ -282,6 +304,7 @@
<description>Enable or disable WiMAX mobile broadband devices</description>
<description xml:lang="bg">Включване и изключване на устройства за достъп до мобилни мрежи по WiMAX</description>
<description xml:lang="ca">Habilita o inhabilita els dispositius de banda ampla mòbil WiMAX</description>
+ <description xml:lang="cs">Povolit nebo zakázat mobilní širokopásmová zařízení WiMAX</description>
<description xml:lang="de">Mobile WiMAX-Breitbandgeräte aktivieren oder deaktivieren</description>
<description xml:lang="eo">Enŝalti aŭ elŝalti WiMAX-larĝkapacitajn aparatojn</description>
<description xml:lang="es">Activar o desactivar los dispositivos de banda ancha móvil WiMAX</description>
@@ -292,14 +315,18 @@
<description xml:lang="id">Aktifkan atau matikan perangkat broadband bergerak WiMAX</description>
<description xml:lang="it">Abilitare o disabilitare dispositivi WiMAX a banda larga mobile</description>
<description xml:lang="ko">와이맥스 모바일 광대역 장치 사용 여부</description>
+ <description xml:lang="ml">WiMAX മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുക</description>
<description xml:lang="mr">WiMAX मोबाईल ब्रॉडबँड साधने सुरू किंवा बंद करा</description>
<description xml:lang="pl">Włączenie lub wyłączenie urządzeń komórkowych WiMAX</description>
+ <description xml:lang="pt_BR">Habilita ou desabilita dispositivos móveis WiMAX</description>
<description xml:lang="ru">Включить или выключить устройства мобильных сетей WiMax</description>
<description xml:lang="sl">Omogoči ali onemogoči mobilne širokopasovne naprave WiMAX</description>
+ <description xml:lang="tr">WiMAX mobil genişbant aygıtlarını etkinleştir ya da etkisizleştir</description>
<description xml:lang="uk">Увімкнути або вимкнути пристрої широкосмугових мобільних мереж WiMAX</description>
<message>System policy prevents enabling or disabling WiMAX mobile broadband devices</message>
<message xml:lang="bg">Политиката на системата не позволява включване и изключване на устройства за мобилни мрежи по WiMAX</message>
<message xml:lang="ca">La política del sistema impedeix habilitar o inhabilitar els dispositius de banda ampla mòbil WiMAX</message>
+ <message xml:lang="cs">Systémová zásada zamezuje povolení nebo zakázání mobilních širokopásmových zařízení WiMAX</message>
<message xml:lang="de">Die Systemrichtlinien verhindern die Aktivierung oder Deaktivierung mobiler WiMAX-Breitbandgeräte</message>
<message xml:lang="eo">Sistempolitiko preventas enŝalton aŭ elŝalton de larĝkapacitaj WiMAX-aparatoj</message>
<message xml:lang="es">La política del sistema evita activar o desactivar los dispositivos de banda ancha móvil WiMAX</message>
@@ -309,10 +336,13 @@
<message xml:lang="id">Kebijakan sistem mencegah mengaktifkan atau mematikan perangkat broadband bergerak WiMAX</message>
<message xml:lang="it">La politica di sistema impedisce di abilitare o disabilitare i dispositivi WiMAX a banda larga mobile</message>
<message xml:lang="ko">시스템 정책이 와이맥스 모바일 광대역 장치의 사용 여부 설정을 금지합니다</message>
+ <message xml:lang="ml">iMAX മുബൈല്‍ ബ്രോഡ്ബാന്റ് ഡിവൈസുകള്‍ പ്രവര്‍ത്തനസജ്ജമാക്കുകയോ പ്രവര്‍ത്തനരഹിതമാക്കുകയോ ചെയ്യുന്നത് സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार WiMAX मोबाईल ब्रॉडबँड साधनांना सुरू किंवा बंद होण्यापासून रोखते</message>
<message xml:lang="pl">Polityka systemu powstrzymuje włączenie lub wyłączenie urządzeń komórkowych WiMAX</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem a habilitação ou desabilitação de dispositivos móveis de banda larga WiMAX</message>
<message xml:lang="ru">Системная политика запрещает включение или выключение устройств мобильной связи WiMAX</message>
<message xml:lang="sl">Sistemska določila preprečujejo omogočanje ali onemogočanje mobilnih širokopasovnih naprav WiMAX</message>
+ <message xml:lang="tr">Sistem kuralları, WiMAX mobil genişbant aygıtlarını etkinleştirmeyi ya da etkisizleştirmeyi engelliyor</message>
<message xml:lang="uk">Правила системи забороняють вмикання або вимикання пристроїв широкосмугових мобільних мереж WiMAX</message>
<defaults>
<allow_inactive>no</allow_inactive>
@@ -340,22 +370,25 @@
<description xml:lang="kn">ಜಾಲಬಂಧ ಸಂಪರ್ಕಗಳನ್ನು ನಿಯಂತ್ರಿಸುವುದನ್ನು ಅನುಮತಿಸಿ</description>
<description xml:lang="ko">네트워크 연결 조작 허용</description>
<description xml:lang="lt">Leisti valdyti tinklo ryšius</description>
+ <description xml:lang="ml">നെറ്റ്​വര്‍ക്ക് കണക്ഷനുകളെ നിയന്ത്രിക്കുന്നത് അനുവദിക്കുക</description>
<description xml:lang="mr">नेटवर्क जोडणींचे नियंत्रण स्वीकारा</description>
<description xml:lang="or">ନେଟୱର୍କ ସଂଯୋଗଗୁଡ଼ିକ ପାଇଁ ନିୟନ୍ତ୍ରଣକୁ ଅନୁମତି ଦିଅନ୍ତୁ</description>
<description xml:lang="pa">ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨਾਂ ਲਈ ਕੰਟਰੋਲ ਮਨਜ਼ੂਰ</description>
<description xml:lang="pl">Umożliwienie kontroli połączeń sieciowych</description>
+ <description xml:lang="pt_BR">Permite o controle de conexões de rede</description>
<description xml:lang="ru">Разрешить контроль сетевых подключений</description>
<description xml:lang="sl">Dovoli nadzor omrežnih povezav</description>
<description xml:lang="sr">Дозволи контролу мрежних веза</description>
<description xml:lang="sr@latin">Dozvoli kontrolu mrežnih veza</description>
<description xml:lang="sv">Tillåt kontroll av nätverksanslutningar</description>
<description xml:lang="te">నెట్వర్కు అనుసంధానముల యొక్క నియంత్రణ అనుమతించుము</description>
+ <description xml:lang="tr">Ağ bağlantılarının denetimine izin ver</description>
<description xml:lang="uk">Дозволити керування з’єднаннями мережею</description>
<description xml:lang="zh_CN">允许控制网络连接</description>
<message>System policy prevents control of network connections</message>
<message xml:lang="bg">Политиката на системата не позволява управляване на мрежовите връзки</message>
<message xml:lang="ca">La política del sistema impedeix el control de les connexions de xarxa</message>
- <message xml:lang="cs">Systémová politika zamezuje ovládání síťových připojení</message>
+ <message xml:lang="cs">Systémová zásada zamezuje ovládání síťových připojení</message>
<message xml:lang="da">Systempolitik forhindrer kontrol af netværksforbindelser</message>
<message xml:lang="de">Die Systemrichtlinien verhindern die Kontrolle von Netzwerkverbindungen</message>
<message xml:lang="el">Η πολιτική συστήματος δεν επιτρέπει τον έλεγχο των συνδέσεων δικτύου</message>
@@ -370,16 +403,19 @@
<message xml:lang="kn">ಜಾಲಬಂಧ ಸಂಪರ್ಕಗಳನ್ನು ನಿಯಂತ್ರಿಸುವುದನ್ನು ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತಿವೆ</message>
<message xml:lang="ko">시스템 정책이 네트워크 연결 조작을 금지합니다</message>
<message xml:lang="lt">Sistemos politika neleidžia valdyti tinklo ryšių</message>
+ <message xml:lang="ml"> നെറ്റ്​വര്‍ക്ക് കണക്ഷനുകളെ നിയന്ത്രിക്കുന്നത് സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार नेटवर्क जोडणीचे नियंत्रण रोखते</message>
<message xml:lang="or">ତନ୍ତ୍ର ନିତୀ ନେଟୱର୍କ ସଂଯୋଗଗୁଡ଼ିକର ନିୟନ୍ତ୍ରଣକୁ ବାରଣ କରିଥାଏ</message>
<message xml:lang="pa">ਸਿਸਟਮ ਪਾਲਸੀ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ ਕੰਟਰੋਲ ਕਰਨ ਤੋਂ ਸੋਧ ਤੋਂ ਰੋਕਦੀ ਹੈ</message>
<message xml:lang="pl">Polityka systemu powstrzymuje kontrolę połączeń sieciowych</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem o controle de conexões de rede</message>
<message xml:lang="ru">Системная политика запрещает управление подключениями.</message>
<message xml:lang="sl">Sistemska določila preprečujejo nadzor omrežnih povezav</message>
<message xml:lang="sr">Овлашћења система онемогућавају контролу мрежних веза</message>
<message xml:lang="sr@latin">Ovlašćenja sistema onemogućavaju kontrolu mrežnih veza</message>
<message xml:lang="sv">Systemets policy förhindrar kontroll av nätverksanslutningar</message>
<message xml:lang="te">నెట్వర్కు అనుసంధానముల నియంత్రణను సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, ağ bağlantılarını denetlemeyi engelliyor</message>
<message xml:lang="uk">Правила системи забороняють керування з’єднаннями</message>
<message xml:lang="zh_CN">系统策略阻止更改网络连接</message>
<defaults>
@@ -428,6 +464,7 @@
<description xml:lang="sv">Anslutningsdelning via ett skyddat trådlöst nätverk</description>
<description xml:lang="ta">ஒரு பாதுகாக்கப்ப WiFi நெட்வொர்க்கின் வழியாக இணைப்பு பகிரப்படுகிறது</description>
<description xml:lang="te">రక్షిత WiFi నెట్వర్కు ద్వారా అనుసంధానపు భాగస్వామ్యము.</description>
+ <description xml:lang="tr">Korumalı bir WiFi ağı yoluyla bağlantı paylaşımı</description>
<description xml:lang="uk">Спільне використання з’єднання на основі захищеної мережі WiFi</description>
<description xml:lang="zh_CN">通过受保护的 WiFi 网络共享连接</description>
<description xml:lang="zh_TW">透過受保護的 WiFi 網路共享連線</description>
@@ -436,7 +473,7 @@
<message xml:lang="bg">Политиката на системата не позволява споделяне на връзки през защитена безжична мрежа</message>
<message xml:lang="bn_IN">সিস্টেমের নিয়মনীতির কারণে, নিরাপদ ওয়াই-ফাই নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার প্রতিরোধ করা হয়েছে</message>
<message xml:lang="ca">La política del sistema impedeix compartir connexions mitjançant una xarxa Wi-Fi protegida</message>
- <message xml:lang="cs">Systémová politika zabránila sdílení připojení přes chráněnou síť WiFi</message>
+ <message xml:lang="cs">Systémová zásada zabránila sdílení připojení přes chráněnou síť WiFi</message>
<message xml:lang="da">Systempolitikken forhindrer deling af forbindelser via et beskyttet WiFi-netværk</message>
<message xml:lang="de">Die Systemrichtlinien verhindern Verbindungsfreigaben über ein geschütztes WLAN-Netzwerk</message>
<message xml:lang="el">Η πολιτική συστήματος δεν επιτρέπει κοινή χρήση συνδέσεων μέσω προστατευμένου ασύρματου δικτύου</message>
@@ -469,6 +506,7 @@
<message xml:lang="sv">Systemets policy förhindrar delning av anslutningar via ett skyddat trådlöst nätverk</message>
<message xml:lang="ta">பாதுகாக்கப்பட்ட WiFi நெட்வொர்க்கின் வழியாக இணைப்புகளை பகிருவதை கணினி பாலிசி தடுக்கிறது</message>
<message xml:lang="te">రక్షిత WiFi నెట్వర్కు ద్వారా అనుసంధానములను భాగస్వామ్యపరచుట సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, korumalı kablosuz ağ yoluyla bağlantı paylaşımını önlüyor</message>
<message xml:lang="uk">Правила системи забороняють спільне використання з’єднань за допомогою захищеної мережі WiFi</message>
<message xml:lang="zh_CN">系统策略阻止使用受保护的 WiFi 网络共享连接</message>
<message xml:lang="zh_TW">系統政策讓您無法透過受保護的 WiFi 網路共享連結</message>
@@ -518,6 +556,7 @@
<description xml:lang="sv">Anslutningsdelning via ett öppet trådlöst nätverk</description>
<description xml:lang="ta">ஒரு திறந்த WiFi நெட்வொர்க்கின் வழியாக இணைப்பு பகிரப்படுகிறது</description>
<description xml:lang="te">ఓపెన్ WiFi నెట్వర్కు ద్వారా అనుసంధానపు భాగస్వామ్యము</description>
+ <description xml:lang="tr">Açık bir Wfi ağı yoluyla bağlantı paylaşımı</description>
<description xml:lang="uk">Спільне використання з’єднання на основі відкритої мережі WiFi</description>
<description xml:lang="zh_CN">通过公开 WiFi 网络共享连接</description>
<description xml:lang="zh_TW">透過開放的 WiFi 網路共享連線</description>
@@ -526,7 +565,7 @@
<message xml:lang="bg">Политиката на системата не позволява споделяне на връзки през отворена безжична мрежа</message>
<message xml:lang="bn_IN">সিস্টেমের নিয়মনীতির কারণে, উন্মুক্ত ওয়াই-ফাই নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার প্রতিরোধ করা হয়েছে</message>
<message xml:lang="ca">La política del sistema impedeix compartir connexions mitjançant una xarxa Wi-Fi oberta</message>
- <message xml:lang="cs">Systémová politika zabránila sdílení připojení přes otevřenou síť WiFi</message>
+ <message xml:lang="cs">Systémová zásada zabránila sdílení připojení přes otevřenou síť WiFi</message>
<message xml:lang="da">Systempolitikken forhindrer deling af forbindelser via et åbent WiFi-netværk</message>
<message xml:lang="de">Die Systemrichtlinien verhindern Verbindungsfreigaben über ein offenes WLAN-Netzwerk</message>
<message xml:lang="el">Η πολιτική συστήματος δεν επιτρέπει κοινή χρήση συνδέσεων μέσω ανοιχτού ασύρματου δικτύου</message>
@@ -559,6 +598,7 @@
<message xml:lang="sv">Systemets policy förhindrar delning av anslutningar via ett öppet trådlöst nätverk</message>
<message xml:lang="ta">திறந்த WiFi நெட்வொர்க்கின் வழியாக இணைப்புகளை பகிருவதை கணினி பாலிசி தடுக்கிறது</message>
<message xml:lang="te">ఓపెన్ WiFi నెట్వర్కు ద్వారా అనుసంధానములను భాగస్వామ్యపరచుట సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, korumasız kablosuz ağ yoluyla bağlantı paylaşımını önlüyor</message>
<message xml:lang="uk">Правила системи забороняють спільне використання з’єднань за допомогою відкритої мережі WiFi</message>
<message xml:lang="zh_CN">系统策略阻止使用公开 WiFi 网络共享连接</message>
<message xml:lang="zh_TW">系統政策讓您無法透過開放的 WiFi 網路共享連線</message>
@@ -570,6 +610,7 @@
<action id="org.freedesktop.NetworkManager.settings.modify.own">
<description>Modify personal network connections</description>
+ <description xml:lang="cs">Měnit osobní síťová připojení</description>
<description xml:lang="de">Eigene Netzwerkverbindungen bearbeiten</description>
<description xml:lang="eo">Modifi proprajn retkonektojn</description>
<description xml:lang="es">Modificar las conexiones de red personales</description>
@@ -579,12 +620,16 @@
<description xml:lang="id">Ubah koneksi jaringan personal</description>
<description xml:lang="it">Modificare le connessioni personali</description>
<description xml:lang="ko">개인 네트워크 연결을 수정합니다</description>
+ <description xml:lang="ml">സ്വന്തമായ നെറ്റ്​വര്‍ക്ക് കണക്ഷനുകളില്‍ മാറ്റം വരുത്തുക</description>
<description xml:lang="mr">वैयक्तिक नेटवर्क जोडणी संपादित करा</description>
<description xml:lang="pl">Modyfikacja osobistych połączeń sieciowych</description>
+ <description xml:lang="pt_BR">Modificar conexões pessoais de rede</description>
<description xml:lang="ru">Редактировать личные настройки подключения</description>
<description xml:lang="sl">Spremeni osebne omrežne povezave</description>
+ <description xml:lang="tr">Kişisel ağ bağlantılarını düzenle</description>
<description xml:lang="uk">Змінити параметри особистих з’єднань з мережею</description>
<message>System policy prevents modification of personal network settings</message>
+ <message xml:lang="cs">Systémová zásada zabránila změně osobního síťového nastavení</message>
<message xml:lang="de">Die Systemrichtlinien verhindern das Bearbeiten von eigenen Netzwerkeinstellungen</message>
<message xml:lang="eo">Sistempolitiko preventas modifadon de propraj retagordoj</message>
<message xml:lang="es">La política del sistema evita la modificación de la configuración personal de la red</message>
@@ -594,10 +639,13 @@
<message xml:lang="id">Kebijakan sistem mencegah pengubahan tatanan jaringan pribadi</message>
<message xml:lang="it">La politica di sistema impedisce di modificare le impostazioni di rete personali</message>
<message xml:lang="ko">시스템 정책이 개인 네트워크 설정의 수정을 금지합니다</message>
+ <message xml:lang="ml"> സ്വന്തമായ നെറ്റ്​വര്‍ക്ക് സജ്ജീകരണങ്ങള്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു</message>
<message xml:lang="mr">प्रणाली करार, व्यक्तिगत नेटवर्क सेटिंग्स् संपादीत करण्यापासून रोखते</message>
<message xml:lang="pl">Polityka systemu powstrzymuje modyfikację osobistych ustawień systemowych</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem modificação das configurações pessoais de redes</message>
<message xml:lang="ru">Системная политика запрещает изменение персональных настроек сети</message>
<message xml:lang="sl">Sistemska določila preprečujejo spreminjanje osebnih omrežnih nastavitev</message>
+ <message xml:lang="tr">Sistem kuralları, kişisel ağ ayarlarının değiştirilmesine izin vermiyor</message>
<message xml:lang="uk">Правила системи забороняють внесення змін до особистих параметрів мережі</message>
<defaults>
<allow_inactive>no</allow_inactive>
@@ -607,6 +655,7 @@
<action id="org.freedesktop.NetworkManager.settings.modify.system">
<description>Modify network connections for all users</description>
+ <description xml:lang="cs">Měnit síťová připojení pro všechny uživatele</description>
<description xml:lang="de">Netzwerkverbindungen für alle Benutzer bearbeiten</description>
<description xml:lang="eo">Modifi retkonektojn por ĉiuj uzantoj</description>
<description xml:lang="es">Modificar las conexiones de red para todos los usuarios</description>
@@ -618,10 +667,13 @@
<description xml:lang="ko">모든 사용자의 네트워크 연결을 수정합니다</description>
<description xml:lang="mr">सर्व वापरकर्त्यांकरीता नेटवर्क जोडणी संपादित करा</description>
<description xml:lang="pl">Modyfikacja połączeń sieciowych dla wszystkich użytkowników</description>
+ <description xml:lang="pt_BR">Modificar conexões de rede para todos os usuários</description>
<description xml:lang="ru">Изменить подключения доступные всем пользователям</description>
<description xml:lang="sl">Spremeni omrežne povezave za vse uporabnike</description>
+ <description xml:lang="tr">Tüm kullanıcılar için ağ bağlantılarını düzenle</description>
<description xml:lang="uk">Внести зміни до мережевих з’єднань всіх користувачів</description>
<message>System policy prevents modification of network settings for all users</message>
+ <message xml:lang="cs">Systémová zásada zabránila změně síťového nastavení pro všechny uživatele</message>
<message xml:lang="de">Die Systemrichtlinien verhindern das Bearbeiten von Netzwerkeinstellungen für alle Benutzer</message>
<message xml:lang="eo">Sistempolitiko preventas modifadon de retagordoj por ĉiuj uzantoj</message>
<message xml:lang="es">La política del sistema evita la modificación de la configuración de la red para todos los usuarios</message>
@@ -633,8 +685,10 @@
<message xml:lang="ko">시스템 정책이 모든 사용자의 네트워크 설정의 수정을 금지합니다</message>
<message xml:lang="mr">प्रणाली करार सर्व वापरकर्त्यांना नेटवर्क सेटिंग्स् संपादीत करण्यापासून रोखते</message>
<message xml:lang="pl">Polityka systemu powstrzymuje modyfikację ustawień sieciowych dla wszystkich użytkowników</message>
+ <message xml:lang="pt_BR">Políticas de sistema previnem modificação das configurações de rede para todos os usuários</message>
<message xml:lang="ru">Системная политика запрещает изменение настроек для всех пользователей</message>
<message xml:lang="sl">Sistemska določila preprečujejo spreminjanje sistemskih nastavitev za vse uporabnike</message>
+ <message xml:lang="tr">Sistem kuralları, tüm kullanıcılar için ağ ayarlarının değiştirilmesine izin vermiyor</message>
<message xml:lang="uk">Правила системи забороняють внесення змін до параметрів мережі для всіх користувачів</message>
<defaults>
<allow_inactive>no</allow_inactive>
@@ -681,6 +735,7 @@
<description xml:lang="sv">Ändra bestående värdnamn för systemet</description>
<description xml:lang="ta">நிலையான கணினி புரவலப்பெயரை மாற்றியமை</description>
<description xml:lang="te">నిరంతర సిస్టమ్ హోస్టునామము మార్చుము</description>
+ <description xml:lang="tr">Direşken sistemin adını değiştir</description>
<description xml:lang="uk">Змінити постійну назву вузла у мережі</description>
<description xml:lang="zh_CN">更改系统固有主机名</description>
<description xml:lang="zh_TW">修改永久系統的主機名稱</description>
@@ -689,7 +744,7 @@
<message xml:lang="bg">Политиката на системата не позволява промяна на името на хоста</message>
<message xml:lang="bn_IN">সিস্টেমে ব্যবহৃত নিয়ম-নীতির বিধিনিষেধের কারণে সিস্টেমের স্থায়ী হোস্ট-নেম পরিবর্তন করা সম্ভব নয়</message>
<message xml:lang="ca">La política del sistema impedeix la modificació del nom de l'ordinador de forma permanent</message>
- <message xml:lang="cs">Systémová politika zabránila změně trvalého systémového názvu počítače</message>
+ <message xml:lang="cs">Systémová zásada zabránila změně trvalého systémového názvu počítače</message>
<message xml:lang="da">Systempolitikken forhindrer ændring af det faste systemværtsnavn</message>
<message xml:lang="de">Die Systemrichtlinien verhindern das Bearbeiten des ständigen Rechnernamens des Systems</message>
<message xml:lang="el">Η πολιτική συστήματος δεν επιτρέπει τροποποίηση του πάγιου ονόματος συστήματος</message>
@@ -722,6 +777,7 @@
<message xml:lang="sv">Systemets policy förhindrar ändring av bestående värdnamn för systemet</message>
<message xml:lang="ta">நிலையான கணினி புரவலபெயர் மாற்றியமைப்பதை கணினி பாலிசி தடுக்கிறது</message>
<message xml:lang="te">నిరంతర సిస్టమ్ హోస్టునామమును సవరించుటను సిస్టమ్ విధానము నిరోధించుచున్నది</message>
+ <message xml:lang="tr">Sistem kuralları, direşken sistemin adının değiştirilmesini önlüyor</message>
<message xml:lang="uk">Правила системи забороняють внесення змін до постійної назви вузла у мережі</message>
<message xml:lang="zh_CN">系统策略阻止更改系统固有主机名</message>
<message xml:lang="zh_TW">系統政策讓您無法修改永久的系統主機名稱</message>
diff --git a/src/Makefile.am b/src/Makefile.am
index cbcfdc625..f46fbab34 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,5 @@
SUBDIRS= \
+ generated \
logging \
dns-manager \
vpn-manager \
@@ -10,6 +11,8 @@ SUBDIRS= \
dnsmasq-manager \
modem-manager \
bluez-manager \
+ firewall-manager \
+ wifi \
settings
if WITH_WIMAX
@@ -20,7 +23,9 @@ SUBDIRS += . tests
INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/include \
- -I${top_builddir}/marshallers \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src/dns-manager \
-I${top_srcdir}/src/vpn-manager \
@@ -30,14 +35,13 @@ INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/src/dnsmasq-manager \
-I${top_srcdir}/src/modem-manager \
-I$(top_srcdir)/src/bluez-manager \
+ -I$(top_srcdir)/src/firewall-manager \
-I$(top_srcdir)/src/settings \
+ -I$(top_srcdir)/src/wifi \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/callouts
-if WITH_WIMAX
-INCLUDES += -I$(top_srcdir)/src/wimax
-endif
-
###########################################
# Test libraries
###########################################
@@ -63,7 +67,7 @@ libtest_dhcp_la_CPPFLAGS = \
$(LIBNL_CFLAGS)
libtest_dhcp_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
@@ -113,19 +117,25 @@ NetworkManager_SOURCES = \
nm-call-store.h \
nm-device.c \
nm-device.h \
- nm-device-interface.c \
- nm-device-interface.h \
nm-device-private.h \
nm-device-ethernet.c \
nm-device-ethernet.h \
nm-device-wifi.c \
nm-device-wifi.h \
+ nm-device-wired.c \
+ nm-device-wired.h \
nm-device-olpc-mesh.c \
nm-device-olpc-mesh.h \
nm-device-bt.c \
nm-device-bt.h \
nm-device-modem.h \
nm-device-modem.c \
+ nm-device-infiniband.c \
+ nm-device-infiniband.h \
+ nm-device-bond.c \
+ nm-device-bond.h \
+ nm-device-vlan.c \
+ nm-device-vlan.h \
nm-wifi-ap.c \
nm-wifi-ap.h \
nm-wifi-ap-utils.c \
@@ -134,6 +144,7 @@ NetworkManager_SOURCES = \
nm-dbus-manager.c \
nm-udev-manager.c \
nm-udev-manager.h \
+ nm-device-factory.h \
nm-hostname-provider.c \
nm-hostname-provider.h \
nm-ip4-config.c \
@@ -169,15 +180,28 @@ NetworkManager_SOURCES = \
nm-activation-request.h \
nm-properties-changed-signal.c \
nm-properties-changed-signal.h \
- wpa.c \
- wpa.h \
nm-dhcp4-config.c \
nm-dhcp4-config.h \
nm-dhcp6-config.c \
nm-dhcp6-config.h \
nm-rfkill.h \
- nm-session-monitor.c \
- nm-session-monitor.h
+ nm-session-monitor.h \
+ nm-session-utils.c \
+ nm-session-utils.h
+
+if WITH_CONCHECK
+NetworkManager_SOURCES += nm-connectivity.c nm-connectivity.h
+endif
+
+if SESSION_TRACKING_SYSTEMD
+NetworkManager_SOURCES += nm-session-monitor-systemd.c
+else
+if SESSION_TRACKING_CK
+NetworkManager_SOURCES += nm-session-monitor-ck.c
+else
+NetworkManager_SOURCES += nm-session-monitor-null.c
+endif
+endif
nm-access-point-glue.h: $(top_srcdir)/introspection/nm-access-point.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_access_point --mode=glib-server --output=$@ $<
@@ -191,6 +215,9 @@ nm-device-interface-glue.h: $(top_srcdir)/introspection/nm-device.xml
nm-device-ethernet-glue.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-server --output=$@ $<
+nm-device-infiniband-glue.h: $(top_srcdir)/introspection/nm-device-infiniband.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_infiniband --mode=glib-server --output=$@ $<
+
nm-device-wifi-glue.h: $(top_srcdir)/introspection/nm-device-wifi.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_wifi --mode=glib-server --output=$@ $<
@@ -200,6 +227,12 @@ nm-device-bt-glue.h: $(top_srcdir)/introspection/nm-device-bt.xml
nm-device-olpc-mesh-glue.h: $(top_srcdir)/introspection/nm-device-olpc-mesh.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_olpc_mesh --mode=glib-server --output=$@ $<
+nm-device-bond-glue.h: $(top_srcdir)/introspection/nm-device-bond.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_bond --mode=glib-server --output=$@ $<
+
+nm-device-vlan-glue.h: $(top_srcdir)/introspection/nm-device-vlan.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_vlan --mode=glib-server --output=$@ $<
+
nm-ip4-config-glue.h: $(top_srcdir)/introspection/nm-ip4-config.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_ip4_config --mode=glib-server --output=$@ $<
@@ -223,6 +256,9 @@ BUILT_SOURCES = \
nm-manager-glue.h \
nm-device-interface-glue.h \
nm-device-ethernet-glue.h \
+ nm-device-infiniband-glue.h \
+ nm-device-bond-glue.h \
+ nm-device-vlan-glue.h \
nm-device-wifi-glue.h \
nm-device-olpc-mesh-glue.h \
nm-device-bt-glue.h \
@@ -240,6 +276,7 @@ NetworkManager_CPPFLAGS = \
$(LIBNL_CFLAGS) \
$(GMODULE_CFLAGS) \
$(POLKIT_CFLAGS) \
+ $(SYSTEMD_CFLAGS) \
-DG_DISABLE_DEPRECATED \
-DBINDIR=\"$(bindir)\" \
-DSBINDIR=\"$(sbindir)\" \
@@ -249,16 +286,15 @@ NetworkManager_CPPFLAGS = \
-DLOCALSTATEDIR=\"$(localstatedir)\" \
-DNM_RUN_DIR=\"$(rundir)\" \
-DNMLOCALEDIR=\"$(datadir)/locale\" \
+ -DNMPLUGINDIR=\"$(pkglibdir)\"
-DARP_DEBUG
-
-WIMAX_LIBS=
-if WITH_WIMAX
-WIMAX_LIBS += ./wimax/libwimax.la
+if WITH_CONCHECK
+NetworkManager_CPPFLAGS += $(LIBSOUP_CFLAGS)
endif
NetworkManager_LDADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ ./generated/libnm-generated.la \
./logging/libnm-logging.la \
./dns-manager/libdns-manager.la \
./vpn-manager/libvpn-manager.la \
@@ -269,8 +305,9 @@ NetworkManager_LDADD = \
./ppp-manager/libppp-manager.la \
./modem-manager/libmodem-manager.la \
./bluez-manager/libbluez-manager.la \
+ ./wifi/libwifi-utils.la \
+ ./firewall-manager/libfirewall-manager.la \
./settings/libsettings.la \
- $(WIMAX_LIBS) \
./backends/libnmbackend.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(DBUS_LIBS) \
@@ -279,9 +316,14 @@ NetworkManager_LDADD = \
$(LIBNL_LIBS) \
$(GMODULE_LIBS) \
$(POLKIT_LIBS) \
+ $(SYSTEMD_LIBS) \
$(LIBM) \
$(LIBDL)
+if WITH_CONCHECK
+NetworkManager_LDADD += $(LIBSOUP_LIBS)
+endif
+
NetworkManager_LDFLAGS = -rdynamic
libexec_PROGRAMS = nm-crash-logger
@@ -301,7 +343,7 @@ NetworkManagerdir = $(datadir)/NetworkManager
NetworkManager_DATA = gdb-cmd
dbusservicedir = $(DBUS_SYS_DIR)
-dbusservice_DATA = NetworkManager.conf
+dbusservice_DATA = org.freedesktop.NetworkManager.conf
EXTRA_DIST = \
$(dbusservice_DATA) \
diff --git a/src/Makefile.in b/src/Makefile.in
index 5a388235c..715658e86 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -37,9 +37,13 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@WITH_WIMAX_TRUE@am__append_1 = wimax
-@WITH_WIMAX_TRUE@am__append_2 = -I$(top_srcdir)/src/wimax
sbin_PROGRAMS = NetworkManager$(EXEEXT)
-@WITH_WIMAX_TRUE@am__append_3 = ./wimax/libwimax.la
+@WITH_CONCHECK_TRUE@am__append_2 = nm-connectivity.c nm-connectivity.h
+@SESSION_TRACKING_SYSTEMD_TRUE@am__append_3 = nm-session-monitor-systemd.c
+@SESSION_TRACKING_CK_TRUE@@SESSION_TRACKING_SYSTEMD_FALSE@am__append_4 = nm-session-monitor-ck.c
+@SESSION_TRACKING_CK_FALSE@@SESSION_TRACKING_SYSTEMD_FALSE@am__append_5 = nm-session-monitor-null.c
+@WITH_CONCHECK_TRUE@am__append_6 = $(LIBSOUP_CFLAGS)
+@WITH_CONCHECK_TRUE@am__append_7 = $(LIBSOUP_LIBS)
libexec_PROGRAMS = nm-crash-logger$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -64,7 +68,7 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libtest_dhcp_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libtest_dhcp_la_OBJECTS = libtest_dhcp_la-nm-ip4-config.lo \
@@ -91,14 +95,50 @@ libtest_wifi_ap_utils_la_OBJECTS = \
am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(NetworkManagerdir)" "$(DESTDIR)$(dbusservicedir)"
PROGRAMS = $(libexec_PROGRAMS) $(sbin_PROGRAMS)
+am__NetworkManager_SOURCES_DIST = nm-call-store.c nm-call-store.h \
+ nm-device.c nm-device.h nm-device-private.h \
+ nm-device-ethernet.c nm-device-ethernet.h nm-device-wifi.c \
+ nm-device-wifi.h nm-device-wired.c nm-device-wired.h \
+ nm-device-olpc-mesh.c nm-device-olpc-mesh.h nm-device-bt.c \
+ nm-device-bt.h nm-device-modem.h nm-device-modem.c \
+ nm-device-infiniband.c nm-device-infiniband.h nm-device-bond.c \
+ nm-device-bond.h nm-device-vlan.c nm-device-vlan.h \
+ nm-wifi-ap.c nm-wifi-ap.h nm-wifi-ap-utils.c \
+ nm-wifi-ap-utils.h nm-dbus-manager.h nm-dbus-manager.c \
+ nm-udev-manager.c nm-udev-manager.h nm-device-factory.h \
+ nm-hostname-provider.c nm-hostname-provider.h nm-ip4-config.c \
+ nm-ip4-config.h nm-ip6-config.c nm-ip6-config.h \
+ nm-active-connection.h nm-active-connection.c nm-config.h \
+ nm-config.c main.c nm-policy.c nm-policy.h nm-policy-hosts.c \
+ nm-policy-hosts.h nm-policy-hostname.c nm-policy-hostname.h \
+ NetworkManagerUtils.c NetworkManagerUtils.h nm-system.c \
+ nm-system.h nm-manager.c nm-manager.h nm-manager-auth.c \
+ nm-manager-auth.h nm-netlink-monitor.c nm-netlink-monitor.h \
+ nm-netlink-utils.c nm-netlink-utils.h nm-netlink-compat.h \
+ nm-netlink-compat.c nm-activation-request.c \
+ nm-activation-request.h nm-properties-changed-signal.c \
+ nm-properties-changed-signal.h nm-dhcp4-config.c \
+ nm-dhcp4-config.h nm-dhcp6-config.c nm-dhcp6-config.h \
+ nm-rfkill.h nm-session-monitor.h nm-session-utils.c \
+ nm-session-utils.h nm-connectivity.c nm-connectivity.h \
+ nm-session-monitor-systemd.c nm-session-monitor-ck.c \
+ nm-session-monitor-null.c
+@WITH_CONCHECK_TRUE@am__objects_1 = \
+@WITH_CONCHECK_TRUE@ NetworkManager-nm-connectivity.$(OBJEXT)
+@SESSION_TRACKING_SYSTEMD_TRUE@am__objects_2 = NetworkManager-nm-session-monitor-systemd.$(OBJEXT)
+@SESSION_TRACKING_CK_TRUE@@SESSION_TRACKING_SYSTEMD_FALSE@am__objects_3 = NetworkManager-nm-session-monitor-ck.$(OBJEXT)
+@SESSION_TRACKING_CK_FALSE@@SESSION_TRACKING_SYSTEMD_FALSE@am__objects_4 = NetworkManager-nm-session-monitor-null.$(OBJEXT)
am_NetworkManager_OBJECTS = NetworkManager-nm-call-store.$(OBJEXT) \
NetworkManager-nm-device.$(OBJEXT) \
- NetworkManager-nm-device-interface.$(OBJEXT) \
NetworkManager-nm-device-ethernet.$(OBJEXT) \
NetworkManager-nm-device-wifi.$(OBJEXT) \
+ NetworkManager-nm-device-wired.$(OBJEXT) \
NetworkManager-nm-device-olpc-mesh.$(OBJEXT) \
NetworkManager-nm-device-bt.$(OBJEXT) \
NetworkManager-nm-device-modem.$(OBJEXT) \
+ NetworkManager-nm-device-infiniband.$(OBJEXT) \
+ NetworkManager-nm-device-bond.$(OBJEXT) \
+ NetworkManager-nm-device-vlan.$(OBJEXT) \
NetworkManager-nm-wifi-ap.$(OBJEXT) \
NetworkManager-nm-wifi-ap-utils.$(OBJEXT) \
NetworkManager-nm-dbus-manager.$(OBJEXT) \
@@ -121,13 +161,13 @@ am_NetworkManager_OBJECTS = NetworkManager-nm-call-store.$(OBJEXT) \
NetworkManager-nm-netlink-compat.$(OBJEXT) \
NetworkManager-nm-activation-request.$(OBJEXT) \
NetworkManager-nm-properties-changed-signal.$(OBJEXT) \
- NetworkManager-wpa.$(OBJEXT) \
NetworkManager-nm-dhcp4-config.$(OBJEXT) \
NetworkManager-nm-dhcp6-config.$(OBJEXT) \
- NetworkManager-nm-session-monitor.$(OBJEXT)
+ NetworkManager-nm-session-utils.$(OBJEXT) $(am__objects_1) \
+ $(am__objects_2) $(am__objects_3) $(am__objects_4)
NetworkManager_OBJECTS = $(am_NetworkManager_OBJECTS)
-NetworkManager_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+@WITH_CONCHECK_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+NetworkManager_DEPENDENCIES = ./generated/libnm-generated.la \
./logging/libnm-logging.la ./dns-manager/libdns-manager.la \
./vpn-manager/libvpn-manager.la \
./dhcp-manager/libdhcp-manager.la \
@@ -136,13 +176,15 @@ NetworkManager_DEPENDENCIES = \
./dnsmasq-manager/libdnsmasq-manager.la \
./ppp-manager/libppp-manager.la \
./modem-manager/libmodem-manager.la \
- ./bluez-manager/libbluez-manager.la ./settings/libsettings.la \
- $(WIMAX_LIBS) ./backends/libnmbackend.la \
+ ./bluez-manager/libbluez-manager.la ./wifi/libwifi-utils.la \
+ ./firewall-manager/libfirewall-manager.la \
+ ./settings/libsettings.la ./backends/libnmbackend.la \
$(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
NetworkManager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(NetworkManager_LDFLAGS) $(LDFLAGS) -o \
@@ -183,8 +225,8 @@ SOURCES = $(libtest_dhcp_la_SOURCES) \
$(nm_crash_logger_SOURCES)
DIST_SOURCES = $(libtest_dhcp_la_SOURCES) \
$(libtest_policy_hosts_la_SOURCES) \
- $(libtest_wifi_ap_utils_la_SOURCES) $(NetworkManager_SOURCES) \
- $(nm_crash_logger_SOURCES)
+ $(libtest_wifi_ap_utils_la_SOURCES) \
+ $(am__NetworkManager_SOURCES_DIST) $(nm_crash_logger_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
@@ -221,10 +263,10 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = logging dns-manager vpn-manager dhcp-manager \
+DIST_SUBDIRS = generated logging dns-manager vpn-manager dhcp-manager \
ip6-manager supplicant-manager ppp-manager backends \
- dnsmasq-manager modem-manager bluez-manager settings wimax . \
- tests
+ dnsmasq-manager modem-manager bluez-manager firewall-manager \
+ wifi settings wimax . tests
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -296,6 +338,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -350,11 +394,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -365,6 +413,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -404,6 +453,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -467,21 +518,31 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = logging dns-manager vpn-manager dhcp-manager ip6-manager \
- supplicant-manager ppp-manager backends dnsmasq-manager \
- modem-manager bluez-manager settings $(am__append_1) . tests
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/include \
- -I${top_builddir}/marshallers -I${top_srcdir}/src/logging \
- -I${top_srcdir}/src/dns-manager \
- -I${top_srcdir}/src/vpn-manager \
- -I${top_srcdir}/src/dhcp-manager \
- -I${top_srcdir}/src/ip6-manager \
- -I${top_srcdir}/src/supplicant-manager \
- -I${top_srcdir}/src/dnsmasq-manager \
- -I${top_srcdir}/src/modem-manager \
- -I$(top_srcdir)/src/bluez-manager -I$(top_srcdir)/src/settings \
- -I${top_srcdir}/libnm-util -I${top_srcdir}/callouts \
- $(am__append_2)
+SUBDIRS = generated logging dns-manager vpn-manager dhcp-manager \
+ ip6-manager supplicant-manager ppp-manager backends \
+ dnsmasq-manager modem-manager bluez-manager firewall-manager \
+ wifi settings $(am__append_1) . tests
+INCLUDES = -I${top_srcdir} \
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/src/dns-manager \
+ -I${top_srcdir}/src/vpn-manager \
+ -I${top_srcdir}/src/dhcp-manager \
+ -I${top_srcdir}/src/ip6-manager \
+ -I${top_srcdir}/src/supplicant-manager \
+ -I${top_srcdir}/src/dnsmasq-manager \
+ -I${top_srcdir}/src/modem-manager \
+ -I$(top_srcdir)/src/bluez-manager \
+ -I$(top_srcdir)/src/firewall-manager \
+ -I$(top_srcdir)/src/settings \
+ -I$(top_srcdir)/src/wifi \
+ -I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/callouts
+
###########################################
# Test libraries
@@ -507,7 +568,7 @@ libtest_dhcp_la_CPPFLAGS = \
$(LIBNL_CFLAGS)
libtest_dhcp_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
@@ -544,82 +605,41 @@ libtest_wifi_ap_utils_la_LIBADD = \
${top_builddir}/libnm-util/libnm-util.la \
$(GLIB_LIBS)
-NetworkManager_SOURCES = \
- nm-call-store.c \
- nm-call-store.h \
- nm-device.c \
- nm-device.h \
- nm-device-interface.c \
- nm-device-interface.h \
- nm-device-private.h \
- nm-device-ethernet.c \
- nm-device-ethernet.h \
- nm-device-wifi.c \
- nm-device-wifi.h \
- nm-device-olpc-mesh.c \
- nm-device-olpc-mesh.h \
- nm-device-bt.c \
- nm-device-bt.h \
- nm-device-modem.h \
- nm-device-modem.c \
- nm-wifi-ap.c \
- nm-wifi-ap.h \
- nm-wifi-ap-utils.c \
- nm-wifi-ap-utils.h \
- nm-dbus-manager.h \
- nm-dbus-manager.c \
- nm-udev-manager.c \
- nm-udev-manager.h \
- nm-hostname-provider.c \
- nm-hostname-provider.h \
- nm-ip4-config.c \
- nm-ip4-config.h \
- nm-ip6-config.c \
- nm-ip6-config.h \
- nm-active-connection.h \
- nm-active-connection.c \
- nm-config.h \
- nm-config.c \
- main.c \
- nm-policy.c \
- nm-policy.h \
- nm-policy-hosts.c \
- nm-policy-hosts.h \
- nm-policy-hostname.c \
- nm-policy-hostname.h \
- NetworkManagerUtils.c \
- NetworkManagerUtils.h \
- nm-system.c \
- nm-system.h \
- nm-manager.c \
- nm-manager.h \
- nm-manager-auth.c \
- nm-manager-auth.h \
- nm-netlink-monitor.c \
- nm-netlink-monitor.h \
- nm-netlink-utils.c \
- nm-netlink-utils.h \
- nm-netlink-compat.h \
- nm-netlink-compat.c \
- nm-activation-request.c \
- nm-activation-request.h \
- nm-properties-changed-signal.c \
- nm-properties-changed-signal.h \
- wpa.c \
- wpa.h \
- nm-dhcp4-config.c \
- nm-dhcp4-config.h \
- nm-dhcp6-config.c \
- nm-dhcp6-config.h \
- nm-rfkill.h \
- nm-session-monitor.c \
- nm-session-monitor.h
-
+NetworkManager_SOURCES = nm-call-store.c nm-call-store.h nm-device.c \
+ nm-device.h nm-device-private.h nm-device-ethernet.c \
+ nm-device-ethernet.h nm-device-wifi.c nm-device-wifi.h \
+ nm-device-wired.c nm-device-wired.h nm-device-olpc-mesh.c \
+ nm-device-olpc-mesh.h nm-device-bt.c nm-device-bt.h \
+ nm-device-modem.h nm-device-modem.c nm-device-infiniband.c \
+ nm-device-infiniband.h nm-device-bond.c nm-device-bond.h \
+ nm-device-vlan.c nm-device-vlan.h nm-wifi-ap.c nm-wifi-ap.h \
+ nm-wifi-ap-utils.c nm-wifi-ap-utils.h nm-dbus-manager.h \
+ nm-dbus-manager.c nm-udev-manager.c nm-udev-manager.h \
+ nm-device-factory.h nm-hostname-provider.c \
+ nm-hostname-provider.h nm-ip4-config.c nm-ip4-config.h \
+ nm-ip6-config.c nm-ip6-config.h nm-active-connection.h \
+ nm-active-connection.c nm-config.h nm-config.c main.c \
+ nm-policy.c nm-policy.h nm-policy-hosts.c nm-policy-hosts.h \
+ nm-policy-hostname.c nm-policy-hostname.h \
+ NetworkManagerUtils.c NetworkManagerUtils.h nm-system.c \
+ nm-system.h nm-manager.c nm-manager.h nm-manager-auth.c \
+ nm-manager-auth.h nm-netlink-monitor.c nm-netlink-monitor.h \
+ nm-netlink-utils.c nm-netlink-utils.h nm-netlink-compat.h \
+ nm-netlink-compat.c nm-activation-request.c \
+ nm-activation-request.h nm-properties-changed-signal.c \
+ nm-properties-changed-signal.h nm-dhcp4-config.c \
+ nm-dhcp4-config.h nm-dhcp6-config.c nm-dhcp6-config.h \
+ nm-rfkill.h nm-session-monitor.h nm-session-utils.c \
+ nm-session-utils.h $(am__append_2) $(am__append_3) \
+ $(am__append_4) $(am__append_5)
BUILT_SOURCES = \
nm-access-point-glue.h \
nm-manager-glue.h \
nm-device-interface-glue.h \
nm-device-ethernet-glue.h \
+ nm-device-infiniband-glue.h \
+ nm-device-bond-glue.h \
+ nm-device-vlan-glue.h \
nm-device-wifi-glue.h \
nm-device-olpc-mesh-glue.h \
nm-device-bt-glue.h \
@@ -630,29 +650,17 @@ BUILT_SOURCES = \
nm-dhcp4-config-glue.h \
nm-dhcp6-config-glue.h
-NetworkManager_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GUDEV_CFLAGS) \
- $(LIBNL_CFLAGS) \
- $(GMODULE_CFLAGS) \
- $(POLKIT_CFLAGS) \
- -DG_DISABLE_DEPRECATED \
- -DBINDIR=\"$(bindir)\" \
- -DSBINDIR=\"$(sbindir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DDATADIR=\"$(datadir)\" \
+NetworkManager_CPPFLAGS = $(DBUS_CFLAGS) $(GLIB_CFLAGS) \
+ $(GUDEV_CFLAGS) $(LIBNL_CFLAGS) $(GMODULE_CFLAGS) \
+ $(POLKIT_CFLAGS) $(SYSTEMD_CFLAGS) -DG_DISABLE_DEPRECATED \
+ -DBINDIR=\"$(bindir)\" -DSBINDIR=\"$(sbindir)\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" -DDATADIR=\"$(datadir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DLOCALSTATEDIR=\"$(localstatedir)\" \
- -DNM_RUN_DIR=\"$(rundir)\" \
- -DNMLOCALEDIR=\"$(datadir)/locale\" \
- -DARP_DEBUG
-
-WIMAX_LIBS = $(am__append_3)
-NetworkManager_LDADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
- ./logging/libnm-logging.la \
- ./dns-manager/libdns-manager.la \
+ -DNM_RUN_DIR=\"$(rundir)\" -DNMLOCALEDIR=\"$(datadir)/locale\" \
+ -DNMPLUGINDIR=\"$(pkglibdir)\" $(am__append_6)
+NetworkManager_LDADD = ./generated/libnm-generated.la \
+ ./logging/libnm-logging.la ./dns-manager/libdns-manager.la \
./vpn-manager/libvpn-manager.la \
./dhcp-manager/libdhcp-manager.la \
./ip6-manager/libip6-manager.la \
@@ -660,20 +668,13 @@ NetworkManager_LDADD = \
./dnsmasq-manager/libdnsmasq-manager.la \
./ppp-manager/libppp-manager.la \
./modem-manager/libmodem-manager.la \
- ./bluez-manager/libbluez-manager.la \
- ./settings/libsettings.la \
- $(WIMAX_LIBS) \
- ./backends/libnmbackend.la \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(DBUS_LIBS) \
- $(GLIB_LIBS) \
- $(GUDEV_LIBS) \
- $(LIBNL_LIBS) \
- $(GMODULE_LIBS) \
- $(POLKIT_LIBS) \
- $(LIBM) \
- $(LIBDL)
-
+ ./bluez-manager/libbluez-manager.la ./wifi/libwifi-utils.la \
+ ./firewall-manager/libfirewall-manager.la \
+ ./settings/libsettings.la ./backends/libnmbackend.la \
+ $(top_builddir)/libnm-util/libnm-util.la $(DBUS_LIBS) \
+ $(GLIB_LIBS) $(GUDEV_LIBS) $(LIBNL_LIBS) $(GMODULE_LIBS) \
+ $(POLKIT_LIBS) $(SYSTEMD_LIBS) $(LIBM) $(LIBDL) \
+ $(am__append_7)
NetworkManager_LDFLAGS = -rdynamic
nm_crash_logger_SOURCES = nm-crash-logger.c
nm_crash_logger_CPPFLAGS = \
@@ -689,7 +690,7 @@ nm_crash_logger_LDADD = $(GLIB_LIBS)
NetworkManagerdir = $(datadir)/NetworkManager
NetworkManager_DATA = gdb-cmd
dbusservicedir = $(DBUS_SYS_DIR)
-dbusservice_DATA = NetworkManager.conf
+dbusservice_DATA = org.freedesktop.NetworkManager.conf
EXTRA_DIST = \
$(dbusservice_DATA) \
$(NetworkManager_DATA)
@@ -852,13 +853,17 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-active-connection.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-call-store.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-config.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-connectivity.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-dbus-manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-bond.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-bt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-ethernet.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-interface.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-infiniband.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-modem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-olpc-mesh.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-vlan.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-wifi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device-wired.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-device.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-dhcp4-config.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-dhcp6-config.Po@am__quote@
@@ -874,12 +879,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-policy-hosts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-policy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-properties-changed-signal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-session-monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-session-monitor-ck.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-session-monitor-null.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-session-utils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-system.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-udev-manager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-wifi-ap-utils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-nm-wifi-ap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetworkManager-wpa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_dhcp_la-nm-dbus-manager.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_dhcp_la-nm-hostname-provider.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_dhcp_la-nm-ip4-config.Plo@am__quote@
@@ -995,22 +1002,6 @@ NetworkManager-nm-device.obj: nm-device.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device.obj `if test -f 'nm-device.c'; then $(CYGPATH_W) 'nm-device.c'; else $(CYGPATH_W) '$(srcdir)/nm-device.c'; fi`
-NetworkManager-nm-device-interface.o: nm-device-interface.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-interface.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-interface.Tpo -c -o NetworkManager-nm-device-interface.o `test -f 'nm-device-interface.c' || echo '$(srcdir)/'`nm-device-interface.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-interface.Tpo $(DEPDIR)/NetworkManager-nm-device-interface.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-interface.c' object='NetworkManager-nm-device-interface.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-interface.o `test -f 'nm-device-interface.c' || echo '$(srcdir)/'`nm-device-interface.c
-
-NetworkManager-nm-device-interface.obj: nm-device-interface.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-interface.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-interface.Tpo -c -o NetworkManager-nm-device-interface.obj `if test -f 'nm-device-interface.c'; then $(CYGPATH_W) 'nm-device-interface.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-interface.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-interface.Tpo $(DEPDIR)/NetworkManager-nm-device-interface.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-interface.c' object='NetworkManager-nm-device-interface.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-interface.obj `if test -f 'nm-device-interface.c'; then $(CYGPATH_W) 'nm-device-interface.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-interface.c'; fi`
-
NetworkManager-nm-device-ethernet.o: nm-device-ethernet.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-ethernet.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-ethernet.Tpo -c -o NetworkManager-nm-device-ethernet.o `test -f 'nm-device-ethernet.c' || echo '$(srcdir)/'`nm-device-ethernet.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-ethernet.Tpo $(DEPDIR)/NetworkManager-nm-device-ethernet.Po
@@ -1043,6 +1034,22 @@ NetworkManager-nm-device-wifi.obj: nm-device-wifi.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-wifi.obj `if test -f 'nm-device-wifi.c'; then $(CYGPATH_W) 'nm-device-wifi.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-wifi.c'; fi`
+NetworkManager-nm-device-wired.o: nm-device-wired.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-wired.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-wired.Tpo -c -o NetworkManager-nm-device-wired.o `test -f 'nm-device-wired.c' || echo '$(srcdir)/'`nm-device-wired.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-wired.Tpo $(DEPDIR)/NetworkManager-nm-device-wired.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-wired.c' object='NetworkManager-nm-device-wired.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-wired.o `test -f 'nm-device-wired.c' || echo '$(srcdir)/'`nm-device-wired.c
+
+NetworkManager-nm-device-wired.obj: nm-device-wired.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-wired.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-wired.Tpo -c -o NetworkManager-nm-device-wired.obj `if test -f 'nm-device-wired.c'; then $(CYGPATH_W) 'nm-device-wired.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-wired.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-wired.Tpo $(DEPDIR)/NetworkManager-nm-device-wired.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-wired.c' object='NetworkManager-nm-device-wired.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-wired.obj `if test -f 'nm-device-wired.c'; then $(CYGPATH_W) 'nm-device-wired.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-wired.c'; fi`
+
NetworkManager-nm-device-olpc-mesh.o: nm-device-olpc-mesh.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-olpc-mesh.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-olpc-mesh.Tpo -c -o NetworkManager-nm-device-olpc-mesh.o `test -f 'nm-device-olpc-mesh.c' || echo '$(srcdir)/'`nm-device-olpc-mesh.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-olpc-mesh.Tpo $(DEPDIR)/NetworkManager-nm-device-olpc-mesh.Po
@@ -1091,6 +1098,54 @@ NetworkManager-nm-device-modem.obj: nm-device-modem.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-modem.obj `if test -f 'nm-device-modem.c'; then $(CYGPATH_W) 'nm-device-modem.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-modem.c'; fi`
+NetworkManager-nm-device-infiniband.o: nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-infiniband.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-infiniband.Tpo -c -o NetworkManager-nm-device-infiniband.o `test -f 'nm-device-infiniband.c' || echo '$(srcdir)/'`nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-infiniband.Tpo $(DEPDIR)/NetworkManager-nm-device-infiniband.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-infiniband.c' object='NetworkManager-nm-device-infiniband.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-infiniband.o `test -f 'nm-device-infiniband.c' || echo '$(srcdir)/'`nm-device-infiniband.c
+
+NetworkManager-nm-device-infiniband.obj: nm-device-infiniband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-infiniband.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-infiniband.Tpo -c -o NetworkManager-nm-device-infiniband.obj `if test -f 'nm-device-infiniband.c'; then $(CYGPATH_W) 'nm-device-infiniband.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-infiniband.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-infiniband.Tpo $(DEPDIR)/NetworkManager-nm-device-infiniband.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-infiniband.c' object='NetworkManager-nm-device-infiniband.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-infiniband.obj `if test -f 'nm-device-infiniband.c'; then $(CYGPATH_W) 'nm-device-infiniband.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-infiniband.c'; fi`
+
+NetworkManager-nm-device-bond.o: nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-bond.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-bond.Tpo -c -o NetworkManager-nm-device-bond.o `test -f 'nm-device-bond.c' || echo '$(srcdir)/'`nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-bond.Tpo $(DEPDIR)/NetworkManager-nm-device-bond.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-bond.c' object='NetworkManager-nm-device-bond.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-bond.o `test -f 'nm-device-bond.c' || echo '$(srcdir)/'`nm-device-bond.c
+
+NetworkManager-nm-device-bond.obj: nm-device-bond.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-bond.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-bond.Tpo -c -o NetworkManager-nm-device-bond.obj `if test -f 'nm-device-bond.c'; then $(CYGPATH_W) 'nm-device-bond.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-bond.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-bond.Tpo $(DEPDIR)/NetworkManager-nm-device-bond.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-bond.c' object='NetworkManager-nm-device-bond.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-bond.obj `if test -f 'nm-device-bond.c'; then $(CYGPATH_W) 'nm-device-bond.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-bond.c'; fi`
+
+NetworkManager-nm-device-vlan.o: nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-vlan.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-vlan.Tpo -c -o NetworkManager-nm-device-vlan.o `test -f 'nm-device-vlan.c' || echo '$(srcdir)/'`nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-vlan.Tpo $(DEPDIR)/NetworkManager-nm-device-vlan.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-vlan.c' object='NetworkManager-nm-device-vlan.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-vlan.o `test -f 'nm-device-vlan.c' || echo '$(srcdir)/'`nm-device-vlan.c
+
+NetworkManager-nm-device-vlan.obj: nm-device-vlan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-device-vlan.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-device-vlan.Tpo -c -o NetworkManager-nm-device-vlan.obj `if test -f 'nm-device-vlan.c'; then $(CYGPATH_W) 'nm-device-vlan.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-vlan.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-device-vlan.Tpo $(DEPDIR)/NetworkManager-nm-device-vlan.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-vlan.c' object='NetworkManager-nm-device-vlan.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-device-vlan.obj `if test -f 'nm-device-vlan.c'; then $(CYGPATH_W) 'nm-device-vlan.c'; else $(CYGPATH_W) '$(srcdir)/nm-device-vlan.c'; fi`
+
NetworkManager-nm-wifi-ap.o: nm-wifi-ap.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-wifi-ap.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-wifi-ap.Tpo -c -o NetworkManager-nm-wifi-ap.o `test -f 'nm-wifi-ap.c' || echo '$(srcdir)/'`nm-wifi-ap.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-wifi-ap.Tpo $(DEPDIR)/NetworkManager-nm-wifi-ap.Po
@@ -1443,22 +1498,6 @@ NetworkManager-nm-properties-changed-signal.obj: nm-properties-changed-signal.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-properties-changed-signal.obj `if test -f 'nm-properties-changed-signal.c'; then $(CYGPATH_W) 'nm-properties-changed-signal.c'; else $(CYGPATH_W) '$(srcdir)/nm-properties-changed-signal.c'; fi`
-NetworkManager-wpa.o: wpa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-wpa.o -MD -MP -MF $(DEPDIR)/NetworkManager-wpa.Tpo -c -o NetworkManager-wpa.o `test -f 'wpa.c' || echo '$(srcdir)/'`wpa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-wpa.Tpo $(DEPDIR)/NetworkManager-wpa.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wpa.c' object='NetworkManager-wpa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-wpa.o `test -f 'wpa.c' || echo '$(srcdir)/'`wpa.c
-
-NetworkManager-wpa.obj: wpa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-wpa.obj -MD -MP -MF $(DEPDIR)/NetworkManager-wpa.Tpo -c -o NetworkManager-wpa.obj `if test -f 'wpa.c'; then $(CYGPATH_W) 'wpa.c'; else $(CYGPATH_W) '$(srcdir)/wpa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-wpa.Tpo $(DEPDIR)/NetworkManager-wpa.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wpa.c' object='NetworkManager-wpa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-wpa.obj `if test -f 'wpa.c'; then $(CYGPATH_W) 'wpa.c'; else $(CYGPATH_W) '$(srcdir)/wpa.c'; fi`
-
NetworkManager-nm-dhcp4-config.o: nm-dhcp4-config.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-dhcp4-config.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-dhcp4-config.Tpo -c -o NetworkManager-nm-dhcp4-config.o `test -f 'nm-dhcp4-config.c' || echo '$(srcdir)/'`nm-dhcp4-config.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-dhcp4-config.Tpo $(DEPDIR)/NetworkManager-nm-dhcp4-config.Po
@@ -1491,21 +1530,85 @@ NetworkManager-nm-dhcp6-config.obj: nm-dhcp6-config.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-dhcp6-config.obj `if test -f 'nm-dhcp6-config.c'; then $(CYGPATH_W) 'nm-dhcp6-config.c'; else $(CYGPATH_W) '$(srcdir)/nm-dhcp6-config.c'; fi`
-NetworkManager-nm-session-monitor.o: nm-session-monitor.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor.Tpo -c -o NetworkManager-nm-session-monitor.o `test -f 'nm-session-monitor.c' || echo '$(srcdir)/'`nm-session-monitor.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor.Po
+NetworkManager-nm-session-utils.o: nm-session-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-utils.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-utils.Tpo -c -o NetworkManager-nm-session-utils.o `test -f 'nm-session-utils.c' || echo '$(srcdir)/'`nm-session-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-utils.Tpo $(DEPDIR)/NetworkManager-nm-session-utils.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-utils.c' object='NetworkManager-nm-session-utils.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-utils.o `test -f 'nm-session-utils.c' || echo '$(srcdir)/'`nm-session-utils.c
+
+NetworkManager-nm-session-utils.obj: nm-session-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-utils.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-utils.Tpo -c -o NetworkManager-nm-session-utils.obj `if test -f 'nm-session-utils.c'; then $(CYGPATH_W) 'nm-session-utils.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-utils.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-utils.Tpo $(DEPDIR)/NetworkManager-nm-session-utils.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-utils.c' object='NetworkManager-nm-session-utils.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-utils.obj `if test -f 'nm-session-utils.c'; then $(CYGPATH_W) 'nm-session-utils.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-utils.c'; fi`
+
+NetworkManager-nm-connectivity.o: nm-connectivity.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-connectivity.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-connectivity.Tpo -c -o NetworkManager-nm-connectivity.o `test -f 'nm-connectivity.c' || echo '$(srcdir)/'`nm-connectivity.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-connectivity.Tpo $(DEPDIR)/NetworkManager-nm-connectivity.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-connectivity.c' object='NetworkManager-nm-connectivity.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-connectivity.o `test -f 'nm-connectivity.c' || echo '$(srcdir)/'`nm-connectivity.c
+
+NetworkManager-nm-connectivity.obj: nm-connectivity.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-connectivity.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-connectivity.Tpo -c -o NetworkManager-nm-connectivity.obj `if test -f 'nm-connectivity.c'; then $(CYGPATH_W) 'nm-connectivity.c'; else $(CYGPATH_W) '$(srcdir)/nm-connectivity.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-connectivity.Tpo $(DEPDIR)/NetworkManager-nm-connectivity.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-connectivity.c' object='NetworkManager-nm-connectivity.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-connectivity.obj `if test -f 'nm-connectivity.c'; then $(CYGPATH_W) 'nm-connectivity.c'; else $(CYGPATH_W) '$(srcdir)/nm-connectivity.c'; fi`
+
+NetworkManager-nm-session-monitor-systemd.o: nm-session-monitor-systemd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor-systemd.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Tpo -c -o NetworkManager-nm-session-monitor-systemd.o `test -f 'nm-session-monitor-systemd.c' || echo '$(srcdir)/'`nm-session-monitor-systemd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor-systemd.c' object='NetworkManager-nm-session-monitor-systemd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor-systemd.o `test -f 'nm-session-monitor-systemd.c' || echo '$(srcdir)/'`nm-session-monitor-systemd.c
+
+NetworkManager-nm-session-monitor-systemd.obj: nm-session-monitor-systemd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor-systemd.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Tpo -c -o NetworkManager-nm-session-monitor-systemd.obj `if test -f 'nm-session-monitor-systemd.c'; then $(CYGPATH_W) 'nm-session-monitor-systemd.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor-systemd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor-systemd.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor-systemd.c' object='NetworkManager-nm-session-monitor-systemd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor-systemd.obj `if test -f 'nm-session-monitor-systemd.c'; then $(CYGPATH_W) 'nm-session-monitor-systemd.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor-systemd.c'; fi`
+
+NetworkManager-nm-session-monitor-ck.o: nm-session-monitor-ck.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor-ck.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor-ck.Tpo -c -o NetworkManager-nm-session-monitor-ck.o `test -f 'nm-session-monitor-ck.c' || echo '$(srcdir)/'`nm-session-monitor-ck.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor-ck.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor-ck.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor.c' object='NetworkManager-nm-session-monitor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor-ck.c' object='NetworkManager-nm-session-monitor-ck.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor.o `test -f 'nm-session-monitor.c' || echo '$(srcdir)/'`nm-session-monitor.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor-ck.o `test -f 'nm-session-monitor-ck.c' || echo '$(srcdir)/'`nm-session-monitor-ck.c
-NetworkManager-nm-session-monitor.obj: nm-session-monitor.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor.Tpo -c -o NetworkManager-nm-session-monitor.obj `if test -f 'nm-session-monitor.c'; then $(CYGPATH_W) 'nm-session-monitor.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor.Po
+NetworkManager-nm-session-monitor-ck.obj: nm-session-monitor-ck.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor-ck.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor-ck.Tpo -c -o NetworkManager-nm-session-monitor-ck.obj `if test -f 'nm-session-monitor-ck.c'; then $(CYGPATH_W) 'nm-session-monitor-ck.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor-ck.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor-ck.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor-ck.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor.c' object='NetworkManager-nm-session-monitor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor-ck.c' object='NetworkManager-nm-session-monitor-ck.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor.obj `if test -f 'nm-session-monitor.c'; then $(CYGPATH_W) 'nm-session-monitor.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor-ck.obj `if test -f 'nm-session-monitor-ck.c'; then $(CYGPATH_W) 'nm-session-monitor-ck.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor-ck.c'; fi`
+
+NetworkManager-nm-session-monitor-null.o: nm-session-monitor-null.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor-null.o -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor-null.Tpo -c -o NetworkManager-nm-session-monitor-null.o `test -f 'nm-session-monitor-null.c' || echo '$(srcdir)/'`nm-session-monitor-null.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor-null.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor-null.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor-null.c' object='NetworkManager-nm-session-monitor-null.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor-null.o `test -f 'nm-session-monitor-null.c' || echo '$(srcdir)/'`nm-session-monitor-null.c
+
+NetworkManager-nm-session-monitor-null.obj: nm-session-monitor-null.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT NetworkManager-nm-session-monitor-null.obj -MD -MP -MF $(DEPDIR)/NetworkManager-nm-session-monitor-null.Tpo -c -o NetworkManager-nm-session-monitor-null.obj `if test -f 'nm-session-monitor-null.c'; then $(CYGPATH_W) 'nm-session-monitor-null.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor-null.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NetworkManager-nm-session-monitor-null.Tpo $(DEPDIR)/NetworkManager-nm-session-monitor-null.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-session-monitor-null.c' object='NetworkManager-nm-session-monitor-null.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-session-monitor-null.obj `if test -f 'nm-session-monitor-null.c'; then $(CYGPATH_W) 'nm-session-monitor-null.c'; else $(CYGPATH_W) '$(srcdir)/nm-session-monitor-null.c'; fi`
nm_crash_logger-nm-crash-logger.o: nm-crash-logger.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_crash_logger_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_crash_logger-nm-crash-logger.o -MD -MP -MF $(DEPDIR)/nm_crash_logger-nm-crash-logger.Tpo -c -o nm_crash_logger-nm-crash-logger.o `test -f 'nm-crash-logger.c' || echo '$(srcdir)/'`nm-crash-logger.c
@@ -1909,6 +2012,9 @@ nm-device-interface-glue.h: $(top_srcdir)/introspection/nm-device.xml
nm-device-ethernet-glue.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-server --output=$@ $<
+nm-device-infiniband-glue.h: $(top_srcdir)/introspection/nm-device-infiniband.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_infiniband --mode=glib-server --output=$@ $<
+
nm-device-wifi-glue.h: $(top_srcdir)/introspection/nm-device-wifi.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_wifi --mode=glib-server --output=$@ $<
@@ -1918,6 +2024,12 @@ nm-device-bt-glue.h: $(top_srcdir)/introspection/nm-device-bt.xml
nm-device-olpc-mesh-glue.h: $(top_srcdir)/introspection/nm-device-olpc-mesh.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_olpc_mesh --mode=glib-server --output=$@ $<
+nm-device-bond-glue.h: $(top_srcdir)/introspection/nm-device-bond.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_bond --mode=glib-server --output=$@ $<
+
+nm-device-vlan-glue.h: $(top_srcdir)/introspection/nm-device-vlan.xml
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_vlan --mode=glib-server --output=$@ $<
+
nm-ip4-config-glue.h: $(top_srcdir)/introspection/nm-ip4-config.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_ip4_config --mode=glib-server --output=$@ $<
@@ -1935,6 +2047,7 @@ nm-dhcp6-config-glue.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml
nm-device-modem-glue.h: $(top_srcdir)/introspection/nm-device-modem.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_device_modem --mode=glib-server --output=$@ $<
+ -DARP_DEBUG
install-data-hook:
$(mkinstalldirs) -m 0700 $(DESTDIR)$(rundir)
$(mkinstalldirs) -m 0700 $(DESTDIR)$(statedir)
diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
index 451de6d00..6c2c0446b 100644
--- a/src/NetworkManagerUtils.c
+++ b/src/NetworkManagerUtils.c
@@ -32,8 +32,6 @@
#include "nm-utils.h"
#include "nm-logging.h"
#include "nm-device.h"
-#include "nm-device-wifi.h"
-#include "nm-device-ethernet.h"
#include "nm-dbus-manager.h"
#include "nm-dispatcher-action.h"
#include "nm-dbus-glib-types.h"
@@ -159,22 +157,11 @@ nm_utils_ip4_prefix_to_netmask (guint32 prefix)
return (guint32) htonl (netmask);
}
-char *
-nm_ether_ntop (const struct ether_addr *mac)
-{
- /* we like leading zeros and all-caps, instead
- * of what glibc's ether_ntop() gives us
- */
- return g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
- mac->ether_addr_octet[0], mac->ether_addr_octet[1],
- mac->ether_addr_octet[2], mac->ether_addr_octet[3],
- mac->ether_addr_octet[4], mac->ether_addr_octet[5]);
-}
-
void
nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting)
{
int i, j;
+ gboolean setting_never_default;
if (!setting)
return; /* Defaults are just fine */
@@ -264,8 +251,14 @@ nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting)
nm_ip4_config_add_route (ip4_config, setting_route);
}
- if (nm_setting_ip4_config_get_never_default (setting))
- nm_ip4_config_set_never_default (ip4_config, TRUE);
+ setting_never_default = nm_setting_ip4_config_get_never_default (setting);
+
+ if (nm_setting_ip4_config_get_ignore_auto_routes (setting))
+ nm_ip4_config_set_never_default (ip4_config, setting_never_default);
+ else {
+ if (setting_never_default)
+ nm_ip4_config_set_never_default (ip4_config, TRUE);
+ }
}
static inline gboolean
@@ -862,7 +855,7 @@ nm_utils_do_sysctl (const char *path, const char *value)
gboolean
nm_utils_get_proc_sys_net_value (const char *path,
const char *iface,
- guint32 *out_value)
+ gint32 *out_value)
{
GError *error = NULL;
char *contents = NULL;
@@ -878,8 +871,8 @@ nm_utils_get_proc_sys_net_value (const char *path,
} else {
errno = 0;
tmp = strtol (contents, NULL, 10);
- if ((errno == 0) && (tmp == 0 || tmp == 1)) {
- *out_value = (guint32) tmp;
+ if (errno == 0) {
+ *out_value = (gint32) tmp;
success = TRUE;
}
g_free (contents);
@@ -888,6 +881,28 @@ nm_utils_get_proc_sys_net_value (const char *path,
return success;
}
+gboolean
+nm_utils_get_proc_sys_net_value_with_bounds (const char *path,
+ const char *iface,
+ gint32 *out_value,
+ gint32 valid_min,
+ gint32 valid_max)
+{
+ gboolean result;
+ gint32 val;
+
+ result = nm_utils_get_proc_sys_net_value (path, iface, &val);
+
+ if (result) {
+ if (val >= valid_min && val <= valid_max)
+ *out_value = val;
+ else
+ result = FALSE;
+ }
+
+ return result;
+}
+
static char *
get_new_connection_name (const GSList *existing,
const char *format,
@@ -955,7 +970,7 @@ nm_utils_complete_generic (NMConnection *connection,
const char *method;
char *id, *uuid;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (!s_con) {
s_con = (NMSettingConnection *) nm_setting_connection_new ();
nm_connection_add_setting (connection, NM_SETTING (s_con));
@@ -976,7 +991,7 @@ nm_utils_complete_generic (NMConnection *connection,
}
/* Add an 'auto' IPv4 connection if present */
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (!s_ip4) {
s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
nm_connection_add_setting (connection, NM_SETTING (s_ip4));
@@ -989,7 +1004,7 @@ nm_utils_complete_generic (NMConnection *connection,
}
/* Add an 'auto' IPv6 setting if allowed and not preset */
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (!s_ip6 && default_enable_ipv6) {
s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
nm_connection_add_setting (connection, NM_SETTING (s_ip6));
@@ -1002,3 +1017,26 @@ nm_utils_complete_generic (NMConnection *connection,
}
}
+gboolean
+nm_utils_is_uuid (const char *str)
+{
+ const char *p = str;
+ int num_dashes = 0;
+
+ while (*p) {
+ if (*p == '-')
+ num_dashes++;
+ else if (!isxdigit (*p))
+ return FALSE;
+ p++;
+ }
+
+ return (num_dashes == 4) && (p - str == 36);
+}
+
+char *
+nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id)
+{
+ return g_strdup_printf ("%s.%d", parent_iface, vlan_id);
+}
+
diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h
index 1bf741ed3..2474f6548 100644
--- a/src/NetworkManagerUtils.h
+++ b/src/NetworkManagerUtils.h
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2004 - 2010 Red Hat, Inc.
+ * Copyright (C) 2004 - 2011 Red Hat, Inc.
* Copyright (C) 2005 - 2008 Novell, Inc.
*/
@@ -37,8 +37,6 @@ gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
int nm_spawn_process (const char *args);
-char *nm_ether_ntop (const struct ether_addr *mac);
-
void nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting);
void nm_utils_merge_ip6_config (NMIP6Config *ip6_config, NMSettingIP6Config *setting);
@@ -85,7 +83,13 @@ gboolean nm_utils_do_sysctl (const char *path, const char *value);
gboolean nm_utils_get_proc_sys_net_value (const char *path,
const char *iface,
- guint32 *out_value);
+ gint32 *out_value);
+
+gboolean nm_utils_get_proc_sys_net_value_with_bounds (const char *path,
+ const char *iface,
+ gint32 *out_value,
+ gint32 valid_min,
+ gint32 valid_max);
void nm_utils_complete_generic (NMConnection *connection,
const char *ctype,
@@ -94,4 +98,8 @@ void nm_utils_complete_generic (NMConnection *connection,
const char *preferred,
gboolean default_enable_ipv6);
+gboolean nm_utils_is_uuid (const char *str);
+
+char *nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id);
+
#endif /* NETWORK_MANAGER_UTILS_H */
diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am
index c0780d0b5..11a154a0d 100644
--- a/src/backends/Makefile.am
+++ b/src/backends/Makefile.am
@@ -2,13 +2,16 @@ INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/src \
-I${top_srcdir}/libnm-util
noinst_LTLIBRARIES = libnmbackend.la
-libnmbackend_la_SOURCES = NetworkManagerGeneric.c \
- NetworkManagerGeneric.h
+libnmbackend_la_SOURCES = \
+ NetworkManagerGeneric.c \
+ NetworkManagerGeneric.h \
+ nm-backend.h
libnmbackend_la_LIBADD =
diff --git a/src/backends/Makefile.in b/src/backends/Makefile.in
index 87d3df4ec..9c6f7d0cc 100644
--- a/src/backends/Makefile.in
+++ b/src/backends/Makefile.in
@@ -74,7 +74,7 @@ libnmbackend_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am__libnmbackend_la_SOURCES_DIST = NetworkManagerGeneric.c \
- NetworkManagerGeneric.h NetworkManagerRedHat.c \
+ NetworkManagerGeneric.h nm-backend.h NetworkManagerRedHat.c \
NetworkManagerSuSE.c NetworkManagerGentoo.c \
NetworkManagerDebian.c NetworkManagerSlackware.c \
NetworkManagerArch.c NetworkManagerPaldo.c \
@@ -187,6 +187,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -241,11 +243,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -256,6 +262,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -295,6 +302,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -362,16 +371,17 @@ INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/src \
-I${top_srcdir}/libnm-util
noinst_LTLIBRARIES = libnmbackend.la
libnmbackend_la_SOURCES = NetworkManagerGeneric.c \
- NetworkManagerGeneric.h $(am__append_1) $(am__append_2) \
- $(am__append_3) $(am__append_4) $(am__append_5) \
- $(am__append_6) $(am__append_7) $(am__append_8) \
- $(am__append_10) $(am__append_11) $(am__append_12) \
- $(am__append_13)
+ NetworkManagerGeneric.h nm-backend.h $(am__append_1) \
+ $(am__append_2) $(am__append_3) $(am__append_4) \
+ $(am__append_5) $(am__append_6) $(am__append_7) \
+ $(am__append_8) $(am__append_10) $(am__append_11) \
+ $(am__append_12) $(am__append_13)
libnmbackend_la_LIBADD = $(am__append_9) \
$(top_builddir)/src/logging/libnm-logging.la $(LIBNL_LIBS) \
$(DBUS_LIBS) $(GLIB_LIBS)
diff --git a/src/backends/NetworkManagerArch.c b/src/backends/NetworkManagerArch.c
index c70e24593..7e25ee37a 100644
--- a/src/backends/NetworkManagerArch.c
+++ b/src/backends/NetworkManagerArch.c
@@ -28,43 +28,33 @@
*
* (C) Copyright 2004 Tom Parker
* (C) Copyright 2004 Matthew Garrett
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
- /* Check if the daemon was already running - do not start a new instance */
+ /* Make glibc/nscd aware of any changes to the resolv.conf file by
+ * restarting nscd; check if the daemon was already running - do not
+ * start a new instance
+ */
if (g_file_test("/var/run/daemons/nscd", G_FILE_TEST_EXISTS))
nm_spawn_process ("/etc/rc.d/nscd restart");
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c
index 37eb6457b..ed29dd3a0 100644
--- a/src/backends/NetworkManagerDebian.c
+++ b/src/backends/NetworkManagerDebian.c
@@ -21,29 +21,18 @@
*
* (C) Copyright 2004 Tom Parker
* (C) Copyright 2004 Matthew Garrett
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
/* ifupdown isn't always installed (bgo #625427) */
if (g_file_test ("/sbin/ifup", G_FILE_TEST_EXISTS))
@@ -52,18 +41,17 @@ void nm_system_enable_loopback (void)
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
+ /* Invalidate the nscd host cache since we changed resolv.conf */
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerExherbo.c b/src/backends/NetworkManagerExherbo.c
index d7e24cf60..d02778969 100644
--- a/src/backends/NetworkManagerExherbo.c
+++ b/src/backends/NetworkManagerExherbo.c
@@ -18,7 +18,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
* (C) Copyright 2004 Dan Willemsen
* (C) Copyright 2004 Robert Paskowitz
*/
@@ -27,38 +27,28 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd. Only restart if already running.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
+ /* Make glibc/nscd aware of any changes to the resolv.conf file by
+ * restarting nscd. Only restart if already running.
+ */
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerFrugalware.c b/src/backends/NetworkManagerFrugalware.c
index dfe62921c..301751e90 100644
--- a/src/backends/NetworkManagerFrugalware.c
+++ b/src/backends/NetworkManagerFrugalware.c
@@ -23,36 +23,21 @@
* (C) Copyright 2006 Alex Smith
*/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "nm-system.h"
-
/* Provided by the frugalwareutils package on Frugalware */
#include <libfwnetconfig.h>
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
fwnet_loup ();
}
-
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
/* I'm not running nscd */
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerGeneric.c b/src/backends/NetworkManagerGeneric.c
index 89b8a46dd..eae6f733d 100644
--- a/src/backends/NetworkManagerGeneric.c
+++ b/src/backends/NetworkManagerGeneric.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 - 2010 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
* (C) Copyright 2006 Timothee Lecomte <timothee.lecomte@ens.fr>
*/
@@ -113,3 +113,65 @@ void nm_generic_update_dns (void)
{
}
+/*
+ * nm_generic_ipv6_use_tempaddr
+ *
+ * Get net.ipv6.conf.default.use_tempaddr value from /etc/sysctl.conf or
+ * /lib/sysctl.d/sysctl.conf
+ *
+ */
+int nm_generic_ipv6_use_tempaddr (void)
+{
+ char *contents = NULL;
+ gsize len = 0;
+ const char *group_name = "[forged_group]\n";
+ char *sysctl_data = NULL;
+ GKeyFile *keyfile;
+ GError *error = NULL;
+ int tmp, ret = -1;
+
+ /* Read file contents to a string. */
+ if (!g_file_get_contents ("/etc/sysctl.conf", &contents, &len, NULL))
+ if (!g_file_get_contents ("/lib/sysctl.d/sysctl.conf", &contents, &len, NULL))
+ return -1;
+
+ /* Prepend a group so that we can use GKeyFile parser. */
+ sysctl_data = g_strdup_printf ("%s%s", group_name, contents);
+
+ keyfile = g_key_file_new ();
+ if (keyfile == NULL)
+ goto done;
+
+ if (!g_key_file_load_from_data (keyfile, sysctl_data, len + strlen (group_name), G_KEY_FILE_NONE, NULL))
+ goto done;
+
+ tmp = g_key_file_get_integer (keyfile, "forged_group", "net.ipv6.conf.default.use_tempaddr", &error);
+ if (error == NULL)
+ ret = tmp;
+
+done:
+ g_free (contents);
+ g_free (sysctl_data);
+ g_clear_error (&error);
+ g_key_file_free (keyfile);
+
+ return ret;
+}
+
+#ifdef TARGET_GENERIC
+void nm_backend_enable_loopback (void)
+{
+ nm_generic_enable_loopback ();
+}
+
+void nm_backend_update_dns (void)
+{
+ nm_generic_update_dns ();
+}
+
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+#endif
+
diff --git a/src/backends/NetworkManagerGeneric.h b/src/backends/NetworkManagerGeneric.h
index 0a0a88a21..3d4017e45 100644
--- a/src/backends/NetworkManagerGeneric.h
+++ b/src/backends/NetworkManagerGeneric.h
@@ -18,13 +18,16 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
*/
-#ifndef NETWORK_MANAGER_GENERIC_H
-#define NETWORK_MANAGER_GENERIC_H
+#ifndef NM_GENERIC_H
+#define NM_GENERIC_H
-void nm_generic_enable_loopback (void);
-void nm_generic_update_dns (void);
+#include "nm-backend.h"
-#endif
+void nm_generic_enable_loopback (void);
+void nm_generic_update_dns (void);
+int nm_generic_ipv6_use_tempaddr (void);
+
+#endif /* NM_GENERIC_H */
diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c
index e5b09384e..7370645a4 100644
--- a/src/backends/NetworkManagerGentoo.c
+++ b/src/backends/NetworkManagerGentoo.c
@@ -18,7 +18,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
* (C) Copyright 2004 Dan Willemsen
* (C) Copyright 2004 Robert Paskowitz
*/
@@ -27,18 +27,12 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <gio/gio.h>
+#include <glib.h>
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-#define BUFFER_SIZE 512
-
static void openrc_start_lo_if_necessary()
{
/* No need to run net.lo if it is already running */
@@ -46,18 +40,11 @@ static void openrc_start_lo_if_necessary()
nm_spawn_process ("/etc/init.d/net.lo start");
}
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
gchar *comm;
- /* If anything goes wrong trying to open /proc/1/comm, we will assume
- OpenRC. */
+ /* If anything goes wrong trying to open /proc/1/comm, we will assume OpenRC */
if (!g_file_get_contents ("/proc/1/comm", &comm, NULL, NULL)) {
nm_log_info (LOGD_CORE, "NetworkManager is running with OpenRC...");
openrc_start_lo_if_necessary ();
@@ -77,18 +64,19 @@ void nm_system_enable_loopback (void)
g_free (comm);
}
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd. Only restart if already running.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
+ /* Make glibc/nscd aware of any changes to the resolv.conf file by
+ * restarting nscd. Only restart if already running.
+ */
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerLinexa.c b/src/backends/NetworkManagerLinexa.c
index 015aa17c6..34fed3bbb 100644
--- a/src/backends/NetworkManagerLinexa.c
+++ b/src/backends/NetworkManagerLinexa.c
@@ -21,46 +21,33 @@
*
* (C) Copyright 2004 Tom Parker
* (C) Copyright 2004 Matthew Garrett
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
+ /* Invalidate the nscd host cache, if it exists, since we changed resolv.conf */
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
diff --git a/src/backends/NetworkManagerMandriva.c b/src/backends/NetworkManagerMandriva.c
index 8209ff4fe..f059beb65 100644
--- a/src/backends/NetworkManagerMandriva.c
+++ b/src/backends/NetworkManagerMandriva.c
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
* (C) Copyright 2008 Per Øyvind Karlsen
*/
@@ -25,37 +25,25 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
+ /* Invalidate the nscd host cache, if it exists, since we changed resolv.conf */
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE | G_FILE_TEST_IS_REGULAR)) {
nm_spawn_process ("/etc/init.d/nscd condrestart");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerPaldo.c b/src/backends/NetworkManagerPaldo.c
index 0c67e5bdf..2d01d8577 100644
--- a/src/backends/NetworkManagerPaldo.c
+++ b/src/backends/NetworkManagerPaldo.c
@@ -18,7 +18,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
* (C) Copyright 2006 Jürg Billeter
*/
@@ -26,36 +26,26 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
+{
+ /* Invalidate the nscd host cache, if it exists, since we changed resolv.conf */
+ if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
+ nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
+ nm_spawn_process ("/usr/sbin/nscd -i hosts");
+ }
+}
+
+int nm_backend_ipv6_use_tempaddr (void)
{
- nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
- nm_spawn_process ("/usr/sbin/nscd -i hosts");
+ return nm_generic_ipv6_use_tempaddr ();
}
diff --git a/src/backends/NetworkManagerPardus.c b/src/backends/NetworkManagerPardus.c
index d952cf365..acfeaed38 100644
--- a/src/backends/NetworkManagerPardus.c
+++ b/src/backends/NetworkManagerPardus.c
@@ -16,7 +16,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 RedHat, Inc.
+ * (C) Copyright 2004 - 2012 RedHat, Inc.
* (C) Copyright 2009 TUBITAK/UEKAE
*/
@@ -24,34 +24,19 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
+void nm_backend_update_dns (void)
+{
+}
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd.
- *
- */
-void nm_system_update_dns (void)
+int nm_backend_ipv6_use_tempaddr (void)
{
- /* I'm not running nscd */
+ return nm_generic_ipv6_use_tempaddr ();
}
diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c
index 954e58a86..c14eb837a 100644
--- a/src/backends/NetworkManagerRedHat.c
+++ b/src/backends/NetworkManagerRedHat.c
@@ -16,44 +16,32 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
{
+ /* Invalidate the nscd host cache since we changed resolv.conf */
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE | G_FILE_TEST_IS_REGULAR)) {
nm_spawn_process ("/etc/init.d/nscd condrestart");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}
+int nm_backend_ipv6_use_tempaddr (void)
+{
+ return nm_generic_ipv6_use_tempaddr ();
+}
+
diff --git a/src/backends/NetworkManagerSlackware.c b/src/backends/NetworkManagerSlackware.c
index a35e1bb62..cdd2dfb07 100644
--- a/src/backends/NetworkManagerSlackware.c
+++ b/src/backends/NetworkManagerSlackware.c
@@ -16,7 +16,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 RedHat, Inc.
+ * (C) Copyright 2004 - 2012 RedHat, Inc.
* (C) Copyright 2004 Narayan Newton
*/
@@ -24,34 +24,19 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
+void nm_backend_update_dns (void)
+{
+}
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd.
- *
- */
-void nm_system_update_dns (void)
+int nm_backend_ipv6_use_tempaddr (void)
{
- /* I'm not running nscd */
+ return nm_generic_ipv6_use_tempaddr ();
}
diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c
index 6c8ec1a5d..126185320 100644
--- a/src/backends/NetworkManagerSuSE.c
+++ b/src/backends/NetworkManagerSuSE.c
@@ -19,7 +19,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2004 Red Hat, Inc.
+ * (C) Copyright 2004 - 2012 Red Hat, Inc.
* (C) Copyright 2005-2006 SuSE GmbH
*/
@@ -27,36 +27,26 @@
#include <config.h>
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "NetworkManagerGeneric.h"
-#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
+void nm_backend_enable_loopback (void)
{
nm_generic_enable_loopback ();
}
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
+void nm_backend_update_dns (void)
+{
+ /* Invalidate the nscd host cache, if it exists, since we changed resolv.conf */
+ if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
+ nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
+ nm_spawn_process ("/usr/sbin/nscd -i hosts");
+ }
+}
+
+int nm_backend_ipv6_use_tempaddr (void)
{
- nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
- nm_spawn_process ("/usr/sbin/nscd -i hosts");
+ return nm_generic_ipv6_use_tempaddr ();
}
diff --git a/include/wireless-helper.h b/src/backends/nm-backend.h
index 2e4509a86..17d1ff649 100644
--- a/include/wireless-helper.h
+++ b/src/backends/nm-backend.h
@@ -1,7 +1,6 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
- * Dan Williams <dcbw@redhat.com>
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -16,17 +15,16 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2008 Red Hat, Inc.
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
*/
-/* Hacks necessary to #include wireless.h; yay for WEXT */
+#ifndef NM_BACKEND_H
+#define NM_BACKEND_H
+
+/* Random disto-specific stuff */
-#ifndef __user
-#define __user
-#endif
-#include <sys/types.h>
-#include <linux/types.h>
-#include <sys/socket.h>
-#include <linux/if.h>
-#include <wireless.h>
+void nm_backend_enable_loopback (void);
+void nm_backend_update_dns (void);
+int nm_backend_ipv6_use_tempaddr (void);
+#endif /* NM_BACKEND_H */
diff --git a/src/bluez-manager/Makefile.am b/src/bluez-manager/Makefile.am
index 623c1060b..10b32d255 100644
--- a/src/bluez-manager/Makefile.am
+++ b/src/bluez-manager/Makefile.am
@@ -1,10 +1,13 @@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src \
- -I${top_srcdir}/src/logging \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
+ -I${top_srcdir}/src/logging
noinst_LTLIBRARIES = libbluez-manager.la
@@ -29,7 +32,7 @@ libbluez_manager_la_CPPFLAGS = \
-DLOCALSTATEDIR=\"$(localstatedir)\"
libbluez_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
diff --git a/src/bluez-manager/Makefile.in b/src/bluez-manager/Makefile.in
index 9eb31c800..efb5ab4e3 100644
--- a/src/bluez-manager/Makefile.in
+++ b/src/bluez-manager/Makefile.in
@@ -57,7 +57,7 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libbluez_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libbluez_manager_la_OBJECTS = \
@@ -144,6 +144,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -198,11 +200,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -213,6 +219,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -252,6 +259,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -318,10 +327,13 @@ top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src \
- -I${top_srcdir}/src/logging \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
+ -I${top_srcdir}/src/logging
noinst_LTLIBRARIES = libbluez-manager.la
libbluez_manager_la_SOURCES = \
@@ -345,7 +357,7 @@ libbluez_manager_la_CPPFLAGS = \
-DLOCALSTATEDIR=\"$(localstatedir)\"
libbluez_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
diff --git a/src/bluez-manager/nm-bluez-manager.c b/src/bluez-manager/nm-bluez-manager.c
index 5381151ea..942d0f342 100644
--- a/src/bluez-manager/nm-bluez-manager.c
+++ b/src/bluez-manager/nm-bluez-manager.c
@@ -181,8 +181,11 @@ default_adapter_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
if (!dbus_g_proxy_end_call (proxy, call, &err,
DBUS_TYPE_G_OBJECT_PATH, &default_adapter,
G_TYPE_INVALID)) {
- nm_log_warn (LOGD_BT, "bluez error getting default adapter: %s",
- err && err->message ? err->message : "(unknown)");
+ /* Ignore "No such adapter" errors; just means bluetooth isn't active */
+ if (!dbus_g_error_has_name (err, "org.bluez.Error.NoSuchAdapter")) {
+ nm_log_warn (LOGD_BT, "bluez error getting default adapter: %s",
+ err && err->message ? err->message : "(unknown)");
+ }
g_error_free (err);
return;
}
diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am
index 14ddde0bd..ce34c4166 100644
--- a/src/dhcp-manager/Makefile.am
+++ b/src/dhcp-manager/Makefile.am
@@ -3,9 +3,12 @@ SUBDIRS=. tests
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
- -I${top_builddir}/marshallers \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src
noinst_LTLIBRARIES = libdhcp-manager.la libdhcp-dhclient.la
@@ -29,7 +32,6 @@ libdhcp_dhclient_la_CPPFLAGS = \
-DDHCLIENT_V$(DHCLIENT_VERSION)
libdhcp_dhclient_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(DBUS_LIBS) \
@@ -55,7 +57,6 @@ libdhcp_manager_la_CPPFLAGS = \
-DDHCPCD_PATH=\"$(DHCPCD_PATH)\"
libdhcp_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(builddir)/libdhcp-dhclient.la \
$(DBUS_LIBS) \
diff --git a/src/dhcp-manager/Makefile.in b/src/dhcp-manager/Makefile.in
index 2d90f0436..4c3895629 100644
--- a/src/dhcp-manager/Makefile.in
+++ b/src/dhcp-manager/Makefile.in
@@ -57,7 +57,6 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libdhcp_dhclient_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
@@ -69,7 +68,6 @@ AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
libdhcp_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(builddir)/libdhcp-dhclient.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
@@ -192,6 +190,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -246,11 +246,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -261,6 +265,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -300,6 +305,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -367,9 +374,12 @@ SUBDIRS = . tests
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
- -I${top_builddir}/marshallers \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src
noinst_LTLIBRARIES = libdhcp-manager.la libdhcp-dhclient.la
@@ -392,7 +402,6 @@ libdhcp_dhclient_la_CPPFLAGS = \
-DDHCLIENT_V$(DHCLIENT_VERSION)
libdhcp_dhclient_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(DBUS_LIBS) \
@@ -418,7 +427,6 @@ libdhcp_manager_la_CPPFLAGS = \
-DDHCPCD_PATH=\"$(DHCPCD_PATH)\"
libdhcp_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(builddir)/libdhcp-dhclient.la \
$(DBUS_LIBS) \
diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.c b/src/dhcp-manager/nm-dhcp-dhclient-utils.c
index caf90f116..ab49a7651 100644
--- a/src/dhcp-manager/nm-dhcp-dhclient-utils.c
+++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.c
@@ -78,8 +78,8 @@ nm_dhcp_dhclient_create_config (const char *interface,
/* Override config file "dhcp-client-id" and use one from the
* connection.
*/
- if ( s_ip4
- && nm_setting_ip4_config_get_dhcp_client_id (s_ip4)
+ if ( s_ip4
+ && nm_setting_ip4_config_get_dhcp_client_id (s_ip4)
&& !strncmp (p, CLIENTID_TAG, strlen (CLIENTID_TAG)))
continue;
diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c
index e65f6935e..1af1b1630 100644
--- a/src/dhcp-manager/nm-dhcp-manager.c
+++ b/src/dhcp-manager/nm-dhcp-manager.c
@@ -44,8 +44,6 @@
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
GQuark
nm_dhcp_manager_error_quark (void)
{
@@ -57,22 +55,6 @@ nm_dhcp_manager_error_quark (void)
return ret;
}
-GType
-nm_dhcp_manager_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_DHCP_MANAGER_ERROR_BAD_CLIENT, "BadClient"),
- ENUM_ENTRY (NM_DHCP_MANAGER_ERROR_INTERNAL, "InternalError"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMDhcpManagerError", values);
- }
- return etype;
-}
-
#define NM_DHCP_CLIENT_DBUS_SERVICE "org.freedesktop.nm_dhcp_client"
#define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
diff --git a/src/dhcp-manager/nm-dhcp-manager.h b/src/dhcp-manager/nm-dhcp-manager.h
index 9d83d0960..d585c1425 100644
--- a/src/dhcp-manager/nm-dhcp-manager.h
+++ b/src/dhcp-manager/nm-dhcp-manager.h
@@ -33,16 +33,14 @@
#include "nm-dhcp4-config.h"
#include "nm-hostname-provider.h"
-enum {
- NM_DHCP_MANAGER_ERROR_BAD_CLIENT = 0,
- NM_DHCP_MANAGER_ERROR_INTERNAL = 1,
-};
+typedef enum {
+ NM_DHCP_MANAGER_ERROR_BAD_CLIENT = 0, /*< nick=BadClient >*/
+ NM_DHCP_MANAGER_ERROR_INTERNAL = 1, /*< nick=InternalError >*/
+} NMDHCPManagerError;
#define NM_DHCP_MANAGER_ERROR (nm_dhcp_manager_error_quark ())
-#define NN_TYPE_DHCP_MANAGER_ERROR (nm_dhcp_manager_error_get_type ())
GQuark nm_dhcp_manager_error_quark (void);
-GType nm_dhcp_manager_error_get_type (void);
#define NM_TYPE_DHCP_MANAGER (nm_dhcp_manager_get_type ())
diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am
index b075fd683..1feade869 100644
--- a/src/dhcp-manager/tests/Makefile.am
+++ b/src/dhcp-manager/tests/Makefile.am
@@ -1,6 +1,8 @@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I$(top_srcdir)/src/dhcp-manager
noinst_PROGRAMS = test-dhcp-dhclient
diff --git a/src/dhcp-manager/tests/Makefile.in b/src/dhcp-manager/tests/Makefile.in
index 5c4c23a52..20422cdb6 100644
--- a/src/dhcp-manager/tests/Makefile.in
+++ b/src/dhcp-manager/tests/Makefile.in
@@ -142,6 +142,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -196,11 +198,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -211,6 +217,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -250,6 +257,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -315,7 +324,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I$(top_srcdir)/src/dhcp-manager
diff --git a/src/dns-manager/Makefile.am b/src/dns-manager/Makefile.am
index b51f667bd..331f85c48 100644
--- a/src/dns-manager/Makefile.am
+++ b/src/dns-manager/Makefile.am
@@ -1,8 +1,10 @@
INCLUDES = \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include
noinst_LTLIBRARIES = libdns-manager.la
diff --git a/src/dns-manager/Makefile.in b/src/dns-manager/Makefile.in
index 571f585b6..c9b8b0b3a 100644
--- a/src/dns-manager/Makefile.in
+++ b/src/dns-manager/Makefile.in
@@ -145,6 +145,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -199,11 +201,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -214,6 +220,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -253,6 +260,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -319,8 +328,10 @@ top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include
noinst_LTLIBRARIES = libdns-manager.la
libdns_manager_la_SOURCES = \
diff --git a/src/dns-manager/nm-dns-bind.c b/src/dns-manager/nm-dns-bind.c
index 55fce030c..1a3243be8 100644
--- a/src/dns-manager/nm-dns-bind.c
+++ b/src/dns-manager/nm-dns-bind.c
@@ -413,7 +413,7 @@ update (NMDnsPlugin *plugin,
g_clear_error (&error);
goto out;
}
- ignored = chmod (CONFFILE, 0600);
+ ignored = chmod (CONFFILE, 0644);
nm_log_dbg (LOGD_DNS, "BIND local caching DNS configuration:");
nm_log_dbg (LOGD_DNS, "%s", conf->str);
diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c
index a602c54fa..8e216f4d2 100644
--- a/src/dns-manager/nm-dns-dnsmasq.c
+++ b/src/dns-manager/nm-dns-dnsmasq.c
@@ -294,7 +294,7 @@ update (NMDnsPlugin *plugin,
g_clear_error (&error);
goto out;
}
- ignored = chmod (CONFFILE, 0600);
+ ignored = chmod (CONFFILE, 0644);
nm_log_dbg (LOGD_DNS, "dnsmasq local caching DNS configuration:");
nm_log_dbg (LOGD_DNS, "%s", conf->str);
@@ -302,13 +302,14 @@ update (NMDnsPlugin *plugin,
argv[0] = find_dnsmasq ();
argv[1] = "--no-resolv"; /* Use only commandline */
argv[2] = "--keep-in-foreground";
- argv[3] = "--strict-order";
+ argv[3] = "--no-hosts"; /* don't use /etc/hosts to resolve */
argv[4] = "--bind-interfaces";
argv[5] = "--pid-file=" PIDFILE;
argv[6] = "--listen-address=127.0.0.1"; /* Should work for both 4 and 6 */
argv[7] = "--conf-file=" CONFFILE;
argv[8] = "--cache-size=400";
- argv[9] = NULL;
+ argv[9] = "--proxy-dnssec"; /* Allow DNSSEC to pass through */
+ argv[10] = NULL;
/* And finally spawn dnsmasq */
pid = nm_dns_plugin_child_spawn (NM_DNS_PLUGIN (self), argv, PIDFILE, "bin/dnsmasq");
diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
index ddfd47c84..6272e3748 100644
--- a/src/dns-manager/nm-dns-manager.c
+++ b/src/dns-manager/nm-dns-manager.c
@@ -40,7 +40,7 @@
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-logging.h"
-#include "nm-system.h"
+#include "backends/nm-backend.h"
#include "NetworkManagerUtils.h"
#include "nm-dns-plugin.h"
@@ -752,7 +752,7 @@ update_dns (NMDnsManager *self,
success = update_resolv_conf (domain, searches, nameservers, iface, error);
if (success)
- nm_system_update_dns ();
+ nm_backend_update_dns ();
if (searches)
g_strfreev (searches);
diff --git a/src/dnsmasq-manager/Makefile.in b/src/dnsmasq-manager/Makefile.in
index 5b1328bf4..bb1e56c09 100644
--- a/src/dnsmasq-manager/Makefile.in
+++ b/src/dnsmasq-manager/Makefile.in
@@ -141,6 +141,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -195,11 +197,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -210,6 +216,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -249,6 +256,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/src/firewall-manager/Makefile.am b/src/firewall-manager/Makefile.am
new file mode 100644
index 000000000..2cfe32d05
--- /dev/null
+++ b/src/firewall-manager/Makefile.am
@@ -0,0 +1,23 @@
+INCLUDES = \
+ -I${top_srcdir}/src \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/include \
+ -I${top_srcdir}/libnm-util
+
+noinst_LTLIBRARIES = libfirewall-manager.la
+
+libfirewall_manager_la_SOURCES = \
+ nm-firewall-manager.h \
+ nm-firewall-manager.c
+
+libfirewall_manager_la_CPPFLAGS = \
+ $(DBUS_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ -DNM_PKGDATADIR=\"$(pkgdatadir)\" \
+ -DNM_LOCALSTATEDIR=\"$(localstatedir)\"
+
+libfirewall_manager_la_LIBADD = \
+ $(top_builddir)/src/logging/libnm-logging.la \
+ $(DBUS_LIBS) \
+ $(GLIB_LIBS)
+
diff --git a/marshallers/Makefile.in b/src/firewall-manager/Makefile.in
index de9ff3e59..821fa8387 100644
--- a/marshallers/Makefile.in
+++ b/src/firewall-manager/Makefile.in
@@ -34,7 +34,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-subdir = marshallers
+subdir = src/firewall-manager
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
@@ -56,9 +56,12 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
-libmarshallers_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libmarshallers_la_OBJECTS = libmarshallers_la-nm-marshal-main.lo
-libmarshallers_la_OBJECTS = $(am_libmarshallers_la_OBJECTS)
+libfirewall_manager_la_DEPENDENCIES = \
+ $(top_builddir)/src/logging/libnm-logging.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libfirewall_manager_la_OBJECTS = \
+ libfirewall_manager_la-nm-firewall-manager.lo
+libfirewall_manager_la_OBJECTS = $(am_libfirewall_manager_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
@@ -88,8 +91,8 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(libmarshallers_la_SOURCES)
-DIST_SOURCES = $(libmarshallers_la_SOURCES)
+SOURCES = $(libfirewall_manager_la_SOURCES)
+DIST_SOURCES = $(libfirewall_manager_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -138,6 +141,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -192,11 +197,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -207,6 +216,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -246,6 +256,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -309,23 +321,29 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-noinst_LTLIBRARIES = libmarshallers.la
-BUILT_SOURCES = \
- nm-marshal.h \
- nm-marshal.c
-
-libmarshallers_la_SOURCES = \
- nm-marshal-main.c
-
-libmarshallers_la_CPPFLAGS = \
+INCLUDES = \
+ -I${top_srcdir}/src \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/include \
+ -I${top_srcdir}/libnm-util
+
+noinst_LTLIBRARIES = libfirewall-manager.la
+libfirewall_manager_la_SOURCES = \
+ nm-firewall-manager.h \
+ nm-firewall-manager.c
+
+libfirewall_manager_la_CPPFLAGS = \
+ $(DBUS_CFLAGS) \
$(GLIB_CFLAGS) \
- -DG_DISABLE_DEPRECATED
+ -DNM_PKGDATADIR=\"$(pkgdatadir)\" \
+ -DNM_LOCALSTATEDIR=\"$(localstatedir)\"
+
+libfirewall_manager_la_LIBADD = \
+ $(top_builddir)/src/logging/libnm-logging.la \
+ $(DBUS_LIBS) \
+ $(GLIB_LIBS)
-libmarshallers_la_LIBADD = $(GLIB_LIBS)
-EXTRA_DIST = nm-marshal.list
-CLEANFILES = $(BUILT_SOURCES)
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
+all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
@@ -338,9 +356,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu marshallers/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/firewall-manager/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu marshallers/Makefile
+ $(AUTOMAKE) --gnu src/firewall-manager/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -368,8 +386,8 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libmarshallers.la: $(libmarshallers_la_OBJECTS) $(libmarshallers_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libmarshallers_la_OBJECTS) $(libmarshallers_la_LIBADD) $(LIBS)
+libfirewall-manager.la: $(libfirewall_manager_la_OBJECTS) $(libfirewall_manager_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libfirewall_manager_la_OBJECTS) $(libfirewall_manager_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -377,7 +395,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmarshallers_la-nm-marshal-main.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfirewall_manager_la-nm-firewall-manager.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -406,13 +424,13 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-libmarshallers_la-nm-marshal-main.lo: nm-marshal-main.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmarshallers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmarshallers_la-nm-marshal-main.lo -MD -MP -MF $(DEPDIR)/libmarshallers_la-nm-marshal-main.Tpo -c -o libmarshallers_la-nm-marshal-main.lo `test -f 'nm-marshal-main.c' || echo '$(srcdir)/'`nm-marshal-main.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmarshallers_la-nm-marshal-main.Tpo $(DEPDIR)/libmarshallers_la-nm-marshal-main.Plo
+libfirewall_manager_la-nm-firewall-manager.lo: nm-firewall-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfirewall_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfirewall_manager_la-nm-firewall-manager.lo -MD -MP -MF $(DEPDIR)/libfirewall_manager_la-nm-firewall-manager.Tpo -c -o libfirewall_manager_la-nm-firewall-manager.lo `test -f 'nm-firewall-manager.c' || echo '$(srcdir)/'`nm-firewall-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfirewall_manager_la-nm-firewall-manager.Tpo $(DEPDIR)/libfirewall_manager_la-nm-firewall-manager.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-marshal-main.c' object='libmarshallers_la-nm-marshal-main.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-firewall-manager.c' object='libfirewall_manager_la-nm-firewall-manager.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmarshallers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmarshallers_la-nm-marshal-main.lo `test -f 'nm-marshal-main.c' || echo '$(srcdir)/'`nm-marshal-main.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfirewall_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfirewall_manager_la-nm-firewall-manager.lo `test -f 'nm-firewall-manager.c' || echo '$(srcdir)/'`nm-firewall-manager.c
mostlyclean-libtool:
-rm -f *.lo
@@ -503,12 +521,10 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -525,7 +541,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -534,7 +549,6 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
@@ -606,7 +620,7 @@ ps-am:
uninstall-am:
-.MAKE: all check install install-am install-strip
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
@@ -622,14 +636,6 @@ uninstall-am:
pdf pdf-am ps ps-am tags uninstall uninstall-am
-nm-marshal.h: nm-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=_nm_marshal --header > $@
-
-nm-marshal.c: nm-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=_nm_marshal --body > $@
-
-nm-marshal-main.c: nm-marshal.c nm-marshal.h
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/src/firewall-manager/nm-firewall-manager.c b/src/firewall-manager/nm-firewall-manager.c
new file mode 100644
index 000000000..c19be5e8e
--- /dev/null
+++ b/src/firewall-manager/nm-firewall-manager.c
@@ -0,0 +1,327 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Red Hat, Inc.
+ */
+
+#include <string.h>
+#include <glib.h>
+#include <dbus/dbus.h>
+
+#include "nm-firewall-manager.h"
+#include "nm-dbus-manager.h"
+#include "nm-logging.h"
+
+#define NM_FIREWALL_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+ NM_TYPE_FIREWALL_MANAGER, \
+ NMFirewallManagerPrivate))
+
+G_DEFINE_TYPE (NMFirewallManager, nm_firewall_manager, G_TYPE_OBJECT)
+
+/* Properties */
+enum {
+ PROP_0 = 0,
+ PROP_AVAILABLE,
+ LAST_PROP
+};
+
+typedef struct {
+ NMDBusManager * dbus_mgr;
+ guint name_owner_id;
+ DBusGProxy * proxy;
+ gboolean running;
+ gboolean disposed;
+} NMFirewallManagerPrivate;
+
+enum {
+ STARTED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+/********************************************************************/
+
+typedef struct {
+ char *iface;
+ FwAddToZoneFunc callback;
+ gpointer user_data;
+} CBInfo;
+
+static void
+cb_info_free (CBInfo *info)
+{
+ g_return_if_fail (info != NULL);
+ g_free (info->iface);
+ g_free (info);
+}
+
+static void
+add_or_change_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
+{
+ CBInfo *info = user_data;
+ GError *error = NULL;
+ char *zone = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error,
+ G_TYPE_STRING, &zone,
+ G_TYPE_INVALID)) {
+ g_assert (error);
+ nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone add/change failed: (%d) %s",
+ info->iface, error->code, error->message);
+ }
+
+ info->callback (error, info->user_data);
+
+ g_free (zone);
+ g_clear_error (&error);
+}
+
+gpointer
+nm_firewall_manager_add_or_change_zone (NMFirewallManager *self,
+ const char *iface,
+ const char *zone,
+ gboolean add, /* TRUE == add, FALSE == change */
+ FwAddToZoneFunc callback,
+ gpointer user_data)
+{
+ NMFirewallManagerPrivate *priv = NM_FIREWALL_MANAGER_GET_PRIVATE (self);
+ CBInfo *info;
+
+ if (priv->running == FALSE) {
+ nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone add/change skipped (not running)", iface);
+ callback (NULL, user_data);
+ return NULL;
+ }
+
+ info = g_malloc0 (sizeof (*info));
+ info->iface = g_strdup (iface);
+ info->callback = callback;
+ info->user_data = user_data;
+
+ nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone %s -> %s", iface, add ? "add" : "change", zone);
+ return dbus_g_proxy_begin_call_with_timeout (priv->proxy,
+ add ? "addInterface" : "changeZone",
+ add_or_change_cb,
+ info,
+ (GDestroyNotify) cb_info_free,
+ 10000, /* timeout */
+ G_TYPE_STRING, zone ? zone : "",
+ G_TYPE_STRING, iface,
+ G_TYPE_INVALID);
+}
+
+static void
+remove_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
+{
+ CBInfo *info = user_data;
+ GError *error = NULL;
+ char * zone = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error,
+ G_TYPE_STRING, &zone,
+ G_TYPE_INVALID)) {
+ g_assert (error);
+ nm_log_warn (LOGD_FIREWALL, "(%s) firewall zone remove failed: (%d) %s",
+ info->iface, error->code, error->message);
+ }
+
+ g_free (zone);
+ g_clear_error (&error);
+}
+
+gpointer
+nm_firewall_manager_remove_from_zone (NMFirewallManager *self,
+ const char *iface,
+ const char *zone)
+{
+ NMFirewallManagerPrivate *priv = NM_FIREWALL_MANAGER_GET_PRIVATE (self);
+ CBInfo *info;
+
+ if (priv->running == FALSE) {
+ nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone remove skipped (not running)", iface);
+ return NULL;
+ }
+
+ info = g_malloc0 (sizeof (*info));
+ info->iface = g_strdup (iface);
+
+ nm_log_dbg (LOGD_FIREWALL, "(%s) firewall zone remove -> %s", iface, zone );
+ return dbus_g_proxy_begin_call_with_timeout (priv->proxy,
+ "removeInterface",
+ remove_cb,
+ info,
+ (GDestroyNotify) cb_info_free,
+ 10000, /* timeout */
+ G_TYPE_STRING, zone ? zone : "",
+ G_TYPE_STRING, iface,
+ G_TYPE_INVALID);
+}
+
+void nm_firewall_manager_cancel_call (NMFirewallManager *self, gpointer call)
+{
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (NM_IS_FIREWALL_MANAGER (self));
+ dbus_g_proxy_cancel_call (NM_FIREWALL_MANAGER_GET_PRIVATE (self)->proxy,
+ (DBusGProxyCall *) call);
+}
+
+static void
+set_running (NMFirewallManager *self, gboolean now_running)
+{
+ NMFirewallManagerPrivate *priv = NM_FIREWALL_MANAGER_GET_PRIVATE (self);
+ gboolean old_running = priv->running;
+
+ priv->running = now_running;
+ if (old_running != priv->running)
+ g_object_notify (G_OBJECT (self), NM_FIREWALL_MANAGER_AVAILABLE);
+}
+
+static void
+name_owner_changed (NMDBusManager *dbus_mgr,
+ const char *name,
+ const char *old_owner,
+ const char *new_owner,
+ gpointer user_data)
+{
+ NMFirewallManager *self = NM_FIREWALL_MANAGER (user_data);
+ gboolean old_owner_good = (old_owner && strlen (old_owner));
+ gboolean new_owner_good = (new_owner && strlen (new_owner));
+
+ /* We only care about the firewall here */
+ if (strcmp (FIREWALL_DBUS_SERVICE, name) != 0)
+ return;
+
+ if (!old_owner_good && new_owner_good) {
+ nm_log_dbg (LOGD_FIREWALL, "firewall started");
+ set_running (self, TRUE);
+ g_signal_emit (self, signals[STARTED], 0);
+ } else if (old_owner_good && !new_owner_good) {
+ nm_log_dbg (LOGD_FIREWALL, "firewall stopped");
+ set_running (self, FALSE);
+ }
+}
+
+/*******************************************************************/
+
+NMFirewallManager *
+nm_firewall_manager_get (void)
+{
+ static NMFirewallManager *singleton = NULL;
+
+ if (!singleton)
+ singleton = NM_FIREWALL_MANAGER (g_object_new (NM_TYPE_FIREWALL_MANAGER, NULL));
+ else
+ g_object_ref (singleton);
+
+ g_assert (singleton);
+ return singleton;
+}
+
+static void
+nm_firewall_manager_init (NMFirewallManager * self)
+{
+ NMFirewallManagerPrivate *priv = NM_FIREWALL_MANAGER_GET_PRIVATE (self);
+ DBusGConnection *bus;
+
+ priv->dbus_mgr = nm_dbus_manager_get ();
+ priv->name_owner_id = g_signal_connect (priv->dbus_mgr,
+ NM_DBUS_MANAGER_NAME_OWNER_CHANGED,
+ G_CALLBACK (name_owner_changed),
+ self);
+ priv->running = nm_dbus_manager_name_has_owner (priv->dbus_mgr, FIREWALL_DBUS_SERVICE);
+ nm_log_dbg (LOGD_FIREWALL, "firewall %s running", priv->running ? "is" : "is not" );
+
+ bus = nm_dbus_manager_get_connection (priv->dbus_mgr);
+ priv->proxy = dbus_g_proxy_new_for_name (bus,
+ FIREWALL_DBUS_SERVICE,
+ FIREWALL_DBUS_PATH,
+ FIREWALL_DBUS_INTERFACE_ZONE);
+}
+
+static void
+set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+}
+
+static void
+get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ switch (prop_id) {
+ case PROP_AVAILABLE:
+ g_value_set_boolean (value, NM_FIREWALL_MANAGER_GET_PRIVATE (object)->running);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMFirewallManagerPrivate *priv = NM_FIREWALL_MANAGER_GET_PRIVATE (object);
+
+ if (priv->disposed)
+ goto out;
+ priv->disposed = TRUE;
+
+ if (priv->dbus_mgr) {
+ if (priv->name_owner_id)
+ g_signal_handler_disconnect (priv->dbus_mgr, priv->name_owner_id);
+ g_object_unref (G_OBJECT (priv->dbus_mgr));
+ }
+
+ if (priv->proxy)
+ g_object_unref (priv->proxy);
+
+out:
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (nm_firewall_manager_parent_class)->dispose (object);
+}
+
+static void
+nm_firewall_manager_class_init (NMFirewallManagerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMFirewallManagerPrivate));
+
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+ object_class->dispose = dispose;
+
+ g_object_class_install_property (object_class, PROP_AVAILABLE,
+ g_param_spec_boolean (NM_FIREWALL_MANAGER_AVAILABLE,
+ "Available",
+ "Available",
+ FALSE,
+ G_PARAM_READABLE));
+
+ signals[STARTED] =
+ g_signal_new ("started",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMFirewallManagerClass, started),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+}
+
diff --git a/src/firewall-manager/nm-firewall-manager.h b/src/firewall-manager/nm-firewall-manager.h
new file mode 100644
index 000000000..a77984e37
--- /dev/null
+++ b/src/firewall-manager/nm-firewall-manager.h
@@ -0,0 +1,73 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Red Hat, Inc.
+ */
+
+#ifndef NM_FIREWALL_MANAGER_H
+#define NM_FIREWALL_MANAGER_H
+
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+
+#define FIREWALL_DBUS_SERVICE "org.fedoraproject.FirewallD1"
+#define FIREWALL_DBUS_PATH "/org/fedoraproject/FirewallD1"
+#define FIREWALL_DBUS_INTERFACE "org.fedoraproject.FirewallD1"
+#define FIREWALL_DBUS_INTERFACE_ZONE "org.fedoraproject.FirewallD1.zone"
+
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_FIREWALL_MANAGER (nm_firewall_manager_get_type ())
+#define NM_FIREWALL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_FIREWALL_MANAGER, NMFirewallManager))
+#define NM_FIREWALL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_FIREWALL_MANAGER, NMFirewallManagerClass))
+#define NM_IS_FIREWALL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_FIREWALL_MANAGER))
+#define NM_IS_FIREWALL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_FIREWALL_MANAGER))
+#define NM_FIREWALL_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_FIREWALL_MANAGER, NMFirewallManagerClass))
+
+#define NM_FIREWALL_MANAGER_AVAILABLE "available"
+
+typedef struct {
+ GObject parent;
+} NMFirewallManager;
+
+typedef struct {
+ GObjectClass parent;
+
+ /* Signals */
+ void (*started) (NMFirewallManager *manager);
+} NMFirewallManagerClass;
+
+GType nm_firewall_manager_get_type (void);
+
+NMFirewallManager *nm_firewall_manager_get (void);
+
+typedef void (*FwAddToZoneFunc) (GError *error, gpointer user_data);
+
+gpointer nm_firewall_manager_add_or_change_zone (NMFirewallManager *mgr,
+ const char *iface,
+ const char *zone,
+ gboolean add,
+ FwAddToZoneFunc callback,
+ gpointer user_data);
+gpointer nm_firewall_manager_remove_from_zone (NMFirewallManager *mgr,
+ const char *iface,
+ const char *zone);
+
+void nm_firewall_manager_cancel_call (NMFirewallManager *mgr, gpointer fw_call);
+
+#endif /* NM_FIREWALL_MANAGER_H */
diff --git a/src/generated/Makefile.am b/src/generated/Makefile.am
new file mode 100644
index 000000000..b7f13b88c
--- /dev/null
+++ b/src/generated/Makefile.am
@@ -0,0 +1,77 @@
+include $(GLIB_MAKEFILE)
+
+noinst_LTLIBRARIES = libnm-generated.la
+
+libnm_generated_la_SOURCES = \
+ nm-enum-types.c \
+ nm-enum-types.h \
+ nm-marshal.c \
+ nm-marshal.h
+
+nm_daemon_all_sources = \
+ $(top_srcdir)/src/*.[ch] \
+ $(top_srcdir)/src/logging/*.[ch] \
+ $(top_srcdir)/src/dns-manager/*.[ch] \
+ $(top_srcdir)/src/vpn-manager/*.[ch] \
+ $(top_srcdir)/src/dhcp-manager/*.[ch] \
+ $(top_srcdir)/src/ip6-manager/*.[ch] \
+ $(top_srcdir)/src/supplicant-manager/*.[ch] \
+ $(top_srcdir)/src/backends/*.[ch] \
+ $(top_srcdir)/src/ppp-manager/*.[ch] \
+ $(top_srcdir)/src/dnsmasq-manager/*.[ch] \
+ $(top_srcdir)/src/modem-manager/*.[ch] \
+ $(top_srcdir)/src/bluez-manager/*.[ch] \
+ $(top_srcdir)/src/firewall-manager/*.[ch] \
+ $(top_srcdir)/src/settings/*.[ch]
+
+if WITH_WIMAX
+nm_daemon_all_sources += $(top_srcdir)/src/wimax/*.[ch]
+endif
+
+nm_daemon_sources = \
+ $(filter-out %-glue.h %-bindings.h, $(wildcard $(nm_daemon_all_sources)))
+
+GLIB_GENERATED = nm-enum-types.h nm-enum-types.c
+nm_enum_types_sources = $(nm_daemon_sources)
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
+
+GLIB_GENERATED += nm-marshal.h nm-marshal.c
+nm_marshal_sources = $(nm_daemon_sources)
+
+INCLUDES = \
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/src/dns-manager \
+ -I${top_srcdir}/src/vpn-manager \
+ -I${top_srcdir}/src/dhcp-manager \
+ -I${top_srcdir}/src/ip6-manager \
+ -I${top_srcdir}/src/supplicant-manager \
+ -I${top_srcdir}/src/backends \
+ -I${top_srcdir}/src/ppp-manager \
+ -I${top_srcdir}/src/dnsmasq-manager \
+ -I${top_srcdir}/src/modem-manager \
+ -I$(top_srcdir)/src/bluez-manager \
+ -I$(top_srcdir)/src/firewall-manager \
+ -I$(top_srcdir)/src/settings \
+ -I$(top_srcdir)/src/wifi \
+ -I$(top_srcdir)/src/wimax \
+ -I$(top_srcdir)/libnm-util
+
+libnm_generated_la_CPPFLAGS = \
+ $(DBUS_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(GUDEV_CFLAGS) \
+ $(LIBNL_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(POLKIT_CFLAGS) \
+ $(SYSTEMD_CFLAGS) \
+ $(IWMX_SDK_CFLAGS)
+
+libnm_generated_la_LIBADD = \
+ $(GLIB_LIBS)
+
+BUILT_SOURCES = $(GLIB_GENERATED)
+
diff --git a/src/generated/Makefile.in b/src/generated/Makefile.in
new file mode 100644
index 000000000..85a346bec
--- /dev/null
+++ b/src/generated/Makefile.in
@@ -0,0 +1,697 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@WITH_WIMAX_TRUE@am__append_1 = $(top_srcdir)/src/wimax/*.[ch]
+subdir = src/generated
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnl-check.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libnm_generated_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libnm_generated_la_OBJECTS = libnm_generated_la-nm-enum-types.lo \
+ libnm_generated_la-nm-marshal.lo
+libnm_generated_la_OBJECTS = $(am_libnm_generated_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libnm_generated_la_SOURCES)
+DIST_SOURCES = $(libnm_generated_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DHCLIENT_PATH = @DHCLIENT_PATH@
+DHCLIENT_VERSION = @DHCLIENT_VERSION@
+DHCPCD_PATH = @DHCPCD_PATH@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+IPTABLES_PATH = @IPTABLES_PATH@
+IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@
+IWMX_SDK_LIBS = @IWMX_SDK_LIBS@
+KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDL = @LIBDL@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBNL1_CFLAGS = @LIBNL1_CFLAGS@
+LIBNL1_LIBS = @LIBNL1_LIBS@
+LIBNL2_CFLAGS = @LIBNL2_CFLAGS@
+LIBNL2_LIBS = @LIBNL2_LIBS@
+LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
+LIBNL3_LIBS = @LIBNL3_LIBS@
+LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
+LIBNL_LIBS = @LIBNL_LIBS@
+LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
+LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
+NM_MICRO_VERSION = @NM_MICRO_VERSION@
+NM_MINOR_VERSION = @NM_MINOR_VERSION@
+NM_VERSION = @NM_VERSION@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_PATH = @PKGCONFIG_PATH@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+RESOLVCONF_PATH = @RESOLVCONF_PATH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
+UDEV_BASE_DIR = @UDEV_BASE_DIR@
+USE_NLS = @USE_NLS@
+UUID_CFLAGS = @UUID_CFLAGS@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libnm-generated.la
+libnm_generated_la_SOURCES = \
+ nm-enum-types.c \
+ nm-enum-types.h \
+ nm-marshal.c \
+ nm-marshal.h
+
+nm_daemon_all_sources = $(top_srcdir)/src/*.[ch] \
+ $(top_srcdir)/src/logging/*.[ch] \
+ $(top_srcdir)/src/dns-manager/*.[ch] \
+ $(top_srcdir)/src/vpn-manager/*.[ch] \
+ $(top_srcdir)/src/dhcp-manager/*.[ch] \
+ $(top_srcdir)/src/ip6-manager/*.[ch] \
+ $(top_srcdir)/src/supplicant-manager/*.[ch] \
+ $(top_srcdir)/src/backends/*.[ch] \
+ $(top_srcdir)/src/ppp-manager/*.[ch] \
+ $(top_srcdir)/src/dnsmasq-manager/*.[ch] \
+ $(top_srcdir)/src/modem-manager/*.[ch] \
+ $(top_srcdir)/src/bluez-manager/*.[ch] \
+ $(top_srcdir)/src/firewall-manager/*.[ch] \
+ $(top_srcdir)/src/settings/*.[ch] $(am__append_1)
+nm_daemon_sources = \
+ $(filter-out %-glue.h %-bindings.h, $(wildcard $(nm_daemon_all_sources)))
+
+GLIB_GENERATED = nm-enum-types.h nm-enum-types.c nm-marshal.h \
+ nm-marshal.c
+nm_enum_types_sources = $(nm_daemon_sources)
+GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
+GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
+nm_marshal_sources = $(nm_daemon_sources)
+INCLUDES = \
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/src/dns-manager \
+ -I${top_srcdir}/src/vpn-manager \
+ -I${top_srcdir}/src/dhcp-manager \
+ -I${top_srcdir}/src/ip6-manager \
+ -I${top_srcdir}/src/supplicant-manager \
+ -I${top_srcdir}/src/backends \
+ -I${top_srcdir}/src/ppp-manager \
+ -I${top_srcdir}/src/dnsmasq-manager \
+ -I${top_srcdir}/src/modem-manager \
+ -I$(top_srcdir)/src/bluez-manager \
+ -I$(top_srcdir)/src/firewall-manager \
+ -I$(top_srcdir)/src/settings \
+ -I$(top_srcdir)/src/wifi \
+ -I$(top_srcdir)/src/wimax \
+ -I$(top_srcdir)/libnm-util
+
+libnm_generated_la_CPPFLAGS = \
+ $(DBUS_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(GUDEV_CFLAGS) \
+ $(LIBNL_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(POLKIT_CFLAGS) \
+ $(SYSTEMD_CFLAGS) \
+ $(IWMX_SDK_CFLAGS)
+
+libnm_generated_la_LIBADD = \
+ $(GLIB_LIBS)
+
+BUILT_SOURCES = $(GLIB_GENERATED)
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/generated/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/generated/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libnm-generated.la: $(libnm_generated_la_OBJECTS) $(libnm_generated_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libnm_generated_la_OBJECTS) $(libnm_generated_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_generated_la-nm-enum-types.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_generated_la-nm-marshal.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libnm_generated_la-nm-enum-types.lo: nm-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_generated_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_generated_la-nm-enum-types.lo -MD -MP -MF $(DEPDIR)/libnm_generated_la-nm-enum-types.Tpo -c -o libnm_generated_la-nm-enum-types.lo `test -f 'nm-enum-types.c' || echo '$(srcdir)/'`nm-enum-types.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_generated_la-nm-enum-types.Tpo $(DEPDIR)/libnm_generated_la-nm-enum-types.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-enum-types.c' object='libnm_generated_la-nm-enum-types.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_generated_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_generated_la-nm-enum-types.lo `test -f 'nm-enum-types.c' || echo '$(srcdir)/'`nm-enum-types.c
+
+libnm_generated_la-nm-marshal.lo: nm-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_generated_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_generated_la-nm-marshal.lo -MD -MP -MF $(DEPDIR)/libnm_generated_la-nm-marshal.Tpo -c -o libnm_generated_la-nm-marshal.lo `test -f 'nm-marshal.c' || echo '$(srcdir)/'`nm-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_generated_la-nm-marshal.Tpo $(DEPDIR)/libnm_generated_la-nm-marshal.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-marshal.c' object='libnm_generated_la-nm-marshal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_generated_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_generated_la-nm-marshal.lo `test -f 'nm-marshal.c' || echo '$(srcdir)/'`nm-marshal.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+include $(GLIB_MAKEFILE)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/generated/nm-enum-types.c b/src/generated/nm-enum-types.c
new file mode 100644
index 000000000..a9973b4db
--- /dev/null
+++ b/src/generated/nm-enum-types.c
@@ -0,0 +1,913 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#include "nm-enum-types.h"
+
+#include "nm-device-vlan.h"
+#include "nm-device-olpc-mesh.h"
+#include "nm-hostname-provider.h"
+#include "nm-device.h"
+#include "nm-rfkill.h"
+#include "NetworkManagerUtils.h"
+#include "nm-device-factory.h"
+#include "nm-active-connection.h"
+#include "nm-wifi-ap.h"
+#include "nm-device-ethernet.h"
+#include "nm-device-bt.h"
+#include "nm-device-wifi.h"
+#include "nm-dbus-manager.h"
+#include "nm-dhcp4-config.h"
+#include "nm-dhcp6-config.h"
+#include "nm-netlink-compat.h"
+#include "nm-session-monitor.h"
+#include "nm-ip4-config.h"
+#include "nm-device-bond.h"
+#include "nm-wifi-ap-utils.h"
+#include "nm-call-store.h"
+#include "nm-policy-hosts.h"
+#include "nm-udev-manager.h"
+#include "nm-manager.h"
+#include "nm-device-modem.h"
+#include "nm-device-wired.h"
+#include "nm-activation-request.h"
+#include "nm-session-utils.h"
+#include "nm-policy-hostname.h"
+#include "nm-device-infiniband.h"
+#include "nm-properties-changed-signal.h"
+#include "nm-ip6-config.h"
+#include "nm-device-private.h"
+#include "nm-policy.h"
+#include "nm-manager-auth.h"
+#include "nm-config.h"
+#include "nm-netlink-utils.h"
+#include "nm-netlink-monitor.h"
+#include "nm-system.h"
+#include "nm-connectivity.h"
+#include "nm-logging.h"
+#include "nm-dns-utils.h"
+#include "nm-dns-plugin.h"
+#include "nm-dns-manager.h"
+#include "nm-dns-bind.h"
+#include "nm-dns-dnsmasq.h"
+#include "nm-vpn-manager.h"
+#include "nm-vpn-service.h"
+#include "nm-vpn-connection.h"
+#include "nm-dhcp-dhcpcd.h"
+#include "nm-dhcp-dhclient.h"
+#include "nm-dhcp-client.h"
+#include "nm-dhcp-dhclient-utils.h"
+#include "nm-dhcp-manager.h"
+#include "nm-ip6-manager.h"
+#include "nm-supplicant-types.h"
+#include "nm-supplicant-config.h"
+#include "nm-supplicant-settings-verify.h"
+#include "nm-supplicant-manager.h"
+#include "nm-supplicant-interface.h"
+#include "nm-backend.h"
+#include "NetworkManagerGeneric.h"
+#include "nm-ppp-status.h"
+#include "nm-pppd-plugin.h"
+#include "nm-ppp-manager.h"
+#include "nm-dnsmasq-manager.h"
+#include "nm-modem.h"
+#include "nm-modem-cdma.h"
+#include "nm-modem-types.h"
+#include "nm-modem-gsm.h"
+#include "nm-modem-manager.h"
+#include "nm-bluez-device.h"
+#include "nm-bluez-manager.h"
+#include "nm-bluez-adapter.h"
+#include "nm-bluez-common.h"
+#include "nm-firewall-manager.h"
+#include "nm-settings.h"
+#include "nm-settings-connection.h"
+#include "nm-default-wired-connection.h"
+#include "nm-system-config-interface.h"
+#include "nm-settings-utils.h"
+#include "nm-settings-error.h"
+#include "nm-agent-manager.h"
+#include "nm-inotify-helper.h"
+#include "nm-secret-agent.h"
+#include "nm-device-wimax.h"
+#include "iwmxsdk.h"
+#include "nm-wimax-types.h"
+#include "nm-wimax-util.h"
+#include "nm-wimax-nsp.h"
+
+GType
+nm_vlan_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_VLAN_ERROR_CONNECTION_NOT_VLAN, "NM_VLAN_ERROR_CONNECTION_NOT_VLAN", "ConnectionNotVlan" },
+ { NM_VLAN_ERROR_CONNECTION_INVALID, "NM_VLAN_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_VLAN_ERROR_CONNECTION_INCOMPATIBLE, "NM_VLAN_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMVlanError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_olpc_mesh_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_OLPC_MESH_ERROR_CONNECTION_NOT_MESH, "NM_OLPC_MESH_ERROR_CONNECTION_NOT_MESH", "ConnectionNotMesh" },
+ { NM_OLPC_MESH_ERROR_CONNECTION_INVALID, "NM_OLPC_MESH_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_OLPC_MESH_ERROR_CONNECTION_INCOMPATIBLE, "NM_OLPC_MESH_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMOlpcMeshError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_device_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DEVICE_ERROR_CONNECTION_ACTIVATING, "NM_DEVICE_ERROR_CONNECTION_ACTIVATING", "ConnectionActivating" },
+ { NM_DEVICE_ERROR_CONNECTION_INVALID, "NM_DEVICE_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_DEVICE_ERROR_NOT_ACTIVE, "NM_DEVICE_ERROR_NOT_ACTIVE", "NotActive" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDeviceError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_rf_kill_state_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { RFKILL_UNBLOCKED, "RFKILL_UNBLOCKED", "unblocked" },
+ { RFKILL_SOFT_BLOCKED, "RFKILL_SOFT_BLOCKED", "soft-blocked" },
+ { RFKILL_HARD_BLOCKED, "RFKILL_HARD_BLOCKED", "hard-blocked" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("RfKillState"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_rf_kill_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { RFKILL_TYPE_WLAN, "RFKILL_TYPE_WLAN", "wlan" },
+ { RFKILL_TYPE_WWAN, "RFKILL_TYPE_WWAN", "wwan" },
+ { RFKILL_TYPE_WIMAX, "RFKILL_TYPE_WIMAX", "wimax" },
+ { RFKILL_TYPE_UNKNOWN, "RFKILL_TYPE_UNKNOWN", "unknown" },
+ { RFKILL_TYPE_MAX, "RFKILL_TYPE_MAX", "max" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("RfKillType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_ethernet_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED, "NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED", "ConnectionNotWired" },
+ { NM_ETHERNET_ERROR_CONNECTION_INVALID, "NM_ETHERNET_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE, "NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMEthernetError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_bt_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_BT_ERROR_CONNECTION_NOT_BT, "NM_BT_ERROR_CONNECTION_NOT_BT", "ConnectionNotBt" },
+ { NM_BT_ERROR_CONNECTION_INVALID, "NM_BT_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_BT_ERROR_CONNECTION_INCOMPATIBLE, "NM_BT_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMBtError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_wifi_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_WIFI_ERROR_CONNECTION_NOT_WIRELESS, "NM_WIFI_ERROR_CONNECTION_NOT_WIRELESS", "ConnectionNotWireless" },
+ { NM_WIFI_ERROR_CONNECTION_INVALID, "NM_WIFI_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_WIFI_ERROR_CONNECTION_INCOMPATIBLE, "NM_WIFI_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { NM_WIFI_ERROR_ACCESS_POINT_NOT_FOUND, "NM_WIFI_ERROR_ACCESS_POINT_NOT_FOUND", "AccessPointNotFound" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMWifiError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_ip4_config_compare_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_IP4_COMPARE_FLAG_NONE, "NM_IP4_COMPARE_FLAG_NONE", "none" },
+ { NM_IP4_COMPARE_FLAG_ADDRESSES, "NM_IP4_COMPARE_FLAG_ADDRESSES", "addresses" },
+ { NM_IP4_COMPARE_FLAG_PTP_ADDRESS, "NM_IP4_COMPARE_FLAG_PTP_ADDRESS", "ptp-address" },
+ { NM_IP4_COMPARE_FLAG_NAMESERVERS, "NM_IP4_COMPARE_FLAG_NAMESERVERS", "nameservers" },
+ { NM_IP4_COMPARE_FLAG_ROUTES, "NM_IP4_COMPARE_FLAG_ROUTES", "routes" },
+ { NM_IP4_COMPARE_FLAG_DOMAINS, "NM_IP4_COMPARE_FLAG_DOMAINS", "domains" },
+ { NM_IP4_COMPARE_FLAG_SEARCHES, "NM_IP4_COMPARE_FLAG_SEARCHES", "searches" },
+ { NM_IP4_COMPARE_FLAG_MTU, "NM_IP4_COMPARE_FLAG_MTU", "mtu" },
+ { NM_IP4_COMPARE_FLAG_MSS, "NM_IP4_COMPARE_FLAG_MSS", "mss" },
+ { NM_IP4_COMPARE_FLAG_WINS_SERVERS, "NM_IP4_COMPARE_FLAG_WINS_SERVERS", "wins-servers" },
+ { NM_IP4_COMPARE_FLAG_NIS_SERVERS, "NM_IP4_COMPARE_FLAG_NIS_SERVERS", "nis-servers" },
+ { NM_IP4_COMPARE_FLAG_NIS_DOMAIN, "NM_IP4_COMPARE_FLAG_NIS_DOMAIN", "nis-domain" },
+ { NM_IP4_COMPARE_FLAG_ALL, "NM_IP4_COMPARE_FLAG_ALL", "all" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMIP4ConfigCompareFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_bond_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_BOND_ERROR_CONNECTION_NOT_BOND, "NM_BOND_ERROR_CONNECTION_NOT_BOND", "ConnectionNotBond" },
+ { NM_BOND_ERROR_CONNECTION_INVALID, "NM_BOND_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_BOND_ERROR_CONNECTION_INCOMPATIBLE, "NM_BOND_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMBondError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_manager_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_MANAGER_ERROR_UNKNOWN_CONNECTION, "NM_MANAGER_ERROR_UNKNOWN_CONNECTION", "UnknownConnection" },
+ { NM_MANAGER_ERROR_UNKNOWN_DEVICE, "NM_MANAGER_ERROR_UNKNOWN_DEVICE", "UnknownDevice" },
+ { NM_MANAGER_ERROR_UNMANAGED_DEVICE, "NM_MANAGER_ERROR_UNMANAGED_DEVICE", "UnmanagedDevice" },
+ { NM_MANAGER_ERROR_SYSTEM_CONNECTION, "NM_MANAGER_ERROR_SYSTEM_CONNECTION", "SystemConnection" },
+ { NM_MANAGER_ERROR_PERMISSION_DENIED, "NM_MANAGER_ERROR_PERMISSION_DENIED", "PermissionDenied" },
+ { NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE, "NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE", "ConnectionNotActive" },
+ { NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE, "NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE", "AlreadyAsleepOrAwake" },
+ { NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED, "NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED", "AlreadyEnabledOrDisabled" },
+ { NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE, "NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE", "UnsupportedConnectionType" },
+ { NM_MANAGER_ERROR_DEPENDENCY_FAILED, "NM_MANAGER_ERROR_DEPENDENCY_FAILED", "DependencyFailed" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMManagerError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_act_request_dependency_result_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_ACT_REQUEST_DEP_RESULT_UNKNOWN, "NM_ACT_REQUEST_DEP_RESULT_UNKNOWN", "unknown" },
+ { NM_ACT_REQUEST_DEP_RESULT_WAIT, "NM_ACT_REQUEST_DEP_RESULT_WAIT", "wait" },
+ { NM_ACT_REQUEST_DEP_RESULT_READY, "NM_ACT_REQUEST_DEP_RESULT_READY", "ready" },
+ { NM_ACT_REQUEST_DEP_RESULT_FAILED, "NM_ACT_REQUEST_DEP_RESULT_FAILED", "failed" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMActRequestDependencyResult"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_session_monitor_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SESSION_MONITOR_ERROR_IO_ERROR, "NM_SESSION_MONITOR_ERROR_IO_ERROR", "IOError" },
+ { NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE, "NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE", "MalformedDatabase" },
+ { NM_SESSION_MONITOR_ERROR_UNKNOWN_USER, "NM_SESSION_MONITOR_ERROR_UNKNOWN_USER", "UnknownUser" },
+ { NM_SESSION_MONITOR_ERROR_NO_DATABASE, "NM_SESSION_MONITOR_ERROR_NO_DATABASE", "NoDatabase" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSessionMonitorError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_infiniband_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_INFINIBAND_ERROR_CONNECTION_NOT_INFINIBAND, "NM_INFINIBAND_ERROR_CONNECTION_NOT_INFINIBAND", "ConnectionNotInfiniband" },
+ { NM_INFINIBAND_ERROR_CONNECTION_INVALID, "NM_INFINIBAND_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_INFINIBAND_ERROR_CONNECTION_INCOMPATIBLE, "NM_INFINIBAND_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMInfinibandError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_ip6_config_compare_flags_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_IP6_COMPARE_FLAG_NONE, "NM_IP6_COMPARE_FLAG_NONE", "none" },
+ { NM_IP6_COMPARE_FLAG_ADDRESSES, "NM_IP6_COMPARE_FLAG_ADDRESSES", "addresses" },
+ { NM_IP6_COMPARE_FLAG_PTP_ADDRESS, "NM_IP6_COMPARE_FLAG_PTP_ADDRESS", "ptp-address" },
+ { NM_IP6_COMPARE_FLAG_NAMESERVERS, "NM_IP6_COMPARE_FLAG_NAMESERVERS", "nameservers" },
+ { NM_IP6_COMPARE_FLAG_ROUTES, "NM_IP6_COMPARE_FLAG_ROUTES", "routes" },
+ { NM_IP6_COMPARE_FLAG_DOMAINS, "NM_IP6_COMPARE_FLAG_DOMAINS", "domains" },
+ { NM_IP6_COMPARE_FLAG_SEARCHES, "NM_IP6_COMPARE_FLAG_SEARCHES", "searches" },
+ { NM_IP6_COMPARE_FLAG_MSS, "NM_IP6_COMPARE_FLAG_MSS", "mss" },
+ { NM_IP6_COMPARE_FLAG_ALL, "NM_IP6_COMPARE_FLAG_ALL", "all" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMIP6ConfigCompareFlags"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_auth_call_result_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_AUTH_CALL_RESULT_UNKNOWN, "NM_AUTH_CALL_RESULT_UNKNOWN", "unknown" },
+ { NM_AUTH_CALL_RESULT_YES, "NM_AUTH_CALL_RESULT_YES", "yes" },
+ { NM_AUTH_CALL_RESULT_AUTH, "NM_AUTH_CALL_RESULT_AUTH", "auth" },
+ { NM_AUTH_CALL_RESULT_NO, "NM_AUTH_CALL_RESULT_NO", "no" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMAuthCallResult"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_config_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_CONFIG_ERROR_NO_MEMORY, "NM_CONFIG_ERROR_NO_MEMORY", "NoMemory" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMConfigError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_nm_nl_prop_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NMNL_PROP_INVALID, "NMNL_PROP_INVALID", "invalid" },
+ { NMNL_PROP_PROT, "NMNL_PROP_PROT", "prot" },
+ { NMNL_PROP_SCOPE, "NMNL_PROP_SCOPE", "scope" },
+ { NMNL_PROP_TABLE, "NMNL_PROP_TABLE", "table" },
+ { NMNL_PROP_PRIO, "NMNL_PROP_PRIO", "prio" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NmNlProp"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_netlink_monitor_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_NETLINK_MONITOR_ERROR_GENERIC, "NM_NETLINK_MONITOR_ERROR_GENERIC", "generic" },
+ { NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_HANDLE, "NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_HANDLE", "netlink-alloc-handle" },
+ { NM_NETLINK_MONITOR_ERROR_NETLINK_CONNECT, "NM_NETLINK_MONITOR_ERROR_NETLINK_CONNECT", "netlink-connect" },
+ { NM_NETLINK_MONITOR_ERROR_NETLINK_JOIN_GROUP, "NM_NETLINK_MONITOR_ERROR_NETLINK_JOIN_GROUP", "netlink-join-group" },
+ { NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_LINK_CACHE, "NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_LINK_CACHE", "netlink-alloc-link-cache" },
+ { NM_NETLINK_MONITOR_ERROR_PROCESSING_MESSAGE, "NM_NETLINK_MONITOR_ERROR_PROCESSING_MESSAGE", "processing-message" },
+ { NM_NETLINK_MONITOR_ERROR_BAD_ALLOC, "NM_NETLINK_MONITOR_ERROR_BAD_ALLOC", "bad-alloc" },
+ { NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA, "NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA", "waiting-for-socket-data" },
+ { NM_NETLINK_MONITOR_ERROR_LINK_CACHE_UPDATE, "NM_NETLINK_MONITOR_ERROR_LINK_CACHE_UPDATE", "link-cache-update" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMNetlinkMonitorError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_logging_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_LOGGING_ERROR_UNKNOWN_LEVEL, "NM_LOGGING_ERROR_UNKNOWN_LEVEL", "UnknownLevel" },
+ { NM_LOGGING_ERROR_UNKNOWN_DOMAIN, "NM_LOGGING_ERROR_UNKNOWN_DOMAIN", "UnknownDomain" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMLoggingError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_dns_manager_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DNS_MANAGER_ERROR_SYSTEM, "NM_DNS_MANAGER_ERROR_SYSTEM", "system" },
+ { NM_DNS_MANAGER_ERROR_INVALID_NAMESERVER, "NM_DNS_MANAGER_ERROR_INVALID_NAMESERVER", "invalid-nameserver" },
+ { NM_DNS_MANAGER_ERROR_INVALID_HOST, "NM_DNS_MANAGER_ERROR_INVALID_HOST", "invalid-host" },
+ { NM_DNS_MANAGER_ERROR_INVALID_ID, "NM_DNS_MANAGER_ERROR_INVALID_ID", "invalid-id" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDnsManagerError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_dns_ip_config_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DNS_IP_CONFIG_TYPE_DEFAULT, "NM_DNS_IP_CONFIG_TYPE_DEFAULT", "default" },
+ { NM_DNS_IP_CONFIG_TYPE_BEST_DEVICE, "NM_DNS_IP_CONFIG_TYPE_BEST_DEVICE", "best-device" },
+ { NM_DNS_IP_CONFIG_TYPE_VPN, "NM_DNS_IP_CONFIG_TYPE_VPN", "vpn" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDnsIPConfigType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_vpn_manager_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_VPN_MANAGER_ERROR_DEVICE_NOT_ACTIVE, "NM_VPN_MANAGER_ERROR_DEVICE_NOT_ACTIVE", "BaseDeviceNotActive" },
+ { NM_VPN_MANAGER_ERROR_CONNECTION_INVALID, "NM_VPN_MANAGER_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_VPN_MANAGER_ERROR_SERVICE_INVALID, "NM_VPN_MANAGER_ERROR_SERVICE_INVALID", "ServiceInvalid" },
+ { NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED, "NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED", "ServiceStartFailed" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMVPNManagerError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_dhcp_state_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { DHC_NBI, "DHC_NBI", "nbi" },
+ { DHC_PREINIT, "DHC_PREINIT", "preinit" },
+ { DHC_PREINIT6, "DHC_PREINIT6", "preinit6" },
+ { DHC_BOUND4, "DHC_BOUND4", "bound4" },
+ { DHC_BOUND6, "DHC_BOUND6", "bound6" },
+ { DHC_IPV4LL, "DHC_IPV4LL", "ipv4ll" },
+ { DHC_RENEW4, "DHC_RENEW4", "renew4" },
+ { DHC_RENEW6, "DHC_RENEW6", "renew6" },
+ { DHC_REBOOT, "DHC_REBOOT", "reboot" },
+ { DHC_REBIND4, "DHC_REBIND4", "rebind4" },
+ { DHC_REBIND6, "DHC_REBIND6", "rebind6" },
+ { DHC_DEPREF6, "DHC_DEPREF6", "depref6" },
+ { DHC_STOP, "DHC_STOP", "stop" },
+ { DHC_STOP6, "DHC_STOP6", "stop6" },
+ { DHC_MEDIUM, "DHC_MEDIUM", "medium" },
+ { DHC_TIMEOUT, "DHC_TIMEOUT", "timeout" },
+ { DHC_FAIL, "DHC_FAIL", "fail" },
+ { DHC_EXPIRE, "DHC_EXPIRE", "expire" },
+ { DHC_EXPIRE6, "DHC_EXPIRE6", "expire6" },
+ { DHC_RELEASE, "DHC_RELEASE", "release" },
+ { DHC_RELEASE6, "DHC_RELEASE6", "release6" },
+ { DHC_START, "DHC_START", "start" },
+ { DHC_ABEND, "DHC_ABEND", "abend" },
+ { DHC_END, "DHC_END", "end" },
+ { DHC_END_OPTIONS, "DHC_END_OPTIONS", "end-options" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDHCPState"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_dhcp_manager_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DHCP_MANAGER_ERROR_BAD_CLIENT, "NM_DHCP_MANAGER_ERROR_BAD_CLIENT", "BadClient" },
+ { NM_DHCP_MANAGER_ERROR_INTERNAL, "NM_DHCP_MANAGER_ERROR_INTERNAL", "InternalError" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDHCPManagerError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_opt_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { TYPE_INVALID, "TYPE_INVALID", "invalid" },
+ { TYPE_INT, "TYPE_INT", "int" },
+ { TYPE_BYTES, "TYPE_BYTES", "bytes" },
+ { TYPE_UTF8, "TYPE_UTF8", "utf8" },
+ { TYPE_KEYWORD, "TYPE_KEYWORD", "keyword" },
+ { TYPE_STRING, "TYPE_STRING", "string" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("OptType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_ppp_status_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_PPP_STATUS_UNKNOWN, "NM_PPP_STATUS_UNKNOWN", "unknown" },
+ { NM_PPP_STATUS_DEAD, "NM_PPP_STATUS_DEAD", "dead" },
+ { NM_PPP_STATUS_INITIALIZE, "NM_PPP_STATUS_INITIALIZE", "initialize" },
+ { NM_PPP_STATUS_SERIALCONN, "NM_PPP_STATUS_SERIALCONN", "serialconn" },
+ { NM_PPP_STATUS_DORMANT, "NM_PPP_STATUS_DORMANT", "dormant" },
+ { NM_PPP_STATUS_ESTABLISH, "NM_PPP_STATUS_ESTABLISH", "establish" },
+ { NM_PPP_STATUS_AUTHENTICATE, "NM_PPP_STATUS_AUTHENTICATE", "authenticate" },
+ { NM_PPP_STATUS_CALLBACK, "NM_PPP_STATUS_CALLBACK", "callback" },
+ { NM_PPP_STATUS_NETWORK, "NM_PPP_STATUS_NETWORK", "network" },
+ { NM_PPP_STATUS_RUNNING, "NM_PPP_STATUS_RUNNING", "running" },
+ { NM_PPP_STATUS_TERMINATE, "NM_PPP_STATUS_TERMINATE", "terminate" },
+ { NM_PPP_STATUS_DISCONNECT, "NM_PPP_STATUS_DISCONNECT", "disconnect" },
+ { NM_PPP_STATUS_HOLDOFF, "NM_PPP_STATUS_HOLDOFF", "holdoff" },
+ { NM_PPP_STATUS_MASTER, "NM_PPP_STATUS_MASTER", "master" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMPPPStatus"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_dns_masq_status_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_DNSMASQ_STATUS_UNKNOWN, "NM_DNSMASQ_STATUS_UNKNOWN", "unknown" },
+ { NM_DNSMASQ_STATUS_DEAD, "NM_DNSMASQ_STATUS_DEAD", "dead" },
+ { NM_DNSMASQ_STATUS_RUNNING, "NM_DNSMASQ_STATUS_RUNNING", "running" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMDnsMasqStatus"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_cdma_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_CDMA_ERROR_CONNECTION_NOT_CDMA, "NM_CDMA_ERROR_CONNECTION_NOT_CDMA", "ConnectionNotCdma" },
+ { NM_CDMA_ERROR_CONNECTION_INVALID, "NM_CDMA_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_CDMA_ERROR_CONNECTION_INCOMPATIBLE, "NM_CDMA_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMCdmaError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_gsm_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_GSM_ERROR_CONNECTION_NOT_GSM, "NM_GSM_ERROR_CONNECTION_NOT_GSM", "ConnectionNotGsm" },
+ { NM_GSM_ERROR_CONNECTION_INVALID, "NM_GSM_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_GSM_ERROR_CONNECTION_INCOMPATIBLE, "NM_GSM_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMGsmError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_system_config_interface_capabilities_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE, "NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE", "none" },
+ { NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS, "NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS", "modify-connections" },
+ { NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME, "NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME", "modify-hostname" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSystemConfigInterfaceCapabilities"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_system_config_interface_prop_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SYSTEM_CONFIG_INTERFACE_PROP_FIRST, "NM_SYSTEM_CONFIG_INTERFACE_PROP_FIRST", "first" },
+ { NM_SYSTEM_CONFIG_INTERFACE_PROP_NAME, "NM_SYSTEM_CONFIG_INTERFACE_PROP_NAME", "name" },
+ { NM_SYSTEM_CONFIG_INTERFACE_PROP_INFO, "NM_SYSTEM_CONFIG_INTERFACE_PROP_INFO", "info" },
+ { NM_SYSTEM_CONFIG_INTERFACE_PROP_CAPABILITIES, "NM_SYSTEM_CONFIG_INTERFACE_PROP_CAPABILITIES", "capabilities" },
+ { NM_SYSTEM_CONFIG_INTERFACE_PROP_HOSTNAME, "NM_SYSTEM_CONFIG_INTERFACE_PROP_HOSTNAME", "hostname" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSystemConfigInterfaceProp"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_settings_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_SETTINGS_ERROR_GENERAL, "NM_SETTINGS_ERROR_GENERAL", "GeneralError" },
+ { NM_SETTINGS_ERROR_INVALID_CONNECTION, "NM_SETTINGS_ERROR_INVALID_CONNECTION", "InvalidConnection" },
+ { NM_SETTINGS_ERROR_READ_ONLY_CONNECTION, "NM_SETTINGS_ERROR_READ_ONLY_CONNECTION", "ReadOnlyConnection" },
+ { NM_SETTINGS_ERROR_INTERNAL_ERROR, "NM_SETTINGS_ERROR_INTERNAL_ERROR", "InternalError" },
+ { NM_SETTINGS_ERROR_SECRETS_UNAVAILABLE, "NM_SETTINGS_ERROR_SECRETS_UNAVAILABLE", "SecretsUnavailable" },
+ { NM_SETTINGS_ERROR_SECRETS_REQUEST_CANCELED, "NM_SETTINGS_ERROR_SECRETS_REQUEST_CANCELED", "SecretsRequestCanceled" },
+ { NM_SETTINGS_ERROR_PERMISSION_DENIED, "NM_SETTINGS_ERROR_PERMISSION_DENIED", "PermissionDenied" },
+ { NM_SETTINGS_ERROR_INVALID_SETTING, "NM_SETTINGS_ERROR_INVALID_SETTING", "InvalidSetting" },
+ { NM_SETTINGS_ERROR_NOT_PRIVILEGED, "NM_SETTINGS_ERROR_NOT_PRIVILEGED", "NotPrivileged" },
+ { NM_SETTINGS_ERROR_ADD_NOT_SUPPORTED, "NM_SETTINGS_ERROR_ADD_NOT_SUPPORTED", "AddNotSupported" },
+ { NM_SETTINGS_ERROR_UPDATE_NOT_SUPPORTED, "NM_SETTINGS_ERROR_UPDATE_NOT_SUPPORTED", "UpdateNotSupported" },
+ { NM_SETTINGS_ERROR_DELETE_NOT_SUPPORTED, "NM_SETTINGS_ERROR_DELETE_NOT_SUPPORTED", "DeleteNotSupported" },
+ { NM_SETTINGS_ERROR_ADD_FAILED, "NM_SETTINGS_ERROR_ADD_FAILED", "AddFailed" },
+ { NM_SETTINGS_ERROR_SAVE_HOSTNAME_NOT_SUPPORTED, "NM_SETTINGS_ERROR_SAVE_HOSTNAME_NOT_SUPPORTED", "SaveHostnameNotSupported" },
+ { NM_SETTINGS_ERROR_SAVE_HOSTNAME_FAILED, "NM_SETTINGS_ERROR_SAVE_HOSTNAME_FAILED", "SaveHostnameFailed" },
+ { NM_SETTINGS_ERROR_UUID_EXISTS, "NM_SETTINGS_ERROR_UUID_EXISTS", "UuidExists" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMSettingsError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_agent_manager_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_AGENT_MANAGER_ERROR_SENDER_UNKNOWN, "NM_AGENT_MANAGER_ERROR_SENDER_UNKNOWN", "SenderUnknown" },
+ { NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED, "NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED", "PermissionDenied" },
+ { NM_AGENT_MANAGER_ERROR_SESSION_NOT_FOUND, "NM_AGENT_MANAGER_ERROR_SESSION_NOT_FOUND", "SessionNotFound" },
+ { NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER, "NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER", "InvalidIdentifier" },
+ { NM_AGENT_MANAGER_ERROR_NOT_REGISTERED, "NM_AGENT_MANAGER_ERROR_NOT_REGISTERED", "NotRegistered" },
+ { NM_AGENT_MANAGER_ERROR_INTERNAL_ERROR, "NM_AGENT_MANAGER_ERROR_INTERNAL_ERROR", "InternalError" },
+ { NM_AGENT_MANAGER_ERROR_NO_SECRETS, "NM_AGENT_MANAGER_ERROR_NO_SECRETS", "NoSecrets" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMAgentManagerError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_wimax_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_WIMAX_ERROR_CONNECTION_NOT_WIMAX, "NM_WIMAX_ERROR_CONNECTION_NOT_WIMAX", "ConnectionNotWimax" },
+ { NM_WIMAX_ERROR_CONNECTION_INVALID, "NM_WIMAX_ERROR_CONNECTION_INVALID", "ConnectionInvalid" },
+ { NM_WIMAX_ERROR_CONNECTION_INCOMPATIBLE, "NM_WIMAX_ERROR_CONNECTION_INCOMPATIBLE", "ConnectionIncompatible" },
+ { NM_WIMAX_ERROR_NSP_NOT_FOUND, "NM_WIMAX_ERROR_NSP_NOT_FOUND", "NspNotFound" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMWimaxError"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+GType
+nm_wimax_nsp_network_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile))
+ {
+ static const GEnumValue values[] = {
+ { NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN, "NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN", "unknown" },
+ { NM_WIMAX_NSP_NETWORK_TYPE_HOME, "NM_WIMAX_NSP_NETWORK_TYPE_HOME", "home" },
+ { NM_WIMAX_NSP_NETWORK_TYPE_PARTNER, "NM_WIMAX_NSP_NETWORK_TYPE_PARTNER", "partner" },
+ { NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER, "NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER", "roaming-partner" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("NMWimaxNspNetworkType"), values);
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+
+
diff --git a/src/generated/nm-enum-types.h b/src/generated/nm-enum-types.h
new file mode 100644
index 000000000..324dbf6a4
--- /dev/null
+++ b/src/generated/nm-enum-types.h
@@ -0,0 +1,89 @@
+
+
+
+/* Generated by glib-mkenums. Do not edit */
+
+#ifndef __NM_ENUM_TYPES_H__
+#define __NM_ENUM_TYPES_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+GType nm_vlan_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_VLAN_ERROR (nm_vlan_error_get_type ())
+GType nm_olpc_mesh_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_OLPC_MESH_ERROR (nm_olpc_mesh_error_get_type ())
+GType nm_device_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DEVICE_ERROR (nm_device_error_get_type ())
+GType nm_rf_kill_state_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_RF_KILL_STATE (nm_rf_kill_state_get_type ())
+GType nm_rf_kill_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_RF_KILL_TYPE (nm_rf_kill_type_get_type ())
+GType nm_ethernet_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_ETHERNET_ERROR (nm_ethernet_error_get_type ())
+GType nm_bt_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_BT_ERROR (nm_bt_error_get_type ())
+GType nm_wifi_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_WIFI_ERROR (nm_wifi_error_get_type ())
+GType nm_ip4_config_compare_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_IP4_CONFIG_COMPARE_FLAGS (nm_ip4_config_compare_flags_get_type ())
+GType nm_bond_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_BOND_ERROR (nm_bond_error_get_type ())
+GType nm_manager_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_MANAGER_ERROR (nm_manager_error_get_type ())
+GType nm_act_request_dependency_result_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_ACT_REQUEST_DEPENDENCY_RESULT (nm_act_request_dependency_result_get_type ())
+GType nm_session_monitor_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SESSION_MONITOR_ERROR (nm_session_monitor_error_get_type ())
+GType nm_infiniband_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_INFINIBAND_ERROR (nm_infiniband_error_get_type ())
+GType nm_ip6_config_compare_flags_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_IP6_CONFIG_COMPARE_FLAGS (nm_ip6_config_compare_flags_get_type ())
+GType nm_auth_call_result_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_AUTH_CALL_RESULT (nm_auth_call_result_get_type ())
+GType nm_config_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_CONFIG_ERROR (nm_config_error_get_type ())
+GType nm_nm_nl_prop_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_NM_NL_PROP (nm_nm_nl_prop_get_type ())
+GType nm_netlink_monitor_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_NETLINK_MONITOR_ERROR (nm_netlink_monitor_error_get_type ())
+GType nm_logging_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_LOGGING_ERROR (nm_logging_error_get_type ())
+GType nm_dns_manager_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DNS_MANAGER_ERROR (nm_dns_manager_error_get_type ())
+GType nm_dns_ip_config_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DNS_IP_CONFIG_TYPE (nm_dns_ip_config_type_get_type ())
+GType nm_vpn_manager_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_VPN_MANAGER_ERROR (nm_vpn_manager_error_get_type ())
+GType nm_dhcp_state_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DHCP_STATE (nm_dhcp_state_get_type ())
+GType nm_dhcp_manager_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DHCP_MANAGER_ERROR (nm_dhcp_manager_error_get_type ())
+GType nm_opt_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_OPT_TYPE (nm_opt_type_get_type ())
+GType nm_ppp_status_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_PPP_STATUS (nm_ppp_status_get_type ())
+GType nm_dns_masq_status_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_DNS_MASQ_STATUS (nm_dns_masq_status_get_type ())
+GType nm_cdma_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_CDMA_ERROR (nm_cdma_error_get_type ())
+GType nm_gsm_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_GSM_ERROR (nm_gsm_error_get_type ())
+GType nm_system_config_interface_capabilities_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SYSTEM_CONFIG_INTERFACE_CAPABILITIES (nm_system_config_interface_capabilities_get_type ())
+GType nm_system_config_interface_prop_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SYSTEM_CONFIG_INTERFACE_PROP (nm_system_config_interface_prop_get_type ())
+GType nm_settings_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_SETTINGS_ERROR (nm_settings_error_get_type ())
+GType nm_agent_manager_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_AGENT_MANAGER_ERROR (nm_agent_manager_error_get_type ())
+GType nm_wimax_error_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_WIMAX_ERROR (nm_wimax_error_get_type ())
+GType nm_wimax_nsp_network_type_get_type (void) G_GNUC_CONST;
+#define NM_TYPE_WIMAX_NSP_NETWORK_TYPE (nm_wimax_nsp_network_type_get_type ())
+G_END_DECLS
+
+#endif /* __NM_ENUM_TYPES_H__ */
+
+
+
diff --git a/src/generated/nm-marshal.c b/src/generated/nm-marshal.c
new file mode 100644
index 000000000..4ba973af2
--- /dev/null
+++ b/src/generated/nm-marshal.c
@@ -0,0 +1,705 @@
+#include "nm-marshal.h"
+
+#include <glib-object.h>
+
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v) g_value_get_int (v)
+#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
+#define g_marshal_value_peek_long(v) g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
+#define g_marshal_value_peek_float(v) g_value_get_float (v)
+#define g_marshal_value_peek_double(v) g_value_get_double (v)
+#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v) g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v) g_value_get_object (v)
+#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ * Do not access GValues directly in your code. Instead, use the
+ * g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
+#define g_marshal_value_peek_char(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v) (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v) (v)->data[0].v_float
+#define g_marshal_value_peek_double(v) (v)->data[0].v_double
+#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+
+/* BOOLEAN:VOID (nm-marshal.list:1) */
+void
+_nm_marshal_BOOLEAN__VOID (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__VOID callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 1);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* VOID:BOOLEAN,UINT (nm-marshal.list:2) */
+void
+_nm_marshal_VOID__BOOLEAN_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__BOOLEAN_UINT) (gpointer data1,
+ gboolean arg_1,
+ guint arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__BOOLEAN_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__BOOLEAN_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_boolean (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ data2);
+}
+
+/* VOID:INT,UINT,BOOLEAN (nm-marshal.list:3) */
+void
+_nm_marshal_VOID__INT_UINT_BOOLEAN (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__INT_UINT_BOOLEAN) (gpointer data1,
+ gint arg_1,
+ guint arg_2,
+ gboolean arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__INT_UINT_BOOLEAN callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__INT_UINT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_int (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ g_marshal_value_peek_boolean (param_values + 3),
+ data2);
+}
+
+/* VOID:OBJECT,STRING (nm-marshal.list:4) */
+void
+_nm_marshal_VOID__OBJECT_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ data2);
+}
+
+/* VOID:OBJECT,UINT,UINT (nm-marshal.list:5) */
+void
+_nm_marshal_VOID__OBJECT_UINT_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_UINT_UINT) (gpointer data1,
+ gpointer arg_1,
+ guint arg_2,
+ guint arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_UINT_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_UINT_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ g_marshal_value_peek_uint (param_values + 3),
+ data2);
+}
+
+/* VOID:POINTER (nm-marshal.list:6) */
+
+/* VOID:POINTER,POINTER,POINTER,POINTER,INT (nm-marshal.list:7) */
+void
+_nm_marshal_VOID__POINTER_POINTER_POINTER_POINTER_INT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__POINTER_POINTER_POINTER_POINTER_INT) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer arg_4,
+ gint arg_5,
+ gpointer data2);
+ register GMarshalFunc_VOID__POINTER_POINTER_POINTER_POINTER_INT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 6);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__POINTER_POINTER_POINTER_POINTER_INT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_pointer (param_values + 1),
+ g_marshal_value_peek_pointer (param_values + 2),
+ g_marshal_value_peek_pointer (param_values + 3),
+ g_marshal_value_peek_pointer (param_values + 4),
+ g_marshal_value_peek_int (param_values + 5),
+ data2);
+}
+
+/* VOID:POINTER,STRING (nm-marshal.list:8) */
+void
+_nm_marshal_VOID__POINTER_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__POINTER_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__POINTER_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__POINTER_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_pointer (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ data2);
+}
+
+/* VOID:STRING,BOXED (nm-marshal.list:9) */
+void
+_nm_marshal_VOID__STRING_BOXED (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_BOXED callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_boxed (param_values + 2),
+ data2);
+}
+
+/* VOID:STRING,BOXED,BOXED (nm-marshal.list:10) */
+void
+_nm_marshal_VOID__STRING_BOXED_BOXED (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_BOXED_BOXED callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_boxed (param_values + 2),
+ g_marshal_value_peek_boxed (param_values + 3),
+ data2);
+}
+
+/* VOID:STRING,OBJECT (nm-marshal.list:11) */
+void
+_nm_marshal_VOID__STRING_OBJECT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_OBJECT) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_OBJECT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_OBJECT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_object (param_values + 2),
+ data2);
+}
+
+/* VOID:STRING,OBJECT,POINTER (nm-marshal.list:12) */
+void
+_nm_marshal_VOID__STRING_OBJECT_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_OBJECT_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_OBJECT_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_object (param_values + 2),
+ g_marshal_value_peek_pointer (param_values + 3),
+ data2);
+}
+
+/* VOID:STRING,POINTER (nm-marshal.list:13) */
+void
+_nm_marshal_VOID__STRING_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_pointer (param_values + 2),
+ data2);
+}
+
+/* VOID:STRING,STRING (nm-marshal.list:14) */
+void
+_nm_marshal_VOID__STRING_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ data2);
+}
+
+/* VOID:STRING,STRING,STRING (nm-marshal.list:15) */
+void
+_nm_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ data2);
+}
+
+/* VOID:STRING,STRING,STRING,UINT (nm-marshal.list:16) */
+void
+_nm_marshal_VOID__STRING_STRING_STRING_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_UINT) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ guint arg_4,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_STRING_STRING_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 5);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_STRING_STRING_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ g_marshal_value_peek_uint (param_values + 4),
+ data2);
+}
+
+/* VOID:UINT,UINT (nm-marshal.list:17) */
+void
+_nm_marshal_VOID__UINT_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1,
+ guint arg_1,
+ guint arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__UINT_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_uint (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ data2);
+}
+
+/* VOID:UINT,UINT,UINT (nm-marshal.list:18) */
+void
+_nm_marshal_VOID__UINT_UINT_UINT (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1,
+ guint arg_1,
+ guint arg_2,
+ guint arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__UINT_UINT_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_uint (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ g_marshal_value_peek_uint (param_values + 3),
+ data2);
+}
+
diff --git a/src/generated/nm-marshal.h b/src/generated/nm-marshal.h
new file mode 100644
index 000000000..9f9ea6ad6
--- /dev/null
+++ b/src/generated/nm-marshal.h
@@ -0,0 +1,151 @@
+
+#ifndef ___nm_marshal_MARSHAL_H__
+#define ___nm_marshal_MARSHAL_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* BOOLEAN:VOID (nm-marshal.list:1) */
+extern void _nm_marshal_BOOLEAN__VOID (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:BOOLEAN,UINT (nm-marshal.list:2) */
+extern void _nm_marshal_VOID__BOOLEAN_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:INT,UINT,BOOLEAN (nm-marshal.list:3) */
+extern void _nm_marshal_VOID__INT_UINT_BOOLEAN (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,STRING (nm-marshal.list:4) */
+extern void _nm_marshal_VOID__OBJECT_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,UINT,UINT (nm-marshal.list:5) */
+extern void _nm_marshal_VOID__OBJECT_UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:POINTER (nm-marshal.list:6) */
+#define _nm_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER
+
+/* VOID:POINTER,POINTER,POINTER,POINTER,INT (nm-marshal.list:7) */
+extern void _nm_marshal_VOID__POINTER_POINTER_POINTER_POINTER_INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:POINTER,STRING (nm-marshal.list:8) */
+extern void _nm_marshal_VOID__POINTER_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,BOXED (nm-marshal.list:9) */
+extern void _nm_marshal_VOID__STRING_BOXED (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,BOXED,BOXED (nm-marshal.list:10) */
+extern void _nm_marshal_VOID__STRING_BOXED_BOXED (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,OBJECT (nm-marshal.list:11) */
+extern void _nm_marshal_VOID__STRING_OBJECT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,OBJECT,POINTER (nm-marshal.list:12) */
+extern void _nm_marshal_VOID__STRING_OBJECT_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,POINTER (nm-marshal.list:13) */
+extern void _nm_marshal_VOID__STRING_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,STRING (nm-marshal.list:14) */
+extern void _nm_marshal_VOID__STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,STRING,STRING (nm-marshal.list:15) */
+extern void _nm_marshal_VOID__STRING_STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:STRING,STRING,STRING,UINT (nm-marshal.list:16) */
+extern void _nm_marshal_VOID__STRING_STRING_STRING_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:UINT,UINT (nm-marshal.list:17) */
+extern void _nm_marshal_VOID__UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:UINT,UINT,UINT (nm-marshal.list:18) */
+extern void _nm_marshal_VOID__UINT_UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+G_END_DECLS
+
+#endif /* ___nm_marshal_MARSHAL_H__ */
+
diff --git a/src/ip6-manager/Makefile.am b/src/ip6-manager/Makefile.am
index b98d6def7..016fc25dd 100644
--- a/src/ip6-manager/Makefile.am
+++ b/src/ip6-manager/Makefile.am
@@ -1,8 +1,11 @@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
- -I${top_builddir}/marshallers \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src
@@ -19,7 +22,7 @@ libip6_manager_la_CPPFLAGS = \
-DG_DISABLE_DEPRECATED
libip6_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS) \
diff --git a/src/ip6-manager/Makefile.in b/src/ip6-manager/Makefile.in
index 6eb818c03..59c2e7b4b 100644
--- a/src/ip6-manager/Makefile.in
+++ b/src/ip6-manager/Makefile.in
@@ -57,7 +57,7 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libip6_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
@@ -142,6 +142,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -196,11 +198,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -211,6 +217,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -250,6 +257,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,8 +325,11 @@ top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
- -I${top_builddir}/marshallers \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src
@@ -333,7 +345,7 @@ libip6_manager_la_CPPFLAGS = \
-DG_DISABLE_DEPRECATED
libip6_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS) \
diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c
index 503dab51d..99f85ede2 100644
--- a/src/ip6-manager/nm-ip6-manager.c
+++ b/src/ip6-manager/nm-ip6-manager.c
@@ -91,7 +91,7 @@ typedef struct {
char *disable_ip6_path;
gboolean disable_ip6_save_valid;
- guint32 disable_ip6_save;
+ gint32 disable_ip6_save;
guint finish_addrconf_id;
guint config_changed_id;
@@ -112,6 +112,14 @@ typedef struct {
} NMIP6Device;
static void
+clear_config_changed (NMIP6Device *device)
+{
+ if (device->config_changed_id)
+ g_source_remove (device->config_changed_id);
+ device->config_changed_id = 0;
+}
+
+static void
nm_ip6_device_destroy (NMIP6Device *device)
{
g_return_if_fail (device != NULL);
@@ -124,8 +132,9 @@ nm_ip6_device_destroy (NMIP6Device *device)
if (device->finish_addrconf_id)
g_source_remove (device->finish_addrconf_id);
- if (device->config_changed_id)
- g_source_remove (device->config_changed_id);
+
+ clear_config_changed (device);
+
g_free (device->iface);
if (device->rdnss_servers)
g_array_free (device->rdnss_servers, TRUE);
@@ -176,9 +185,10 @@ nm_ip6_device_new (NMIP6Manager *manager, int ifindex)
device->disable_ip6_path = g_strdup_printf ("/proc/sys/net/ipv6/conf/%s/disable_ipv6",
device->iface);
g_assert (device->disable_ip6_path);
- device->disable_ip6_save_valid = nm_utils_get_proc_sys_net_value (device->disable_ip6_path,
- device->iface,
- &device->disable_ip6_save);
+ device->disable_ip6_save_valid = nm_utils_get_proc_sys_net_value_with_bounds (device->disable_ip6_path,
+ device->iface,
+ &device->disable_ip6_save,
+ 0, 1);
return device;
@@ -267,6 +277,7 @@ rdnss_expired (gpointer user_data)
nm_log_dbg (LOGD_IP6, "(%s): IPv6 RDNSS information expired", device->iface);
set_rdnss_timeout (device);
+ clear_config_changed (device);
emit_config_changed (&info);
return FALSE;
}
@@ -321,11 +332,12 @@ static gboolean
dnssl_expired (gpointer user_data)
{
NMIP6Device *device = user_data;
- CallbackInfo info = { device, IP6_DHCP_OPT_NONE };
+ CallbackInfo info = { device, IP6_DHCP_OPT_NONE, FALSE };
nm_log_dbg (LOGD_IP6, "(%s): IPv6 DNSSL information expired", device->iface);
set_dnssl_timeout (device);
+ clear_config_changed (device);
emit_config_changed (&info);
return FALSE;
}
@@ -434,8 +446,9 @@ nm_ip6_device_sync_from_netlink (NMIP6Device *device, gboolean config_changed)
addr = nl_addr_get_binary_addr (nladdr);
if (inet_ntop (AF_INET6, addr, buf, INET6_ADDRSTRLEN) > 0) {
- nm_log_dbg (LOGD_IP6, "(%s): netlink address: %s",
- device->iface, buf);
+ nm_log_dbg (LOGD_IP6, "(%s): netlink address: %s/%d",
+ device->iface, buf,
+ rtnl_addr_get_prefixlen (rtnladdr));
}
if (IN6_IS_ADDR_LINKLOCAL (addr)) {
@@ -972,6 +985,28 @@ static struct nla_policy link_prot_policy[IFLA_INET6_MAX + 1] = {
[IFLA_INET6_FLAGS] = { .type = NLA_U32 },
};
+static char *
+ra_flags_to_string (guint32 ra_flags)
+{
+ GString *s = g_string_sized_new (20);
+
+ g_string_append (s, " (");
+ if (ra_flags & IF_RS_SENT)
+ g_string_append_c (s, 'S');
+
+ if (ra_flags & IF_RA_RCVD)
+ g_string_append_c (s, 'R');
+
+ if (ra_flags & IF_RA_OTHERCONF)
+ g_string_append_c (s, 'O');
+
+ if (ra_flags & IF_RA_MANAGED)
+ g_string_append_c (s, 'M');
+
+ g_string_append_c (s, ')');
+ return g_string_free (s, FALSE);
+}
+
static NMIP6Device *
process_newlink (NMIP6Manager *manager, struct nl_msg *msg)
{
@@ -981,6 +1016,7 @@ process_newlink (NMIP6Manager *manager, struct nl_msg *msg)
struct nlattr *tb[IFLA_MAX + 1];
struct nlattr *pi[IFLA_INET6_MAX + 1];
int err;
+ char *flags_str = NULL;
/* FIXME: we have to do this manually for now since libnl doesn't yet
* support the IFLA_PROTINFO attribute of NEWLINK messages. When it does,
@@ -1024,7 +1060,12 @@ process_newlink (NMIP6Manager *manager, struct nl_msg *msg)
}
device->ra_flags = nla_get_u32 (pi[IFLA_INET6_FLAGS]);
- nm_log_dbg (LOGD_IP6, "(%s): got IPv6 flags 0x%X", device->iface, device->ra_flags);
+
+ if (nm_logging_level_enabled (LOGL_DEBUG))
+ flags_str = ra_flags_to_string (device->ra_flags);
+ nm_log_dbg (LOGD_IP6, "(%s): got IPv6 flags 0x%X%s",
+ device->iface, device->ra_flags, flags_str ? flags_str : "");
+ g_free (flags_str);
return device;
}
@@ -1038,7 +1079,7 @@ netlink_notification (NMNetlinkMonitor *monitor, struct nl_msg *msg, gpointer us
gboolean config_changed = FALSE;
hdr = nlmsg_hdr (msg);
- nm_log_dbg (LOGD_HW, "netlink notificate type %d", hdr->nlmsg_type);
+ nm_log_dbg (LOGD_HW, "netlink event type %d", hdr->nlmsg_type);
switch (hdr->nlmsg_type) {
case RTM_NEWADDR:
case RTM_DELADDR:
diff --git a/src/logging/Makefile.in b/src/logging/Makefile.in
index 722745075..c73f71b46 100644
--- a/src/logging/Makefile.in
+++ b/src/logging/Makefile.in
@@ -138,6 +138,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -192,11 +194,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -207,6 +213,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -246,6 +253,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c
index 078f15272..a2b0ebaf4 100644
--- a/src/logging/nm-logging.c
+++ b/src/logging/nm-logging.c
@@ -23,7 +23,6 @@
#include <dlfcn.h>
#include <syslog.h>
-#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -47,7 +46,7 @@ static guint32 log_domains = \
LOGD_DHCP4 | LOGD_DHCP6 | LOGD_PPP | LOGD_IP4 | LOGD_IP6 | LOGD_AUTOIP4 | \
LOGD_DNS | LOGD_VPN | LOGD_SHARING | LOGD_SUPPLICANT | LOGD_AGENTS | \
LOGD_SETTINGS | LOGD_SUSPEND | LOGD_CORE | LOGD_DEVICE | LOGD_OLPC_MESH | \
- LOGD_WIMAX;
+ LOGD_WIMAX | LOGD_INFINIBAND | LOGD_FIREWALL;
typedef struct {
guint32 num;
@@ -88,18 +87,13 @@ static const LogDesc domain_descs[] = {
{ LOGD_DEVICE, "DEVICE" },
{ LOGD_OLPC_MESH, "OLPC" },
{ LOGD_WIMAX, "WIMAX" },
+ { LOGD_INFINIBAND,"INFINIBAND" },
+ { LOGD_FIREWALL, "FIREWALL" },
{ 0, NULL }
};
/************************************************************************/
-enum {
- NM_LOGGING_ERROR_UNKNOWN_LEVEL = 0,
- NM_LOGGING_ERROR_UNKNOWN_DOMAIN = 1,
-};
-
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
GQuark
nm_logging_error_quark (void)
{
@@ -110,22 +104,6 @@ nm_logging_error_quark (void)
return ret;
}
-GType
-nm_logging_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_LOGGING_ERROR_UNKNOWN_LEVEL, "UnknownLevel"),
- ENUM_ENTRY (NM_LOGGING_ERROR_UNKNOWN_DOMAIN, "UnknownDomain"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMLoggingError", values);
- }
- return etype;
-}
-
/************************************************************************/
gboolean
diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h
index e3e05f59b..7e27f311b 100644
--- a/src/logging/nm-logging.h
+++ b/src/logging/nm-logging.h
@@ -52,6 +52,8 @@ enum {
LOGD_DEVICE = 0x00200000, /* Device state and activation */
LOGD_OLPC_MESH = 0x00400000,
LOGD_WIMAX = 0x00800000,
+ LOGD_INFINIBAND = 0x01000000,
+ LOGD_FIREWALL = 0x02000000,
};
#define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6)
@@ -64,10 +66,13 @@ enum {
LOGL_DEBUG = 0x00000008
};
+typedef enum {
+ NM_LOGGING_ERROR_UNKNOWN_LEVEL = 0, /*< nick=UnknownLevel >*/
+ NM_LOGGING_ERROR_UNKNOWN_DOMAIN = 1, /*< nick=UnknownDomain >*/
+} NMLoggingError;
+
#define NM_LOGGING_ERROR (nm_logging_error_quark ())
-#define NM_TYPE_LOGGING_ERROR (nm_logging_error_get_type ())
GQuark nm_logging_error_quark (void);
-GType nm_logging_error_get_type (void);
#define nm_log_err(domain, ...) \
diff --git a/src/main.c b/src/main.c
index 12a0b8938..4a21959f5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2004 - 2011 Red Hat, Inc.
+ * Copyright (C) 2004 - 2012 Red Hat, Inc.
* Copyright (C) 2005 - 2008 Novell, Inc.
*/
@@ -25,6 +25,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
#include <getopt.h>
+#include <locale.h>
#include <errno.h>
#include <stdlib.h>
#include <signal.h>
@@ -40,11 +41,12 @@
#include "NetworkManagerUtils.h"
#include "nm-manager.h"
#include "nm-policy.h"
-#include "nm-system.h"
+#include "backends/nm-backend.h"
#include "nm-dns-manager.h"
#include "nm-dbus-manager.h"
#include "nm-supplicant-manager.h"
#include "nm-dhcp-manager.h"
+#include "nm-firewall-manager.h"
#include "nm-hostname-provider.h"
#include "nm-netlink-monitor.h"
#include "nm-vpn-manager.h"
@@ -66,80 +68,6 @@ static NMManager *manager = NULL;
static GMainLoop *main_loop = NULL;
static int quit_pipe[2] = { -1, -1 };
-typedef struct {
- time_t time;
- GQuark domain;
- guint32 code;
- guint32 count;
-} MonitorInfo;
-
-static gboolean
-detach_monitor (gpointer data)
-{
- nm_log_warn (LOGD_HW, "detaching netlink event monitor");
- nm_netlink_monitor_detach (NM_NETLINK_MONITOR (data));
- return FALSE;
-}
-
-static void
-nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor,
- GError *error,
- gpointer user_data)
-{
- MonitorInfo *info = (MonitorInfo *) user_data;
- time_t now;
-
- now = time (NULL);
-
- if ( (info->domain != error->domain)
- || (info->code != error->code)
- || (info->time && now > info->time + 10)) {
- /* FIXME: Try to handle the error instead of just printing it. */
- nm_log_warn (LOGD_HW, "error monitoring device for netlink events: %s\n", error->message);
-
- info->time = now;
- info->domain = error->domain;
- info->code = error->code;
- info->count = 0;
- }
-
- info->count++;
- if (info->count > 100) {
- /* Broken drivers will sometimes cause a flood of netlink errors.
- * rh #459205, novell #443429, lp #284507
- */
- nm_log_warn (LOGD_HW, "excessive netlink errors ocurred, disabling netlink monitor.");
- nm_log_warn (LOGD_HW, "link change events will not be processed.");
- g_idle_add_full (G_PRIORITY_HIGH, detach_monitor, monitor, NULL);
- }
-}
-
-static gboolean
-nm_monitor_setup (GError **error)
-{
- NMNetlinkMonitor *monitor;
- MonitorInfo *info;
-
- monitor = nm_netlink_monitor_get ();
- if (!nm_netlink_monitor_open_connection (monitor, error)) {
- g_object_unref (monitor);
- return FALSE;
- }
-
- info = g_new0 (MonitorInfo, 1);
- g_signal_connect_data (G_OBJECT (monitor), "error",
- G_CALLBACK (nm_error_monitoring_device_link_state),
- info,
- (GClosureNotify) g_free,
- 0);
- nm_netlink_monitor_attach (monitor);
-
- /* Request initial status of cards */
- nm_netlink_monitor_request_status (monitor, NULL);
-
- return TRUE;
-}
-
static gboolean quit_early = FALSE;
static void
@@ -212,7 +140,7 @@ setup_signals (void)
/* Set up our quit pipe */
if (pipe (quit_pipe) < 0) {
- fprintf (stderr, "Failed to initialze SIGTERM pipe: %d", errno);
+ fprintf (stderr, _("Failed to initialize SIGTERM pipe: %d"), errno);
exit (1);
}
fcntl (quit_pipe[1], F_SETFL, O_NONBLOCK | fcntl (quit_pipe[1], F_GETFL));
@@ -243,18 +171,18 @@ write_pidfile (const char *pidfile)
gboolean success = FALSE;
if ((fd = open (pidfile, O_CREAT|O_WRONLY|O_TRUNC, 00644)) < 0) {
- fprintf (stderr, "Opening %s failed: %s\n", pidfile, strerror (errno));
+ fprintf (stderr, _("Opening %s failed: %s\n"), pidfile, strerror (errno));
return FALSE;
}
snprintf (pid, sizeof (pid), "%d", getpid ());
if (write (fd, pid, strlen (pid)) < 0)
- fprintf (stderr, "Writing to %s failed: %s\n", pidfile, strerror (errno));
+ fprintf (stderr, _("Writing to %s failed: %s\n"), pidfile, strerror (errno));
else
success = TRUE;
if (close (fd))
- fprintf (stderr, "Closing %s failed: %s\n", pidfile, strerror (errno));
+ fprintf (stderr, _("Closing %s failed: %s\n"), pidfile, strerror (errno));
return success;
}
@@ -297,7 +225,7 @@ check_pidfile (const char *pidfile)
if (strcmp (process_name, "NetworkManager") == 0) {
/* Check that the process exists */
if (kill (pid, 0) == 0) {
- fprintf (stderr, "NetworkManager is already running (pid %ld)\n", pid);
+ fprintf (stderr, _("NetworkManager is already running (pid %ld)\n"), pid);
nm_running = TRUE;
}
}
@@ -341,8 +269,7 @@ parse_state_file (const char *filename,
* /var/lib/NetworkManager for us since we have to ensure that
* users upgrading NM get this working too.
*/
- if ( tmp_error->domain == G_FILE_ERROR
- && tmp_error->code == G_FILE_ERROR_NOENT) {
+ if (g_error_matches (tmp_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
char *data, *dirname;
gsize len = 0;
@@ -419,6 +346,9 @@ main (int argc, char *argv[])
char *pidfile = NULL, *state_file = NULL;
char *config_path = NULL, *plugins = NULL;
char *log_level = NULL, *log_domains = NULL;
+ char *connectivity_uri = NULL;
+ gint connectivity_interval = -1;
+ char *connectivity_response = NULL;
gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE, wimax_enabled = TRUE;
gboolean success, show_version = FALSE;
NMPolicy *policy = NULL;
@@ -427,47 +357,58 @@ main (int argc, char *argv[])
NMDBusManager *dbus_mgr = NULL;
NMSupplicantManager *sup_mgr = NULL;
NMDHCPManager *dhcp_mgr = NULL;
+ NMFirewallManager *fw_mgr = NULL;
NMSettings *settings = NULL;
NMConfig *config;
+ NMNetlinkMonitor *monitor = NULL;
GError *error = NULL;
gboolean wrote_pidfile = FALSE;
GOptionEntry options[] = {
- { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, "Print NetworkManager version and exit", NULL },
- { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &become_daemon, "Don't become a daemon", NULL },
- { "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &g_fatal_warnings, "Make all warnings fatal", NULL },
- { "pid-file", 0, 0, G_OPTION_ARG_FILENAME, &pidfile, "Specify the location of a PID file", "filename" },
- { "state-file", 0, 0, G_OPTION_ARG_FILENAME, &state_file, "State file location", "/path/to/state.file" },
- { "config", 0, 0, G_OPTION_ARG_FILENAME, &config_path, "Config file location", "/path/to/config.file" },
- { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" },
- { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" },
+ { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Print NetworkManager version and exit"), NULL },
+ { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &become_daemon, N_("Don't become a daemon"), NULL },
+ { "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &g_fatal_warnings, N_("Make all warnings fatal"), NULL },
+ { "pid-file", 0, 0, G_OPTION_ARG_FILENAME, &pidfile, N_("Specify the location of a PID file"), N_("filename") },
+ { "state-file", 0, 0, G_OPTION_ARG_FILENAME, &state_file, N_("State file location"), N_("/path/to/state.file") },
+ { "config", 0, 0, G_OPTION_ARG_FILENAME, &config_path, N_("Config file location"), N_("/path/to/config.file") },
+ { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, N_("List of plugins separated by ','"), N_("plugin1,plugin2") },
+ /* Translators: Do not translate the values in the square brackets */
+ { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, N_("Log level: one of [ERR, WARN, INFO, DEBUG]"), "INFO" },
{ "log-domains", 0, 0, G_OPTION_ARG_STRING, &log_domains,
- "Log domains separated by ',': any combination of\n"
+ /* Translators: Do not translate the values in the square brackets */
+ N_("Log domains separated by ',': any combination of\n"
" [NONE,HW,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,\n"
" WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,\n"
- " AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,WIMAX]",
+ " AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,WIMAX,\n"
+ " INFINIBAND,FIREWALL]"),
"HW,RFKILL,WIFI" },
+ { "connectivity-uri", 0, 0, G_OPTION_ARG_STRING, &connectivity_uri, "A http(s) address to check internet connectivity" },
+ { "connectivity-interval", 0, 0, G_OPTION_ARG_INT, &connectivity_interval, "the interval in seconds how often a connectivity check will be done" },
+ { "connectivity-response", 0, 0, G_OPTION_ARG_STRING, &connectivity_response, "the expected start of the response" },
{NULL}
};
if (!g_module_supported ()) {
- fprintf (stderr, "GModules are not supported on your platform!\n");
+ fprintf (stderr, _("GModules are not supported on your platform!\n"));
exit (1);
}
+ /* Set locale to be able to use environment variables */
+ setlocale (LC_ALL, "");
+
bindtextdomain (GETTEXT_PACKAGE, NMLOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
/* Parse options */
- opt_ctx = g_option_context_new ("");
- g_option_context_set_translation_domain (opt_ctx, "UTF-8");
+ opt_ctx = g_option_context_new (NULL);
+ g_option_context_set_translation_domain (opt_ctx, GETTEXT_PACKAGE);
g_option_context_set_ignore_unknown_options (opt_ctx, FALSE);
g_option_context_set_help_enabled (opt_ctx, TRUE);
g_option_context_add_main_entries (opt_ctx, options, NULL);
g_option_context_set_summary (opt_ctx,
- "NetworkManager monitors all network connections and automatically\nchooses the best connection to use. It also allows the user to\nspecify wireless access points which wireless cards in the computer\nshould associate with.");
+ _("NetworkManager monitors all network connections and automatically\nchooses the best connection to use. It also allows the user to\nspecify wireless access points which wireless cards in the computer\nshould associate with."));
success = g_option_context_parse (opt_ctx, &argc, &argv, NULL);
g_option_context_free (opt_ctx);
@@ -483,7 +424,7 @@ main (int argc, char *argv[])
}
if (getuid () != 0) {
- fprintf (stderr, "You must be root to run NetworkManager!\n");
+ fprintf (stderr, _("You must be root to run NetworkManager!\n"));
exit (1);
}
@@ -501,11 +442,12 @@ main (int argc, char *argv[])
exit (1);
/* Read the config file and CLI overrides */
- config = nm_config_new (config_path, plugins, log_level, log_domains, &error);
+ config = nm_config_new (config_path, plugins, log_level, log_domains,
+ connectivity_uri, connectivity_interval, connectivity_response, &error);
if (config == NULL) {
- fprintf (stderr, "Failed to read configuration: (%d) %s\n",
+ fprintf (stderr, _("Failed to read configuration: (%d) %s\n"),
error ? error->code : -1,
- (error && error->message) ? error->message : "unknown");
+ (error && error->message) ? error->message : _("unknown"));
exit (1);
}
@@ -521,10 +463,10 @@ main (int argc, char *argv[])
/* Parse the state file */
if (!parse_state_file (state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &wimax_enabled, &error)) {
- fprintf (stderr, "State file %s parsing failed: (%d) %s\n",
+ fprintf (stderr, _("State file %s parsing failed: (%d) %s\n"),
state_file,
error ? error->code : -1,
- (error && error->message) ? error->message : "unknown");
+ (error && error->message) ? error->message : _("unknown"));
/* Not a hard failure */
}
g_clear_error (&error);
@@ -538,7 +480,7 @@ main (int argc, char *argv[])
int saved_errno;
saved_errno = errno;
- fprintf (stderr, "Could not daemonize: %s [error %u]\n",
+ fprintf (stderr, _("Could not daemonize: %s [error %u]\n"),
g_strerror (saved_errno),
saved_errno);
exit (1);
@@ -598,12 +540,8 @@ main (int argc, char *argv[])
main_loop = g_main_loop_new (NULL, FALSE);
- /* Create watch functions that monitor cards for link status. */
- if (!nm_monitor_setup (&error)) {
- nm_log_err (LOGD_CORE, "failed to start monitoring devices: %s.",
- error && error->message ? error->message : "(unknown)");
- goto done;
- }
+ /* Create netlink monitor object */
+ monitor = nm_netlink_monitor_get ();
/* Initialize our DBus service & connection */
dbus_mgr = nm_dbus_manager_get ();
@@ -635,6 +573,9 @@ main (int argc, char *argv[])
wifi_enabled,
wwan_enabled,
wimax_enabled,
+ nm_config_get_connectivity_uri (config),
+ nm_config_get_connectivity_interval (config),
+ nm_config_get_connectivity_response (config),
&error);
if (manager == NULL) {
nm_log_err (LOGD_CORE, "failed to initialize the network manager: %s",
@@ -664,6 +605,13 @@ main (int argc, char *argv[])
nm_dhcp_manager_set_hostname_provider (dhcp_mgr, NM_HOSTNAME_PROVIDER (manager));
+ /* Initialize Firewall manager */
+ fw_mgr = nm_firewall_manager_get ();
+ if (!fw_mgr) {
+ nm_log_err (LOGD_CORE, "failed to start the Firewall manager: %s.", error->message);
+ goto done;
+ }
+
/* Start our DBus service */
if (!nm_dbus_manager_start_service (dbus_mgr)) {
nm_log_err (LOGD_CORE, "failed to start the dbus service.");
@@ -676,7 +624,7 @@ main (int argc, char *argv[])
nm_manager_start (manager);
/* Bring up the loopback interface. */
- nm_system_enable_loopback ();
+ nm_backend_enable_loopback ();
success = TRUE;
@@ -708,6 +656,9 @@ done:
if (sup_mgr)
g_object_unref (sup_mgr);
+ if (fw_mgr)
+ g_object_unref (fw_mgr);
+
if (dbus_mgr)
g_object_unref (dbus_mgr);
@@ -725,6 +676,8 @@ done:
g_free (plugins);
g_free (log_level);
g_free (log_domains);
+ g_free (connectivity_uri);
+ g_free (connectivity_response);
nm_log_info (LOGD_CORE, "exiting (%s)", success ? "success" : "error");
exit (success ? 0 : 1);
diff --git a/src/modem-manager/Makefile.am b/src/modem-manager/Makefile.am
index 3c3af16c5..a5c6a6681 100644
--- a/src/modem-manager/Makefile.am
+++ b/src/modem-manager/Makefile.am
@@ -1,9 +1,14 @@
+include $(GLIB_MAKEFILE)
+
INCLUDES = \
-I${top_srcdir}/src \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
- -I${top_builddir}/marshallers
+ -I${top_builddir}/libnm-util
noinst_LTLIBRARIES = libmodem-manager.la
@@ -23,7 +28,7 @@ libmodem_manager_la_CPPFLAGS = \
$(DBUS_CFLAGS)
libmodem_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS)
diff --git a/src/modem-manager/Makefile.in b/src/modem-manager/Makefile.in
index 494bb1be5..87afed0c7 100644
--- a/src/modem-manager/Makefile.in
+++ b/src/modem-manager/Makefile.in
@@ -57,7 +57,7 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libmodem_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libmodem_manager_la_OBJECTS = libmodem_manager_la-nm-modem.lo \
@@ -144,6 +144,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -198,11 +200,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -213,6 +219,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -252,6 +259,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -317,10 +326,13 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir}/src \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
- -I${top_builddir}/marshallers
+ -I${top_builddir}/libnm-util
noinst_LTLIBRARIES = libmodem-manager.la
libmodem_manager_la_SOURCES = \
@@ -339,7 +351,7 @@ libmodem_manager_la_CPPFLAGS = \
$(DBUS_CFLAGS)
libmodem_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS)
@@ -663,6 +675,7 @@ uninstall-am:
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am
+include $(GLIB_MAKEFILE)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/modem-manager/nm-modem-cdma.c b/src/modem-manager/nm-modem-cdma.c
index 5db6a84f3..fa19a3425 100644
--- a/src/modem-manager/nm-modem-cdma.c
+++ b/src/modem-manager/nm-modem-cdma.c
@@ -27,11 +27,13 @@
#include "nm-dbus-glib-types.h"
#include "nm-modem-cdma.h"
#include "nm-modem-types.h"
+#include "nm-enum-types.h"
#include "nm-device.h"
#include "nm-device-private.h"
#include "nm-dbus-manager.h"
#include "nm-setting-connection.h"
#include "nm-setting-cdma.h"
+#include "nm-setting-ppp.h"
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
@@ -46,14 +48,7 @@ typedef struct {
} NMModemCdmaPrivate;
-typedef enum {
- NM_CDMA_ERROR_CONNECTION_NOT_CDMA = 0,
- NM_CDMA_ERROR_CONNECTION_INVALID,
- NM_CDMA_ERROR_CONNECTION_INCOMPATIBLE,
-} NMCdmaError;
-
#define NM_CDMA_ERROR (nm_cdma_error_quark ())
-#define NM_TYPE_CDMA_ERROR (nm_cdma_error_get_type ())
static GQuark
nm_cdma_error_quark (void)
@@ -64,29 +59,6 @@ nm_cdma_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_cdma_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a CDMA connection. */
- ENUM_ENTRY (NM_CDMA_ERROR_CONNECTION_NOT_CDMA, "ConnectionNotCdma"),
- /* Connection was not a valid CDMA connection. */
- ENUM_ENTRY (NM_CDMA_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_CDMA_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMCdmaError", values);
- }
- return etype;
-}
-
NMModem *
nm_modem_cdma_new (const char *path,
@@ -169,7 +141,7 @@ create_connect_properties (NMConnection *connection)
GHashTable *properties;
const char *str;
- setting = NM_SETTING_CDMA (nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA));
+ setting = nm_connection_get_setting_cdma (connection);
properties = value_hash_create ();
str = nm_setting_cdma_get_number (setting);
@@ -230,7 +202,7 @@ real_get_best_auto_connection (NMModem *modem,
NMConnection *connection = NM_CONNECTION (iter->data);
NMSettingConnection *s_con;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (!nm_setting_connection_get_autoconnect (s_con))
@@ -252,7 +224,7 @@ real_check_connection_compatible (NMModem *modem,
NMSettingConnection *s_con;
NMSettingCdma *s_cdma;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_CDMA_SETTING_NAME)) {
@@ -262,7 +234,7 @@ real_check_connection_compatible (NMModem *modem,
return FALSE;
}
- s_cdma = NM_SETTING_CDMA (nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA));
+ s_cdma = nm_connection_get_setting_cdma (connection);
if (!s_cdma) {
g_set_error (error,
NM_CDMA_ERROR, NM_CDMA_ERROR_CONNECTION_INVALID,
@@ -280,8 +252,9 @@ real_complete_connection (NMModem *modem,
GError **error)
{
NMSettingCdma *s_cdma;
+ NMSettingPPP *s_ppp;
- s_cdma = (NMSettingCdma *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA);
+ s_cdma = nm_connection_get_setting_cdma (connection);
if (!s_cdma) {
s_cdma = (NMSettingCdma *) nm_setting_cdma_new ();
nm_connection_add_setting (connection, NM_SETTING (s_cdma));
@@ -290,6 +263,16 @@ real_complete_connection (NMModem *modem,
if (!nm_setting_cdma_get_number (s_cdma))
g_object_set (G_OBJECT (s_cdma), NM_SETTING_CDMA_NUMBER, "#777", NULL);
+ s_ppp = nm_connection_get_setting_ppp (connection);
+ if (!s_ppp) {
+ s_ppp = (NMSettingPPP *) nm_setting_ppp_new ();
+ g_object_set (G_OBJECT (s_ppp),
+ NM_SETTING_PPP_LCP_ECHO_FAILURE, 5,
+ NM_SETTING_PPP_LCP_ECHO_INTERVAL, 30,
+ NULL);
+ nm_connection_add_setting (connection, NM_SETTING (s_ppp));
+ }
+
nm_utils_complete_generic (connection,
NM_SETTING_CDMA_SETTING_NAME,
existing_connections,
@@ -308,7 +291,7 @@ real_get_user_pass (NMModem *modem,
{
NMSettingCdma *s_cdma;
- s_cdma = (NMSettingCdma *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA);
+ s_cdma = nm_connection_get_setting_cdma (connection);
if (!s_cdma)
return FALSE;
diff --git a/src/modem-manager/nm-modem-cdma.h b/src/modem-manager/nm-modem-cdma.h
index 0abe4e0cf..2229c1837 100644
--- a/src/modem-manager/nm-modem-cdma.h
+++ b/src/modem-manager/nm-modem-cdma.h
@@ -33,6 +33,12 @@ G_BEGIN_DECLS
#define NM_IS_MODEM_CDMA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_MODEM_CDMA))
#define NM_MODEM_CDMA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_MODEM_CDMA, NMModemCdmaClass))
+typedef enum {
+ NM_CDMA_ERROR_CONNECTION_NOT_CDMA = 0, /*< nick=ConnectionNotCdma >*/
+ NM_CDMA_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_CDMA_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMCdmaError;
+
typedef struct {
NMModem parent;
} NMModemCdma;
diff --git a/src/modem-manager/nm-modem-gsm.c b/src/modem-manager/nm-modem-gsm.c
index 9a96ae99c..183b4780b 100644
--- a/src/modem-manager/nm-modem-gsm.c
+++ b/src/modem-manager/nm-modem-gsm.c
@@ -30,7 +30,9 @@
#include "nm-device-private.h"
#include "nm-setting-connection.h"
#include "nm-setting-gsm.h"
+#include "nm-setting-ppp.h"
#include "nm-modem-types.h"
+#include "nm-enum-types.h"
#include "nm-logging.h"
#include "NetworkManagerUtils.h"
@@ -60,6 +62,18 @@ typedef enum {
MM_MODEM_GSM_ALLOWED_MODE_LAST = MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY
} MMModemGsmAllowedMode;
+typedef enum {
+ MM_MODEM_GSM_ALLOWED_AUTH_UNKNOWN = 0x0000,
+ /* bits 0..4 order match Ericsson device bitmap */
+ MM_MODEM_GSM_ALLOWED_AUTH_NONE = 0x0001,
+ MM_MODEM_GSM_ALLOWED_AUTH_PAP = 0x0002,
+ MM_MODEM_GSM_ALLOWED_AUTH_CHAP = 0x0004,
+ MM_MODEM_GSM_ALLOWED_AUTH_MSCHAP = 0x0008,
+ MM_MODEM_GSM_ALLOWED_AUTH_MSCHAPV2 = 0x0010,
+ MM_MODEM_GSM_ALLOWED_AUTH_EAP = 0x0020,
+
+ MM_MODEM_GSM_ALLOWED_AUTH_LAST = MM_MODEM_GSM_ALLOWED_AUTH_EAP
+} MMModemGsmAllowedAuth;
G_DEFINE_TYPE (NMModemGsm, nm_modem_gsm, NM_TYPE_MODEM)
@@ -70,17 +84,12 @@ typedef struct {
GHashTable *connect_properties;
guint32 pin_tries;
+
+ guint enable_delay_id;
} NMModemGsmPrivate;
-typedef enum {
- NM_GSM_ERROR_CONNECTION_NOT_GSM = 0,
- NM_GSM_ERROR_CONNECTION_INVALID,
- NM_GSM_ERROR_CONNECTION_INCOMPATIBLE,
-} NMGsmError;
-
#define NM_GSM_ERROR (nm_gsm_error_quark ())
-#define NM_TYPE_GSM_ERROR (nm_gsm_error_get_type ())
static GQuark
nm_gsm_error_quark (void)
@@ -91,30 +100,6 @@ nm_gsm_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_gsm_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a GSM connection. */
- ENUM_ENTRY (NM_GSM_ERROR_CONNECTION_NOT_GSM, "ConnectionNotGsm"),
- /* Connection was not a valid GSM connection. */
- ENUM_ENTRY (NM_GSM_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_GSM_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMGsmError", values);
- }
- return etype;
-}
-
-
NMModem *
nm_modem_gsm_new (const char *path,
const char *device,
@@ -140,20 +125,33 @@ translate_mm_error (GError *error)
if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_NO_CARRIER))
reason = NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER;
- if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_NO_DIALTONE))
- reason = NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT;
- if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_BUSY))
+ else if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_NO_DIALTONE))
+ reason = NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE;
+ else if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_BUSY))
reason = NM_DEVICE_STATE_REASON_MODEM_BUSY;
- if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_NO_ANSWER))
+ else if (dbus_g_error_has_name (error, MM_MODEM_CONNECT_ERROR_NO_ANSWER))
reason = NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT;
- if (dbus_g_error_has_name (error, MM_MODEM_ERROR_NETWORK_NOT_ALLOWED))
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_NETWORK_NOT_ALLOWED))
reason = NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED;
- if (dbus_g_error_has_name (error, MM_MODEM_ERROR_NETWORK_TIMEOUT))
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_NETWORK_TIMEOUT))
reason = NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT;
- if (dbus_g_error_has_name (error, MM_MODEM_ERROR_NO_NETWORK))
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_NO_NETWORK))
reason = NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING;
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_NOT_INSERTED))
+ reason = NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED;
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN))
+ reason = NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED;
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PUK))
+ reason = NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED;
+ else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_WRONG))
+ reason = NM_DEVICE_STATE_REASON_GSM_SIM_WRONG;
+ else {
+ /* unable to map the ModemManager error to a NM_DEVICE_STATE_REASON */
+ nm_log_dbg (LOGD_MB, "unmapped dbus error detected: '%s'", dbus_g_error_get_name (error));
+ reason = NM_DEVICE_STATE_REASON_UNKNOWN;
+ }
- /* FIXME: We have only GSM error messages here, and we have no idea which
+ /* FIXME: We have only GSM error messages here, and we have no idea which
activation state failed. Reasons like:
NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED,
NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED,
@@ -162,9 +160,6 @@ translate_mm_error (GError *error)
NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED
are not used.
*/
- else
- reason = NM_DEVICE_STATE_REASON_UNKNOWN;
-
return reason;
}
@@ -237,38 +232,51 @@ do_connect (NMModemGsm *self)
static void stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data);
-static void
+/* do_enable() is used as a GSourceFunc, hence the gboolean return */
+static gboolean
do_enable (NMModemGsm *self)
{
DBusGProxy *proxy;
- g_return_if_fail (self != NULL);
- g_return_if_fail (NM_IS_MODEM_GSM (self));
+ g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_MODEM_GSM (self), FALSE);
+ NM_MODEM_GSM_GET_PRIVATE (self)->enable_delay_id = 0;
proxy = nm_modem_get_proxy (NM_MODEM (self), MM_DBUS_INTERFACE_MODEM);
dbus_g_proxy_begin_call_with_timeout (proxy,
"Enable", stage1_enable_done,
self, NULL, 20000,
G_TYPE_BOOLEAN, TRUE,
G_TYPE_INVALID);
+ return FALSE;
}
static void
stage1_pin_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMModemGsm *self = NM_MODEM_GSM (user_data);
+ NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self);
+ NMDeviceStateReason reason;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) {
- /* Success; go back and try the enable again */
- do_enable (self);
+ /* Success; try to enable the modem again. Wait a few seconds to ensure
+ * that ModemManager is ready for the enable right after the unlock.
+ */
+ if (priv->enable_delay_id == 0)
+ priv->enable_delay_id = g_timeout_add_seconds (4, (GSourceFunc) do_enable, self);
} else {
nm_log_warn (LOGD_MB, "GSM PIN unlock failed: (%d) %s",
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
- g_error_free (error);
- g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED);
+ /* try to translate the error reason */
+ reason = translate_mm_error (error);
+ if (reason == NM_DEVICE_STATE_REASON_UNKNOWN)
+ reason = NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED;
+
+ g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, reason);
+ g_error_free (error);
}
}
@@ -301,6 +309,7 @@ static void
stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMModemGsm *self = NM_MODEM_GSM (user_data);
+ NMDeviceStateReason reason;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID))
@@ -312,8 +321,13 @@ stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_da
if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN))
handle_enable_pin_required (self);
- else
- g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED);
+ else {
+ /* try to translate the error reason */
+ reason = translate_mm_error (error);
+ if (reason == NM_DEVICE_STATE_REASON_UNKNOWN)
+ reason = NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED;
+ g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, reason);
+ }
g_error_free (error);
}
@@ -324,10 +338,11 @@ static GHashTable *
create_connect_properties (NMConnection *connection)
{
NMSettingGsm *setting;
+ NMSettingPPP *s_ppp;
GHashTable *properties;
const char *str;
- setting = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM));
+ setting = nm_connection_get_setting_gsm (connection);
properties = value_hash_create ();
str = nm_setting_gsm_get_number (setting);
@@ -382,6 +397,28 @@ create_connect_properties (NMConnection *connection)
if (nm_setting_gsm_get_home_only (setting))
value_hash_add_bool (properties, "home_only", TRUE);
+ /* For IpMethod == STATIC or DHCP */
+ s_ppp = nm_connection_get_setting_ppp (connection);
+ if (s_ppp) {
+ guint32 auth = MM_MODEM_GSM_ALLOWED_AUTH_UNKNOWN;
+
+ if (nm_setting_ppp_get_noauth (s_ppp))
+ auth |= MM_MODEM_GSM_ALLOWED_AUTH_NONE;
+ if (!nm_setting_ppp_get_refuse_pap (s_ppp))
+ auth |= MM_MODEM_GSM_ALLOWED_AUTH_PAP;
+ if (!nm_setting_ppp_get_refuse_chap (s_ppp))
+ auth |= MM_MODEM_GSM_ALLOWED_AUTH_CHAP;
+ if (!nm_setting_ppp_get_refuse_mschap (s_ppp))
+ auth |= MM_MODEM_GSM_ALLOWED_AUTH_MSCHAP;
+ if (!nm_setting_ppp_get_refuse_mschapv2 (s_ppp))
+ auth |= MM_MODEM_GSM_ALLOWED_AUTH_MSCHAPV2;
+ if (!nm_setting_ppp_get_refuse_eap (s_ppp))
+ auth |= MM_MODEM_GSM_ALLOWED_AUTH_EAP;
+
+ if (auth != MM_MODEM_GSM_ALLOWED_AUTH_UNKNOWN)
+ value_hash_add_uint (properties, "allowed_auth", auth);
+ }
+
return properties;
}
@@ -429,7 +466,7 @@ real_get_best_auto_connection (NMModem *modem,
NMConnection *connection = NM_CONNECTION (iter->data);
NMSettingConnection *s_con;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (!nm_setting_connection_get_autoconnect (s_con))
@@ -451,7 +488,7 @@ real_check_connection_compatible (NMModem *modem,
NMSettingConnection *s_con;
NMSettingGsm *s_gsm;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_GSM_SETTING_NAME)) {
@@ -461,7 +498,7 @@ real_check_connection_compatible (NMModem *modem,
return FALSE;
}
- s_gsm = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM));
+ s_gsm = nm_connection_get_setting_gsm (connection);
if (!s_gsm) {
g_set_error (error,
NM_GSM_ERROR, NM_GSM_ERROR_CONNECTION_INVALID,
@@ -479,8 +516,9 @@ real_complete_connection (NMModem *modem,
GError **error)
{
NMSettingGsm *s_gsm;
+ NMSettingPPP *s_ppp;
- s_gsm = (NMSettingGsm *) nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM);
+ s_gsm = nm_connection_get_setting_gsm (connection);
if (!s_gsm || !nm_setting_gsm_get_apn (s_gsm)) {
/* Need an APN at least */
g_set_error_literal (error,
@@ -493,6 +531,16 @@ real_complete_connection (NMModem *modem,
if (!nm_setting_gsm_get_number (s_gsm))
g_object_set (G_OBJECT (s_gsm), NM_SETTING_GSM_NUMBER, "*99#", NULL);
+ s_ppp = nm_connection_get_setting_ppp (connection);
+ if (!s_ppp) {
+ s_ppp = (NMSettingPPP *) nm_setting_ppp_new ();
+ g_object_set (G_OBJECT (s_ppp),
+ NM_SETTING_PPP_LCP_ECHO_FAILURE, 5,
+ NM_SETTING_PPP_LCP_ECHO_INTERVAL, 30,
+ NULL);
+ nm_connection_add_setting (connection, NM_SETTING (s_ppp));
+ }
+
nm_utils_complete_generic (connection,
NM_SETTING_GSM_SETTING_NAME,
existing_connections,
@@ -511,7 +559,7 @@ real_get_user_pass (NMModem *modem,
{
NMSettingGsm *s_gsm;
- s_gsm = (NMSettingGsm *) nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM);
+ s_gsm = nm_connection_get_setting_gsm (connection);
if (!s_gsm)
return FALSE;
@@ -544,6 +592,9 @@ real_deactivate (NMModem *modem, NMDevice *device)
priv->pin_tries = 0;
+ if (priv->enable_delay_id)
+ g_source_remove (priv->enable_delay_id);
+
NM_MODEM_CLASS (nm_modem_gsm_parent_class)->deactivate (modem, device);
}
@@ -563,6 +614,8 @@ dispose (GObject *object)
if (priv->connect_properties)
g_hash_table_destroy (priv->connect_properties);
+ if (priv->enable_delay_id)
+ g_source_remove (priv->enable_delay_id);
G_OBJECT_CLASS (nm_modem_gsm_parent_class)->dispose (object);
}
diff --git a/src/modem-manager/nm-modem-gsm.h b/src/modem-manager/nm-modem-gsm.h
index f481bdb81..e1c94f045 100644
--- a/src/modem-manager/nm-modem-gsm.h
+++ b/src/modem-manager/nm-modem-gsm.h
@@ -33,6 +33,12 @@ G_BEGIN_DECLS
#define NM_IS_MODEM_GSM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_MODEM_GSM))
#define NM_MODEM_GSM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_MODEM_GSM, NMModemGsmClass))
+typedef enum {
+ NM_GSM_ERROR_CONNECTION_NOT_GSM = 0, /*< nick=ConnectionNotGsm >*/
+ NM_GSM_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_GSM_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMGsmError;
+
typedef struct {
NMModem parent;
} NMModemGsm;
diff --git a/src/modem-manager/nm-modem-manager.c b/src/modem-manager/nm-modem-manager.c
index 3509d6675..051940f5e 100644
--- a/src/modem-manager/nm-modem-manager.c
+++ b/src/modem-manager/nm-modem-manager.c
@@ -76,86 +76,56 @@ get_modem_properties (DBusGConnection *connection,
char **data_device,
char **driver,
guint32 *type,
- guint32 *ip_method)
+ guint32 *ip_method,
+ guint32 *ip_timeout)
{
DBusGProxy *proxy;
- GValue value = { 0 };
GError *err = NULL;
+ GHashTable *props = NULL;
+ GHashTableIter iter;
+ const char *prop;
+ GValue *value;
proxy = dbus_g_proxy_new_for_name (connection,
- MM_DBUS_SERVICE,
- path,
- "org.freedesktop.DBus.Properties");
-
- if (dbus_g_proxy_call_with_timeout (proxy, "Get", 15000, &err,
- G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
- G_TYPE_STRING, "Type",
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- *type = g_value_get_uint (&value);
- g_value_unset (&value);
- } else {
- nm_log_warn (LOGD_MB, "could not get device type: %s", err->message);
- goto out;
- }
-
- if (dbus_g_proxy_call_with_timeout (proxy, "Get", 15000, &err,
- G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
- G_TYPE_STRING, "MasterDevice",
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- *device = g_value_dup_string (&value);
- g_value_unset (&value);
- } else {
- nm_log_warn (LOGD_MB, "could not get device: %s", err->message);
- goto out;
- }
-
- if (dbus_g_proxy_call_with_timeout (proxy, "Get", 15000, &err,
- G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
- G_TYPE_STRING, "IpMethod",
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- *ip_method = g_value_get_uint (&value);
- g_value_unset (&value);
- } else {
- nm_log_warn (LOGD_MB, "could not get IP method: %s", err->message);
+ MM_DBUS_SERVICE,
+ path,
+ "org.freedesktop.DBus.Properties");
+
+ if (!dbus_g_proxy_call_with_timeout (proxy, "GetAll", 15000, &err,
+ G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
+ G_TYPE_INVALID,
+ DBUS_TYPE_G_MAP_OF_VARIANT, &props,
+ G_TYPE_INVALID)) {
+ nm_log_warn (LOGD_MB, "could not get modem properties: %s %s",
+ err ? dbus_g_error_get_name (err) : "(none)",
+ err ? err->message : "(unknown)");
+ g_clear_error (&err);
goto out;
}
- if (dbus_g_proxy_call_with_timeout (proxy, "Get", 15000, &err,
- G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
- G_TYPE_STRING, "Device",
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- *data_device = g_value_dup_string (&value);
- g_value_unset (&value);
- } else {
- nm_log_warn (LOGD_MB, "could not get modem data device: %s", err->message);
+ if (!props) {
+ nm_log_warn (LOGD_MB, "no modem properties found");
goto out;
}
- if (dbus_g_proxy_call_with_timeout (proxy, "Get", 15000, &err,
- G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
- G_TYPE_STRING, "Driver",
- G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
- G_TYPE_INVALID)) {
- *driver = g_value_dup_string (&value);
- g_value_unset (&value);
- } else {
- nm_log_warn (LOGD_MB, "could not get modem driver: %s", err->message);
- goto out;
+ g_hash_table_iter_init (&iter, props);
+ while (g_hash_table_iter_next (&iter, (gpointer) &prop, (gpointer) &value)) {
+ if (g_strcmp0 (prop, "Type") == 0)
+ *type = g_value_get_uint (value);
+ else if (g_strcmp0 (prop, "MasterDevice") == 0)
+ *device = g_value_dup_string (value);
+ else if (g_strcmp0 (prop, "IpMethod") == 0)
+ *ip_method = g_value_get_uint (value);
+ else if (g_strcmp0 (prop, "Device") == 0)
+ *data_device = g_value_dup_string (value);
+ else if (g_strcmp0 (prop, "Driver") == 0)
+ *driver = g_value_dup_string (value);
+ else if (g_strcmp0 (prop, "IpTimeout") == 0)
+ *ip_timeout = g_value_get_uint (value);
}
+ g_hash_table_unref (props);
out:
- if (err)
- g_error_free (err);
-
g_object_unref (proxy);
return *data_device && *driver;
@@ -169,6 +139,7 @@ create_modem (NMModemManager *manager, const char *path)
char *data_device = NULL, *driver = NULL, *master_device = NULL;
uint modem_type = MM_MODEM_TYPE_UNKNOWN;
uint ip_method = MM_MODEM_IP_METHOD_PPP;
+ uint ip_timeout = 0;
if (g_hash_table_lookup (priv->modems, path)) {
nm_log_warn (LOGD_MB, "modem with path %s already exists, ignoring", path);
@@ -177,7 +148,7 @@ create_modem (NMModemManager *manager, const char *path)
if (!get_modem_properties (nm_dbus_manager_get_connection (priv->dbus_mgr),
path, &master_device, &data_device, &driver,
- &modem_type, &ip_method))
+ &modem_type, &ip_method, &ip_timeout))
return;
if (modem_type == MM_MODEM_TYPE_UNKNOWN) {
@@ -210,6 +181,7 @@ create_modem (NMModemManager *manager, const char *path)
g_free (data_device);
if (modem) {
+ g_object_set (G_OBJECT (modem), NM_MODEM_IP_TIMEOUT, ip_timeout, NULL);
g_hash_table_insert (priv->modems, g_strdup (path), modem);
g_signal_emit (manager, signals[MODEM_ADDED], 0, modem, driver);
}
diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c
index debfbdf7d..91c0b06da 100644
--- a/src/modem-manager/nm-modem.c
+++ b/src/modem-manager/nm-modem.c
@@ -30,7 +30,6 @@
#include "nm-logging.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
-#include "nm-device-interface.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMModem, nm_modem, G_TYPE_OBJECT)
@@ -43,6 +42,7 @@ enum {
PROP_IFACE,
PROP_PATH,
PROP_IP_METHOD,
+ PROP_IP_TIMEOUT,
PROP_ENABLED,
LAST_PROP
@@ -55,7 +55,6 @@ typedef struct {
char *path;
NMPPPManager *ppp_manager;
- NMIP4Config *pending_ip4_config;
guint32 ip_method;
char *device;
char *iface;
@@ -67,6 +66,7 @@ typedef struct {
DBusGProxyCall *call;
gboolean mm_enabled;
+ guint32 mm_ip_timeout;
/* PPP stats */
guint32 in_bytes;
@@ -129,21 +129,6 @@ nm_modem_get_proxy (NMModem *self,
return priv->proxy;
}
-static void
-merge_ip4_config (NMActRequest *req, NMIP4Config *config)
-{
- NMConnection *connection;
- NMSettingIP4Config *s_ip4;
-
- /* Merge user-defined overrides into the IP4Config to be applied */
- connection = nm_act_request_get_connection (req);
- g_assert (connection);
-
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- if (s_ip4)
- nm_utils_merge_ip4_config (config, s_ip4);
-}
-
/*****************************************************************************/
/* IP method PPP */
@@ -169,7 +154,6 @@ ppp_ip4_config (NMPPPManager *ppp_manager,
gpointer user_data)
{
NMModem *self = NM_MODEM (user_data);
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self);
guint32 i, num;
guint32 bad_dns1 = htonl (0x0A0B0C0D);
guint32 good_dns1 = htonl (0x04020201); /* GTE nameserver */
@@ -213,7 +197,6 @@ ppp_ip4_config (NMPPPManager *ppp_manager,
nm_ip4_config_add_nameserver (config, good_dns2);
}
- priv->pending_ip4_config = g_object_ref (config);
g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, iface, config, NULL);
}
@@ -243,6 +226,7 @@ ppp_stage3_ip4_config_start (NMModem *self,
const char *ppp_name = NULL;
GError *error = NULL;
NMActStageReturn ret;
+ guint ip_timeout = 20;
g_return_val_if_fail (self != NULL, NM_ACT_STAGE_RETURN_FAILURE);
g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE);
@@ -258,8 +242,16 @@ ppp_stage3_ip4_config_start (NMModem *self,
return NM_ACT_STAGE_RETURN_FAILURE;
}
+ /* Check if ModemManager requested a specific IP timeout to be used. If 0 reported,
+ * use the default one (20s) */
+ if (priv->mm_ip_timeout > 0) {
+ nm_log_info (LOGD_PPP, "using modem-specified IP timeout: %u seconds",
+ priv->mm_ip_timeout);
+ ip_timeout = priv->mm_ip_timeout;
+ }
+
priv->ppp_manager = nm_ppp_manager_new (priv->iface);
- if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, 20, &error)) {
+ if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, ip_timeout, &error)) {
g_signal_connect (priv->ppp_manager, "state-changed",
G_CALLBACK (ppp_state_changed),
self);
@@ -287,22 +279,6 @@ ppp_stage3_ip4_config_start (NMModem *self,
return ret;
}
-static NMActStageReturn
-ppp_stage4 (NMModem *self,
- NMActRequest *req,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
-{
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self);
-
- *config = priv->pending_ip4_config;
- priv->pending_ip4_config = NULL;
-
- merge_ip4_config (req, *config);
-
- return NM_ACT_STAGE_RETURN_SUCCESS;
-}
-
/*****************************************************************************/
/* IP method static */
@@ -336,9 +312,6 @@ static_stage3_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
nm_ip4_config_add_nameserver (config, g_value_get_uint (value));
}
g_value_array_free (ret_array);
-
- priv->pending_ip4_config = g_object_ref (config);
- g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, NULL, config, NULL);
}
g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, NULL, config, error);
@@ -368,32 +341,6 @@ static_stage3_ip4_config_start (NMModem *self,
return NM_ACT_STAGE_RETURN_POSTPONE;
}
-static NMActStageReturn
-static_stage4 (NMModem *self,
- NMActRequest *req,
- NMDevice *device,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
-{
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self);
- gboolean no_firmware = FALSE;
-
- if (!nm_device_hw_bring_up (device, TRUE, &no_firmware)) {
- if (no_firmware)
- *reason = NM_DEVICE_STATE_REASON_FIRMWARE_MISSING;
- else
- *reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
- return NM_ACT_STAGE_RETURN_FAILURE;
- }
-
- *config = priv->pending_ip4_config;
- priv->pending_ip4_config = NULL;
-
- merge_ip4_config (req, *config);
-
- return NM_ACT_STAGE_RETURN_SUCCESS;
-}
-
/*****************************************************************************/
NMActStageReturn
@@ -426,7 +373,7 @@ nm_modem_stage3_ip4_config_start (NMModem *self,
ret = static_stage3_ip4_config_start (self, req, reason);
break;
case MM_MODEM_IP_METHOD_DHCP:
- ret = device_class->act_stage3_ip4_config_start (device, reason);
+ ret = device_class->act_stage3_ip4_config_start (device, NULL, reason);
break;
default:
nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method);
@@ -438,45 +385,14 @@ nm_modem_stage3_ip4_config_start (NMModem *self,
}
NMActStageReturn
-nm_modem_stage4_get_ip4_config (NMModem *self,
- NMDevice *device,
- NMDeviceClass *device_class,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+nm_modem_stage3_ip6_config_start (NMModem *self,
+ NMDevice *device,
+ NMDeviceClass *device_class,
+ NMDeviceStateReason *reason)
{
- NMModemPrivate *priv;
- NMActRequest *req;
- NMActStageReturn ret;
-
- g_return_val_if_fail (self != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (device != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (NM_IS_DEVICE (device), NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (device_class != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (NM_IS_DEVICE_CLASS (device_class), NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- req = nm_device_get_act_request (device);
- g_assert (req);
-
- priv = NM_MODEM_GET_PRIVATE (self);
- switch (priv->ip_method) {
- case MM_MODEM_IP_METHOD_PPP:
- ret = ppp_stage4 (self, req, config, reason);
- break;
- case MM_MODEM_IP_METHOD_STATIC:
- ret = static_stage4 (self, req, device, config, reason);
- break;
- case MM_MODEM_IP_METHOD_DHCP:
- ret = device_class->act_stage4_get_ip4_config (device, config, reason);
- break;
- default:
- nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method);
- ret = NM_ACT_STAGE_RETURN_FAILURE;
- break;
- }
-
- return ret;
+ /* FIXME: We don't support IPv6 on modems quite yet... */
+ nm_device_activate_schedule_ip6_config_timeout (device);
+ return NM_ACT_STAGE_RETURN_POSTPONE;
}
static void
@@ -586,7 +502,7 @@ nm_modem_act_stage1_prepare (NMModem *self,
if (hints)
g_ptr_array_free (hints, TRUE);
}
-
+
return ret;
}
@@ -662,11 +578,6 @@ real_deactivate (NMModem *self, NMDevice *device)
priv->call = NULL;
}
- if (priv->pending_ip4_config) {
- g_object_unref (priv->pending_ip4_config);
- priv->pending_ip4_config = NULL;
- }
-
priv->in_bytes = priv->out_bytes = 0;
if (priv->ppp_manager) {
@@ -680,10 +591,12 @@ real_deactivate (NMModem *self, NMDevice *device)
case MM_MODEM_IP_METHOD_STATIC:
case MM_MODEM_IP_METHOD_DHCP:
ifindex = nm_device_get_ip_ifindex (device);
- /* FIXME: use AF_UNSPEC here when we have IPv6 support */
- nm_system_iface_flush_routes (ifindex, AF_INET);
- nm_system_iface_flush_addresses (ifindex, AF_UNSPEC);
- nm_system_iface_set_up (ifindex, FALSE, NULL);
+ if (ifindex >= 0) {
+ /* FIXME: use AF_UNSPEC here when we have IPv6 support */
+ nm_system_iface_flush_routes (ifindex, AF_INET);
+ nm_system_iface_flush_addresses (ifindex, AF_UNSPEC);
+ nm_system_iface_set_up (ifindex, FALSE, NULL);
+ }
break;
default:
nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method);
@@ -721,7 +634,7 @@ nm_modem_device_state_changed (NMModem *self,
g_return_if_fail (self != NULL);
g_return_if_fail (NM_IS_MODEM (self));
- if (IS_ACTIVATING_STATE (old_state) || (old_state == NM_DEVICE_STATE_ACTIVATED))
+ if (old_state >= NM_DEVICE_STATE_PREPARE && old_state <= NM_DEVICE_STATE_ACTIVATED)
was_connected = TRUE;
priv = NM_MODEM_GET_PRIVATE (self);
@@ -758,44 +671,20 @@ nm_modem_device_state_changed (NMModem *self,
}
}
-static gboolean
-_state_is_active (NMDeviceState state)
-{
- return (state >= NM_DEVICE_STATE_IP_CONFIG && state <= NM_DEVICE_STATE_DEACTIVATING);
-}
-
gboolean
nm_modem_hw_is_up (NMModem *self, NMDevice *device)
{
- guint32 ip_method = NM_MODEM_GET_PRIVATE (self)->ip_method;
+ int ifindex = nm_device_get_ip_ifindex (device);
- if (ip_method == MM_MODEM_IP_METHOD_STATIC || ip_method == MM_MODEM_IP_METHOD_DHCP) {
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self);
- NMDeviceState state;
-
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
- if (priv->pending_ip4_config || _state_is_active (state))
- return nm_system_iface_is_up (nm_device_get_ip_ifindex (device));
- }
-
- return TRUE;
+ return ifindex > 0 ? nm_system_iface_is_up (ifindex) : TRUE;
}
gboolean
nm_modem_hw_bring_up (NMModem *self, NMDevice *device, gboolean *no_firmware)
{
- guint32 ip_method = NM_MODEM_GET_PRIVATE (self)->ip_method;
-
- if (ip_method == MM_MODEM_IP_METHOD_STATIC || ip_method == MM_MODEM_IP_METHOD_DHCP) {
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self);
- NMDeviceState state;
-
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
- if (priv->pending_ip4_config || _state_is_active (state))
- return nm_system_iface_set_up (nm_device_get_ip_ifindex (device), TRUE, no_firmware);
- }
+ int ifindex = nm_device_get_ip_ifindex (device);
- return TRUE;
+ return ifindex > 0 ? nm_system_iface_set_up (ifindex, TRUE, no_firmware) : TRUE;
}
const char *
@@ -1013,6 +902,9 @@ get_property (GObject *object, guint prop_id,
case PROP_IP_METHOD:
g_value_set_uint (value, priv->ip_method);
break;
+ case PROP_IP_TIMEOUT:
+ g_value_set_uint (value, priv->mm_ip_timeout);
+ break;
case PROP_ENABLED:
g_value_set_boolean (value, priv->mm_enabled);
break;
@@ -1046,6 +938,9 @@ set_property (GObject *object, guint prop_id,
/* Construct only */
priv->ip_method = g_value_get_uint (value);
break;
+ case PROP_IP_TIMEOUT:
+ priv->mm_ip_timeout = g_value_get_uint (value);
+ break;
case PROP_ENABLED:
break;
default:
@@ -1129,6 +1024,14 @@ nm_modem_class_init (NMModemClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property
+ (object_class, PROP_IP_TIMEOUT,
+ g_param_spec_uint (NM_MODEM_IP_TIMEOUT,
+ "IP timeout",
+ "IP timeout",
+ 0, 360, 20,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property
(object_class, PROP_ENABLED,
g_param_spec_boolean (NM_MODEM_ENABLED,
"Enabled",
diff --git a/src/modem-manager/nm-modem.h b/src/modem-manager/nm-modem.h
index bad19b043..8fe52bc05 100644
--- a/src/modem-manager/nm-modem.h
+++ b/src/modem-manager/nm-modem.h
@@ -40,6 +40,7 @@ G_BEGIN_DECLS
#define NM_MODEM_DEVICE "device"
#define NM_MODEM_IFACE "iface"
#define NM_MODEM_IP_METHOD "ip-method"
+#define NM_MODEM_IP_TIMEOUT "ip-timeout"
#define NM_MODEM_ENABLED "enabled"
#define NM_MODEM_PPP_STATS "ppp-stats"
@@ -129,11 +130,10 @@ NMActStageReturn nm_modem_stage3_ip4_config_start (NMModem *modem,
NMDeviceClass *device_class,
NMDeviceStateReason *reason);
-NMActStageReturn nm_modem_stage4_get_ip4_config (NMModem *modem,
- NMDevice *device,
- NMDeviceClass *device_class,
- NMIP4Config **config,
- NMDeviceStateReason *reason);
+NMActStageReturn nm_modem_stage3_ip6_config_start (NMModem *modem,
+ NMDevice *device,
+ NMDeviceClass *device_class,
+ NMDeviceStateReason *reason);
gboolean nm_modem_get_secrets (NMModem *modem,
const char *setting_name,
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
index d3eb920d2..3fc7b538d 100644
--- a/src/nm-activation-request.c
+++ b/src/nm-activation-request.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
* Copyright (C) 2007 - 2008 Novell, Inc.
*/
@@ -34,25 +34,16 @@
#include "nm-setting-8021x.h"
#include "nm-dbus-manager.h"
#include "nm-device.h"
-#include "nm-properties-changed-signal.h"
#include "nm-active-connection.h"
-#include "nm-dbus-glib-types.h"
-#include "nm-active-connection-glue.h"
#include "nm-settings-connection.h"
-G_DEFINE_TYPE (NMActRequest, nm_act_request, G_TYPE_OBJECT)
+G_DEFINE_TYPE (NMActRequest, nm_act_request, NM_TYPE_ACTIVE_CONNECTION)
#define NM_ACT_REQUEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
NM_TYPE_ACT_REQUEST, \
NMActRequestPrivate))
-enum {
- PROPERTIES_CHANGED,
- LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL] = { 0 };
-
typedef struct {
char *table;
char *rule;
@@ -65,36 +56,30 @@ typedef struct {
GSList *secrets_calls;
- char *specific_object;
NMDevice *device;
gboolean user_requested;
gulong user_uid;
- NMActiveConnectionState state;
- gboolean is_default;
- gboolean is_default6;
+ NMActiveConnection *dep;
+ guint dep_state_id;
+
gboolean shared;
GSList *share_rules;
- char *ac_path;
-
gboolean assumed;
} NMActRequestPrivate;
enum {
- PROP_0,
- PROP_CONNECTION,
- PROP_UUID,
- PROP_SPECIFIC_OBJECT,
- PROP_DEVICES,
- PROP_STATE,
- PROP_DEFAULT,
- PROP_DEFAULT6,
- PROP_VPN,
-
- LAST_PROP
+ PROP_MASTER = 2000,
};
+enum {
+ DEP_RESULT,
+
+ LAST_SIGNAL
+};
+static guint signals[LAST_SIGNAL] = { 0 };
+
/*******************************************************************/
typedef struct {
@@ -199,29 +184,6 @@ nm_act_request_get_connection (NMActRequest *req)
return NM_ACT_REQUEST_GET_PRIVATE (req)->connection;
}
-const char *
-nm_act_request_get_specific_object (NMActRequest *req)
-{
- g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NULL);
-
- return NM_ACT_REQUEST_GET_PRIVATE (req)->specific_object;
-}
-
-void
-nm_act_request_set_specific_object (NMActRequest *req,
- const char *specific_object)
-{
- NMActRequestPrivate *priv;
-
- g_return_if_fail (NM_IS_ACT_REQUEST (req));
- g_return_if_fail (specific_object != NULL);
-
- priv = NM_ACT_REQUEST_GET_PRIVATE (req);
-
- g_free (priv->specific_object);
- priv->specific_object = g_strdup (specific_object);
-}
-
gboolean
nm_act_request_get_user_requested (NMActRequest *req)
{
@@ -230,74 +192,47 @@ nm_act_request_get_user_requested (NMActRequest *req)
return NM_ACT_REQUEST_GET_PRIVATE (req)->user_requested;
}
-const char *
-nm_act_request_get_active_connection_path (NMActRequest *req)
+GObject *
+nm_act_request_get_device (NMActRequest *req)
{
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NULL);
- return NM_ACT_REQUEST_GET_PRIVATE (req)->ac_path;
-}
-
-void
-nm_act_request_set_default (NMActRequest *req, gboolean is_default)
-{
- NMActRequestPrivate *priv;
-
- g_return_if_fail (NM_IS_ACT_REQUEST (req));
-
- priv = NM_ACT_REQUEST_GET_PRIVATE (req);
- if (priv->is_default == is_default)
- return;
-
- priv->is_default = is_default;
- g_object_notify (G_OBJECT (req), NM_ACTIVE_CONNECTION_DEFAULT);
+ return G_OBJECT (NM_ACT_REQUEST_GET_PRIVATE (req)->device);
}
gboolean
-nm_act_request_get_default (NMActRequest *req)
+nm_act_request_get_assumed (NMActRequest *req)
{
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
- return NM_ACT_REQUEST_GET_PRIVATE (req)->is_default;
+ return NM_ACT_REQUEST_GET_PRIVATE (req)->assumed;
}
-void
-nm_act_request_set_default6 (NMActRequest *req, gboolean is_default6)
+NMActiveConnection *
+nm_act_request_get_dependency (NMActRequest *req)
{
- NMActRequestPrivate *priv;
-
- g_return_if_fail (NM_IS_ACT_REQUEST (req));
-
- priv = NM_ACT_REQUEST_GET_PRIVATE (req);
- if (priv->is_default6 == is_default6)
- return;
-
- priv->is_default6 = is_default6;
- g_object_notify (G_OBJECT (req), NM_ACTIVE_CONNECTION_DEFAULT6);
+ return NM_ACT_REQUEST_GET_PRIVATE (req)->dep;
}
-gboolean
-nm_act_request_get_default6 (NMActRequest *req)
+static NMActRequestDependencyResult
+ac_state_to_dep_result (NMActiveConnection *ac)
{
- g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
+ NMActiveConnectionState state = nm_active_connection_get_state (ac);
- return NM_ACT_REQUEST_GET_PRIVATE (req)->is_default6;
-}
+ if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING)
+ return NM_ACT_REQUEST_DEP_RESULT_WAIT;
+ else if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED)
+ return NM_ACT_REQUEST_DEP_RESULT_READY;
-GObject *
-nm_act_request_get_device (NMActRequest *req)
-{
- g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NULL);
-
- return G_OBJECT (NM_ACT_REQUEST_GET_PRIVATE (req)->device);
+ return NM_ACT_REQUEST_DEP_RESULT_FAILED;
}
-gboolean
-nm_act_request_get_assumed (NMActRequest *req)
+NMActRequestDependencyResult
+nm_act_request_get_dependency_result (NMActRequest *req)
{
- g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
+ NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (req);
- return NM_ACT_REQUEST_GET_PRIVATE (req)->assumed;
+ return priv->dep ? ac_state_to_dep_result (priv->dep) : NM_ACT_REQUEST_DEP_RESULT_READY;
}
/********************************************************************/
@@ -423,9 +358,7 @@ device_state_changed (NMDevice *device,
gpointer user_data)
{
NMActRequest *self = NM_ACT_REQUEST (user_data);
- NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self);
NMActiveConnectionState new_ac_state;
- gboolean new_default = FALSE, new_default6 = FALSE;
/* Set NMActiveConnection state based on the device's state */
switch (new_state) {
@@ -439,43 +372,84 @@ device_state_changed (NMDevice *device,
break;
case NM_DEVICE_STATE_ACTIVATED:
new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATED;
- new_default = priv->is_default;
- new_default6 = priv->is_default6;
break;
case NM_DEVICE_STATE_DEACTIVATING:
new_ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATING;
break;
default:
new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
- new_default = new_default6 = FALSE;
+ nm_active_connection_set_default (NM_ACTIVE_CONNECTION (self), FALSE);
+ nm_active_connection_set_default6 (NM_ACTIVE_CONNECTION (self), FALSE);
break;
}
- if (new_ac_state != priv->state) {
- priv->state = new_ac_state;
- g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_STATE);
- }
+ nm_active_connection_set_state (NM_ACTIVE_CONNECTION (self), new_ac_state);
+}
- if (new_default != priv->is_default) {
- priv->is_default = new_default;
- g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEFAULT);
- }
+/********************************************************************/
- if (new_default6 != priv->is_default6) {
- priv->is_default6 = new_default6;
- g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEFAULT6);
- }
+static void
+dep_gone (NMActRequest *self, GObject *ignored)
+{
+ NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self);
+
+ g_warn_if_fail (G_OBJECT (priv->dep) == ignored);
+
+ /* Dependent connection is gone; clean up and fail */
+ priv->dep = NULL;
+ priv->dep_state_id = 0;
+ g_signal_emit (self, signals[DEP_RESULT], 0, NM_ACT_REQUEST_DEP_RESULT_FAILED);
}
-/********************************************************************/
+static void
+dep_state_changed (NMActiveConnection *dep,
+ GParamSpec *pspec,
+ NMActRequest *self)
+{
+ NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self);
+ NMActRequestDependencyResult result;
+ g_warn_if_fail (priv->dep == dep);
+
+ result = ac_state_to_dep_result (priv->dep);
+ if (result == NM_ACT_REQUEST_DEP_RESULT_FAILED) {
+ g_object_weak_unref (G_OBJECT (priv->dep), (GWeakNotify) dep_gone, self);
+ g_signal_handler_disconnect (priv->dep, priv->dep_state_id);
+ priv->dep = NULL;
+ priv->dep_state_id = 0;
+ }
+ g_signal_emit (self, signals[DEP_RESULT], 0, result);
+}
+
+/**
+ * nm_act_request_new:
+ *
+ * @connection: the connection to activate @device with
+ * @specific_object: the object path of the specific object (ie, WiFi access point,
+ * etc) that will be used to activate @connection and @device
+ * @user_requested: pass %TRUE if the activation was requested via D-Bus,
+ * otherwise %FALSE if requested internally by NM (ie, autoconnect)
+ * @user_uid: if @user_requested is %TRUE, the Unix UID of the user that requested
+ * the activation
+ * @assumed: pass %TRUE if the activation should "assume" (ie, taking over) an
+ * existing connection made before this instance of NM started
+ * @device: the device/interface to configure according to @connection
+ * @dependency: if the activation depends on another device (ie, VLAN slave,
+ * bond slave, etc) pass the #NMActiveConnection that this activation request
+ * should wait for before proceeding
+ *
+ * Begins activation of @device using the given @connection and other details.
+ *
+ * Returns: the new activation request on success, %NULL on error.
+ */
NMActRequest *
nm_act_request_new (NMConnection *connection,
const char *specific_object,
gboolean user_requested,
gulong user_uid,
gboolean assumed,
- gpointer *device)
+ gpointer *device,
+ NMActiveConnection *dependency)
{
GObject *object;
NMActRequestPrivate *priv;
@@ -483,16 +457,15 @@ nm_act_request_new (NMConnection *connection,
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (NM_DEVICE (device), NULL);
- object = g_object_new (NM_TYPE_ACT_REQUEST, NULL);
+ object = g_object_new (NM_TYPE_ACT_REQUEST,
+ NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, specific_object,
+ NULL);
if (!object)
return NULL;
priv = NM_ACT_REQUEST_GET_PRIVATE (object);
priv->connection = g_object_ref (connection);
- if (specific_object)
- priv->specific_object = g_strdup (specific_object);
-
priv->device = NM_DEVICE (device);
g_signal_connect (device, "state-changed",
G_CALLBACK (device_state_changed),
@@ -502,23 +475,28 @@ nm_act_request_new (NMConnection *connection,
priv->user_requested = user_requested;
priv->assumed = assumed;
- return NM_ACT_REQUEST (object);
+ if (dependency) {
+ priv->dep = dependency;
+ g_object_weak_ref (G_OBJECT (dependency), (GWeakNotify) dep_gone, object);
+ priv->dep_state_id = g_signal_connect (dependency,
+ "notify::" NM_ACTIVE_CONNECTION_STATE,
+ G_CALLBACK (dep_state_changed),
+ object);
+ }
+
+ if (!nm_active_connection_export (NM_ACTIVE_CONNECTION (object),
+ connection,
+ nm_device_get_path (NM_DEVICE (device)))) {
+ g_object_unref (object);
+ object = NULL;
+ }
+
+ return (NMActRequest *) object;
}
static void
nm_act_request_init (NMActRequest *req)
{
- NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (req);
- NMDBusManager *dbus_mgr;
-
- priv->ac_path = nm_active_connection_get_next_object_path ();
- priv->state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
-
- dbus_mgr = nm_dbus_manager_get ();
- dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (dbus_mgr),
- priv->ac_path,
- G_OBJECT (req));
- g_object_unref (dbus_mgr);
}
static void
@@ -526,38 +504,17 @@ get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
- GPtrArray *devices;
+ NMDevice *master;
switch (prop_id) {
- case PROP_CONNECTION:
- g_value_set_boxed (value, nm_connection_get_path (priv->connection));
- break;
- case PROP_UUID:
- g_value_set_string (value, nm_connection_get_uuid (priv->connection));
- break;
- case PROP_SPECIFIC_OBJECT:
- if (priv->specific_object)
- g_value_set_boxed (value, priv->specific_object);
- else
+ case PROP_MASTER:
+ if (priv->dep && NM_IS_ACT_REQUEST (priv->dep)) {
+ master = NM_DEVICE (nm_act_request_get_device (NM_ACT_REQUEST (priv->dep)));
+ g_assert (master);
+ g_value_set_boxed (value, nm_device_get_path (master));
+ } else
g_value_set_boxed (value, "/");
break;
- case PROP_DEVICES:
- devices = g_ptr_array_sized_new (1);
- g_ptr_array_add (devices, g_strdup (nm_device_get_path (priv->device)));
- g_value_take_boxed (value, devices);
- break;
- case PROP_STATE:
- g_value_set_uint (value, priv->state);
- break;
- case PROP_DEFAULT:
- g_value_set_boolean (value, priv->is_default);
- break;
- case PROP_DEFAULT6:
- g_value_set_boolean (value, priv->is_default6);
- break;
- case PROP_VPN:
- g_value_set_boolean (value, FALSE);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -595,17 +552,19 @@ dispose (GObject *object)
g_object_unref (priv->connection);
+ if (priv->dep) {
+ g_object_weak_unref (G_OBJECT (priv->dep), (GWeakNotify) dep_gone, object);
+ g_signal_handler_disconnect (priv->dep, priv->dep_state_id);
+ priv->dep = NULL;
+ priv->dep_state_id = 0;
+ }
+
G_OBJECT_CLASS (nm_act_request_parent_class)->dispose (object);
}
static void
finalize (GObject *object)
{
- NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
-
- g_free (priv->specific_object);
- g_free (priv->ac_path);
-
clear_share_rules (NM_ACT_REQUEST (object));
G_OBJECT_CLASS (nm_act_request_parent_class)->finalize (object);
@@ -623,23 +582,14 @@ nm_act_request_class_init (NMActRequestClass *req_class)
object_class->dispose = dispose;
object_class->finalize = finalize;
- /* properties */
- nm_active_connection_install_properties (object_class,
- PROP_CONNECTION,
- PROP_UUID,
- PROP_SPECIFIC_OBJECT,
- PROP_DEVICES,
- PROP_STATE,
- PROP_DEFAULT,
- PROP_DEFAULT6,
- PROP_VPN);
-
- /* Signals */
- signals[PROPERTIES_CHANGED] =
- nm_properties_changed_signal_new (object_class,
- G_STRUCT_OFFSET (NMActRequestClass, properties_changed));
-
- dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (req_class),
- &dbus_glib_nm_active_connection_object_info);
+ g_object_class_override_property (object_class, PROP_MASTER, NM_ACTIVE_CONNECTION_MASTER);
+
+ signals[DEP_RESULT] =
+ g_signal_new (NM_ACT_REQUEST_DEPENDENCY_RESULT,
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__UINT,
+ G_TYPE_NONE, 1, G_TYPE_UINT);
}
diff --git a/src/nm-activation-request.h b/src/nm-activation-request.h
index dac9d89af..d7c094e6e 100644
--- a/src/nm-activation-request.h
+++ b/src/nm-activation-request.h
@@ -34,6 +34,15 @@
#define NM_IS_ACT_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_ACT_REQUEST))
#define NM_ACT_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACT_REQUEST, NMActRequestClass))
+typedef enum {
+ NM_ACT_REQUEST_DEP_RESULT_UNKNOWN,
+ NM_ACT_REQUEST_DEP_RESULT_WAIT,
+ NM_ACT_REQUEST_DEP_RESULT_READY,
+ NM_ACT_REQUEST_DEP_RESULT_FAILED,
+} NMActRequestDependencyResult;
+
+#define NM_ACT_REQUEST_DEPENDENCY_RESULT "dependency-result"
+
typedef struct {
GObject parent;
} NMActRequest;
@@ -43,6 +52,8 @@ typedef struct {
/* Signals */
void (*properties_changed) (NMActRequest *req, GHashTable *properties);
+
+ void (*dependency_result) (NMActRequest *req, NMActRequestDependencyResult result);
} NMActRequestClass;
GType nm_act_request_get_type (void);
@@ -52,26 +63,13 @@ NMActRequest *nm_act_request_new (NMConnection *connection,
gboolean user_requested,
gulong user_uid,
gboolean assumed,
- gpointer *device); /* An NMDevice */
+ gpointer *device, /* An NMDevice */
+ NMActiveConnection *dependency);
NMConnection *nm_act_request_get_connection (NMActRequest *req);
-const char * nm_act_request_get_specific_object (NMActRequest *req);
-
-void nm_act_request_set_specific_object (NMActRequest *req,
- const char *specific_object);
gboolean nm_act_request_get_user_requested (NMActRequest *req);
-const char * nm_act_request_get_active_connection_path (NMActRequest *req);
-
-void nm_act_request_set_default (NMActRequest *req, gboolean is_default);
-
-gboolean nm_act_request_get_default (NMActRequest *req);
-
-void nm_act_request_set_default6 (NMActRequest *req, gboolean is_default6);
-
-gboolean nm_act_request_get_default6 (NMActRequest *req);
-
gboolean nm_act_request_get_shared (NMActRequest *req);
void nm_act_request_set_shared (NMActRequest *req, gboolean shared);
@@ -84,6 +82,10 @@ GObject * nm_act_request_get_device (NMActRequest *req);
gboolean nm_act_request_get_assumed (NMActRequest *req);
+NMActiveConnection * nm_act_request_get_dependency (NMActRequest *req);
+
+NMActRequestDependencyResult nm_act_request_get_dependency_result (NMActRequest *req);
+
/* Secrets handling */
typedef void (*NMActRequestSecretsFunc) (NMActRequest *req,
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index ae2afb072..2de621970 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2008 - 2010 Red Hat, Inc.
+ * Copyright (C) 2008 - 2012 Red Hat, Inc.
*/
#include <glib.h>
@@ -23,55 +23,306 @@
#include "NetworkManager.h"
#include "nm-logging.h"
#include "nm-dbus-glib-types.h"
+#include "nm-dbus-manager.h"
+#include "nm-properties-changed-signal.h"
-char *
-nm_active_connection_get_next_object_path (void)
+#include "nm-active-connection-glue.h"
+
+/* Base class for anything implementing the Connection.Active D-Bus interface */
+G_DEFINE_ABSTRACT_TYPE (NMActiveConnection, nm_active_connection, G_TYPE_OBJECT)
+
+#define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+ NM_TYPE_ACTIVE_CONNECTION, \
+ NMActiveConnectionPrivate))
+
+typedef struct {
+ gboolean disposed;
+
+ NMConnection *connection;
+ char *path;
+ char *specific_object;
+ char *device_path;
+ gboolean is_default;
+ gboolean is_default6;
+ NMActiveConnectionState state;
+ gboolean vpn;
+} NMActiveConnectionPrivate;
+
+enum {
+ PROP_0,
+ PROP_CONNECTION,
+ PROP_UUID,
+ PROP_SPECIFIC_OBJECT,
+ PROP_DEVICES,
+ PROP_STATE,
+ PROP_DEFAULT,
+ PROP_DEFAULT6,
+ PROP_VPN,
+ PROP_MASTER,
+
+ LAST_PROP
+};
+
+enum {
+ PROPERTIES_CHANGED,
+ LAST_SIGNAL
+};
+static guint signals[LAST_SIGNAL] = { 0 };
+
+/****************************************************************/
+
+NMActiveConnectionState
+nm_active_connection_get_state (NMActiveConnection *self)
{
- static guint32 counter = 0;
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->state;
+}
- return g_strdup_printf (NM_DBUS_PATH "/ActiveConnection/%d", counter++);
+void
+nm_active_connection_set_state (NMActiveConnection *self,
+ NMActiveConnectionState new_state)
+{
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
+
+ if (priv->state != new_state) {
+ priv->state = new_state;
+ g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_STATE);
+ }
+}
+
+NMConnection *
+nm_active_connection_get_connection (NMActiveConnection *self)
+{
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->connection;
+}
+
+const char *
+nm_active_connection_get_path (NMActiveConnection *self)
+{
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->path;
+}
+
+const char *
+nm_active_connection_get_specific_object (NMActiveConnection *self)
+{
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->specific_object;
}
void
-nm_active_connection_install_properties (GObjectClass *object_class,
- guint prop_connection,
- guint prop_uuid,
- guint prop_specific_object,
- guint prop_devices,
- guint prop_state,
- guint prop_default,
- guint prop_default6,
- guint prop_vpn)
-{
- g_object_class_install_property (object_class, prop_connection,
+nm_active_connection_set_specific_object (NMActiveConnection *self,
+ const char *specific_object)
+{
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
+
+ if (g_strcmp0 (priv->specific_object, specific_object) == 0)
+ return;
+
+ g_free (priv->specific_object);
+ priv->specific_object = g_strdup (specific_object);
+ g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT);
+}
+
+void
+nm_active_connection_set_default (NMActiveConnection *self, gboolean is_default)
+{
+ NMActiveConnectionPrivate *priv;
+
+ g_return_if_fail (NM_IS_ACTIVE_CONNECTION (self));
+
+ priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
+ if (priv->is_default == is_default)
+ return;
+
+ priv->is_default = is_default;
+ g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEFAULT);
+}
+
+gboolean
+nm_active_connection_get_default (NMActiveConnection *self)
+{
+ g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (self), FALSE);
+
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->is_default;
+}
+
+void
+nm_active_connection_set_default6 (NMActiveConnection *self, gboolean is_default6)
+{
+ NMActiveConnectionPrivate *priv;
+
+ g_return_if_fail (NM_IS_ACTIVE_CONNECTION (self));
+
+ priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
+ if (priv->is_default6 == is_default6)
+ return;
+
+ priv->is_default6 = is_default6;
+ g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEFAULT6);
+}
+
+gboolean
+nm_active_connection_get_default6 (NMActiveConnection *self)
+{
+ g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (self), FALSE);
+
+ return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->is_default6;
+}
+
+gboolean
+nm_active_connection_export (NMActiveConnection *self,
+ NMConnection *connection,
+ const char *devpath)
+{
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
+ NMDBusManager *dbus_mgr;
+ static guint32 counter = 0;
+
+ g_return_val_if_fail (connection != NULL, FALSE);
+ g_return_val_if_fail (devpath != NULL, FALSE);
+
+ priv->connection = g_object_ref (connection);
+ priv->path = g_strdup_printf (NM_DBUS_PATH "/ActiveConnection/%d", counter++);
+ priv->device_path = g_strdup (devpath);
+
+ dbus_mgr = nm_dbus_manager_get ();
+ dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (dbus_mgr),
+ priv->path, G_OBJECT (self));
+ g_object_unref (dbus_mgr);
+ return TRUE;
+}
+
+/****************************************************************/
+
+static void
+nm_active_connection_init (NMActiveConnection *self)
+{
+}
+
+static void
+dispose (GObject *object)
+{
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ priv->disposed = TRUE;
+
+ g_free (priv->path);
+ g_free (priv->specific_object);
+ g_free (priv->device_path);
+ g_object_unref (priv->connection);
+ }
+
+ G_OBJECT_CLASS (nm_active_connection_parent_class)->dispose (object);
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_SPECIFIC_OBJECT:
+ priv->specific_object = g_value_dup_boxed (value);
+ break;
+ case PROP_DEFAULT:
+ priv->is_default = g_value_get_boolean (value);
+ break;
+ case PROP_DEFAULT6:
+ priv->is_default6 = g_value_get_boolean (value);
+ break;
+ case PROP_VPN:
+ priv->vpn = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
+ GPtrArray *devices;
+
+ switch (prop_id) {
+ case PROP_CONNECTION:
+ g_value_set_boxed (value, nm_connection_get_path (priv->connection));
+ break;
+ case PROP_UUID:
+ g_value_set_string (value, nm_connection_get_uuid (priv->connection));
+ break;
+ case PROP_SPECIFIC_OBJECT:
+ g_value_set_boxed (value, priv->specific_object ? priv->specific_object : "/");
+ break;
+ case PROP_DEVICES:
+ devices = g_ptr_array_sized_new (1);
+ g_ptr_array_add (devices, g_strdup (priv->device_path));
+ g_value_take_boxed (value, devices);
+ break;
+ case PROP_STATE:
+ g_value_set_uint (value, priv->state);
+ break;
+ case PROP_DEFAULT:
+ g_value_set_boolean (value, priv->is_default);
+ break;
+ case PROP_DEFAULT6:
+ g_value_set_boolean (value, priv->is_default6);
+ break;
+ case PROP_VPN:
+ g_value_set_boolean (value, priv->vpn);
+ break;
+ case PROP_MASTER:
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_active_connection_class_init (NMActiveConnectionClass *vpn_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (vpn_class);
+
+ g_type_class_add_private (vpn_class, sizeof (NMActiveConnectionPrivate));
+
+ /* virtual methods */
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+ object_class->dispose = dispose;
+
+ /* properties */
+ g_object_class_install_property (object_class, PROP_CONNECTION,
g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION,
"Connection",
"Connection",
DBUS_TYPE_G_OBJECT_PATH,
G_PARAM_READABLE));
- g_object_class_install_property (object_class, prop_uuid,
+ g_object_class_install_property (object_class, PROP_UUID,
g_param_spec_string (NM_ACTIVE_CONNECTION_UUID,
"Connection UUID",
"Connection UUID",
NULL,
G_PARAM_READABLE));
- g_object_class_install_property (object_class, prop_specific_object,
+ g_object_class_install_property (object_class, PROP_SPECIFIC_OBJECT,
g_param_spec_boxed (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT,
"Specific object",
"Specific object",
DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READABLE));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (object_class, prop_devices,
+ g_object_class_install_property (object_class, PROP_DEVICES,
g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES,
"Devices",
"Devices",
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_PARAM_READABLE));
- g_object_class_install_property (object_class, prop_state,
+ g_object_class_install_property (object_class, PROP_STATE,
g_param_spec_uint (NM_ACTIVE_CONNECTION_STATE,
"State",
"State",
@@ -80,25 +331,40 @@ nm_active_connection_install_properties (GObjectClass *object_class,
NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
G_PARAM_READABLE));
- g_object_class_install_property (object_class, prop_default,
+ g_object_class_install_property (object_class, PROP_DEFAULT,
g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT,
"Default",
"Is the default IPv4 active connection",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READWRITE));
- g_object_class_install_property (object_class, prop_default6,
+ g_object_class_install_property (object_class, PROP_DEFAULT6,
g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6,
"Default6",
"Is the default IPv6 active connection",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READWRITE));
- g_object_class_install_property (object_class, prop_vpn,
+ g_object_class_install_property (object_class, PROP_VPN,
g_param_spec_boolean (NM_ACTIVE_CONNECTION_VPN,
"VPN",
"Is a VPN connection",
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (object_class, PROP_MASTER,
+ g_param_spec_boxed (NM_ACTIVE_CONNECTION_MASTER,
+ "Master",
+ "Path of master device",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_PARAM_READABLE));
+
+ /* Signals */
+ signals[PROPERTIES_CHANGED] =
+ nm_properties_changed_signal_new (object_class,
+ G_STRUCT_OFFSET (NMActiveConnectionClass, properties_changed));
+
+ dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (vpn_class),
+ &dbus_glib_nm_active_connection_object_info);
}
diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h
index 4bd8c78ef..419cbcff9 100644
--- a/src/nm-active-connection.h
+++ b/src/nm-active-connection.h
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2008 - 2010 Red Hat, Inc.
+ * Copyright (C) 2008 - 2012 Red Hat, Inc.
*/
#ifndef NM_ACTIVE_CONNECTION_H
@@ -24,25 +24,63 @@
#include <glib-object.h>
#include "nm-connection.h"
-#define NM_ACTIVE_CONNECTION_CONNECTION "connection"
-#define NM_ACTIVE_CONNECTION_UUID "uuid"
+#define NM_TYPE_ACTIVE_CONNECTION (nm_active_connection_get_type ())
+#define NM_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnection))
+#define NM_ACTIVE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass))
+#define NM_IS_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_ACTIVE_CONNECTION))
+#define NM_IS_ACTIVE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_ACTIVE_CONNECTION))
+#define NM_ACTIVE_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass))
+
+/* Properties */
+#define NM_ACTIVE_CONNECTION_CONNECTION "connection"
+#define NM_ACTIVE_CONNECTION_UUID "uuid"
#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object"
-#define NM_ACTIVE_CONNECTION_DEVICES "devices"
-#define NM_ACTIVE_CONNECTION_STATE "state"
-#define NM_ACTIVE_CONNECTION_DEFAULT "default"
-#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6"
-#define NM_ACTIVE_CONNECTION_VPN "vpn"
-
-char *nm_active_connection_get_next_object_path (void);
-
-void nm_active_connection_install_properties (GObjectClass *object_class,
- guint prop_connection,
- guint prop_uuid,
- guint prop_specific_object,
- guint prop_devices,
- guint prop_state,
- guint prop_default,
- guint prop_default6,
- guint prop_vpn);
+#define NM_ACTIVE_CONNECTION_DEVICES "devices"
+#define NM_ACTIVE_CONNECTION_STATE "state"
+#define NM_ACTIVE_CONNECTION_DEFAULT "default"
+#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6"
+#define NM_ACTIVE_CONNECTION_VPN "vpn"
+#define NM_ACTIVE_CONNECTION_MASTER "master"
+
+typedef struct {
+ GObject parent;
+} NMActiveConnection;
+
+typedef struct {
+ GObjectClass parent;
+
+ /* Signals */
+ void (*properties_changed) (NMActiveConnection *req, GHashTable *properties);
+} NMActiveConnectionClass;
+
+GType nm_active_connection_get_type (void);
+
+gboolean nm_active_connection_export (NMActiveConnection *self,
+ NMConnection *connection,
+ const char *devpath);
+
+NMConnection *nm_active_connection_get_connection (NMActiveConnection *self);
+
+const char * nm_active_connection_get_path (NMActiveConnection *self);
+
+const char * nm_active_connection_get_specific_object (NMActiveConnection *self);
+
+void nm_active_connection_set_specific_object (NMActiveConnection *self,
+ const char *specific_object);
+
+void nm_active_connection_set_default (NMActiveConnection *self,
+ gboolean is_default);
+
+gboolean nm_active_connection_get_default (NMActiveConnection *self);
+
+void nm_active_connection_set_default6 (NMActiveConnection *self,
+ gboolean is_default6);
+
+gboolean nm_active_connection_get_default6 (NMActiveConnection *self);
+
+NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *self);
+
+void nm_active_connection_set_state (NMActiveConnection *self,
+ NMActiveConnectionState state);
#endif /* NM_ACTIVE_CONNECTION_H */
diff --git a/src/nm-config.c b/src/nm-config.c
index 71f67d55d..f64b8bdbc 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -34,6 +34,9 @@ struct NMConfig {
char **dns_plugins;
char *log_level;
char *log_domains;
+ char *connectivity_uri;
+ guint connectivity_interval;
+ char *connectivity_response;
};
/************************************************************************/
@@ -47,25 +50,6 @@ nm_config_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_config_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Not enough memory to parse the config file. */
- ENUM_ENTRY (NM_CONFIG_ERROR_NO_MEMORY, "NoMemory"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMConfigError", values);
- }
- return etype;
-}
-
/************************************************************************/
const char *
@@ -116,6 +100,31 @@ nm_config_get_log_domains (NMConfig *config)
return config->log_domains;
}
+const char *
+nm_config_get_connectivity_uri (NMConfig *config)
+{
+ g_return_val_if_fail (config != NULL, NULL);
+
+ return config->connectivity_uri;
+}
+
+const guint
+nm_config_get_connectivity_interval (NMConfig *config)
+{
+ g_return_val_if_fail (config != NULL, -1);
+
+ return config->connectivity_interval;
+}
+
+const char *
+nm_config_get_connectivity_response (NMConfig *config)
+{
+ g_return_val_if_fail (config != NULL, NULL);
+
+ return config->connectivity_response;
+}
+
+
/************************************************************************/
static gboolean
@@ -124,6 +133,9 @@ fill_from_file (NMConfig *config,
const char *cli_plugins,
const char *cli_log_level,
const char *cli_log_domains,
+ const char *cli_connectivity_uri,
+ const gint cli_connectivity_interval,
+ const char *cli_connectivity_response,
GError **error)
{
GKeyFile *kf;
@@ -163,6 +175,22 @@ fill_from_file (NMConfig *config,
config->log_domains = g_strdup (cli_log_domains);
else
config->log_domains = g_key_file_get_value (kf, "logging", "domains", NULL);
+
+ if (cli_connectivity_uri && strlen (cli_connectivity_uri))
+ config->connectivity_uri = g_strdup (cli_connectivity_uri);
+ else
+ config->connectivity_uri = g_key_file_get_value (kf, "connectivity", "uri", NULL);
+
+ if (cli_connectivity_interval >= 0)
+ config->connectivity_interval = cli_connectivity_interval;
+ else
+ config->connectivity_interval = g_key_file_get_integer (kf, "connectivity", "interval", NULL);
+
+ if (cli_connectivity_response && strlen (cli_connectivity_response))
+ config->connectivity_response = g_strdup (cli_connectivity_response);
+ else
+ config->connectivity_response = g_key_file_get_value (kf, "connectivity", "response", NULL);
+
success = TRUE;
}
@@ -175,6 +203,9 @@ nm_config_new (const char *cli_config_path,
const char *cli_plugins,
const char *cli_log_level,
const char *cli_log_domains,
+ const char *cli_connectivity_uri,
+ const gint cli_connectivity_interval,
+ const char *cli_connectivity_response,
GError **error)
{
NMConfig *config;
@@ -184,7 +215,9 @@ nm_config_new (const char *cli_config_path,
if (cli_config_path) {
/* Bad user-specific config file path is a hard error */
- if (!fill_from_file (config, cli_config_path, cli_plugins, cli_log_level, cli_log_domains, error)) {
+ if (!fill_from_file (config, cli_config_path, cli_plugins, cli_log_level, cli_log_domains,
+ cli_connectivity_uri, cli_connectivity_interval, cli_connectivity_response,
+ error)) {
nm_config_free (config);
return NULL;
}
@@ -199,7 +232,9 @@ nm_config_new (const char *cli_config_path,
*/
/* Try deprecated nm-system-settings.conf first */
- if (fill_from_file (config, NM_OLD_SYSTEM_CONF_FILE, cli_plugins, cli_log_level, cli_log_domains, &local))
+ if (fill_from_file (config, NM_OLD_SYSTEM_CONF_FILE, cli_plugins, cli_log_level, cli_log_domains,
+ cli_connectivity_uri, cli_connectivity_interval, cli_connectivity_response,
+ &local))
return config;
if (g_error_matches (local, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND) == FALSE) {
@@ -211,7 +246,9 @@ nm_config_new (const char *cli_config_path,
g_clear_error (&local);
/* Try the standard config file location next */
- if (fill_from_file (config, NM_DEFAULT_SYSTEM_CONF_FILE, cli_plugins, cli_log_level, cli_log_domains, &local))
+ if (fill_from_file (config, NM_DEFAULT_SYSTEM_CONF_FILE, cli_plugins, cli_log_level, cli_log_domains,
+ cli_connectivity_uri, cli_connectivity_interval, cli_connectivity_response,
+ &local))
return config;
if (g_error_matches (local, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND) == FALSE) {
@@ -224,6 +261,15 @@ nm_config_new (const char *cli_config_path,
return NULL;
}
+ /* If for some reason no config file exists, and NM wasn't given on on
+ * the command line, just use the default config file path.
+ */
+ if (config->path == NULL) {
+ config->path = g_strdup (NM_DEFAULT_SYSTEM_CONF_FILE);
+ fprintf (stderr, "No config file found or given; using %s\n",
+ NM_DEFAULT_SYSTEM_CONF_FILE);
+ }
+
/* ignore error if config file not found */
g_clear_error (&local);
return config;
@@ -240,7 +286,8 @@ nm_config_free (NMConfig *config)
g_strfreev (config->dns_plugins);
g_free (config->log_level);
g_free (config->log_domains);
-
+ g_free (config->connectivity_uri);
+ g_free (config->connectivity_response);
memset (config, 0, sizeof (*config));
g_free (config);
}
diff --git a/src/nm-config.h b/src/nm-config.h
index fae344fbd..6c4206c13 100644
--- a/src/nm-config.h
+++ b/src/nm-config.h
@@ -27,19 +27,20 @@
typedef struct NMConfig NMConfig;
typedef enum {
- NM_CONFIG_ERROR_NO_MEMORY = 0,
+ NM_CONFIG_ERROR_NO_MEMORY = 0, /*< nick=NoMemory >*/
} NMConfigError;
#define NM_CONFIG_ERROR (nm_config_error_quark ())
GQuark nm_config_error_quark (void);
-#define NM_TYPE_CONFIG_ERROR (nm_config_error_get_type ())
-GType nm_config_error_get_type (void);
NMConfig *nm_config_new (const char *cli_config_path,
const char *cli_plugins,
const char *cli_log_level,
const char *cli_log_domains,
+ const char *cli_connectivity_check_uri,
+ const gint connectivity_check_interval,
+ const char *cli_connectivity_check_response,
GError **error);
const char *nm_config_get_path (NMConfig *config);
@@ -48,6 +49,9 @@ const char *nm_config_get_dhcp_client (NMConfig *config);
const char **nm_config_get_dns_plugins (NMConfig *config);
const char *nm_config_get_log_level (NMConfig *config);
const char *nm_config_get_log_domains (NMConfig *config);
+const char *nm_config_get_connectivity_uri (NMConfig *config);
+const guint nm_config_get_connectivity_interval (NMConfig *config);
+const char *nm_config_get_connectivity_response (NMConfig *config);
void nm_config_free (NMConfig *config);
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
new file mode 100644
index 000000000..7e0de2c19
--- /dev/null
+++ b/src/nm-connectivity.c
@@ -0,0 +1,368 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Thomas Bechtold <thomasbechtold@jpberlin.de>
+ * Copyright (C) 2011 Dan Williams <dcbw@redhat.com>
+ */
+
+#include <config.h>
+
+#include <string.h>
+#include <libsoup/soup.h>
+
+#include "nm-connectivity.h"
+#include "nm-logging.h"
+#include "nm-manager.h"
+
+G_DEFINE_TYPE (NMConnectivity, nm_connectivity, G_TYPE_OBJECT)
+
+#define NM_CONNECTIVITY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_CONNECTIVITY, NMConnectivityPrivate))
+
+
+#define DEFAULT_RESPONSE "NetworkManager is online" /* NOT LOCALIZED */
+
+typedef struct {
+ /* used for http requests */
+ SoupSession *soup_session;
+ /* indicates if a connectivity check is currently running */
+ gboolean running;
+ /* the uri to check */
+ char *uri;
+ /* seconds when a check will be repeated */
+ guint interval;
+ /* the expected response for the connectivity check */
+ char *response;
+ /* indicates if the last connection check was successful */
+ gboolean connected;
+ /* the source id for the periodic check */
+ guint check_id;
+} NMConnectivityPrivate;
+
+enum {
+ PROP_0,
+ PROP_RUNNING,
+ PROP_URI,
+ PROP_INTERVAL,
+ PROP_RESPONSE,
+ PROP_CONNECTED,
+ LAST_PROP
+};
+
+
+gboolean
+nm_connectivity_get_connected (NMConnectivity *connectivity)
+{
+ g_return_val_if_fail (NM_IS_CONNECTIVITY (connectivity), FALSE);
+
+ return NM_CONNECTIVITY_GET_PRIVATE (connectivity)->connected;
+}
+
+static void
+update_connected (NMConnectivity *self, gboolean connected)
+{
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+ gboolean old_connected = priv->connected;
+
+ if (priv->uri == NULL || priv->interval == 0) {
+ /* Default to connected if no checks are to be run */
+ priv->connected = TRUE;
+ } else
+ priv->connected = connected;
+
+ if (priv->connected != old_connected)
+ g_object_notify (G_OBJECT (self), NM_CONNECTIVITY_CONNECTED);
+}
+
+static void
+nm_connectivity_check_cb (SoupSession *session, SoupMessage *msg, gpointer user_data)
+{
+ NMConnectivity *self = NM_CONNECTIVITY (user_data);
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+ SoupURI *soup_uri;
+ gboolean connected_new = FALSE;
+ const char *nm_header;
+ char *uri_string;
+
+ soup_uri = soup_message_get_uri (msg);
+ uri_string = soup_uri_to_string (soup_uri, FALSE);
+
+ /* Check headers; if we find the NM-specific one we're done */
+ nm_header = soup_message_headers_get_one (msg->response_headers, "X-NetworkManager-Status");
+ if (g_strcmp0 (nm_header, "online") == 0) {
+ nm_log_dbg (LOGD_CORE, "Connectivity check for uri '%s' with Status header successful.", uri_string);
+ connected_new = TRUE;
+ } else {
+ /* check response */
+ if (msg->response_body->data && (g_str_has_prefix (msg->response_body->data, priv->response))) {
+ nm_log_dbg (LOGD_CORE, "Connectivity check for uri '%s' with expected response '%s' successful.",
+ uri_string, priv->response);
+ connected_new = TRUE;
+ } else {
+ nm_log_dbg (LOGD_CORE, "Connectivity check for uri '%s' with expected response '%s' failed (status %d).",
+ uri_string, priv->response, msg->status_code);
+ }
+ }
+ g_free (uri_string);
+
+ /* update connectivity and emit signal */
+ update_connected (self, connected_new);
+
+ priv->running = FALSE;
+ g_object_notify (G_OBJECT (self), NM_CONNECTIVITY_RUNNING);
+}
+
+static gboolean
+run_check (gpointer user_data)
+{
+ NMConnectivity *self = NM_CONNECTIVITY (user_data);
+ NMConnectivityPrivate *priv;
+ SoupURI *soup_uri;
+ SoupMessage *msg;
+
+ g_return_val_if_fail (NM_IS_CONNECTIVITY (self), FALSE);
+ priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ /* check given url async */
+ soup_uri = soup_uri_new (priv->uri);
+ if (soup_uri && SOUP_URI_VALID_FOR_HTTP (soup_uri)) {
+ msg = soup_message_new_from_uri ("GET", soup_uri);
+ soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
+ soup_session_queue_message (priv->soup_session,
+ msg,
+ nm_connectivity_check_cb,
+ self);
+
+ priv->running = TRUE;
+ g_object_notify (G_OBJECT (self), NM_CONNECTIVITY_RUNNING);
+ nm_log_dbg (LOGD_CORE, "Connectivity check with uri '%s' started.", priv->uri);
+ } else
+ nm_log_err (LOGD_CORE, "Invalid uri '%s' for connectivity check.", priv->uri);
+
+ if (soup_uri)
+ soup_uri_free (soup_uri);
+
+ return TRUE; /* keep firing */
+}
+
+void
+nm_connectivity_start_check (NMConnectivity *self)
+{
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ if (!priv->uri || !priv->interval) {
+ nm_connectivity_stop_check (self);
+ return;
+ }
+
+ if (priv->check_id == 0)
+ priv->check_id = g_timeout_add_seconds (priv->interval, run_check, self);
+
+ /* Start an immediate check */
+ if (priv->running == FALSE)
+ run_check (self);
+}
+
+void
+nm_connectivity_stop_check (NMConnectivity *self)
+{
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ if (priv->check_id) {
+ g_source_remove (priv->check_id);
+ priv->check_id = 0;
+ }
+
+ update_connected (self, FALSE);
+}
+
+NMConnectivity *
+nm_connectivity_new (const gchar *check_uri,
+ guint check_interval,
+ const gchar *check_response)
+{
+ NMConnectivity *self;
+
+ self = g_object_new (NM_TYPE_CONNECTIVITY,
+ NM_CONNECTIVITY_URI, check_uri,
+ NM_CONNECTIVITY_INTERVAL, check_interval,
+ NM_CONNECTIVITY_RESPONSE, check_response ? check_response : DEFAULT_RESPONSE,
+ NULL);
+ g_return_val_if_fail (self != NULL, NULL);
+ update_connected (self, FALSE);
+
+ return self;
+}
+
+static char *
+sanitize_string_val (const GValue *val)
+{
+ char *s;
+
+ /* Return NULL if string is NULL or zero-length */
+ s = g_value_dup_string (val);
+ if (!s || !s[0]) {
+ g_free (s);
+ return NULL;
+ }
+ return s;
+}
+
+static void
+set_property (GObject *object, guint property_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMConnectivity *self = NM_CONNECTIVITY (object);
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ switch (property_id) {
+ case PROP_RUNNING:
+ priv->running = g_value_get_boolean (value);
+ break;
+ case PROP_URI:
+ g_free (priv->uri);
+ priv->uri = sanitize_string_val (value);
+ break;
+ case PROP_INTERVAL:
+ priv->interval = g_value_get_uint (value);
+ break;
+ case PROP_RESPONSE:
+ g_free (priv->response);
+ priv->response = sanitize_string_val (value);
+ break;
+ case PROP_CONNECTED:
+ priv->connected = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint property_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMConnectivity *self = NM_CONNECTIVITY (object);
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ switch (property_id) {
+ case PROP_RUNNING:
+ g_value_set_boolean (value, priv->running);
+ break;
+ case PROP_URI:
+ g_value_set_string (value, priv->uri);
+ break;
+ case PROP_INTERVAL:
+ g_value_set_uint (value, priv->interval);
+ break;
+ case PROP_RESPONSE:
+ g_value_set_string (value, priv->response);
+ break;
+ case PROP_CONNECTED:
+ g_value_set_boolean (value, priv->connected);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+
+static void
+nm_connectivity_init (NMConnectivity *self)
+{
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ priv->soup_session = soup_session_async_new_with_options (SOUP_SESSION_TIMEOUT, 15, NULL);
+}
+
+
+static void
+dispose (GObject *object)
+{
+ NMConnectivity *self = NM_CONNECTIVITY (object);
+ NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self);
+
+ if (priv->soup_session) {
+ soup_session_abort (priv->soup_session);
+ g_object_unref (priv->soup_session);
+ priv->soup_session = NULL;
+ }
+
+ g_free (priv->uri);
+ g_free (priv->response);
+
+ if (priv->check_id > 0) {
+ g_source_remove (priv->check_id);
+ priv->check_id = 0;
+ }
+}
+
+
+static void
+nm_connectivity_class_init (NMConnectivityClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ g_type_class_add_private (klass, sizeof (NMConnectivityPrivate));
+
+ /* virtual methods */
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ /* properties */
+ g_object_class_install_property
+ (object_class, PROP_RUNNING,
+ g_param_spec_boolean (NM_CONNECTIVITY_RUNNING,
+ "Running",
+ "Connectivity check is running",
+ FALSE,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_URI,
+ g_param_spec_string (NM_CONNECTIVITY_URI,
+ "URI",
+ "Connectivity check URI",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_INTERVAL,
+ g_param_spec_uint (NM_CONNECTIVITY_INTERVAL,
+ "Interval",
+ "Connectivity check interval in seconds",
+ 0, G_MAXUINT, 300,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property
+ (object_class, PROP_RESPONSE,
+ g_param_spec_string (NM_CONNECTIVITY_RESPONSE,
+ "Response",
+ "Expected connectivity check reponse",
+ DEFAULT_RESPONSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property
+ (object_class, PROP_CONNECTED,
+ g_param_spec_boolean (NM_CONNECTIVITY_CONNECTED,
+ "Connected",
+ "Is connected",
+ FALSE,
+ G_PARAM_READABLE));
+}
+
diff --git a/src/nm-connectivity.h b/src/nm-connectivity.h
new file mode 100644
index 000000000..cecc66766
--- /dev/null
+++ b/src/nm-connectivity.h
@@ -0,0 +1,66 @@
+
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Thomas Bechtold <thomasbechtold@jpberlin.de>
+ */
+
+#ifndef NM_CONNECTIVITY_H
+#define NM_CONNECTIVITY_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "NetworkManager.h"
+
+#define NM_TYPE_CONNECTIVITY (nm_connectivity_get_type ())
+#define NM_CONNECTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTIVITY, NMConnectivity))
+#define NM_CONNECTIVITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CONNECTIVITY, NMConnectivityClass))
+#define NM_IS_CONNECTIVITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTIVITY))
+#define NM_IS_CONNECTIVITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CONNECTIVITY))
+#define NM_CONNECTIVITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTIVITY, NMConnectivityClass))
+
+/* Properties */
+#define NM_CONNECTIVITY_RUNNING "running"
+#define NM_CONNECTIVITY_URI "uri"
+#define NM_CONNECTIVITY_INTERVAL "interval"
+#define NM_CONNECTIVITY_RESPONSE "response"
+#define NM_CONNECTIVITY_CONNECTED "connected"
+
+
+typedef struct {
+ GObject parent;
+} NMConnectivity;
+
+typedef struct {
+ GObjectClass parent;
+} NMConnectivityClass;
+
+GType nm_connectivity_get_type (void);
+
+
+NMConnectivity *nm_connectivity_new (const gchar *check_uri,
+ guint check_interval,
+ const gchar *check_response);
+
+void nm_connectivity_start_check (NMConnectivity *connectivity);
+
+void nm_connectivity_stop_check (NMConnectivity *connectivity);
+
+gboolean nm_connectivity_get_connected (NMConnectivity *connectivity);
+
+#endif /* NM_CONNECTIVITY_H */
diff --git a/src/nm-device-bond.c b/src/nm-device-bond.c
new file mode 100644
index 000000000..0d99fd719
--- /dev/null
+++ b/src/nm-device-bond.c
@@ -0,0 +1,569 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011 - 2012 Red Hat, Inc.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include <netinet/ether.h>
+
+#include "nm-device-bond.h"
+#include "nm-logging.h"
+#include "nm-properties-changed-signal.h"
+#include "nm-utils.h"
+#include "NetworkManagerUtils.h"
+#include "nm-device-private.h"
+#include "nm-netlink-monitor.h"
+#include "nm-enum-types.h"
+#include "nm-system.h"
+
+#include "nm-device-bond-glue.h"
+
+
+G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE_WIRED)
+
+#define NM_DEVICE_BOND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_BOND, NMDeviceBondPrivate))
+
+#define NM_BOND_ERROR (nm_bond_error_quark ())
+
+typedef struct {
+ GSList *slaves;
+} NMDeviceBondPrivate;
+
+enum {
+ PROPERTIES_CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_CARRIER,
+
+ LAST_PROP
+};
+
+/******************************************************************/
+
+static GQuark
+nm_bond_error_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("nm-bond-error");
+ return quark;
+}
+
+/******************************************************************/
+
+static void
+device_state_changed (NMDevice *device,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason,
+ gpointer user_data)
+{
+ if (new_state == NM_DEVICE_STATE_UNAVAILABLE) {
+ /* Use NM_DEVICE_STATE_REASON_CARRIER to make sure num retries is reset */
+ nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER);
+ }
+}
+
+static void
+real_update_hw_address (NMDevice *dev)
+{
+ const guint8 *hw_addr;
+ guint8 old_addr[NM_UTILS_HWADDR_LEN_MAX];
+ int addrtype, addrlen;
+
+ addrtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (dev));
+ g_assert (addrtype >= 0);
+ addrlen = nm_utils_hwaddr_len (addrtype);
+ g_assert (addrlen > 0);
+
+ hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ memcpy (old_addr, hw_addr, addrlen);
+
+ NM_DEVICE_CLASS (nm_device_bond_parent_class)->update_hw_address (dev);
+
+ hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ if (memcmp (old_addr, hw_addr, addrlen))
+ g_object_notify (G_OBJECT (dev), NM_DEVICE_BOND_HW_ADDRESS);
+}
+
+static guint32
+real_get_generic_capabilities (NMDevice *dev)
+{
+ return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_NM_SUPPORTED;
+}
+
+static gboolean
+match_bond_connection (NMDevice *device, NMConnection *connection, GError **error)
+{
+ const char *iface;
+ NMSettingBond *s_bond;
+
+ s_bond = nm_connection_get_setting_bond (connection);
+ if (!s_bond || !nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME)) {
+ g_set_error (error, NM_BOND_ERROR, NM_BOND_ERROR_CONNECTION_NOT_BOND,
+ "The connection was not a bond connection.");
+ return FALSE;
+ }
+
+ /* Bond connections must specify the virtual interface name */
+ iface = nm_connection_get_virtual_iface_name (connection);
+ if (!iface || strcmp (nm_device_get_iface (device), iface)) {
+ g_set_error (error, NM_BOND_ERROR, NM_BOND_ERROR_CONNECTION_NOT_BOND,
+ "The bond connection virtual interface name did not match.");
+ return FALSE;
+ }
+
+ /* FIXME: match bond properties like mode, etc? */
+
+ return TRUE;
+}
+
+static NMConnection *
+real_get_best_auto_connection (NMDevice *dev,
+ GSList *connections,
+ char **specific_object)
+{
+ GSList *iter;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+ NMSettingConnection *s_con;
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+ if ( nm_setting_connection_get_autoconnect (s_con)
+ && match_bond_connection (dev, connection, NULL))
+ return connection;
+ }
+ return NULL;
+}
+
+static gboolean
+real_check_connection_compatible (NMDevice *device,
+ NMConnection *connection,
+ GError **error)
+{
+ return match_bond_connection (device, connection, error);
+}
+
+static gboolean
+real_complete_connection (NMDevice *device,
+ NMConnection *connection,
+ const char *specific_object,
+ const GSList *existing_connections,
+ GError **error)
+{
+ NMSettingBond *s_bond, *tmp;
+ guint32 i = 0;
+ char *name;
+ const GSList *iter;
+ gboolean found;
+
+ nm_utils_complete_generic (connection,
+ NM_SETTING_BOND_SETTING_NAME,
+ existing_connections,
+ _("Bond connection %d"),
+ NULL,
+ TRUE);
+
+ s_bond = nm_connection_get_setting_bond (connection);
+ if (!s_bond) {
+ s_bond = (NMSettingBond *) nm_setting_bond_new ();
+ nm_connection_add_setting (connection, NM_SETTING (s_bond));
+ }
+
+ /* Grab the first name that doesn't exist in either our connections
+ * or a device on the system.
+ */
+ while (i < 500 && !nm_setting_bond_get_interface_name (s_bond)) {
+ name = g_strdup_printf ("bond%u", i);
+ /* check interface names */
+ if (nm_netlink_iface_to_index (name) < 0) {
+ /* check existing bond connections */
+ for (iter = existing_connections, found = FALSE; iter; iter = g_slist_next (iter)) {
+ NMConnection *candidate = iter->data;
+
+ tmp = nm_connection_get_setting_bond (candidate);
+ if (tmp && nm_connection_is_type (candidate, NM_SETTING_BOND_SETTING_NAME)) {
+ if (g_strcmp0 (nm_setting_bond_get_interface_name (tmp), name) == 0) {
+ found = TRUE;
+ break;
+ }
+ }
+ }
+
+ if (!found)
+ g_object_set (G_OBJECT (s_bond), NM_SETTING_BOND_INTERFACE_NAME, name, NULL);
+ }
+
+ g_free (name);
+ i++;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+spec_match_list (NMDevice *device, const GSList *specs)
+{
+ char *hwaddr;
+ gboolean matched;
+
+ hwaddr = nm_utils_hwaddr_ntoa (nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)), ARPHRD_ETHER);
+ matched = nm_match_spec_hwaddr (specs, hwaddr);
+ g_free (hwaddr);
+
+ return matched;
+}
+
+static gboolean
+bond_match_config (NMDevice *self, NMConnection *connection)
+{
+ NMSettingBond *s_bond;
+ const char *ifname;
+
+ s_bond = nm_connection_get_setting_bond (connection);
+ if (!s_bond)
+ return FALSE;
+
+ /* Interface name */
+ ifname = nm_setting_bond_get_interface_name (s_bond);
+ if (g_strcmp0 (ifname, nm_device_get_ip_iface (self)) != 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+static NMConnection *
+connection_match_config (NMDevice *self, const GSList *connections)
+{
+ const GSList *iter;
+ GSList *bond_matches;
+ NMConnection *match;
+
+ /* First narrow @connections down to those that match in their
+ * NMSettingBond configuration.
+ */
+ bond_matches = NULL;
+ for (iter = connections; iter; iter = iter->next) {
+ NMConnection *candidate = NM_CONNECTION (iter->data);
+
+ if (!nm_connection_is_type (candidate, NM_SETTING_BOND_SETTING_NAME))
+ continue;
+ if (!bond_match_config (self, candidate))
+ continue;
+
+ bond_matches = g_slist_prepend (bond_matches, candidate);
+ }
+
+ /* Now pass those to the super method, which will check IP config */
+ bond_matches = g_slist_reverse (bond_matches);
+ match = NM_DEVICE_CLASS (nm_device_bond_parent_class)->connection_match_config (self, bond_matches);
+ g_slist_free (bond_matches);
+
+ return match;
+}
+
+/******************************************************************/
+
+static NMActStageReturn
+real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
+{
+ NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS;
+ NMConnection *connection;
+ NMSettingBond *s_bond;
+ gboolean no_firmware = FALSE;
+
+ g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+
+ ret = NM_DEVICE_CLASS (nm_device_bond_parent_class)->act_stage1_prepare (dev, reason);
+ if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
+ connection = nm_device_get_connection (dev);
+ g_assert (connection);
+ s_bond = nm_connection_get_setting_bond (connection);
+ g_assert (s_bond);
+
+ /* Interface must be down to set bond options */
+ nm_device_hw_take_down (dev, TRUE);
+
+ if (!nm_system_apply_bonding_config (nm_device_get_ip_iface (dev), s_bond))
+ ret = NM_ACT_STAGE_RETURN_FAILURE;
+
+ nm_device_hw_bring_up (dev, TRUE, &no_firmware);
+ }
+ return ret;
+}
+
+static void
+slave_state_changed (NMDevice *slave,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason,
+ gpointer user_data)
+{
+ NMDeviceBond *self = NM_DEVICE_BOND (user_data);
+
+ nm_log_dbg (LOGD_DEVICE, "(%s): slave %s state change %d -> %d",
+ nm_device_get_iface (NM_DEVICE (self)),
+ nm_device_get_iface (slave),
+ old_state,
+ new_state);
+
+ if ( old_state > NM_DEVICE_STATE_DISCONNECTED
+ && new_state <= NM_DEVICE_STATE_DISCONNECTED) {
+ /* Slave is no longer available or managed; can't use it */
+ nm_device_release_slave (NM_DEVICE (self), slave);
+ }
+}
+
+typedef struct {
+ NMDevice *slave;
+ guint state_id;
+} SlaveInfo;
+
+static SlaveInfo *
+find_slave_info_by_device (NMDeviceBond *self, NMDevice *slave)
+{
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (self);
+ GSList *iter;
+
+ for (iter = priv->slaves; iter; iter = g_slist_next (iter)) {
+ if (((SlaveInfo *) iter->data)->slave == slave)
+ return iter->data;
+ }
+ return NULL;
+}
+
+static void
+free_slave_info (SlaveInfo *sinfo)
+{
+ g_return_if_fail (sinfo != NULL);
+ g_return_if_fail (sinfo->slave != NULL);
+
+ g_signal_handler_disconnect (sinfo->slave, sinfo->state_id);
+ g_object_unref (sinfo->slave);
+ memset (sinfo, 0, sizeof (*sinfo));
+ g_free (sinfo);
+}
+
+static gboolean
+enslave_slave (NMDevice *device, NMDevice *slave)
+{
+ NMDeviceBond *self = NM_DEVICE_BOND (device);
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (self);
+ gboolean success, no_firmware = FALSE;
+
+ if (find_slave_info_by_device (self, slave))
+ return TRUE;
+
+ nm_device_hw_take_down (slave, TRUE);
+
+ success = nm_system_iface_enslave (nm_device_get_ip_ifindex (device),
+ nm_device_get_ip_iface (device),
+ nm_device_get_ip_ifindex (slave),
+ nm_device_get_ip_iface (slave));
+ if (success) {
+ SlaveInfo *sinfo;
+
+ sinfo = g_malloc0 (sizeof (*slave));
+ sinfo->slave = g_object_ref (slave);
+ sinfo->state_id = g_signal_connect (slave,
+ "state-changed",
+ (GCallback) slave_state_changed,
+ self);
+ priv->slaves = g_slist_append (priv->slaves, sinfo);
+
+ nm_log_dbg (LOGD_DEVICE, "(%s): enslaved bond slave %s",
+ nm_device_get_ip_iface (device),
+ nm_device_get_ip_iface (slave));
+ }
+
+ nm_device_hw_bring_up (slave, TRUE, &no_firmware);
+
+ return success;
+}
+
+static gboolean
+release_slave (NMDevice *device, NMDevice *slave)
+{
+ NMDeviceBond *self = NM_DEVICE_BOND (device);
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (self);
+ gboolean success;
+ SlaveInfo *sinfo;
+
+ sinfo = find_slave_info_by_device (self, slave);
+ if (!sinfo)
+ return FALSE;
+
+ success = nm_system_iface_release (nm_device_get_ip_ifindex (device),
+ nm_device_get_ip_iface (device),
+ nm_device_get_ip_ifindex (slave),
+ nm_device_get_ip_iface (slave));
+ nm_log_dbg (LOGD_DEVICE, "(%s): released bond slave %s (success %d)",
+ nm_device_get_ip_iface (device),
+ nm_device_get_ip_iface (slave),
+ success);
+ priv->slaves = g_slist_remove (priv->slaves, sinfo);
+ free_slave_info (sinfo);
+ return success;
+}
+
+/******************************************************************/
+
+NMDevice *
+nm_device_bond_new (const char *udi, const char *iface)
+{
+ g_return_val_if_fail (udi != NULL, NULL);
+ g_return_val_if_fail (iface != NULL, NULL);
+
+ return (NMDevice *) g_object_new (NM_TYPE_DEVICE_BOND,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, "bonding",
+ NM_DEVICE_TYPE_DESC, "Bond",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_BOND,
+ NULL);
+}
+
+static void
+constructed (GObject *object)
+{
+ G_OBJECT_CLASS (nm_device_bond_parent_class)->constructed (object);
+
+ nm_log_dbg (LOGD_HW | LOGD_DEVICE, "(%s): kernel ifindex %d",
+ nm_device_get_iface (NM_DEVICE (object)),
+ nm_device_get_ifindex (NM_DEVICE (object)));
+}
+
+static void
+nm_device_bond_init (NMDeviceBond * self)
+{
+ g_signal_connect (self, "state-changed", G_CALLBACK (device_state_changed), NULL);
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ const guint8 *current_addr;
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (object));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_ETHER));
+ break;
+ case PROP_CARRIER:
+ g_value_set_boolean (value, nm_device_wired_get_carrier (NM_DEVICE_WIRED (object)));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceBond *self = NM_DEVICE_BOND (object);
+ NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (self);
+ GSList *iter;
+
+ for (iter = priv->slaves; iter; iter = g_slist_next (iter))
+ release_slave (NM_DEVICE (self), ((SlaveInfo *) iter->data)->slave);
+ g_slist_free (priv->slaves);
+ priv->slaves = NULL;
+
+ G_OBJECT_CLASS (nm_device_bond_parent_class)->dispose (object);
+}
+
+static void
+nm_device_bond_class_init (NMDeviceBondClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceBondPrivate));
+
+ /* virtual methods */
+ object_class->constructed = constructed;
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+ object_class->dispose = dispose;
+
+ parent_class->get_generic_capabilities = real_get_generic_capabilities;
+ parent_class->update_hw_address = real_update_hw_address;
+ parent_class->get_best_auto_connection = real_get_best_auto_connection;
+ parent_class->check_connection_compatible = real_check_connection_compatible;
+ parent_class->complete_connection = real_complete_connection;
+
+ parent_class->spec_match_list = spec_match_list;
+ parent_class->connection_match_config = connection_match_config;
+
+ parent_class->act_stage1_prepare = real_act_stage1_prepare;
+ parent_class->enslave_slave = enslave_slave;
+ parent_class->release_slave = release_slave;
+
+ /* properties */
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_BOND_HW_ADDRESS,
+ "Active MAC Address",
+ "Currently set hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_BOND_CARRIER,
+ "Carrier",
+ "Carrier",
+ FALSE,
+ G_PARAM_READABLE));
+
+ /* Signals */
+ signals[PROPERTIES_CHANGED] =
+ nm_properties_changed_signal_new (object_class,
+ G_STRUCT_OFFSET (NMDeviceBondClass, properties_changed));
+
+ dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
+ &dbus_glib_nm_device_bond_object_info);
+
+ dbus_g_error_domain_register (NM_BOND_ERROR, NULL, NM_TYPE_BOND_ERROR);
+}
diff --git a/src/nm-device-bond.h b/src/nm-device-bond.h
new file mode 100644
index 000000000..50ca45eaf
--- /dev/null
+++ b/src/nm-device-bond.h
@@ -0,0 +1,65 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_BOND_H
+#define NM_DEVICE_BOND_H
+
+#include <glib-object.h>
+
+#include "nm-device-wired.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_BOND (nm_device_bond_get_type ())
+#define NM_DEVICE_BOND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_BOND, NMDeviceBond))
+#define NM_DEVICE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_BOND, NMDeviceBondClass))
+#define NM_IS_DEVICE_BOND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_BOND))
+#define NM_IS_DEVICE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_BOND))
+#define NM_DEVICE_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_BOND, NMDeviceBondClass))
+
+typedef enum {
+ NM_BOND_ERROR_CONNECTION_NOT_BOND = 0, /*< nick=ConnectionNotBond >*/
+ NM_BOND_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_BOND_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMBondError;
+
+#define NM_DEVICE_BOND_HW_ADDRESS "hw-address"
+#define NM_DEVICE_BOND_CARRIER "carrier"
+
+typedef struct {
+ NMDeviceWired parent;
+} NMDeviceBond;
+
+typedef struct {
+ NMDeviceWiredClass parent;
+
+ /* Signals */
+ void (*properties_changed) (NMDeviceBond *device, GHashTable *properties);
+} NMDeviceBondClass;
+
+
+GType nm_device_bond_get_type (void);
+
+NMDevice *nm_device_bond_new (const char *udi,
+ const char *iface);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_BOND_H */
diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c
index c36e0c0ba..726762b65 100644
--- a/src/nm-device-bt.c
+++ b/src/nm-device-bt.c
@@ -31,7 +31,6 @@
#include "nm-bluez-common.h"
#include "nm-dbus-manager.h"
#include "nm-device-bt.h"
-#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-logging.h"
#include "nm-marshal.h"
@@ -45,6 +44,8 @@
#include "nm-setting-ppp.h"
#include "nm-device-bt-glue.h"
#include "NetworkManagerUtils.h"
+#include "nm-enum-types.h"
+#include "nm-utils.h"
#define BLUETOOTH_DUN_UUID "dun"
#define BLUETOOTH_NAP_UUID "nap"
@@ -91,14 +92,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-typedef enum {
- NM_BT_ERROR_CONNECTION_NOT_BT = 0,
- NM_BT_ERROR_CONNECTION_INVALID,
- NM_BT_ERROR_CONNECTION_INCOMPATIBLE,
-} NMBtError;
-
#define NM_BT_ERROR (nm_bt_error_quark ())
-#define NM_TYPE_BT_ERROR (nm_bt_error_get_type ())
static GQuark
nm_bt_error_quark (void)
@@ -109,30 +103,6 @@ nm_bt_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_bt_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a BT connection. */
- ENUM_ENTRY (NM_BT_ERROR_CONNECTION_NOT_BT, "ConnectionNotBt"),
- /* Connection was not a valid BT connection. */
- ENUM_ENTRY (NM_BT_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_BT_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMBtError", values);
- }
- return etype;
-}
-
-
guint32 nm_device_bt_get_capabilities (NMDeviceBt *self)
{
g_return_val_if_fail (self != NULL, NM_BT_CAPABILITY_NONE);
@@ -155,7 +125,7 @@ get_connection_bt_type (NMConnection *connection)
NMSettingBluetooth *s_bt;
const char *bt_type;
- s_bt = (NMSettingBluetooth *) nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH);
+ s_bt = nm_connection_get_setting_bluetooth (connection);
if (!s_bt)
return NM_BT_CAPABILITY_NONE;
@@ -183,7 +153,7 @@ real_get_best_auto_connection (NMDevice *device,
NMSettingConnection *s_con;
guint32 bt_type;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (!nm_setting_connection_get_autoconnect (s_con))
@@ -214,7 +184,7 @@ real_check_connection_compatible (NMDevice *device,
int addr_match = FALSE;
guint32 bt_type;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_BLUETOOTH_SETTING_NAME)) {
@@ -224,7 +194,7 @@ real_check_connection_compatible (NMDevice *device,
return FALSE;
}
- s_bt = NM_SETTING_BLUETOOTH (nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH));
+ s_bt = nm_connection_get_setting_bluetooth (connection);
if (!s_bt) {
g_set_error (error,
NM_BT_ERROR, NM_BT_ERROR_CONNECTION_INVALID,
@@ -276,12 +246,12 @@ real_complete_connection (NMDevice *device,
NMSettingPPP *s_ppp;
const char *format = NULL, *preferred = NULL;
- s_gsm = (NMSettingGsm *) nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM);
- s_cdma = (NMSettingCdma *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA);
- s_serial = (NMSettingSerial *) nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL);
- s_ppp = (NMSettingPPP *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
+ s_gsm = nm_connection_get_setting_gsm (connection);
+ s_cdma = nm_connection_get_setting_cdma (connection);
+ s_serial = nm_connection_get_setting_serial (connection);
+ s_ppp = nm_connection_get_setting_ppp (connection);
- s_bt = (NMSettingBluetooth *) nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH);
+ s_bt = nm_connection_get_setting_bluetooth (connection);
if (!s_bt) {
s_bt = (NMSettingBluetooth *) nm_setting_bluetooth_new ();
nm_connection_add_setting (connection, NM_SETTING (s_bt));
@@ -404,6 +374,42 @@ real_get_generic_capabilities (NMDevice *dev)
return NM_DEVICE_CAP_NM_SUPPORTED;
}
+static gboolean
+hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr)
+{
+ NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device);
+ NMSettingBluetooth *s_bt;
+ const GByteArray *mac = NULL;
+ gboolean matches = FALSE;
+ GByteArray *devmac;
+
+ s_bt = nm_connection_get_setting_bluetooth (connection);
+ if (s_bt)
+ mac = nm_setting_bluetooth_get_bdaddr (s_bt);
+
+ if (mac) {
+ devmac = nm_utils_hwaddr_atoba (priv->bdaddr, ARPHRD_ETHER);
+ g_return_val_if_fail (devmac != NULL, FALSE);
+ g_return_val_if_fail (devmac->len == mac->len, FALSE);
+
+ if (other_hwaddr) {
+ g_return_val_if_fail (other_hwaddr_len == devmac->len, FALSE);
+ matches = (memcmp (mac->data, other_hwaddr, mac->len) == 0) ? TRUE : FALSE;
+ } else
+ matches = (memcmp (mac->data, devmac->data, mac->len) == 0) ? TRUE : FALSE;
+
+ g_byte_array_free (devmac, TRUE);
+ return matches;
+ } else if (fail_if_no_hwaddr == FALSE)
+ return TRUE;
+
+ return FALSE;
+}
+
/*****************************************************************************/
/* IP method PPP */
@@ -421,17 +427,19 @@ ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
- switch (nm_device_interface_get_state (NM_DEVICE_INTERFACE (device))) {
+ switch (nm_device_get_state (device)) {
case NM_DEVICE_STATE_PREPARE:
case NM_DEVICE_STATE_CONFIG:
case NM_DEVICE_STATE_NEED_AUTH:
- case NM_DEVICE_STATE_IP_CHECK:
- case NM_DEVICE_STATE_SECONDARIES:
- case NM_DEVICE_STATE_ACTIVATED:
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);
break;
case NM_DEVICE_STATE_IP_CONFIG:
- if (nm_device_ip_config_should_fail (device, FALSE)) {
+ case NM_DEVICE_STATE_IP_CHECK:
+ case NM_DEVICE_STATE_SECONDARIES:
+ case NM_DEVICE_STATE_ACTIVATED:
+ if (nm_device_activate_ip4_state_in_conf (device))
+ nm_device_activate_schedule_ip4_config_timeout (device);
+ else {
nm_device_state_changed (device,
NM_DEVICE_STATE_FAILED,
NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
@@ -478,7 +486,7 @@ modem_prepare_result (NMModem *modem,
NMDevice *device = NM_DEVICE (user_data);
NMDeviceState state;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
+ state = nm_device_get_state (device);
g_return_if_fail (state == NM_DEVICE_STATE_CONFIG || state == NM_DEVICE_STATE_NEED_AUTH);
if (success) {
@@ -526,10 +534,8 @@ modem_ip4_config_result (NMModem *self,
gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
- NMDeviceState state;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
- g_return_if_fail (state == NM_DEVICE_STATE_IP_CONFIG);
+ g_return_if_fail (nm_device_activate_ip4_state_in_conf (device) == TRUE);
if (error) {
nm_log_warn (LOGD_MB | LOGD_IP4 | LOGD_BT,
@@ -543,7 +549,7 @@ modem_ip4_config_result (NMModem *self,
if (iface)
nm_device_set_ip_iface (device, iface);
- nm_device_activate_schedule_stage4_ip4_config_get (device);
+ nm_device_activate_schedule_ip4_config_result (device, config);
}
}
@@ -613,7 +619,7 @@ nm_device_bt_modem_added (NMDeviceBt *self,
/* Can only accept the modem in stage2, but since the interface matched
* what we were expecting, don't let anything else claim the modem either.
*/
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
+ state = nm_device_get_state (NM_DEVICE (self));
if (state != NM_DEVICE_STATE_CONFIG) {
nm_log_warn (LOGD_BT | LOGD_MB,
"(%s): modem found but device not in correct state (%d)",
@@ -847,15 +853,14 @@ static NMActStageReturn
real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
{
NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device);
- NMActRequest *req;
NMDBusManager *dbus_mgr;
DBusGConnection *g_connection;
gboolean dun = FALSE;
+ NMConnection *connection;
- req = nm_device_get_act_request (device);
- g_assert (req);
-
- priv->bt_type = get_connection_bt_type (nm_act_request_get_connection (req));
+ connection = nm_device_get_connection (device);
+ g_assert (connection);
+ priv->bt_type = get_connection_bt_type (connection);
if (priv->bt_type == NM_BT_CAPABILITY_NONE) {
// FIXME: set a reason code
return NM_ACT_STAGE_RETURN_FAILURE;
@@ -920,7 +925,9 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
}
static NMActStageReturn
-real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
+real_act_stage3_ip4_config_start (NMDevice *device,
+ NMIP4Config **out_config,
+ NMDeviceStateReason *reason)
{
NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device);
NMActStageReturn ret;
@@ -931,27 +938,26 @@ real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
NM_DEVICE_CLASS (nm_device_bt_parent_class),
reason);
} else
- ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage3_ip4_config_start (device, reason);
+ ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage3_ip4_config_start (device, out_config, reason);
return ret;
}
static NMActStageReturn
-real_act_stage4_get_ip4_config (NMDevice *device,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+real_act_stage3_ip6_config_start (NMDevice *device,
+ NMIP6Config **out_config,
+ NMDeviceStateReason *reason)
{
NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device);
NMActStageReturn ret;
if (priv->bt_type == NM_BT_CAPABILITY_DUN) {
- ret = nm_modem_stage4_get_ip4_config (NM_DEVICE_BT_GET_PRIVATE (device)->modem,
- device,
- NM_DEVICE_CLASS (nm_device_bt_parent_class),
- config,
- reason);
+ ret = nm_modem_stage3_ip6_config_start (NM_DEVICE_BT_GET_PRIVATE (device)->modem,
+ device,
+ NM_DEVICE_CLASS (nm_device_bt_parent_class),
+ reason);
} else
- ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage4_get_ip4_config (device, config, reason);
+ ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage3_ip6_config_start (device, out_config, reason);
return ret;
}
@@ -1037,15 +1043,15 @@ nm_device_bt_new (const char *udi,
g_return_val_if_fail (capabilities != NM_BT_CAPABILITY_NONE, NULL);
device = (NMDevice *) g_object_new (NM_TYPE_DEVICE_BT,
- NM_DEVICE_INTERFACE_UDI, udi,
- NM_DEVICE_INTERFACE_IFACE, bdaddr,
- NM_DEVICE_INTERFACE_DRIVER, "bluez",
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, bdaddr,
+ NM_DEVICE_DRIVER, "bluez",
NM_DEVICE_BT_HW_ADDRESS, bdaddr,
NM_DEVICE_BT_NAME, name,
NM_DEVICE_BT_CAPABILITIES, capabilities,
- NM_DEVICE_INTERFACE_MANAGED, managed,
- NM_DEVICE_INTERFACE_TYPE_DESC, "Bluetooth",
- NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_BT,
+ NM_DEVICE_MANAGED, managed,
+ NM_DEVICE_TYPE_DESC, "Bluetooth",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_BT,
NULL);
if (device)
g_signal_connect (device, "state-changed", G_CALLBACK (device_state_changed), device);
@@ -1148,9 +1154,10 @@ nm_device_bt_class_init (NMDeviceBtClass *klass)
device_class->deactivate = real_deactivate;
device_class->act_stage2_config = real_act_stage2_config;
device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
- device_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config;
+ device_class->act_stage3_ip6_config_start = real_act_stage3_ip6_config_start;
device_class->check_connection_compatible = real_check_connection_compatible;
device_class->complete_connection = real_complete_connection;
+ device_class->hwaddr_matches = hwaddr_matches;
/* Properties */
g_object_class_install_property
diff --git a/src/nm-device-bt.h b/src/nm-device-bt.h
index d3187d766..0d54d6079 100644
--- a/src/nm-device-bt.h
+++ b/src/nm-device-bt.h
@@ -33,6 +33,12 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_BT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_BT))
#define NM_DEVICE_BT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_BT, NMDeviceBtClass))
+typedef enum {
+ NM_BT_ERROR_CONNECTION_NOT_BT = 0, /*< nick=ConnectionNotBt >*/
+ NM_BT_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_BT_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMBtError;
+
#define NM_DEVICE_BT_HW_ADDRESS "hw-address"
#define NM_DEVICE_BT_NAME "name"
#define NM_DEVICE_BT_CAPABILITIES "bt-capabilities"
@@ -69,4 +75,4 @@ gboolean nm_device_bt_modem_removed (NMDeviceBt *device, NMModem *modem);
G_END_DECLS
-#endif /* NM_GSM_DEVICE_H */
+#endif /* NM_DEVICE_BT_H */
diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c
index 8556c5bd5..df0ae94fa 100644
--- a/src/nm-device-ethernet.c
+++ b/src/nm-device-ethernet.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
@@ -24,11 +24,8 @@
#include <glib/gi18n.h>
#include <netinet/in.h>
#include <string.h>
-#include <net/ethernet.h>
#include <stdlib.h>
-#include <linux/types.h>
#include <linux/sockios.h>
-#include <linux/version.h>
#include <linux/ethtool.h>
#include <sys/ioctl.h>
#include <unistd.h>
@@ -38,47 +35,37 @@
#include <gudev/gudev.h>
-#include <netlink/route/addr.h>
-
#include "nm-glib-compat.h"
#include "nm-device-ethernet.h"
-#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-activation-request.h"
#include "NetworkManagerUtils.h"
#include "nm-supplicant-manager.h"
#include "nm-supplicant-interface.h"
#include "nm-supplicant-config.h"
-#include "nm-netlink-monitor.h"
#include "nm-system.h"
#include "nm-setting-connection.h"
#include "nm-setting-wired.h"
#include "nm-setting-8021x.h"
#include "nm-setting-pppoe.h"
+#include "nm-setting-bond.h"
#include "ppp-manager/nm-ppp-manager.h"
#include "nm-logging.h"
#include "nm-properties-changed-signal.h"
-#include "nm-dhcp-manager.h"
-#include "nm-netlink-utils.h"
+#include "nm-utils.h"
+#include "nm-enum-types.h"
+#include "nm-netlink-monitor.h"
#include "nm-device-ethernet-glue.h"
-G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
+G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE_WIRED)
#define NM_DEVICE_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetPrivate))
#define WIRED_SECRETS_TRIES "wired-secrets-tries"
-typedef enum
-{
- NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED = 0,
- NM_ETHERNET_ERROR_CONNECTION_INVALID,
- NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
-} NMEthernetError;
-
#define NM_ETHERNET_ERROR (nm_ethernet_error_quark ())
-#define NM_TYPE_ETHERNET_ERROR (nm_ethernet_error_get_type ())
typedef struct Supplicant {
NMSupplicantManager *mgr;
@@ -94,17 +81,8 @@ typedef struct Supplicant {
} Supplicant;
typedef struct {
- gboolean disposed;
-
- guint8 hw_addr[ETH_ALEN]; /* Currently set MAC address */
guint8 perm_hw_addr[ETH_ALEN]; /* Permanent MAC address */
guint8 initial_hw_addr[ETH_ALEN]; /* Initial MAC address (as seen when NM starts) */
- gboolean carrier;
-
- NMNetlinkMonitor * monitor;
- gulong link_connected_id;
- gulong link_disconnected_id;
- guint carrier_action_defer_id;
Supplicant supplicant;
guint supplicant_timeout_id;
@@ -151,145 +129,6 @@ nm_ethernet_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_ethernet_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a wired connection. */
- ENUM_ENTRY (NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED, "ConnectionNotWired"),
- /* Connection was not a valid wired connection. */
- ENUM_ENTRY (NM_ETHERNET_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMEthernetError", values);
- }
- return etype;
-}
-
-static void
-carrier_action_defer_clear (NMDeviceEthernet *self)
-{
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
-
- if (priv->carrier_action_defer_id) {
- g_source_remove (priv->carrier_action_defer_id);
- priv->carrier_action_defer_id = 0;
- }
-}
-
-static gboolean
-carrier_action_defer_cb (gpointer user_data)
-{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data);
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- NMDeviceState state;
-
- priv->carrier_action_defer_id = 0;
-
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
- if (state == NM_DEVICE_STATE_UNAVAILABLE) {
- if (priv->carrier)
- nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER);
- } else if (state >= NM_DEVICE_STATE_DISCONNECTED) {
- if (!priv->carrier)
- nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER);
- }
-
- return FALSE;
-}
-
-static void
-set_carrier (NMDeviceEthernet *self,
- const gboolean carrier,
- const gboolean defer_action)
-{
- NMDeviceEthernetPrivate *priv;
- NMDeviceState state;
-
- g_return_if_fail (NM_IS_DEVICE (self));
-
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- if (priv->carrier == carrier)
- return;
-
- /* Clear any previous deferred action */
- carrier_action_defer_clear (self);
-
- priv->carrier = carrier;
- g_object_notify (G_OBJECT (self), NM_DEVICE_ETHERNET_CARRIER);
-
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
- nm_log_info (LOGD_HW | LOGD_ETHER, "(%s): carrier now %s (device state %d%s)",
- nm_device_get_iface (NM_DEVICE (self)),
- carrier ? "ON" : "OFF",
- state,
- defer_action ? ", deferring action for 4 seconds" : "");
-
- if (defer_action)
- priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self);
- else
- carrier_action_defer_cb (self);
-}
-
-static void
-carrier_on (NMNetlinkMonitor *monitor,
- int idx,
- gpointer user_data)
-{
- NMDevice *device = NM_DEVICE (user_data);
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
- guint32 caps;
-
- /* Make sure signal is for us */
- if (idx == nm_device_get_ifindex (device)) {
- /* Ignore spurious netlink messages */
- caps = nm_device_get_capabilities (device);
- if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT))
- return;
-
- set_carrier (self, TRUE, FALSE);
- }
-}
-
-static void
-carrier_off (NMNetlinkMonitor *monitor,
- int idx,
- gpointer user_data)
-{
- NMDevice *device = NM_DEVICE (user_data);
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
- guint32 caps;
-
- /* Make sure signal is for us */
- if (idx == nm_device_get_ifindex (device)) {
- NMDeviceState state;
- gboolean defer = FALSE;
-
- /* Ignore spurious netlink messages */
- caps = nm_device_get_capabilities (device);
- if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT))
- return;
-
- /* Defer carrier-off event actions while connected by a few seconds
- * so that tripping over a cable, power-cycling a switch, or breaking
- * off the RJ45 locking tab isn't so catastrophic.
- */
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
- if (state > NM_DEVICE_STATE_DISCONNECTED)
- defer = TRUE;
-
- set_carrier (self, FALSE, defer);
- }
-}
-
static void
_update_s390_subchannels (NMDeviceEthernet *self)
{
@@ -401,75 +240,26 @@ constructor (GType type,
GObject *object;
NMDeviceEthernetPrivate *priv;
NMDevice *self;
- guint32 caps;
+ int itype;
object = G_OBJECT_CLASS (nm_device_ethernet_parent_class)->constructor (type,
n_construct_params,
construct_params);
- if (!object)
- return NULL;
+ if (object) {
+ self = NM_DEVICE (object);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- self = NM_DEVICE (object);
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
-
- nm_log_dbg (LOGD_HW | LOGD_OLPC_MESH, "(%s): kernel ifindex %d",
- nm_device_get_iface (NM_DEVICE (self)),
- nm_device_get_ifindex (NM_DEVICE (self)));
-
- /* s390 stuff */
- _update_s390_subchannels (NM_DEVICE_ETHERNET (self));
-
- caps = nm_device_get_capabilities (self);
- if (caps & NM_DEVICE_CAP_CARRIER_DETECT) {
- GError *error = NULL;
- guint32 ifflags = 0;
-
- /* Only listen to netlink for cards that support carrier detect */
- priv->monitor = nm_netlink_monitor_get ();
-
- priv->link_connected_id = g_signal_connect (priv->monitor, "carrier-on",
- G_CALLBACK (carrier_on),
- self);
- priv->link_disconnected_id = g_signal_connect (priv->monitor, "carrier-off",
- G_CALLBACK (carrier_off),
- self);
-
- /* Get initial link state */
- if (!nm_netlink_monitor_get_flags_sync (priv->monitor,
- nm_device_get_ifindex (NM_DEVICE (self)),
- &ifflags,
- &error)) {
- nm_log_warn (LOGD_HW | LOGD_ETHER,
- "(%s): couldn't get initial carrier state: (%d) %s",
- nm_device_get_iface (NM_DEVICE (self)),
- error ? error->code : -1,
- (error && error->message) ? error->message : "unknown");
- g_clear_error (&error);
- } else
- priv->carrier = !!(ifflags & IFF_LOWER_UP);
-
- nm_log_info (LOGD_HW | LOGD_ETHER,
- "(%s): carrier is %s",
- nm_device_get_iface (NM_DEVICE (self)),
- priv->carrier ? "ON" : "OFF");
-
- /* Request link state again just in case an error occurred getting the
- * initial link state.
- */
- if (!nm_netlink_monitor_request_status (priv->monitor, &error)) {
- nm_log_warn (LOGD_HW | LOGD_ETHER,
- "(%s): couldn't request carrier state: (%d) %s",
- nm_device_get_iface (NM_DEVICE (self)),
- error ? error->code : -1,
- (error && error->message) ? error->message : "unknown");
- g_clear_error (&error);
- }
- } else {
- nm_log_info (LOGD_HW | LOGD_ETHER,
- "(%s): driver '%s' does not support carrier detection.",
- nm_device_get_iface (self),
- nm_device_get_driver (self));
- priv->carrier = TRUE;
+ // FIXME: Convert this into a no-export property so type can be specified
+ // when the device is created.
+ itype = nm_system_get_iface_type (nm_device_get_ifindex (self), nm_device_get_iface (self));
+ g_assert (itype == NM_IFACE_TYPE_UNSPEC);
+
+ nm_log_dbg (LOGD_HW | LOGD_ETHER, "(%s): kernel ifindex %d",
+ nm_device_get_iface (NM_DEVICE (self)),
+ nm_device_get_ifindex (NM_DEVICE (self)));
+
+ /* s390 stuff */
+ _update_s390_subchannels (NM_DEVICE_ETHERNET (self));
}
return object;
@@ -496,7 +286,6 @@ device_state_changed (NMDevice *device,
NMDeviceStateReason reason,
gpointer user_data)
{
-
switch (new_state) {
case NM_DEVICE_STATE_ACTIVATED:
case NM_DEVICE_STATE_FAILED:
@@ -544,24 +333,6 @@ real_take_down (NMDevice *dev)
}
}
-static gboolean
-real_hw_is_up (NMDevice *device)
-{
- return nm_system_iface_is_up (nm_device_get_ip_ifindex (device));
-}
-
-static gboolean
-real_hw_bring_up (NMDevice *dev, gboolean *no_firmware)
-{
- return nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware);
-}
-
-static void
-real_hw_take_down (NMDevice *dev)
-{
- nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL);
-}
-
NMDevice *
nm_device_ethernet_new (const char *udi,
const char *iface,
@@ -572,82 +343,24 @@ nm_device_ethernet_new (const char *udi,
g_return_val_if_fail (driver != NULL, NULL);
return (NMDevice *) g_object_new (NM_TYPE_DEVICE_ETHERNET,
- NM_DEVICE_INTERFACE_UDI, udi,
- NM_DEVICE_INTERFACE_IFACE, iface,
- NM_DEVICE_INTERFACE_DRIVER, driver,
- NM_DEVICE_INTERFACE_TYPE_DESC, "Ethernet",
- NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_ETHERNET,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, driver,
+ NM_DEVICE_TYPE_DESC, "Ethernet",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_ETHERNET,
NULL);
}
-
-/*
- * nm_device_ethernet_get_address
- *
- * Get a device's hardware address
- *
- */
-void
-nm_device_ethernet_get_address (NMDeviceEthernet *self, struct ether_addr *addr)
-{
- NMDeviceEthernetPrivate *priv;
-
- g_return_if_fail (self != NULL);
- g_return_if_fail (addr != NULL);
-
- priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- memcpy (addr, &priv->hw_addr, sizeof (priv->hw_addr));
-}
-
-/* Returns speed in Mb/s */
-static guint32
-nm_device_ethernet_get_speed (NMDeviceEthernet *self)
-{
- int fd;
- struct ifreq ifr;
- struct ethtool_cmd edata = {
- .cmd = ETHTOOL_GSET,
- };
- guint32 speed = 0;
-
- g_return_val_if_fail (self != NULL, 0);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- nm_log_warn (LOGD_HW, "couldn't open control socket.");
- return 0;
- }
-
- memset (&ifr, 0, sizeof (struct ifreq));
- strncpy (ifr.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ);
- ifr.ifr_data = (char *) &edata;
-
- if (ioctl (fd, SIOCETHTOOL, &ifr) < 0)
- goto out;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
- speed = edata.speed;
-#else
- speed = ethtool_cmd_speed (&edata);
-#endif
-
- if (speed == G_MAXUINT16 || speed == G_MAXUINT32)
- speed = 0;
-
-out:
- close (fd);
- return speed;
-}
-
static void
_update_hw_addr (NMDeviceEthernet *self, const guint8 *addr)
{
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
+ const guint8 *current_addr;
g_return_if_fail (addr != NULL);
- if (memcmp (&priv->hw_addr, addr, ETH_ALEN)) {
- memcpy (&priv->hw_addr, addr, ETH_ALEN);
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self));
+ if (memcmp (current_addr, addr, ETH_ALEN)) {
+ nm_device_wired_set_hwaddr (NM_DEVICE_WIRED (self), addr, ETH_ALEN);
g_object_notify (G_OBJECT (self), NM_DEVICE_ETHERNET_HW_ADDRESS);
}
}
@@ -656,7 +369,7 @@ static gboolean
_set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail)
{
NMDevice *dev = NM_DEVICE (self);
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
+ const guint8 *current_addr;
const char *iface;
char *mac_str = NULL;
gboolean success = FALSE;
@@ -665,18 +378,18 @@ _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail)
iface = nm_device_get_iface (dev);
- mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
-
/* Do nothing if current MAC is same */
- if (!memcmp (&priv->hw_addr, addr, ETH_ALEN)) {
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self));
+ if (!memcmp (current_addr, addr, ETH_ALEN)) {
nm_log_dbg (LOGD_DEVICE | LOGD_ETHER, "(%s): no MAC address change needed", iface);
- g_free (mac_str);
return TRUE;
}
+ mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
+ addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+
/* Can't change MAC address while device is up */
- real_hw_take_down (dev);
+ nm_device_hw_take_down (dev, FALSE);
success = nm_system_iface_set_mac (nm_device_get_ip_ifindex (dev), (struct ether_addr *) addr);
if (success) {
@@ -688,7 +401,7 @@ _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail)
nm_log_warn (LOGD_DEVICE | LOGD_ETHER, "(%s): failed to %s MAC address to %s",
iface, detail, mac_str);
}
- real_hw_bring_up (dev, NULL);
+ nm_device_hw_bring_up (dev, FALSE, NULL);
g_free (mac_str);
return success;
@@ -697,28 +410,17 @@ _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail)
static void
real_update_hw_address (NMDevice *dev)
{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
- struct ifreq req;
- int fd;
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- nm_log_warn (LOGD_HW, "couldn't open control socket.");
- return;
- }
+ const guint8 *hw_addr;
+ guint8 old_addr[ETH_ALEN];
- memset (&req, 0, sizeof (struct ifreq));
- strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ);
+ hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ memcpy (old_addr, hw_addr, ETH_ALEN);
- errno = 0;
- if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) {
- nm_log_err (LOGD_HW | LOGD_ETHER,
- "(%s) failed to read hardware address (error %d)",
- nm_device_get_iface (dev), errno);
- } else
- _update_hw_addr (self, (const guint8 *) &req.ifr_hwaddr.sa_data);
+ NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->update_hw_address (dev);
- close (fd);
+ hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ if (memcmp (old_addr, hw_addr, ETH_ALEN))
+ g_object_notify (G_OBJECT (dev), NM_DEVICE_ETHERNET_HW_ADDRESS);
}
static void
@@ -748,10 +450,13 @@ real_update_permanent_hw_address (NMDevice *dev)
errno = 0;
ret = ioctl (fd, SIOCETHTOOL, &req);
if ((ret < 0) || !nm_ethernet_address_is_valid ((struct ether_addr *) epaddr->data)) {
+ const guint8 *current_addr;
+
nm_log_err (LOGD_HW | LOGD_ETHER, "(%s): unable to read permanent MAC address (error %d)",
nm_device_get_iface (dev), errno);
/* Fall back to current address */
- memcpy (epaddr->data, &priv->hw_addr, ETH_ALEN);
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self));
+ memcpy (epaddr->data, current_addr, ETH_ALEN);
}
if (memcmp (&priv->perm_hw_addr, epaddr->data, ETH_ALEN)) {
@@ -767,6 +472,7 @@ real_update_initial_hw_address (NMDevice *dev)
{
NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
+ const guint8 *current_addr;
char *mac_str = NULL;
guint8 *addr = priv->initial_hw_addr;
guint8 zero[ETH_ALEN] = {0,0,0,0,0,0};
@@ -774,11 +480,12 @@ real_update_initial_hw_address (NMDevice *dev)
/* This sets initial MAC address from current MAC address. It should only
* be called from NMDevice constructor() to really get the initial address.
*/
- if (!memcmp (&priv->hw_addr, &zero, ETH_ALEN))
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self));
+ if (!memcmp (current_addr, &zero, ETH_ALEN))
real_update_hw_address (dev);
- if (memcmp (&priv->initial_hw_addr, &priv->hw_addr, ETH_ALEN))
- memcpy (&priv->initial_hw_addr, &priv->hw_addr, ETH_ALEN);
+ if (memcmp (&priv->initial_hw_addr, current_addr, ETH_ALEN))
+ memcpy (&priv->initial_hw_addr, current_addr, ETH_ALEN);
mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
@@ -808,34 +515,6 @@ real_get_generic_capabilities (NMDevice *dev)
}
static gboolean
-real_can_interrupt_activation (NMDevice *dev)
-{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
- gboolean interrupt = FALSE;
-
- /* Devices that support carrier detect can interrupt activation
- * if the link becomes inactive.
- */
- if (nm_device_get_capabilities (dev) & NM_DEVICE_CAP_CARRIER_DETECT) {
- if (NM_DEVICE_ETHERNET_GET_PRIVATE (self)->carrier == FALSE)
- interrupt = TRUE;
- }
- return interrupt;
-}
-
-static gboolean
-real_is_available (NMDevice *dev)
-{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
-
- /* Can't do anything if there isn't a carrier */
- if (!NM_DEVICE_ETHERNET_GET_PRIVATE (self)->carrier)
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
match_subchans (NMDeviceEthernet *self, NMSettingWired *s_wired, gboolean *try_mac)
{
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
@@ -868,74 +547,97 @@ match_subchans (NMDeviceEthernet *self, NMSettingWired *s_wired, gboolean *try_m
return TRUE;
}
+static gboolean
+match_ethernet_connection (NMDevice *device, NMConnection *connection,
+ gboolean check_blacklist, GError **error)
+{
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
+ NMSettingWired *s_wired;
+
+ s_wired = nm_connection_get_setting_wired (connection);
+
+ if (nm_connection_is_type (connection, NM_SETTING_PPPOE_SETTING_NAME)) {
+ /* NOP */
+ } else if (nm_connection_is_type (connection, NM_SETTING_WIRED_SETTING_NAME)) {
+ if (!s_wired) {
+ g_set_error (error,
+ NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INVALID,
+ "The connection was not a valid wired connection.");
+ return FALSE;
+ }
+ } else {
+ g_set_error (error,
+ NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED,
+ "The connection was not a wired, bond, or PPPoE connection.");
+ return FALSE;
+ }
+
+ if (s_wired) {
+ const GByteArray *mac;
+ gboolean try_mac = TRUE;
+ const GSList *mac_blacklist, *mac_blacklist_iter;
+
+ if (!match_subchans (self, s_wired, &try_mac)) {
+ g_set_error (error,
+ NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
+ "The connection's s390 subchannels did not match this device.");
+ return FALSE;
+ }
+
+ mac = nm_setting_wired_get_mac_address (s_wired);
+ if (try_mac && mac && memcmp (mac->data, &priv->perm_hw_addr, ETH_ALEN)) {
+ g_set_error (error,
+ NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
+ "The connection's MAC address did not match this device.");
+ return FALSE;
+ }
+
+ if (!check_blacklist)
+ return TRUE;
+
+ /* Check for MAC address blacklist */
+ mac_blacklist = nm_setting_wired_get_mac_address_blacklist (s_wired);
+ for (mac_blacklist_iter = mac_blacklist; mac_blacklist_iter;
+ mac_blacklist_iter = g_slist_next (mac_blacklist_iter)) {
+ struct ether_addr addr;
+
+ if (!ether_aton_r (mac_blacklist_iter->data, &addr)) {
+ g_warn_if_reached ();
+ return FALSE;
+ }
+ if (memcmp (&addr, &priv->perm_hw_addr, ETH_ALEN) == 0) {
+ g_set_error (error,
+ NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
+ "The connection's MAC address (%s) is blacklisted in %s.",
+ (char *) mac_blacklist_iter->data, NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST);
+ return FALSE;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
static NMConnection *
real_get_best_auto_connection (NMDevice *dev,
GSList *connections,
char **specific_object)
{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
GSList *iter;
for (iter = connections; iter; iter = g_slist_next (iter)) {
NMConnection *connection = NM_CONNECTION (iter->data);
NMSettingConnection *s_con;
- NMSettingWired *s_wired;
- const char *connection_type;
- gboolean is_pppoe = FALSE;
- const GSList *mac_blacklist, *mac_blacklist_iter;
- gboolean mac_blacklist_found = FALSE;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
- connection_type = nm_setting_connection_get_connection_type (s_con);
- if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME))
- is_pppoe = TRUE;
-
- if (!is_pppoe && strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME))
- continue;
- if (!nm_setting_connection_get_autoconnect (s_con))
- continue;
-
- s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
- /* Wired setting optional for PPPoE */
- if (!is_pppoe && !s_wired)
- continue;
-
- if (s_wired) {
- const GByteArray *mac;
- gboolean try_mac = TRUE;
-
- if (!match_subchans (self, s_wired, &try_mac))
- continue;
-
- mac = nm_setting_wired_get_mac_address (s_wired);
- if (try_mac && mac && memcmp (mac->data, &priv->perm_hw_addr, ETH_ALEN))
- continue;
-
- /* Check for MAC address blacklist */
- mac_blacklist = nm_setting_wired_get_mac_address_blacklist (s_wired);
- for (mac_blacklist_iter = mac_blacklist; mac_blacklist_iter;
- mac_blacklist_iter = g_slist_next (mac_blacklist_iter)) {
- struct ether_addr addr;
-
- if (!ether_aton_r (mac_blacklist_iter->data, &addr)) {
- g_warn_if_reached ();
- continue;
- }
- if (memcmp (&addr, &priv->perm_hw_addr, ETH_ALEN) == 0) {
- mac_blacklist_found = TRUE;
- break;
- }
- }
- /* Found device MAC address in the blacklist - do not use this connection */
- if (mac_blacklist_found)
- continue;
- }
-
- return connection;
+ if ( nm_setting_connection_get_autoconnect (s_con)
+ && match_ethernet_connection (dev, connection, TRUE, NULL))
+ return connection;
}
+
return NULL;
}
@@ -1096,21 +798,21 @@ time_out:
static NMSupplicantConfig *
build_supplicant_config (NMDeviceEthernet *self)
{
- const char *con_path;
+ const char *con_uuid;
NMSupplicantConfig *config = NULL;
NMSetting8021x *security;
NMConnection *connection;
- connection = nm_act_request_get_connection (nm_device_get_act_request (NM_DEVICE (self)));
- g_return_val_if_fail (connection, NULL);
- con_path = nm_connection_get_path (connection);
+ connection = nm_device_get_connection (NM_DEVICE (self));
+ g_assert (connection);
+ con_uuid = nm_connection_get_uuid (connection);
config = nm_supplicant_config_new ();
if (!config)
return NULL;
- security = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
- if (!nm_supplicant_config_add_setting_8021x (config, security, con_path, TRUE)) {
+ security = nm_connection_get_setting_802_1x (connection);
+ if (!nm_supplicant_config_add_setting_8021x (config, security, con_uuid, TRUE)) {
nm_log_warn (LOGD_DEVICE, "Couldn't add 802.1X security setting to supplicant config.");
g_object_unref (config);
config = NULL;
@@ -1353,16 +1055,19 @@ real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- req = nm_device_get_act_request (NM_DEVICE (self));
- g_return_val_if_fail (req != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+ ret = NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->act_stage1_prepare (dev, reason);
+ if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
+ req = nm_device_get_act_request (NM_DEVICE (self));
+ g_return_val_if_fail (req != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- s_wired = NM_SETTING_WIRED (device_get_setting (dev, NM_TYPE_SETTING_WIRED));
- g_assert (s_wired);
+ s_wired = NM_SETTING_WIRED (device_get_setting (dev, NM_TYPE_SETTING_WIRED));
+ g_assert (s_wired);
- /* Set device MAC address if the connection wants to change it */
- cloned_mac = nm_setting_wired_get_cloned_mac_address (s_wired);
- if (cloned_mac && (cloned_mac->len == ETH_ALEN))
- _set_hw_addr (self, (const guint8 *) cloned_mac->data, "set");
+ /* Set device MAC address if the connection wants to change it */
+ cloned_mac = nm_setting_wired_get_cloned_mac_address (s_wired);
+ if (cloned_mac && (cloned_mac->len == ETH_ALEN))
+ _set_hw_addr (self, (const guint8 *) cloned_mac->data, "set");
+ }
return ret;
}
@@ -1376,8 +1081,9 @@ nm_8021x_stage2_config (NMDeviceEthernet *self, NMDeviceStateReason *reason)
const char *iface;
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
- connection = nm_act_request_get_connection (nm_device_get_act_request (NM_DEVICE (self)));
- security = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ connection = nm_device_get_connection (NM_DEVICE (self));
+ g_assert (connection);
+ security = nm_connection_get_setting_802_1x (connection);
if (!security) {
nm_log_err (LOGD_DEVICE, "Invalid or missing 802.1X security");
*reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
@@ -1434,19 +1140,17 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_
static void
ppp_ip4_config (NMPPPManager *ppp_manager,
- const char *iface,
- NMIP4Config *config,
- gpointer user_data)
+ const char *iface,
+ NMIP4Config *config,
+ gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
/* Ignore PPP IP4 events that come in after initial configuration */
- if (nm_device_get_state (device) != NM_DEVICE_STATE_IP_CONFIG)
- return;
-
- nm_device_set_ip_iface (device, iface);
- NM_DEVICE_ETHERNET_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config);
- nm_device_activate_schedule_stage4_ip4_config_get (device);
+ if (nm_device_activate_ip4_state_in_conf (device)) {
+ nm_device_set_ip_iface (device, iface);
+ nm_device_activate_schedule_ip4_config_result (device, config);
+ }
}
static NMActStageReturn
@@ -1465,7 +1169,7 @@ pppoe_stage3_ip4_config_start (NMDeviceEthernet *self, NMDeviceStateReason *reas
connection = nm_act_request_get_connection (req);
g_assert (req);
- s_pppoe = (NMSettingPPPOE *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE);
+ s_pppoe = nm_connection_get_setting_pppoe (connection);
g_assert (s_pppoe);
priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (NM_DEVICE (self)));
@@ -1519,7 +1223,9 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
}
static NMActStageReturn
-real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
+real_act_stage3_ip4_config_start (NMDevice *device,
+ NMIP4Config **out_config,
+ NMDeviceStateReason *reason)
{
NMSettingConnection *s_con;
const char *connection_type;
@@ -1533,61 +1239,29 @@ real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME))
return pppoe_stage3_ip4_config_start (NM_DEVICE_ETHERNET (device), reason);
- return NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->act_stage3_ip4_config_start (device, reason);
+ return NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->act_stage3_ip4_config_start (device, out_config, reason);
}
-static NMActStageReturn
-real_act_stage4_get_ip4_config (NMDevice *device,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+static void
+real_ip4_config_pre_commit (NMDevice *device, NMIP4Config *config)
{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- NMActStageReturn ret;
-
- g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- if (!priv->ppp_manager) {
- /* Regular ethernet connection. */
-
- /* Chain up to parent */
- ret = NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->act_stage4_get_ip4_config (device, config, reason);
-
- if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
- NMConnection *connection;
- NMSettingWired *s_wired;
- guint32 mtu;
-
- connection = nm_act_request_get_connection (nm_device_get_act_request (device));
- g_assert (connection);
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
- g_assert (s_wired);
-
- /* MTU override */
- mtu = nm_setting_wired_get_mtu (s_wired);
- if (mtu)
- nm_ip4_config_set_mtu (*config, mtu);
- }
- } else {
- NMConnection *connection;
- NMSettingIP4Config *s_ip4;
-
- /* PPPoE */
- *config = priv->pending_ip4_config;
- priv->pending_ip4_config = NULL;
+ NMConnection *connection;
+ NMSettingWired *s_wired;
+ guint32 mtu;
- /* Merge user-defined overrides into the IP4Config to be applied */
- connection = nm_act_request_get_connection (nm_device_get_act_request (device));
- g_assert (connection);
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- nm_utils_merge_ip4_config (*config, s_ip4);
+ /* MTU only set for plain ethernet */
+ if (NM_DEVICE_ETHERNET_GET_PRIVATE (device)->ppp_manager)
+ return;
- ret = NM_ACT_STAGE_RETURN_SUCCESS;
- }
+ connection = nm_device_get_connection (device);
+ g_assert (connection);
+ s_wired = nm_connection_get_setting_wired (connection);
+ g_assert (s_wired);
- return ret;
+ /* MTU override */
+ mtu = nm_setting_wired_get_mtu (s_wired);
+ if (mtu)
+ nm_ip4_config_set_mtu (config, mtu);
}
static void
@@ -1620,79 +1294,7 @@ real_check_connection_compatible (NMDevice *device,
NMConnection *connection,
GError **error)
{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- NMSettingConnection *s_con;
- NMSettingWired *s_wired;
- const char *connection_type;
- gboolean is_pppoe = FALSE;
- const GByteArray *mac;
- gboolean try_mac = TRUE;
- const GSList *mac_blacklist, *mac_blacklist_iter;
-
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
- g_assert (s_con);
-
- connection_type = nm_setting_connection_get_connection_type (s_con);
- if ( strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME)
- && strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME)) {
- g_set_error (error,
- NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED,
- "The connection was not a wired or PPPoE connection.");
- return FALSE;
- }
-
- if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME))
- is_pppoe = TRUE;
-
- s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
- /* Wired setting is optional for PPPoE */
- if (!is_pppoe && !s_wired) {
- g_set_error (error,
- NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INVALID,
- "The connection was not a valid wired connection.");
- return FALSE;
- }
-
- if (s_wired) {
- if (!match_subchans (self, s_wired, &try_mac)) {
- g_set_error (error,
- NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
- "The connection's s390 subchannels did not match this device.");
- return FALSE;
- }
-
- mac = nm_setting_wired_get_mac_address (s_wired);
- if (try_mac && mac && memcmp (mac->data, &priv->perm_hw_addr, ETH_ALEN)) {
- g_set_error (error,
- NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
- "The connection's MAC address did not match this device.");
- return FALSE;
- }
-
- /* Check for MAC address blacklist */
- mac_blacklist = nm_setting_wired_get_mac_address_blacklist (s_wired);
- for (mac_blacklist_iter = mac_blacklist; mac_blacklist_iter;
- mac_blacklist_iter = g_slist_next (mac_blacklist_iter)) {
- struct ether_addr addr;
-
- if (!ether_aton_r (mac_blacklist_iter->data, &addr)) {
- g_warn_if_reached ();
- continue;
- }
- if (memcmp (&addr, &priv->perm_hw_addr, ETH_ALEN) == 0) {
- g_set_error (error,
- NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
- "The connection's MAC address (%s) is blacklisted in %s.",
- (char *) mac_blacklist_iter->data, NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST);
- return FALSE;
- }
- }
- }
-
- // FIXME: check bitrate against device capabilities
-
- return TRUE;
+ return match_ethernet_connection (device, connection, TRUE, error);
}
static gboolean
@@ -1707,7 +1309,7 @@ real_complete_connection (NMDevice *device,
NMSettingPPPOE *s_pppoe;
const GByteArray *setting_mac;
- s_pppoe = (NMSettingPPPOE *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE);
+ s_pppoe = nm_connection_get_setting_pppoe (connection);
/* We can't telepathically figure out the service name or username, so if
* those weren't given, we can't complete the connection.
@@ -1725,7 +1327,7 @@ real_complete_connection (NMDevice *device,
NULL,
s_pppoe ? FALSE : TRUE); /* No IPv6 by default yet for PPPoE */
- s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
if (!s_wired) {
s_wired = (NMSettingWired *) nm_setting_wired_new ();
nm_connection_add_setting (connection, NM_SETTING (s_wired));
@@ -1764,7 +1366,7 @@ spec_match_list (NMDevice *device, const GSList *specs)
char *hwaddr;
gboolean matched;
- hwaddr = nm_ether_ntop ((struct ether_addr *) &priv->perm_hw_addr);
+ hwaddr = nm_utils_hwaddr_ntoa (&priv->perm_hw_addr, ARPHRD_ETHER);
matched = nm_match_spec_hwaddr (specs, hwaddr);
g_free (hwaddr);
@@ -1774,164 +1376,80 @@ spec_match_list (NMDevice *device, const GSList *specs)
return matched;
}
-static gboolean
-wired_match_config (NMDevice *self, NMConnection *connection)
-{
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
- NMSettingWired *s_wired;
- const GByteArray *s_ether;
- gboolean try_mac = TRUE;
-
- s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
- if (!s_wired)
- return FALSE;
-
- if (!match_subchans (NM_DEVICE_ETHERNET (self), s_wired, &try_mac))
- return FALSE;
-
- /* MAC address check */
- s_ether = nm_setting_wired_get_mac_address (s_wired);
- if (try_mac && s_ether && memcmp (s_ether->data, priv->perm_hw_addr, ETH_ALEN))
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-ip4_match_config (NMDevice *self, NMConnection *connection)
-{
- NMSettingIP4Config *s_ip4;
- int i, num;
- GSList *leases, *iter;
- NMDHCPManager *dhcp_mgr;
- const char *method;
-
- s_ip4 = nm_connection_get_setting_ip4_config (connection);
- if (!s_ip4)
- return FALSE;
-
- /* Get any saved leases that apply to this connection */
- dhcp_mgr = nm_dhcp_manager_get ();
- leases = nm_dhcp_manager_get_lease_config (dhcp_mgr,
- nm_device_get_iface (self),
- nm_connection_get_uuid (connection));
- g_object_unref (dhcp_mgr);
-
- method = nm_setting_ip4_config_get_method (s_ip4);
- if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
- gboolean found = FALSE;
-
- /* Find at least one lease's address on the device */
- for (iter = leases; iter; iter = g_slist_next (iter)) {
- NMIP4Config *ip4_config = iter->data;
- NMIP4Address *addr = nm_ip4_config_get_address (ip4_config, 0);
- struct in_addr tmp = { .s_addr = nm_ip4_address_get_address (addr) };
-
- if (addr && nm_netlink_find_address (nm_device_get_ip_ifindex (self),
- AF_INET,
- &tmp,
- nm_ip4_address_get_prefix (addr))) {
- found = TRUE; /* Yay, device has same address as a lease */
- break;
- }
- }
- g_slist_foreach (leases, (GFunc) g_object_unref, NULL);
- g_slist_free (leases);
- return found;
- } else {
- /* Maybe the connection used to be DHCP and there are stale leases; ignore them */
- g_slist_foreach (leases, (GFunc) g_object_unref, NULL);
- g_slist_free (leases);
- }
-
- /* 'shared' and 'link-local' aren't supported methods because 'shared'
- * requires too much iptables and dnsmasq state to be reclaimed, and
- * avahi-autoipd isn't smart enough to allow the link-local address to be
- * determined at any point other than when it was first assigned.
- */
- if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL))
- return FALSE;
-
- /* Everything below for static addressing */
-
- /* Find all IP4 addresses of this connection on the device */
- num = nm_setting_ip4_config_get_num_addresses (s_ip4);
- for (i = 0; i < num; i++) {
- NMIP4Address *addr = nm_setting_ip4_config_get_address (s_ip4, i);
- struct in_addr tmp = { .s_addr = nm_ip4_address_get_address (addr) };
-
- if (!nm_netlink_find_address (nm_device_get_ip_ifindex (self),
- AF_INET,
- &tmp,
- nm_ip4_address_get_prefix (addr)))
- return FALSE;
- }
-
- /* Success; all the connection's static IP addresses are assigned to the device */
- return TRUE;
-}
-
static NMConnection *
connection_match_config (NMDevice *self, const GSList *connections)
{
- GSList *iter;
- NMSettingConnection *s_con;
+ const GSList *iter;
+ GSList *ether_matches;
+ NMConnection *match;
- for (iter = (GSList *) connections; iter; iter = g_slist_next (iter)) {
+ /* First narrow @connections down to those that match in their
+ * NMSettingWired configuration.
+ */
+ ether_matches = NULL;
+ for (iter = connections; iter; iter = iter->next) {
NMConnection *candidate = NM_CONNECTION (iter->data);
- s_con = (NMSettingConnection *) nm_connection_get_setting (candidate, NM_TYPE_SETTING_CONNECTION);
- g_assert (s_con);
- if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRED_SETTING_NAME))
- continue;
-
/* Can't assume 802.1x or PPPoE connections; they have too much state
* that's impossible to get on-the-fly from PPPoE or the supplicant.
*/
- if ( nm_connection_get_setting (candidate, NM_TYPE_SETTING_802_1X)
- || nm_connection_get_setting (candidate, NM_TYPE_SETTING_PPPOE))
+ if ( nm_connection_get_setting_802_1x (candidate)
+ || nm_connection_get_setting_pppoe (candidate))
continue;
- if (!wired_match_config (self, candidate))
+ if (!match_ethernet_connection (self, candidate, FALSE, NULL))
continue;
- if (!ip4_match_config (self, candidate))
- continue;
-
- return candidate;
+ ether_matches = g_slist_prepend (ether_matches, candidate);
}
- return NULL;
+ /* Now pass those to the super method, which will check IP config */
+ ether_matches = g_slist_reverse (ether_matches);
+ match = NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->connection_match_config (self, ether_matches);
+ g_slist_free (ether_matches);
+
+ return match;
}
-static void
-dispose (GObject *object)
+static gboolean
+hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr)
{
- NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object);
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
+ NMSettingWired *s_wired;
+ const guint8 *devaddr;
+ const GByteArray *mac = NULL;
+ int devtype;
- if (priv->disposed) {
- G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
- return;
- }
+ devtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (device));
+ devaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device));
+ g_return_val_if_fail (devaddr != NULL, FALSE);
- priv->disposed = TRUE;
+ s_wired = nm_connection_get_setting_wired (connection);
+ if (s_wired)
+ mac = nm_setting_wired_get_mac_address (s_wired);
- if (priv->link_connected_id) {
- g_signal_handler_disconnect (priv->monitor, priv->link_connected_id);
- priv->link_connected_id = 0;
- }
- if (priv->link_disconnected_id) {
- g_signal_handler_disconnect (priv->monitor, priv->link_disconnected_id);
- priv->link_disconnected_id = 0;
- }
+ if (mac) {
+ g_return_val_if_fail (mac->len == ETH_ALEN, FALSE);
+ if (other_hwaddr) {
+ g_return_val_if_fail (other_hwaddr_len == ETH_ALEN, FALSE);
+ if (memcmp (mac->data, other_hwaddr, mac->len) == 0)
+ return TRUE;
+ } else if (memcmp (mac->data, devaddr, mac->len) == 0)
+ return TRUE;
+ } else if (fail_if_no_hwaddr == FALSE)
+ return TRUE;
- carrier_action_defer_clear (self);
+ return FALSE;
+}
- if (priv->monitor) {
- g_object_unref (priv->monitor);
- priv->monitor = NULL;
- }
+static void
+dispose (GObject *object)
+{
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
g_free (priv->subchan1);
g_free (priv->subchan2);
@@ -1947,19 +1465,21 @@ get_property (GObject *object, guint prop_id,
{
NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object);
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
+ const guint8 *current_addr;
switch (prop_id) {
case PROP_HW_ADDRESS:
- g_value_take_string (value, nm_ether_ntop ((struct ether_addr *) &priv->hw_addr));
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_ETHER));
break;
case PROP_PERM_HW_ADDRESS:
- g_value_take_string (value, nm_ether_ntop ((struct ether_addr *) &priv->perm_hw_addr));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (&priv->perm_hw_addr, ARPHRD_ETHER));
break;
case PROP_SPEED:
- g_value_set_uint (value, nm_device_ethernet_get_speed (self));
+ g_value_set_uint (value, nm_device_wired_get_speed (NM_DEVICE_WIRED (self)));
break;
case PROP_CARRIER:
- g_value_set_boolean (value, priv->carrier);
+ g_value_set_boolean (value, nm_device_wired_get_carrier (NM_DEVICE_WIRED (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1993,28 +1513,24 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass)
object_class->set_property = set_property;
parent_class->get_generic_capabilities = real_get_generic_capabilities;
- parent_class->hw_is_up = real_hw_is_up;
- parent_class->hw_bring_up = real_hw_bring_up;
- parent_class->hw_take_down = real_hw_take_down;
parent_class->is_up = real_is_up;
parent_class->bring_up = real_bring_up;
parent_class->take_down = real_take_down;
- parent_class->can_interrupt_activation = real_can_interrupt_activation;
parent_class->update_hw_address = real_update_hw_address;
parent_class->update_permanent_hw_address = real_update_permanent_hw_address;
parent_class->update_initial_hw_address = real_update_initial_hw_address;
parent_class->get_best_auto_connection = real_get_best_auto_connection;
- parent_class->is_available = real_is_available;
parent_class->check_connection_compatible = real_check_connection_compatible;
parent_class->complete_connection = real_complete_connection;
parent_class->act_stage1_prepare = real_act_stage1_prepare;
parent_class->act_stage2_config = real_act_stage2_config;
parent_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
- parent_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config;
+ parent_class->ip4_config_pre_commit = real_ip4_config_pre_commit;
parent_class->deactivate = real_deactivate;
parent_class->spec_match_list = spec_match_list;
parent_class->connection_match_config = connection_match_config;
+ parent_class->hwaddr_matches = hwaddr_matches;
/* properties */
g_object_class_install_property
diff --git a/src/nm-device-ethernet.h b/src/nm-device-ethernet.h
index b9e2afd40..deb0fecad 100644
--- a/src/nm-device-ethernet.h
+++ b/src/nm-device-ethernet.h
@@ -23,9 +23,8 @@
#define NM_DEVICE_ETHERNET_H
#include <glib-object.h>
-#include <net/ethernet.h>
-#include "nm-device.h"
+#include "nm-device-wired.h"
G_BEGIN_DECLS
@@ -36,17 +35,24 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_ETHERNET))
#define NM_DEVICE_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
+typedef enum
+{
+ NM_ETHERNET_ERROR_CONNECTION_NOT_WIRED = 0, /*< nick=ConnectionNotWired >*/
+ NM_ETHERNET_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMEthernetError;
+
#define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address"
#define NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS "perm-hw-address"
#define NM_DEVICE_ETHERNET_SPEED "speed"
#define NM_DEVICE_ETHERNET_CARRIER "carrier"
typedef struct {
- NMDevice parent;
+ NMDeviceWired parent;
} NMDeviceEthernet;
typedef struct {
- NMDeviceClass parent;
+ NMDeviceWiredClass parent;
/* Signals */
void (*properties_changed) (NMDeviceEthernet *device, GHashTable *properties);
@@ -60,9 +66,6 @@ NMDevice *nm_device_ethernet_new (const char *udi,
const char *iface,
const char *driver);
-void nm_device_ethernet_get_address (NMDeviceEthernet *dev,
- struct ether_addr *addr);
-
G_END_DECLS
#endif /* NM_DEVICE_ETHERNET_H */
diff --git a/src/nm-device-factory.h b/src/nm-device-factory.h
new file mode 100644
index 000000000..8a4f44672
--- /dev/null
+++ b/src/nm-device-factory.h
@@ -0,0 +1,91 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_FACTORY_H
+#define NM_DEVICE_FACTORY_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gudev/gudev.h>
+
+#include "NetworkManager.h"
+
+/* WARNING: this file is private API between NetworkManager and its internal
+ * device plugins. Its API can change at any time and is not guaranteed to be
+ * stable. NM and device plugins are distributed together and this API is
+ * not meant to enable third-party plugins.
+ */
+
+/**
+ * nm_device_factory_create_device:
+ * @device: GUdev device object representing the device
+ * @devpath: sysfs path of the device
+ * @ifname: interface name of the device
+ * @driver: driver of the device
+ * @error: error for failure information
+ *
+ * Creates a #NMDevice subclass if the given information represents a device
+ * the factory is capable of creating. If the information does represent a
+ * device the factory is capable of creating, but the device could not be
+ * created, %NULL should be returned and @error should be set. If the
+ * factory is not capable of creating a device with the given information
+ * (ie, the factory creates Ethernet devices but the information represents
+ * a WiFi device) it should return %NULL and leave @error untouched.
+ *
+ * Returns: the device object (a subclass of #NMDevice) or %NULL
+ */
+GObject *nm_device_factory_create_device (GUdevDevice *device,
+ const char *devpath,
+ const char *ifname,
+ const char *driver,
+ GError **error);
+
+/* Should match nm_device_factory() */
+typedef GObject * (*NMDeviceFactoryCreateFunc) (GUdevDevice *device,
+ const char *devpath,
+ const char *ifname,
+ const char *driver,
+ GError **error);
+
+/**
+ * nm_device_factory_get_priority:
+ *
+ * Returns the priority of this plugin. Higher numbers mean a higher priority.
+ *
+ * Returns: plugin priority
+ */
+guint32 nm_device_factory_get_priority (void);
+
+typedef guint32 (*NMDeviceFactoryPriorityFunc) (void);
+
+/**
+ * nm_device_factory_get_type:
+ *
+ * Returns the type of device this factory can create. Only one factory for
+ * each type of device is allowed.
+ *
+ * Returns: the %NMDeviceType
+ */
+NMDeviceType nm_device_factory_get_type (void);
+
+typedef NMDeviceType (*NMDeviceFactoryTypeFunc) (void);
+
+#endif /* NM_DEVICE_FACTORY_H */
+
diff --git a/src/nm-device-infiniband.c b/src/nm-device-infiniband.c
new file mode 100644
index 000000000..5e43f0604
--- /dev/null
+++ b/src/nm-device-infiniband.c
@@ -0,0 +1,517 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011 Red Hat, Inc.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include <linux/if_infiniband.h>
+#include <netinet/ether.h>
+
+#include "nm-device-infiniband.h"
+#include "nm-logging.h"
+#include "nm-properties-changed-signal.h"
+#include "nm-utils.h"
+#include "NetworkManagerUtils.h"
+#include "nm-device-private.h"
+#include "nm-enum-types.h"
+
+#include "nm-device-infiniband-glue.h"
+
+
+G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE_WIRED)
+
+#define NM_DEVICE_INFINIBAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandPrivate))
+
+#define NM_INFINIBAND_ERROR (nm_infiniband_error_quark ())
+
+typedef struct {
+ int dummy;
+} NMDeviceInfinibandPrivate;
+
+enum {
+ PROPERTIES_CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_CARRIER,
+
+ LAST_PROP
+};
+
+static GQuark
+nm_infiniband_error_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("nm-infiniband-error");
+ return quark;
+}
+
+static GObject*
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ NMDeviceInfinibandPrivate *priv;
+ NMDevice *self;
+
+ object = G_OBJECT_CLASS (nm_device_infiniband_parent_class)->constructor (type,
+ n_construct_params,
+ construct_params);
+ if (!object)
+ return NULL;
+
+ self = NM_DEVICE (object);
+ priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (self);
+
+ nm_log_dbg (LOGD_HW | LOGD_INFINIBAND, "(%s): kernel ifindex %d",
+ nm_device_get_iface (NM_DEVICE (self)),
+ nm_device_get_ifindex (NM_DEVICE (self)));
+
+ return object;
+}
+
+static void
+nm_device_infiniband_init (NMDeviceInfiniband * self)
+{
+}
+
+NMDevice *
+nm_device_infiniband_new (const char *udi,
+ const char *iface,
+ const char *driver)
+{
+ g_return_val_if_fail (udi != NULL, NULL);
+ g_return_val_if_fail (iface != NULL, NULL);
+ g_return_val_if_fail (driver != NULL, NULL);
+
+ return (NMDevice *) g_object_new (NM_TYPE_DEVICE_INFINIBAND,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, driver,
+ NM_DEVICE_TYPE_DESC, "InfiniBand",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_INFINIBAND,
+ NULL);
+}
+
+
+static void
+real_update_hw_address (NMDevice *dev)
+{
+ const guint8 *hw_addr;
+ guint8 old_addr[INFINIBAND_ALEN];
+
+ hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ memcpy (old_addr, hw_addr, INFINIBAND_ALEN);
+
+ NM_DEVICE_CLASS (nm_device_infiniband_parent_class)->update_hw_address (dev);
+
+ hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ if (memcmp (old_addr, hw_addr, INFINIBAND_ALEN))
+ g_object_notify (G_OBJECT (dev), NM_DEVICE_INFINIBAND_HW_ADDRESS);
+}
+
+static guint32
+real_get_generic_capabilities (NMDevice *dev)
+{
+ return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_NM_SUPPORTED;
+}
+
+static NMConnection *
+real_get_best_auto_connection (NMDevice *dev,
+ GSList *connections,
+ char **specific_object)
+{
+ GSList *iter;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+ NMSettingConnection *s_con;
+ NMSettingInfiniband *s_infiniband;
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ if (!nm_connection_is_type (connection, NM_SETTING_INFINIBAND_SETTING_NAME))
+ continue;
+ if (!nm_setting_connection_get_autoconnect (s_con))
+ continue;
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (!s_infiniband)
+ continue;
+
+ if (s_infiniband) {
+ const guint8 *hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev));
+ const GByteArray *mac;
+
+ mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (mac && memcmp (mac->data, hwaddr, INFINIBAND_ALEN))
+ continue;
+ }
+
+ return connection;
+ }
+ return NULL;
+}
+
+static NMActStageReturn
+real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
+{
+ NMActRequest *req;
+ NMConnection *connection;
+ NMSettingInfiniband *s_infiniband;
+ const char *transport_mode;
+ char *mode_path, *mode_value;
+ gboolean ok;
+
+ g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+
+ req = nm_device_get_act_request (dev);
+ g_return_val_if_fail (req != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+
+ connection = nm_act_request_get_connection (req);
+ g_assert (connection);
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ g_assert (s_infiniband);
+
+ transport_mode = nm_setting_infiniband_get_transport_mode (s_infiniband);
+
+ mode_path = g_strdup_printf ("/sys/class/net/%s/mode", nm_device_get_iface (dev));
+ if (!g_file_test (mode_path, G_FILE_TEST_EXISTS)) {
+ g_free (mode_path);
+
+ if (!strcmp (transport_mode, "datagram"))
+ return NM_ACT_STAGE_RETURN_SUCCESS;
+ else {
+ *reason = NM_DEVICE_STATE_REASON_INFINIBAND_MODE;
+ return NM_ACT_STAGE_RETURN_FAILURE;
+ }
+ }
+
+ mode_value = g_strdup_printf ("%s\n", transport_mode);
+ ok = nm_utils_do_sysctl (mode_path, mode_value);
+ g_free (mode_value);
+ g_free (mode_path);
+
+ if (!ok) {
+ *reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
+ return NM_ACT_STAGE_RETURN_FAILURE;
+ }
+
+ return NM_DEVICE_CLASS (nm_device_infiniband_parent_class)->act_stage1_prepare (dev, reason);
+}
+
+static void
+real_ip4_config_pre_commit (NMDevice *self, NMIP4Config *config)
+{
+ NMConnection *connection;
+ NMSettingInfiniband *s_infiniband;
+ guint32 mtu;
+
+ connection = nm_device_get_connection (self);
+ g_assert (connection);
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ g_assert (s_infiniband);
+
+ /* MTU override */
+ mtu = nm_setting_infiniband_get_mtu (s_infiniband);
+ if (mtu)
+ nm_ip4_config_set_mtu (config, mtu);
+}
+
+static gboolean
+real_check_connection_compatible (NMDevice *device,
+ NMConnection *connection,
+ GError **error)
+{
+ NMSettingInfiniband *s_infiniband;
+ const GByteArray *mac;
+
+ if (!nm_connection_is_type (connection, NM_SETTING_INFINIBAND_SETTING_NAME)) {
+ g_set_error (error,
+ NM_INFINIBAND_ERROR,
+ NM_INFINIBAND_ERROR_CONNECTION_NOT_INFINIBAND,
+ "The connection was not an InfiniBand connection.");
+ return FALSE;
+ }
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (!s_infiniband) {
+ g_set_error (error,
+ NM_INFINIBAND_ERROR, NM_INFINIBAND_ERROR_CONNECTION_INVALID,
+ "The connection was not a valid infiniband connection.");
+ return FALSE;
+ }
+
+ if (s_infiniband) {
+ const guint8 *hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device));
+
+ mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (mac && memcmp (mac->data, hwaddr, INFINIBAND_ALEN)) {
+ g_set_error (error,
+ NM_INFINIBAND_ERROR,
+ NM_INFINIBAND_ERROR_CONNECTION_INCOMPATIBLE,
+ "The connection's MAC address did not match this device.");
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean
+real_complete_connection (NMDevice *device,
+ NMConnection *connection,
+ const char *specific_object,
+ const GSList *existing_connections,
+ GError **error)
+{
+ NMSettingInfiniband *s_infiniband;
+ const GByteArray *setting_mac;
+ const guint8 *hwaddr;
+
+ nm_utils_complete_generic (connection,
+ NM_SETTING_INFINIBAND_SETTING_NAME,
+ existing_connections,
+ _("InfiniBand connection %d"),
+ NULL,
+ TRUE);
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (!s_infiniband) {
+ s_infiniband = (NMSettingInfiniband *) nm_setting_infiniband_new ();
+ nm_connection_add_setting (connection, NM_SETTING (s_infiniband));
+ }
+
+ hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device));
+ setting_mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (setting_mac) {
+ /* Make sure the setting MAC (if any) matches the device's MAC */
+ if (memcmp (setting_mac->data, hwaddr, INFINIBAND_ALEN)) {
+ g_set_error_literal (error,
+ NM_SETTING_INFINIBAND_ERROR,
+ NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS);
+ return FALSE;
+ }
+ } else {
+ GByteArray *mac;
+
+ /* Lock the connection to this device by default */
+ mac = g_byte_array_sized_new (INFINIBAND_ALEN);
+ g_byte_array_append (mac, hwaddr, INFINIBAND_ALEN);
+ g_object_set (G_OBJECT (s_infiniband), NM_SETTING_INFINIBAND_MAC_ADDRESS, mac, NULL);
+ g_byte_array_free (mac, TRUE);
+ }
+
+ if (!nm_setting_infiniband_get_transport_mode (s_infiniband))
+ g_object_set (G_OBJECT (s_infiniband), NM_SETTING_INFINIBAND_TRANSPORT_MODE, "datagram", NULL);
+
+ return TRUE;
+}
+
+static gboolean
+spec_match_list (NMDevice *device, const GSList *specs)
+{
+ char *hwaddr;
+ gboolean matched;
+
+ hwaddr = nm_utils_hwaddr_ntoa (nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)), ARPHRD_INFINIBAND);
+ matched = nm_match_spec_hwaddr (specs, hwaddr);
+ g_free (hwaddr);
+
+ return matched;
+}
+
+static gboolean
+infiniband_match_config (NMDevice *self, NMConnection *connection)
+{
+ NMSettingInfiniband *s_infiniband;
+ const GByteArray *s_mac;
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (!s_infiniband)
+ return FALSE;
+
+ /* MAC address check */
+ s_mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (s_mac && memcmp (s_mac->data, nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)), INFINIBAND_ALEN))
+ return FALSE;
+
+ return TRUE;
+}
+
+static NMConnection *
+connection_match_config (NMDevice *self, const GSList *connections)
+{
+ const GSList *iter;
+ GSList *infiniband_matches;
+ NMConnection *match;
+
+ /* First narrow @connections down to those that match in their
+ * NMSettingInfiniband configuration.
+ */
+ infiniband_matches = NULL;
+ for (iter = connections; iter; iter = iter->next) {
+ NMConnection *candidate = NM_CONNECTION (iter->data);
+
+ if (!nm_connection_is_type (candidate, NM_SETTING_INFINIBAND_SETTING_NAME))
+ continue;
+ if (!infiniband_match_config (self, candidate))
+ continue;
+
+ infiniband_matches = g_slist_prepend (infiniband_matches, candidate);
+ }
+
+ /* Now pass those to the super method, which will check IP config */
+ infiniband_matches = g_slist_reverse (infiniband_matches);
+ match = NM_DEVICE_CLASS (nm_device_infiniband_parent_class)->connection_match_config (self, infiniband_matches);
+ g_slist_free (infiniband_matches);
+
+ return match;
+}
+
+static gboolean
+hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr)
+{
+ NMSettingInfiniband *s_ib;
+ const guint8 *devaddr;
+ const GByteArray *mac = NULL;
+ int devtype;
+
+ devtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (device));
+ devaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device));
+ g_return_val_if_fail (devaddr != NULL, FALSE);
+
+ s_ib = nm_connection_get_setting_infiniband (connection);
+ if (s_ib)
+ mac = nm_setting_infiniband_get_mac_address (s_ib);
+
+ if (mac) {
+ g_return_val_if_fail (mac->len == INFINIBAND_ALEN, FALSE);
+ if (other_hwaddr) {
+ g_return_val_if_fail (other_hwaddr_len == INFINIBAND_ALEN, FALSE);
+ if (memcmp (mac->data, other_hwaddr, mac->len) == 0)
+ return TRUE;
+ } else if (memcmp (mac->data, devaddr, mac->len) == 0)
+ return TRUE;
+ } else if (fail_if_no_hwaddr == FALSE)
+ return TRUE;
+
+ return FALSE;
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ const guint8 *current_addr;
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (object));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_INFINIBAND));
+ break;
+ case PROP_CARRIER:
+ g_value_set_boolean (value, nm_device_wired_get_carrier (NM_DEVICE_WIRED (object)));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_device_infiniband_class_init (NMDeviceInfinibandClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceInfinibandPrivate));
+
+ /* virtual methods */
+ object_class->constructor = constructor;
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+
+ parent_class->get_generic_capabilities = real_get_generic_capabilities;
+ parent_class->update_hw_address = real_update_hw_address;
+ parent_class->get_best_auto_connection = real_get_best_auto_connection;
+ parent_class->check_connection_compatible = real_check_connection_compatible;
+ parent_class->complete_connection = real_complete_connection;
+
+ parent_class->act_stage1_prepare = real_act_stage1_prepare;
+ parent_class->ip4_config_pre_commit = real_ip4_config_pre_commit;
+ parent_class->spec_match_list = spec_match_list;
+ parent_class->connection_match_config = connection_match_config;
+ parent_class->hwaddr_matches = hwaddr_matches;
+
+ /* properties */
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_INFINIBAND_HW_ADDRESS,
+ "Active MAC Address",
+ "Currently set hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_INFINIBAND_CARRIER,
+ "Carrier",
+ "Carrier",
+ FALSE,
+ G_PARAM_READABLE));
+
+ /* Signals */
+ signals[PROPERTIES_CHANGED] =
+ nm_properties_changed_signal_new (object_class,
+ G_STRUCT_OFFSET (NMDeviceInfinibandClass, properties_changed));
+
+ dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
+ &dbus_glib_nm_device_infiniband_object_info);
+
+ dbus_g_error_domain_register (NM_INFINIBAND_ERROR, NULL, NM_TYPE_INFINIBAND_ERROR);
+}
diff --git a/src/nm-device-infiniband.h b/src/nm-device-infiniband.h
new file mode 100644
index 000000000..fe88c9013
--- /dev/null
+++ b/src/nm-device-infiniband.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_INFINIBAND_H
+#define NM_DEVICE_INFINIBAND_H
+
+#include <glib-object.h>
+
+#include "nm-device-wired.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_INFINIBAND (nm_device_infiniband_get_type ())
+#define NM_DEVICE_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfiniband))
+#define NM_DEVICE_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass))
+#define NM_IS_DEVICE_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_INFINIBAND))
+#define NM_IS_DEVICE_INFINIBAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_INFINIBAND))
+#define NM_DEVICE_INFINIBAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass))
+
+typedef enum {
+ NM_INFINIBAND_ERROR_CONNECTION_NOT_INFINIBAND = 0, /*< nick=ConnectionNotInfiniband >*/
+ NM_INFINIBAND_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_INFINIBAND_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMInfinibandError;
+
+#define NM_DEVICE_INFINIBAND_HW_ADDRESS "hw-address"
+#define NM_DEVICE_INFINIBAND_CARRIER "carrier"
+
+typedef struct {
+ NMDeviceWired parent;
+} NMDeviceInfiniband;
+
+typedef struct {
+ NMDeviceWiredClass parent;
+
+ /* Signals */
+ void (*properties_changed) (NMDeviceInfiniband *device, GHashTable *properties);
+} NMDeviceInfinibandClass;
+
+
+GType nm_device_infiniband_get_type (void);
+
+NMDevice *nm_device_infiniband_new (const char *udi,
+ const char *iface,
+ const char *driver);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_INFINIBAND_H */
diff --git a/src/nm-device-interface.c b/src/nm-device-interface.c
deleted file mode 100644
index fb471f577..000000000
--- a/src/nm-device-interface.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2010 Red Hat, Inc.
- */
-
-#include <dbus/dbus-glib.h>
-
-#include "nm-marshal.h"
-#include "nm-setting-connection.h"
-#include "nm-device-interface.h"
-#include "nm-logging.h"
-#include "nm-properties-changed-signal.h"
-#include "nm-rfkill.h"
-
-static void impl_device_disconnect (NMDeviceInterface *device,
- DBusGMethodInvocation *context);
-
-#include "nm-device-interface-glue.h"
-
-GQuark
-nm_device_interface_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("nm-device-interface-error");
- return quark;
-}
-
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_device_interface_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection is already activating. */
- ENUM_ENTRY (NM_DEVICE_INTERFACE_ERROR_CONNECTION_ACTIVATING, "ConnectionActivating"),
- /* Connection is invalid for this device. */
- ENUM_ENTRY (NM_DEVICE_INTERFACE_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Operation could not be performed because the device is not active. */
- ENUM_ENTRY (NM_DEVICE_INTERFACE_ERROR_NOT_ACTIVE, "NotActive"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMDeviceInterfaceError", values);
- }
- return etype;
-}
-
-
-static void
-nm_device_interface_init (gpointer g_iface)
-{
- GType iface_type = G_TYPE_FROM_INTERFACE (g_iface);
- static gboolean initialized = FALSE;
-
- if (initialized)
- return;
-
- /* Properties */
- g_object_interface_install_property
- (g_iface,
- g_param_spec_string (NM_DEVICE_INTERFACE_UDI,
- "UDI",
- "Unique Device Identifier",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_string (NM_DEVICE_INTERFACE_IFACE,
- "Interface",
- "Interface",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_string (NM_DEVICE_INTERFACE_IP_IFACE,
- "IP Interface",
- "IP Interface",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_string (NM_DEVICE_INTERFACE_DRIVER,
- "Driver",
- "Driver",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_uint (NM_DEVICE_INTERFACE_CAPABILITIES,
- "Capabilities",
- "Capabilities",
- 0, G_MAXUINT32, NM_DEVICE_CAP_NONE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_uint (NM_DEVICE_INTERFACE_IP4_ADDRESS,
- "IP4 address",
- "IP4 address",
- 0, G_MAXUINT32, 0, /* FIXME */
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boxed (NM_DEVICE_INTERFACE_IP4_CONFIG,
- "IP4 Config",
- "IP4 Config",
- DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boxed (NM_DEVICE_INTERFACE_DHCP4_CONFIG,
- "DHCP4 Config",
- "DHCP4 Config",
- DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boxed (NM_DEVICE_INTERFACE_IP6_CONFIG,
- "IP6 Config",
- "IP6 Config",
- DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boxed (NM_DEVICE_INTERFACE_DHCP6_CONFIG,
- "DHCP6 Config",
- "DHCP6 Config",
- DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READWRITE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_uint (NM_DEVICE_INTERFACE_STATE,
- "State",
- "State",
- 0, G_MAXUINT32, NM_DEVICE_STATE_UNKNOWN,
- G_PARAM_READABLE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_boxed (NM_DEVICE_INTERFACE_ACTIVE_CONNECTION,
- "ActiveConnection",
- "ActiveConnection",
- DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READABLE));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_uint (NM_DEVICE_INTERFACE_DEVICE_TYPE,
- "DeviceType",
- "DeviceType",
- 0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT));
-
- g_object_interface_install_property
- (g_iface, g_param_spec_boolean (NM_DEVICE_INTERFACE_MANAGED,
- "Managed",
- "Managed",
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface, g_param_spec_boolean (NM_DEVICE_INTERFACE_FIRMWARE_MISSING,
- "FirmwareMissing",
- "Firmware missing",
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_string (NM_DEVICE_INTERFACE_TYPE_DESC,
- "Type Description",
- "Device type description",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT));
-
- g_object_interface_install_property
- (g_iface, g_param_spec_uint (NM_DEVICE_INTERFACE_RFKILL_TYPE,
- "Rfkill Type",
- "Type of rfkill switch (if any) supported by this device",
- RFKILL_TYPE_WLAN,
- RFKILL_TYPE_MAX,
- RFKILL_TYPE_UNKNOWN,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT));
-
- g_object_interface_install_property
- (g_iface,
- g_param_spec_int (NM_DEVICE_INTERFACE_IFINDEX,
- "Ifindex",
- "Ifindex",
- 0, G_MAXINT, 0,
- G_PARAM_READABLE | NM_PROPERTY_PARAM_NO_EXPORT));
-
- /* Signals */
- g_signal_new ("state-changed",
- iface_type,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDeviceInterface, state_changed),
- NULL, NULL,
- _nm_marshal_VOID__UINT_UINT_UINT,
- G_TYPE_NONE, 3,
- G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
-
- g_signal_new (NM_DEVICE_INTERFACE_DISCONNECT_REQUEST,
- iface_type,
- G_SIGNAL_RUN_FIRST,
- 0, NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- dbus_g_object_type_install_info (iface_type,
- &dbus_glib_nm_device_interface_object_info);
-
- dbus_g_error_domain_register (NM_DEVICE_INTERFACE_ERROR,
- NULL,
- NM_TYPE_DEVICE_INTERFACE_ERROR);
-
- initialized = TRUE;
-}
-
-
-GType
-nm_device_interface_get_type (void)
-{
- static GType device_interface_type = 0;
-
- if (!device_interface_type) {
- const GTypeInfo device_interface_info = {
- sizeof (NMDeviceInterface), /* class_size */
- nm_device_interface_init, /* base_init */
- NULL, /* base_finalize */
- NULL,
- NULL, /* class_finalize */
- NULL, /* class_data */
- 0,
- 0, /* n_preallocs */
- NULL
- };
-
- device_interface_type = g_type_register_static (G_TYPE_INTERFACE,
- "NMDeviceInterface",
- &device_interface_info, 0);
-
- g_type_interface_add_prerequisite (device_interface_type, G_TYPE_OBJECT);
- }
-
- return device_interface_type;
-}
-
-/* FIXME: This should be public and nm_device_get_iface() should be removed. */
-static char *
-nm_device_interface_get_iface (NMDeviceInterface *device)
-{
- char *iface = NULL;
-
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), NULL);
-
- g_object_get (device, NM_DEVICE_INTERFACE_IFACE, &iface, NULL);
-
- return iface;
-}
-
-gboolean
-nm_device_interface_check_connection_compatible (NMDeviceInterface *device,
- NMConnection *connection,
- GError **error)
-{
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
- g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
- g_return_val_if_fail (error != NULL, FALSE);
- g_return_val_if_fail (*error == NULL, FALSE);
-
- if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->check_connection_compatible)
- return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->check_connection_compatible (device, connection, error);
- return TRUE;
-}
-
-gboolean
-nm_device_interface_activate (NMDeviceInterface *device,
- NMActRequest *req,
- GError **error)
-{
- gboolean success;
- NMConnection *connection;
- char *iface;
-
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
- g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
-
- connection = nm_act_request_get_connection (req);
- g_assert (connection);
-
- iface = nm_device_interface_get_iface (device);
- nm_log_info (LOGD_DEVICE, "Activation (%s) starting connection '%s'", iface,
- nm_connection_get_id (connection));
- g_free (iface);
-
- success = NM_DEVICE_INTERFACE_GET_INTERFACE (device)->activate (device, req, error);
- if (!success)
- g_assert (*error);
-
- return success;
-}
-
-gboolean
-nm_device_interface_disconnect (NMDeviceInterface *device,
- GError **error)
-{
- gboolean success = FALSE;
-
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
-
- switch (nm_device_interface_get_state (device)) {
- case NM_DEVICE_STATE_UNKNOWN:
- case NM_DEVICE_STATE_UNMANAGED:
- case NM_DEVICE_STATE_UNAVAILABLE:
- case NM_DEVICE_STATE_DISCONNECTED:
- g_set_error_literal (error,
- NM_DEVICE_INTERFACE_ERROR,
- NM_DEVICE_INTERFACE_ERROR_NOT_ACTIVE,
- "Cannot disconnect an inactive device.");
- break;
- default:
- success = NM_DEVICE_INTERFACE_GET_INTERFACE (device)->disconnect (device, error);
- break;
- }
-
- return success;
-}
-
-static void
-impl_device_disconnect (NMDeviceInterface *device,
- DBusGMethodInvocation *context)
-{
- g_signal_emit_by_name (device, NM_DEVICE_INTERFACE_DISCONNECT_REQUEST, context);
-}
-
-void
-nm_device_interface_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason)
-{
- g_return_if_fail (NM_IS_DEVICE_INTERFACE (device));
-
- NM_DEVICE_INTERFACE_GET_INTERFACE (device)->deactivate (device, reason);
-}
-
-NMDeviceState
-nm_device_interface_get_state (NMDeviceInterface *device)
-{
- NMDeviceState state;
-
- g_object_get (G_OBJECT (device), "state", &state, NULL);
- return state;
-}
-
-gboolean
-nm_device_interface_spec_match_list (NMDeviceInterface *device,
- const GSList *specs)
-{
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
-
- if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->spec_match_list)
- return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->spec_match_list (device, specs);
- return FALSE;
-}
-
-NMConnection *
-nm_device_interface_connection_match_config (NMDeviceInterface *device,
- const GSList *connections)
-{
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), NULL);
-
- if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->connection_match_config)
- return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->connection_match_config (device, connections);
- return NULL;
-}
-
-gboolean
-nm_device_interface_can_assume_connections (NMDeviceInterface *device)
-{
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
-
- if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->can_assume_connections)
- return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->can_assume_connections (device);
- return FALSE;
-}
-
-void
-nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled)
-{
- g_return_if_fail (NM_IS_DEVICE_INTERFACE (device));
-
- if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled)
- NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled (device, enabled);
-}
-
-gboolean
-nm_device_interface_get_enabled (NMDeviceInterface *device)
-{
- g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
-
- if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->get_enabled)
- return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->get_enabled (device);
- return TRUE;
-}
-
diff --git a/src/nm-device-interface.h b/src/nm-device-interface.h
deleted file mode 100644
index 560cdfe51..000000000
--- a/src/nm-device-interface.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2010 Red Hat, Inc.
- */
-
-#ifndef NM_DEVICE_INTERFACE_H
-#define NM_DEVICE_INTERFACE_H
-
-#include <glib-object.h>
-#include "NetworkManager.h"
-#include "nm-connection.h"
-#include "nm-activation-request.h"
-
-#define NM_TYPE_DEVICE_INTERFACE (nm_device_interface_get_type ())
-#define NM_DEVICE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_INTERFACE, NMDeviceInterface))
-#define NM_IS_DEVICE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_INTERFACE))
-#define NM_DEVICE_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_DEVICE_INTERFACE, NMDeviceInterface))
-
-#define IS_ACTIVATING_STATE(state) \
- (state > NM_DEVICE_STATE_DISCONNECTED && state < NM_DEVICE_STATE_ACTIVATED)
-
-typedef enum
-{
- NM_DEVICE_INTERFACE_ERROR_CONNECTION_ACTIVATING = 0,
- NM_DEVICE_INTERFACE_ERROR_CONNECTION_INVALID,
- NM_DEVICE_INTERFACE_ERROR_NOT_ACTIVE,
-} NMDeviceInterfaceError;
-
-#define NM_DEVICE_INTERFACE_ERROR (nm_device_interface_error_quark ())
-#define NM_TYPE_DEVICE_INTERFACE_ERROR (nm_device_interface_error_get_type ())
-
-#define NM_DEVICE_INTERFACE_DISCONNECT_REQUEST "disconnect-request"
-
-#define NM_DEVICE_INTERFACE_UDI "udi"
-#define NM_DEVICE_INTERFACE_IFACE "interface"
-#define NM_DEVICE_INTERFACE_IP_IFACE "ip-interface"
-#define NM_DEVICE_INTERFACE_DRIVER "driver"
-#define NM_DEVICE_INTERFACE_CAPABILITIES "capabilities"
-#define NM_DEVICE_INTERFACE_IP4_ADDRESS "ip4-address"
-#define NM_DEVICE_INTERFACE_IP4_CONFIG "ip4-config"
-#define NM_DEVICE_INTERFACE_DHCP4_CONFIG "dhcp4-config"
-#define NM_DEVICE_INTERFACE_IP6_CONFIG "ip6-config"
-#define NM_DEVICE_INTERFACE_DHCP6_CONFIG "dhcp6-config"
-#define NM_DEVICE_INTERFACE_STATE "state"
-#define NM_DEVICE_INTERFACE_ACTIVE_CONNECTION "active-connection"
-#define NM_DEVICE_INTERFACE_DEVICE_TYPE "device-type" /* ugh */
-#define NM_DEVICE_INTERFACE_MANAGED "managed"
-#define NM_DEVICE_INTERFACE_FIRMWARE_MISSING "firmware-missing"
-#define NM_DEVICE_INTERFACE_TYPE_DESC "type-desc" /* Internal only */
-#define NM_DEVICE_INTERFACE_RFKILL_TYPE "rfkill-type" /* Internal only */
-#define NM_DEVICE_INTERFACE_IFINDEX "ifindex" /* Internal only */
-
-typedef enum {
- NM_DEVICE_INTERFACE_PROP_FIRST = 0x1000,
-
- NM_DEVICE_INTERFACE_PROP_UDI = NM_DEVICE_INTERFACE_PROP_FIRST,
- NM_DEVICE_INTERFACE_PROP_IFACE,
- NM_DEVICE_INTERFACE_PROP_IP_IFACE,
- NM_DEVICE_INTERFACE_PROP_DRIVER,
- NM_DEVICE_INTERFACE_PROP_CAPABILITIES,
- NM_DEVICE_INTERFACE_PROP_IP4_ADDRESS,
- NM_DEVICE_INTERFACE_PROP_IP4_CONFIG,
- NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG,
- NM_DEVICE_INTERFACE_PROP_IP6_CONFIG,
- NM_DEVICE_INTERFACE_PROP_DHCP6_CONFIG,
- NM_DEVICE_INTERFACE_PROP_STATE,
- NM_DEVICE_INTERFACE_PROP_ACTIVE_CONNECTION,
- NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE,
- NM_DEVICE_INTERFACE_PROP_MANAGED,
- NM_DEVICE_INTERFACE_PROP_FIRMWARE_MISSING,
- NM_DEVICE_INTERFACE_PROP_TYPE_DESC,
- NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE,
- NM_DEVICE_INTERFACE_PROP_IFINDEX,
-} NMDeviceInterfaceProp;
-
-
-typedef struct _NMDeviceInterface NMDeviceInterface;
-
-struct _NMDeviceInterface {
- GTypeInterface g_iface;
-
- /* Methods */
- gboolean (*check_connection_compatible) (NMDeviceInterface *device,
- NMConnection *connection,
- GError **error);
-
- gboolean (*activate) (NMDeviceInterface *device,
- NMActRequest *req,
- GError **error);
-
- void (*deactivate) (NMDeviceInterface *device, NMDeviceStateReason reason);
- gboolean (*disconnect) (NMDeviceInterface *device, GError **error);
-
- gboolean (*spec_match_list) (NMDeviceInterface *device, const GSList *specs);
-
- NMConnection * (*connection_match_config) (NMDeviceInterface *device, const GSList *specs);
-
- gboolean (*can_assume_connections) (NMDeviceInterface *device);
-
- void (*set_enabled) (NMDeviceInterface *device, gboolean enabled);
-
- gboolean (*get_enabled) (NMDeviceInterface *device);
-
- /* Signals */
- void (*state_changed) (NMDeviceInterface *device,
- NMDeviceState new_state,
- NMDeviceState old_state,
- NMDeviceStateReason reason);
-};
-
-GQuark nm_device_interface_error_quark (void);
-GType nm_device_interface_error_get_type (void);
-
-gboolean nm_device_interface_disconnect (NMDeviceInterface *device, GError **error);
-
-GType nm_device_interface_get_type (void);
-
-gboolean nm_device_interface_check_connection_compatible (NMDeviceInterface *device,
- NMConnection *connection,
- GError **error);
-
-gboolean nm_device_interface_activate (NMDeviceInterface *device,
- NMActRequest *req,
- GError **error);
-
-void nm_device_interface_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason);
-
-NMDeviceState nm_device_interface_get_state (NMDeviceInterface *device);
-
-gboolean nm_device_interface_spec_match_list (NMDeviceInterface *device,
- const GSList *specs);
-
-NMConnection * nm_device_interface_connection_match_config (NMDeviceInterface *device,
- const GSList *connections);
-
-gboolean nm_device_interface_can_assume_connections (NMDeviceInterface *device);
-
-gboolean nm_device_interface_get_enabled (NMDeviceInterface *device);
-
-void nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled);
-
-#endif /* NM_DEVICE_INTERFACE_H */
diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c
index 076bfa49b..7f81e9818 100644
--- a/src/nm-device-modem.c
+++ b/src/nm-device-modem.c
@@ -21,7 +21,6 @@
#include <glib.h>
#include "nm-device-modem.h"
-#include "nm-device-interface.h"
#include "nm-modem.h"
#include "nm-modem-cdma.h"
#include "nm-modem-gsm.h"
@@ -31,10 +30,7 @@
#include "nm-marshal.h"
#include "nm-logging.h"
-static void device_interface_init (NMDeviceInterface *iface_class);
-
-G_DEFINE_TYPE_EXTENDED (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init))
+G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE)
#define NM_DEVICE_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MODEM, NMDeviceModemPrivate))
@@ -60,7 +56,7 @@ enum {
};
static guint signals[LAST_SIGNAL] = { 0 };
-static void real_set_enabled (NMDeviceInterface *device, gboolean enabled);
+static void real_set_enabled (NMDevice *device, gboolean enabled);
/*****************************************************************************/
@@ -69,17 +65,19 @@ ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
- switch (nm_device_interface_get_state (NM_DEVICE_INTERFACE (device))) {
+ switch (nm_device_get_state (device)) {
case NM_DEVICE_STATE_PREPARE:
case NM_DEVICE_STATE_CONFIG:
case NM_DEVICE_STATE_NEED_AUTH:
- case NM_DEVICE_STATE_IP_CHECK:
- case NM_DEVICE_STATE_SECONDARIES:
- case NM_DEVICE_STATE_ACTIVATED:
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);
break;
case NM_DEVICE_STATE_IP_CONFIG:
- if (nm_device_ip_config_should_fail (device, FALSE)) {
+ case NM_DEVICE_STATE_IP_CHECK:
+ case NM_DEVICE_STATE_SECONDARIES:
+ case NM_DEVICE_STATE_ACTIVATED:
+ if (nm_device_activate_ip4_state_in_conf (device))
+ nm_device_activate_schedule_ip4_config_timeout (device);
+ else {
nm_device_state_changed (device,
NM_DEVICE_STATE_FAILED,
NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
@@ -99,7 +97,7 @@ modem_prepare_result (NMModem *modem,
NMDevice *device = NM_DEVICE (user_data);
NMDeviceState state;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
+ state = nm_device_get_state (device);
g_return_if_fail (state == NM_DEVICE_STATE_PREPARE);
if (success)
@@ -140,10 +138,8 @@ modem_ip4_config_result (NMModem *self,
gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
- NMDeviceState state;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
- g_return_if_fail (state == NM_DEVICE_STATE_IP_CONFIG);
+ g_return_if_fail (nm_device_activate_ip4_state_in_conf (device) == TRUE);
if (error) {
nm_log_warn (LOGD_MB | LOGD_IP4, "retrieving IP4 configuration failed: (%d) %s",
@@ -155,7 +151,7 @@ modem_ip4_config_result (NMModem *self,
if (iface)
nm_device_set_ip_iface (device, iface);
- nm_device_activate_schedule_stage4_ip4_config_get (device);
+ nm_device_activate_schedule_ip4_config_result (device, config);
}
}
@@ -165,7 +161,7 @@ modem_enabled_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
NMDeviceModem *self = NM_DEVICE_MODEM (user_data);
NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
- real_set_enabled (NM_DEVICE_INTERFACE (self), nm_modem_get_mm_enabled (priv->modem));
+ real_set_enabled (NM_DEVICE (self), nm_modem_get_mm_enabled (priv->modem));
g_signal_emit (G_OBJECT (self), signals[ENABLE_CHANGED], 0);
}
@@ -275,7 +271,9 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
}
static NMActStageReturn
-real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
+real_act_stage3_ip4_config_start (NMDevice *device,
+ NMIP4Config **out_config,
+ NMDeviceStateReason *reason)
{
return nm_modem_stage3_ip4_config_start (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem,
device,
@@ -284,27 +282,26 @@ real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
}
static NMActStageReturn
-real_act_stage4_get_ip4_config (NMDevice *device,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+real_act_stage3_ip6_config_start (NMDevice *device,
+ NMIP6Config **out_config,
+ NMDeviceStateReason *reason)
{
- return nm_modem_stage4_get_ip4_config (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem,
- device,
- NM_DEVICE_CLASS (nm_device_modem_parent_class),
- config,
- reason);
+ return nm_modem_stage3_ip6_config_start (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem,
+ device,
+ NM_DEVICE_CLASS (nm_device_modem_parent_class),
+ reason);
}
/*****************************************************************************/
static gboolean
-real_get_enabled (NMDeviceInterface *device)
+real_get_enabled (NMDevice *device)
{
return nm_modem_get_mm_enabled (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem);
}
static void
-real_set_enabled (NMDeviceInterface *device, gboolean enabled)
+real_set_enabled (NMDevice *device, gboolean enabled)
{
NMDeviceModem *self = NM_DEVICE_MODEM (device);
NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
@@ -314,7 +311,7 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled)
nm_modem_set_mm_enabled (priv->modem, enabled);
if (enabled == FALSE) {
- state = nm_device_interface_get_state (device);
+ state = nm_device_get_state (NM_DEVICE (device));
if (state == NM_DEVICE_STATE_ACTIVATED) {
nm_device_state_changed (NM_DEVICE (device),
NM_DEVICE_STATE_DISCONNECTED,
@@ -348,12 +345,12 @@ nm_device_modem_new (NMModem *modem, const char *driver)
}
return (NMDevice *) g_object_new (NM_TYPE_DEVICE_MODEM,
- NM_DEVICE_INTERFACE_UDI, nm_modem_get_path (modem),
- NM_DEVICE_INTERFACE_IFACE, nm_modem_get_iface (modem),
- NM_DEVICE_INTERFACE_DRIVER, driver,
- NM_DEVICE_INTERFACE_TYPE_DESC, type_desc,
- NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_MODEM,
- NM_DEVICE_INTERFACE_RFKILL_TYPE, RFKILL_TYPE_WWAN,
+ NM_DEVICE_UDI, nm_modem_get_path (modem),
+ NM_DEVICE_IFACE, nm_modem_get_iface (modem),
+ NM_DEVICE_DRIVER, driver,
+ NM_DEVICE_TYPE_DESC, type_desc,
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_MODEM,
+ NM_DEVICE_RFKILL_TYPE, RFKILL_TYPE_WWAN,
NM_DEVICE_MODEM_MODEM, modem,
NM_DEVICE_MODEM_CAPABILITIES, caps,
NM_DEVICE_MODEM_CURRENT_CAPABILITIES, caps,
@@ -361,13 +358,6 @@ nm_device_modem_new (NMModem *modem, const char *driver)
}
static void
-device_interface_init (NMDeviceInterface *iface_class)
-{
- iface_class->get_enabled = real_get_enabled;
- iface_class->set_enabled = real_set_enabled;
-}
-
-static void
nm_device_modem_init (NMDeviceModem *self)
{
g_signal_connect (self, "state-changed", G_CALLBACK (device_state_changed), self);
@@ -469,7 +459,9 @@ nm_device_modem_class_init (NMDeviceModemClass *mclass)
device_class->act_stage1_prepare = real_act_stage1_prepare;
device_class->act_stage2_config = real_act_stage2_config;
device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
- device_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config;
+ device_class->act_stage3_ip6_config_start = real_act_stage3_ip6_config_start;
+ device_class->get_enabled = real_get_enabled;
+ device_class->set_enabled = real_set_enabled;
/* Properties */
g_object_class_install_property
diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c
index ddd5198e8..f6390c166 100644
--- a/src/nm-device-olpc-mesh.c
+++ b/src/nm-device-olpc-mesh.c
@@ -31,16 +31,18 @@
#include <netinet/in.h>
#include <string.h>
#include <net/ethernet.h>
-#include <iwlib.h>
+#include <netinet/ether.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
+#include <linux/if.h>
+#include <sys/ioctl.h>
+#include <errno.h>
#include "nm-device.h"
#include "nm-device-wifi.h"
#include "nm-device-olpc-mesh.h"
-#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-utils.h"
#include "nm-logging.h"
@@ -51,6 +53,8 @@
#include "nm-setting-olpc-mesh.h"
#include "nm-system.h"
#include "nm-manager.h"
+#include "nm-enum-types.h"
+#include "wifi-utils.h"
/* This is a bug; but we can't really change API now... */
#include "NetworkManagerVPN.h"
@@ -58,8 +62,6 @@
#include "nm-device-olpc-mesh-glue.h"
-static void nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid);
-
G_DEFINE_TYPE (NMDeviceOlpcMesh, nm_device_olpc_mesh, NM_TYPE_DEVICE)
#define NM_DEVICE_OLPC_MESH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshPrivate))
@@ -82,15 +84,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-typedef enum
-{
- NM_OLPC_MESH_ERROR_CONNECTION_NOT_MESH = 0,
- NM_OLPC_MESH_ERROR_CONNECTION_INVALID,
- NM_OLPC_MESH_ERROR_CONNECTION_INCOMPATIBLE,
-} NMOlpcMeshError;
-
#define NM_OLPC_MESH_ERROR (nm_olpc_mesh_error_quark ())
-#define NM_TYPE_OLPC_MESH_ERROR (nm_olpc_mesh_error_get_type ())
struct _NMDeviceOlpcMeshPrivate
@@ -101,8 +95,7 @@ struct _NMDeviceOlpcMeshPrivate
GByteArray * ssid;
- gint8 num_freqs;
- guint32 freqs[IW_MAX_FREQUENCIES];
+ WifiData * wifi_data;
gboolean up;
@@ -120,29 +113,6 @@ nm_olpc_mesh_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_olpc_mesh_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a wireless connection. */
- ENUM_ENTRY (NM_OLPC_MESH_ERROR_CONNECTION_NOT_MESH, "ConnectionNotMesh"),
- /* Connection was not a valid wireless connection. */
- ENUM_ENTRY (NM_OLPC_MESH_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_OLPC_MESH_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMOlpcMeshError", values);
- }
- return etype;
-}
-
static guint32
real_get_generic_capabilities (NMDevice *dev)
{
@@ -161,44 +131,6 @@ nm_device_olpc_mesh_init (NMDeviceOlpcMesh * self)
memset (&(priv->hw_addr), 0, sizeof (struct ether_addr));
}
-static guint32 iw_freq_to_uint32 (struct iw_freq *freq)
-{
- if (freq->e == 0) {
- /* Some drivers report channel not frequency. Convert to a
- * frequency; but this assumes that the device is in b/g mode.
- */
- if ((freq->m >= 1) && (freq->m <= 13))
- return 2407 + (5 * freq->m);
- else if (freq->m == 14)
- return 2484;
- }
-
- return (guint32) (((double) freq->m) * pow (10, freq->e) / 1000000);
-}
-
-
-/* Until a new wireless-tools comes out that has the defs and the structure,
- * need to copy them here.
- */
-/* Scan capability flags - in (struct iw_range *)->scan_capa */
-#define NM_IW_SCAN_CAPA_NONE 0x00
-#define NM_IW_SCAN_CAPA_ESSID 0x01
-
-struct iw_range_with_scan_capa
-{
- guint32 throughput;
- guint32 min_nwid;
- guint32 max_nwid;
- guint16 old_num_channels;
- guint8 old_num_frequency;
-
- guint8 scan_capa;
-/* don't need the rest... */
-};
-
-
-
-
static GObject*
constructor (GType type,
guint n_construct_params,
@@ -208,11 +140,6 @@ constructor (GType type,
GObjectClass *klass;
NMDeviceOlpcMesh *self;
NMDeviceOlpcMeshPrivate *priv;
- const char *iface;
- int fd;
- struct iw_range range;
- struct iwreq wrq;
- int i;
klass = G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class);
object = klass->constructor (type, n_construct_params, construct_params);
@@ -226,46 +153,19 @@ constructor (GType type,
nm_device_get_iface (NM_DEVICE (self)),
nm_device_get_ifindex (NM_DEVICE (self)));
- iface = nm_device_get_iface (NM_DEVICE (self));
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0)
- goto error;
-
- memset (&wrq, 0, sizeof (struct iwreq));
- memset (&range, 0, sizeof (struct iw_range));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
- wrq.u.data.pointer = (caddr_t) &range;
- wrq.u.data.length = sizeof (struct iw_range);
-
- if (ioctl (fd, SIOCGIWRANGE, &wrq) < 0) {
- nm_log_info (LOGD_HW | LOGD_WIFI, "(%s): driver WEXT range request failed",
+ priv->wifi_data = wifi_utils_init (nm_device_get_iface (NM_DEVICE (self)),
+ nm_device_get_ifindex (NM_DEVICE (self)),
+ FALSE);
+ if (priv->wifi_data == NULL) {
+ nm_log_warn (LOGD_HW | LOGD_OLPC_MESH, "(%s): failed to initialize WiFi driver",
nm_device_get_iface (NM_DEVICE (self)));
- goto error;
- }
-
- if ((wrq.u.data.length < 300) || (range.we_version_compiled < 21)) {
- nm_log_info (LOGD_HW | LOGD_WIFI,
- "(%s): driver WEXT version too old (got %d, expected >= 21)",
- nm_device_get_iface (NM_DEVICE (self)),
- range.we_version_compiled);
- goto error;
+ g_object_unref (object);
+ return NULL;
}
- priv->num_freqs = MIN (range.num_frequency, IW_MAX_FREQUENCIES);
- for (i = 0; i < priv->num_freqs; i++)
- priv->freqs[i] = iw_freq_to_uint32 (&range.freq[i]);
-
- close (fd);
-
/* shorter timeout for mesh connectivity */
nm_device_set_dhcp_timeout (NM_DEVICE (self), 20);
return object;
-
-error:
- if (fd >= 0)
- close (fd);
- g_object_unref (object);
- return NULL;
}
static gboolean
@@ -331,7 +231,7 @@ real_check_connection_compatible (NMDevice *device,
NMSettingConnection *s_con;
NMSettingOlpcMesh *s_mesh;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_OLPC_MESH_SETTING_NAME)) {
@@ -341,7 +241,7 @@ real_check_connection_compatible (NMDevice *device,
return FALSE;
}
- s_mesh = NM_SETTING_OLPC_MESH (nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH));
+ s_mesh = nm_connection_get_setting_olpc_mesh (connection);
if (!s_mesh) {
g_set_error (error,
NM_OLPC_MESH_ERROR, NM_OLPC_MESH_ERROR_CONNECTION_INVALID,
@@ -364,7 +264,7 @@ real_complete_connection (NMDevice *device,
NMSettingOlpcMesh *s_mesh;
GByteArray *tmp;
- s_mesh = (NMSettingOlpcMesh *) nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH);
+ s_mesh = nm_connection_get_setting_olpc_mesh (connection);
if (!s_mesh) {
s_mesh = (NMSettingOlpcMesh *) nm_setting_olpc_mesh_new ();
nm_connection_add_setting (connection, NM_SETTING (s_mesh));
@@ -414,131 +314,6 @@ nm_device_olpc_mesh_get_address (NMDeviceOlpcMesh *self,
memcpy (addr, &(priv->hw_addr), sizeof (struct ether_addr));
}
-static int
-create_socket_with_request (NMDevice *self, struct iwreq *req)
-{
- int sk;
- const char * iface;
-
- g_return_val_if_fail (self != NULL, -1);
-
- sk = socket (AF_INET, SOCK_DGRAM, 0);
- if (sk == -1) {
- nm_log_err (LOGD_OLPC_MESH, "Couldn't create socket: %d.", errno);
- return -1;
- }
-
- memset (req, 0, sizeof (struct iwreq));
- iface = nm_device_get_iface (NM_DEVICE (self));
- strncpy (req->ifr_name, iface, IFNAMSIZ);
-
- return sk;
-}
-
-static guint32
-nm_device_olpc_mesh_get_channel (NMDeviceOlpcMesh *self)
-{
- NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);
- int sk;
- struct iwreq req;
- int ret = 0;
- int i;
- guint32 freq;
-
- sk = create_socket_with_request (NM_DEVICE (self), &req);
- if (sk == -1)
- return 0;
-
- if ((ioctl (sk, SIOCGIWFREQ, &req)) != 0) {
- nm_log_warn (LOGD_OLPC_MESH, "(%s): failed to get channel (errno: %d)",
- nm_device_get_iface (NM_DEVICE (self)), errno);
- goto out;
- }
-
- freq = iw_freq_to_uint32 (&req.u.freq);
-
- for (i = 0 ; i < priv->num_freqs; i++) {
- if (freq == priv->freqs[i])
- break;
- }
- if (i < priv->num_freqs)
- ret = i + 1;
-
-out:
- if (sk >= 0)
- close (sk);
- return ret;
-}
-
-static void
-nm_device_olpc_mesh_set_channel (NMDeviceOlpcMesh *self, guint32 channel)
-{
- int sk;
- struct iwreq req;
-
- if (nm_device_olpc_mesh_get_channel (self) == channel)
- return;
-
- sk = create_socket_with_request (NM_DEVICE (self), &req);
- if (sk < 0)
- return;
-
- if (channel > 0) {
- req.u.freq.flags = IW_FREQ_FIXED;
- req.u.freq.e = 0;
- req.u.freq.m = channel;
- }
-
- if (ioctl (sk, SIOCSIWFREQ, &req) != 0) {
- nm_log_warn (LOGD_OLPC_MESH, "(%s): failed to set to channel %d (errno: %d)",
- nm_device_get_iface (NM_DEVICE (self)), channel, errno);
- } else
- g_object_notify (G_OBJECT (self), NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL);
-
- close (sk);
-}
-
-static void
-nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid)
-{
- int sk;
- struct iwreq wrq;
- const char * iface;
- guint32 len = 0;
- char buf[IW_ESSID_MAX_SIZE + 1];
-
- g_return_if_fail (self != NULL);
-
- sk = socket (AF_INET, SOCK_DGRAM, 0);
- if (sk == -1) {
- nm_log_err (LOGD_OLPC_MESH, "Couldn't create socket: %d.", errno);
- return;
- }
-
- iface = nm_device_get_iface (NM_DEVICE (self));
-
- memset (buf, 0, sizeof (buf));
- if (ssid) {
- len = ssid->len;
- memcpy (buf, ssid->data, MIN (sizeof (buf) - 1, len));
- }
- wrq.u.essid.pointer = (caddr_t) buf;
- wrq.u.essid.length = len;
- wrq.u.essid.flags = (len > 0) ? 1 : 0; /* 1=enable SSID, 0=disable/any */
-
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
- if (ioctl (sk, SIOCSIWESSID, &wrq) < 0) {
- if (errno != ENODEV) {
- nm_log_err (LOGD_OLPC_MESH, "(%s): error setting SSID to '%s': %s",
- iface,
- ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(null)",
- strerror (errno));
- }
- }
-
- close (sk);
-}
-
/****************************************************************************/
static void
@@ -605,30 +380,38 @@ real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
return NM_ACT_STAGE_RETURN_SUCCESS;
}
+static void
+_mesh_set_channel (NMDeviceOlpcMesh *self, guint32 channel)
+{
+ NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);
+
+ if (wifi_utils_get_mesh_channel (priv->wifi_data) != channel) {
+ if (wifi_utils_set_mesh_channel (priv->wifi_data, channel))
+ g_object_notify (G_OBJECT (self), NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL);
+ }
+}
+
static NMActStageReturn
real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason)
{
NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (dev);
+ NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);
NMConnection *connection;
NMSettingOlpcMesh *s_mesh;
- NMActRequest *req;
guint32 channel;
const GByteArray *anycast_addr_array;
guint8 *anycast_addr = NULL;
- req = nm_device_get_act_request (dev);
- g_assert (req);
-
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (dev);
g_assert (connection);
- s_mesh = NM_SETTING_OLPC_MESH (nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH));
+ s_mesh = nm_connection_get_setting_olpc_mesh (connection);
g_assert (s_mesh);
channel = nm_setting_olpc_mesh_get_channel (s_mesh);
if (channel != 0)
- nm_device_olpc_mesh_set_channel (self, channel);
- nm_device_olpc_mesh_set_ssid (self, nm_setting_olpc_mesh_get_ssid (s_mesh));
+ _mesh_set_channel (self, channel);
+ wifi_utils_set_mesh_ssid (priv->wifi_data, nm_setting_olpc_mesh_get_ssid (s_mesh));
anycast_addr_array = nm_setting_olpc_mesh_get_dhcp_anycast_address (s_mesh);
if (anycast_addr_array)
@@ -651,6 +434,9 @@ dispose (GObject *object)
}
priv->dispose_has_run = TRUE;
+ if (priv->wifi_data)
+ wifi_utils_deinit (priv->wifi_data);
+
device_cleanup (self);
manager = nm_manager_get ();
@@ -672,7 +458,7 @@ get_property (GObject *object, guint prop_id,
switch (prop_id) {
case PROP_HW_ADDRESS:
nm_device_olpc_mesh_get_address (device, &hw_addr);
- g_value_take_string (value, nm_ether_ntop (&hw_addr));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (&hw_addr, ARPHRD_ETHER));
break;
case PROP_COMPANION:
if (priv->companion)
@@ -681,7 +467,7 @@ get_property (GObject *object, guint prop_id,
g_value_set_boxed (value, "/");
break;
case PROP_ACTIVE_CHANNEL:
- g_value_set_uint (value, nm_device_olpc_mesh_get_channel (device));
+ g_value_set_uint (value, wifi_utils_get_mesh_channel (priv->wifi_data));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -810,9 +596,7 @@ static gboolean
companion_scan_allowed_cb (NMDeviceWifi *companion, gpointer user_data)
{
NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (user_data);
- NMDeviceState state;
-
- g_object_get (G_OBJECT (self), NM_DEVICE_INTERFACE_STATE, &state, NULL);
+ NMDeviceState state = nm_device_get_state (NM_DEVICE (self));
/* Don't allow the companion to scan while configuring the mesh interface */
return (state < NM_DEVICE_STATE_PREPARE) || (state > NM_DEVICE_STATE_IP_CONFIG);
@@ -822,9 +606,7 @@ static gboolean
companion_autoconnect_allowed_cb (NMDeviceWifi *companion, gpointer user_data)
{
NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (user_data);
- NMDeviceState state;
-
- g_object_get (G_OBJECT (self), NM_DEVICE_INTERFACE_STATE, &state, NULL);
+ NMDeviceState state = nm_device_get_state (NM_DEVICE (self));
/* Don't allow the companion to autoconnect while a mesh connection is
* active */
@@ -961,11 +743,11 @@ nm_device_olpc_mesh_new (const char *udi,
g_return_val_if_fail (driver != NULL, NULL);
obj = g_object_new (NM_TYPE_DEVICE_OLPC_MESH,
- NM_DEVICE_INTERFACE_UDI, udi,
- NM_DEVICE_INTERFACE_IFACE, iface,
- NM_DEVICE_INTERFACE_DRIVER, driver,
- NM_DEVICE_INTERFACE_TYPE_DESC, "802.11 OLPC Mesh",
- NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_OLPC_MESH,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, driver,
+ NM_DEVICE_TYPE_DESC, "802.11 OLPC Mesh",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_OLPC_MESH,
NULL);
if (obj == NULL)
return NULL;
diff --git a/src/nm-device-olpc-mesh.h b/src/nm-device-olpc-mesh.h
index bcc03e57a..9d42ecfaf 100644
--- a/src/nm-device-olpc-mesh.h
+++ b/src/nm-device-olpc-mesh.h
@@ -42,6 +42,13 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_OLPC_MESH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_OLPC_MESH))
#define NM_DEVICE_OLPC_MESH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshClass))
+typedef enum
+{
+ NM_OLPC_MESH_ERROR_CONNECTION_NOT_MESH = 0, /*< nick=ConnectionNotMesh >*/
+ NM_OLPC_MESH_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_OLPC_MESH_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMOlpcMeshError;
+
#define NM_DEVICE_OLPC_MESH_HW_ADDRESS "hw-address"
#define NM_DEVICE_OLPC_MESH_COMPANION "companion"
#define NM_DEVICE_OLPC_MESH_BITRATE "bitrate"
diff --git a/src/nm-device-private.h b/src/nm-device-private.h
index a7d238b10..9b78db121 100644
--- a/src/nm-device-private.h
+++ b/src/nm-device-private.h
@@ -24,26 +24,47 @@
#include "nm-device.h"
+/* This file should only be used by subclasses of NMDevice */
+
+enum NMActStageReturn {
+ NM_ACT_STAGE_RETURN_FAILURE = 0,
+ NM_ACT_STAGE_RETURN_SUCCESS,
+ NM_ACT_STAGE_RETURN_POSTPONE,
+ NM_ACT_STAGE_RETURN_STOP /* This activation chain is done */
+};
+
void nm_device_set_ip_iface (NMDevice *self, const char *iface);
void nm_device_activate_schedule_stage3_ip_config_start (NMDevice *device);
-void nm_device_state_changed (NMDevice *device,
- NMDeviceState state,
- NMDeviceStateReason reason);
-
gboolean nm_device_hw_bring_up (NMDevice *self, gboolean wait, gboolean *no_firmware);
void nm_device_hw_take_down (NMDevice *self, gboolean block);
-void nm_device_handle_autoip4_event (NMDevice *self,
- const char *event,
- const char *address);
-
gboolean nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6);
-gboolean nm_device_get_firmware_missing (NMDevice *self);
-
void nm_device_set_firmware_missing (NMDevice *self, gboolean missing);
+guint32 nm_device_get_capabilities (NMDevice *dev);
+guint32 nm_device_get_type_capabilities (NMDevice *dev);
+
+void nm_device_activate_schedule_stage1_device_prepare (NMDevice *device);
+void nm_device_activate_schedule_stage2_device_config (NMDevice *device);
+
+void nm_device_activate_schedule_ip4_config_result(NMDevice *device, NMIP4Config *config);
+void nm_device_activate_schedule_ip4_config_timeout (NMDevice *device);
+
+void nm_device_activate_schedule_ip6_config_result (NMDevice *device, NMIP6Config *config);
+void nm_device_activate_schedule_ip6_config_timeout (NMDevice *device);
+
+gboolean nm_device_activate_ip4_state_in_conf (NMDevice *device);
+gboolean nm_device_activate_ip6_state_in_conf (NMDevice *device);
+
+void nm_device_set_dhcp_timeout (NMDevice *device, guint32 timeout);
+void nm_device_set_dhcp_anycast_address (NMDevice *device, guint8 *addr);
+
+gboolean nm_device_dhcp4_renew (NMDevice *device, gboolean release);
+
+gboolean nm_device_match_ip_config (NMDevice *device, NMConnection *connection);
+
#endif /* NM_DEVICE_PRIVATE_H */
diff --git a/src/nm-device-vlan.c b/src/nm-device-vlan.c
new file mode 100644
index 000000000..14be849fe
--- /dev/null
+++ b/src/nm-device-vlan.c
@@ -0,0 +1,803 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011 - 2012 Red Hat, Inc.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include <sys/socket.h>
+#include <linux/if.h>
+#include <netinet/ether.h>
+
+#include "nm-device-vlan.h"
+#include "nm-logging.h"
+#include "nm-properties-changed-signal.h"
+#include "nm-utils.h"
+#include "NetworkManagerUtils.h"
+#include "nm-device-private.h"
+#include "nm-netlink-monitor.h"
+#include "nm-enum-types.h"
+#include "nm-system.h"
+
+#include "nm-device-vlan-glue.h"
+
+
+G_DEFINE_TYPE (NMDeviceVlan, nm_device_vlan, NM_TYPE_DEVICE)
+
+#define NM_DEVICE_VLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_VLAN, NMDeviceVlanPrivate))
+
+#define NM_VLAN_ERROR (nm_vlan_error_quark ())
+
+typedef struct {
+ gboolean disposed;
+
+ NMDevice *parent;
+ guint parent_state_id;
+
+ guint vlan_id;
+
+ guint8 hw_addr[NM_UTILS_HWADDR_LEN_MAX];
+ guint hw_addr_len;
+
+ gboolean carrier;
+ NMNetlinkMonitor *monitor;
+ gulong link_connected_id;
+ gulong link_disconnected_id;
+ guint carrier_action_defer_id;
+} NMDeviceVlanPrivate;
+
+enum {
+ PROPERTIES_CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+enum {
+ PROP_0,
+ PROP_HW_ADDRESS,
+ PROP_CARRIER,
+ PROP_VLAN_ID,
+
+ LAST_PROP
+};
+
+static void
+set_carrier (NMDeviceVlan *self,
+ const gboolean carrier,
+ const gboolean defer_action);
+
+/******************************************************************/
+
+static GQuark
+nm_vlan_error_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("nm-vlan-error");
+ return quark;
+}
+
+/******************************************************************/
+
+static guint32
+real_get_generic_capabilities (NMDevice *dev)
+{
+ /* We assume VLAN interfaces always support carrier detect */
+ return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_NM_SUPPORTED;
+}
+
+static gboolean
+get_carrier_sync (NMDeviceVlan *self)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+ GError *error = NULL;
+ guint32 ifflags = 0;
+
+ /* Get initial link state */
+ if (!nm_netlink_monitor_get_flags_sync (priv->monitor,
+ nm_device_get_ip_ifindex (NM_DEVICE (self)),
+ &ifflags,
+ &error)) {
+ nm_log_warn (LOGD_HW | LOGD_DEVICE,
+ "(%s): couldn't get carrier state: (%d) %s",
+ nm_device_get_ip_iface (NM_DEVICE (self)),
+ error ? error->code : -1,
+ (error && error->message) ? error->message : "unknown");
+ g_clear_error (&error);
+ }
+
+ return !!(ifflags & IFF_LOWER_UP);
+}
+
+static gboolean
+real_hw_is_up (NMDevice *device)
+{
+ return nm_system_iface_is_up (nm_device_get_ip_ifindex (device));
+}
+
+static gboolean
+real_hw_bring_up (NMDevice *dev, gboolean *no_firmware)
+{
+ gboolean success = FALSE, carrier;
+ guint i = 20;
+
+ while (i-- > 0 && !success) {
+ success = nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware);
+ g_usleep (50);
+ }
+
+ if (success) {
+ /* Block a bit to make sure the carrier comes on; it's delayed a bit
+ * after setting the interface up.
+ */
+ i = 20;
+ while (i-- > 0) {
+ carrier = get_carrier_sync (NM_DEVICE_VLAN (dev));
+ set_carrier (NM_DEVICE_VLAN (dev), carrier, carrier ? FALSE : TRUE);
+ if (carrier)
+ break;
+ g_usleep (100);
+ }
+ }
+ return success;
+}
+
+static void
+real_hw_take_down (NMDevice *dev)
+{
+ nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL);
+}
+
+static void
+real_update_hw_address (NMDevice *dev)
+{
+ NMDeviceVlan *self = NM_DEVICE_VLAN (dev);
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+ struct rtnl_link *rtnl;
+ struct nl_addr *addr;
+
+ rtnl = nm_netlink_index_to_rtnl_link (nm_device_get_ip_ifindex (dev));
+ if (!rtnl) {
+ nm_log_err (LOGD_HW | LOGD_DEVICE,
+ "(%s) failed to read hardware address (error %d)",
+ nm_device_get_iface (dev), errno);
+ return;
+ }
+
+ addr = rtnl_link_get_addr (rtnl);
+ if (!addr) {
+ nm_log_err (LOGD_HW | LOGD_DEVICE,
+ "(%s) no hardware address?",
+ nm_device_get_iface (dev));
+ goto out;
+ }
+
+ if (nl_addr_get_len (addr) > sizeof (priv->hw_addr)) {
+ nm_log_err (LOGD_HW | LOGD_DEVICE,
+ "(%s) hardware address is wrong length (got %d max %zd)",
+ nm_device_get_iface (dev),
+ nl_addr_get_len (addr),
+ sizeof (priv->hw_addr));
+ } else {
+ priv->hw_addr_len = nl_addr_get_len (addr);
+ memcpy (&priv->hw_addr, nl_addr_get_binary_addr (addr), priv->hw_addr_len);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_VLAN_HW_ADDRESS);
+ }
+
+out:
+ rtnl_link_put (rtnl);
+}
+
+static gboolean
+real_can_interrupt_activation (NMDevice *dev)
+{
+ /* Can interrupt activation if the carrier drops while activating */
+ return NM_DEVICE_VLAN_GET_PRIVATE (dev)->carrier ? FALSE : TRUE;
+}
+
+static gboolean
+real_is_available (NMDevice *dev)
+{
+ return NM_DEVICE_VLAN_GET_PRIVATE (dev)->carrier ? TRUE : FALSE;
+}
+
+/******************************************************************/
+
+static gboolean
+match_parent (NMDeviceVlan *self, const char *parent, GError **error)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+
+ g_return_val_if_fail (parent != NULL, FALSE);
+
+ if (nm_utils_is_uuid (parent)) {
+ NMActRequest *parent_req;
+ NMConnection *parent_connection;
+
+ /* If the parent is a UUID, the connection matches if our parent
+ * device has that connection activated.
+ */
+
+ parent_req = nm_device_get_act_request (priv->parent);
+ if (!parent_req) {
+ g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "Parent interface not active; could not match UUID");
+ return FALSE;
+ }
+
+ parent_connection = nm_active_connection_get_connection (NM_ACTIVE_CONNECTION (parent_req));
+ if (!parent_connection) {
+ g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "Parent interface had no connection; could not match UUID");
+ return FALSE;
+ }
+ if (g_strcmp0 (parent, nm_connection_get_uuid (parent_connection)) != 0) {
+ g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "Parent interface UUID did not match connection UUID");
+ return FALSE;
+ }
+ } else {
+ /* interface name */
+ if (g_strcmp0 (parent, nm_device_get_ip_iface (priv->parent)) != 0) {
+ g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "Parent interface name did not match connection");
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean
+match_vlan_connection (NMDeviceVlan *self, NMConnection *connection, GError **error)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+ NMSettingVlan *s_vlan;
+ const char *parent, *iface = NULL;
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ if (!s_vlan) {
+ g_set_error (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "The connection was not a VLAN connection.");
+ return FALSE;
+ }
+
+ if (nm_setting_vlan_get_id (s_vlan) != priv->vlan_id) {
+ g_set_error (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "The connection's VLAN ID did not match the device's VLAN ID.");
+ return FALSE;
+ }
+
+ /* Check parent interface; could be an interface name or a UUID */
+ parent = nm_setting_vlan_get_parent (s_vlan);
+ if (parent) {
+ if (!match_parent (self, parent, error))
+ return FALSE;
+ } else {
+ /* Parent could be a MAC address in a hardware-specific setting */
+ if (!nm_device_hwaddr_matches (priv->parent, connection, NULL, 0, TRUE)) {
+ g_set_error (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "Failed to match the VLAN parent interface via hardware address.");
+ return FALSE;
+ }
+ }
+
+ /* Ensure the interface name matches. If not specified we assume a match
+ * since both the parent interface and the VLAN ID matched by the time we
+ * get here.
+ */
+ iface = nm_connection_get_virtual_iface_name (connection);
+ if (iface) {
+ if (g_strcmp0 (nm_device_get_ip_iface (NM_DEVICE (self)), iface) != 0) {
+ g_set_error (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "The VLAN connection virtual interface name did not match.");
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static NMConnection *
+real_get_best_auto_connection (NMDevice *dev,
+ GSList *connections,
+ char **specific_object)
+{
+ GSList *iter;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+ NMSettingConnection *s_con;
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+ if ( nm_setting_connection_get_autoconnect (s_con)
+ && match_vlan_connection (NM_DEVICE_VLAN (dev), connection, NULL))
+ return connection;
+ }
+ return NULL;
+}
+
+static gboolean
+real_check_connection_compatible (NMDevice *device,
+ NMConnection *connection,
+ GError **error)
+{
+ return match_vlan_connection (NM_DEVICE_VLAN (device), connection, error);
+}
+
+static gboolean
+real_complete_connection (NMDevice *device,
+ NMConnection *connection,
+ const char *specific_object,
+ const GSList *existing_connections,
+ GError **error)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
+ NMSettingVlan *s_vlan;
+
+ nm_utils_complete_generic (connection,
+ NM_SETTING_VLAN_SETTING_NAME,
+ existing_connections,
+ _("VLAN connection %d"),
+ NULL,
+ TRUE);
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ if (!s_vlan) {
+ g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "A 'vlan' setting is required.");
+ return FALSE;
+ }
+
+ /* If there's no VLAN interface, no parent, and no hardware address in the
+ * settings, then there's not enough information to complete the setting.
+ */
+ if (!nm_setting_vlan_get_parent (s_vlan)) {
+ if (!nm_device_hwaddr_matches (priv->parent, connection, NULL, 0, TRUE)) {
+ /* FIXME: put priv->hw_addr into the connection in the appropriate
+ * hardware-specific setting.
+ */
+ g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID,
+ "The 'vlan' setting had no interface name, parent, or hardware address.");
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean
+spec_match_list (NMDevice *device, const GSList *specs)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
+ char *hwaddr;
+ gboolean matched;
+ int itype = nm_utils_hwaddr_type (priv->hw_addr_len);
+
+ hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, itype);
+ matched = nm_match_spec_hwaddr (specs, hwaddr);
+ g_free (hwaddr);
+
+ return matched;
+}
+
+static gboolean
+vlan_match_config (NMDevice *device, NMConnection *connection)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
+ NMSettingVlan *s_vlan;
+ const char *ifname, *parent;
+ gboolean fail_if_no_hwaddr = FALSE;
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ if (!s_vlan)
+ return FALSE;
+
+ /* Interface name */
+ ifname = nm_setting_vlan_get_interface_name (s_vlan);
+ if (g_strcmp0 (ifname, nm_device_get_ip_iface (device)) != 0)
+ return FALSE;
+
+ if (nm_setting_vlan_get_id (s_vlan) != priv->vlan_id)
+ return FALSE;
+
+ parent = nm_setting_vlan_get_parent (s_vlan);
+ if (parent) {
+ if (!match_parent (NM_DEVICE_VLAN (device), parent, NULL))
+ return FALSE;
+ } else {
+ /* If there's no parent and no interface name given, then the only way
+ * we have to identify the VLAN interface the connection matches is
+ * a hardware-specific setting's hardware address property, so we want
+ * to fail the match below if we there is none.
+ */
+ if (ifname == NULL)
+ fail_if_no_hwaddr = TRUE;
+ }
+
+ /* MAC address check; we ask the parent to check our own MAC address,
+ * because only the parent knows what kind of NMSetting the MAC
+ * address will be in. The VLAN device shouldn't have to know what kind
+ * of interface the parent is.
+ */
+ if (!nm_device_hwaddr_matches (priv->parent, connection, priv->hw_addr, priv->hw_addr_len, fail_if_no_hwaddr))
+ return FALSE;
+
+ return TRUE;
+}
+
+static NMConnection *
+connection_match_config (NMDevice *self, const GSList *connections)
+{
+ const GSList *iter;
+
+ /* First narrow @connections down to those that match in their
+ * NMSettingVlan configuration.
+ */
+ for (iter = connections; iter; iter = iter->next) {
+ NMConnection *candidate = iter->data;
+
+ if (!nm_connection_is_type (candidate, NM_SETTING_VLAN_SETTING_NAME))
+ continue;
+ if (!vlan_match_config (self, candidate))
+ continue;
+ if (!nm_device_match_ip_config (self, candidate))
+ continue;
+
+ return candidate;
+ }
+ return NULL;
+}
+
+/******************************************************************/
+
+static void
+carrier_action_defer_clear (NMDeviceVlan *self)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+
+ if (priv->carrier_action_defer_id) {
+ g_source_remove (priv->carrier_action_defer_id);
+ priv->carrier_action_defer_id = 0;
+ }
+}
+
+static gboolean
+carrier_action_defer_cb (gpointer user_data)
+{
+ NMDeviceVlan *self = NM_DEVICE_VLAN (user_data);
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+ NMDeviceState state;
+
+ priv->carrier_action_defer_id = 0;
+
+ state = nm_device_get_state (NM_DEVICE (self));
+ if (state == NM_DEVICE_STATE_UNAVAILABLE) {
+ if (priv->carrier)
+ nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER);
+ } else if (state >= NM_DEVICE_STATE_DISCONNECTED) {
+ if (!priv->carrier)
+ nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER);
+ }
+ return FALSE;
+}
+
+static void
+set_carrier (NMDeviceVlan *self,
+ const gboolean carrier,
+ const gboolean defer_action)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+ NMDeviceState state;
+
+ if (priv->carrier == carrier)
+ return;
+
+ /* Clear any previous deferred action */
+ carrier_action_defer_clear (self);
+
+ priv->carrier = carrier;
+ g_object_notify (G_OBJECT (self), NM_DEVICE_VLAN_CARRIER);
+
+ state = nm_device_get_state (NM_DEVICE (self));
+ nm_log_info (LOGD_HW | LOGD_DEVICE,
+ "(%s): carrier now %s (device state %d%s)",
+ nm_device_get_iface (NM_DEVICE (self)),
+ carrier ? "ON" : "OFF",
+ state,
+ defer_action ? ", deferring action for 4 seconds" : "");
+
+ if (defer_action)
+ priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self);
+ else
+ carrier_action_defer_cb (self);
+}
+
+static void
+carrier_on (NMNetlinkMonitor *monitor, int idx, NMDevice *device)
+{
+ /* Make sure signal is for us */
+ if (idx == nm_device_get_ifindex (device))
+ set_carrier (NM_DEVICE_VLAN (device), TRUE, FALSE);
+}
+
+static void
+carrier_off (NMNetlinkMonitor *monitor, int idx, NMDevice *device)
+{
+ NMDeviceState state;
+ gboolean defer = FALSE;
+
+ /* Make sure signal is for us */
+ if (idx == nm_device_get_ifindex (device)) {
+ /* Defer carrier-off event actions while connected by a few seconds
+ * so that tripping over a cable, power-cycling a switch, or breaking
+ * off the RJ45 locking tab isn't so catastrophic.
+ */
+ state = nm_device_get_state (device);
+ if (state > NM_DEVICE_STATE_DISCONNECTED)
+ defer = TRUE;
+
+ set_carrier (NM_DEVICE_VLAN (device), FALSE, defer);
+ }
+}
+
+static void
+carrier_watch_init (NMDeviceVlan *self)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+
+ priv->monitor = nm_netlink_monitor_get ();
+ priv->link_connected_id = g_signal_connect (priv->monitor, "carrier-on",
+ G_CALLBACK (carrier_on),
+ self);
+ priv->link_disconnected_id = g_signal_connect (priv->monitor, "carrier-off",
+ G_CALLBACK (carrier_off),
+ self);
+
+ priv->carrier = get_carrier_sync (NM_DEVICE_VLAN (self));
+
+ nm_log_info (LOGD_HW | LOGD_DEVICE, "(%s): carrier is %s",
+ nm_device_get_iface (NM_DEVICE (self)),
+ priv->carrier ? "ON" : "OFF");
+
+ /* Request link state again just in case an error occurred getting the
+ * initial link state.
+ */
+ nm_netlink_monitor_request_status (priv->monitor);
+}
+
+/******************************************************************/
+
+static void
+parent_state_changed (NMDevice *parent,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason,
+ gpointer user_data)
+{
+ NMDeviceVlan *self = NM_DEVICE_VLAN (user_data);
+
+ if (new_state < NM_DEVICE_STATE_DISCONNECTED) {
+ /* If the parent becomes unavailable or unmanaged so does the VLAN */
+ nm_device_state_changed (NM_DEVICE (self), new_state, reason);
+ } else if ( new_state == NM_DEVICE_STATE_DISCONNECTED
+ && old_state < NM_DEVICE_STATE_DISCONNECTED) {
+ /* Mark VLAN interface as available/disconnected when the parent
+ * becomes available as a result of carrier changes or becoming
+ * initialized.
+ */
+ nm_device_state_changed (NM_DEVICE (self), new_state, reason);
+ }
+}
+
+/******************************************************************/
+
+NMDevice *
+nm_device_vlan_new (const char *udi, const char *iface, NMDevice *parent)
+{
+ NMDevice *device;
+
+ g_return_val_if_fail (udi != NULL, NULL);
+ g_return_val_if_fail (iface != NULL, NULL);
+ g_return_val_if_fail (parent != NULL, NULL);
+
+ device = (NMDevice *) g_object_new (NM_TYPE_DEVICE_VLAN,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, "8021q",
+ NM_DEVICE_TYPE_DESC, "VLAN",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_VLAN,
+ NULL);
+ if (device) {
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
+ int ifindex = nm_device_get_ifindex (device);
+ int parent_ifindex = -1, itype;
+ int vlan_id;
+
+ itype = nm_system_get_iface_type (ifindex, iface);
+ g_assert (itype == NM_IFACE_TYPE_VLAN);
+
+ if (!nm_system_get_iface_vlan_info (ifindex, &parent_ifindex, &vlan_id)) {
+ nm_log_warn (LOGD_DEVICE, "(%s): failed to get VLAN interface info.", iface);
+ g_object_unref (device);
+ return NULL;
+ }
+ priv->vlan_id = vlan_id;
+
+ if ( parent_ifindex < 0
+ || parent_ifindex != nm_device_get_ip_ifindex (parent)
+ || priv->vlan_id < 0) {
+ nm_log_warn (LOGD_DEVICE, "(%s): VLAN parent ifindex (%d) or VLAN ID (%d) invalid.",
+ iface, parent_ifindex, priv->vlan_id);
+ g_object_unref (device);
+ return NULL;
+ }
+
+ priv->parent = g_object_ref (parent);
+ priv->parent_state_id = g_signal_connect (priv->parent,
+ "state-changed",
+ G_CALLBACK (parent_state_changed),
+ device);
+
+ carrier_watch_init (NM_DEVICE_VLAN (device));
+
+ nm_log_dbg (LOGD_HW | LOGD_ETHER, "(%s): kernel ifindex %d", iface, ifindex);
+ nm_log_info (LOGD_HW | LOGD_ETHER, "(%s): VLAN ID %d with parent %s",
+ iface, priv->vlan_id, nm_device_get_iface (parent));
+ }
+
+ return device;
+}
+
+static void
+nm_device_vlan_init (NMDeviceVlan * self)
+{
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (object);
+ char *hwaddr;
+
+ switch (prop_id) {
+ case PROP_HW_ADDRESS:
+ hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, nm_utils_hwaddr_type (priv->hw_addr_len));
+ g_value_take_string (value, hwaddr);
+ break;
+ case PROP_CARRIER:
+ g_value_set_boolean (value, priv->carrier);
+ break;
+ case PROP_VLAN_ID:
+ g_value_set_uint (value, priv->vlan_id);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_VLAN_ID:
+ priv->vlan_id = g_value_get_uint (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceVlan *self = NM_DEVICE_VLAN (object);
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self);
+
+ if (priv->disposed) {
+ G_OBJECT_CLASS (nm_device_vlan_parent_class)->dispose (object);
+ return;
+ }
+ priv->disposed = TRUE;
+
+ if (priv->link_connected_id)
+ g_signal_handler_disconnect (priv->monitor, priv->link_connected_id);
+ if (priv->link_disconnected_id)
+ g_signal_handler_disconnect (priv->monitor, priv->link_disconnected_id);
+ carrier_action_defer_clear (self);
+
+ g_object_unref (priv->monitor);
+
+ g_signal_handler_disconnect (priv->parent, priv->parent_state_id);
+ g_object_unref (priv->parent);
+}
+
+static void
+nm_device_vlan_class_init (NMDeviceVlanClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceVlanPrivate));
+
+ /* virtual methods */
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+ object_class->dispose = dispose;
+
+ parent_class->get_generic_capabilities = real_get_generic_capabilities;
+ parent_class->update_hw_address = real_update_hw_address;
+ parent_class->hw_is_up = real_hw_is_up;
+ parent_class->hw_bring_up = real_hw_bring_up;
+ parent_class->hw_take_down = real_hw_take_down;
+ parent_class->can_interrupt_activation = real_can_interrupt_activation;
+ parent_class->is_available = real_is_available;
+
+ parent_class->get_best_auto_connection = real_get_best_auto_connection;
+ parent_class->check_connection_compatible = real_check_connection_compatible;
+ parent_class->complete_connection = real_complete_connection;
+ parent_class->spec_match_list = spec_match_list;
+ parent_class->connection_match_config = connection_match_config;
+
+ /* properties */
+ g_object_class_install_property
+ (object_class, PROP_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_VLAN_HW_ADDRESS,
+ "Active MAC Address",
+ "Currently set hardware MAC address",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_VLAN_CARRIER,
+ "Carrier",
+ "Carrier",
+ FALSE,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_VLAN_ID,
+ g_param_spec_uint (NM_DEVICE_VLAN_ID,
+ "VLAN ID",
+ "VLAN ID",
+ 0, 4095, 0,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ /* Signals */
+ signals[PROPERTIES_CHANGED] =
+ nm_properties_changed_signal_new (object_class,
+ G_STRUCT_OFFSET (NMDeviceVlanClass, properties_changed));
+
+ dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
+ &dbus_glib_nm_device_vlan_object_info);
+
+ dbus_g_error_domain_register (NM_VLAN_ERROR, NULL, NM_TYPE_VLAN_ERROR);
+}
diff --git a/src/nm-device-vlan.h b/src/nm-device-vlan.h
new file mode 100644
index 000000000..7c5fa24c9
--- /dev/null
+++ b/src/nm-device-vlan.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2012 Red Hat, Inc.
+ */
+
+#ifndef NM_DEVICE_VLAN_H
+#define NM_DEVICE_VLAN_H
+
+#include <glib-object.h>
+
+#include "nm-device-wired.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_VLAN (nm_device_vlan_get_type ())
+#define NM_DEVICE_VLAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_VLAN, NMDeviceVlan))
+#define NM_DEVICE_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_VLAN, NMDeviceVlanClass))
+#define NM_IS_DEVICE_VLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_VLAN))
+#define NM_IS_DEVICE_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_VLAN))
+#define NM_DEVICE_VLAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_VLAN, NMDeviceVlanClass))
+
+typedef enum {
+ NM_VLAN_ERROR_CONNECTION_NOT_VLAN = 0, /*< nick=ConnectionNotVlan >*/
+ NM_VLAN_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_VLAN_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+} NMVlanError;
+
+#define NM_DEVICE_VLAN_HW_ADDRESS "hw-address"
+#define NM_DEVICE_VLAN_CARRIER "carrier"
+#define NM_DEVICE_VLAN_ID "vlan-id"
+
+typedef struct {
+ NMDevice parent;
+} NMDeviceVlan;
+
+typedef struct {
+ NMDeviceClass parent;
+
+ /* Signals */
+ void (*properties_changed) (NMDeviceVlan *device, GHashTable *properties);
+} NMDeviceVlanClass;
+
+
+GType nm_device_vlan_get_type (void);
+
+NMDevice *nm_device_vlan_new (const char *udi,
+ const char *iface,
+ NMDevice *parent);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_VLAN_H */
diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c
index 9695c077d..ed964a576 100644
--- a/src/nm-device-wifi.c
+++ b/src/nm-device-wifi.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
@@ -25,7 +25,6 @@
#include <netinet/in.h>
#include <string.h>
#include <net/ethernet.h>
-#include <iwlib.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <signal.h>
@@ -34,11 +33,12 @@
#include <linux/ethtool.h>
#include <sys/ioctl.h>
#include <netinet/ether.h>
+#include <net/if.h>
+#include <errno.h>
#include "nm-glib-compat.h"
#include "nm-device.h"
#include "nm-device-wifi.h"
-#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-utils.h"
#include "nm-logging.h"
@@ -57,6 +57,8 @@
#include "nm-setting-ip6-config.h"
#include "nm-system.h"
#include "nm-settings-connection.h"
+#include "nm-enum-types.h"
+#include "wifi-utils.h"
static gboolean impl_device_get_access_points (NMDeviceWifi *device,
GPtrArray **aps,
@@ -72,10 +74,7 @@ static gboolean impl_device_get_access_points (NMDeviceWifi *device,
#define WIRELESS_SECRETS_TRIES "wireless-secrets-tries"
-static void device_interface_init (NMDeviceInterface *iface_class);
-
-G_DEFINE_TYPE_EXTENDED (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init))
+G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
#define NM_DEVICE_WIFI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIFI, NMDeviceWifiPrivate))
@@ -106,7 +105,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-#define SUP_SIG_ID_LEN 5
+#define SUP_SIG_ID_LEN 6
typedef struct Supplicant {
NMSupplicantManager *mgr;
@@ -132,12 +131,7 @@ struct _NMDeviceWifiPrivate {
guint ipw_rfkill_id;
RfKillState ipw_rfkill_state;
- GByteArray * ssid;
gint8 invalid_strength_counter;
- iwqual max_qual;
-
- gint8 num_freqs;
- guint32 freqs[IW_MAX_FREQUENCIES];
GSList * ap_list;
NMAccessPoint * current_ap;
@@ -147,20 +141,18 @@ struct _NMDeviceWifiPrivate {
glong scheduled_scan_time;
guint8 scan_interval; /* seconds */
guint pending_scan_id;
+ guint scanlist_cull_id;
Supplicant supplicant;
+ WifiData * wifi_data;
guint32 failed_link_count;
guint periodic_source_id;
guint link_timeout_id;
- /* Static options from driver */
- guint32 capabilities;
- gboolean has_scan_capa_ssid;
+ NMDeviceWifiCapabilities capabilities;
};
-static guint32 nm_device_wifi_get_frequency (NMDeviceWifi *self);
-
static gboolean request_wireless_scan (gpointer user_data);
static void schedule_scan (NMDeviceWifi *self, gboolean backoff);
@@ -178,9 +170,19 @@ static void supplicant_iface_state_cb (NMSupplicantInterface *iface,
gpointer user_data);
static void supplicant_iface_new_bss_cb (NMSupplicantInterface * iface,
+ const char *object_path,
GHashTable *properties,
NMDeviceWifi * self);
+static void supplicant_iface_bss_updated_cb (NMSupplicantInterface *iface,
+ const char *object_path,
+ GHashTable *properties,
+ NMDeviceWifi *self);
+
+static void supplicant_iface_bss_removed_cb (NMSupplicantInterface *iface,
+ const char *object_path,
+ NMDeviceWifi *self);
+
static void supplicant_iface_scan_done_cb (NMSupplicantInterface * iface,
gboolean success,
NMDeviceWifi * self);
@@ -189,21 +191,11 @@ static void supplicant_iface_notify_scanning_cb (NMSupplicantInterface * iface,
GParamSpec * pspec,
NMDeviceWifi * self);
-static guint32 nm_device_wifi_get_bitrate (NMDeviceWifi *self);
-
-static void cull_scan_list (NMDeviceWifi *self);
+static void schedule_scanlist_cull (NMDeviceWifi *self);
/*****************************************************************/
-typedef enum {
- NM_WIFI_ERROR_CONNECTION_NOT_WIRELESS = 0,
- NM_WIFI_ERROR_CONNECTION_INVALID,
- NM_WIFI_ERROR_CONNECTION_INCOMPATIBLE,
- NM_WIFI_ERROR_ACCESS_POINT_NOT_FOUND,
-} NMWifiError;
-
#define NM_WIFI_ERROR (nm_wifi_error_quark ())
-#define NM_TYPE_WIFI_ERROR (nm_wifi_error_get_type ())
static GQuark
nm_wifi_error_quark (void)
@@ -214,31 +206,6 @@ nm_wifi_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_wifi_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a wireless connection. */
- ENUM_ENTRY (NM_WIFI_ERROR_CONNECTION_NOT_WIRELESS, "ConnectionNotWireless"),
- /* Connection was not a valid wireless connection. */
- ENUM_ENTRY (NM_WIFI_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_WIFI_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- /* Given access point was not in this device's scan list. */
- ENUM_ENTRY (NM_WIFI_ERROR_ACCESS_POINT_NOT_FOUND, "AccessPointNotFound"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMWifiError", values);
- }
- return etype;
-}
-
/*****************************************************************/
/* IPW rfkill handling (until 2.6.33) */
@@ -301,319 +268,12 @@ ipw_rfkill_state_work (gpointer user_data)
/*****************************************************************/
-/*
- * wireless_qual_to_percent
- *
- * Convert an iw_quality structure from SIOCGIWSTATS into a magical signal
- * strength percentage.
- *
- */
-static int
-wireless_qual_to_percent (const struct iw_quality *qual,
- const struct iw_quality *max_qual)
-{
- int percent = -1;
- int level_percent = -1;
-
- g_return_val_if_fail (qual != NULL, -1);
- g_return_val_if_fail (max_qual != NULL, -1);
-
- nm_log_dbg (LOGD_WIFI,
- "QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X",
- (__s8) qual->qual, qual->qual, qual->qual,
- (__s8) qual->level, qual->level, qual->level,
- (__s8) qual->noise, qual->noise, qual->noise,
- qual->updated,
- (__s8) max_qual->qual, max_qual->qual, max_qual->qual,
- (__s8) max_qual->level, max_qual->level, max_qual->level,
- (__s8) max_qual->noise, max_qual->noise, max_qual->noise,
- max_qual->updated);
-
- /* Try using the card's idea of the signal quality first as long as it tells us what the max quality is.
- * Drivers that fill in quality values MUST treat them as percentages, ie the "Link Quality" MUST be
- * bounded by 0 and max_qual->qual, and MUST change in a linear fashion. Within those bounds, drivers
- * are free to use whatever they want to calculate "Link Quality".
- */
- if ((max_qual->qual != 0) && !(max_qual->updated & IW_QUAL_QUAL_INVALID) && !(qual->updated & IW_QUAL_QUAL_INVALID))
- percent = (int)(100 * ((double)qual->qual / (double)max_qual->qual));
-
- /* If the driver doesn't specify a complete and valid quality, we have two options:
- *
- * 1) dBm: driver must specify max_qual->level = 0, and have valid values for
- * qual->level and (qual->noise OR max_qual->noise)
- * 2) raw RSSI: driver must specify max_qual->level > 0, and have valid values for
- * qual->level and max_qual->level
- *
- * This is the WEXT spec. If this interpretation is wrong, I'll fix it. Otherwise,
- * If drivers don't conform to it, they are wrong and need to be fixed.
- */
-
- if ( (max_qual->level == 0) && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level == 0 */
- && !(qual->updated & IW_QUAL_LEVEL_INVALID) /* Must have valid qual->level */
- && ( ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID)) /* Must have valid max_qual->noise */
- || ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))) /* OR valid qual->noise */
- ) {
- /* Absolute power values (dBm) */
-
- /* Reasonable fallbacks for dumb drivers that don't specify either level. */
- #define FALLBACK_NOISE_FLOOR_DBM -90
- #define FALLBACK_SIGNAL_MAX_DBM -20
- int max_level = FALLBACK_SIGNAL_MAX_DBM;
- int noise = FALLBACK_NOISE_FLOOR_DBM;
- int level = qual->level - 0x100;
-
- level = CLAMP (level, FALLBACK_NOISE_FLOOR_DBM, FALLBACK_SIGNAL_MAX_DBM);
-
- if ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))
- noise = qual->noise - 0x100;
- else if ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID))
- noise = max_qual->noise - 0x100;
- noise = CLAMP (noise, FALLBACK_NOISE_FLOOR_DBM, FALLBACK_SIGNAL_MAX_DBM);
-
- /* A sort of signal-to-noise ratio calculation */
- level_percent = (int)(100 - 70 *(
- ((double)max_level - (double)level) /
- ((double)max_level - (double)noise)));
- nm_log_dbg (LOGD_WIFI, "QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.",
- level_percent, max_level, level, noise);
- } else if ( (max_qual->level != 0)
- && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level as upper bound */
- && !(qual->updated & IW_QUAL_LEVEL_INVALID)) {
- /* Relative power values (RSSI) */
-
- int level = qual->level;
-
- /* Signal level is relavtive (0 -> max_qual->level) */
- level = CLAMP (level, 0, max_qual->level);
- level_percent = (int)(100 * ((double)level / (double)max_qual->level));
- nm_log_dbg (LOGD_WIFI, "QL2: level_percent is %d. max_level %d, level %d.",
- level_percent, max_qual->level, level);
- } else if (percent == -1) {
- nm_log_dbg (LOGD_WIFI, "QL: Could not get quality %% value from driver. Driver is probably buggy.");
- }
-
- /* If the quality percent was 0 or doesn't exist, then try to use signal levels instead */
- if ((percent < 1) && (level_percent >= 0))
- percent = level_percent;
-
- nm_log_dbg (LOGD_WIFI, "QL: Final quality percent is %d (%d).",
- percent, CLAMP (percent, 0, 100));
- return (CLAMP (percent, 0, 100));
-}
-
-
-/*
- * nm_device_wifi_update_signal_strength
- *
- * Update the device's idea of the strength of its connection to the
- * current access point.
- *
- */
-static void
-nm_device_wifi_update_signal_strength (NMDeviceWifi *self,
- NMAccessPoint *ap)
-{
- NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
- const char *iface = nm_device_get_iface (NM_DEVICE (self));
- int fd, percent = -1;
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd >= 0) {
- struct iwreq wrq;
- struct iw_statistics stats;
-
- memset (&stats, 0, sizeof (stats));
-
- wrq.u.data.pointer = &stats;
- wrq.u.data.length = sizeof (stats);
- wrq.u.data.flags = 1; /* Clear updated flag */
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
-
- if (ioctl (fd, SIOCGIWSTATS, &wrq) == 0)
- percent = wireless_qual_to_percent (&stats.qual, &priv->max_qual);
- close (fd);
- }
-
- /* Try to smooth out the strength. Atmel cards, for example, will give no strength
- * one second and normal strength the next.
- */
- if (percent >= 0 || ++priv->invalid_strength_counter > 3) {
- nm_ap_set_strength (ap, (gint8) percent);
- priv->invalid_strength_counter = 0;
- }
-}
-
-
-static gboolean
-wireless_get_range (NMDeviceWifi *self,
- struct iw_range *range,
- guint32 *response_len)
-{
- int fd, i = 26;
- gboolean success = FALSE;
- const char *iface;
- struct iwreq wrq;
-
- g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), FALSE);
- g_return_val_if_fail (range != NULL, FALSE);
-
- iface = nm_device_get_iface (NM_DEVICE (self));
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- nm_log_err (LOGD_HW, "(%s): couldn't open control socket.", iface);
- return FALSE;
- }
-
- memset (&wrq, 0, sizeof (struct iwreq));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
- wrq.u.data.pointer = (caddr_t) range;
- wrq.u.data.length = sizeof (struct iw_range);
-
- /* Need to give some drivers time to recover after suspend/resume
- * (ex ipw3945 takes a few seconds to talk to its regulatory daemon;
- * see rh bz#362421)
- */
- while (i-- > 0) {
- if (ioctl (fd, SIOCGIWRANGE, &wrq) == 0) {
- if (response_len)
- *response_len = wrq.u.data.length;
- success = TRUE;
- break;
- } else if (errno != EAGAIN) {
- nm_log_err (LOGD_HW | LOGD_WIFI,
- "(%s): couldn't get driver range information (%d).",
- iface, errno);
- break;
- }
-
- g_usleep (G_USEC_PER_SEC / 4);
- }
-
- if (i <= 0) {
- nm_log_warn (LOGD_HW | LOGD_WIFI,
- "(%s): driver took too long to respond to IWRANGE query.",
- iface);
- }
-
- close (fd);
- return success;
-}
-
static guint32
real_get_generic_capabilities (NMDevice *dev)
{
- int fd, err;
- guint32 caps = NM_DEVICE_CAP_NONE;
- struct iwreq wrq;
- const char *iface = nm_device_get_iface (dev);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- nm_log_err (LOGD_HW, "(%s): couldn't open control socket.", iface);
- return NM_DEVICE_CAP_NONE;
- }
-
- /* Cards that don't scan aren't supported */
- memset (&wrq, 0, sizeof (struct iwreq));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
- err = ioctl (fd, SIOCSIWSCAN, &wrq);
- close (fd);
- if ((err < 0) && (errno == EOPNOTSUPP))
- caps = NM_DEVICE_CAP_NONE;
- else
- caps |= NM_DEVICE_CAP_NM_SUPPORTED;
-
- return caps;
-}
-
-#define WPA_CAPS (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | \
- NM_WIFI_DEVICE_CAP_CIPHER_CCMP | \
- NM_WIFI_DEVICE_CAP_WPA | \
- NM_WIFI_DEVICE_CAP_RSN)
-
-static guint32
-get_wireless_capabilities (NMDeviceWifi *self, iwrange *range)
-{
- guint32 caps = NM_WIFI_DEVICE_CAP_NONE;
- const char * iface;
-
- g_return_val_if_fail (self != NULL, NM_WIFI_DEVICE_CAP_NONE);
- g_return_val_if_fail (range != NULL, NM_WIFI_DEVICE_CAP_NONE);
-
- iface = nm_device_get_iface (NM_DEVICE (self));
-
- /* All drivers should support WEP by default */
- caps |= NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104;
-
- if (range->enc_capa & IW_ENC_CAPA_CIPHER_TKIP)
- caps |= NM_WIFI_DEVICE_CAP_CIPHER_TKIP;
-
- if (range->enc_capa & IW_ENC_CAPA_CIPHER_CCMP)
- caps |= NM_WIFI_DEVICE_CAP_CIPHER_CCMP;
-
- if (range->enc_capa & IW_ENC_CAPA_WPA)
- caps |= NM_WIFI_DEVICE_CAP_WPA;
-
- if (range->enc_capa & IW_ENC_CAPA_WPA2)
- caps |= NM_WIFI_DEVICE_CAP_RSN;
-
- /* Check for cipher support but not WPA support */
- if ( (caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
- && !(caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))) {
- nm_log_warn (LOGD_WIFI, "%s: device supports WPA ciphers but not WPA protocol; "
- "WPA unavailable.", iface);
- caps &= ~WPA_CAPS;
- }
-
- /* Check for WPA support but not cipher support */
- if ( (caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))
- && !(caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))) {
- nm_log_warn (LOGD_WIFI, "%s: device supports WPA protocol but not WPA ciphers; "
- "WPA unavailable.", iface);
- caps &= ~WPA_CAPS;
- }
-
- return caps;
-}
-
-
-static guint32 iw_freq_to_uint32 (struct iw_freq *freq)
-{
- if (freq->e == 0) {
- /* Some drivers report channel not frequency. Convert to a
- * frequency; but this assumes that the device is in b/g mode.
- */
- if ((freq->m >= 1) && (freq->m <= 13))
- return 2407 + (5 * freq->m);
- else if (freq->m == 14)
- return 2484;
- }
-
- return (guint32) (((double) freq->m) * pow (10, freq->e) / 1000000);
+ return NM_DEVICE_CAP_NM_SUPPORTED;
}
-
-/* Until a new wireless-tools comes out that has the defs and the structure,
- * need to copy them here.
- */
-/* Scan capability flags - in (struct iw_range *)->scan_capa */
-#define NM_IW_SCAN_CAPA_NONE 0x00
-#define NM_IW_SCAN_CAPA_ESSID 0x01
-
-struct iw_range_with_scan_capa
-{
- guint32 throughput;
- guint32 min_nwid;
- guint32 max_nwid;
- guint16 old_num_channels;
- guint8 old_num_frequency;
-
- guint8 scan_capa;
-/* don't need the rest... */
-};
-
-
static GObject*
constructor (GType type,
guint n_construct_params,
@@ -623,11 +283,6 @@ constructor (GType type,
GObjectClass *klass;
NMDeviceWifi *self;
NMDeviceWifiPrivate *priv;
- struct iw_range range;
- struct iw_range_with_scan_capa *scan_capa_range;
- guint32 response_len = 0;
- gboolean success;
- int i;
klass = G_OBJECT_CLASS (nm_device_wifi_parent_class);
object = klass->constructor (type, n_construct_params, construct_params);
@@ -641,52 +296,22 @@ constructor (GType type,
nm_device_get_iface (NM_DEVICE (self)),
nm_device_get_ifindex (NM_DEVICE (self)));
- memset (&range, 0, sizeof (struct iw_range));
- success = wireless_get_range (NM_DEVICE_WIFI (object), &range, &response_len);
- if (!success) {
- nm_log_info (LOGD_HW | LOGD_WIFI, "(%s): driver WEXT range request failed",
+ priv->wifi_data = wifi_utils_init (nm_device_get_iface (NM_DEVICE (self)),
+ nm_device_get_ifindex (NM_DEVICE (self)),
+ TRUE);
+ if (priv->wifi_data == NULL) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s): failed to initialize WiFi driver",
nm_device_get_iface (NM_DEVICE (self)));
- goto error;
- }
-
- if ((response_len < 300) || (range.we_version_compiled < 21)) {
- nm_log_info (LOGD_HW | LOGD_WIFI,
- "(%s): driver WEXT version too old (got %d, expected >= 21)",
- nm_device_get_iface (NM_DEVICE (self)),
- range.we_version_compiled);
- goto error;
+ g_object_unref (object);
+ return NULL;
}
+ priv->capabilities = wifi_utils_get_caps (priv->wifi_data);
- priv->max_qual.qual = range.max_qual.qual;
- priv->max_qual.level = range.max_qual.level;
- priv->max_qual.noise = range.max_qual.noise;
- priv->max_qual.updated = range.max_qual.updated;
-
- priv->num_freqs = MIN (range.num_frequency, IW_MAX_FREQUENCIES);
- for (i = 0; i < priv->num_freqs; i++)
- priv->freqs[i] = iw_freq_to_uint32 (&range.freq[i]);
-
- /* Check for the ability to scan specific SSIDs. Until the scan_capa
- * field gets added to wireless-tools, need to work around that by casting
- * to the custom structure.
- */
- scan_capa_range = (struct iw_range_with_scan_capa *) &range;
- if (scan_capa_range->scan_capa & NM_IW_SCAN_CAPA_ESSID) {
- priv->has_scan_capa_ssid = TRUE;
- nm_log_info (LOGD_HW | LOGD_WIFI,
- "(%s): driver supports SSID scans (scan_capa 0x%02X).",
- nm_device_get_iface (NM_DEVICE (self)),
- scan_capa_range->scan_capa);
- } else {
- nm_log_info (LOGD_HW | LOGD_WIFI,
- "(%s): driver does not support SSID scans (scan_capa 0x%02X).",
- nm_device_get_iface (NM_DEVICE (self)),
- scan_capa_range->scan_capa);
+ if (priv->capabilities & NM_WIFI_DEVICE_CAP_AP) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s): driver supports Access Point (AP) mode",
+ nm_device_get_iface (NM_DEVICE (self)));
}
- /* 802.11 wireless-specific capabilities */
- priv->capabilities = get_wireless_capabilities (self, &range);
-
/* Connect to the supplicant manager */
priv->supplicant.mgr = nm_supplicant_manager_get ();
g_assert (priv->supplicant.mgr);
@@ -708,10 +333,6 @@ constructor (GType type,
priv->ipw_rfkill_state = nm_device_wifi_get_ipw_rfkill_state (self);
return object;
-
-error:
- g_object_unref (object);
- return NULL;
}
static gboolean
@@ -748,6 +369,18 @@ supplicant_interface_acquire (NMDeviceWifi *self)
priv->supplicant.sig_ids[i++] = id;
id = g_signal_connect (priv->supplicant.iface,
+ NM_SUPPLICANT_INTERFACE_BSS_UPDATED,
+ G_CALLBACK (supplicant_iface_bss_updated_cb),
+ self);
+ priv->supplicant.sig_ids[i++] = id;
+
+ id = g_signal_connect (priv->supplicant.iface,
+ NM_SUPPLICANT_INTERFACE_BSS_REMOVED,
+ G_CALLBACK (supplicant_iface_bss_removed_cb),
+ self);
+ priv->supplicant.sig_ids[i++] = id;
+
+ id = g_signal_connect (priv->supplicant.iface,
NM_SUPPLICANT_INTERFACE_SCAN_DONE,
G_CALLBACK (supplicant_iface_scan_done_cb),
self);
@@ -808,6 +441,11 @@ supplicant_interface_release (NMDeviceWifi *self)
}
memset (priv->supplicant.sig_ids, 0, sizeof (priv->supplicant.sig_ids));
+ if (priv->scanlist_cull_id) {
+ g_source_remove (priv->scanlist_cull_id);
+ priv->scanlist_cull_id = 0;
+ }
+
if (priv->supplicant.iface) {
/* Tell the supplicant to disconnect from the current AP */
nm_supplicant_interface_disconnect (priv->supplicant.iface);
@@ -817,7 +455,6 @@ supplicant_interface_release (NMDeviceWifi *self)
}
}
-
static NMAccessPoint *
get_ap_by_path (NMDeviceWifi *self, const char *path)
{
@@ -825,7 +462,20 @@ get_ap_by_path (NMDeviceWifi *self, const char *path)
GSList *iter;
for (iter = priv->ap_list; iter; iter = g_slist_next (iter)) {
- if (strcmp (path, nm_ap_get_dbus_path (NM_AP (iter->data))) == 0)
+ if (g_strcmp0 (path, nm_ap_get_dbus_path (NM_AP (iter->data))) == 0)
+ return NM_AP (iter->data);
+ }
+ return NULL;
+}
+
+static NMAccessPoint *
+get_ap_by_supplicant_path (NMDeviceWifi *self, const char *path)
+{
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
+ GSList *iter;
+
+ for (iter = priv->ap_list; iter && path; iter = g_slist_next (iter)) {
+ if (g_strcmp0 (path, nm_ap_get_supplicant_path (NM_AP (iter->data))) == 0)
return NM_AP (iter->data);
}
return NULL;
@@ -839,16 +489,16 @@ get_active_ap (NMDeviceWifi *self,
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
const char *iface = nm_device_get_iface (NM_DEVICE (self));
struct ether_addr bssid;
- const GByteArray *ssid;
+ GByteArray *ssid;
GSList *iter;
int i = 0;
- NMAccessPoint *match_nofreq = NULL;
+ NMAccessPoint *match_nofreq = NULL, *active_ap = NULL;
gboolean found_a_band = FALSE;
gboolean found_bg_band = FALSE;
NM80211Mode devmode;
guint32 devfreq;
- nm_device_wifi_get_bssid (self, &bssid);
+ wifi_utils_get_bssid (priv->wifi_data, &bssid);
nm_log_dbg (LOGD_WIFI, "(%s): active BSSID: %02x:%02x:%02x:%02x:%02x:%02x",
iface,
bssid.ether_addr_octet[0], bssid.ether_addr_octet[1],
@@ -858,15 +508,15 @@ get_active_ap (NMDeviceWifi *self,
if (!nm_ethernet_address_is_valid (&bssid))
return NULL;
- ssid = nm_device_wifi_get_ssid (self);
+ ssid = wifi_utils_get_ssid (priv->wifi_data);
nm_log_dbg (LOGD_WIFI, "(%s): active SSID: %s%s%s",
iface,
ssid ? "'" : "",
ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)",
ssid ? "'" : "");
- devmode = nm_device_wifi_get_mode (self);
- devfreq = nm_device_wifi_get_frequency (self);
+ devmode = wifi_utils_get_mode (priv->wifi_data);
+ devfreq = wifi_utils_get_freq (priv->wifi_data);
/* When matching hidden APs, do a second pass that ignores the SSID check,
* because NM might not yet know the SSID of the hidden AP in the scan list
@@ -930,7 +580,8 @@ get_active_ap (NMDeviceWifi *self,
// FIXME: handle security settings here too
nm_log_dbg (LOGD_WIFI, " matched");
- return ap;
+ active_ap = ap;
+ goto done;
}
}
@@ -943,9 +594,10 @@ get_active_ap (NMDeviceWifi *self,
* is uncommon though, and the frequency check penalizes closed drivers we
* can't fix. Because we're not total dicks, ignore the frequency condition
* if the associated BSSID/SSID exists only in one band since that's most
- * likely the AP we want.
+ * likely the AP we want. Sometimes wl.o returns a frequency of 0, so if
+ * we can't match the AP based on frequency at all, just give up.
*/
- if (match_nofreq && (found_a_band != found_bg_band)) {
+ if (match_nofreq && ((found_a_band != found_bg_band) || (devfreq == 0))) {
const struct ether_addr *ap_bssid = nm_ap_get_address (match_nofreq);
const GByteArray *ap_ssid = nm_ap_get_ssid (match_nofreq);
@@ -957,11 +609,15 @@ get_active_ap (NMDeviceWifi *self,
ap_bssid->ether_addr_octet[2], ap_bssid->ether_addr_octet[3],
ap_bssid->ether_addr_octet[4], ap_bssid->ether_addr_octet[5]);
- return match_nofreq;
+ active_ap = match_nofreq;
}
nm_log_dbg (LOGD_WIFI, " No matching AP found.");
- return NULL;
+
+done:
+ if (ssid)
+ g_byte_array_free (ssid, TRUE);
+ return active_ap;
}
static void
@@ -1038,7 +694,7 @@ periodic_update (NMDeviceWifi *self)
{
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMAccessPoint *new_ap;
- guint32 new_rate;
+ guint32 new_rate, percent;
/* In IBSS mode, most newer firmware/drivers do "BSS coalescing" where
* multiple IBSS stations using the same SSID will eventually switch to
@@ -1051,7 +707,7 @@ periodic_update (NMDeviceWifi *self)
if (priv->current_ap && (nm_ap_get_mode (priv->current_ap) == NM_802_11_MODE_ADHOC)) {
struct ether_addr bssid = { {0x0, 0x0, 0x0, 0x0, 0x0, 0x0} };
- nm_device_wifi_get_bssid (self, &bssid);
+ wifi_utils_get_bssid (priv->wifi_data, &bssid);
/* 0x02 means "locally administered" and should be OR-ed into
* the first byte of IBSS BSSIDs.
*/
@@ -1061,8 +717,16 @@ periodic_update (NMDeviceWifi *self)
}
new_ap = get_active_ap (self, NULL, FALSE);
- if (new_ap)
- nm_device_wifi_update_signal_strength (self, new_ap);
+ if (new_ap) {
+ /* Try to smooth out the strength. Atmel cards, for example, will give no strength
+ * one second and normal strength the next.
+ */
+ percent = wifi_utils_get_qual (priv->wifi_data);
+ if (percent >= 0 || ++priv->invalid_strength_counter > 3) {
+ nm_ap_set_strength (new_ap, (gint8) percent);
+ priv->invalid_strength_counter = 0;
+ }
+ }
if ((new_ap || priv->current_ap) && (new_ap != priv->current_ap)) {
const struct ether_addr *new_bssid = NULL;
@@ -1073,13 +737,13 @@ periodic_update (NMDeviceWifi *self)
if (new_ap) {
new_bssid = nm_ap_get_address (new_ap);
- new_addr = nm_ether_ntop (new_bssid);
+ new_addr = nm_utils_hwaddr_ntoa (new_bssid, ARPHRD_ETHER);
new_ssid = nm_ap_get_ssid (new_ap);
}
if (priv->current_ap) {
old_bssid = nm_ap_get_address (priv->current_ap);
- old_addr = nm_ether_ntop (old_bssid);
+ old_addr = nm_utils_hwaddr_ntoa (old_bssid, ARPHRD_ETHER);
old_ssid = nm_ap_get_ssid (priv->current_ap);
}
@@ -1095,7 +759,7 @@ periodic_update (NMDeviceWifi *self)
set_current_ap (self, new_ap);
}
- new_rate = nm_device_wifi_get_bitrate (self);
+ new_rate = wifi_utils_get_rate (priv->wifi_data);
if (new_rate != priv->rate) {
priv->rate = new_rate;
g_object_notify (G_OBJECT (self), NM_DEVICE_WIFI_BITRATE);
@@ -1305,7 +969,37 @@ real_deactivate (NMDevice *dev)
/* Ensure we're in infrastructure mode after deactivation; some devices
* (usually older ones) don't scan well in adhoc mode.
*/
- nm_device_wifi_set_mode (self, NM_802_11_MODE_INFRA);
+ wifi_utils_set_mode (priv->wifi_data, NM_802_11_MODE_INFRA);
+}
+
+static gboolean
+is_adhoc_wpa (NMConnection *connection)
+{
+ NMSettingWireless *s_wifi;
+ NMSettingWirelessSecurity *s_wsec;
+ const char *mode, *key_mgmt;
+
+ /* The kernel doesn't support Ad-Hoc WPA connections well at this time,
+ * and turns them into open networks. It's been this way since at least
+ * 2.6.30 or so; until that's fixed, disable WPA-protected Ad-Hoc networks.
+ */
+
+ s_wifi = nm_connection_get_setting_wireless (connection);
+ g_return_val_if_fail (s_wifi != NULL, FALSE);
+
+ mode = nm_setting_wireless_get_mode (s_wifi);
+ if (g_strcmp0 (mode, NM_SETTING_WIRELESS_MODE_ADHOC) != 0)
+ return FALSE;
+
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
+ if (!s_wsec)
+ return FALSE;
+
+ key_mgmt = nm_setting_wireless_security_get_key_mgmt (s_wsec);
+ if (g_strcmp0 (key_mgmt, "wpa-none") != 0)
+ return FALSE;
+
+ return TRUE;
}
static gboolean
@@ -1320,7 +1014,15 @@ real_check_connection_compatible (NMDevice *device,
const GByteArray *mac;
const GSList *mac_blacklist, *mac_blacklist_iter;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ if (is_adhoc_wpa (connection)) {
+ g_set_error_literal (error,
+ NM_WIFI_ERROR,
+ NM_WIFI_ERROR_CONNECTION_INCOMPATIBLE,
+ "WPA Ad-Hoc disabled due to kernel bugs");
+ return FALSE;
+ }
+
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRELESS_SETTING_NAME)) {
@@ -1330,7 +1032,7 @@ real_check_connection_compatible (NMDevice *device,
return FALSE;
}
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
if (!s_wireless) {
g_set_error (error,
NM_WIFI_ERROR, NM_WIFI_ERROR_CONNECTION_INVALID,
@@ -1525,6 +1227,18 @@ real_complete_connection (NMDevice *device,
return FALSE;
}
+ /* The kernel doesn't support Ad-Hoc WPA connections well at this time,
+ * and turns them into open networks. It's been this way since at least
+ * 2.6.30 or so; until that's fixed, disable WPA-protected Ad-Hoc networks.
+ */
+ if (is_adhoc_wpa (connection)) {
+ g_set_error_literal (error,
+ NM_SETTING_WIRELESS_ERROR,
+ NM_SETTING_WIRELESS_ERROR_INVALID_PROPERTY,
+ "WPA Ad-Hoc disabled due to kernel bugs");
+ return FALSE;
+ }
+
g_assert (ssid);
str_ssid = nm_utils_ssid_to_utf8 (ssid);
format = g_strdup_printf ("%s %%d", str_ssid);
@@ -1552,8 +1266,11 @@ real_complete_connection (NMDevice *device,
GByteArray *mac;
const guint8 null_mac[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
- /* Lock the connection to this device by default */
- if (memcmp (priv->perm_hw_addr, null_mac, ETH_ALEN)) {
+ /* Lock the connection to this device by default if it uses a
+ * permanent MAC address (ie not a 'locally administered' one)
+ */
+ if ( !(priv->perm_hw_addr[0] & 0x02)
+ && memcmp (priv->perm_hw_addr, null_mac, ETH_ALEN)) {
mac = g_byte_array_sized_new (ETH_ALEN);
g_byte_array_append (mac, priv->perm_hw_addr, ETH_ALEN);
g_object_set (G_OBJECT (s_wifi), NM_SETTING_WIRELESS_MAC_ADDRESS, mac, NULL);
@@ -1614,7 +1331,7 @@ real_get_best_auto_connection (NMDevice *dev,
NMSettingIP4Config *s_ip4;
const char *method = NULL;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (s_con == NULL)
continue;
if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRELESS_SETTING_NAME))
@@ -1622,7 +1339,7 @@ real_get_best_auto_connection (NMDevice *dev,
if (!nm_setting_connection_get_autoconnect (s_con))
continue;
- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
if (!s_wireless)
continue;
@@ -1650,7 +1367,7 @@ real_get_best_auto_connection (NMDevice *dev,
continue;
/* Use the connection if it's a shared connection */
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
method = nm_setting_ip4_config_get_method (s_ip4);
@@ -1725,251 +1442,6 @@ impl_device_get_access_points (NMDeviceWifi *self,
return TRUE;
}
-/*
- * nm_device_get_mode
- *
- * Get managed/infrastructure/adhoc mode on a device
- *
- */
-NM80211Mode
-nm_device_wifi_get_mode (NMDeviceWifi *self)
-{
- int fd;
- NM80211Mode mode = NM_802_11_MODE_UNKNOWN;
- const char *iface;
- struct iwreq wrq;
-
- g_return_val_if_fail (self != NULL, NM_802_11_MODE_UNKNOWN);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0)
- goto out;
-
- memset (&wrq, 0, sizeof (struct iwreq));
- iface = nm_device_get_iface (NM_DEVICE (self));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
-
- if (ioctl (fd, SIOCGIWMODE, &wrq) == 0) {
- switch (wrq.u.mode) {
- case IW_MODE_ADHOC:
- mode = NM_802_11_MODE_ADHOC;
- break;
- case IW_MODE_INFRA:
- mode = NM_802_11_MODE_INFRA;
- break;
- default:
- break;
- }
- } else {
- if (errno != ENODEV)
- nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s): error %d getting card mode", iface, errno);
- }
- close (fd);
-
-out:
- return mode;
-}
-
-
-/*
- * nm_device_wifi_set_mode
- *
- * Set managed/infrastructure/adhoc mode on a device
- *
- */
-gboolean
-nm_device_wifi_set_mode (NMDeviceWifi *self, const NM80211Mode mode)
-{
- int fd;
- const char *iface;
- gboolean success = FALSE;
- struct iwreq wrq;
-
- g_return_val_if_fail (self != NULL, FALSE);
- g_return_val_if_fail ((mode == NM_802_11_MODE_INFRA) || (mode == NM_802_11_MODE_ADHOC), FALSE);
-
- if (nm_device_wifi_get_mode (self) == mode)
- return TRUE;
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0)
- goto out;
-
- memset (&wrq, 0, sizeof (struct iwreq));
- switch (mode) {
- case NM_802_11_MODE_ADHOC:
- wrq.u.mode = IW_MODE_ADHOC;
- break;
- case NM_802_11_MODE_INFRA:
- wrq.u.mode = IW_MODE_INFRA;
- break;
- default:
- goto out;
- }
-
- iface = nm_device_get_iface (NM_DEVICE (self));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
-
- if (ioctl (fd, SIOCSIWMODE, &wrq) < 0) {
- if (errno != ENODEV)
- nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): error setting mode %d", iface, mode);
- } else
- success = TRUE;
- close (fd);
-
-out:
- return success;
-}
-
-
-/*
- * nm_device_wifi_get_frequency
- *
- * Get current frequency
- *
- */
-static guint32
-nm_device_wifi_get_frequency (NMDeviceWifi *self)
-{
- int fd;
- guint32 freq = 0;
- const char *iface;
- struct iwreq wrq;
-
- g_return_val_if_fail (self != NULL, 0);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0)
- return 0;
-
- memset (&wrq, 0, sizeof (struct iwreq));
- iface = nm_device_get_iface (NM_DEVICE (self));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
-
- if (ioctl (fd, SIOCGIWFREQ, &wrq) < 0) {
- nm_log_warn (LOGD_HW | LOGD_WIFI,
- "(%s): error getting frequency: %s",
- iface, strerror (errno));
- } else
- freq = iw_freq_to_uint32 (&wrq.u.freq);
-
- close (fd);
- return freq;
-}
-
-/*
- * nm_device_wifi_get_ssid
- *
- * If a device is wireless, return the ssid that it is attempting
- * to use.
- */
-const GByteArray *
-nm_device_wifi_get_ssid (NMDeviceWifi *self)
-{
- NMDeviceWifiPrivate *priv;
- int sk;
- struct iwreq wrq;
- char ssid[IW_ESSID_MAX_SIZE + 2];
- guint32 len;
-
- g_return_val_if_fail (self != NULL, NULL);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
-
- sk = socket (AF_INET, SOCK_DGRAM, 0);
- if (sk == -1) {
- nm_log_err (LOGD_HW, "couldn't create socket: %d.", errno);
- return NULL;
- }
-
- memset (ssid, 0, sizeof (ssid));
- wrq.u.essid.pointer = (caddr_t) &ssid;
- wrq.u.essid.length = sizeof (ssid);
- wrq.u.essid.flags = 0;
- strncpy (wrq.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ);
-
- if (ioctl (sk, SIOCGIWESSID, &wrq) < 0) {
- nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): couldn't get SSID: %d",
- nm_device_get_iface (NM_DEVICE (self)), errno);
- goto out;
- }
-
- if (priv->ssid) {
- g_byte_array_free (priv->ssid, TRUE);
- priv->ssid = NULL;
- }
-
- len = wrq.u.essid.length;
- if (!nm_utils_is_empty_ssid ((guint8 *) ssid, len)) {
- priv->ssid = g_byte_array_sized_new (len);
- g_byte_array_append (priv->ssid, (const guint8 *) ssid, len);
- }
-
-out:
- close (sk);
- return priv->ssid;
-}
-
-
-/*
- * nm_device_wifi_get_bitrate
- *
- * For wireless devices, get the bitrate to broadcast/receive at.
- * Returned value is rate in Kb/s.
- *
- */
-static guint32
-nm_device_wifi_get_bitrate (NMDeviceWifi *self)
-{
- int err = -1, fd;
- struct iwreq wrq;
-
- g_return_val_if_fail (self != NULL, 0);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0)
- return 0;
-
- memset (&wrq, 0, sizeof (wrq));
- strncpy (wrq.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ);
- err = ioctl (fd, SIOCGIWRATE, &wrq);
- close (fd);
-
- return ((err == 0) ? wrq.u.bitrate.value / 1000 : 0);
-}
-
-/*
- * nm_device_get_bssid
- *
- * If a device is wireless, get the access point's ethernet address
- * that the card is associated with.
- */
-void
-nm_device_wifi_get_bssid (NMDeviceWifi *self,
- struct ether_addr *bssid)
-{
- int fd;
- struct iwreq wrq;
-
- g_return_if_fail (self != NULL);
- g_return_if_fail (bssid != NULL);
-
- memset (bssid, 0, sizeof (struct ether_addr));
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- nm_log_err (LOGD_WIFI, "failed to open control socket.");
- return;
- }
-
- memset (&wrq, 0, sizeof (wrq));
- strncpy (wrq.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ);
- if (ioctl (fd, SIOCGIWAP, &wrq) == 0)
- memcpy (bssid->ether_addr_octet, &(wrq.u.ap_addr.sa_data), ETH_ALEN);
-
- close (fd);
-}
-
-
static gboolean
scanning_allowed (NMDeviceWifi *self)
{
@@ -2020,7 +1492,7 @@ scanning_allowed (NMDeviceWifi *self)
/* Don't scan when a shared connection is active; it makes drivers mad */
connection = nm_act_request_get_connection (req);
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
ip4_method = nm_setting_ip4_config_get_method (s_ip4);
@@ -2031,7 +1503,7 @@ scanning_allowed (NMDeviceWifi *self)
* intra-ESS roaming (which requires periodic scanning) isn't being
* used due to the specific AP lock. (bgo #513820)
*/
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
g_assert (s_wifi);
bssid = nm_setting_wireless_get_bssid (s_wifi);
if (bssid && bssid->len == ETH_ALEN)
@@ -2174,15 +1646,10 @@ supplicant_iface_scan_done_cb (NMSupplicantInterface *iface,
if (check_scanning_allowed (self))
schedule_scan (self, TRUE);
-#if 0
- if (num_results == 0) {
- /* ensure that old APs get culled, which otherwise only
- * happens when there are actual scan results to process.
- */
- cull_scan_list (self);
- ap_list_dump (self);
- }
-#endif
+ /* Ensure that old APs get removed, which otherwise only
+ * happens when there are new BSSes.
+ */
+ schedule_scanlist_cull (self);
}
@@ -2217,9 +1684,7 @@ merge_scanned_ap (NMDeviceWifi *self,
gboolean strict_match = TRUE;
NMAccessPoint *current_ap = NULL;
- /* Let the manager try to fill in the SSID from seen-bssids lists
- * if it can
- */
+ /* Let the manager try to fill in the SSID from seen-bssids lists */
bssid = nm_ap_get_address (merge_ap);
ssid = nm_ap_get_ssid (merge_ap);
if (!ssid || nm_utils_is_empty_ssid (ssid->data, ssid->len)) {
@@ -2252,7 +1717,9 @@ merge_scanned_ap (NMDeviceWifi *self,
if (current_ap && nm_ap_get_fake (current_ap))
strict_match = FALSE;
- found_ap = nm_ap_match_in_list (merge_ap, priv->ap_list, strict_match);
+ found_ap = get_ap_by_supplicant_path (self, nm_ap_get_supplicant_path (merge_ap));
+ if (!found_ap)
+ found_ap = nm_ap_match_in_list (merge_ap, priv->ap_list, strict_match);
if (found_ap) {
nm_log_dbg (LOGD_WIFI_SCAN, "(%s): merging AP '%s' " MAC_FMT " (%p) with existing (%p)",
nm_device_get_iface (NM_DEVICE (self)),
@@ -2261,6 +1728,7 @@ merge_scanned_ap (NMDeviceWifi *self,
merge_ap,
found_ap);
+ nm_ap_set_supplicant_path (found_ap, nm_ap_get_supplicant_path (merge_ap));
nm_ap_set_flags (found_ap, nm_ap_get_flags (merge_ap));
nm_ap_set_wpa_flags (found_ap, nm_ap_get_wpa_flags (merge_ap));
nm_ap_set_rsn_flags (found_ap, nm_ap_get_rsn_flags (merge_ap));
@@ -2289,25 +1757,18 @@ merge_scanned_ap (NMDeviceWifi *self,
}
}
-static void
+#define WPAS_REMOVED_TAG "supplicant-removed"
+
+static gboolean
cull_scan_list (NMDeviceWifi *self)
{
- NMDeviceWifiPrivate *priv;
- GTimeVal cur_time;
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
+ GTimeVal now;
GSList *outdated_list = NULL;
GSList *elt;
- NMActRequest *req;
- const char *cur_ap_path = NULL;
guint32 removed = 0, total = 0;
- g_return_if_fail (self != NULL);
- priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
-
- g_get_current_time (&cur_time);
-
- req = nm_device_get_act_request (NM_DEVICE (self));
- if (req)
- cur_ap_path = nm_act_request_get_specific_object (req);
+ priv->scanlist_cull_id = 0;
nm_log_dbg (LOGD_WIFI_SCAN, "(%s): checking scan list for outdated APs",
nm_device_get_iface (NM_DEVICE (self)));
@@ -2315,19 +1776,27 @@ cull_scan_list (NMDeviceWifi *self)
/* Walk the access point list and remove any access points older than
* three times the inactive scan interval.
*/
+ g_get_current_time (&now);
for (elt = priv->ap_list; elt; elt = g_slist_next (elt), total++) {
- NMAccessPoint * ap = NM_AP (elt->data);
- const glong ap_time = nm_ap_get_last_seen (ap);
- gboolean keep = FALSE;
- const guint prune_interval_s = SCAN_INTERVAL_MAX * 3;
+ NMAccessPoint *ap = elt->data;
+ const guint prune_interval_s = SCAN_INTERVAL_MAX * 3;
- /* Don't ever prune the AP we're currently associated with */
- if (cur_ap_path && !strcmp (cur_ap_path, nm_ap_get_dbus_path (ap)))
- keep = TRUE;
- if (nm_ap_get_fake (ap))
- keep = TRUE;
+ /* Don't cull the associated AP or manually created APs */
+ if (ap == priv->current_ap || nm_ap_get_fake (ap))
+ continue;
+
+ /* Don't cull APs still known to the supplicant. Since the supplicant
+ * doesn't yet emit property updates for "last seen" we have to rely
+ * on changing signal strength for updating "last seen". But if the
+ * AP's strength doesn't change we won't get any updates for the AP,
+ * and we'll end up here even if the AP was still found by the
+ * supplicant in the last scan.
+ */
+ if ( nm_ap_get_supplicant_path (ap)
+ && g_object_get_data (G_OBJECT (ap), WPAS_REMOVED_TAG) == NULL)
+ continue;
- if (!keep && (ap_time + prune_interval_s < cur_time.tv_sec))
+ if (nm_ap_get_last_seen (ap) + prune_interval_s < now.tv_sec)
outdated_list = g_slist_append (outdated_list, ap);
}
@@ -2358,10 +1827,26 @@ cull_scan_list (NMDeviceWifi *self)
nm_log_dbg (LOGD_WIFI_SCAN, "(%s): removed %d APs (of %d)",
nm_device_get_iface (NM_DEVICE (self)),
removed, total);
+
+ ap_list_dump (self);
+
+ return FALSE;
+}
+
+static void
+schedule_scanlist_cull (NMDeviceWifi *self)
+{
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
+
+ /* Cull the scan list after the last request for it has come in */
+ if (priv->scanlist_cull_id)
+ g_source_remove (priv->scanlist_cull_id);
+ priv->scanlist_cull_id = g_timeout_add_seconds (4, (GSourceFunc) cull_scan_list, self);
}
static void
supplicant_iface_new_bss_cb (NMSupplicantInterface *iface,
+ const char *object_path,
GHashTable *properties,
NMDeviceWifi *self)
{
@@ -2377,22 +1862,65 @@ supplicant_iface_new_bss_cb (NMSupplicantInterface *iface,
if (state <= NM_DEVICE_STATE_UNAVAILABLE)
return;
- ap = nm_ap_new_from_properties (properties);
+ ap = nm_ap_new_from_properties (object_path, properties);
if (ap) {
nm_ap_dump (ap, "New AP: ");
/* Add the AP to the device's AP list */
merge_scanned_ap (self, ap);
g_object_unref (ap);
-
- /* Remove outdated access points */
- cull_scan_list (self);
-
- ap_list_dump (self);
} else {
nm_log_warn (LOGD_WIFI_SCAN, "(%s): invalid AP properties received",
nm_device_get_iface (NM_DEVICE (self)));
}
+
+ /* Remove outdated access points */
+ schedule_scanlist_cull (self);
+}
+
+static void
+supplicant_iface_bss_updated_cb (NMSupplicantInterface *iface,
+ const char *object_path,
+ GHashTable *properties,
+ NMDeviceWifi *self)
+{
+ NMDeviceState state;
+ NMAccessPoint *ap;
+ GTimeVal now;
+
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (object_path != NULL);
+ g_return_if_fail (properties != NULL);
+
+ /* Ignore new APs when unavailable or unamnaged */
+ state = nm_device_get_state (NM_DEVICE (self));
+ if (state <= NM_DEVICE_STATE_UNAVAILABLE)
+ return;
+
+ /* Update the AP's last-seen property */
+ ap = get_ap_by_supplicant_path (self, object_path);
+ if (ap) {
+ g_get_current_time (&now);
+ nm_ap_set_last_seen (ap, now.tv_sec);
+ }
+
+ /* Remove outdated access points */
+ schedule_scanlist_cull (self);
+}
+
+static void
+supplicant_iface_bss_removed_cb (NMSupplicantInterface *iface,
+ const char *object_path,
+ NMDeviceWifi *self)
+{
+ NMAccessPoint *ap;
+
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (object_path != NULL);
+
+ ap = get_ap_by_supplicant_path (self, object_path);
+ if (ap)
+ g_object_set_data (G_OBJECT (ap), WPAS_REMOVED_TAG, GUINT_TO_POINTER (TRUE));
}
@@ -2921,23 +2449,6 @@ remove_supplicant_timeouts (NMDeviceWifi *self)
remove_link_timeout (self);
}
-static guint32
-find_supported_frequency (NMDeviceWifi *self, const guint32 *freqs)
-{
- NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
- int i;
-
- for (i = 0; i < priv->num_freqs; i++) {
- while (*freqs) {
- if (priv->freqs[i] == *freqs)
- return *freqs;
- freqs++;
- }
- }
-
- return 0;
-}
-
static NMSupplicantConfig *
build_supplicant_config (NMDeviceWifi *self,
NMConnection *connection,
@@ -2951,7 +2462,7 @@ build_supplicant_config (NMDeviceWifi *self,
g_return_val_if_fail (self != NULL, NULL);
- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
g_return_val_if_fail (s_wireless != NULL, NULL);
config = nm_supplicant_config_new ();
@@ -2970,9 +2481,9 @@ build_supplicant_config (NMDeviceWifi *self,
adhoc_freq = nm_ap_get_freq (ap);
if (!adhoc_freq) {
if (g_strcmp0 (band, "a") == 0)
- adhoc_freq = find_supported_frequency (self, a_freqs);
+ adhoc_freq = wifi_utils_find_freq (priv->wifi_data, a_freqs);
else
- adhoc_freq = find_supported_frequency (self, bg_freqs);
+ adhoc_freq = wifi_utils_find_freq (priv->wifi_data, bg_freqs);
}
if (!adhoc_freq) {
@@ -2987,22 +2498,22 @@ build_supplicant_config (NMDeviceWifi *self,
s_wireless,
nm_ap_get_broadcast (ap),
adhoc_freq,
- priv->has_scan_capa_ssid)) {
+ wifi_utils_can_scan_ssid (priv->wifi_data))) {
nm_log_err (LOGD_WIFI, "Couldn't add 802-11-wireless setting to supplicant config.");
goto error;
}
- s_wireless_sec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wireless_sec = nm_connection_get_setting_wireless_security (connection);
if (s_wireless_sec) {
NMSetting8021x *s_8021x;
- const char *con_path = nm_connection_get_path (connection);
+ const char *con_uuid = nm_connection_get_uuid (connection);
- g_assert (con_path);
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ g_assert (con_uuid);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
if (!nm_supplicant_config_add_setting_wireless_security (config,
s_wireless_sec,
s_8021x,
- con_path)) {
+ con_uuid)) {
nm_log_err (LOGD_WIFI, "Couldn't add 802-11-wireless-security setting to "
"supplicant config.");
goto error;
@@ -3135,8 +2646,18 @@ real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
connection = nm_act_request_get_connection (req);
g_return_val_if_fail (connection != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+ /* The kernel doesn't support Ad-Hoc WPA connections well at this time,
+ * and turns them into open networks. It's been this way since at least
+ * 2.6.30 or so; until that's fixed, disable WPA-protected Ad-Hoc networks.
+ */
+ if (is_adhoc_wpa (connection)) {
+ nm_log_warn (LOGD_WIFI, "Ad-Hoc WPA disabled due to kernel bugs");
+ *reason = NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED;
+ return NM_ACT_STAGE_RETURN_FAILURE;
+ }
+
/* Set spoof MAC to the interface */
- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
g_assert (s_wireless);
cloned_mac = nm_setting_wireless_get_cloned_mac_address (s_wireless);
@@ -3177,7 +2698,7 @@ real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
g_signal_emit (self, signals[ACCESS_POINT_ADDED], 0, ap);
}
- nm_act_request_set_specific_object (req, nm_ap_get_dbus_path (ap));
+ nm_active_connection_set_specific_object (NM_ACTIVE_CONNECTION (req), nm_ap_get_dbus_path (ap));
done:
set_current_ap (self, ap);
@@ -3212,7 +2733,7 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason)
connection = nm_act_request_get_connection (req);
g_assert (connection);
- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
g_assert (s_wireless);
/* If we need secrets, get them */
@@ -3287,38 +2808,22 @@ out:
return ret;
}
-static NMActStageReturn
-real_act_stage4_get_ip4_config (NMDevice *dev,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+static void
+real_ip4_config_pre_commit (NMDevice *device, NMIP4Config *config)
{
- NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
- NMDeviceClass *parent_class;
-
- g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- /* Chain up to parent */
- parent_class = NM_DEVICE_CLASS (nm_device_wifi_parent_class);
- ret = parent_class->act_stage4_get_ip4_config (dev, config, reason);
-
- if ((ret == NM_ACT_STAGE_RETURN_SUCCESS) && *config) {
- NMConnection *connection;
- NMSettingWireless *s_wireless;
- guint32 mtu;
-
- connection = nm_act_request_get_connection (nm_device_get_act_request (dev));
- g_assert (connection);
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
- g_assert (s_wireless);
+ NMConnection *connection;
+ NMSettingWireless *s_wifi;
+ guint32 mtu;
- /* MTU override */
- mtu = nm_setting_wireless_get_mtu (s_wireless);
- if (mtu)
- nm_ip4_config_set_mtu (*config, mtu);
- }
+ connection = nm_device_get_connection (device);
+ g_assert (connection);
+ s_wifi = nm_connection_get_setting_wireless (connection);
+ g_assert (s_wifi);
- return ret;
+ /* MTU override */
+ mtu = nm_setting_wireless_get_mtu (s_wifi);
+ if (mtu)
+ nm_ip4_config_set_mtu (config, mtu);
}
static gboolean
@@ -3398,55 +2903,45 @@ handle_ip_config_timeout (NMDeviceWifi *self,
static NMActStageReturn
-real_act_stage4_ip4_config_timeout (NMDevice *dev,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+real_act_stage4_ip4_config_timeout (NMDevice *dev, NMDeviceStateReason *reason)
{
- NMActRequest *req;
NMConnection *connection;
NMSettingIP4Config *s_ip4;
gboolean may_fail = FALSE, chain_up = FALSE;
NMActStageReturn ret;
- req = nm_device_get_act_request (dev);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (dev);
g_assert (connection);
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
may_fail = nm_setting_ip4_config_get_may_fail (s_ip4);
ret = handle_ip_config_timeout (NM_DEVICE_WIFI (dev), connection, may_fail, &chain_up, reason);
if (chain_up)
- ret = NM_DEVICE_CLASS (nm_device_wifi_parent_class)->act_stage4_ip4_config_timeout (dev, config, reason);
+ ret = NM_DEVICE_CLASS (nm_device_wifi_parent_class)->act_stage4_ip4_config_timeout (dev, reason);
return ret;
}
static NMActStageReturn
-real_act_stage4_ip6_config_timeout (NMDevice *dev,
- NMIP6Config **config,
- NMDeviceStateReason *reason)
+real_act_stage4_ip6_config_timeout (NMDevice *dev, NMDeviceStateReason *reason)
{
- NMActRequest *req;
NMConnection *connection;
NMSettingIP6Config *s_ip6;
gboolean may_fail = FALSE, chain_up = FALSE;
NMActStageReturn ret;
- req = nm_device_get_act_request (dev);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (dev);
g_assert (connection);
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6)
may_fail = nm_setting_ip6_config_get_may_fail (s_ip6);
ret = handle_ip_config_timeout (NM_DEVICE_WIFI (dev), connection, may_fail, &chain_up, reason);
if (chain_up)
- ret = NM_DEVICE_CLASS (nm_device_wifi_parent_class)->act_stage4_ip6_config_timeout (dev, config, reason);
+ ret = NM_DEVICE_CLASS (nm_device_wifi_parent_class)->act_stage4_ip6_config_timeout (dev, reason);
return ret;
}
@@ -3483,13 +2978,13 @@ activation_success_handler (NMDevice *dev)
* But if activation was successful, the card will know the BSSID. Grab
* the BSSID off the card and fill in the BSSID of the activation AP.
*/
- nm_device_wifi_get_bssid (self, &bssid);
+ wifi_utils_get_bssid (priv->wifi_data, &bssid);
if (!nm_ethernet_address_is_valid (nm_ap_get_address (ap)))
nm_ap_set_address (ap, &bssid);
if (!nm_ap_get_freq (ap))
- nm_ap_set_freq (ap, nm_device_wifi_get_frequency (self));
+ nm_ap_set_freq (ap, wifi_utils_get_freq (priv->wifi_data));
if (!nm_ap_get_max_bitrate (ap))
- nm_ap_set_max_bitrate (ap, nm_device_wifi_get_bitrate (self));
+ nm_ap_set_max_bitrate (ap, wifi_utils_get_rate (priv->wifi_data));
tmp_ap = get_active_ap (self, ap, TRUE);
if (tmp_ap) {
@@ -3503,7 +2998,8 @@ activation_success_handler (NMDevice *dev)
if (!ssid || nm_utils_is_empty_ssid (ssid->data, ssid->len))
nm_ap_set_ssid (tmp_ap, nm_ap_get_ssid (ap));
- nm_act_request_set_specific_object (req, nm_ap_get_dbus_path (tmp_ap));
+ nm_active_connection_set_specific_object (NM_ACTIVE_CONNECTION (req),
+ nm_ap_get_dbus_path (tmp_ap));
priv->ap_list = g_slist_remove (priv->ap_list, ap);
g_object_unref (ap);
@@ -3526,13 +3022,9 @@ activation_failure_handler (NMDevice *dev)
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMAccessPoint *ap;
const GByteArray * ssid;
- NMActRequest *req;
NMConnection *connection;
- req = nm_device_get_act_request (dev);
- g_assert (req);
-
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (dev);
g_assert (connection);
/* Clear wireless secrets tries on failure */
@@ -3583,13 +3075,42 @@ spec_match_list (NMDevice *device, const GSList *specs)
char *hwaddr;
gboolean matched;
- hwaddr = nm_ether_ntop ((struct ether_addr *) &priv->perm_hw_addr);
+ hwaddr = nm_utils_hwaddr_ntoa (&priv->perm_hw_addr, ARPHRD_ETHER);
matched = nm_match_spec_hwaddr (specs, hwaddr);
g_free (hwaddr);
return matched;
}
+static gboolean
+hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr)
+{
+ NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
+ NMSettingWireless *s_wifi;
+ const GByteArray *mac = NULL;
+
+ s_wifi = nm_connection_get_setting_wireless (connection);
+ if (s_wifi)
+ mac = nm_setting_wireless_get_mac_address (s_wifi);
+
+ if (mac) {
+ g_return_val_if_fail (mac->len == ETH_ALEN, FALSE);
+ if (other_hwaddr) {
+ g_return_val_if_fail (other_hwaddr_len == ETH_ALEN, FALSE);
+ if (memcmp (mac->data, other_hwaddr, mac->len) == 0)
+ return TRUE;
+ } else if (memcmp (mac->data, priv->hw_addr, mac->len) == 0)
+ return TRUE;
+ } else if (fail_if_no_hwaddr == FALSE)
+ return TRUE;
+
+ return FALSE;
+}
+
static void
device_state_changed (NMDevice *device,
NMDeviceState new_state,
@@ -3632,12 +3153,6 @@ device_state_changed (NMDevice *device,
* the device is now ready to use.
*/
if (priv->enabled && (nm_device_get_firmware_missing (device) == FALSE)) {
- gboolean success;
- struct iw_range range;
-
- /* Wait for some drivers like ipw3945 to come back to life */
- success = wireless_get_range (self, &range, NULL);
-
if (!priv->supplicant.iface)
supplicant_interface_acquire (self);
}
@@ -3676,13 +3191,13 @@ nm_device_wifi_get_activation_ap (NMDeviceWifi *self)
if (!req)
return NULL;
- ap_path = nm_act_request_get_specific_object (req);
+ ap_path = nm_active_connection_get_specific_object (NM_ACTIVE_CONNECTION (req));
return ap_path ? get_ap_by_path (self, ap_path) : NULL;
}
static void
-real_set_enabled (NMDeviceInterface *device, gboolean enabled)
+real_set_enabled (NMDevice *device, gboolean enabled)
{
NMDeviceWifi *self = NM_DEVICE_WIFI (device);
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
@@ -3697,7 +3212,7 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled)
nm_device_get_iface (NM_DEVICE (device)),
enabled ? "enabled" : "disabled");
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
+ state = nm_device_get_state (NM_DEVICE (self));
if (state < NM_DEVICE_STATE_UNAVAILABLE) {
nm_log_dbg (LOGD_WIFI, "(%s): %s blocked by UNMANAGED state",
enabled ? "enable" : "disable",
@@ -3706,8 +3221,7 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled)
}
if (enabled) {
- gboolean no_firmware = FALSE, success;
- struct iw_range range;
+ gboolean no_firmware = FALSE;
if (state != NM_DEVICE_STATE_UNAVAILABLE)
nm_log_warn (LOGD_CORE, "not in expected unavailable state!");
@@ -3725,9 +3239,6 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled)
return;
}
- /* Wait for some drivers like ipw3945 to come back to life */
- success = wireless_get_range (self, &range, NULL);
-
/* Re-initialize the supplicant interface and wait for it to be ready */
if (priv->supplicant.iface)
supplicant_interface_release (self);
@@ -3755,22 +3266,16 @@ nm_device_wifi_new (const char *udi,
g_return_val_if_fail (driver != NULL, NULL);
return (NMDevice *) g_object_new (NM_TYPE_DEVICE_WIFI,
- NM_DEVICE_INTERFACE_UDI, udi,
- NM_DEVICE_INTERFACE_IFACE, iface,
- NM_DEVICE_INTERFACE_DRIVER, driver,
- NM_DEVICE_INTERFACE_TYPE_DESC, "802.11 WiFi",
- NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_WIFI,
- NM_DEVICE_INTERFACE_RFKILL_TYPE, RFKILL_TYPE_WLAN,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, driver,
+ NM_DEVICE_TYPE_DESC, "802.11 WiFi",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_WIFI,
+ NM_DEVICE_RFKILL_TYPE, RFKILL_TYPE_WLAN,
NULL);
}
static void
-device_interface_init (NMDeviceInterface *iface_class)
-{
- iface_class->set_enabled = real_set_enabled;
-}
-
-static void
nm_device_wifi_init (NMDeviceWifi * self)
{
g_signal_connect (self, "state-changed", G_CALLBACK (device_state_changed), NULL);
@@ -3802,14 +3307,12 @@ dispose (GObject *object)
priv->supplicant.mgr = NULL;
}
- if (priv->ssid) {
- g_byte_array_free (priv->ssid, TRUE);
- priv->ssid = NULL;
- }
-
set_current_ap (self, NULL);
remove_all_aps (self);
+ if (priv->wifi_data)
+ wifi_utils_deinit (priv->wifi_data);
+
g_free (priv->ipw_rfkill_path);
if (priv->ipw_rfkill_id) {
g_source_remove (priv->ipw_rfkill_id);
@@ -3828,13 +3331,13 @@ get_property (GObject *object, guint prop_id,
switch (prop_id) {
case PROP_HW_ADDRESS:
- g_value_take_string (value, nm_ether_ntop ((struct ether_addr *) &priv->hw_addr));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (&priv->hw_addr, ARPHRD_ETHER));
break;
case PROP_PERM_HW_ADDRESS:
- g_value_take_string (value, nm_ether_ntop ((struct ether_addr *) &priv->perm_hw_addr));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (&priv->perm_hw_addr, ARPHRD_ETHER));
break;
case PROP_MODE:
- g_value_set_uint (value, nm_device_wifi_get_mode (device));
+ g_value_set_uint (value, wifi_utils_get_mode (priv->wifi_data));
break;
case PROP_BITRATE:
g_value_set_uint (value, priv->rate);
@@ -3906,15 +3409,17 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass)
parent_class->is_available = real_is_available;
parent_class->check_connection_compatible = real_check_connection_compatible;
parent_class->complete_connection = real_complete_connection;
+ parent_class->set_enabled = real_set_enabled;
parent_class->act_stage1_prepare = real_act_stage1_prepare;
parent_class->act_stage2_config = real_act_stage2_config;
- parent_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config;
+ parent_class->ip4_config_pre_commit = real_ip4_config_pre_commit;
parent_class->act_stage4_ip4_config_timeout = real_act_stage4_ip4_config_timeout;
parent_class->act_stage4_ip6_config_timeout = real_act_stage4_ip6_config_timeout;
parent_class->deactivate = real_deactivate;
parent_class->can_interrupt_activation = real_can_interrupt_activation;
parent_class->spec_match_list = spec_match_list;
+ parent_class->hwaddr_matches = hwaddr_matches;
klass->scanning_allowed = scanning_allowed;
diff --git a/src/nm-device-wifi.h b/src/nm-device-wifi.h
index 31ac5ad5b..1e665fc3a 100644
--- a/src/nm-device-wifi.h
+++ b/src/nm-device-wifi.h
@@ -41,6 +41,12 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIFI))
#define NM_DEVICE_WIFI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
+typedef enum {
+ NM_WIFI_ERROR_CONNECTION_NOT_WIRELESS = 0, /*< nick=ConnectionNotWireless >*/
+ NM_WIFI_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_WIFI_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+ NM_WIFI_ERROR_ACCESS_POINT_NOT_FOUND, /*< nick=AccessPointNotFound >*/
+} NMWifiError;
#define NM_DEVICE_WIFI_HW_ADDRESS "hw-address"
#define NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS "perm-hw-address"
@@ -88,14 +94,6 @@ NMDevice *nm_device_wifi_new (const char *udi,
void nm_device_wifi_get_address (NMDeviceWifi *dev, struct ether_addr *addr);
-void nm_device_wifi_get_bssid (NMDeviceWifi *dev, struct ether_addr *bssid);
-
-const GByteArray * nm_device_wifi_get_ssid (NMDeviceWifi *self);
-
-gboolean nm_device_wifi_set_mode (NMDeviceWifi *self, const NM80211Mode mode);
-
-NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *self);
-
NMAccessPoint * nm_device_wifi_get_activation_ap (NMDeviceWifi *self);
RfKillState nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self);
diff --git a/src/nm-device-wired.c b/src/nm-device-wired.c
new file mode 100644
index 000000000..a476faad0
--- /dev/null
+++ b/src/nm-device-wired.c
@@ -0,0 +1,595 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
+ * Copyright (C) 2006 - 2008 Novell, Inc.
+ */
+
+#include "config.h"
+#include <glib.h>
+#include <sys/socket.h>
+#include <linux/if.h>
+#include <linux/if_infiniband.h>
+#include <netinet/ether.h>
+#include <linux/sockios.h>
+#include <linux/version.h>
+#include <linux/ethtool.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+
+#include "nm-device-wired.h"
+#include "nm-device-private.h"
+#include "nm-dhcp-manager.h"
+#include "nm-logging.h"
+#include "nm-netlink-monitor.h"
+#include "nm-netlink-utils.h"
+#include "nm-system.h"
+#include "nm-utils.h"
+#include "NetworkManagerUtils.h"
+
+
+G_DEFINE_TYPE (NMDeviceWired, nm_device_wired, NM_TYPE_DEVICE)
+
+#define NM_DEVICE_WIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_WIRED, NMDeviceWiredPrivate))
+
+#define NM_DEVICE_WIRED_LOG_LEVEL(dev) ((nm_device_get_device_type (dev) == NM_DEVICE_TYPE_INFINIBAND) ? LOGD_INFINIBAND : LOGD_ETHER)
+
+typedef struct {
+ guint8 hw_addr[NM_UTILS_HWADDR_LEN_MAX]; /* Currently set MAC address */
+ guint hw_addr_type;
+ guint hw_addr_len;
+ gboolean carrier;
+ guint32 speed;
+
+ NMNetlinkMonitor * monitor;
+ gulong link_connected_id;
+ gulong link_disconnected_id;
+ guint carrier_action_defer_id;
+
+} NMDeviceWiredPrivate;
+
+
+/* Returns speed in Mb/s */
+static guint32
+ethtool_get_speed (NMDeviceWired *self)
+{
+ int fd;
+ struct ifreq ifr;
+ struct ethtool_cmd edata = {
+ .cmd = ETHTOOL_GSET,
+ };
+ guint32 speed = 0;
+
+ g_return_val_if_fail (self != NULL, 0);
+
+ fd = socket (PF_INET, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ nm_log_warn (LOGD_HW, "couldn't open control socket.");
+ return 0;
+ }
+
+ memset (&ifr, 0, sizeof (struct ifreq));
+ strncpy (ifr.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ);
+ ifr.ifr_data = (char *) &edata;
+
+ if (ioctl (fd, SIOCETHTOOL, &ifr) < 0)
+ goto out;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ speed = edata.speed;
+#else
+ speed = ethtool_cmd_speed (&edata);
+#endif
+
+ if (speed == G_MAXUINT16 || speed == G_MAXUINT32)
+ speed = 0;
+
+out:
+ close (fd);
+ return speed;
+}
+
+static void
+set_speed (NMDeviceWired *self, const guint32 speed)
+{
+ NMDeviceWiredPrivate *priv;
+
+ g_return_if_fail (NM_IS_DEVICE (self));
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+ if (priv->speed == speed)
+ return;
+
+ priv->speed = speed;
+ g_object_notify (G_OBJECT (self), "speed");
+
+ nm_log_dbg (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
+ "(%s): speed is now %d Mb/s",
+ nm_device_get_iface (NM_DEVICE (self)),
+ speed);
+}
+
+static void
+carrier_action_defer_clear (NMDeviceWired *self)
+{
+ NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+
+ if (priv->carrier_action_defer_id) {
+ g_source_remove (priv->carrier_action_defer_id);
+ priv->carrier_action_defer_id = 0;
+ }
+}
+
+static gboolean
+carrier_action_defer_cb (gpointer user_data)
+{
+ NMDeviceWired *self = NM_DEVICE_WIRED (user_data);
+ NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+ NMDeviceState state;
+
+ priv->carrier_action_defer_id = 0;
+
+ state = nm_device_get_state (NM_DEVICE (self));
+ if (state == NM_DEVICE_STATE_UNAVAILABLE) {
+ if (priv->carrier)
+ nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER);
+ } else if (state >= NM_DEVICE_STATE_DISCONNECTED) {
+ if (!priv->carrier)
+ nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER);
+ }
+
+ return FALSE;
+}
+
+static void
+set_carrier (NMDeviceWired *self,
+ const gboolean carrier,
+ const gboolean defer_action)
+{
+ NMDeviceWiredPrivate *priv;
+ NMDeviceState state;
+
+ g_return_if_fail (NM_IS_DEVICE (self));
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+ if (priv->carrier == carrier)
+ return;
+
+ /* Clear any previous deferred action */
+ carrier_action_defer_clear (self);
+
+ priv->carrier = carrier;
+ g_object_notify (G_OBJECT (self), "carrier");
+
+ state = nm_device_get_state (NM_DEVICE (self));
+ nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
+ "(%s): carrier now %s (device state %d%s)",
+ nm_device_get_iface (NM_DEVICE (self)),
+ carrier ? "ON" : "OFF",
+ state,
+ defer_action ? ", deferring action for 4 seconds" : "");
+
+ if (defer_action)
+ priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self);
+ else
+ carrier_action_defer_cb (self);
+}
+
+static void
+carrier_on (NMNetlinkMonitor *monitor,
+ int idx,
+ gpointer user_data)
+{
+ NMDevice *device = NM_DEVICE (user_data);
+ NMDeviceWired *self = NM_DEVICE_WIRED (device);
+ guint32 caps;
+
+ /* Make sure signal is for us */
+ if (idx == nm_device_get_ifindex (device)) {
+ /* Ignore spurious netlink messages */
+ caps = nm_device_get_capabilities (device);
+ if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT))
+ return;
+
+ set_carrier (self, TRUE, FALSE);
+ set_speed (self, ethtool_get_speed (self));
+ }
+}
+
+static void
+carrier_off (NMNetlinkMonitor *monitor,
+ int idx,
+ gpointer user_data)
+{
+ NMDevice *device = NM_DEVICE (user_data);
+ NMDeviceWired *self = NM_DEVICE_WIRED (device);
+ guint32 caps;
+
+ /* Make sure signal is for us */
+ if (idx == nm_device_get_ifindex (device)) {
+ NMDeviceState state;
+ gboolean defer = FALSE;
+
+ /* Ignore spurious netlink messages */
+ caps = nm_device_get_capabilities (device);
+ if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT))
+ return;
+
+ /* Defer carrier-off event actions while connected by a few seconds
+ * so that tripping over a cable, power-cycling a switch, or breaking
+ * off the RJ45 locking tab isn't so catastrophic.
+ */
+ state = nm_device_get_state (device);
+ if (state > NM_DEVICE_STATE_DISCONNECTED)
+ defer = TRUE;
+
+ set_carrier (self, FALSE, defer);
+ }
+}
+
+static gboolean
+get_carrier_sync (NMDeviceWired *self)
+{
+ NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+ GError *error = NULL;
+ guint32 ifflags = 0;
+
+ /* Get initial link state */
+ if (!nm_netlink_monitor_get_flags_sync (priv->monitor,
+ nm_device_get_ip_ifindex (NM_DEVICE (self)),
+ &ifflags,
+ &error)) {
+ nm_log_warn (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
+ "(%s): couldn't get carrier state: (%d) %s",
+ nm_device_get_ip_iface (NM_DEVICE (self)),
+ error ? error->code : -1,
+ (error && error->message) ? error->message : "unknown");
+ g_clear_error (&error);
+ }
+
+ return !!(ifflags & IFF_LOWER_UP);
+}
+
+static GObject*
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ NMDeviceWiredPrivate *priv;
+ NMDevice *self;
+ guint32 caps;
+
+ object = G_OBJECT_CLASS (nm_device_wired_parent_class)->constructor (type,
+ n_construct_params,
+ construct_params);
+ if (!object)
+ return NULL;
+
+ self = NM_DEVICE (object);
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+
+ nm_log_dbg (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
+ "(%s): kernel ifindex %d",
+ nm_device_get_iface (NM_DEVICE (self)),
+ nm_device_get_ifindex (NM_DEVICE (self)));
+
+ if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_ETHERNET) {
+ priv->hw_addr_type = ARPHRD_ETHER;
+ priv->hw_addr_len = ETH_ALEN;
+ } else if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_INFINIBAND) {
+ priv->hw_addr_type = ARPHRD_INFINIBAND;
+ priv->hw_addr_len = INFINIBAND_ALEN;
+ } else if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_BOND) {
+ /* We may not know the hardware address type until a slave is added */
+ priv->hw_addr_type = ARPHRD_ETHER;
+ priv->hw_addr_len = ETH_ALEN;
+ } else
+ g_assert_not_reached ();
+
+ caps = nm_device_get_capabilities (self);
+ if (caps & NM_DEVICE_CAP_CARRIER_DETECT) {
+ /* Only listen to netlink for cards that support carrier detect */
+ priv->monitor = nm_netlink_monitor_get ();
+
+ priv->link_connected_id = g_signal_connect (priv->monitor, "carrier-on",
+ G_CALLBACK (carrier_on),
+ self);
+ priv->link_disconnected_id = g_signal_connect (priv->monitor, "carrier-off",
+ G_CALLBACK (carrier_off),
+ self);
+
+ priv->carrier = get_carrier_sync (NM_DEVICE_WIRED (self));
+
+ nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
+ "(%s): carrier is %s",
+ nm_device_get_iface (NM_DEVICE (self)),
+ priv->carrier ? "ON" : "OFF");
+
+ /* Request link state again just in case an error occurred getting the
+ * initial link state.
+ */
+ nm_netlink_monitor_request_status (priv->monitor);
+ } else {
+ nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
+ "(%s): driver '%s' does not support carrier detection.",
+ nm_device_get_iface (self),
+ nm_device_get_driver (self));
+ priv->carrier = TRUE;
+ }
+
+ return object;
+}
+
+static void
+nm_device_wired_init (NMDeviceWired * self)
+{
+}
+
+static gboolean
+real_hw_is_up (NMDevice *device)
+{
+ return nm_system_iface_is_up (nm_device_get_ip_ifindex (device));
+}
+
+static gboolean
+real_hw_bring_up (NMDevice *dev, gboolean *no_firmware)
+{
+ gboolean success, carrier;
+
+ success = nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware);
+ if (success) {
+ carrier = get_carrier_sync (NM_DEVICE_WIRED (dev));
+ set_carrier (NM_DEVICE_WIRED (dev), carrier, carrier ? FALSE : TRUE);
+ }
+ return success;
+}
+
+static void
+real_hw_take_down (NMDevice *dev)
+{
+ nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL);
+}
+
+static void
+real_update_hw_address (NMDevice *dev)
+{
+ NMDeviceWired *self = NM_DEVICE_WIRED (dev);
+ NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+ struct rtnl_link *rtnl;
+ struct nl_addr *addr;
+
+ rtnl = nm_netlink_index_to_rtnl_link (nm_device_get_ip_ifindex (dev));
+ if (!rtnl) {
+ nm_log_err (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (dev),
+ "(%s) failed to read hardware address (error %d)",
+ nm_device_get_iface (dev), errno);
+ return;
+ }
+
+ addr = rtnl_link_get_addr (rtnl);
+ if (!addr) {
+ nm_log_err (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (dev),
+ "(%s) no hardware address?",
+ nm_device_get_iface (dev));
+ rtnl_link_put (rtnl);
+ return;
+ }
+
+ if (nl_addr_get_len (addr) != priv->hw_addr_len) {
+ nm_log_err (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (dev),
+ "(%s) hardware address is wrong length (expected %d got %d)",
+ nm_device_get_iface (dev),
+ priv->hw_addr_len, nl_addr_get_len (addr));
+ } else {
+ memcpy (&priv->hw_addr, nl_addr_get_binary_addr (addr),
+ priv->hw_addr_len);
+ }
+
+ rtnl_link_put (rtnl);
+}
+
+static gboolean
+real_can_interrupt_activation (NMDevice *dev)
+{
+ NMDeviceWired *self = NM_DEVICE_WIRED (dev);
+ gboolean interrupt = FALSE;
+
+ /* Devices that support carrier detect can interrupt activation
+ * if the link becomes inactive.
+ */
+ if (nm_device_get_capabilities (dev) & NM_DEVICE_CAP_CARRIER_DETECT) {
+ if (NM_DEVICE_WIRED_GET_PRIVATE (self)->carrier == FALSE)
+ interrupt = TRUE;
+ }
+ return interrupt;
+}
+
+static gboolean
+real_is_available (NMDevice *dev)
+{
+ NMDeviceWired *self = NM_DEVICE_WIRED (dev);
+
+ /* Can't do anything if there isn't a carrier */
+ if (!NM_DEVICE_WIRED_GET_PRIVATE (self)->carrier)
+ return FALSE;
+
+ return TRUE;
+}
+
+static NMConnection *
+connection_match_config (NMDevice *self, const GSList *connections)
+{
+ const GSList *iter;
+
+ for (iter = connections; iter; iter = iter->next) {
+ NMConnection *candidate = NM_CONNECTION (iter->data);
+
+ if (!nm_device_match_ip_config (self, candidate))
+ continue;
+
+ return candidate;
+ }
+
+ return NULL;
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceWired *self = NM_DEVICE_WIRED (object);
+ NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self);
+
+ if (priv->link_connected_id) {
+ g_signal_handler_disconnect (priv->monitor, priv->link_connected_id);
+ priv->link_connected_id = 0;
+ }
+ if (priv->link_disconnected_id) {
+ g_signal_handler_disconnect (priv->monitor, priv->link_disconnected_id);
+ priv->link_disconnected_id = 0;
+ }
+
+ carrier_action_defer_clear (self);
+
+ if (priv->monitor) {
+ g_object_unref (priv->monitor);
+ priv->monitor = NULL;
+ }
+
+ G_OBJECT_CLASS (nm_device_wired_parent_class)->dispose (object);
+}
+
+static void
+nm_device_wired_class_init (NMDeviceWiredClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceWiredPrivate));
+
+ /* virtual methods */
+ object_class->constructor = constructor;
+ object_class->dispose = dispose;
+
+ parent_class->hw_is_up = real_hw_is_up;
+ parent_class->hw_bring_up = real_hw_bring_up;
+ parent_class->hw_take_down = real_hw_take_down;
+ parent_class->can_interrupt_activation = real_can_interrupt_activation;
+ parent_class->update_hw_address = real_update_hw_address;
+ parent_class->is_available = real_is_available;
+ parent_class->connection_match_config = connection_match_config;
+}
+
+/**
+ * nm_device_wired_get_hwaddr:
+ * @dev: an #NMDeviceWired
+ *
+ * Get a device's hardware address
+ *
+ * Returns: (transfer none): @dev's hardware address
+ */
+const guint8 *
+nm_device_wired_get_hwaddr (NMDeviceWired *dev)
+{
+ NMDeviceWiredPrivate *priv;
+
+ g_return_val_if_fail (dev != NULL, NULL);
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (dev);
+ return priv->hw_addr;
+}
+
+/**
+ * nm_device_wired_set_hwaddr:
+ * @dev: an #NMDeviceWired
+ * @addr: the new hardware address, @addrlen bytes in length
+ * @addrlen: the length in bytes of @addr
+ *
+ * Sets the device's hardware address.
+ */
+void
+nm_device_wired_set_hwaddr (NMDeviceWired *dev,
+ const guint8 *addr,
+ guint addrlen)
+{
+ NMDeviceWiredPrivate *priv;
+
+ g_return_if_fail (dev != NULL);
+ g_return_if_fail (addr != NULL);
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (dev);
+ g_return_if_fail (addrlen == priv->hw_addr_len);
+
+ memcpy (priv->hw_addr, addr, priv->hw_addr_len);
+}
+
+/**
+ * nm_device_wired_get_hwaddr_type:
+ * @dev: an #NMDeviceWired
+ *
+ * Get the type of a device's hardware address
+ *
+ * Returns: the type of @dev's hardware address
+ */
+int
+nm_device_wired_get_hwaddr_type (NMDeviceWired *dev)
+{
+ NMDeviceWiredPrivate *priv;
+
+ g_return_val_if_fail (dev != NULL, -1);
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (dev);
+ return priv->hw_addr_type;
+}
+
+/**
+ * nm_device_wired_get_carrier:
+ * @dev: an #NMDeviceWired
+ *
+ * Get @dev's carrier status
+ *
+ * Return value: @dev's carrier
+ */
+gboolean
+nm_device_wired_get_carrier (NMDeviceWired *dev)
+{
+ NMDeviceWiredPrivate *priv;
+
+ g_return_val_if_fail (dev != NULL, FALSE);
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (dev);
+ return priv->carrier;
+}
+
+/**
+ * nm_device_wired_get_speed:
+ * @dev: an #NMDeviceWired
+ *
+ * Get @dev's speed
+ *
+ * Return value: @dev's speed in Mb/s
+ */
+guint32
+nm_device_wired_get_speed (NMDeviceWired *dev)
+{
+ NMDeviceWiredPrivate *priv;
+
+ g_return_val_if_fail (dev != NULL, 0);
+
+ priv = NM_DEVICE_WIRED_GET_PRIVATE (dev);
+ return priv->speed;
+}
diff --git a/src/nm-device-wired.h b/src/nm-device-wired.h
new file mode 100644
index 000000000..3180ee45a
--- /dev/null
+++ b/src/nm-device-wired.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
+ * Copyright (C) 2006 - 2008 Novell, Inc.
+ */
+
+#ifndef NM_DEVICE_WIRED_H
+#define NM_DEVICE_WIRED_H
+
+#include <glib-object.h>
+
+#include "nm-device.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_WIRED (nm_device_wired_get_type ())
+#define NM_DEVICE_WIRED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_WIRED, NMDeviceWired))
+#define NM_DEVICE_WIRED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_WIRED, NMDeviceWiredClass))
+#define NM_IS_DEVICE_WIRED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_WIRED))
+#define NM_IS_DEVICE_WIRED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIRED))
+#define NM_DEVICE_WIRED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIRED, NMDeviceWiredClass))
+
+typedef struct {
+ NMDevice parent;
+} NMDeviceWired;
+
+typedef struct {
+ NMDeviceClass parent;
+
+} NMDeviceWiredClass;
+
+GType nm_device_wired_get_type (void);
+
+const guint8 *nm_device_wired_get_hwaddr (NMDeviceWired *dev);
+void nm_device_wired_set_hwaddr (NMDeviceWired *dev,
+ const guint8 *addr,
+ guint addrlen);
+int nm_device_wired_get_hwaddr_type (NMDeviceWired *dev);
+gboolean nm_device_wired_get_carrier (NMDeviceWired *dev);
+guint32 nm_device_wired_get_speed (NMDeviceWired *dev);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_WIRED_H */
diff --git a/src/nm-device.c b/src/nm-device.c
index 95f07e44d..1dc94ee95 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
@@ -36,9 +36,9 @@
#include <linux/if.h>
#include "nm-glib-compat.h"
-#include "nm-device-interface.h"
#include "nm-device.h"
#include "nm-device-private.h"
+#include "backends/nm-backend.h"
#include "NetworkManagerUtils.h"
#include "nm-system.h"
#include "nm-dhcp-manager.h"
@@ -57,31 +57,91 @@
#include "nm-ip6-manager.h"
#include "nm-marshal.h"
#include "nm-rfkill.h"
+#include "nm-firewall-manager.h"
+#include "nm-properties-changed-signal.h"
+#include "nm-enum-types.h"
+#include "nm-settings-connection.h"
-#define NM_ACT_REQUEST_IP4_CONFIG "nm-act-request-ip4-config"
-#define NM_ACT_REQUEST_IP6_CONFIG "nm-act-request-ip6-config"
+static void impl_device_disconnect (NMDevice *device, DBusGMethodInvocation *context);
-static void device_interface_init (NMDeviceInterface *device_interface_class);
+#include "nm-device-interface-glue.h"
-G_DEFINE_TYPE_EXTENDED (NMDevice, nm_device, G_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT,
- G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init))
+#define PENDING_IP4_CONFIG "pending-ip4-config"
+#define PENDING_IP6_CONFIG "pending-ip6-config"
+
+#define DBUS_G_TYPE_UINT_STRUCT (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INVALID))
+
+/***********************************************************/
+#define NM_DEVICE_ERROR (nm_device_error_quark ())
+
+static GQuark
+nm_device_error_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("nm-device-error");
+ return quark;
+}
+
+/***********************************************************/
enum {
+ STATE_CHANGED,
+ DISCONNECT_REQUEST,
AUTOCONNECT_ALLOWED,
LAST_SIGNAL,
};
-
static guint signals[LAST_SIGNAL] = { 0 };
+enum {
+ PROP_0,
+ PROP_UDI,
+ PROP_IFACE,
+ PROP_IP_IFACE,
+ PROP_DRIVER,
+ PROP_CAPABILITIES,
+ PROP_IP4_ADDRESS,
+ PROP_IP4_CONFIG,
+ PROP_DHCP4_CONFIG,
+ PROP_IP6_CONFIG,
+ PROP_DHCP6_CONFIG,
+ PROP_STATE,
+ PROP_STATE_REASON,
+ PROP_ACTIVE_CONNECTION,
+ PROP_DEVICE_TYPE,
+ PROP_MANAGED,
+ PROP_FIRMWARE_MISSING,
+ PROP_TYPE_DESC,
+ PROP_RFKILL_TYPE,
+ PROP_IFINDEX,
+ LAST_PROP
+};
+
+/***********************************************************/
+
+G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, G_TYPE_OBJECT)
+
#define NM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE, NMDevicePrivate))
+typedef enum {
+ IP_NONE = 0,
+ IP_CONF,
+ IP_DONE
+} IpState;
+
+typedef struct {
+ NMDeviceState state;
+ NMDeviceStateReason reason;
+ guint id;
+} QueuedState;
+
typedef struct {
gboolean disposed;
gboolean initialized;
NMDeviceState state;
- guint failed_to_disconnected_id;
- guint unavailable_to_disconnected_id;
+ NMDeviceStateReason state_reason;
+ QueuedState queued_state;
char * udi;
char * path;
@@ -104,12 +164,11 @@ typedef struct {
gpointer act_source_func;
guint act_source6_id;
gpointer act_source6_func;
+ guint act_dep_result_id;
+ guint act_dep_timeout_id;
gulong secrets_updated_id;
gulong secrets_failed_id;
- gboolean ip4_ready;
- gboolean ip6_ready;
-
/* Generic DHCP stuff */
NMDHCPManager * dhcp_manager;
guint32 dhcp_timeout;
@@ -117,6 +176,7 @@ typedef struct {
/* IP4 configuration info */
NMIP4Config * ip4_config; /* Config from DHCP, PPP, or system config files */
+ IpState ip4_state;
NMDHCPClient * dhcp4_client;
gulong dhcp4_state_sigid;
gulong dhcp4_timeout_sigid;
@@ -126,45 +186,47 @@ typedef struct {
NMDnsMasqManager *dnsmasq_manager;
gulong dnsmasq_state_id;
+ /* Firewall Manager */
+ NMFirewallManager *fw_manager;
+ DBusGProxyCall *fw_call;
+
/* avahi-autoipd stuff */
GPid aipd_pid;
guint aipd_watch;
guint aipd_timeout;
- guint32 aipd_addr;
/* IP6 configuration info */
NMIP6Config * ip6_config;
+ IpState ip6_state;
+
NMIP6Manager * ip6_manager;
gulong ip6_addrconf_sigid;
gulong ip6_config_changed_sigid;
gboolean ip6_waiting_for_config;
+ /* IP6 config from autoconf */
+ NMIP6Config * ac_ip6_config;
char * ip6_accept_ra_path;
- guint32 ip6_accept_ra_save;
+ gint32 ip6_accept_ra_save;
+
+ /* IPv6 privacy extensions (RFC4941) */
+ char * ip6_privacy_tempaddr_path;
+ gint32 ip6_privacy_tempaddr_save;
NMDHCPClient * dhcp6_client;
guint32 dhcp6_mode;
gulong dhcp6_state_sigid;
gulong dhcp6_timeout_sigid;
NMDHCP6Config * dhcp6_config;
+ /* IP6 config from DHCP */
+ NMIP6Config * dhcp6_ip6_config;
/* inhibit autoconnect feature */
gboolean autoconnect_inhibit;
-} NMDevicePrivate;
-
-static gboolean check_connection_compatible (NMDeviceInterface *device,
- NMConnection *connection,
- GError **error);
-static gboolean nm_device_activate (NMDeviceInterface *device,
- NMActRequest *req,
- GError **error);
-static void nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason);
-static gboolean device_disconnect (NMDeviceInterface *device, GError **error);
-static gboolean spec_match_list (NMDeviceInterface *device, const GSList *specs);
-static NMConnection *connection_match_config (NMDeviceInterface *device, const GSList *connections);
-static gboolean can_assume_connections (NMDeviceInterface *device);
-static void nm_device_activate_schedule_stage5_ip_config_commit (NMDevice *self, int family);
+ /* master interface for bridge, bond, vlan, etc */
+ NMDevice * master;
+} NMDevicePrivate;
static void nm_device_take_down (NMDevice *dev, gboolean wait, NMDeviceStateReason reason);
@@ -180,32 +242,12 @@ static gboolean nm_device_set_ip6_config (NMDevice *dev,
gboolean assumed,
NMDeviceStateReason *reason);
-static NMActStageReturn dhcp6_start (NMDevice *self,
- NMConnection *connection,
- guint32 dhcp_opt,
- NMDeviceStateReason *reason);
+static gboolean nm_device_activate_ip6_config_commit (gpointer user_data);
-static void addrconf6_cleanup (NMDevice *self);
-static void dhcp6_cleanup (NMDevice *self, gboolean stop, gboolean release);
static void dhcp4_cleanup (NMDevice *self, gboolean stop, gboolean release);
static const char *reason_to_string (NMDeviceStateReason reason);
-
-static void
-device_interface_init (NMDeviceInterface *device_interface_class)
-{
- /* interface implementation */
- device_interface_class->check_connection_compatible = check_connection_compatible;
- device_interface_class->activate = nm_device_activate;
- device_interface_class->deactivate = nm_device_deactivate;
- device_interface_class->disconnect = device_disconnect;
- device_interface_class->spec_match_list = spec_match_list;
- device_interface_class->connection_match_config = connection_match_config;
- device_interface_class->can_assume_connections = can_assume_connections;
-}
-
-
static void
nm_device_init (NMDevice *self)
{
@@ -214,6 +256,7 @@ nm_device_init (NMDevice *self)
priv->type = NM_DEVICE_TYPE_UNKNOWN;
priv->capabilities = NM_DEVICE_CAP_NONE;
priv->state = NM_DEVICE_STATE_UNMANAGED;
+ priv->state_reason = NM_DEVICE_STATE_REASON_NONE;
priv->dhcp_timeout = 0;
priv->rfkill_type = RFKILL_TYPE_UNKNOWN;
}
@@ -245,14 +288,50 @@ update_accept_ra_save (NMDevice *self)
/* Grab the original value of "accept_ra" so we can restore it when NM exits */
priv->ip6_accept_ra_path = new_path;
- if (!nm_utils_get_proc_sys_net_value (priv->ip6_accept_ra_path,
- ip_iface,
- &priv->ip6_accept_ra_save)) {
+ if (!nm_utils_get_proc_sys_net_value_with_bounds (priv->ip6_accept_ra_path,
+ ip_iface,
+ &priv->ip6_accept_ra_save,
+ 0, 1)) {
g_free (priv->ip6_accept_ra_path);
priv->ip6_accept_ra_path = NULL;
}
}
+static void
+update_ip6_privacy_save (NMDevice *self)
+{
+ NMDevicePrivate *priv;
+ const char *ip_iface;
+ char *new_path;
+
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (NM_IS_DEVICE (self));
+
+ priv = NM_DEVICE_GET_PRIVATE (self);
+ ip_iface = nm_device_get_ip_iface (self);
+
+ new_path = g_strdup_printf ("/proc/sys/net/ipv6/conf/%s/use_tempaddr", ip_iface);
+ g_assert (new_path);
+
+ if (priv->ip6_privacy_tempaddr_path) {
+ /* If the IP iface is different from before, use the new value */
+ if (!strcmp (new_path, priv->ip6_privacy_tempaddr_path)) {
+ g_free (new_path);
+ return;
+ }
+ g_free (priv->ip6_privacy_tempaddr_path);
+ }
+
+ /* Grab the original value of "use_tempaddr" so we can restore it when NM exits */
+ priv->ip6_privacy_tempaddr_path = new_path;
+ if (!nm_utils_get_proc_sys_net_value (priv->ip6_privacy_tempaddr_path,
+ ip_iface,
+ &priv->ip6_privacy_tempaddr_save)) {
+ g_free (priv->ip6_privacy_tempaddr_path);
+ priv->ip6_privacy_tempaddr_path = NULL;
+ }
+}
+
static GObject*
constructor (GType type,
guint n_construct_params,
@@ -287,18 +366,12 @@ constructor (GType type,
goto error;
}
- if (NM_DEVICE_GET_CLASS (dev)->update_hw_address)
- NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev);
-
- if (NM_DEVICE_GET_CLASS (dev)->update_permanent_hw_address)
- NM_DEVICE_GET_CLASS (dev)->update_permanent_hw_address (dev);
-
- if (NM_DEVICE_GET_CLASS (dev)->update_initial_hw_address)
- NM_DEVICE_GET_CLASS (dev)->update_initial_hw_address (dev);
-
priv->dhcp_manager = nm_dhcp_manager_get ();
+ priv->fw_manager = nm_firewall_manager_get ();
+
update_accept_ra_save (dev);
+ update_ip6_privacy_save (dev);
priv->initialized = TRUE;
return object;
@@ -308,6 +381,24 @@ error:
return NULL;
}
+static void
+constructed (GObject *object)
+{
+ NMDevice *dev = NM_DEVICE (object);
+
+ if (NM_DEVICE_GET_CLASS (dev)->update_hw_address)
+ NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev);
+
+ if (NM_DEVICE_GET_CLASS (dev)->update_permanent_hw_address)
+ NM_DEVICE_GET_CLASS (dev)->update_permanent_hw_address (dev);
+
+ if (NM_DEVICE_GET_CLASS (dev)->update_initial_hw_address)
+ NM_DEVICE_GET_CLASS (dev)->update_initial_hw_address (dev);
+
+ if (G_OBJECT_CLASS (nm_device_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_device_parent_class)->constructed (object);
+}
+
static gboolean
nm_device_hw_is_up (NMDevice *self)
{
@@ -412,14 +503,14 @@ nm_device_set_ip_iface (NMDevice *self, const char *iface)
priv->ip_iface = g_strdup (iface);
if (priv->ip_iface) {
priv->ip_ifindex = nm_netlink_iface_to_index (priv->ip_iface);
- if (!priv->ip_ifindex) {
+ if (priv->ip_ifindex < 0) {
nm_log_warn (LOGD_HW, "(%s): failed to look up interface index", iface);
}
}
/* Emit change notification */
if (g_strcmp0 (old_ip_iface, priv->ip_iface))
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_IP_IFACE);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_IP_IFACE);
g_free (old_ip_iface);
}
@@ -494,6 +585,51 @@ nm_device_get_type_desc (NMDevice *self)
return NM_DEVICE_GET_PRIVATE (self)->type_desc;
}
+/**
+ * nm_device_enslave_slave:
+ * @dev: the master device
+ * @slave: the slave device to enslave
+ *
+ * If @dev is capable of enslaving other devices (ie it's a bridge, bond, etc)
+ * then this function enslaves @slave.
+ *
+ * Returns: %TRUE on success, %FALSE on failure or if this device cannot enslave
+ * other devices.
+ */
+gboolean
+nm_device_enslave_slave (NMDevice *dev, NMDevice *slave)
+{
+ g_return_val_if_fail (dev != NULL, FALSE);
+ g_return_val_if_fail (slave != NULL, FALSE);
+ g_return_val_if_fail (nm_device_get_state (slave) >= NM_DEVICE_STATE_DISCONNECTED, FALSE);
+
+ if (NM_DEVICE_GET_CLASS (dev)->enslave_slave)
+ return NM_DEVICE_GET_CLASS (dev)->enslave_slave (dev, slave);
+ return FALSE;
+}
+
+/**
+ * nm_device_release_slave:
+ * @dev: the master device
+ * @slave: the slave device to release
+ *
+ * If @dev is capable of enslaving other devices (ie it's a bridge, bond, etc)
+ * then this function releases the previously enslaved @slave.
+ *
+ * Returns: %TRUE on success, %FALSE on failure, if this device cannot enslave
+ * other devices, or if @slave was never enslaved.
+ */
+gboolean
+nm_device_release_slave (NMDevice *dev, NMDevice *slave)
+{
+ g_return_val_if_fail (dev != NULL, FALSE);
+ g_return_val_if_fail (slave != NULL, FALSE);
+
+ if (NM_DEVICE_GET_CLASS (dev)->release_slave)
+ return NM_DEVICE_GET_CLASS (dev)->release_slave (dev, slave);
+ return FALSE;
+}
+
/*
* nm_device_get_act_request
*
@@ -508,6 +644,13 @@ nm_device_get_act_request (NMDevice *self)
return NM_DEVICE_GET_PRIVATE (self)->act_request;
}
+NMConnection *
+nm_device_get_connection (NMDevice *self)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+
+ return priv->act_request ? nm_act_request_get_connection (priv->act_request) : NULL;
+}
gboolean
nm_device_is_available (NMDevice *self)
@@ -522,6 +665,36 @@ nm_device_is_available (NMDevice *self)
return TRUE;
}
+gboolean
+nm_device_get_enabled (NMDevice *self)
+{
+ g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (self), FALSE);
+
+ if (NM_DEVICE_GET_CLASS (self)->get_enabled)
+ return NM_DEVICE_GET_CLASS (self)->get_enabled (self);
+ return TRUE;
+}
+
+void
+nm_device_set_enabled (NMDevice *self, gboolean enabled)
+{
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (NM_IS_DEVICE (self));
+
+ if (NM_DEVICE_GET_CLASS (self)->set_enabled)
+ NM_DEVICE_GET_CLASS (self)->set_enabled (self, enabled);
+}
+
+RfKillType
+nm_device_get_rfkill_type (NMDevice *self)
+{
+ g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (self), FALSE);
+
+ return NM_DEVICE_GET_PRIVATE (self)->rfkill_type;
+}
+
static gboolean
autoconnect_allowed_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
@@ -589,9 +762,7 @@ nm_device_complete_connection (NMDevice *self,
g_return_val_if_fail (connection != NULL, FALSE);
if (!NM_DEVICE_GET_CLASS (self)->complete_connection) {
- g_set_error (error,
- NM_DEVICE_INTERFACE_ERROR,
- NM_DEVICE_INTERFACE_ERROR_CONNECTION_INVALID,
+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CONNECTION_INVALID,
"Device class %s had no complete_connection method",
G_OBJECT_TYPE_NAME (self));
return FALSE;
@@ -605,9 +776,41 @@ nm_device_complete_connection (NMDevice *self,
if (success)
success = nm_connection_verify (connection, error);
+ /* If ip6-privacy is unknown, enable it with temporary address preferred */
+ if (success) {
+ NMSettingIP6Config *s_ip6 = nm_connection_get_setting_ip6_config (connection);
+ if (s_ip6 && nm_setting_ip6_config_get_ip6_privacy (s_ip6) == NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN)
+ g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_IP6_PRIVACY,
+ NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR, NULL);
+ }
+
return success;
}
+gboolean
+nm_device_check_connection_compatible (NMDevice *device,
+ NMConnection *connection,
+ GError **error)
+{
+ g_return_val_if_fail (device != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+ g_return_val_if_fail (connection != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
+
+ if (NM_DEVICE_GET_CLASS (device)->check_connection_compatible)
+ return NM_DEVICE_GET_CLASS (device)->check_connection_compatible (device, connection, error);
+ return TRUE;
+}
+
+gboolean
+nm_device_can_assume_connections (NMDevice *device)
+{
+ g_return_val_if_fail (device != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+
+ return !!NM_DEVICE_GET_CLASS (device)->connection_match_config;
+}
+
static void
dnsmasq_state_changed_cb (NMDnsMasqManager *manager, guint32 status, gpointer user_data)
{
@@ -679,25 +882,22 @@ activation_source_schedule (NMDevice *self, GSourceFunc func, int family)
gboolean
nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6)
{
- NMActRequest *req;
NMConnection *connection;
NMSettingIP4Config *s_ip4;
NMSettingIP6Config *s_ip6;
g_return_val_if_fail (self != NULL, TRUE);
- req = nm_device_get_act_request (self);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (self);
g_assert (connection);
/* Fail the connection if the failed IP method is required to complete */
if (ip6) {
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6 && !nm_setting_ip6_config_get_may_fail (s_ip6))
return TRUE;
} else {
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4 && !nm_setting_ip4_config_get_may_fail (s_ip4))
return TRUE;
}
@@ -705,185 +905,48 @@ nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6)
return FALSE;
}
-static void
-ip6_addrconf_complete (NMIP6Manager *ip6_manager,
- int ifindex,
- guint dhcp_opts,
- gboolean success,
- gpointer user_data)
-{
- NMDevice *self = NM_DEVICE (user_data);
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- NMActRequest *req;
- NMConnection *connection;
- NMActStageReturn ret;
- NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
- NMDeviceState state;
-
- if (ifindex != nm_device_get_ip_ifindex (self))
- return;
- req = nm_device_get_act_request (self);
- if (!req)
- return;
- connection = nm_act_request_get_connection (req);
- g_assert (connection);
-
- if (!priv->ip6_waiting_for_config)
- return;
-
- priv->ip6_waiting_for_config = FALSE;
-
- if (!success) {
- nm_device_activate_schedule_stage4_ip6_config_timeout (self);
- return;
- }
-
- priv->dhcp6_mode = dhcp_opts;
-
- /* If addrconf is all that's required, we're done */
- if (priv->dhcp6_mode == IP6_DHCP_OPT_NONE) {
- nm_device_activate_schedule_stage4_ip6_config_get (self);
- return;
- }
-
- /* If the router said to use DHCP for managed or otherconf, do it */
-
- /* Don't re-start DHCPv6 if it's already in progress */
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
- if ((state != NM_DEVICE_STATE_IP_CONFIG) || priv->dhcp6_client)
- return;
-
- nm_log_info (LOGD_DEVICE | LOGD_DHCP6,
- "Activation (%s) Stage 3 of 5 (IP Configure Start) starting DHCPv6"
- " as requested by IPv6 router...",
- priv->iface);
-
- ret = dhcp6_start (self, connection, priv->dhcp6_mode, &reason);
- switch (ret) {
- case NM_ACT_STAGE_RETURN_SUCCESS:
- /* Shouldn't get this, but handle it anyway */
- g_warn_if_reached ();
- nm_device_activate_schedule_stage4_ip6_config_get (self);
- break;
- case NM_ACT_STAGE_RETURN_POSTPONE:
- /* Success; wait for DHCPv6 to complete */
- break;
- default:
- nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
- break;
- }
-}
-
-static void
-ip6_config_changed (NMIP6Manager *ip6_manager,
- int ifindex,
- guint dhcp_opts,
- gboolean success,
- gpointer user_data)
-{
- NMDevice *self = NM_DEVICE (user_data);
-
- if (ifindex != nm_device_get_ip_ifindex (self))
- return;
- if (!nm_device_get_act_request (self))
- return;
-
- /* FIXME: re-run DHCPv6 here to get any new nameservers or whatever */
-
- if (!success && (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)) {
- nm_device_state_changed (self,
- NM_DEVICE_STATE_FAILED,
- NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
- return;
- }
-
- nm_device_activate_schedule_stage4_ip6_config_get (self);
-}
-
static gboolean
ip6_method_matches (NMConnection *connection, const char *match)
{
NMSettingIP6Config *s_ip6;
const char *method = NULL;
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6) {
method = nm_setting_ip6_config_get_method (s_ip6);
g_assert (method);
}
- /* Treat missing IP6 setting as IGNORE */
- if (!s_ip6 && !strcmp (match, NM_SETTING_IP6_CONFIG_METHOD_IGNORE))
+ /* Treat missing IP6 setting as AUTO */
+ if (!s_ip6 && !strcmp (match, NM_SETTING_IP6_CONFIG_METHOD_AUTO))
return TRUE;
return method && !strcmp (method, match);
}
-static gboolean
-addrconf6_setup (NMDevice *self)
+static NMActStageReturn
+real_act_stage1_prepare (NMDevice *self, NMDeviceStateReason *reason)
{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMActRequest *req;
- NMConnection *connection;
- NMSettingIP6Config *s_ip6;
- gboolean success;
+ NMActiveConnection *master_ac;
+ NMDevice *master;
+ NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS;
req = nm_device_get_act_request (self);
g_assert (req);
- connection = nm_act_request_get_connection (req);
- g_assert (connection);
-
- if (!priv->ip6_manager) {
- priv->ip6_manager = nm_ip6_manager_get ();
- priv->ip6_addrconf_sigid = g_signal_connect (priv->ip6_manager,
- "addrconf-complete",
- G_CALLBACK (ip6_addrconf_complete),
- self);
- priv->ip6_config_changed_sigid = g_signal_connect (priv->ip6_manager,
- "config-changed",
- G_CALLBACK (ip6_config_changed),
- self);
- }
-
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
- success = nm_ip6_manager_prepare_interface (priv->ip6_manager,
- nm_device_get_ip_ifindex (self),
- s_ip6,
- priv->ip6_accept_ra_path);
- if (success)
- priv->ip6_waiting_for_config = TRUE;
-
- return success;
-}
-
-static void
-addrconf6_cleanup (NMDevice *self)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- if (!priv->ip6_manager)
- return;
+ /* If the interface is going to be a slave, let the master enslave it here */
+ master_ac = nm_act_request_get_dependency (req);
+ if (master_ac && NM_IS_ACT_REQUEST (master_ac)) {
+ /* FIXME: handle VPNs here too */
- if (priv->ip6_addrconf_sigid) {
- g_signal_handler_disconnect (priv->ip6_manager,
- priv->ip6_addrconf_sigid);
- priv->ip6_addrconf_sigid = 0;
- }
- if (priv->ip6_config_changed_sigid) {
- g_signal_handler_disconnect (priv->ip6_manager,
- priv->ip6_config_changed_sigid);
- priv->ip6_config_changed_sigid = 0;
+ master = NM_DEVICE (nm_act_request_get_device (NM_ACT_REQUEST (master_ac)));
+ g_assert (master);
+ if (!nm_device_enslave_slave (master, self))
+ ret = NM_ACT_STAGE_RETURN_FAILURE;
}
- nm_ip6_manager_cancel_addrconf (priv->ip6_manager, nm_device_get_ip_ifindex (self));
- g_object_unref (priv->ip6_manager);
- priv->ip6_manager = NULL;
-}
-
-static NMActStageReturn
-real_act_stage1_prepare (NMDevice *self, NMDeviceStateReason *reason)
-{
- return NM_ACT_STAGE_RETURN_SUCCESS;
+ return ret;
}
/*
@@ -904,7 +967,12 @@ nm_device_activate_stage1_device_prepare (gpointer user_data)
/* Clear the activation source ID now that this stage has run */
activation_source_clear (self, FALSE, 0);
- priv->ip4_ready = priv->ip6_ready = FALSE;
+ if (priv->act_dep_timeout_id) {
+ g_source_remove (priv->act_dep_timeout_id);
+ priv->act_dep_timeout_id = 0;
+ }
+
+ priv->ip4_state = priv->ip6_state = IP_NONE;
iface = nm_device_get_iface (self);
nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) started...", iface);
@@ -1029,6 +1097,9 @@ nm_device_activate_schedule_stage2_device_config (NMDevice *self)
nm_device_get_iface (self));
}
+/*********************************************/
+/* avahi-autoipd stuff */
+
static void
aipd_timeout_remove (NMDevice *self)
{
@@ -1062,28 +1133,20 @@ aipd_cleanup (NMDevice *self)
}
aipd_timeout_remove (self);
-
- priv->aipd_addr = 0;
}
static NMIP4Config *
-aipd_get_ip4_config (NMDevice *self, NMDeviceStateReason *reason)
+aipd_get_ip4_config (NMDevice *self, struct in_addr lla)
{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMIP4Config *config = NULL;
NMIP4Address *addr;
NMIP4Route *route;
- g_return_val_if_fail (priv->aipd_addr > 0, NULL);
-
config = nm_ip4_config_new ();
- if (!config) {
- *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
- return NULL;
- }
+ g_assert (config);
addr = nm_ip4_address_new ();
- nm_ip4_address_set_address (addr, (guint32) priv->aipd_addr);
+ nm_ip4_address_set_address (addr, (guint32) lla.s_addr);
nm_ip4_address_set_prefix (addr, 16);
nm_ip4_config_take_address (config, addr);
@@ -1098,35 +1161,19 @@ aipd_get_ip4_config (NMDevice *self, NMDeviceStateReason *reason)
return config;
}
-static gboolean
-handle_autoip_change (NMDevice *self, NMDeviceStateReason *reason)
+static void
+autoip_changed (NMDevice *self,
+ NMIP4Config *config,
+ NMSettingIP4Config *s_ip4)
{
- NMActRequest *req;
- NMConnection *connection;
- NMIP4Config *config;
-
- g_return_val_if_fail (reason != NULL, FALSE);
-
- config = aipd_get_ip4_config (self, reason);
- if (!config) {
- nm_log_err (LOGD_AUTOIP4, "failed to get autoip config for rebind");
- return FALSE;
- }
-
- req = nm_device_get_act_request (self);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
- g_assert (connection);
-
- g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP4_CONFIG, config);
+ NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
- if (!nm_device_set_ip4_config (self, config, FALSE, reason)) {
+ nm_utils_merge_ip4_config (config, s_ip4);
+ if (!nm_device_set_ip4_config (self, config, FALSE, &reason)) {
nm_log_err (LOGD_AUTOIP4, "(%s): failed to update IP4 config in response to autoip event.",
- nm_device_get_iface (self));
- return FALSE;
+ nm_device_get_iface (self));
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
}
-
- return TRUE;
}
#define IPV4LL_NETWORK (htonl (0xA9FE0000L))
@@ -1138,74 +1185,62 @@ nm_device_handle_autoip4_event (NMDevice *self,
const char *address)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- NMActRequest *req;
NMConnection *connection = NULL;
NMSettingIP4Config *s_ip4 = NULL;
- NMDeviceState state;
const char *iface, *method = NULL;
g_return_if_fail (event != NULL);
- req = nm_device_get_act_request (self);
- if (!req)
+ if (priv->act_request == NULL)
return;
- connection = nm_act_request_get_connection (req);
- if (!connection)
- return;
+ connection = nm_act_request_get_connection (priv->act_request);
+ g_assert (connection);
/* Ignore if the connection isn't an AutoIP connection */
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
method = nm_setting_ip4_config_get_method (s_ip4);
- if (!s_ip4 || !method || strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL))
+ if (g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL) != 0)
return;
iface = nm_device_get_iface (self);
- state = nm_device_get_state (self);
if (strcmp (event, "BIND") == 0) {
- struct in_addr ip;
- NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+ struct in_addr lla;
+ NMIP4Config *config;
- if (inet_pton (AF_INET, address, &ip) <= 0) {
+ if (inet_pton (AF_INET, address, &lla) <= 0) {
nm_log_err (LOGD_AUTOIP4, "(%s): invalid address %s received from avahi-autoipd.",
iface, address);
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_AUTOIP_ERROR);
return;
}
- if ((ip.s_addr & IPV4LL_NETMASK) != IPV4LL_NETWORK) {
+ if ((lla.s_addr & IPV4LL_NETMASK) != IPV4LL_NETWORK) {
nm_log_err (LOGD_AUTOIP4, "(%s): invalid address %s received from avahi-autoipd (not link-local).",
iface, address);
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_AUTOIP_ERROR);
return;
}
- switch (state) {
- case NM_DEVICE_STATE_IP_CONFIG:
- if (priv->aipd_addr) {
- nm_log_warn (LOGD_AUTOIP4, "(%s): already have autoip address!", iface);
- return;
- }
+ config = aipd_get_ip4_config (self, lla);
+ if (config == NULL) {
+ nm_log_err (LOGD_AUTOIP4, "failed to get autoip config");
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
+ return;
+ }
- priv->aipd_addr = ip.s_addr;
+ if (priv->ip4_state == IP_CONF) {
aipd_timeout_remove (self);
- nm_device_activate_schedule_stage4_ip4_config_get (self);
- break;
- case NM_DEVICE_STATE_IP_CHECK:
- case NM_DEVICE_STATE_SECONDARIES:
- case NM_DEVICE_STATE_ACTIVATED:
- priv->aipd_addr = ip.s_addr;
- if (!handle_autoip_change (self, &reason))
- nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
- break;
- default:
- nm_log_warn (LOGD_AUTOIP4, "(%s): unexpected avahi-autoip event %s for %s.",
- iface, event, address);
- break;
- }
+ nm_device_activate_schedule_ip4_config_result (self, config);
+ } else if (priv->ip4_state == IP_DONE) {
+ autoip_changed (self, config, s_ip4);
+ } else
+ g_assert_not_reached ();
+
+ g_object_unref (config);
} else {
nm_log_warn (LOGD_AUTOIP4, "(%s): autoip address %s no longer valid because '%s'.",
iface, address, event);
@@ -1255,15 +1290,14 @@ aipd_timeout_cb (gpointer user_data)
NMDevice *self = NM_DEVICE (user_data);
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- if (!priv->aipd_timeout)
- return FALSE;
- priv->aipd_timeout = 0;
-
- nm_log_info (LOGD_AUTOIP4, "(%s): avahi-autoipd timed out.", nm_device_get_iface (self));
- aipd_cleanup (self);
+ if (priv->aipd_timeout) {
+ nm_log_info (LOGD_AUTOIP4, "(%s): avahi-autoipd timed out.", nm_device_get_iface (self));
+ priv->aipd_timeout = 0;
+ aipd_cleanup (self);
- if (nm_device_get_state (self) == NM_DEVICE_STATE_IP_CONFIG)
- nm_device_activate_schedule_stage4_ip4_config_timeout (self);
+ if (priv->ip4_state == IP_CONF)
+ nm_device_activate_schedule_ip4_config_timeout (self);
+ }
return FALSE;
}
@@ -1279,12 +1313,12 @@ aipd_child_setup (gpointer user_data G_GNUC_UNUSED)
setpgid (pid, pid);
}
-static gboolean
-aipd_exec (NMDevice *self, GError **error)
+static NMActStageReturn
+aipd_start (NMDevice *self, NMDeviceStateReason *reason)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ const char *iface = nm_device_get_iface (self);
char *argv[6], *cmdline;
- gboolean success = FALSE;
const char **aipd_binary = NULL;
static const char *aipd_paths[] = {
"/usr/sbin/avahi-autoipd",
@@ -1292,6 +1326,7 @@ aipd_exec (NMDevice *self, GError **error)
NULL
};
int i = 0;
+ GError *error = NULL;
aipd_cleanup (self);
@@ -1304,8 +1339,11 @@ aipd_exec (NMDevice *self, GError **error)
}
if (!*aipd_binary) {
- g_set_error (error, 0, 0, "%s", "couldn't find avahi-autoipd");
- return FALSE;
+ nm_log_warn (LOGD_DEVICE | LOGD_AUTOIP4,
+ "Activation (%s) Stage 3 of 5 (IP Configure Start) failed"
+ " to start avahi-autoipd: not found", iface);
+ *reason = NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED;
+ return NM_ACT_STAGE_RETURN_FAILURE;
}
argv[i++] = (char *) (*aipd_binary);
@@ -1317,13 +1355,24 @@ aipd_exec (NMDevice *self, GError **error)
argv[i++] = NULL;
cmdline = g_strjoinv (" ", argv);
- nm_log_dbg(LOGD_AUTOIP4, "running: %s", cmdline);
+ nm_log_dbg (LOGD_AUTOIP4, "running: %s", cmdline);
g_free (cmdline);
- success = g_spawn_async ("/", argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD,
- &aipd_child_setup, NULL, &(priv->aipd_pid), error);
- if (!success)
- return FALSE;
+ if (!g_spawn_async ("/", argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD,
+ &aipd_child_setup, NULL, &(priv->aipd_pid), &error)) {
+ nm_log_warn (LOGD_DEVICE | LOGD_AUTOIP4,
+ "Activation (%s) Stage 3 of 5 (IP Configure Start) failed"
+ " to start avahi-autoipd: %s",
+ iface,
+ error && error->message ? error->message : "(unknown)");
+ g_clear_error (&error);
+ aipd_cleanup (self);
+ return NM_ACT_STAGE_RETURN_FAILURE;
+ }
+
+ nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4,
+ "Activation (%s) Stage 3 of 5 (IP Configure Start) started"
+ " avahi-autoipd...", iface);
/* Monitor the child process so we know when it dies */
priv->aipd_watch = g_child_watch_add (priv->aipd_pid, aipd_watch_cb, self);
@@ -1331,9 +1380,12 @@ aipd_exec (NMDevice *self, GError **error)
/* Start a timeout to bound the address attempt */
priv->aipd_timeout = g_timeout_add_seconds (20, aipd_timeout_cb, self);
- return TRUE;
+ return NM_ACT_STAGE_RETURN_POSTPONE;
}
+/*********************************************/
+/* DHCPv4 stuff */
+
static void
dhcp4_add_option_cb (gpointer key, gpointer value, gpointer user_data)
{
@@ -1343,156 +1395,95 @@ dhcp4_add_option_cb (gpointer key, gpointer value, gpointer user_data)
}
static void
-dhcp6_add_option_cb (gpointer key, gpointer value, gpointer user_data)
+dhcp4_lease_change (NMDevice *device, NMIP4Config *config)
{
- nm_dhcp6_config_add_option (NM_DHCP6_CONFIG (user_data),
- (const char *) key,
- (const char *) value);
-}
-
-static void
-handle_dhcp_lease_change (NMDevice *device, gboolean ipv6)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
- NMIP4Config *ip4_config;
- NMSettingIP4Config *s_ip4;
- NMIP6Config *ip6_config;
- NMSettingIP6Config *s_ip6;
NMConnection *connection;
- NMActRequest *req;
NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
- gboolean assumed;
- req = nm_device_get_act_request (device);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ if (config == NULL) {
+ nm_log_warn (LOGD_DHCP4, "(%s): failed to get DHCPv4 config for rebind",
+ nm_device_get_ip_iface (device));
+ nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
+ return;
+ }
+
+ connection = nm_device_get_connection (device);
g_assert (connection);
- assumed = nm_act_request_get_assumed (req);
-
- if (ipv6) {
- ip6_config = nm_dhcp_client_get_ip6_config (priv->dhcp6_client, FALSE);
- if (!ip6_config) {
- nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv6 config for rebind",
- nm_device_get_ip_iface (device));
- nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
- return;
- }
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
- nm_utils_merge_ip6_config (ip6_config, s_ip6);
+ /* Merge with user overrides */
+ nm_utils_merge_ip4_config (config, nm_connection_get_setting_ip4_config (connection));
- g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP6_CONFIG, ip6_config);
+ if (!nm_device_set_ip4_config (device, config, FALSE, &reason)) {
+ nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv4 config in response to DHCP event.",
+ nm_device_get_ip_iface (device));
+ nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);
+ return;
+ }
- if (nm_device_set_ip6_config (device, ip6_config, assumed, &reason)) {
- nm_dhcp6_config_reset (priv->dhcp6_config);
- nm_dhcp_client_foreach_option (priv->dhcp6_client,
- dhcp6_add_option_cb,
- priv->dhcp6_config);
- nm_utils_call_dispatcher ("dhcp6-change", connection, device, NULL, NULL, NULL);
- } else {
- nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv6 config in response to DHCP event.",
- nm_device_get_ip_iface (device));
- nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);
- }
- } else {
- ip4_config = nm_dhcp_client_get_ip4_config (priv->dhcp4_client, FALSE);
- if (!ip4_config) {
- nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv4 config for rebind",
- nm_device_get_ip_iface (device));
- nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
- return;
- }
+ /* Notify dispatcher scripts of new DHCP4 config */
+ nm_utils_call_dispatcher ("dhcp4-change", connection, device, NULL, NULL, NULL);
+}
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
- nm_utils_merge_ip4_config (ip4_config, s_ip4);
+static void
+dhcp4_fail (NMDevice *device, gboolean timeout)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
- g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP4_CONFIG, ip4_config);
+ nm_dhcp4_config_reset (priv->dhcp4_config);
- if (nm_device_set_ip4_config (device, ip4_config, assumed, &reason)) {
- nm_dhcp4_config_reset (priv->dhcp4_config);
- nm_dhcp_client_foreach_option (priv->dhcp4_client,
- dhcp4_add_option_cb,
- priv->dhcp4_config);
- nm_utils_call_dispatcher ("dhcp4-change", connection, device, NULL, NULL, NULL);
- } else {
- nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv4 config in response to DHCP event.",
- nm_device_get_ip_iface (device));
- nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);
- }
- }
+ if (timeout || (priv->ip4_state == IP_CONF))
+ nm_device_activate_schedule_ip4_config_timeout (device);
+ else if (priv->ip4_state == IP_DONE)
+ nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
}
static void
-dhcp_state_changed (NMDHCPClient *client,
- NMDHCPState state,
- gpointer user_data)
+dhcp4_state_changed (NMDHCPClient *client,
+ NMDHCPState state,
+ gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
NMDeviceState dev_state;
- gboolean ipv6;
+ NMIP4Config *config;
- ipv6 = nm_dhcp_client_get_ipv6 (client);
- dev_state = nm_device_get_state (device);
+ g_return_if_fail (nm_dhcp_client_get_ipv6 (client) == FALSE);
- if (ipv6) {
- nm_log_dbg (LOGD_DHCP6, "(%s): new DHCPv6 client state %d",
- nm_device_get_iface (device), dev_state);
- } else {
- nm_log_dbg (LOGD_DHCP4, "(%s): new DHCPv4 client state %d",
- nm_device_get_iface (device), dev_state);
- }
+ nm_log_dbg (LOGD_DHCP4, "(%s): new DHCPv4 client state %d",
+ nm_device_get_iface (device), state);
+
+ dev_state = nm_device_get_state (device);
switch (state) {
case DHC_BOUND4: /* lease obtained */
- case DHC_BOUND6:
case DHC_RENEW4: /* lease renewed */
- case DHC_RENEW6: /* lease renewed */
case DHC_REBOOT: /* have valid lease, but now obtained a different one */
case DHC_REBIND4: /* new, different lease */
- case DHC_REBIND6: /* new, different lease */
- if (dev_state == NM_DEVICE_STATE_IP_CONFIG) {
- if (ipv6)
- nm_device_activate_schedule_stage4_ip6_config_get (device);
- else
- nm_device_activate_schedule_stage4_ip4_config_get (device);
- } else if (dev_state == NM_DEVICE_STATE_ACTIVATED)
- handle_dhcp_lease_change (device, ipv6);
- break;
- case DHC_TIMEOUT: /* timed out contacting DHCP server */
- if (ipv6) {
- nm_dhcp6_config_reset (priv->dhcp6_config);
- if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG)
- nm_device_activate_schedule_stage4_ip6_config_timeout (device);
- } else {
+ config = nm_dhcp_client_get_ip4_config (priv->dhcp4_client, FALSE);
+ if (priv->ip4_state == IP_CONF)
+ nm_device_activate_schedule_ip4_config_result (device, config);
+ else if (priv->ip4_state == IP_DONE)
+ dhcp4_lease_change (device, config);
+
+ if (config) {
+ /* Update the DHCP4 config object with new DHCP options */
nm_dhcp4_config_reset (priv->dhcp4_config);
- if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG)
- nm_device_activate_schedule_stage4_ip4_config_timeout (device);
+ nm_dhcp_client_foreach_option (priv->dhcp4_client,
+ dhcp4_add_option_cb,
+ priv->dhcp4_config);
+ g_object_notify (G_OBJECT (device), NM_DEVICE_DHCP4_CONFIG);
+
+ g_object_unref (config);
}
break;
+ case DHC_TIMEOUT: /* timed out contacting DHCP server */
+ dhcp4_fail (device, TRUE);
+ break;
case DHC_END: /* dhclient exited normally */
- /* In IPv6 info-only mode, the client doesn't handle leases so it
- * may exit right after getting a response from the server. That's
- * normal. In that case we just ignore the exit.
- */
- if (ipv6 && (priv->dhcp6_mode == IP6_DHCP_OPT_OTHERCONF))
- break;
- /* Otherwise, fall through */
case DHC_FAIL: /* all attempts to contact server timed out, sleeping */
case DHC_ABEND: /* dhclient exited abnormally */
- if (ipv6)
- nm_dhcp6_config_reset (priv->dhcp6_config);
- else
- nm_dhcp4_config_reset (priv->dhcp4_config);
-
/* dhclient quit and can't get/renew a lease; so kill the connection */
- if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) {
- if (ipv6)
- nm_device_activate_schedule_stage4_ip6_config_timeout (device);
- else
- nm_device_activate_schedule_stage4_ip4_config_timeout (device);
- } else if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED)
- nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
+ dhcp4_fail (device, FALSE);
break;
default:
break;
@@ -1500,21 +1491,15 @@ dhcp_state_changed (NMDHCPClient *client,
}
static void
-dhcp_timeout (NMDHCPClient *client, gpointer user_data)
+dhcp4_timeout (NMDHCPClient *client, gpointer user_data)
{
NMDevice *device = NM_DEVICE (user_data);
- if (!nm_device_get_act_request (device))
- return;
+ g_return_if_fail (nm_device_get_act_request (device) != NULL);
+ g_return_if_fail (nm_dhcp_client_get_ipv6 (client) == FALSE);
nm_dhcp_client_stop (client, FALSE);
-
- if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) {
- if (nm_dhcp_client_get_ipv6 (client))
- nm_device_activate_schedule_stage4_ip6_config_timeout (device);
- else
- nm_device_activate_schedule_stage4_ip4_config_timeout (device);
- }
+ dhcp4_fail (device, TRUE);
}
static NMActStageReturn
@@ -1526,7 +1511,7 @@ dhcp4_start (NMDevice *self,
NMSettingIP4Config *s_ip4;
guint8 *anycast = NULL;
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (priv->dhcp_anycast_address)
anycast = priv->dhcp_anycast_address->data;
@@ -1551,11 +1536,11 @@ dhcp4_start (NMDevice *self,
priv->dhcp4_state_sigid = g_signal_connect (priv->dhcp4_client,
"state-changed",
- G_CALLBACK (dhcp_state_changed),
+ G_CALLBACK (dhcp4_state_changed),
self);
priv->dhcp4_timeout_sigid = g_signal_connect (priv->dhcp4_client,
"timeout",
- G_CALLBACK (dhcp_timeout),
+ G_CALLBACK (dhcp4_timeout),
self);
/* DHCP devices will be notified by the DHCP manager when stuff happens */
@@ -1568,7 +1553,6 @@ nm_device_dhcp4_renew (NMDevice *self, gboolean release)
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMActStageReturn ret;
NMDeviceStateReason reason;
- NMActRequest *req;
NMConnection *connection;
g_return_val_if_fail (priv->dhcp4_client != NULL, FALSE);
@@ -1579,9 +1563,7 @@ nm_device_dhcp4_renew (NMDevice *self, gboolean release)
/* Terminate old DHCP instance and release the old lease */
dhcp4_cleanup (self, TRUE, release);
- req = nm_device_get_act_request (self);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (self);
g_assert (connection);
/* Start DHCP again on the interface */
@@ -1590,63 +1572,315 @@ nm_device_dhcp4_renew (NMDevice *self, gboolean release)
return (ret != NM_ACT_STAGE_RETURN_FAILURE);
}
+/*********************************************/
+
+static GHashTable *shared_ips = NULL;
+
+static void
+release_shared_ip (gpointer data)
+{
+ g_hash_table_remove (shared_ips, data);
+}
+
+static guint32
+reserve_shared_ip (void)
+{
+ guint32 start = (guint32) ntohl (0x0a2a0001); /* 10.42.0.1 */
+ guint32 count = 0;
+
+ while (g_hash_table_lookup (shared_ips, GUINT_TO_POINTER (start + count))) {
+ count += ntohl (0x100);
+ if (count > ntohl (0xFE00)) {
+ nm_log_err (LOGD_SHARING, "ran out of shared IP addresses!");
+ return 0;
+ }
+ }
+
+ g_hash_table_insert (shared_ips, GUINT_TO_POINTER (start + count), GUINT_TO_POINTER (TRUE));
+ return start + count;
+}
+
+static NMIP4Config *
+shared4_new_config (NMDevice *self, NMDeviceStateReason *reason)
+{
+ NMIP4Config *config = NULL;
+ NMIP4Address *addr;
+ guint32 tmp_addr;
+
+ g_return_val_if_fail (self != NULL, NULL);
+
+ if (G_UNLIKELY (shared_ips == NULL))
+ shared_ips = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+ tmp_addr = reserve_shared_ip ();
+ if (!tmp_addr) {
+ *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
+ return NULL;
+ }
+
+ config = nm_ip4_config_new ();
+ addr = nm_ip4_address_new ();
+ nm_ip4_address_set_address (addr, tmp_addr);
+ nm_ip4_address_set_prefix (addr, 24);
+ nm_ip4_config_take_address (config, addr);
+
+ /* Remove the address lock when the object gets disposed */
+ g_object_set_data_full (G_OBJECT (config), "shared-ip",
+ GUINT_TO_POINTER (tmp_addr), release_shared_ip);
+
+ return config;
+}
+
+/*********************************************/
+
static NMActStageReturn
-real_act_stage3_ip4_config_start (NMDevice *self, NMDeviceStateReason *reason)
+real_act_stage3_ip4_config_start (NMDevice *self,
+ NMIP4Config **out_config,
+ NMDeviceStateReason *reason)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMConnection *connection;
NMSettingIP4Config *s_ip4;
- NMActRequest *req;
- NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS;
- const char *method = NULL;
- int ifindex;
+ NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
+ const char *method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- /* Make sure the interface is up before trying to do anything with it */
- ifindex = nm_device_get_ip_ifindex (self);
- if (!nm_system_iface_is_up (ifindex))
- nm_system_iface_set_up (ifindex, TRUE, NULL);
-
- req = nm_device_get_act_request (self);
- connection = nm_act_request_get_connection (req);
-
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ connection = nm_device_get_connection (self);
+ g_assert (connection);
/* If we did not receive IP4 configuration information, default to DHCP */
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
method = nm_setting_ip4_config_get_method (s_ip4);
+ else if (nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME))
+ method = NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
- if (!s_ip4 || !method || !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
+ /* Start IPv4 addressing based on the method requested */
+ if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0)
ret = dhcp4_start (self, connection, reason);
- } else if (s_ip4 && !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) {
- GError *error = NULL;
- const char *iface = nm_device_get_iface (self);
-
- /* Start avahi-autoipd */
- if (aipd_exec (self, &error)) {
- nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4,
- "Activation (%s) Stage 3 of 5 (IP Configure Start) started"
- " avahi-autoipd...", iface);
- ret = NM_ACT_STAGE_RETURN_POSTPONE;
- } else {
- nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4,
- "Activation (%s) Stage 3 of 5 (IP Configure Start) failed"
- " to start avahi-autoipd: %s", iface, error->message);
- g_error_free (error);
- aipd_cleanup (self);
- *reason = NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED;
+ else if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL) == 0)
+ ret = aipd_start (self, reason);
+ else if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) == 0) {
+ /* Use only IPv4 config from the connection data */
+ *out_config = nm_ip4_config_new ();
+ g_assert (*out_config);
+ ret = NM_ACT_STAGE_RETURN_SUCCESS;
+ } else if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED) == 0) {
+ *out_config = shared4_new_config (self, reason);
+ if (*out_config) {
+ priv->dnsmasq_manager = nm_dnsmasq_manager_new (nm_device_get_ip_iface (self));
+ ret = NM_ACT_STAGE_RETURN_SUCCESS;
+ } else
ret = NM_ACT_STAGE_RETURN_FAILURE;
- }
} else if (s_ip4 && !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
/* Nothing to do... */
- priv->ip4_ready = TRUE;
ret = NM_ACT_STAGE_RETURN_STOP;
+ } else {
+ nm_log_warn (LOGD_IP4, "(%s): unhandled IPv4 config method; will fail",
+ nm_device_get_ip_iface (self));
}
return ret;
}
+/*********************************************/
+/* DHCPv6 stuff */
+
+static void
+dhcp6_add_option_cb (gpointer key, gpointer value, gpointer user_data)
+{
+ nm_dhcp6_config_add_option (NM_DHCP6_CONFIG (user_data),
+ (const char *) key,
+ (const char *) value);
+}
+
+static void
+merge_ip6_configs (NMIP6Config *dst, NMIP6Config *src)
+{
+ guint32 i;
+
+ g_return_if_fail (src != NULL);
+ g_return_if_fail (dst != NULL);
+
+ /* addresses */
+ for (i = 0; i < nm_ip6_config_get_num_addresses (src); i++)
+ nm_ip6_config_add_address (dst, nm_ip6_config_get_address (src, i));
+
+ /* ptp address; only replace if src doesn't have one */
+ if (!nm_ip6_config_get_ptp_address (dst))
+ nm_ip6_config_set_ptp_address (dst, nm_ip6_config_get_ptp_address (src));
+
+ /* nameservers */
+ for (i = 0; i < nm_ip6_config_get_num_nameservers (src); i++)
+ nm_ip6_config_add_nameserver (dst, nm_ip6_config_get_nameserver (src, i));
+
+ /* routes */
+ for (i = 0; i < nm_ip6_config_get_num_routes (src); i++)
+ nm_ip6_config_add_route (dst, nm_ip6_config_get_route (src, i));
+
+ /* domains */
+ for (i = 0; i < nm_ip6_config_get_num_domains (src); i++)
+ nm_ip6_config_add_domain (dst, nm_ip6_config_get_domain (src, i));
+
+ /* dns searches */
+ for (i = 0; i < nm_ip6_config_get_num_searches (src); i++)
+ nm_ip6_config_add_search (dst, nm_ip6_config_get_search (src, i));
+
+ if (!nm_ip6_config_get_mss (dst))
+ nm_ip6_config_set_mss (dst, nm_ip6_config_get_mss (src));
+}
+
+static gboolean
+ip6_config_merge_and_apply (NMDevice *self,
+ NMIP6Config *src_config,
+ NMDeviceStateReason *out_reason)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMConnection *connection;
+ gboolean assumed, success;
+ NMIP6Config *composite;
+
+ connection = nm_device_get_connection (self);
+ g_assert (connection);
+
+ /* If no config was passed in, create a new one */
+ composite = nm_ip6_config_new ();
+ g_assert (composite);
+
+ /* Merge in the given config first, if any */
+ if (src_config)
+ merge_ip6_configs (composite, src_config);
+
+ /* Merge RA and DHCPv6 configs into the composite config */
+ if (priv->ac_ip6_config && (src_config != priv->ac_ip6_config))
+ merge_ip6_configs (composite, priv->ac_ip6_config);
+ if (priv->dhcp6_ip6_config && (src_config != priv->dhcp6_ip6_config))
+ merge_ip6_configs (composite, priv->dhcp6_ip6_config);
+
+ /* Merge user overrides into the composite config */
+ nm_utils_merge_ip6_config (composite, nm_connection_get_setting_ip6_config (connection));
+
+ assumed = nm_act_request_get_assumed (priv->act_request);
+ success = nm_device_set_ip6_config (self, composite, assumed, out_reason);
+ g_object_unref (composite);
+ return success;
+}
+
+static void
+dhcp6_lease_change (NMDevice *device)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
+ NMConnection *connection;
+ NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+
+ if (priv->dhcp6_ip6_config == NULL) {
+ nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv6 config for rebind",
+ nm_device_get_ip_iface (device));
+ nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
+ return;
+ }
+
+ g_assert (priv->dhcp6_client); /* sanity check */
+
+ connection = nm_device_get_connection (device);
+ g_assert (connection);
+
+ /* Apply the updated config */
+ if (ip6_config_merge_and_apply (device, NULL, &reason) == FALSE) {
+ nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv6 config in response to DHCP event.",
+ nm_device_get_ip_iface (device));
+ nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);
+ } else {
+ /* Notify dispatcher scripts of new DHCPv6 config */
+ nm_utils_call_dispatcher ("dhcp6-change", connection, device, NULL, NULL, NULL);
+ }
+}
+
+static void
+dhcp6_fail (NMDevice *device, gboolean timeout)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
+
+ nm_dhcp6_config_reset (priv->dhcp6_config);
+
+ if (timeout || (priv->ip6_state == IP_CONF))
+ nm_device_activate_schedule_ip6_config_timeout (device);
+ else if (priv->ip6_state == IP_DONE)
+ nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
+}
+
+static void
+dhcp6_state_changed (NMDHCPClient *client,
+ NMDHCPState state,
+ gpointer user_data)
+{
+ NMDevice *device = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
+ NMDeviceState dev_state;
+
+ g_return_if_fail (nm_dhcp_client_get_ipv6 (client) == TRUE);
+
+ nm_log_dbg (LOGD_DHCP6, "(%s): new DHCPv6 client state %d",
+ nm_device_get_iface (device), state);
+
+ dev_state = nm_device_get_state (device);
+
+ switch (state) {
+ case DHC_BOUND6:
+ case DHC_RENEW6: /* lease renewed */
+ case DHC_REBOOT: /* have valid lease, but now obtained a different one */
+ case DHC_REBIND6: /* new, different lease */
+ if (priv->dhcp6_ip6_config)
+ g_object_unref (priv->dhcp6_ip6_config);
+ priv->dhcp6_ip6_config = nm_dhcp_client_get_ip6_config (priv->dhcp6_client, FALSE);
+ if (priv->ip6_state == IP_CONF)
+ nm_device_activate_schedule_ip6_config_result (device, priv->dhcp6_ip6_config);
+ else if (priv->ip6_state == IP_DONE)
+ dhcp6_lease_change (device);
+
+ if (priv->dhcp6_ip6_config) {
+ /* Update the DHCP6 config object with new DHCP options */
+ nm_dhcp6_config_reset (priv->dhcp6_config);
+ nm_dhcp_client_foreach_option (priv->dhcp6_client,
+ dhcp6_add_option_cb,
+ priv->dhcp6_config);
+ g_object_notify (G_OBJECT (device), NM_DEVICE_DHCP6_CONFIG);
+ }
+ break;
+ case DHC_TIMEOUT: /* timed out contacting DHCP server */
+ dhcp6_fail (device, TRUE);
+ break;
+ case DHC_END: /* dhclient exited normally */
+ /* In IPv6 info-only mode, the client doesn't handle leases so it
+ * may exit right after getting a response from the server. That's
+ * normal. In that case we just ignore the exit.
+ */
+ if (priv->dhcp6_mode == IP6_DHCP_OPT_OTHERCONF)
+ break;
+ /* Otherwise, fall through */
+ case DHC_FAIL: /* all attempts to contact server timed out, sleeping */
+ case DHC_ABEND: /* dhclient exited abnormally */
+ /* dhclient quit and can't get/renew a lease; so kill the connection */
+ dhcp6_fail (device, FALSE);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+dhcp6_timeout (NMDHCPClient *client, gpointer user_data)
+{
+ NMDevice *device = NM_DEVICE (user_data);
+
+ g_return_if_fail (nm_device_get_act_request (device) != NULL);
+ g_return_if_fail (nm_dhcp_client_get_ipv6 (client) == TRUE);
+
+ nm_dhcp_client_stop (client, FALSE);
+ dhcp6_fail (device, TRUE);
+}
+
static NMActStageReturn
dhcp6_start (NMDevice *self,
NMConnection *connection,
@@ -1656,17 +1890,12 @@ dhcp6_start (NMDevice *self,
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
guint8 *anycast = NULL;
- NMSettingIP6Config *s_ip6;
const char *ip_iface;
const struct in6_addr dest = { { { 0xFF,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
int err;
if (!connection) {
- NMActRequest *req;
-
- req = nm_device_get_act_request (self);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (self);
g_assert (connection);
}
@@ -1680,6 +1909,12 @@ dhcp6_start (NMDevice *self,
g_object_unref (priv->dhcp6_config);
priv->dhcp6_config = nm_dhcp6_config_new ();
+ g_warn_if_fail (priv->dhcp6_ip6_config == NULL);
+ if (priv->dhcp6_ip6_config) {
+ g_object_unref (priv->dhcp6_ip6_config);
+ priv->dhcp6_ip6_config = NULL;
+ }
+
/* DHCPv6 communicates with the DHCPv6 server via two multicast addresses,
* ff02::1:2 (link-scope) and ff05::1:3 (site-scope). Make sure we have
* a multicast route (ff00::/8) for client <-> server communication.
@@ -1692,24 +1927,22 @@ dhcp6_start (NMDevice *self,
priv->ip_iface ? priv->ip_iface : priv->iface, nl_geterror (err));
}
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
-
ip_iface = nm_device_get_ip_iface (self);
priv->dhcp6_client = nm_dhcp_manager_start_ip6 (priv->dhcp_manager,
ip_iface,
nm_connection_get_uuid (connection),
- s_ip6,
+ nm_connection_get_setting_ip6_config (connection),
priv->dhcp_timeout,
anycast,
(dhcp_opt == IP6_DHCP_OPT_OTHERCONF) ? TRUE : FALSE);
if (priv->dhcp6_client) {
priv->dhcp6_state_sigid = g_signal_connect (priv->dhcp6_client,
"state-changed",
- G_CALLBACK (dhcp_state_changed),
+ G_CALLBACK (dhcp6_state_changed),
self);
priv->dhcp6_timeout_sigid = g_signal_connect (priv->dhcp6_client,
"timeout",
- G_CALLBACK (dhcp_timeout),
+ G_CALLBACK (dhcp6_timeout),
self);
/* DHCP devices will be notified by the DHCP manager when stuff happens */
@@ -1722,36 +1955,215 @@ dhcp6_start (NMDevice *self,
return ret;
}
+/******************************************/
+
+static void
+ip6_addrconf_complete (NMIP6Manager *ip6_manager,
+ int ifindex,
+ guint dhcp_opts,
+ gboolean success,
+ gpointer user_data)
+{
+ NMDevice *self = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMConnection *connection;
+ NMActStageReturn ret;
+ NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+
+ if (ifindex != nm_device_get_ip_ifindex (self))
+ return;
+ g_return_if_fail (priv->act_request != NULL);
+ connection = nm_device_get_connection (self);
+ g_assert (connection);
+
+ if (!priv->ip6_waiting_for_config)
+ return;
+
+ priv->ip6_waiting_for_config = FALSE;
+
+ if (!success) {
+ nm_device_activate_schedule_ip6_config_timeout (self);
+ return;
+ }
+
+ priv->dhcp6_mode = dhcp_opts;
+
+ /* If addrconf is all that's required, we're done */
+ if (priv->dhcp6_mode == IP6_DHCP_OPT_NONE) {
+ priv->ac_ip6_config = nm_ip6_manager_get_ip6_config (ip6_manager, ifindex);
+ nm_device_activate_schedule_ip6_config_result (self, priv->ac_ip6_config);
+ return;
+ }
+
+ /* If the router said to use DHCP for managed or otherconf, do it */
+
+ /* Don't re-start DHCPv6 if it's already in progress */
+ if (priv->ip6_state != IP_CONF)
+ return;
+
+ nm_log_info (LOGD_DEVICE | LOGD_DHCP6,
+ "Activation (%s) Stage 3 of 5 (IP Configure Start) starting DHCPv6"
+ " as requested by IPv6 router...",
+ priv->iface);
+
+ ret = dhcp6_start (self, connection, priv->dhcp6_mode, &reason);
+ switch (ret) {
+ case NM_ACT_STAGE_RETURN_SUCCESS:
+ /* Shouldn't get this, but handle it anyway */
+ g_warn_if_reached ();
+ priv->ac_ip6_config = nm_ip6_manager_get_ip6_config (ip6_manager, ifindex);
+ nm_device_activate_schedule_ip6_config_result (self, priv->ac_ip6_config);
+ break;
+ case NM_ACT_STAGE_RETURN_POSTPONE:
+ /* Cache acquired autoconf config and wait for DHCPv6 to complete */
+ priv->ac_ip6_config = nm_ip6_manager_get_ip6_config (ip6_manager, ifindex);
+ break;
+ default:
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
+ break;
+ }
+}
+
+static void
+ip6_config_changed (NMIP6Manager *ip6_manager,
+ int ifindex,
+ guint dhcp_opts,
+ gboolean success,
+ gpointer user_data)
+{
+ NMDevice *self = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+
+ if (ifindex != nm_device_get_ip_ifindex (self))
+ return;
+ g_return_if_fail (priv->act_request != NULL);
+
+ /* If autoconf failed and IPv6 previously succeeded, fail */
+ if (!success && (priv->ip6_state == IP_DONE)) {
+ nm_device_state_changed (self,
+ NM_DEVICE_STATE_FAILED,
+ NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
+ return;
+ }
+
+ /* FIXME: re-run DHCPv6 here to get any new nameservers or whatever */
+
+ if (priv->ac_ip6_config)
+ g_object_unref (priv->ac_ip6_config);
+ priv->ac_ip6_config = nm_ip6_manager_get_ip6_config (ip6_manager, ifindex);
+
+ if (ip6_config_merge_and_apply (self, NULL, &reason) == FALSE) {
+ nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv6 config in response to Router Advertisement.",
+ nm_device_get_ip_iface (self));
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
+ }
+}
+
+static gboolean
+addrconf6_start (NMDevice *self)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMConnection *connection;
+ gboolean success;
+
+ connection = nm_device_get_connection (self);
+ g_assert (connection);
+
+ g_warn_if_fail (priv->ac_ip6_config == NULL);
+ if (priv->ac_ip6_config) {
+ g_object_unref (priv->ac_ip6_config);
+ priv->ac_ip6_config = NULL;
+ }
+
+ if (!priv->ip6_manager) {
+ priv->ip6_manager = nm_ip6_manager_get ();
+ priv->ip6_addrconf_sigid = g_signal_connect (priv->ip6_manager,
+ "addrconf-complete",
+ G_CALLBACK (ip6_addrconf_complete),
+ self);
+ priv->ip6_config_changed_sigid = g_signal_connect (priv->ip6_manager,
+ "config-changed",
+ G_CALLBACK (ip6_config_changed),
+ self);
+ }
+
+ success = nm_ip6_manager_prepare_interface (priv->ip6_manager,
+ nm_device_get_ip_ifindex (self),
+ nm_connection_get_setting_ip6_config (connection),
+ priv->ip6_accept_ra_path);
+ if (success) {
+ priv->ip6_waiting_for_config = TRUE;
+ nm_ip6_manager_begin_addrconf (priv->ip6_manager, nm_device_get_ip_ifindex (self));
+ }
+
+ return success;
+}
+
+static void
+addrconf6_cleanup (NMDevice *self)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+
+ if (priv->ac_ip6_config) {
+ g_object_unref (priv->ac_ip6_config);
+ priv->ac_ip6_config = NULL;
+ }
+
+ if (!priv->ip6_manager)
+ return;
+
+ if (priv->ip6_addrconf_sigid) {
+ g_signal_handler_disconnect (priv->ip6_manager,
+ priv->ip6_addrconf_sigid);
+ priv->ip6_addrconf_sigid = 0;
+ }
+ if (priv->ip6_config_changed_sigid) {
+ g_signal_handler_disconnect (priv->ip6_manager,
+ priv->ip6_config_changed_sigid);
+ priv->ip6_config_changed_sigid = 0;
+ }
+
+ nm_ip6_manager_cancel_addrconf (priv->ip6_manager, nm_device_get_ip_ifindex (self));
+ g_object_unref (priv->ip6_manager);
+ priv->ip6_manager = NULL;
+}
+
+/******************************************/
+
static NMActStageReturn
-real_act_stage3_ip6_config_start (NMDevice *self, NMDeviceStateReason *reason)
+real_act_stage3_ip6_config_start (NMDevice *self,
+ NMIP6Config **out_config,
+ NMDeviceStateReason *reason)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
const char *ip_iface;
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
- NMActRequest *req;
NMConnection *connection;
+ NMSettingIP6Config *s_ip6;
+ int conf_use_tempaddr;
+ NMSettingIP6ConfigPrivacy ip6_privacy = NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN;
+ const char *ip6_privacy_str = "0\n";
g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- req = nm_device_get_act_request (self);
- g_assert (req);
- connection = nm_act_request_get_connection (req);
+ connection = nm_device_get_connection (self);
g_assert (connection);
ip_iface = nm_device_get_ip_iface (self);
update_accept_ra_save (self);
+ update_ip6_privacy_save (self);
priv->dhcp6_mode = IP6_DHCP_OPT_NONE;
if ( ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_AUTO)
|| ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) {
- if (!addrconf6_setup (self)) {
+ if (!addrconf6_start (self)) {
*reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
- goto out;
- }
- nm_ip6_manager_begin_addrconf (priv->ip6_manager, nm_device_get_ip_ifindex (self));
- ret = NM_ACT_STAGE_RETURN_POSTPONE;
+ ret = NM_ACT_STAGE_RETURN_FAILURE;
+ } else
+ ret = NM_ACT_STAGE_RETURN_POSTPONE;
} else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) {
/* Router advertisements shouldn't be used in pure DHCP mode */
if (priv->ip6_accept_ra_path)
@@ -1765,19 +2177,52 @@ real_act_stage3_ip6_config_start (NMDevice *self, NMDeviceStateReason *reason)
nm_utils_do_sysctl (priv->ip6_accept_ra_path,
priv->ip6_accept_ra_save ? "1\n" : "0\n");
}
-
- priv->ip6_ready = TRUE;
ret = NM_ACT_STAGE_RETURN_STOP;
} else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) {
+ /* New blank config */
+ *out_config = nm_ip6_config_new ();
+ g_assert (*out_config);
+
/* Router advertisements shouldn't be used in manual mode */
if (priv->ip6_accept_ra_path)
nm_utils_do_sysctl (priv->ip6_accept_ra_path, "0\n");
ret = NM_ACT_STAGE_RETURN_SUCCESS;
+ } else {
+ nm_log_warn (LOGD_IP6, "(%s): unhandled IPv6 config method; will fail",
+ nm_device_get_ip_iface (self));
}
/* Other methods (shared) aren't implemented yet */
-out:
+ /* Enable/disable IPv6 Privacy Extensions.
+ * If a global value is configured by sysadmin (e.g. /etc/sysctl.conf),
+ * use that value instead of per-connection value.
+ */
+ conf_use_tempaddr = nm_backend_ipv6_use_tempaddr ();
+ if (conf_use_tempaddr >= 0)
+ ip6_privacy = conf_use_tempaddr;
+ else {
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
+ if (s_ip6)
+ ip6_privacy = nm_setting_ip6_config_get_ip6_privacy (s_ip6);
+ }
+ ip6_privacy = CLAMP (ip6_privacy, NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN, NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR);
+
+ switch (ip6_privacy) {
+ case NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN:
+ case NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED:
+ ip6_privacy_str = "0\n";
+ break;
+ case NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR:
+ ip6_privacy_str = "1\n";
+ break;
+ case NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR:
+ ip6_privacy_str = "2\n";
+ break;
+ }
+ if (priv->ip6_privacy_tempaddr_path)
+ nm_utils_do_sysctl (priv->ip6_privacy_tempaddr_path, ip6_privacy_str);
+
return ret;
}
@@ -1792,9 +2237,13 @@ static gboolean
nm_device_activate_stage3_ip_config_start (gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
const char *iface;
NMActStageReturn ret;
NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+ NMIP4Config *ip4_config = NULL;
+ NMIP6Config *ip6_config = NULL;
+ int ifindex;
/* Clear the activation source ID now that this stage has run */
activation_source_clear (self, FALSE, 0);
@@ -1803,271 +2252,119 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data)
nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) started...", iface);
nm_device_state_changed (self, NM_DEVICE_STATE_IP_CONFIG, NM_DEVICE_STATE_REASON_NONE);
- ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip4_config_start (self, &reason);
- if (ret == NM_ACT_STAGE_RETURN_SUCCESS)
- nm_device_activate_schedule_stage4_ip4_config_get (self);
- else if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
+ /* Make sure the interface is up before trying to do anything with it */
+ ifindex = nm_device_get_ip_ifindex (self);
+ if ((ifindex > 0) && (nm_system_iface_is_up (ifindex) == FALSE))
+ nm_system_iface_set_up (ifindex, TRUE, NULL);
+
+ priv->ip4_state = priv->ip6_state = IP_CONF;
+
+ ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip4_config_start (self, &ip4_config, &reason);
+ if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
+ g_assert (ip4_config);
+ nm_device_activate_schedule_ip4_config_result (self, ip4_config);
+ g_object_unref (ip4_config);
+ } else if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
goto out;
} else if (ret == NM_ACT_STAGE_RETURN_STOP) {
/* Nothing to do */
+ priv->ip4_state = IP_DONE;
} else
g_assert (ret == NM_ACT_STAGE_RETURN_POSTPONE);
- ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip6_config_start (self, &reason);
- if (ret == NM_ACT_STAGE_RETURN_SUCCESS)
- nm_device_activate_schedule_stage4_ip6_config_get (self);
- else if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
+ ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip6_config_start (self, &ip6_config, &reason);
+ if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
+ g_assert (ip6_config);
+ nm_device_activate_schedule_ip6_config_result (self, ip6_config);
+ g_object_unref (ip6_config);
+ } else if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
goto out;
} else if (ret == NM_ACT_STAGE_RETURN_STOP) {
/* Nothing to do */
+ priv->ip6_state = IP_DONE;
} else
g_assert (ret == NM_ACT_STAGE_RETURN_POSTPONE);
out:
nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) complete.", iface);
- return FALSE;
-}
-
-/*
- * nm_device_activate_schedule_stage3_ip_config_start
- *
- * Schedule IP configuration start
- */
-void
-nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self)
-{
- NMDevicePrivate *priv;
-
- g_return_if_fail (NM_IS_DEVICE (self));
-
- priv = NM_DEVICE_GET_PRIVATE (self);
- g_return_if_fail (priv->act_request);
-
- activation_source_schedule (self, nm_device_activate_stage3_ip_config_start, 0);
-
- nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) scheduled.",
- nm_device_get_iface (self));
-}
-
-static GHashTable *shared_ips = NULL;
-
-static void
-release_shared_ip (gpointer data)
-{
- g_hash_table_remove (shared_ips, data);
-}
-
-static guint32
-reserve_shared_ip (void)
-{
- guint32 start = (guint32) ntohl (0x0a2a0001); /* 10.42.0.1 */
- guint32 count = 0;
-
- while (g_hash_table_lookup (shared_ips, GUINT_TO_POINTER (start + count))) {
- count += ntohl (0x100);
- if (count > ntohl (0xFE00)) {
- nm_log_err (LOGD_SHARING, "ran out of shared IP addresses!");
- return 0;
- }
- }
-
- g_hash_table_insert (shared_ips, GUINT_TO_POINTER (start + count), GUINT_TO_POINTER (TRUE));
- return start + count;
-}
-
-static NMIP4Config *
-nm_device_new_ip4_shared_config (NMDevice *self, NMDeviceStateReason *reason)
-{
- NMIP4Config *config = NULL;
- NMIP4Address *addr;
- guint32 tmp_addr;
-
- g_return_val_if_fail (self != NULL, NULL);
-
- if (G_UNLIKELY (shared_ips == NULL))
- shared_ips = g_hash_table_new (g_direct_hash, g_direct_equal);
-
- tmp_addr = reserve_shared_ip ();
- if (!tmp_addr) {
- *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
- return NULL;
+ /* Handle interfaces (bond slaves, etc) that won't have any IP config; they
+ * need to move to ACTIVATED.
+ */
+ if (priv->ip4_state == IP_DONE && priv->ip6_state == IP_DONE) {
+ /* FIXME: call layer2 stuff to set MTU? */
+ nm_device_state_changed (self, NM_DEVICE_STATE_ACTIVATED, NM_DEVICE_STATE_REASON_NONE);
}
- config = nm_ip4_config_new ();
- addr = nm_ip4_address_new ();
- nm_ip4_address_set_address (addr, tmp_addr);
- nm_ip4_address_set_prefix (addr, 24);
- nm_ip4_config_take_address (config, addr);
-
- /* Remove the address lock when the object gets disposed */
- g_object_set_data_full (G_OBJECT (config), "shared-ip",
- GUINT_TO_POINTER (tmp_addr), release_shared_ip);
-
- return config;
+ return FALSE;
}
-static NMActStageReturn
-real_act_stage4_get_ip4_config (NMDevice *self,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
- NMConnection *connection;
- NMSettingIP4Config *s_ip4;
- const char *ip_iface;
-
- g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- /* Use the IP interface (not the control interface) for IP stuff */
- ip_iface = nm_device_get_ip_iface (self);
-
- connection = nm_act_request_get_connection (nm_device_get_act_request (self));
- g_assert (connection);
-
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- if (priv->dhcp4_client) {
- /* DHCP */
- *config = nm_dhcp_client_get_ip4_config (priv->dhcp4_client, FALSE);
- if (*config) {
- /* Merge user-defined overrides into the IP4Config to be applied */
- nm_utils_merge_ip4_config (*config, s_ip4);
-
- nm_dhcp4_config_reset (priv->dhcp4_config);
- nm_dhcp_client_foreach_option (priv->dhcp4_client,
- dhcp4_add_option_cb,
- priv->dhcp4_config);
-
- /* Notify of new DHCP4 config */
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG);
- } else
- *reason = NM_DEVICE_STATE_REASON_DHCP_ERROR;
- } else {
- /* Not DHCP */
- const char *method;
-
- g_assert (s_ip4);
-
- method = nm_setting_ip4_config_get_method (s_ip4);
- g_assert (method);
-
- if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) {
- *config = aipd_get_ip4_config (self, reason);
- } else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) {
- *config = nm_ip4_config_new ();
- if (*config) {
- /* Merge user-defined overrides into the IP4Config to be applied */
- nm_utils_merge_ip4_config (*config, s_ip4);
- } else
- *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
- } else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
- *config = nm_device_new_ip4_shared_config (self, reason);
- if (*config)
- priv->dnsmasq_manager = nm_dnsmasq_manager_new (ip_iface);
- } else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED))
- ret = NM_ACT_STAGE_RETURN_SUCCESS;
- }
-
- if (!*config) {
- /* Make sure device is up even if config fails */
- nm_device_bring_up (self, FALSE, NULL);
- } else
- ret = NM_ACT_STAGE_RETURN_SUCCESS;
-
- return ret;
-}
-
-/*
- * nm_device_activate_stage4_ip4_config_get
- *
- * Retrieve the correct IPv4 config.
- *
- */
-static gboolean
-nm_device_activate_stage4_ip4_config_get (gpointer user_data)
+static void
+fw_add_to_zone_cb (GError *error, gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
- NMIP4Config *ip4_config = NULL;
- NMActStageReturn ret;
- const char *iface = NULL;
- NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- /* Clear the activation source ID now that this stage has run */
- activation_source_clear (self, FALSE, AF_INET);
+ priv->fw_call = NULL;
- iface = nm_device_get_iface (self);
- nm_log_info (LOGD_DEVICE | LOGD_IP4,
- "Activation (%s) Stage 4 of 5 (IP4 Configure Get) started...",
- iface);
-
- ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip4_config (self, &ip4_config, &reason);
- if (ret == NM_ACT_STAGE_RETURN_POSTPONE)
- goto out;
- else if (!ip4_config || (ret == NM_ACT_STAGE_RETURN_FAILURE)) {
- nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
- goto out;
+ if (error) {
+ /* FIXME: fail the device activation? */
}
- g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS);
-
- g_object_set_data (G_OBJECT (nm_device_get_act_request (self)),
- NM_ACT_REQUEST_IP4_CONFIG, ip4_config);
- nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET);
+ activation_source_schedule (self, nm_device_activate_stage3_ip_config_start, 0);
-out:
- nm_log_info (LOGD_DEVICE | LOGD_IP4,
- "Activation (%s) Stage 4 of 5 (IP4 Configure Get) complete.",
- iface);
- return FALSE;
+ nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) scheduled.",
+ nm_device_get_iface (self));
}
-
/*
- * nm_device_activate_schedule_stage4_ip4_config_get
- *
- * Schedule creation of the IPv4 config
+ * nm_device_activate_schedule_stage3_ip_config_start
*
+ * Schedule IP configuration start
*/
void
-nm_device_activate_schedule_stage4_ip4_config_get (NMDevice *self)
+nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self)
{
NMDevicePrivate *priv;
+ NMConnection *connection;
+ NMSettingConnection *s_con = NULL;
+ NMDeviceState state;
+ const char *zone;
g_return_if_fail (NM_IS_DEVICE (self));
priv = NM_DEVICE_GET_PRIVATE (self);
g_return_if_fail (priv->act_request);
- activation_source_schedule (self, nm_device_activate_stage4_ip4_config_get, AF_INET);
+ state = nm_device_get_state (self);
+ g_warn_if_fail (state >= NM_DEVICE_STATE_PREPARE && state <= NM_DEVICE_STATE_NEED_AUTH);
- nm_log_info (LOGD_DEVICE | LOGD_IP4,
- "Activation (%s) Stage 4 of 5 (IP4 Configure Get) scheduled...",
- nm_device_get_iface (self));
-}
+ /* Add the interface to the specified firewall zone */
+ connection = nm_device_get_connection (self);
+ g_assert (connection);
+ s_con = nm_connection_get_setting_connection (connection);
+ zone = nm_setting_connection_get_zone (s_con);
+ nm_log_dbg (LOGD_DEVICE, "Activation (%s) setting firewall zone '%s'",
+ nm_device_get_iface (self), zone ? zone : "default");
+ priv->fw_call = nm_firewall_manager_add_or_change_zone (priv->fw_manager,
+ nm_device_get_ip_iface (self),
+ zone,
+ TRUE,
+ fw_add_to_zone_cb,
+ self);
+}
static NMActStageReturn
-real_act_stage4_ip4_config_timeout (NMDevice *self,
- NMIP4Config **config,
- NMDeviceStateReason *reason)
+real_act_stage4_ip4_config_timeout (NMDevice *self, NMDeviceStateReason *reason)
{
- g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- /* Notify of invalid DHCP4 config object */
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG);
-
if (nm_device_ip_config_should_fail (self, FALSE)) {
*reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
return NM_ACT_STAGE_RETURN_FAILURE;
}
-
return NM_ACT_STAGE_RETURN_SUCCESS;
}
@@ -2079,10 +2376,10 @@ real_act_stage4_ip4_config_timeout (NMDevice *self,
*
*/
static gboolean
-nm_device_activate_stage4_ip4_config_timeout (gpointer user_data)
+nm_device_activate_ip4_config_timeout (gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
- NMIP4Config *ip4_config = NULL;
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
const char *iface;
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
@@ -2092,10 +2389,10 @@ nm_device_activate_stage4_ip4_config_timeout (gpointer user_data)
iface = nm_device_get_iface (self);
nm_log_info (LOGD_DEVICE | LOGD_IP4,
- "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) started...",
+ "Activation (%s) Stage 4 of 5 (IPv4 Configure Timeout) started...",
iface);
- ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip4_config_timeout (self, &ip4_config, &reason);
+ ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip4_config_timeout (self, &reason);
if (ret == NM_ACT_STAGE_RETURN_POSTPONE)
goto out;
else if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
@@ -2104,29 +2401,31 @@ nm_device_activate_stage4_ip4_config_timeout (gpointer user_data)
}
g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS);
- if (ip4_config) {
- g_object_set_data (G_OBJECT (nm_device_get_act_request (self)),
- NM_ACT_REQUEST_IP4_CONFIG, ip4_config);
- }
+ priv->ip4_state = IP_DONE;
- nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET);
+ /* If IPv4 failed and IPv6 failed, the activation fails */
+ if ((priv->ip6_state == IP_DONE) && (priv->ip6_config == NULL)) {
+ nm_device_state_changed (self,
+ NM_DEVICE_STATE_FAILED,
+ NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
+ }
out:
nm_log_info (LOGD_DEVICE | LOGD_IP4,
- "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) complete.",
+ "Activation (%s) Stage 4 of 5 (IPv4 Configure Timeout) complete.",
iface);
return FALSE;
}
/*
- * nm_device_activate_schedule_stage4_ip4_config_timeout
+ * nm_device_activate_schedule_ip4_config_timeout
*
* Deal with a timeout of the IPv4 configuration
*
*/
void
-nm_device_activate_schedule_stage4_ip4_config_timeout (NMDevice *self)
+nm_device_activate_schedule_ip4_config_timeout (NMDevice *self)
{
NMDevicePrivate *priv;
@@ -2135,214 +2434,17 @@ nm_device_activate_schedule_stage4_ip4_config_timeout (NMDevice *self)
priv = NM_DEVICE_GET_PRIVATE (self);
g_return_if_fail (priv->act_request);
- activation_source_schedule (self, nm_device_activate_stage4_ip4_config_timeout, AF_INET);
+ activation_source_schedule (self, nm_device_activate_ip4_config_timeout, AF_INET);
nm_log_info (LOGD_DEVICE | LOGD_IP4,
- "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) scheduled...",
+ "Activation (%s) Stage 4 of 5 (IPv4 Configure Timeout) scheduled...",
nm_device_get_iface (self));
}
-static void
-merge_dhcp_config_to_master (NMIP6Config *dst, NMIP6Config *src)
-{
- guint32 i;
-
- g_return_if_fail (src != NULL);
- g_return_if_fail (dst != NULL);
-
- /* addresses */
- for (i = 0; i < nm_ip6_config_get_num_addresses (src); i++)
- nm_ip6_config_add_address (dst, nm_ip6_config_get_address (src, i));
-
- /* ptp address; only replace if src doesn't have one */
- if (!nm_ip6_config_get_ptp_address (dst))
- nm_ip6_config_set_ptp_address (dst, nm_ip6_config_get_ptp_address (src));
-
- /* nameservers */
- for (i = 0; i < nm_ip6_config_get_num_nameservers (src); i++)
- nm_ip6_config_add_nameserver (dst, nm_ip6_config_get_nameserver (src, i));
-
- /* routes */
- for (i = 0; i < nm_ip6_config_get_num_routes (src); i++)
- nm_ip6_config_add_route (dst, nm_ip6_config_get_route (src, i));
-
- /* domains */
- for (i = 0; i < nm_ip6_config_get_num_domains (src); i++)
- nm_ip6_config_add_domain (dst, nm_ip6_config_get_domain (src, i));
-
- /* dns searches */
- for (i = 0; i < nm_ip6_config_get_num_searches (src); i++)
- nm_ip6_config_add_search (dst, nm_ip6_config_get_search (src, i));
-
- if (!nm_ip6_config_get_mss (dst))
- nm_ip6_config_set_mss (dst, nm_ip6_config_get_mss (src));
-}
static NMActStageReturn
-real_act_stage4_get_ip6_config (NMDevice *self,
- NMIP6Config **config,
- NMDeviceStateReason *reason)
-{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- NMConnection *connection;
- NMSettingIP6Config *s_ip6;
- const char *ip_iface;
-
- g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- /* Use the IP interface (not the control interface) for IP stuff */
- ip_iface = nm_device_get_ip_iface (self);
-
- connection = nm_act_request_get_connection (nm_device_get_act_request (self));
- g_assert (connection);
-
- if ( ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_AUTO)
- || ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) {
- *config = nm_ip6_manager_get_ip6_config (priv->ip6_manager,
- nm_device_get_ip_ifindex (self));
- if (!*config) {
- *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
- goto out;
- }
- } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) {
- *config = nm_ip6_config_new ();
- if (!*config) {
- *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
- goto out;
- }
- } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_DHCP))
- g_assert (priv->dhcp6_client); /* sanity check */
-
- /* Autoconf might have triggered DHCPv6 too */
- if (priv->dhcp6_client) {
- NMIP6Config *dhcp;
-
- dhcp = nm_dhcp_client_get_ip6_config (priv->dhcp6_client, FALSE);
- if (!dhcp) {
- *reason = NM_DEVICE_STATE_REASON_DHCP_ERROR;
- goto out;
- }
-
- /* For "managed" and DHCP-only setups, we use only the DHCP-supplied
- * IPv6 config. But when autoconf is enabled, we have to merge the
- * autoconf config and the DHCP-supplied config, then merge the
- * user's overrides from the connection to get the final configuration
- * that gets applied to the device.
- */
- if (*config) {
- /* Merge autoconf and DHCP configs */
- merge_dhcp_config_to_master (*config, dhcp);
- g_object_unref (dhcp);
- dhcp = NULL;
- } else {
- *config = dhcp;
- }
-
- /* Copy the new DHCPv6 configuration into the DHCP config object that's
- * exported over D-Bus to clients.
- */
- nm_dhcp6_config_reset (priv->dhcp6_config);
- nm_dhcp_client_foreach_option (priv->dhcp6_client,
- dhcp6_add_option_cb,
- priv->dhcp6_config);
-
- /* Notify of new DHCP6 config */
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP6_CONFIG);
- }
-
- /* Merge user-defined overrides into the IP6Config to be applied */
- if (*config) {
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
- nm_utils_merge_ip6_config (*config, s_ip6);
- }
-
-out:
- return *config ? NM_ACT_STAGE_RETURN_SUCCESS : NM_ACT_STAGE_RETURN_FAILURE;
-}
-
-/*
- * nm_device_activate_stage4_ip6_config_get
- *
- * Retrieve the correct IPv6 config.
- *
- */
-static gboolean
-nm_device_activate_stage4_ip6_config_get (gpointer user_data)
+real_act_stage4_ip6_config_timeout (NMDevice *self, NMDeviceStateReason *reason)
{
- NMDevice *self = NM_DEVICE (user_data);
- NMIP6Config *ip6_config = NULL;
- NMActStageReturn ret;
- const char *iface = NULL;
- NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
-
- /* Clear the activation source ID now that this stage has run */
- activation_source_clear (self, FALSE, AF_INET6);
-
- iface = nm_device_get_iface (self);
- nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 4 of 5 (IP6 Configure Get) started...",
- iface);
-
- ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip6_config (self, &ip6_config, &reason);
- if (ret == NM_ACT_STAGE_RETURN_POSTPONE)
- goto out;
- else if (ret == NM_ACT_STAGE_RETURN_FAILURE)
- {
- nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
- goto out;
- }
- g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS);
-
- g_object_set_data (G_OBJECT (nm_device_get_act_request (self)),
- NM_ACT_REQUEST_IP6_CONFIG, ip6_config);
-
- nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET6);
-
-out:
- nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 4 of 5 (IP6 Configure Get) complete.",
- iface);
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage4_ip6_config_get
- *
- * Schedule creation of the IPv6 config
- *
- */
-void
-nm_device_activate_schedule_stage4_ip6_config_get (NMDevice *self)
-{
- NMDevicePrivate *priv;
-
- g_return_if_fail (NM_IS_DEVICE (self));
-
- priv = NM_DEVICE_GET_PRIVATE (self);
- g_return_if_fail (priv->act_request);
-
- activation_source_schedule (self, nm_device_activate_stage4_ip6_config_get, AF_INET6);
-
- nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 4 of 5 (IP6 Configure Get) scheduled...",
- nm_device_get_iface (self));
-}
-
-
-static NMActStageReturn
-real_act_stage4_ip6_config_timeout (NMDevice *self,
- NMIP6Config **config,
- NMDeviceStateReason *reason)
-{
- g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
-
- /* Notify of invalid DHCP4 config object */
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP6_CONFIG);
-
if (nm_device_ip_config_should_fail (self, TRUE)) {
*reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
return NM_ACT_STAGE_RETURN_FAILURE;
@@ -2353,16 +2455,16 @@ real_act_stage4_ip6_config_timeout (NMDevice *self,
/*
- * nm_device_activate_stage4_ip6_config_timeout
+ * nm_device_activate_ip6_config_timeout
*
* Time out on retrieving the IPv6 config.
*
*/
static gboolean
-nm_device_activate_stage4_ip6_config_timeout (gpointer user_data)
+nm_device_activate_ip6_config_timeout (gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
- NMIP6Config *ip6_config = NULL;
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
const char *iface;
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
@@ -2372,10 +2474,10 @@ nm_device_activate_stage4_ip6_config_timeout (gpointer user_data)
iface = nm_device_get_iface (self);
nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) started...",
+ "Activation (%s) Stage 4 of 5 (IPv6 Configure Timeout) started...",
iface);
- ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip6_config_timeout (self, &ip6_config, &reason);
+ ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip6_config_timeout (self, &reason);
if (ret == NM_ACT_STAGE_RETURN_POSTPONE)
goto out;
else if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
@@ -2384,29 +2486,31 @@ nm_device_activate_stage4_ip6_config_timeout (gpointer user_data)
}
g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS);
- if (ip6_config) {
- g_object_set_data (G_OBJECT (nm_device_get_act_request (self)),
- NM_ACT_REQUEST_IP6_CONFIG, ip6_config);
- }
+ priv->ip6_state = IP_DONE;
- nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET6);
+ /* If IPv6 failed and IPv4 failed, the activation fails */
+ if ((priv->ip4_state == IP_DONE) && (priv->ip4_config == NULL)) {
+ nm_device_state_changed (self,
+ NM_DEVICE_STATE_FAILED,
+ NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
+ }
out:
nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) complete.",
+ "Activation (%s) Stage 4 of 5 (IPv6 Configure Timeout) complete.",
iface);
return FALSE;
}
/*
- * nm_device_activate_schedule_stage4_ip6_config_timeout
+ * nm_device_activate_schedule_ip6_config_timeout
*
* Deal with a timeout of the IPv6 configuration
*
*/
void
-nm_device_activate_schedule_stage4_ip6_config_timeout (NMDevice *self)
+nm_device_activate_schedule_ip6_config_timeout (NMDevice *self)
{
NMDevicePrivate *priv;
@@ -2415,10 +2519,10 @@ nm_device_activate_schedule_stage4_ip6_config_timeout (NMDevice *self)
priv = NM_DEVICE_GET_PRIVATE (self);
g_return_if_fail (priv->act_request);
- activation_source_schedule (self, nm_device_activate_stage4_ip6_config_timeout, AF_INET6);
+ activation_source_schedule (self, nm_device_activate_ip6_config_timeout, AF_INET6);
nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) scheduled...",
+ "Activation (%s) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...",
nm_device_get_iface (self));
}
@@ -2483,7 +2587,7 @@ add_share_rule (NMActRequest *req, const char *table, const char *fmt, ...)
}
static gboolean
-start_sharing (NMDevice *self)
+start_sharing (NMDevice *self, NMIP4Config *config)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMActRequest *req;
@@ -2491,17 +2595,14 @@ start_sharing (NMDevice *self)
char str_addr[INET_ADDRSTRLEN + 1];
char str_mask[INET_ADDRSTRLEN + 1];
guint32 netmask, network;
- NMIP4Config *ip4_config;
NMIP4Address *ip4_addr;
const char *ip_iface;
- ip_iface = nm_device_get_ip_iface (self);
+ g_return_val_if_fail (config != NULL, FALSE);
- ip4_config = nm_device_get_ip4_config (self);
- if (!ip4_config)
- return FALSE;
+ ip_iface = nm_device_get_ip_iface (self);
- ip4_addr = nm_ip4_config_get_address (ip4_config, 0);
+ ip4_addr = nm_ip4_config_get_address (config, 0);
if (!ip4_addr || !nm_ip4_address_get_address (ip4_addr))
return FALSE;
@@ -2532,7 +2633,7 @@ start_sharing (NMDevice *self)
nm_act_request_set_shared (req, TRUE);
- if (!nm_dnsmasq_manager_start (priv->dnsmasq_manager, ip4_config, &error)) {
+ if (!nm_dnsmasq_manager_start (priv->dnsmasq_manager, config, &error)) {
nm_log_err (LOGD_SHARING, "(%s/%s): failed to start dnsmasq: %s",
nm_device_get_iface (self), ip_iface, error->message);
g_error_free (error);
@@ -2546,114 +2647,86 @@ start_sharing (NMDevice *self)
return TRUE;
}
-/*
- * nm_device_activate_stage5_ip_config_commit
- *
- * Commit the IP config on the device
- *
- */
static gboolean
-nm_device_activate_stage5_ip_config_commit (gpointer user_data)
+nm_device_activate_ip4_config_commit (gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- NMActRequest *act_request;
- NMIP4Config *ip4_config = NULL;
- NMIP6Config *ip6_config = NULL;
+ NMActRequest *req;
+ NMIP4Config *config = NULL;
const char *iface, *method = NULL;
NMConnection *connection;
NMSettingIP4Config *s_ip4;
NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
gboolean assumed;
-
- /* Get the new IP4 and IP6 configs; since this stage gets rerun
- * when automatic configuration changes (DHCP lease renewal, new
- * IPv6 router advertisement, etc), it's possible that only one of
- * them will be set.
- */
- act_request = nm_device_get_act_request (self);
-
- ip4_config = g_object_get_data (G_OBJECT (act_request),
- NM_ACT_REQUEST_IP4_CONFIG);
- g_object_set_data (G_OBJECT (act_request),
- NM_ACT_REQUEST_IP4_CONFIG, NULL);
-
- ip6_config = g_object_get_data (G_OBJECT (act_request),
- NM_ACT_REQUEST_IP6_CONFIG);
- g_object_set_data (G_OBJECT (act_request),
- NM_ACT_REQUEST_IP6_CONFIG, NULL);
+ int ifindex;
/* Clear the activation source ID now that this stage has run */
- activation_source_clear (self, FALSE, 0);
+ activation_source_clear (self, FALSE, AF_INET);
iface = nm_device_get_iface (self);
- nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IP Configure Commit) started...",
+ nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IPv4 Commit) started...",
iface);
- assumed = nm_act_request_get_assumed (priv->act_request);
+ req = nm_device_get_act_request (self);
+ g_assert (req);
+ connection = nm_act_request_get_connection (req);
+ g_assert (connection);
- if (!ip6_config && !ip4_config) {
- nm_log_info (LOGD_DEVICE,
- "Activation (%s) Stage 5 of 5 (IP Configure Commit) failed (no IP configuration found)",
- iface);
- nm_device_state_changed (self,
- NM_DEVICE_STATE_FAILED,
- NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
- goto out;
- }
+ config = g_object_get_data (G_OBJECT (req), PENDING_IP4_CONFIG);
+ g_assert (config);
- if (ip4_config && !nm_device_set_ip4_config (self, ip4_config, assumed, &reason)) {
- nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
- goto out;
- }
+ /* Make sure the interface is up again just because */
+ ifindex = nm_device_get_ip_ifindex (self);
+ if ((ifindex > 0) && (nm_system_iface_is_up (ifindex) == FALSE))
+ nm_system_iface_set_up (ifindex, TRUE, NULL);
- if (ip6_config && !nm_device_set_ip6_config (self, ip6_config, assumed, &reason)) {
- nm_log_info (LOGD_DEVICE | LOGD_IP6,
- "Activation (%s) Stage 5 of 5 (IP Configure Commit) IPv6 failed",
- iface);
+ /* Allow setting MTU etc */
+ if (NM_DEVICE_GET_CLASS (self)->ip4_config_pre_commit)
+ NM_DEVICE_GET_CLASS (self)->ip4_config_pre_commit (self, config);
+
+ /* Merge with user overrides */
+ nm_utils_merge_ip4_config (config, nm_connection_get_setting_ip4_config (connection));
+
+ assumed = nm_act_request_get_assumed (priv->act_request);
+ if (!nm_device_set_ip4_config (self, config, assumed, &reason)) {
+ nm_log_info (LOGD_DEVICE | LOGD_IP4,
+ "Activation (%s) Stage 5 of 5 (IPv4 Commit) failed",
+ iface);
nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
goto out;
}
- connection = nm_act_request_get_connection (nm_device_get_act_request (self));
-
- if (ip4_config) {
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- if (s_ip4)
- method = nm_setting_ip4_config_get_method (s_ip4);
+ /* Start IPv4 sharing if we need it */
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
+ if (s_ip4)
+ method = nm_setting_ip4_config_get_method (s_ip4);
- if (s_ip4 && !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
- if (!start_sharing (self)) {
- nm_log_warn (LOGD_SHARING, "Activation (%s) Stage 5 of 5 (IP Configure Commit) start sharing failed.", iface);
- nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SHARED_START_FAILED);
- goto out;
- }
+ if (g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED) == 0) {
+ if (!start_sharing (self, config)) {
+ nm_log_warn (LOGD_SHARING, "Activation (%s) Stage 5 of 5 (IPv4 Commit) start sharing failed.", iface);
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SHARED_START_FAILED);
+ goto out;
}
}
- nm_device_state_changed (self, NM_DEVICE_STATE_ACTIVATED, NM_DEVICE_STATE_REASON_NONE);
+ /* Enter the ACTIVATED state if this is the first method to complete */
+ priv->ip4_state = IP_DONE;
+ if (nm_device_get_state (self) == NM_DEVICE_STATE_IP_CONFIG)
+ nm_device_state_changed (self, NM_DEVICE_STATE_ACTIVATED, NM_DEVICE_STATE_REASON_NONE);
out:
- nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IP Configure Commit) complete.",
+ nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IPv4 Commit) complete.",
iface);
- /* Balance IP config creation; device takes ownership in set_ip*_config() */
- if (ip4_config)
- g_object_unref (ip4_config);
- if (ip6_config)
- g_object_unref (ip6_config);
+ /* Balance IP config creation; nm_device_set_ip4_config() takes a reference */
+ g_object_set_data (G_OBJECT (req), PENDING_IP4_CONFIG, NULL);
return FALSE;
}
-
-/*
- * nm_device_activate_schedule_stage5_ip_config_commit
- *
- * Schedule commit of the IP config
- */
-static void
-nm_device_activate_schedule_stage5_ip_config_commit (NMDevice *self, int family)
+void
+nm_device_activate_schedule_ip4_config_result (NMDevice *self, NMIP4Config *config)
{
NMDevicePrivate *priv;
@@ -2662,26 +2735,121 @@ nm_device_activate_schedule_stage5_ip_config_commit (NMDevice *self, int family)
priv = NM_DEVICE_GET_PRIVATE (self);
g_return_if_fail (priv->act_request);
- if (family == AF_INET)
- priv->ip4_ready = TRUE;
- else if (family == AF_INET6)
- priv->ip6_ready = TRUE;
+ if (config == NULL) {
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
+ return;
+ }
- /* Note that these are only set FALSE at stage3, so once you've
- * made it all the way through activation once, you can jump back
- * into stage4 (eg, for a DHCP lease change) and not worry about
- * needing both IPv4 and IPv6 to complete.
- */
- if (!priv->ip4_ready || !priv->ip6_ready)
+ g_object_set_data_full (G_OBJECT (priv->act_request),
+ PENDING_IP4_CONFIG,
+ g_object_ref (config),
+ g_object_unref);
+
+ activation_source_schedule (self, nm_device_activate_ip4_config_commit, AF_INET);
+
+ nm_log_info (LOGD_DEVICE | LOGD_IP4,
+ "Activation (%s) Stage 5 of 5 (IPv4 Configure Commit) scheduled...",
+ nm_device_get_iface (self));
+}
+
+gboolean
+nm_device_activate_ip4_state_in_conf (NMDevice *self)
+{
+ g_return_val_if_fail (self != NULL, FALSE);
+ return NM_DEVICE_GET_PRIVATE (self)->ip4_state == IP_CONF;
+}
+
+static gboolean
+nm_device_activate_ip6_config_commit (gpointer user_data)
+{
+ NMDevice *self = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMActRequest *req;
+ NMIP6Config *config = NULL;
+ const char *iface;
+ NMConnection *connection;
+ NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE;
+ int ifindex;
+
+ /* Clear the activation source ID now that this stage has run */
+ activation_source_clear (self, FALSE, AF_INET6);
+
+ iface = nm_device_get_iface (self);
+ nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IPv6 Commit) started...",
+ iface);
+
+ req = nm_device_get_act_request (self);
+ g_assert (req);
+ connection = nm_act_request_get_connection (req);
+ g_assert (connection);
+
+ config = g_object_get_data (G_OBJECT (req), PENDING_IP6_CONFIG);
+ g_assert (config);
+
+ /* Make sure the interface is up again just because */
+ ifindex = nm_device_get_ip_ifindex (self);
+ if ((ifindex > 0) && (nm_system_iface_is_up (ifindex) == FALSE))
+ nm_system_iface_set_up (ifindex, TRUE, NULL);
+
+ /* Allow setting MTU etc */
+ if (NM_DEVICE_GET_CLASS (self)->ip6_config_pre_commit)
+ NM_DEVICE_GET_CLASS (self)->ip6_config_pre_commit (self, config);
+
+ if (ip6_config_merge_and_apply (self, config, &reason)) {
+ /* Enter the ACTIVATED state if this is the first method to complete */
+ priv->ip6_state = IP_DONE;
+ if (nm_device_get_state (self) == NM_DEVICE_STATE_IP_CONFIG)
+ nm_device_state_changed (self, NM_DEVICE_STATE_ACTIVATED, NM_DEVICE_STATE_REASON_NONE);
+ } else {
+ nm_log_info (LOGD_DEVICE | LOGD_IP6,
+ "Activation (%s) Stage 5 of 5 (IPv6 Commit) failed",
+ iface);
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason);
+ }
+
+ nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IPv6 Commit) complete.",
+ iface);
+
+ /* Balance IP config creation; nm_device_set_ip6_config() takes a reference */
+ g_object_set_data (G_OBJECT (req), PENDING_IP6_CONFIG, NULL);
+
+ return FALSE;
+}
+
+void
+nm_device_activate_schedule_ip6_config_result (NMDevice *self, NMIP6Config *config)
+{
+ NMDevicePrivate *priv;
+
+ g_return_if_fail (NM_IS_DEVICE (self));
+
+ priv = NM_DEVICE_GET_PRIVATE (self);
+ g_return_if_fail (priv->act_request);
+
+ if (config == NULL) {
+ nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
return;
+ }
- activation_source_schedule (self, nm_device_activate_stage5_ip_config_commit, 0);
+ /* Save the pending config */
+ g_object_set_data_full (G_OBJECT (priv->act_request),
+ PENDING_IP6_CONFIG,
+ g_object_ref (config),
+ g_object_unref);
- nm_log_info (LOGD_DEVICE,
- "Activation (%s) Stage 5 of 5 (IP Configure Commit) scheduled...",
- nm_device_get_iface (self));
+ activation_source_schedule (self, nm_device_activate_ip6_config_commit, AF_INET6);
+
+ nm_log_info (LOGD_DEVICE | LOGD_IP4,
+ "Activation (%s) Stage 5 of 5 (IPv6 Commit) scheduled...",
+ nm_device_get_iface (self));
}
+gboolean
+nm_device_activate_ip6_state_in_conf (NMDevice *self)
+{
+ g_return_val_if_fail (self != NULL, FALSE);
+ return NM_DEVICE_GET_PRIVATE (self)->ip6_state == IP_CONF;
+}
static void
clear_act_request (NMDevice *self)
@@ -2707,29 +2875,23 @@ clear_act_request (NMDevice *self)
priv->secrets_failed_id = 0;
}
- nm_act_request_set_default (priv->act_request, FALSE);
+ nm_active_connection_set_default (NM_ACTIVE_CONNECTION (priv->act_request), FALSE);
g_object_unref (priv->act_request);
priv->act_request = NULL;
}
static void
-delayed_transitions_clear (NMDevice *self)
+queued_state_clear (NMDevice *self)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- if (priv->failed_to_disconnected_id) {
- nm_log_dbg (LOGD_DEVICE, "(%s): clearing failed->disconnected transition",
- nm_device_get_iface (self));
- g_source_remove (priv->failed_to_disconnected_id);
- priv->failed_to_disconnected_id = 0;
- }
- if (priv->unavailable_to_disconnected_id) {
- nm_log_dbg (LOGD_DEVICE, "(%s): clearing unavailable->disconnected transition",
- nm_device_get_iface (self));
- g_source_remove (priv->unavailable_to_disconnected_id);
- priv->unavailable_to_disconnected_id = 0;
+ if (priv->queued_state.id) {
+ nm_log_dbg (LOGD_DEVICE, "(%s): clearing queued state transition (id %d)",
+ nm_device_get_iface (self), priv->queued_state.id);
+ g_source_remove (priv->queued_state.id);
}
+ memset (&priv->queued_state, 0, sizeof (priv->queued_state));
}
static void
@@ -2738,7 +2900,7 @@ dhcp4_cleanup (NMDevice *self, gboolean stop, gboolean release)
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
if (priv->dhcp4_config) {
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_DHCP4_CONFIG);
g_object_unref (priv->dhcp4_config);
priv->dhcp4_config = NULL;
}
@@ -2770,8 +2932,13 @@ dhcp6_cleanup (NMDevice *self, gboolean stop, gboolean release)
priv->dhcp6_mode = IP6_DHCP_OPT_NONE;
+ if (priv->dhcp6_ip6_config) {
+ g_object_unref (priv->dhcp6_ip6_config);
+ priv->dhcp6_ip6_config = NULL;
+ }
+
if (priv->dhcp6_config) {
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP6_CONFIG);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_DHCP6_CONFIG);
g_object_unref (priv->dhcp6_config);
priv->dhcp6_config = NULL;
}
@@ -2813,6 +2980,32 @@ dnsmasq_cleanup (NMDevice *self)
priv->dnsmasq_manager = NULL;
}
+static void
+_update_ip4_address (NMDevice *self)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ struct ifreq req;
+ guint32 new_address;
+ int fd;
+
+ g_return_if_fail (self != NULL);
+
+ fd = socket (PF_INET, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ nm_log_err (LOGD_IP4, "couldn't open control socket.");
+ return;
+ }
+
+ memset (&req, 0, sizeof (struct ifreq));
+ strncpy (req.ifr_name, nm_device_get_ip_iface (self), IFNAMSIZ);
+ if (ioctl (fd, SIOCGIFADDR, &req) == 0) {
+ new_address = ((struct sockaddr_in *)(&req.ifr_addr))->sin_addr.s_addr;
+ if (new_address != priv->ip4_address)
+ priv->ip4_address = new_address;
+ }
+ close (fd);
+}
+
/*
* nm_device_deactivate
*
@@ -2820,29 +3013,58 @@ dnsmasq_cleanup (NMDevice *self)
*
*/
static void
-nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason)
+nm_device_deactivate (NMDevice *self, NMDeviceStateReason reason)
{
- NMDevice *self = NM_DEVICE (device);
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMDevicePrivate *priv;
NMDeviceStateReason ignored = NM_DEVICE_STATE_REASON_NONE;
+ NMConnection *connection = NULL;
+ NMSettingConnection *s_con = NULL;
gboolean tried_ipv6 = FALSE;
int ifindex, family;
g_return_if_fail (self != NULL);
+ g_return_if_fail (NM_IS_DEVICE (self));
nm_log_info (LOGD_DEVICE, "(%s): deactivating device (reason '%s') [%d]",
nm_device_get_iface (self), reason_to_string (reason), reason);
/* Save whether or not we tried IPv6 for later */
+ priv = NM_DEVICE_GET_PRIVATE (self);
if (priv->ip6_manager || priv->ip6_config)
tried_ipv6 = TRUE;
+ /* Clean up when device was deactivated during call to firewall */
+ if (priv->fw_call) {
+ nm_firewall_manager_cancel_call (priv->fw_manager, priv->fw_call);
+ priv->fw_call = NULL;
+ }
+
+ if (priv->act_request)
+ connection = nm_act_request_get_connection (priv->act_request);
+ if (connection) {
+ s_con = nm_connection_get_setting_connection (connection);
+ nm_firewall_manager_remove_from_zone (priv->fw_manager,
+ nm_device_get_ip_iface (self),
+ nm_setting_connection_get_zone (s_con));
+ }
+
/* Break the activation chain */
activation_source_clear (self, TRUE, AF_INET);
activation_source_clear (self, TRUE, AF_INET6);
- /* Clear any delayed transitions */
- delayed_transitions_clear (self);
+ if (priv->act_dep_result_id) {
+ g_source_remove (priv->act_dep_result_id);
+ priv->act_dep_result_id = 0;
+ }
+ if (priv->act_dep_timeout_id) {
+ g_source_remove (priv->act_dep_timeout_id);
+ priv->act_dep_timeout_id = 0;
+ }
+
+ /* Clear any queued transitions */
+ queued_state_clear (self);
+
+ priv->ip4_state = priv->ip6_state = IP_NONE;
dhcp4_cleanup (self, TRUE, FALSE);
dhcp6_cleanup (self, TRUE, FALSE);
@@ -2856,6 +3078,10 @@ nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason)
if (priv->ip6_accept_ra_path)
nm_utils_do_sysctl (priv->ip6_accept_ra_path, "0\n");
+ /* Turn off IPv6 privacy extensions */
+ if (priv->ip6_privacy_tempaddr_path)
+ nm_utils_do_sysctl (priv->ip6_privacy_tempaddr_path, "0\n");
+
/* Call device type-specific deactivation */
if (NM_DEVICE_GET_CLASS (self)->deactivate)
NM_DEVICE_GET_CLASS (self)->deactivate (self);
@@ -2866,46 +3092,119 @@ nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason)
/* Take out any entries in the routing table and any IP address the device had. */
ifindex = nm_device_get_ip_ifindex (self);
family = tried_ipv6 ? AF_UNSPEC : AF_INET;
- nm_system_iface_flush_routes (ifindex, family);
- nm_system_iface_flush_addresses (ifindex, family);
- nm_device_update_ip4_address (self);
+ if (ifindex >= 0) {
+ nm_system_iface_flush_routes (ifindex, family);
+ nm_system_iface_flush_addresses (ifindex, family);
+ }
+ _update_ip4_address (self);
/* Clean up nameservers and addresses */
nm_device_set_ip4_config (self, NULL, FALSE, &ignored);
nm_device_set_ip6_config (self, NULL, FALSE, &ignored);
}
-static gboolean
-device_disconnect (NMDeviceInterface *device,
- GError **error)
+gboolean
+nm_device_disconnect (NMDevice *device, GError **error)
{
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (NM_DEVICE (device));
+ NMDevicePrivate *priv;
+
+ g_return_val_if_fail (device != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+
+ priv = NM_DEVICE_GET_PRIVATE (device);
+ if (priv->state <= NM_DEVICE_STATE_DISCONNECTED) {
+ g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ACTIVE,
+ "Cannot disconnect an inactive device.");
+ return FALSE;
+ }
priv->autoconnect_inhibit = TRUE;
- nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_USER_REQUESTED);
+ nm_device_state_changed (device,
+ NM_DEVICE_STATE_DISCONNECTED,
+ NM_DEVICE_STATE_REASON_USER_REQUESTED);
return TRUE;
}
+static void
+impl_device_disconnect (NMDevice *device, DBusGMethodInvocation *context)
+{
+ g_signal_emit (device, signals[DISCONNECT_REQUEST], 0, context);
+}
+
static gboolean
-check_connection_compatible (NMDeviceInterface *dev_iface,
- NMConnection *connection,
- GError **error)
+act_dep_timeout_cb (gpointer user_data)
{
- NMDeviceClass *klass = NM_DEVICE_GET_CLASS (NM_DEVICE (dev_iface));
+ NMDevice *self = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMConnection *connection;
- if (klass->check_connection_compatible)
- return klass->check_connection_compatible (NM_DEVICE (dev_iface), connection, error);
+ connection = nm_active_connection_get_connection (NM_ACTIVE_CONNECTION (priv->act_request));
+ nm_log_warn (LOGD_DEVICE,
+ "Activation (%s) connection '%s' dependency timed out",
+ nm_device_get_iface (self),
+ nm_connection_get_id (connection));
- return TRUE;
+ nm_device_queue_state (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED);
+ return FALSE;
}
-static gboolean
-nm_device_activate (NMDeviceInterface *device,
- NMActRequest *req,
- GError **error)
+static void
+act_dep_result_cb (NMActRequest *req,
+ NMActRequestDependencyResult result,
+ NMDevice *self)
{
- NMDevice *self = NM_DEVICE (device);
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ NMConnection *connection;
+
+ connection = nm_active_connection_get_connection (NM_ACTIVE_CONNECTION (priv->act_request));
+
+ switch (result) {
+ case NM_ACT_REQUEST_DEP_RESULT_FAILED:
+ g_source_remove (priv->act_dep_result_id);
+ priv->act_dep_result_id = 0;
+
+ nm_log_warn (LOGD_DEVICE,
+ "Activation (%s) connection '%s' dependency failed",
+ nm_device_get_iface (self),
+ nm_connection_get_id (connection));
+ nm_device_queue_state (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED);
+ break;
+ case NM_ACT_REQUEST_DEP_RESULT_READY:
+ g_warn_if_fail (priv->state == NM_DEVICE_STATE_PREPARE);
+ if (priv->state == NM_DEVICE_STATE_PREPARE) {
+ nm_log_info (LOGD_DEVICE,
+ "Activation (%s) connection '%s' dependency ready, continuing activation",
+ nm_device_get_iface (self),
+ nm_connection_get_id (connection));
+ nm_device_activate_schedule_stage1_device_prepare (self);
+ }
+ break;
+ case NM_ACT_REQUEST_DEP_RESULT_WAIT:
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+}
+
+gboolean
+nm_device_activate (NMDevice *self, NMActRequest *req, GError **error)
+{
+ NMDevicePrivate *priv;
+ NMConnection *connection;
+
+ g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (self), FALSE);
+ g_return_val_if_fail (req != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
+
+ priv = NM_DEVICE_GET_PRIVATE (self);
+
+ connection = nm_act_request_get_connection (req);
+ g_assert (connection);
+
+ nm_log_info (LOGD_DEVICE, "Activation (%s) starting connection '%s'",
+ nm_device_get_iface (self),
+ nm_connection_get_id (connection));
/* Make sure this connection isn't activated already, or in the process of
* being activated.
@@ -2916,9 +3215,7 @@ nm_device_activate (NMDeviceInterface *device,
NMConnection *current = nm_act_request_get_connection (priv->act_request);
if (new == current) {
- g_set_error_literal (error,
- NM_DEVICE_INTERFACE_ERROR,
- NM_DEVICE_INTERFACE_ERROR_CONNECTION_ACTIVATING,
+ g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CONNECTION_ACTIVATING,
"Connection is already activating");
return FALSE;
}
@@ -2927,13 +3224,44 @@ nm_device_activate (NMDeviceInterface *device,
priv->act_request = g_object_ref (req);
if (!nm_act_request_get_assumed (req)) {
+ NMActiveConnection *dep_ac;
+ NMConnection *dep_con;
+
/* HACK: update the state a bit early to avoid a race between the
* scheduled stage1 handler and nm_policy_device_change_check() thinking
* that the activation request isn't deferred because the deferred bit
* gets cleared a bit too early, when the connection becomes valid.
*/
nm_device_state_changed (self, NM_DEVICE_STATE_PREPARE, NM_DEVICE_STATE_REASON_NONE);
- nm_device_activate_schedule_stage1_device_prepare (self);
+
+ /* Handle any dependencies this connection might have */
+ switch (nm_act_request_get_dependency_result (priv->act_request)) {
+ case NM_ACT_REQUEST_DEP_RESULT_FAILED:
+ nm_device_queue_state (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED);
+ break;
+ case NM_ACT_REQUEST_DEP_RESULT_WAIT:
+ dep_ac = nm_act_request_get_dependency (priv->act_request);
+ g_assert (dep_ac);
+ dep_con = nm_active_connection_get_connection (dep_ac);
+ g_assert (dep_con);
+ nm_log_info (LOGD_DEVICE, "Activation (%s) connection '%s' waiting on dependency '%s'",
+ nm_device_get_iface (self),
+ nm_connection_get_id (connection),
+ nm_connection_get_id (dep_con));
+
+ priv->act_dep_result_id = g_signal_connect (priv->act_request,
+ NM_ACT_REQUEST_DEPENDENCY_RESULT,
+ G_CALLBACK (act_dep_result_cb),
+ self);
+ priv->act_dep_timeout_id = g_timeout_add_seconds (60, act_dep_timeout_cb, self);
+ break;
+ default:
+ g_warn_if_reached ();
+ /* fall through */
+ case NM_ACT_REQUEST_DEP_RESULT_READY:
+ nm_device_activate_schedule_stage1_device_prepare (self);
+ break;
+ }
} else {
/* If it's an assumed connection, let the device subclass short-circuit
* the normal connection process and just copy its IP configs from the
@@ -3062,56 +3390,16 @@ nm_device_set_ip4_config (NMDevice *self,
/* Add the DNS information to the DNS manager */
nm_dns_manager_add_ip4_config (dns_mgr, ip_iface, new_config, NM_DNS_IP_CONFIG_TYPE_DEFAULT);
- nm_device_update_ip4_address (self);
+ _update_ip4_address (self);
}
}
g_object_unref (dns_mgr);
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_IP4_CONFIG);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_IP4_CONFIG);
return success;
}
-/*
- * nm_device_get_ip4_address
- *
- * Get a device's IPv4 address
- *
- */
-guint32
-nm_device_get_ip4_address (NMDevice *self)
-{
- g_return_val_if_fail (self != NULL, 0);
-
- return NM_DEVICE_GET_PRIVATE (self)->ip4_address;
-}
-
-
-void
-nm_device_update_ip4_address (NMDevice *self)
-{
- struct ifreq req;
- guint32 new_address;
- int fd;
-
- g_return_if_fail (self != NULL);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- nm_log_err (LOGD_IP4, "couldn't open control socket.");
- return;
- }
-
- memset (&req, 0, sizeof (struct ifreq));
- strncpy (req.ifr_name, nm_device_get_ip_iface (self), IFNAMSIZ);
- if (ioctl (fd, SIOCGIFADDR, &req) == 0) {
- new_address = ((struct sockaddr_in *)(&req.ifr_addr))->sin_addr.s_addr;
- if (new_address != nm_device_get_ip4_address (self))
- NM_DEVICE_GET_PRIVATE (self)->ip4_address = new_address;
- }
- close (fd);
-}
-
static gboolean
nm_device_set_ip6_config (NMDevice *self,
NMIP6Config *new_config,
@@ -3170,7 +3458,7 @@ nm_device_set_ip6_config (NMDevice *self,
}
g_object_unref (dns_mgr);
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_IP6_CONFIG);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_IP6_CONFIG);
return success;
}
@@ -3237,7 +3525,7 @@ out:
if (NM_DEVICE_GET_CLASS (self)->update_hw_address)
NM_DEVICE_GET_CLASS (self)->update_hw_address (self);
- nm_device_update_ip4_address (self);
+ _update_ip4_address (self);
return TRUE;
}
@@ -3288,7 +3576,7 @@ nm_device_take_down (NMDevice *self, gboolean block, NMDeviceStateReason reason)
g_return_if_fail (NM_IS_DEVICE (self));
if (nm_device_get_act_request (self))
- nm_device_interface_deactivate (NM_DEVICE_INTERFACE (self), reason);
+ nm_device_deactivate (self, reason);
if (nm_device_is_up (self)) {
nm_log_info (LOGD_HW, "(%s): cleaning up...", nm_device_get_iface (self));
@@ -3315,20 +3603,19 @@ dispose (GObject *object)
/* Don't down can-assume-connection capable devices that are activated with
* a connection that can be assumed.
*/
- if ( nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (self))
- && (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)) {
+ if (nm_device_can_assume_connections (self) && (priv->state == NM_DEVICE_STATE_ACTIVATED)) {
NMConnection *connection;
NMSettingIP4Config *s_ip4 = NULL;
const char *method = NULL;
- connection = nm_act_request_get_connection (priv->act_request);
+ connection = nm_device_get_connection (self);
if (connection) {
/* Only static or DHCP IPv4 connections can be left up.
* All IPv6 connections can be left up, so we don't have
* to check that.
*/
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
method = nm_setting_ip4_config_get_method (s_ip4);
if ( !method
@@ -3338,8 +3625,8 @@ dispose (GObject *object)
}
}
- /* Clear any delayed transitions */
- delayed_transitions_clear (self);
+ /* Clear any queued transitions */
+ queued_state_clear (self);
/* Clean up and stop DHCP */
dhcp4_cleanup (self, take_down, FALSE);
@@ -3362,6 +3649,15 @@ dispose (GObject *object)
}
g_free (priv->ip6_accept_ra_path);
+ /* reset the saved use_tempaddr value */
+ if (priv->ip6_privacy_tempaddr_path) {
+ char tmp[16];
+
+ snprintf (tmp, sizeof (tmp), "%d\n", priv->ip6_privacy_tempaddr_save);
+ nm_utils_do_sysctl (priv->ip6_privacy_tempaddr_path, tmp);
+ }
+ g_free (priv->ip6_privacy_tempaddr_path);
+
activation_source_clear (self, TRUE, AF_INET);
activation_source_clear (self, TRUE, AF_INET6);
@@ -3380,6 +3676,9 @@ finalize (GObject *object)
if (priv->dhcp_manager)
g_object_unref (priv->dhcp_manager);
+ if (priv->fw_manager)
+ g_object_unref (priv->fw_manager);
+
g_free (priv->udi);
g_free (priv->iface);
g_free (priv->ip_iface);
@@ -3399,11 +3698,15 @@ set_property (GObject *object, guint prop_id,
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
switch (prop_id) {
- case NM_DEVICE_INTERFACE_PROP_UDI:
- /* construct-only */
+ case PROP_UDI:
+ /* Only virtual interfaces can set UDI post-construction */
+ if (priv->initialized)
+ g_return_if_fail (nm_system_get_iface_type (priv->ifindex, NULL) != NM_IFACE_TYPE_UNSPEC);
+
+ g_free (priv->udi);
priv->udi = g_strdup (g_value_get_string (value));
break;
- case NM_DEVICE_INTERFACE_PROP_IFACE:
+ case PROP_IFACE:
g_free (priv->iface);
priv->ifindex = 0;
priv->iface = g_value_dup_string (value);
@@ -3414,32 +3717,32 @@ set_property (GObject *object, guint prop_id,
}
}
break;
- case NM_DEVICE_INTERFACE_PROP_IP_IFACE:
+ case PROP_IP_IFACE:
break;
- case NM_DEVICE_INTERFACE_PROP_DRIVER:
+ case PROP_DRIVER:
priv->driver = g_strdup (g_value_get_string (value));
break;
- case NM_DEVICE_INTERFACE_PROP_CAPABILITIES:
+ case PROP_CAPABILITIES:
priv->capabilities = g_value_get_uint (value);
break;
- case NM_DEVICE_INTERFACE_PROP_IP4_ADDRESS:
+ case PROP_IP4_ADDRESS:
priv->ip4_address = g_value_get_uint (value);
break;
- case NM_DEVICE_INTERFACE_PROP_MANAGED:
+ case PROP_MANAGED:
priv->managed = g_value_get_boolean (value);
break;
- case NM_DEVICE_INTERFACE_PROP_FIRMWARE_MISSING:
+ case PROP_FIRMWARE_MISSING:
priv->firmware_missing = g_value_get_boolean (value);
break;
- case NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE:
+ case PROP_DEVICE_TYPE:
g_return_if_fail (priv->type == NM_DEVICE_TYPE_UNKNOWN);
priv->type = g_value_get_uint (value);
break;
- case NM_DEVICE_INTERFACE_PROP_TYPE_DESC:
+ case PROP_TYPE_DESC:
g_free (priv->type_desc);
priv->type_desc = g_value_dup_string (value);
break;
- case NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE:
+ case PROP_RFKILL_TYPE:
priv->rfkill_type = g_value_get_uint (value);
break;
default:
@@ -3466,75 +3769,83 @@ get_property (GObject *object, guint prop_id,
state = nm_device_get_state (self);
switch (prop_id) {
- case NM_DEVICE_INTERFACE_PROP_UDI:
+ case PROP_UDI:
g_value_set_string (value, priv->udi);
break;
- case NM_DEVICE_INTERFACE_PROP_IFACE:
+ case PROP_IFACE:
g_value_set_string (value, priv->iface);
break;
- case NM_DEVICE_INTERFACE_PROP_IP_IFACE:
+ case PROP_IP_IFACE:
if (_is_connected (state))
g_value_set_string (value, nm_device_get_ip_iface (self));
else
g_value_set_string (value, NULL);
break;
- case NM_DEVICE_INTERFACE_PROP_IFINDEX:
+ case PROP_IFINDEX:
g_value_set_int (value, priv->ifindex);
break;
- case NM_DEVICE_INTERFACE_PROP_DRIVER:
+ case PROP_DRIVER:
g_value_set_string (value, priv->driver);
break;
- case NM_DEVICE_INTERFACE_PROP_CAPABILITIES:
+ case PROP_CAPABILITIES:
g_value_set_uint (value, priv->capabilities);
break;
- case NM_DEVICE_INTERFACE_PROP_IP4_ADDRESS:
+ case PROP_IP4_ADDRESS:
g_value_set_uint (value, priv->ip4_address);
break;
- case NM_DEVICE_INTERFACE_PROP_IP4_CONFIG:
+ case PROP_IP4_CONFIG:
if (_is_connected (state) && priv->ip4_config)
g_value_set_boxed (value, nm_ip4_config_get_dbus_path (priv->ip4_config));
else
g_value_set_boxed (value, "/");
break;
- case NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG:
+ case PROP_DHCP4_CONFIG:
if (_is_connected (state) && priv->dhcp4_client)
g_value_set_boxed (value, nm_dhcp4_config_get_dbus_path (priv->dhcp4_config));
else
g_value_set_boxed (value, "/");
break;
- case NM_DEVICE_INTERFACE_PROP_IP6_CONFIG:
+ case PROP_IP6_CONFIG:
if (_is_connected (state) && priv->ip6_config)
g_value_set_boxed (value, nm_ip6_config_get_dbus_path (priv->ip6_config));
else
g_value_set_boxed (value, "/");
break;
- case NM_DEVICE_INTERFACE_PROP_DHCP6_CONFIG:
+ case PROP_DHCP6_CONFIG:
if (_is_connected (state) && priv->dhcp6_client)
g_value_set_boxed (value, nm_dhcp6_config_get_dbus_path (priv->dhcp6_config));
else
g_value_set_boxed (value, "/");
break;
- case NM_DEVICE_INTERFACE_PROP_STATE:
+ case PROP_STATE:
g_value_set_uint (value, priv->state);
break;
- case NM_DEVICE_INTERFACE_PROP_ACTIVE_CONNECTION:
+ case PROP_STATE_REASON:
+ g_value_set_boxed (value,
+ dbus_g_type_specialized_construct (DBUS_G_TYPE_UINT_STRUCT));
+ dbus_g_type_struct_set (value,
+ 0, priv->state,
+ 1, priv->state_reason,
+ G_MAXUINT);
+ break;
+ case PROP_ACTIVE_CONNECTION:
if (priv->act_request)
- ac_path = nm_act_request_get_active_connection_path (priv->act_request);
+ ac_path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (priv->act_request));
g_value_set_boxed (value, ac_path ? ac_path : "/");
break;
- case NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE:
+ case PROP_DEVICE_TYPE:
g_value_set_uint (value, priv->type);
break;
- case NM_DEVICE_INTERFACE_PROP_MANAGED:
+ case PROP_MANAGED:
g_value_set_boolean (value, priv->managed);
break;
- case NM_DEVICE_INTERFACE_PROP_FIRMWARE_MISSING:
+ case PROP_FIRMWARE_MISSING:
g_value_set_boolean (value, priv->firmware_missing);
break;
- case NM_DEVICE_INTERFACE_PROP_TYPE_DESC:
+ case PROP_TYPE_DESC:
g_value_set_string (value, priv->type_desc);
break;
- case NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE:
+ case PROP_RFKILL_TYPE:
g_value_set_uint (value, priv->rfkill_type);
break;
default:
@@ -3557,6 +3868,7 @@ nm_device_class_init (NMDeviceClass *klass)
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->constructor = constructor;
+ object_class->constructed = constructed;
klass->get_type_capabilities = real_get_type_capabilities;
klass->get_generic_capabilities = real_get_generic_capabilities;
@@ -3564,84 +3876,180 @@ nm_device_class_init (NMDeviceClass *klass)
klass->act_stage2_config = real_act_stage2_config;
klass->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
klass->act_stage3_ip6_config_start = real_act_stage3_ip6_config_start;
- klass->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config;
- klass->act_stage4_get_ip6_config = real_act_stage4_get_ip6_config;
klass->act_stage4_ip4_config_timeout = real_act_stage4_ip4_config_timeout;
klass->act_stage4_ip6_config_timeout = real_act_stage4_ip6_config_timeout;
/* Properties */
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_UDI,
- NM_DEVICE_INTERFACE_UDI);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_IFACE,
- NM_DEVICE_INTERFACE_IFACE);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_IP_IFACE,
- NM_DEVICE_INTERFACE_IP_IFACE);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_IFINDEX,
- NM_DEVICE_INTERFACE_IFINDEX);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_DRIVER,
- NM_DEVICE_INTERFACE_DRIVER);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_CAPABILITIES,
- NM_DEVICE_INTERFACE_CAPABILITIES);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_IP4_ADDRESS,
- NM_DEVICE_INTERFACE_IP4_ADDRESS);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_IP4_CONFIG,
- NM_DEVICE_INTERFACE_IP4_CONFIG);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG,
- NM_DEVICE_INTERFACE_DHCP4_CONFIG);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_IP6_CONFIG,
- NM_DEVICE_INTERFACE_IP6_CONFIG);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_DHCP6_CONFIG,
- NM_DEVICE_INTERFACE_DHCP6_CONFIG);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_STATE,
- NM_DEVICE_INTERFACE_STATE);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_ACTIVE_CONNECTION,
- NM_DEVICE_INTERFACE_ACTIVE_CONNECTION);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE,
- NM_DEVICE_INTERFACE_DEVICE_TYPE);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_MANAGED,
- NM_DEVICE_INTERFACE_MANAGED);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_FIRMWARE_MISSING,
- NM_DEVICE_INTERFACE_FIRMWARE_MISSING);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_TYPE_DESC,
- NM_DEVICE_INTERFACE_TYPE_DESC);
-
- g_object_class_override_property (object_class,
- NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE,
- NM_DEVICE_INTERFACE_RFKILL_TYPE);
+ g_object_class_install_property
+ (object_class, PROP_UDI,
+ g_param_spec_string (NM_DEVICE_UDI,
+ "UDI",
+ "Unique Device Identifier",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property
+ (object_class, PROP_IFACE,
+ g_param_spec_string (NM_DEVICE_IFACE,
+ "Interface",
+ "Interface",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_IP_IFACE,
+ g_param_spec_string (NM_DEVICE_IP_IFACE,
+ "IP Interface",
+ "IP Interface",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_DRIVER,
+ g_param_spec_string (NM_DEVICE_DRIVER,
+ "Driver",
+ "Driver",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_CAPABILITIES,
+ g_param_spec_uint (NM_DEVICE_CAPABILITIES,
+ "Capabilities",
+ "Capabilities",
+ 0, G_MAXUINT32, NM_DEVICE_CAP_NONE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_IP4_ADDRESS,
+ g_param_spec_uint (NM_DEVICE_IP4_ADDRESS,
+ "IP4 address",
+ "IP4 address",
+ 0, G_MAXUINT32, 0, /* FIXME */
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_IP4_CONFIG,
+ g_param_spec_boxed (NM_DEVICE_IP4_CONFIG,
+ "IP4 Config",
+ "IP4 Config",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_DHCP4_CONFIG,
+ g_param_spec_boxed (NM_DEVICE_DHCP4_CONFIG,
+ "DHCP4 Config",
+ "DHCP4 Config",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_IP6_CONFIG,
+ g_param_spec_boxed (NM_DEVICE_IP6_CONFIG,
+ "IP6 Config",
+ "IP6 Config",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_DHCP6_CONFIG,
+ g_param_spec_boxed (NM_DEVICE_DHCP6_CONFIG,
+ "DHCP6 Config",
+ "DHCP6 Config",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_STATE,
+ g_param_spec_uint (NM_DEVICE_STATE,
+ "State",
+ "State",
+ 0, G_MAXUINT32, NM_DEVICE_STATE_UNKNOWN,
+ G_PARAM_READABLE));
+ g_object_class_install_property
+ (object_class, PROP_STATE_REASON,
+ g_param_spec_boxed (NM_DEVICE_STATE_REASON,
+ "StateReason",
+ "StateReason",
+ DBUS_G_TYPE_UINT_STRUCT,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_ACTIVE_CONNECTION,
+ g_param_spec_boxed (NM_DEVICE_ACTIVE_CONNECTION,
+ "ActiveConnection",
+ "ActiveConnection",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (object_class, PROP_DEVICE_TYPE,
+ g_param_spec_uint (NM_DEVICE_DEVICE_TYPE,
+ "DeviceType",
+ "DeviceType",
+ 0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT));
+
+ g_object_class_install_property
+ (object_class, PROP_MANAGED,
+ g_param_spec_boolean (NM_DEVICE_MANAGED,
+ "Managed",
+ "Managed",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_FIRMWARE_MISSING,
+ g_param_spec_boolean (NM_DEVICE_FIRMWARE_MISSING,
+ "FirmwareMissing",
+ "Firmware missing",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_TYPE_DESC,
+ g_param_spec_string (NM_DEVICE_TYPE_DESC,
+ "Type Description",
+ "Device type description",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT));
+
+ g_object_class_install_property
+ (object_class, PROP_RFKILL_TYPE,
+ g_param_spec_uint (NM_DEVICE_RFKILL_TYPE,
+ "Rfkill Type",
+ "Type of rfkill switch (if any) supported by this device",
+ RFKILL_TYPE_WLAN,
+ RFKILL_TYPE_MAX,
+ RFKILL_TYPE_UNKNOWN,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT));
+
+ g_object_class_install_property
+ (object_class, PROP_IFINDEX,
+ g_param_spec_int (NM_DEVICE_IFINDEX,
+ "Ifindex",
+ "Ifindex",
+ 0, G_MAXINT, 0,
+ G_PARAM_READABLE | NM_PROPERTY_PARAM_NO_EXPORT));
+
+ /* Signals */
+ signals[STATE_CHANGED] =
+ g_signal_new ("state-changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0, NULL, NULL,
+ _nm_marshal_VOID__UINT_UINT_UINT,
+ G_TYPE_NONE, 3,
+ G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
+
+ signals[DISCONNECT_REQUEST] =
+ g_signal_new (NM_DEVICE_DISCONNECT_REQUEST,
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[AUTOCONNECT_ALLOWED] =
g_signal_new ("autoconnect-allowed",
@@ -3651,32 +4059,11 @@ nm_device_class_init (NMDeviceClass *klass)
autoconnect_allowed_accumulator, NULL,
_nm_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0);
-}
-
-static gboolean
-failed_to_disconnected (gpointer user_data)
-{
- NMDevice *self = NM_DEVICE (user_data);
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
-
- nm_log_dbg (LOGD_DEVICE, "(%s): running failed->disconnected transition",
- nm_device_get_iface (self));
- priv->failed_to_disconnected_id = 0;
- nm_device_state_changed (self, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE);
- return FALSE;
-}
-static gboolean
-unavailable_to_disconnected (gpointer user_data)
-{
- NMDevice *self = NM_DEVICE (user_data);
- NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
+ &dbus_glib_nm_device_interface_object_info);
- nm_log_dbg (LOGD_DEVICE, "(%s): running unavailable->disconnected transition",
- nm_device_get_iface (self));
- priv->unavailable_to_disconnected_id = 0;
- nm_device_state_changed (self, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE);
- return FALSE;
+ dbus_g_error_domain_register (NM_DEVICE_ERROR, NULL, NM_TYPE_DEVICE_ERROR);
}
void
@@ -3690,7 +4077,7 @@ nm_device_set_firmware_missing (NMDevice *self, gboolean new_missing)
priv = NM_DEVICE_GET_PRIVATE (self);
if (priv->firmware_missing != new_missing) {
priv->firmware_missing = new_missing;
- g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_FIRMWARE_MISSING);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_FIRMWARE_MISSING);
}
}
@@ -3826,6 +4213,18 @@ reason_to_string (NMDeviceStateReason reason)
return "modem-not-found";
case NM_DEVICE_STATE_REASON_BT_FAILED:
return "bluetooth-failed";
+ case NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED:
+ return "gsm-sim-not-inserted";
+ case NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED:
+ return "gsm-sim-pin-required";
+ case NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED:
+ return "gsm-sim-puk-required";
+ case NM_DEVICE_STATE_REASON_GSM_SIM_WRONG:
+ return "gsm-sim-wrong";
+ case NM_DEVICE_STATE_REASON_INFINIBAND_MODE:
+ return "infiniband-mode";
+ case NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED:
+ return "dependency-failed";
default:
break;
}
@@ -3854,6 +4253,7 @@ nm_device_state_changed (NMDevice *device,
old_state = priv->state;
priv->state = state;
+ priv->state_reason = reason;
nm_log_info (LOGD_DEVICE, "(%s): device state change: %s -> %s (reason '%s') [%d %d %d]",
nm_device_get_iface (device),
@@ -3864,12 +4264,21 @@ nm_device_state_changed (NMDevice *device,
state,
reason);
- /* Clear any delayed transitions */
- delayed_transitions_clear (device);
+ /* Clear any queued transitions */
+ queued_state_clear (device);
/* Cache the activation request for the dispatcher */
req = priv->act_request ? g_object_ref (priv->act_request) : NULL;
+ /* Update connection timestamps; do this before possibly deactivating the
+ * device since that will clear the activation request and thus the
+ * connection, which we need.
+ */
+ if (state == NM_DEVICE_STATE_ACTIVATED || old_state == NM_DEVICE_STATE_ACTIVATED) {
+ nm_settings_connection_update_timestamp (NM_SETTINGS_CONNECTION (nm_act_request_get_connection (req)),
+ (guint64) time (NULL), TRUE);
+ }
+
/* Handle the new state here; but anything that could trigger
* another state change should be done below.
*/
@@ -3891,18 +4300,19 @@ nm_device_state_changed (NMDevice *device,
* assuming the device's existing connection.
*/
if (reason != NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED)
- nm_device_interface_deactivate (NM_DEVICE_INTERFACE (device), reason);
+ nm_device_deactivate (device, reason);
break;
case NM_DEVICE_STATE_DISCONNECTED:
if (old_state != NM_DEVICE_STATE_UNAVAILABLE)
- nm_device_interface_deactivate (NM_DEVICE_INTERFACE (device), reason);
+ nm_device_deactivate (device, reason);
break;
default:
priv->autoconnect_inhibit = FALSE;
break;
}
- g_object_notify (G_OBJECT (device), NM_DEVICE_INTERFACE_STATE);
+ g_object_notify (G_OBJECT (device), NM_DEVICE_STATE);
+ g_object_notify (G_OBJECT (device), NM_DEVICE_STATE_REASON);
g_signal_emit_by_name (device, "state-changed", state, old_state, reason);
/* Post-process the event after internal notification */
@@ -3918,7 +4328,7 @@ nm_device_state_changed (NMDevice *device,
if (nm_device_is_available (device)) {
nm_log_dbg (LOGD_DEVICE, "(%s): device is available, will transition to DISCONNECTED",
nm_device_get_iface (device));
- priv->unavailable_to_disconnected_id = g_idle_add (unavailable_to_disconnected, device);
+ nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE);
} else {
nm_log_dbg (LOGD_DEVICE, "(%s): device not yet available for transition to DISCONNECTED",
nm_device_get_iface (device));
@@ -3935,7 +4345,7 @@ nm_device_state_changed (NMDevice *device,
* immediately because we can't change states again from the state
* handler for a variety of reasons.
*/
- priv->failed_to_disconnected_id = g_idle_add (failed_to_disconnected, device);
+ nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE);
break;
default:
break;
@@ -3949,6 +4359,51 @@ nm_device_state_changed (NMDevice *device,
g_object_unref (req);
}
+static gboolean
+queued_set_state (gpointer user_data)
+{
+ NMDevice *self = NM_DEVICE (user_data);
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+
+ if (priv->queued_state.id) {
+ nm_log_dbg (LOGD_DEVICE, "(%s): running queued state change to %s (id %d)",
+ nm_device_get_iface (self),
+ state_to_string (priv->queued_state.state),
+ priv->queued_state.id);
+ priv->queued_state.id = 0;
+ nm_device_state_changed (self, priv->queued_state.state, priv->queued_state.reason);
+ }
+ queued_state_clear (self);
+ return FALSE;
+}
+
+void
+nm_device_queue_state (NMDevice *self,
+ NMDeviceState state,
+ NMDeviceStateReason reason)
+{
+ NMDevicePrivate *priv;
+
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (NM_IS_DEVICE (self));
+
+ priv = NM_DEVICE_GET_PRIVATE (self);
+
+ /* We should only ever have one delayed state transition at a time */
+ if (priv->queued_state.id) {
+ g_warn_if_fail (priv->queued_state.id == 0);
+ queued_state_clear (self);
+ }
+
+ priv->queued_state.state = state;
+ priv->queued_state.reason = reason;
+ priv->queued_state.id = g_idle_add (queued_set_state, self);
+
+ nm_log_dbg (LOGD_DEVICE, "(%s): queued state change to %s (id %d)",
+ nm_device_get_iface (self), state_to_string (state),
+ priv->queued_state.id);
+}
+
NMDeviceState
nm_device_get_state (NMDevice *device)
{
@@ -3983,7 +4438,7 @@ nm_device_set_managed (NMDevice *device,
nm_device_get_iface (device),
managed ? "managed" : "unmanaged");
- g_object_notify (G_OBJECT (device), NM_DEVICE_INTERFACE_MANAGED);
+ g_object_notify (G_OBJECT (device), NM_DEVICE_MANAGED);
/* If now managed, jump to unavailable */
if (managed)
@@ -3992,36 +4447,156 @@ nm_device_set_managed (NMDevice *device,
nm_device_state_changed (device, NM_DEVICE_STATE_UNMANAGED, reason);
}
+gboolean
+nm_device_spec_match_list (NMDevice *device, const GSList *specs)
+{
+ g_return_val_if_fail (device != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+
+ if (NM_DEVICE_GET_CLASS (device)->spec_match_list)
+ return NM_DEVICE_GET_CLASS (device)->spec_match_list (device, specs);
+ return FALSE;
+}
+
static gboolean
-spec_match_list (NMDeviceInterface *device, const GSList *specs)
+ip4_match_config (NMDevice *self, NMConnection *connection)
{
- NMDevice *self;
+ NMSettingIP4Config *s_ip4;
+ int i, num;
+ GSList *leases, *iter;
+ NMDHCPManager *dhcp_mgr;
+ const char *method;
- g_return_val_if_fail (device != NULL, FALSE);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
+ if (!s_ip4)
+ return FALSE;
- self = NM_DEVICE (device);
- if (NM_DEVICE_GET_CLASS (self)->spec_match_list)
- return NM_DEVICE_GET_CLASS (self)->spec_match_list (self, specs);
+ /* Get any saved leases that apply to this connection */
+ dhcp_mgr = nm_dhcp_manager_get ();
+ leases = nm_dhcp_manager_get_lease_config (dhcp_mgr,
+ nm_device_get_iface (self),
+ nm_connection_get_uuid (connection));
+ g_object_unref (dhcp_mgr);
+
+ method = nm_setting_ip4_config_get_method (s_ip4);
+ if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
+ gboolean found = FALSE;
+
+ /* Find at least one lease's address on the device */
+ for (iter = leases; iter; iter = g_slist_next (iter)) {
+ NMIP4Config *ip4_config = iter->data;
+ NMIP4Address *addr = nm_ip4_config_get_address (ip4_config, 0);
+ struct in_addr tmp = { .s_addr = nm_ip4_address_get_address (addr) };
+
+ if (addr && nm_netlink_find_address (nm_device_get_ip_ifindex (self),
+ AF_INET,
+ &tmp,
+ nm_ip4_address_get_prefix (addr))) {
+ found = TRUE; /* Yay, device has same address as a lease */
+ break;
+ }
+ }
+ g_slist_foreach (leases, (GFunc) g_object_unref, NULL);
+ g_slist_free (leases);
+ return found;
+ } else {
+ /* Maybe the connection used to be DHCP and there are stale leases; ignore them */
+ g_slist_foreach (leases, (GFunc) g_object_unref, NULL);
+ g_slist_free (leases);
+ }
- return FALSE;
+ if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
+ // FIXME: Enforce no ipv4 addresses?
+ return TRUE;
+ }
+
+ /* 'shared' and 'link-local' aren't supported methods because 'shared'
+ * requires too much iptables and dnsmasq state to be reclaimed, and
+ * avahi-autoipd isn't smart enough to allow the link-local address to be
+ * determined at any point other than when it was first assigned.
+ */
+ if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL))
+ return FALSE;
+
+ /* Everything below for static addressing */
+
+ /* Find all IP4 addresses of this connection on the device */
+ num = nm_setting_ip4_config_get_num_addresses (s_ip4);
+ for (i = 0; i < num; i++) {
+ NMIP4Address *addr = nm_setting_ip4_config_get_address (s_ip4, i);
+ struct in_addr tmp = { .s_addr = nm_ip4_address_get_address (addr) };
+
+ if (!nm_netlink_find_address (nm_device_get_ip_ifindex (self),
+ AF_INET,
+ &tmp,
+ nm_ip4_address_get_prefix (addr)))
+ return FALSE;
+ }
+
+ /* Success; all the connection's static IP addresses are assigned to the device */
+ return TRUE;
}
-static NMConnection *
-connection_match_config (NMDeviceInterface *device, const GSList *connections)
+gboolean
+nm_device_match_ip_config (NMDevice *device, NMConnection *connection)
+{
+ if (!ip4_match_config (device, connection))
+ return FALSE;
+
+ /* FIXME: match IPv6 config */
+
+ return TRUE;
+}
+
+NMConnection *
+nm_device_connection_match_config (NMDevice *device, const GSList *connections)
{
g_return_val_if_fail (device != NULL, NULL);
+ g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
if (NM_DEVICE_GET_CLASS (device)->connection_match_config)
return NM_DEVICE_GET_CLASS (device)->connection_match_config (NM_DEVICE (device), connections);
return NULL;
}
-static gboolean
-can_assume_connections (NMDeviceInterface *device)
+/**
+ * nm_device_hwaddr_matches:
+ * @device: the device to use when matching the hardware address
+ * @connection: the connection which supplies the hardware address
+ * @other_hwaddr: if given, use this address instead of the device's actual
+ * hardware address
+ * @other_hwaddr_len: length in bytes of @other_hwaddr
+ * @fail_if_no_hwaddr: whether to fail the match if @connection does not contain
+ * a hardware address
+ *
+ * Matches a the devices hardware address (or @other_hwaddr if given) against
+ * the hardware-specific setting in @connection. Allows for device-agnostic
+ * hardware address matching without having to know the internal details of
+ * the connection and which settings are used by each device subclass.
+ *
+ * Returns: %TRUE if the @device 's hardware address or @other_hwaddr matches
+ * a hardware address in a hardware-specific setting in @connection
+ */
+gboolean
+nm_device_hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr)
{
g_return_val_if_fail (device != NULL, FALSE);
-
- return !!NM_DEVICE_GET_CLASS (device)->connection_match_config;
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+ if (other_hwaddr)
+ g_return_val_if_fail (other_hwaddr_len > 0, FALSE);
+
+ if (NM_DEVICE_GET_CLASS (device)->hwaddr_matches) {
+ return NM_DEVICE_GET_CLASS (device)->hwaddr_matches (device,
+ connection,
+ other_hwaddr,
+ other_hwaddr_len,
+ fail_if_no_hwaddr);
+ }
+ return FALSE;
}
void
diff --git a/src/nm-device.h b/src/nm-device.h
index 1d080eda5..bf76ecb58 100644
--- a/src/nm-device.h
+++ b/src/nm-device.h
@@ -33,14 +33,31 @@
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
#include "nm-connection.h"
-
-typedef enum NMActStageReturn
-{
- NM_ACT_STAGE_RETURN_FAILURE = 0,
- NM_ACT_STAGE_RETURN_SUCCESS,
- NM_ACT_STAGE_RETURN_POSTPONE,
- NM_ACT_STAGE_RETURN_STOP /* This activation chain is done */
-} NMActStageReturn;
+#include "nm-rfkill.h"
+
+/* Properties */
+#define NM_DEVICE_UDI "udi"
+#define NM_DEVICE_IFACE "interface"
+#define NM_DEVICE_IP_IFACE "ip-interface"
+#define NM_DEVICE_DRIVER "driver"
+#define NM_DEVICE_CAPABILITIES "capabilities"
+#define NM_DEVICE_IP4_ADDRESS "ip4-address"
+#define NM_DEVICE_IP4_CONFIG "ip4-config"
+#define NM_DEVICE_DHCP4_CONFIG "dhcp4-config"
+#define NM_DEVICE_IP6_CONFIG "ip6-config"
+#define NM_DEVICE_DHCP6_CONFIG "dhcp6-config"
+#define NM_DEVICE_STATE "state"
+#define NM_DEVICE_STATE_REASON "state-reason"
+#define NM_DEVICE_ACTIVE_CONNECTION "active-connection"
+#define NM_DEVICE_DEVICE_TYPE "device-type" /* ugh */
+#define NM_DEVICE_MANAGED "managed"
+#define NM_DEVICE_FIRMWARE_MISSING "firmware-missing"
+#define NM_DEVICE_TYPE_DESC "type-desc" /* Internal only */
+#define NM_DEVICE_RFKILL_TYPE "rfkill-type" /* Internal only */
+#define NM_DEVICE_IFINDEX "ifindex" /* Internal only */
+
+/* Internal signal */
+#define NM_DEVICE_DISCONNECT_REQUEST "disconnect-request"
G_BEGIN_DECLS
@@ -52,6 +69,14 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE))
#define NM_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE, NMDeviceClass))
+typedef enum NMActStageReturn NMActStageReturn;
+
+typedef enum {
+ NM_DEVICE_ERROR_CONNECTION_ACTIVATING = 0, /*< nick=ConnectionActivating >*/
+ NM_DEVICE_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_DEVICE_ERROR_NOT_ACTIVE, /*< nick=NotActive >*/
+} NMDeviceError;
+
typedef struct {
GObject parent;
} NMDevice;
@@ -59,6 +84,11 @@ typedef struct {
typedef struct {
GObjectClass parent;
+ void (*state_changed) (NMDevice *device,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason);
+
/* Hardware state, ie IFF_UP */
gboolean (*hw_is_up) (NMDevice *self);
gboolean (*hw_bring_up) (NMDevice *self, gboolean *no_firmware);
@@ -80,6 +110,10 @@ typedef struct {
gboolean (* is_available) (NMDevice *self);
+ gboolean (* get_enabled) (NMDevice *self);
+
+ void (* set_enabled) (NMDevice *self, gboolean enabled);
+
NMConnection * (* get_best_auto_connection) (NMDevice *self,
GSList *connections,
char **specific_object);
@@ -99,21 +133,20 @@ typedef struct {
NMActStageReturn (* act_stage2_config) (NMDevice *self,
NMDeviceStateReason *reason);
NMActStageReturn (* act_stage3_ip4_config_start) (NMDevice *self,
+ NMIP4Config **out_config,
NMDeviceStateReason *reason);
NMActStageReturn (* act_stage3_ip6_config_start) (NMDevice *self,
+ NMIP6Config **out_config,
NMDeviceStateReason *reason);
- NMActStageReturn (* act_stage4_get_ip4_config) (NMDevice *self,
- NMIP4Config **config,
- NMDeviceStateReason *reason);
- NMActStageReturn (* act_stage4_get_ip6_config) (NMDevice *self,
- NMIP6Config **config,
- NMDeviceStateReason *reason);
NMActStageReturn (* act_stage4_ip4_config_timeout) (NMDevice *self,
- NMIP4Config **config,
NMDeviceStateReason *reason);
NMActStageReturn (* act_stage4_ip6_config_timeout) (NMDevice *self,
- NMIP6Config **config,
NMDeviceStateReason *reason);
+
+ /* Called right before IP config is set; use for setting MTU etc */
+ void (* ip4_config_pre_commit) (NMDevice *self, NMIP4Config *config);
+ void (* ip6_config_pre_commit) (NMDevice *self, NMIP6Config *config);
+
void (* deactivate) (NMDevice *self);
gboolean (* can_interrupt_activation) (NMDevice *self);
@@ -121,6 +154,18 @@ typedef struct {
gboolean (* spec_match_list) (NMDevice *self, const GSList *specs);
NMConnection * (* connection_match_config) (NMDevice *self, const GSList *connections);
+
+ gboolean (* hwaddr_matches) (NMDevice *self,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr);
+
+ gboolean (* enslave_slave) (NMDevice *self,
+ NMDevice *slave);
+
+ gboolean (* release_slave) (NMDevice *self,
+ NMDevice *slave);
} NMDeviceClass;
@@ -136,25 +181,21 @@ const char * nm_device_get_ip_iface (NMDevice *dev);
int nm_device_get_ip_ifindex(NMDevice *dev);
const char * nm_device_get_driver (NMDevice *dev);
const char * nm_device_get_type_desc (NMDevice *dev);
-
NMDeviceType nm_device_get_device_type (NMDevice *dev);
-guint32 nm_device_get_capabilities (NMDevice *dev);
-guint32 nm_device_get_type_capabilities (NMDevice *dev);
int nm_device_get_priority (NMDevice *dev);
-guint32 nm_device_get_ip4_address (NMDevice *dev);
-void nm_device_update_ip4_address (NMDevice *dev);
-
NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *dev);
NMDHCP6Config * nm_device_get_dhcp6_config (NMDevice *dev);
NMIP4Config * nm_device_get_ip4_config (NMDevice *dev);
NMIP6Config * nm_device_get_ip6_config (NMDevice *dev);
-void * nm_device_get_system_config_data (NMDevice *dev);
+gboolean nm_device_enslave_slave (NMDevice *dev, NMDevice *slave);
+gboolean nm_device_release_slave (NMDevice *dev, NMDevice *slave);
NMActRequest * nm_device_get_act_request (NMDevice *dev);
+NMConnection * nm_device_get_connection (NMDevice *dev);
gboolean nm_device_is_available (NMDevice *dev);
@@ -168,29 +209,59 @@ gboolean nm_device_complete_connection (NMDevice *device,
const GSList *existing_connection,
GError **error);
-void nm_device_activate_schedule_stage1_device_prepare (NMDevice *device);
-void nm_device_activate_schedule_stage2_device_config (NMDevice *device);
-void nm_device_activate_schedule_stage4_ip4_config_get (NMDevice *device);
-void nm_device_activate_schedule_stage4_ip4_config_timeout (NMDevice *device);
-void nm_device_activate_schedule_stage4_ip6_config_get (NMDevice *device);
-void nm_device_activate_schedule_stage4_ip6_config_timeout (NMDevice *device);
+gboolean nm_device_check_connection_compatible (NMDevice *device,
+ NMConnection *connection,
+ GError **error);
+
+gboolean nm_device_can_assume_connections (NMDevice *device);
+
+NMConnection * nm_device_connection_match_config (NMDevice *device,
+ const GSList *connections);
+
+gboolean nm_device_hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr);
+
+gboolean nm_device_spec_match_list (NMDevice *device, const GSList *specs);
+
gboolean nm_device_is_activating (NMDevice *dev);
gboolean nm_device_can_interrupt_activation (NMDevice *self);
gboolean nm_device_autoconnect_allowed (NMDevice *self);
NMDeviceState nm_device_get_state (NMDevice *device);
+gboolean nm_device_get_enabled (NMDevice *device);
+
+void nm_device_set_enabled (NMDevice *device, gboolean enabled);
+
+RfKillType nm_device_get_rfkill_type (NMDevice *device);
+
gboolean nm_device_get_managed (NMDevice *device);
void nm_device_set_managed (NMDevice *device,
gboolean managed,
NMDeviceStateReason reason);
-void nm_device_set_dhcp_timeout (NMDevice *device, guint32 timeout);
-void nm_device_set_dhcp_anycast_address (NMDevice *device, guint8 *addr);
-
void nm_device_clear_autoconnect_inhibit (NMDevice *device);
-gboolean nm_device_dhcp4_renew (NMDevice *device, gboolean release);
+void nm_device_handle_autoip4_event (NMDevice *self,
+ const char *event,
+ const char *address);
+
+void nm_device_state_changed (NMDevice *device,
+ NMDeviceState state,
+ NMDeviceStateReason reason);
+
+void nm_device_queue_state (NMDevice *self,
+ NMDeviceState state,
+ NMDeviceStateReason reason);
+
+gboolean nm_device_get_firmware_missing (NMDevice *self);
+
+gboolean nm_device_activate (NMDevice *device, NMActRequest *req, GError **error);
+
+gboolean nm_device_disconnect (NMDevice *device, GError **error);
G_END_DECLS
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 2f231638f..f06e4069c 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -71,7 +71,7 @@ enum {
static struct nl_addr *
-nm_utils_ip6_addr_to_nl_addr (const struct in6_addr *ip6_addr)
+nm_utils_ip6_addr_to_nl_addr (const struct in6_addr *ip6_addr, guint prefix)
{
struct nl_addr * nla = NULL;
@@ -79,6 +79,8 @@ nm_utils_ip6_addr_to_nl_addr (const struct in6_addr *ip6_addr)
return NULL;
nl_addr_set_family (nla, AF_INET6);
nl_addr_set_binary_addr (nla, (struct in6_addr *)ip6_addr, sizeof (struct in6_addr));
+ if (prefix)
+ nl_addr_set_prefixlen (nla, prefix);
return nla;
}
@@ -428,14 +430,16 @@ nm_ip6_config_set_never_default (NMIP6Config *config, gboolean never_default)
/* libnl convenience/conversion functions */
-static int ip6_addr_to_rtnl_local (const struct in6_addr *ip6_address, struct rtnl_addr *addr)
+static int ip6_addr_to_rtnl_local (const struct in6_addr *ip6_address,
+ struct rtnl_addr *addr,
+ guint prefix)
{
struct nl_addr * local = NULL;
int err = 0;
g_return_val_if_fail (addr != NULL, -1);
- local = nm_utils_ip6_addr_to_nl_addr (ip6_address);
+ local = nm_utils_ip6_addr_to_nl_addr (ip6_address, prefix);
err = rtnl_addr_set_local (addr, local);
nl_addr_put (local);
@@ -449,7 +453,7 @@ static int ip6_addr_to_rtnl_peer (const struct in6_addr *ip6_address, struct rtn
g_return_val_if_fail (addr != NULL, -1);
- peer = nm_utils_ip6_addr_to_nl_addr (ip6_address);
+ peer = nm_utils_ip6_addr_to_nl_addr (ip6_address, 0);
err = rtnl_addr_set_peer (addr, peer);
nl_addr_put (peer);
@@ -472,8 +476,11 @@ nm_ip6_config_to_rtnl_addr (NMIP6Config *config, guint32 i, guint32 flags)
if (!(addr = rtnl_addr_alloc()))
return NULL;
- if (flags & NM_RTNL_ADDR_ADDR)
- success = (ip6_addr_to_rtnl_local (nm_ip6_address_get_address (config_addr), addr) >= 0);
+ if (flags & NM_RTNL_ADDR_ADDR) {
+ success = (ip6_addr_to_rtnl_local (nm_ip6_address_get_address (config_addr),
+ addr,
+ nm_ip6_address_get_prefix (config_addr)) >= 0);
+ }
if (flags & NM_RTNL_ADDR_PTP_ADDR)
success = (ip6_addr_to_rtnl_peer (&priv->ptp_address, addr) >= 0);
diff --git a/src/nm-manager-auth.c b/src/nm-manager-auth.c
index beed65ab3..d797032b0 100644
--- a/src/nm-manager-auth.c
+++ b/src/nm-manager-auth.c
@@ -541,7 +541,7 @@ nm_auth_uid_in_acl (NMConnection *connection,
g_return_val_if_fail (connection != NULL, FALSE);
g_return_val_if_fail (smon != NULL, FALSE);
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
/* Reject the request if the request comes from no session at all */
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 475344a52..7c812bdc0 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -16,16 +16,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2009 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#include <config.h>
#include <netinet/ether.h>
-#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
#include <gio/gio.h>
@@ -38,15 +40,14 @@
#include "nm-vpn-manager.h"
#include "nm-modem-manager.h"
#include "nm-device-bt.h"
-#include "nm-device-interface.h"
-#include "nm-device-private.h"
+#include "nm-device.h"
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
#include "nm-device-olpc-mesh.h"
-#if WITH_WIMAX
-#include "nm-device-wimax.h"
-#endif
#include "nm-device-modem.h"
+#include "nm-device-infiniband.h"
+#include "nm-device-bond.h"
+#include "nm-device-vlan.h"
#include "nm-system.h"
#include "nm-properties-changed-signal.h"
#include "nm-setting-bluetooth.h"
@@ -64,6 +65,14 @@
#include "nm-manager-auth.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
+#include "nm-device-factory.h"
+#include "wifi-utils.h"
+#include "nm-enum-types.h"
+
+#if WITH_CONCHECK
+#include "nm-connectivity.h"
+#endif
+
#define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
#define NM_AUTOIP_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd"
@@ -117,15 +126,6 @@ static gboolean impl_manager_set_logging (NMManager *manager,
#include "nm-manager-glue.h"
-static void udev_device_added_cb (NMUdevManager *udev_mgr,
- GUdevDevice *device,
- NMDeviceCreatorFn creator_fn,
- gpointer user_data);
-
-static void udev_device_removed_cb (NMUdevManager *udev_mgr,
- GUdevDevice *device,
- gpointer user_data);
-
static void bluez_manager_bdaddr_added_cb (NMBluezManager *bluez_mgr,
const char *bdaddr,
const char *name,
@@ -144,14 +144,15 @@ static void add_device (NMManager *self, NMDevice *device);
static void hostname_provider_init (NMHostnameProvider *provider_class);
-static const char *internal_activate_device (NMManager *manager,
- NMDevice *device,
- NMConnection *connection,
- const char *specific_object,
- gboolean user_requested,
- gulong sender_uid,
- gboolean assumed,
- GError **error);
+static NMActiveConnection *internal_activate_device (NMManager *manager,
+ NMDevice *device,
+ NMConnection *connection,
+ const char *specific_object,
+ gboolean user_requested,
+ gulong sender_uid,
+ gboolean assumed,
+ NMActiveConnection *master,
+ GError **error);
static NMDevice *find_device_by_ip_iface (NMManager *self, const gchar *iface);
@@ -200,11 +201,17 @@ typedef struct {
GSList *devices;
NMState state;
+#if WITH_CONCHECK
+ NMConnectivity *connectivity;
+#endif
NMDBusManager *dbus_mgr;
NMUdevManager *udev_mgr;
NMBluezManager *bluez_mgr;
+ /* List of NMDeviceFactoryFunc pointers sorted in priority order */
+ GSList *factories;
+
NMSettings *settings;
char *hostname;
@@ -277,20 +284,7 @@ enum {
/************************************************************************/
-typedef enum {
- NM_MANAGER_ERROR_UNKNOWN_CONNECTION = 0,
- NM_MANAGER_ERROR_UNKNOWN_DEVICE,
- NM_MANAGER_ERROR_UNMANAGED_DEVICE,
- NM_MANAGER_ERROR_SYSTEM_CONNECTION,
- NM_MANAGER_ERROR_PERMISSION_DENIED,
- NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE,
- NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE,
- NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED,
- NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE,
-} NMManagerError;
-
#define NM_MANAGER_ERROR (nm_manager_error_quark ())
-#define NM_TYPE_MANAGER_ERROR (nm_manager_error_get_type ())
static GQuark
nm_manager_error_quark (void)
@@ -301,41 +295,6 @@ nm_manager_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_manager_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not provided by any known settings service. */
- ENUM_ENTRY (NM_MANAGER_ERROR_UNKNOWN_CONNECTION, "UnknownConnection"),
- /* Unknown device. */
- ENUM_ENTRY (NM_MANAGER_ERROR_UNKNOWN_DEVICE, "UnknownDevice"),
- /* Unmanaged device. */
- ENUM_ENTRY (NM_MANAGER_ERROR_UNMANAGED_DEVICE, "UnmanagedDevice"),
- /* Connection was superceded by a system connection. */
- ENUM_ENTRY (NM_MANAGER_ERROR_SYSTEM_CONNECTION, "SystemConnection"),
- /* User does not have the permission to activate this connection. */
- ENUM_ENTRY (NM_MANAGER_ERROR_PERMISSION_DENIED, "PermissionDenied"),
- /* The connection was not active. */
- ENUM_ENTRY (NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE, "ConnectionNotActive"),
- /* The manager is already in the requested sleep state */
- ENUM_ENTRY (NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE, "AlreadyAsleepOrAwake"),
- /* The manager is already in the requested enabled/disabled state */
- ENUM_ENTRY (NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED, "AlreadyEnabledOrDisabled"),
- /* The requested operation is unsupported for this type of connection */
- ENUM_ENTRY (NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE, "UnsupportedConnectionType"),
- { 0, 0, 0 },
- };
- etype = g_enum_register_static ("NMManagerError", values);
- }
- return etype;
-}
-
/************************************************************************/
static NMDevice *
@@ -366,6 +325,24 @@ nm_manager_get_device_by_path (NMManager *manager, const char *path)
return NULL;
}
+NMDevice *
+nm_manager_get_device_by_master (NMManager *manager, const char *master, const char *driver)
+{
+ GSList *iter;
+
+ g_return_val_if_fail (master != NULL, NULL);
+
+ for (iter = NM_MANAGER_GET_PRIVATE (manager)->devices; iter; iter = iter->next) {
+ NMDevice *device = NM_DEVICE (iter->data);
+
+ if (!strcmp (nm_device_get_iface (device), master) &&
+ (!driver || !strcmp (nm_device_get_driver (device), driver)))
+ return device;
+ }
+
+ return NULL;
+}
+
static gboolean
manager_sleeping (NMManager *self)
{
@@ -385,7 +362,7 @@ vpn_manager_connection_activated_cb (NMVPNManager *manager,
{
/* Update timestamp for the VPN connection */
nm_settings_connection_update_timestamp (NM_SETTINGS_CONNECTION (nm_vpn_connection_get_connection (vpn)),
- (guint64) time (NULL));
+ (guint64) time (NULL), TRUE);
}
static void
@@ -422,7 +399,7 @@ modem_added (NMModemManager *modem_manager,
/* Give Bluetooth DUN devices first chance to claim the modem */
for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
- if (NM_IS_DEVICE_BT (iter->data)) {
+ if (nm_device_get_device_type (iter->data) == NM_DEVICE_TYPE_BT) {
if (nm_device_bt_modem_added (NM_DEVICE_BT (iter->data), modem, driver))
return;
}
@@ -462,8 +439,12 @@ nm_manager_update_state (NMManager *manager)
NMDeviceState state = nm_device_get_state (dev);
if (state == NM_DEVICE_STATE_ACTIVATED) {
- /* FIXME: handle local-only and site too */
new_state = NM_STATE_CONNECTED_GLOBAL;
+#if WITH_CONCHECK
+ /* Connectivity check might have a better idea */
+ if (nm_connectivity_get_connected (priv->connectivity) == FALSE)
+ new_state = NM_STATE_CONNECTED_SITE;
+#endif
break;
}
@@ -491,7 +472,10 @@ manager_device_state_changed (NMDevice *device,
NMDeviceStateReason reason,
gpointer user_data)
{
- NMManager *manager = NM_MANAGER (user_data);
+ NMManager *self = NM_MANAGER (user_data);
+#if WITH_CONCHECK
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+#endif
switch (new_state) {
case NM_DEVICE_STATE_UNMANAGED:
@@ -499,22 +483,30 @@ manager_device_state_changed (NMDevice *device,
case NM_DEVICE_STATE_DISCONNECTED:
case NM_DEVICE_STATE_PREPARE:
case NM_DEVICE_STATE_FAILED:
- g_object_notify (G_OBJECT (manager), NM_MANAGER_ACTIVE_CONNECTIONS);
+ g_object_notify (G_OBJECT (self), NM_MANAGER_ACTIVE_CONNECTIONS);
break;
default:
break;
}
- nm_manager_update_state (manager);
-
- if (new_state == NM_DEVICE_STATE_ACTIVATED) {
- NMActRequest *req;
+ nm_manager_update_state (self);
- req = nm_device_get_act_request (device);
- if (req)
- nm_settings_connection_update_timestamp (NM_SETTINGS_CONNECTION (nm_act_request_get_connection (req)),
- (guint64) time (NULL));
+#if WITH_CONCHECK
+ if (priv->state >= NM_STATE_CONNECTED_LOCAL) {
+ if (old_state == NM_DEVICE_STATE_ACTIVATED || new_state == NM_DEVICE_STATE_ACTIVATED) {
+ /* Still connected, but a device activated or deactivated; make sure
+ * we still have connectivity on the other activated devices.
+ */
+ nm_log_dbg (LOGD_CORE, "(%s): triggered connectivity check due to state change",
+ nm_device_get_iface (device));
+ nm_connectivity_start_check (priv->connectivity);
+ }
+ } else {
+ /* Cannot be connected if no devices are activated */
+ nm_log_dbg (LOGD_CORE, "stopping connectivity checks");
+ nm_connectivity_stop_check (priv->connectivity);
}
+#endif
}
/* Removes a device from a device list; returns the start of the new device list */
@@ -535,7 +527,7 @@ remove_one_device (NMManager *manager,
* connections get torn down and the interface is deactivated.
*/
- if ( !nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (device))
+ if ( !nm_device_can_assume_connections (device)
|| (nm_device_get_state (device) != NM_DEVICE_STATE_ACTIVATED)
|| !quitting)
nm_device_set_managed (device, FALSE, NM_DEVICE_STATE_REASON_REMOVED);
@@ -562,7 +554,7 @@ modem_removed (NMModemManager *modem_manager,
/* Give Bluetooth DUN devices first chance to handle the modem removal */
for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
- if (NM_IS_DEVICE_BT (iter->data)) {
+ if (nm_device_get_device_type (iter->data) == NM_DEVICE_TYPE_BT) {
if (nm_device_bt_modem_removed (NM_DEVICE_BT (iter->data), modem))
return;
}
@@ -639,11 +631,11 @@ might_be_vpn (NMConnection *connection)
NMSettingConnection *s_con;
const char *ctype = NULL;
- if (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN))
+ if (nm_connection_get_setting_vpn (connection))
return TRUE;
/* Make sure it's not a VPN, which we can't autocomplete yet */
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (s_con)
ctype = nm_setting_connection_get_connection_type (s_con);
@@ -655,7 +647,7 @@ try_complete_vpn (NMConnection *connection, GSList *existing, GError **error)
{
g_assert (might_be_vpn (connection) == TRUE);
- if (!nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN)) {
+ if (!nm_connection_get_setting_vpn (connection)) {
g_set_error_literal (error,
NM_MANAGER_ERROR,
NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE,
@@ -741,13 +733,14 @@ pending_activation_new (NMManager *manager,
pending->context = context;
pending->callback = callback;
- pending->device_path = g_strdup (device_path);
pending->connection_path = g_strdup (connection_path);
pending->connection = connection;
/* "/" is special-cased to NULL to get through D-Bus */
if (specific_object_path && strcmp (specific_object_path, "/"))
pending->specific_object_path = g_strdup (specific_object_path);
+ if (device_path && strcmp (device_path, "/"))
+ pending->device_path = g_strdup (device_path);
return pending;
}
@@ -862,19 +855,21 @@ pending_activation_check_authorized (PendingActivation *pending,
static void
pending_activation_destroy (PendingActivation *pending,
GError *error,
- const char *ac_path)
+ NMActiveConnection *ac)
{
g_return_if_fail (pending != NULL);
if (error)
dbus_g_method_return_error (pending->context, error);
- else if (ac_path) {
+ else if (ac) {
if (pending->connection) {
dbus_g_method_return (pending->context,
pending->connection_path,
- ac_path);
- } else
- dbus_g_method_return (pending->context, ac_path);
+ nm_active_connection_get_path (ac));
+ } else {
+ dbus_g_method_return (pending->context,
+ nm_active_connection_get_path (ac));
+ }
}
g_free (pending->connection_path);
@@ -909,7 +904,7 @@ get_active_connections (NMManager *manager, NMConnection *filter)
continue;
if (!filter || (nm_act_request_get_connection (req) == filter)) {
- path = nm_act_request_get_active_connection_path (req);
+ path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (req));
g_ptr_array_add (active, g_strdup (path));
}
}
@@ -924,12 +919,274 @@ get_active_connections (NMManager *manager, NMConnection *filter)
/* Settings stuff via NMSettings */
/*******************************************************************/
+static NMDevice *
+get_device_from_hwaddr (NMManager *self, NMConnection *connection)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ GSList *iter;
+
+ for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
+ if (nm_device_hwaddr_matches (NM_DEVICE (iter->data), connection, NULL, 0, TRUE))
+ return iter->data;
+ }
+ return NULL;
+}
+
+static NMDevice*
+find_vlan_parent (NMManager *self,
+ NMConnection *connection,
+ gboolean check_hwaddr)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ NMSettingVlan *s_vlan;
+ NMConnection *parent_connection;
+ const char *parent_iface;
+ NMDevice *parent = NULL;
+ GSList *iter;
+
+ /* The 'parent' property could be either an interface name, a connection
+ * UUID, or even given by the MAC address of the connection's ethernet,
+ * InfiniBand, or WiFi setting.
+ */
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_return_val_if_fail (s_vlan != NULL, NULL);
+
+ parent_iface = nm_setting_vlan_get_parent (s_vlan);
+ if (parent_iface) {
+ parent = find_device_by_ip_iface (self, parent_iface);
+ if (parent)
+ return parent;
+
+ if (nm_utils_is_uuid (parent_iface)) {
+ /* Try as a connection UUID */
+ parent_connection = (NMConnection *) nm_settings_get_connection_by_uuid (priv->settings, parent_iface);
+ if (parent_connection) {
+ /* Check if the parent connection is activated on some device already */
+ for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
+ NMActRequest *req;
+ NMConnection *candidate;
+
+ req = nm_device_get_act_request (NM_DEVICE (iter->data));
+ if (req) {
+ candidate = nm_active_connection_get_connection (NM_ACTIVE_CONNECTION (req));
+ if (candidate == parent_connection)
+ return parent;
+ }
+ }
+
+ /* Check the hardware address of the parent connection */
+ if (check_hwaddr)
+ return get_device_from_hwaddr (self, parent_connection);
+ }
+ return NULL;
+ }
+ }
+
+ /* Try the hardware address from the VLAN connection's hardware setting */
+ if (check_hwaddr)
+ return get_device_from_hwaddr (self, connection);
+
+ return NULL;
+}
+
+/**
+ * get_virtual_iface_name:
+ * @self: the #NMManager
+ * @connection: the #NMConnection representing a virtual interface
+ * @out_parent: on success, the parent device if any
+ *
+ * Given @connection, returns the interface name that the connection
+ * would represent. If the interface name is not given by the connection,
+ * this may require constructing it based on information in the connection
+ * and existing network interfaces.
+ *
+ * Returns: the expected interface name (caller takes ownership), or %NULL
+ */
+static char *
+get_virtual_iface_name (NMManager *self,
+ NMConnection *connection,
+ NMDevice **out_parent)
+{
+ char *vname = NULL;
+ NMDevice *parent = NULL;
+
+ if (out_parent)
+ *out_parent = NULL;
+
+ if (nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME))
+ return g_strdup (nm_connection_get_virtual_iface_name (connection));
+
+ if (nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME)) {
+ NMSettingVlan *s_vlan;
+ const char *ifname;
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_return_val_if_fail (s_vlan != NULL, NULL);
+
+ parent = find_vlan_parent (self, connection, TRUE);
+ if (parent) {
+ /* If the connection doesn't specify the interface name for the VLAN
+ * device, we create one for it using the VLAN ID and the parent
+ * interface's name.
+ */
+ ifname = nm_connection_get_virtual_iface_name (connection);
+ if (ifname)
+ vname = g_strdup (ifname);
+ else {
+ vname = nm_utils_new_vlan_name (nm_device_get_ip_iface (parent),
+ nm_setting_vlan_get_id (s_vlan));
+ }
+ if (out_parent)
+ *out_parent = parent;
+ }
+ }
+
+ return vname;
+}
+
+static gboolean
+connection_needs_virtual_device (NMConnection *connection)
+{
+ if (nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME))
+ return TRUE;
+ if (nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME))
+ return TRUE;
+
+ return FALSE;
+}
+
+static char *
+get_virtual_iface_placeholder_udi (void)
+{
+ static guint32 id = 0;
+
+ return g_strdup_printf ("/virtual/device/placeholder/%d", id++);
+}
+
+/**
+ * system_create_virtual_device:
+ * @self: the #NMManager
+ * @connection: the connection which might require a virtual device
+ *
+ * If @connection requires a virtual device and one does not yet exist for it,
+ * creates that device.
+ *
+ * Returns: the #NMDevice if successfully created, NULL if not
+ */
+static NMDevice *
+system_create_virtual_device (NMManager *self, NMConnection *connection)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ GSList *iter;
+ char *iface = NULL, *udi;
+ NMDevice *device = NULL, *parent = NULL;
+
+ iface = get_virtual_iface_name (self, connection, &parent);
+ if (!iface) {
+ nm_log_warn (LOGD_DEVICE, "(%s) failed to determine virtual interface name",
+ nm_connection_get_id (connection));
+ return NULL;
+ }
+
+ /* Make sure we didn't create a device for this connection already */
+ for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
+ NMDevice *candidate = iter->data;
+ GError *error = NULL;
+
+ if ( g_strcmp0 (nm_device_get_iface (candidate), iface) == 0
+ || nm_device_check_connection_compatible (candidate, connection, &error)) {
+ g_clear_error (&error);
+ goto out;
+ }
+ g_clear_error (&error);
+ }
+
+ if (nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME)) {
+ if (!nm_system_add_bonding_master (iface)) {
+ nm_log_warn (LOGD_DEVICE, "(%s): failed to add bonding master interface for '%s'",
+ iface, nm_connection_get_id (connection));
+ goto out;
+ }
+
+ udi = get_virtual_iface_placeholder_udi ();
+ device = nm_device_bond_new (udi, iface);
+ g_free (udi);
+ } else if (nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME)) {
+ g_return_val_if_fail (parent != NULL, FALSE);
+
+ if (!nm_system_add_vlan_iface (connection, iface, nm_device_get_ip_ifindex (parent))) {
+ nm_log_warn (LOGD_DEVICE, "(%s): failed to add VLAN interface for '%s'",
+ iface, nm_connection_get_id (connection));
+ goto out;
+ }
+ udi = get_virtual_iface_placeholder_udi ();
+ device = nm_device_vlan_new (udi, iface, parent);
+ g_free (udi);
+ }
+
+ if (device)
+ add_device (self, device);
+
+out:
+ g_free (iface);
+ return device;
+}
+
static void
-connections_changed (NMSettings *settings,
+system_create_virtual_devices (NMManager *self)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ GSList *iter, *connections;
+
+ nm_log_dbg (LOGD_CORE, "creating virtual devices...");
+
+ connections = nm_settings_get_connections (priv->settings);
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = iter->data;
+ NMSettingConnection *s_con = nm_connection_get_setting_connection (connection);
+
+ g_assert (s_con);
+ if (connection_needs_virtual_device (connection)) {
+ /* We only create a virtual interface if the connection can autoconnect */
+ if (nm_setting_connection_get_autoconnect (s_con))
+ system_create_virtual_device (self, connection);
+ }
+ }
+ g_slist_free (connections);
+}
+
+static void
+connection_added (NMSettings *settings,
+ NMSettingsConnection *connection,
+ NMManager *manager)
+{
+ bluez_manager_resync_devices (manager);
+
+ if (connection_needs_virtual_device (NM_CONNECTION (connection)))
+ system_create_virtual_device (manager, NM_CONNECTION (connection));
+}
+
+static void
+connection_changed (NMSettings *settings,
NMSettingsConnection *connection,
NMManager *manager)
{
bluez_manager_resync_devices (manager);
+
+ /* FIXME: Some virtual devices may need to be updated in the future. */
+}
+
+static void
+connection_removed (NMSettings *settings,
+ NMSettingsConnection *connection,
+ NMManager *manager)
+{
+ bluez_manager_resync_devices (manager);
+
+ /*
+ * Do not delete existing virtual devices to keep connectivity up.
+ * Virtual devices are reused when NetworkManager is restarted.
+ */
}
static void
@@ -946,7 +1203,7 @@ system_unmanaged_devices_changed_cb (NMSettings *settings,
NMDevice *device = NM_DEVICE (iter->data);
gboolean managed;
- managed = !nm_device_interface_spec_match_list (NM_DEVICE_INTERFACE (device), unmanaged_specs);
+ managed = !nm_device_spec_match_list (device, unmanaged_specs);
nm_device_set_managed (device,
managed,
managed ? NM_DEVICE_STATE_REASON_NOW_MANAGED :
@@ -1072,20 +1329,19 @@ manager_update_radio_enabled (NMManager *self,
/* enable/disable wireless devices as required */
for (iter = priv->devices; iter; iter = iter->next) {
- RfKillType devtype = RFKILL_TYPE_UNKNOWN;
+ NMDevice *device = NM_DEVICE (iter->data);
- g_object_get (G_OBJECT (iter->data), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL);
- if (devtype == rstate->rtype) {
+ if (nm_device_get_rfkill_type (device) == rstate->rtype) {
nm_log_dbg (LOGD_RFKILL, "(%s): setting radio %s",
- nm_device_get_iface (NM_DEVICE (iter->data)),
+ nm_device_get_iface (device),
enabled ? "enabled" : "disabled");
- nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (iter->data), enabled);
+ nm_device_set_enabled (device, enabled);
}
}
}
static void
-manager_hidden_ap_found (NMDeviceInterface *device,
+manager_hidden_ap_found (NMDevice *device,
NMAccessPoint *ap,
gpointer user_data)
{
@@ -1128,7 +1384,7 @@ nm_manager_get_ipw_rfkill_state (NMManager *self)
NMDevice *candidate = NM_DEVICE (iter->data);
RfKillState candidate_state;
- if (NM_IS_DEVICE_WIFI (candidate)) {
+ if (nm_device_get_device_type (candidate) == NM_DEVICE_TYPE_WIFI) {
candidate_state = nm_device_wifi_get_ipw_rfkill_state (NM_DEVICE_WIFI (candidate));
if (candidate_state > ipw_state)
@@ -1149,11 +1405,9 @@ nm_manager_get_modem_enabled_state (NMManager *self)
for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
NMDevice *candidate = NM_DEVICE (iter->data);
RfKillState candidate_state = RFKILL_UNBLOCKED;
- RfKillType devtype = RFKILL_TYPE_UNKNOWN;
- g_object_get (G_OBJECT (candidate), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL);
- if (devtype == RFKILL_TYPE_WWAN) {
- if (!nm_device_interface_get_enabled (NM_DEVICE_INTERFACE (candidate)))
+ if (nm_device_get_rfkill_type (candidate) == RFKILL_TYPE_WWAN) {
+ if (!nm_device_get_enabled (candidate))
candidate_state = RFKILL_SOFT_BLOCKED;
if (candidate_state > wwan_state)
@@ -1323,7 +1577,7 @@ disconnect_net_auth_done_cb (NMAuthChain *chain,
error = deactivate_disconnect_check_error (auth_error, result, "Disconnect");
if (!error) {
device = nm_auth_chain_get_data (chain, "device");
- if (!nm_device_interface_disconnect (NM_DEVICE_INTERFACE (device), &error))
+ if (!nm_device_disconnect (device, &error))
g_assert (error);
}
@@ -1375,7 +1629,7 @@ manager_device_disconnect_request (NMDevice *device,
/* Yay for root */
if (0 == sender_uid) {
- if (!nm_device_interface_disconnect (NM_DEVICE_INTERFACE (device), &error)) {
+ if (!nm_device_disconnect (device, &error)) {
dbus_g_method_return_error (context, error);
g_clear_error (&error);
} else
@@ -1403,12 +1657,23 @@ add_device (NMManager *self, NMDevice *device)
const GSList *unmanaged_specs;
NMConnection *existing = NULL;
gboolean managed = FALSE, enabled = FALSE;
- RfKillType rtype = RFKILL_TYPE_UNKNOWN;
+ RfKillType rtype;
+ NMDeviceType devtype;
iface = nm_device_get_ip_iface (device);
g_assert (iface);
- if (!NM_IS_DEVICE_MODEM (device) && find_device_by_ip_iface (self, iface)) {
+ devtype = nm_device_get_device_type (device);
+
+ /* Ignore the device if we already know about it. But some modems will
+ * provide pseudo-ethernet devices that NM has already claimed while
+ * ModemManager is still detecting the modem's serial ports, so when the
+ * MM modem object finally shows up it may have the same IP interface as the
+ * ethernet interface we've already detected. In this case we skip the
+ * check for an existing device with the same IP interface name and kill
+ * the ethernet device later in favor of the modem device.
+ */
+ if ((devtype != NM_DEVICE_TYPE_MODEM) && find_device_by_ip_iface (self, iface)) {
g_object_unref (device);
return;
}
@@ -1419,11 +1684,11 @@ add_device (NMManager *self, NMDevice *device)
G_CALLBACK (manager_device_state_changed),
self);
- g_signal_connect (device, NM_DEVICE_INTERFACE_DISCONNECT_REQUEST,
+ g_signal_connect (device, NM_DEVICE_DISCONNECT_REQUEST,
G_CALLBACK (manager_device_disconnect_request),
self);
- if (NM_IS_DEVICE_WIFI (device)) {
+ if (devtype == NM_DEVICE_TYPE_WIFI) {
/* Attach to the access-point-added signal so that the manager can fill
* non-SSID-broadcasting APs with an SSID.
*/
@@ -1437,25 +1702,21 @@ add_device (NMManager *self, NMDevice *device)
g_signal_connect (device, "notify::" NM_DEVICE_WIFI_IPW_RFKILL_STATE,
G_CALLBACK (manager_ipw_rfkill_state_changed),
self);
- rtype = RFKILL_TYPE_WLAN;
- } else if (NM_IS_DEVICE_MODEM (device)) {
+ } else if (devtype == NM_DEVICE_TYPE_MODEM) {
g_signal_connect (device, NM_DEVICE_MODEM_ENABLE_CHANGED,
G_CALLBACK (manager_modem_enabled_changed),
self);
- rtype = RFKILL_TYPE_WWAN;
-#if WITH_WIMAX
- } else if (NM_IS_DEVICE_WIMAX (device)) {
- rtype = RFKILL_TYPE_WIMAX;
-#endif
}
+ /* Update global rfkill state for this device type with the device's
+ * rfkill state, and then set this device's rfkill state based on the
+ * global state.
+ */
+ rtype = nm_device_get_rfkill_type (device);
if (rtype != RFKILL_TYPE_UNKNOWN) {
- /* Update global rfkill state with this device's rfkill state, and
- * then set this device's rfkill state based on the global state.
- */
nm_manager_rfkill_update (self, rtype);
enabled = radio_enabled_for_type (self, rtype, TRUE);
- nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), enabled);
+ nm_device_set_enabled (device, enabled);
}
type_desc = nm_device_get_type_desc (device);
@@ -1477,12 +1738,11 @@ add_device (NMManager *self, NMDevice *device)
/* Check if we should assume the device's active connection by matching its
* config with an existing system connection.
*/
- if (nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (device))) {
+ if (nm_device_can_assume_connections (device)) {
GSList *connections = NULL;
connections = nm_settings_get_connections (priv->settings);
- existing = nm_device_interface_connection_match_config (NM_DEVICE_INTERFACE (device),
- (const GSList *) connections);
+ existing = nm_device_connection_match_config (device, (const GSList *) connections);
g_slist_free (connections);
if (existing)
@@ -1494,7 +1754,7 @@ add_device (NMManager *self, NMDevice *device)
/* Start the device if it's supposed to be managed */
unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings);
if ( !manager_sleeping (self)
- && !nm_device_interface_spec_match_list (NM_DEVICE_INTERFACE (device), unmanaged_specs)) {
+ && !nm_device_spec_match_list (device, unmanaged_specs)) {
nm_device_set_managed (device,
TRUE,
existing ? NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED :
@@ -1505,16 +1765,21 @@ add_device (NMManager *self, NMDevice *device)
nm_settings_device_added (priv->settings, device);
g_signal_emit (self, signals[DEVICE_ADDED], 0, device);
+ /* New devices might be master interfaces for virtual interfaces; so we may
+ * need to create new virtual interfaces now.
+ */
+ system_create_virtual_devices (self);
+
/* If the device has a connection it can assume, do that now */
if (existing && managed && nm_device_is_available (device)) {
- const char *ac_path;
+ NMActiveConnection *ac;
GError *error = NULL;
nm_log_dbg (LOGD_DEVICE, "(%s): will attempt to assume existing connection",
nm_device_get_iface (device));
- ac_path = internal_activate_device (self, device, existing, NULL, FALSE, 0, TRUE, &error);
- if (ac_path)
+ ac = internal_activate_device (self, device, existing, NULL, FALSE, 0, TRUE, NULL, &error);
+ if (ac)
g_object_notify (G_OBJECT (self), NM_MANAGER_ACTIVE_CONNECTIONS);
else {
nm_log_warn (LOGD_DEVICE, "assumed connection %s failed to activate: (%d) %s",
@@ -1570,14 +1835,14 @@ bluez_manager_find_connection (NMManager *manager,
const char *con_type;
const char *bt_type;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (candidate, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (candidate);
g_assert (s_con);
con_type = nm_setting_connection_get_connection_type (s_con);
g_assert (con_type);
if (!g_str_equal (con_type, NM_SETTING_BLUETOOTH_SETTING_NAME))
continue;
- s_bt = (NMSettingBluetooth *) nm_connection_get_setting (candidate, NM_TYPE_SETTING_BLUETOOTH);
+ s_bt = nm_connection_get_setting_bluetooth (candidate);
if (!s_bt)
continue;
@@ -1612,7 +1877,7 @@ bluez_manager_resync_devices (NMManager *self)
guint32 uuids;
const char *bdaddr;
- if (NM_IS_DEVICE_BT (candidate)) {
+ if (nm_device_get_device_type (candidate) == NM_DEVICE_TYPE_BT) {
uuids = nm_device_bt_get_capabilities (NM_DEVICE_BT (candidate));
bdaddr = nm_device_bt_get_hw_address (NM_DEVICE_BT (candidate));
@@ -1734,23 +1999,246 @@ find_device_by_ifindex (NMManager *self, guint32 ifindex)
return NULL;
}
+#define PLUGIN_PREFIX "libnm-device-plugin-"
+
+typedef struct {
+ NMDeviceType t;
+ guint priority;
+ NMDeviceFactoryCreateFunc create_func;
+} PluginInfo;
+
+static gint
+plugin_sort (PluginInfo *a, PluginInfo *b)
+{
+ /* Higher priority means sort earlier in the list (ie, return -1) */
+ if (a->priority > b->priority)
+ return -1;
+ else if (a->priority < b->priority)
+ return 1;
+ return 0;
+}
+
+static void
+load_device_factories (NMManager *self)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ GDir *dir;
+ GError *error = NULL;
+ const char *item;
+ char *path;
+ GSList *list = NULL, *iter;
+
+ dir = g_dir_open (NMPLUGINDIR, 0, &error);
+ if (!dir) {
+ nm_log_warn (LOGD_HW, "Failed to open plugin directory %s: %s",
+ NMPLUGINDIR,
+ (error && error->message) ? error->message : "(unknown)");
+ g_clear_error (&error);
+ return;
+ }
+
+ while ((item = g_dir_read_name (dir))) {
+ GModule *plugin;
+ NMDeviceFactoryCreateFunc create_func;
+ NMDeviceFactoryPriorityFunc priority_func;
+ NMDeviceFactoryTypeFunc type_func;
+ PluginInfo *info = NULL;
+ NMDeviceType plugin_type;
+
+ if (!g_str_has_prefix (item, PLUGIN_PREFIX))
+ continue;
+
+ path = g_module_build_path (NMPLUGINDIR, item);
+ g_assert (path);
+ plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
+ g_free (path);
+
+ if (!plugin) {
+ nm_log_warn (LOGD_HW, "(%s): failed to load plugin: %s", item, g_module_error ());
+ continue;
+ }
+
+ if (!g_module_symbol (plugin, "nm_device_factory_get_type", (gpointer) (&type_func))) {
+ nm_log_warn (LOGD_HW, "(%s): failed to find device factory: %s", item, g_module_error ());
+ g_module_close (plugin);
+ continue;
+ }
+
+ /* Make sure we don't double-load plugins */
+ plugin_type = type_func ();
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ PluginInfo *candidate = iter->data;
+
+ if (plugin_type == candidate->t) {
+ info = candidate;
+ break;
+ }
+ }
+ if (info) {
+ g_module_close (plugin);
+ continue;
+ }
+
+ if (!g_module_symbol (plugin, "nm_device_factory_create_device", (gpointer) (&create_func))) {
+ nm_log_warn (LOGD_HW, "(%s): failed to find device creator: %s", item, g_module_error ());
+ g_module_close (plugin);
+ continue;
+ }
+
+ info = g_malloc0 (sizeof (*info));
+ info->create_func = create_func;
+ info->t = plugin_type;
+
+ /* Grab priority; higher number equals higher priority */
+ if (g_module_symbol (plugin, "nm_device_factory_get_priority", (gpointer) (&priority_func)))
+ info->priority = priority_func ();
+ else {
+ nm_log_dbg (LOGD_HW, "(%s): failed to find device factory priority func: %s",
+ item, g_module_error ());
+ }
+
+ g_module_make_resident (plugin);
+ list = g_slist_insert_sorted (list, info, (GCompareFunc) plugin_sort);
+
+ nm_log_info (LOGD_HW, "Loaded device factory: %s", g_module_name (plugin));
+ };
+ g_dir_close (dir);
+
+ /* Ditch the priority info and copy the factory functions to our private data */
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ PluginInfo *info = iter->data;
+
+ priv->factories = g_slist_append (priv->factories, info->create_func);
+ g_free (info);
+ }
+ g_slist_free (list);
+}
+
+static gboolean
+is_wireless (GUdevDevice *device)
+{
+ const char *tmp;
+
+ /* Check devtype, newer kernels (2.6.32+) have this */
+ tmp = g_udev_device_get_property (device, "DEVTYPE");
+ if (g_strcmp0 (tmp, "wlan") == 0)
+ return TRUE;
+
+ /* Otherwise hit up WEXT directly */
+ return wifi_utils_is_wifi (g_udev_device_get_name (device),
+ g_udev_device_get_sysfs_path (device));
+}
+
+static gboolean
+is_olpc_mesh (GUdevDevice *device)
+{
+ const gchar *prop = g_udev_device_get_property (device, "ID_NM_OLPC_MESH");
+ return (prop != NULL);
+}
+
+static gboolean
+is_infiniband (GUdevDevice *device)
+{
+ gint etype = g_udev_device_get_sysfs_attr_as_int (device, "type");
+ return etype == ARPHRD_INFINIBAND;
+}
+
+static gboolean
+is_bond (int ifindex)
+{
+ return (nm_system_get_iface_type (ifindex, NULL) == NM_IFACE_TYPE_BOND);
+}
+
+static gboolean
+is_vlan (int ifindex)
+{
+ return (nm_system_get_iface_type (ifindex, NULL) == NM_IFACE_TYPE_VLAN);
+}
+
static void
udev_device_added_cb (NMUdevManager *udev_mgr,
GUdevDevice *udev_device,
- NMDeviceCreatorFn creator_fn,
+ const char *iface,
+ const char *sysfs_path,
+ const char *driver,
+ int ifindex,
gpointer user_data)
{
NMManager *self = NM_MANAGER (user_data);
- GObject *device;
- guint32 ifindex;
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ NMDevice *device = NULL;
+ GSList *iter;
+ GError *error = NULL;
- ifindex = g_udev_device_get_property_as_int (udev_device, "IFINDEX");
- if (find_device_by_ifindex (self, ifindex))
+ g_return_if_fail (udev_device != NULL);
+ g_return_if_fail (iface != NULL);
+ g_return_if_fail (sysfs_path != NULL);
+ g_return_if_fail (driver != NULL);
+ g_return_if_fail (ifindex >= 0);
+
+ device = find_device_by_ifindex (self, ifindex);
+ if (device) {
+ /* If it's a virtual device we may need to update its UDI */
+ if (nm_system_get_iface_type (ifindex, iface) != NM_IFACE_TYPE_UNSPEC)
+ g_object_set (G_OBJECT (device), NM_DEVICE_UDI, sysfs_path, NULL);
return;
+ }
+
+ /* Try registered device factories */
+ for (iter = priv->factories; iter; iter = g_slist_next (iter)) {
+ NMDeviceFactoryCreateFunc create_func = iter->data;
+
+ g_clear_error (&error);
+ device = (NMDevice *) create_func (udev_device, sysfs_path, iface, driver, &error);
+ if (device && NM_IS_DEVICE (device)) {
+ g_assert_no_error (error);
+ break; /* success! */
+ }
+
+ if (error) {
+ nm_log_warn (LOGD_HW, "%s: factory failed to create device: (%d) %s",
+ sysfs_path,
+ error ? error->code : -1,
+ error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ return;
+ }
+ }
+
+ if (device == NULL) {
+ if (is_olpc_mesh (udev_device)) /* must be before is_wireless */
+ device = nm_device_olpc_mesh_new (sysfs_path, iface, driver);
+ else if (is_wireless (udev_device))
+ device = nm_device_wifi_new (sysfs_path, iface, driver);
+ else if (is_infiniband (udev_device))
+ device = nm_device_infiniband_new (sysfs_path, iface, driver);
+ else if (is_bond (ifindex))
+ device = nm_device_bond_new (sysfs_path, iface);
+ else if (is_vlan (ifindex)) {
+ int parent_ifindex = -1;
+ NMDevice *parent;
+
+ /* Have to find the parent device */
+ if (nm_system_get_iface_vlan_info (ifindex, &parent_ifindex, NULL)) {
+ parent = find_device_by_ifindex (self, parent_ifindex);
+ if (parent)
+ device = nm_device_vlan_new (sysfs_path, iface, parent);
+ else {
+ /* If udev signaled the VLAN interface before it signaled
+ * the VLAN's parent at startup we may not know about the
+ * parent device yet. But we'll find it on the second pass
+ * from nm_manager_start().
+ */
+ nm_log_dbg (LOGD_HW, "(%s): VLAN parent interface unknown", iface);
+ }
+ } else
+ nm_log_err (LOGD_HW, "(%s): failed to get VLAN parent ifindex", iface);
+ } else
+ device = nm_device_ethernet_new (sysfs_path, iface, driver);
+ }
- device = creator_fn (udev_mgr, udev_device, manager_sleeping (self));
if (device)
- add_device (self, NM_DEVICE (device));
+ add_device (self, device);
}
static void
@@ -1855,7 +2343,7 @@ nm_manager_get_act_request_by_path (NMManager *manager,
if (!req)
continue;
- ac_path = nm_act_request_get_active_connection_path (req);
+ ac_path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (req));
if (!strcmp (path, ac_path)) {
*device = NM_DEVICE (iter->data);
return req;
@@ -1865,7 +2353,7 @@ nm_manager_get_act_request_by_path (NMManager *manager,
return NULL;
}
-static const char *
+static NMActiveConnection *
internal_activate_device (NMManager *manager,
NMDevice *device,
NMConnection *connection,
@@ -1873,20 +2361,18 @@ internal_activate_device (NMManager *manager,
gboolean user_requested,
gulong sender_uid,
gboolean assumed,
+ NMActiveConnection *master,
GError **error)
{
NMActRequest *req;
- NMDeviceInterface *dev_iface;
gboolean success;
g_return_val_if_fail (NM_IS_MANAGER (manager), NULL);
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
- dev_iface = NM_DEVICE_INTERFACE (device);
-
/* Ensure the requested connection is compatible with the device */
- if (!nm_device_interface_check_connection_compatible (dev_iface, connection, error))
+ if (!nm_device_check_connection_compatible (device, connection, error))
return NULL;
/* Tear down any existing connection */
@@ -1903,14 +2389,322 @@ internal_activate_device (NMManager *manager,
user_requested,
sender_uid,
assumed,
- (gpointer) device);
- success = nm_device_interface_activate (dev_iface, req, error);
+ (gpointer) device,
+ master);
+ success = nm_device_activate (device, req, error);
g_object_unref (req);
- return success ? nm_act_request_get_active_connection_path (req) : NULL;
+ return success ? NM_ACTIVE_CONNECTION (req) : NULL;
+}
+
+/**
+ * find_master:
+ * @self: #NMManager object
+ * @connection: the #NMConnection to find the master connection and device for
+ * @device: the #NMDevice, if any, which will activate @connection
+ * @out_master_connection: on success, the master connection of @connection if
+ * that master connection was found
+ * @out_master_device: on success, the master device of @connection if that
+ * master device was found
+ *
+ * Given an #NMConnection, attempts to find its master connection and/or its
+ * master device. This function may return a master connection, a master device,
+ * or both. If only a connection is returned, that master connection is not
+ * currently active on any device. If only a device is returned, that device
+ * is not currently activated with any connection. If both are returned, then
+ * the device is currently activated or activating with the returned master
+ * connection.
+ *
+ * Returns: %TRUE if the master device and/or connection could be found or if
+ * the connection did not require a master, %FALSE otherwise
+ **/
+static gboolean
+find_master (NMManager *self,
+ NMConnection *connection,
+ NMDevice *device,
+ NMConnection **out_master_connection,
+ NMDevice **out_master_device)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ NMSettingConnection *s_con;
+ const char *master;
+ NMDevice *master_device = NULL;
+ NMConnection *master_connection = NULL;
+ GSList *iter, *connections = NULL;
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+ master = nm_setting_connection_get_master (s_con);
+
+ if (master == NULL)
+ return TRUE; /* success, but no master */
+
+ /* Try as an interface name first */
+ master_device = find_device_by_ip_iface (self, master);
+ if (master_device) {
+ /* A device obviously can't be its own master */
+ if (master_device == device)
+ return FALSE;
+ } else {
+ /* Try master as a connection UUID */
+ master_connection = (NMConnection *) nm_settings_get_connection_by_uuid (priv->settings, master);
+ if (master_connection) {
+ /* Check if the master connection is activated on some device already */
+ for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
+ NMDevice *candidate = NM_DEVICE (iter->data);
+
+ if (candidate == device)
+ continue;
+
+ if (nm_device_get_connection (candidate) == master_connection) {
+ master_device = candidate;
+ break;
+ }
+ }
+ } else {
+ /* Might be a virtual interface that hasn't been created yet, so
+ * look through the interface names of connections that require
+ * virtual interfaces and see if one of their virtual interface
+ * names matches the master.
+ */
+ connections = nm_settings_get_connections (priv->settings);
+ for (iter = connections; iter && !master_connection; iter = g_slist_next (iter)) {
+ NMConnection *candidate = iter->data;
+ char *vname;
+
+ if (connection_needs_virtual_device (candidate)) {
+ vname = get_virtual_iface_name (self, candidate, NULL);
+ if (g_strcmp0 (master, vname) == 0)
+ master_connection = candidate;
+ g_free (vname);
+ }
+ }
+ g_slist_free (connections);
+ }
+ }
+
+ if (out_master_connection)
+ *out_master_connection = master_connection;
+ if (out_master_device)
+ *out_master_device = master_device;
+
+ return master_device || master_connection;
+}
+
+static gboolean
+is_compatible_with_slave (NMConnection *master, NMConnection *slave)
+{
+ NMSettingConnection *s_con;
+
+ g_return_val_if_fail (master, FALSE);
+ g_return_val_if_fail (slave, FALSE);
+
+ s_con = nm_connection_get_setting_connection (slave);
+ g_assert (s_con);
+
+ return nm_connection_is_type (master, nm_setting_connection_get_slave_type (s_con));
+}
+
+/**
+ * ensure_master_active_connection:
+ *
+ * @self: the #NMManager
+ * @dbus_sender: if the request was initiated by a user via D-Bus, the
+ * dbus sender name of the client that requested the activation; for auto
+ * activated connections use %NULL
+ * @connection: the connection that should depend on @master_connection
+ * @device: the #NMDevice, if any, which will activate @connection
+ * @master_connection: the master connection
+ * @master_device: the master device
+ * @error: the error, if an error occurred
+ *
+ * Determines whether a given #NMConnection depends on another connection to
+ * be activated, and if so, finds that master connection or creates it.
+ *
+ * Returns: the master #NMActiveConnection that the caller should depend on, or
+ * %NULL if an error occurred
+ */
+static NMActiveConnection *
+ensure_master_active_connection (NMManager *self,
+ const char *dbus_sender,
+ NMConnection *connection,
+ NMDevice *device,
+ NMConnection *master_connection,
+ NMDevice *master_device,
+ GError **error)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ NMActiveConnection *master_ac = NULL;
+ NMDeviceState master_state;
+ GSList *iter;
+
+ g_assert (connection);
+ g_assert (master_connection || master_device);
+
+ /* If the master device isn't activated then we need to activate it using
+ * compatible connection. If it's already activating we can just proceed.
+ */
+ if (master_device) {
+ /* If we're passed a connection and a device, we require that connection
+ * be already activated on the device, eg returned from find_master().
+ */
+ if (master_connection)
+ g_assert (nm_device_get_connection (master_device) == master_connection);
+
+ master_state = nm_device_get_state (master_device);
+ if ( (master_state == NM_DEVICE_STATE_ACTIVATED)
+ || nm_device_is_activating (master_device)) {
+ /* Device already using master_connection */
+ return NM_ACTIVE_CONNECTION (nm_device_get_act_request (master_device));
+ }
+
+ /* If the device is disconnected, find a compabile connection and
+ * activate it on the device.
+ */
+ if (master_state == NM_DEVICE_STATE_DISCONNECTED) {
+ GSList *connections;
+
+ g_assert (master_connection == NULL);
+
+ /* Find a compatible connection and activate this device using it */
+ connections = nm_settings_get_connections (priv->settings);
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *candidate = NM_CONNECTION (iter->data);
+
+ /* Ensure eg bond slave and the candidate master is a bond master */
+ if (!is_compatible_with_slave (candidate, connection))
+ continue;
+
+ if (nm_device_check_connection_compatible (master_device, candidate, NULL)) {
+ master_ac = nm_manager_activate_connection (self,
+ candidate,
+ NULL,
+ nm_device_get_path (master_device),
+ dbus_sender,
+ error);
+ g_slist_free (connections);
+ return master_ac;
+ }
+ }
+ g_slist_free (connections);
+
+ g_set_error (error,
+ NM_MANAGER_ERROR,
+ NM_MANAGER_ERROR_UNKNOWN_CONNECTION,
+ "No compatible connection found for master device %s.",
+ nm_device_get_iface (master_device));
+ return NULL;
+ }
+
+ /* Otherwise, the device is unmanaged, unavailable, or disconnecting */
+ g_set_error (error,
+ NM_MANAGER_ERROR,
+ NM_MANAGER_ERROR_UNMANAGED_DEVICE,
+ "Master device %s unmanaged or not available for activation",
+ nm_device_get_iface (master_device));
+ } else if (master_connection) {
+ gboolean found_device = FALSE;
+
+ /* Find a compatible device and activate it using this connection */
+ for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
+ NMDevice *candidate = NM_DEVICE (iter->data);
+
+ if (candidate == device) {
+ /* A device obviously can't be its own master */
+ continue;
+ }
+
+ if (!nm_device_check_connection_compatible (candidate, master_connection, NULL))
+ continue;
+
+ found_device = TRUE;
+ master_state = nm_device_get_state (candidate);
+ if (master_state != NM_DEVICE_STATE_DISCONNECTED)
+ continue;
+
+ return nm_manager_activate_connection (self,
+ master_connection,
+ NULL,
+ nm_device_get_path (candidate),
+ dbus_sender,
+ error);
+ }
+
+ /* Device described by master_connection may be a virtual one that's
+ * not created yet.
+ */
+ if (!found_device && connection_needs_virtual_device (master_connection)) {
+ return nm_manager_activate_connection (self,
+ master_connection,
+ NULL,
+ NULL,
+ dbus_sender,
+ error);
+ }
+
+ g_set_error (error,
+ NM_MANAGER_ERROR,
+ NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "No compatible disconnected device found for master connection %s.",
+ nm_connection_get_uuid (master_connection));
+ } else
+ g_assert_not_reached ();
+
+ return NULL;
+}
+
+static NMActiveConnection *
+activate_vpn_connection (NMManager *self,
+ NMConnection *connection,
+ const char *specific_object,
+ const char *device_path,
+ gulong sender_uid,
+ GError **error)
+{
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+ NMActRequest *parent_req = NULL;
+ NMDevice *device = NULL;
+ GSList *iter;
+
+ if (specific_object) {
+ /* Find the specifc connection the client requested we use */
+ parent_req = nm_manager_get_act_request_by_path (self, specific_object, &device);
+ if (!parent_req) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE,
+ "Base connection for VPN connection not active.");
+ return NULL;
+ }
+ } else {
+ /* Just find the current default connection */
+ for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
+ NMDevice *candidate = NM_DEVICE (iter->data);
+ NMActRequest *candidate_req;
+
+ candidate_req = nm_device_get_act_request (candidate);
+ if (candidate_req && nm_active_connection_get_default (NM_ACTIVE_CONNECTION (candidate_req))) {
+ device = candidate;
+ parent_req = candidate_req;
+ break;
+ }
+ }
+ }
+
+ if (!device || !parent_req) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Could not find source connection, or the source connection had no active device.");
+ return NULL;
+ }
+
+ return nm_vpn_manager_activate_connection (priv->vpn_manager,
+ connection,
+ device,
+ nm_active_connection_get_path (NM_ACTIVE_CONNECTION (parent_req)),
+ TRUE,
+ sender_uid,
+ error);
}
-const char *
+NMActiveConnection *
nm_manager_activate_connection (NMManager *manager,
NMConnection *connection,
const char *specific_object,
@@ -1920,11 +2714,13 @@ nm_manager_activate_connection (NMManager *manager,
{
NMManagerPrivate *priv;
NMDevice *device = NULL;
- NMSettingConnection *s_con;
- NMVPNConnection *vpn_connection;
- const char *path = NULL;
gulong sender_uid = 0;
DBusError dbus_error;
+ NMDeviceState state;
+ char *iface;
+ NMDevice *master_device = NULL;
+ NMConnection *master_connection = NULL;
+ NMActiveConnection *master_ac = NULL;
g_return_val_if_fail (manager != NULL, NULL);
g_return_val_if_fail (connection != NULL, NULL);
@@ -1948,87 +2744,141 @@ nm_manager_activate_connection (NMManager *manager,
}
}
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
- g_assert (s_con);
+ /* VPN ? */
+ if (nm_connection_is_type (connection, NM_SETTING_VPN_SETTING_NAME))
+ return activate_vpn_connection (manager, connection, specific_object, device_path, sender_uid, error);
- if (!strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_VPN_SETTING_NAME)) {
- NMActRequest *parent_req = NULL;
-
- /* VPN connection */
+ /* Device-based connection */
+ if (device_path) {
+ device = nm_manager_get_device_by_path (manager, device_path);
+ if (!device) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Device not found");
+ return NULL;
+ }
- if (specific_object) {
- /* Find the specifc connection the client requested we use */
- parent_req = nm_manager_get_act_request_by_path (manager, specific_object, &device);
- if (!parent_req) {
- g_set_error (error,
- NM_MANAGER_ERROR, NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE,
- "%s", "Base connection for VPN connection not active.");
+ /* If it's a virtual interface make sure the device given by the
+ * path matches the connection's interface details.
+ */
+ if (connection_needs_virtual_device (connection)) {
+ iface = get_virtual_iface_name (manager, connection, NULL);
+ if (!iface) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Failed to determine connection's virtual interface name");
+ return NULL;
+ } else if (g_strcmp0 (iface, nm_device_get_ip_iface (device)) != 0) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Device given by path did not match connection's virtual interface name");
+ g_free (iface);
return NULL;
}
- } else {
- GSList *iter;
+ g_free (iface);
+ }
+ } else {
+ /* Virtual connections (VLAN, bond, etc) may not specify a device
+ * path because the device may not be created yet, or it be given
+ * by the connection's properties instead. Find the device the
+ * connection refers to, or create it if needed.
+ */
+ if (!connection_needs_virtual_device (connection)) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "This connection requires an existing device.");
+ return NULL;
+ }
- /* Just find the current default connection */
- for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
- NMDevice *candidate = NM_DEVICE (iter->data);
- NMActRequest *candidate_req;
+ iface = get_virtual_iface_name (manager, connection, NULL);
+ if (!iface) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Failed to determine connection's virtual interface name");
+ return NULL;
+ }
- candidate_req = nm_device_get_act_request (candidate);
- if (candidate_req && nm_act_request_get_default (candidate_req)) {
- device = candidate;
- parent_req = candidate_req;
- break;
- }
+ device = find_device_by_ip_iface (manager, iface);
+ if (!device) {
+ /* Create it */
+ device = system_create_virtual_device (manager, connection);
+ if (!device) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Failed to create virtual interface");
+ return NULL;
}
- }
- if (!device || !parent_req) {
- g_set_error (error,
- NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
- "%s", "Could not find source connection, or the source connection had no active device.");
- return NULL;
+ /* A newly created device, if allowed to be managed by NM, will be
+ * in the UNAVAILABLE state here. Since we want to use it right
+ * away, we transition it immediately to DISCONNECTED.
+ */
+ if ( nm_device_is_available (device)
+ && (nm_device_get_state (device) == NM_DEVICE_STATE_UNAVAILABLE)) {
+ nm_device_state_changed (device,
+ NM_DEVICE_STATE_DISCONNECTED,
+ NM_DEVICE_STATE_REASON_NONE);
+ }
}
+ }
- vpn_connection = nm_vpn_manager_activate_connection (priv->vpn_manager,
- connection,
- device,
- nm_act_request_get_active_connection_path (parent_req),
- TRUE,
- sender_uid,
- error);
- if (vpn_connection)
- path = nm_vpn_connection_get_active_connection_path (vpn_connection);
- } else {
- NMDeviceState state;
+ state = nm_device_get_state (device);
+ if (state < NM_DEVICE_STATE_DISCONNECTED) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNMANAGED_DEVICE,
+ "Device not managed by NetworkManager or unavailable");
+ return NULL;
+ }
- /* Device-based connection */
- device = nm_manager_get_device_by_path (manager, device_path);
- if (!device) {
- g_set_error (error,
- NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
- "%s", "Device not found");
+ /* Try to find the master connection/device if the connection has a dependency */
+ if (!find_master (manager, connection, device, &master_connection, &master_device)) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "Master connection not found or invalid");
+ return NULL;
+ }
+
+ /* Ensure there's a master active connection the new connection we're
+ * activating can depend on.
+ */
+ if (master_connection || master_device) {
+ if (master_connection) {
+ nm_log_dbg (LOGD_CORE, "Activation of '%s' requires master connection '%s'",
+ nm_connection_get_id (connection),
+ nm_connection_get_id (master_connection));
+ }
+ if (master_device) {
+ nm_log_dbg (LOGD_CORE, "Activation of '%s' requires master device '%s'",
+ nm_connection_get_id (connection),
+ nm_device_get_ip_iface (master_device));
+ }
+
+ /* Ensure eg bond slave and the candidate master is a bond master */
+ if (master_connection && !is_compatible_with_slave (master_connection, connection)) {
+ g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_DEPENDENCY_FAILED,
+ "The master connection was not compatible");
return NULL;
}
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
- if (state < NM_DEVICE_STATE_DISCONNECTED) {
- g_set_error (error,
- NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNMANAGED_DEVICE,
- "%s", "Device not managed by NetworkManager or unavailable");
+ master_ac = ensure_master_active_connection (manager,
+ dbus_sender,
+ connection,
+ device,
+ master_connection,
+ master_device,
+ error);
+ if (!master_ac) {
+ if (error)
+ g_assert (*error);
return NULL;
}
- path = internal_activate_device (manager,
- device,
- connection,
- specific_object,
- dbus_sender ? TRUE : FALSE,
- dbus_sender ? sender_uid : 0,
- FALSE,
- error);
+ nm_log_dbg (LOGD_CORE, "Activation of '%s' depends on active connection %s",
+ nm_connection_get_id (connection),
+ nm_active_connection_get_path (master_ac));
}
- return path;
+ return internal_activate_device (manager,
+ device,
+ connection,
+ specific_object,
+ dbus_sender ? TRUE : FALSE,
+ dbus_sender ? sender_uid : 0,
+ FALSE,
+ master_ac,
+ error);
}
/*
@@ -2042,7 +2892,7 @@ pending_activate (NMManager *self, PendingActivation *pending)
{
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
NMSettingsConnection *connection;
- const char *path = NULL;
+ NMActiveConnection *ac = NULL;
GError *error = NULL;
char *sender;
@@ -2058,24 +2908,25 @@ pending_activate (NMManager *self, PendingActivation *pending)
sender = dbus_g_method_get_sender (pending->context);
g_assert (sender);
- path = nm_manager_activate_connection (self,
- NM_CONNECTION (connection),
- pending->specific_object_path,
- pending->device_path,
- sender,
- &error);
+ ac = nm_manager_activate_connection (self,
+ NM_CONNECTION (connection),
+ pending->specific_object_path,
+ pending->device_path,
+ sender,
+ &error);
g_free (sender);
- if (!path) {
+ if (ac)
+ g_object_notify (G_OBJECT (pending->manager), NM_MANAGER_ACTIVE_CONNECTIONS);
+ else {
nm_log_warn (LOGD_CORE, "connection %s failed to activate: (%d) %s",
pending->connection_path,
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
- } else
- g_object_notify (G_OBJECT (pending->manager), NM_MANAGER_ACTIVE_CONNECTIONS);
+ }
out:
- pending_activation_destroy (pending, error, path);
+ pending_activation_destroy (pending, error, ac);
g_clear_error (&error);
}
@@ -2207,7 +3058,7 @@ nm_manager_deactivate_connection (NMManager *manager,
if (!req)
continue;
- if (!strcmp (connection_path, nm_act_request_get_active_connection_path (req))) {
+ if (!strcmp (connection_path, nm_active_connection_get_path (NM_ACTIVE_CONNECTION (req)))) {
nm_device_state_changed (device,
NM_DEVICE_STATE_DISCONNECTED,
reason);
@@ -2286,7 +3137,7 @@ impl_manager_deactivate_connection (NMManager *self,
req = nm_device_get_act_request (NM_DEVICE (iter->data));
if (req)
- req_path = nm_act_request_get_active_connection_path (req);
+ req_path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (req));
if (req_path && !strcmp (active_path, req_path)) {
connection = nm_act_request_get_connection (req);
@@ -2384,7 +3235,6 @@ do_sleep_wake (NMManager *self)
for (i = 0; i < RFKILL_TYPE_MAX; i++) {
RadioState *rstate = &priv->radio_states[i];
gboolean enabled = radio_enabled_for_rstate (rstate, TRUE);
- RfKillType devtype = RFKILL_TYPE_UNKNOWN;
if (rstate->desc) {
nm_log_dbg (LOGD_RFKILL, "%s %s devices (hw_enabled %d, sw_enabled %d, user_enabled %d)",
@@ -2392,13 +3242,12 @@ do_sleep_wake (NMManager *self)
rstate->desc, rstate->hw_enabled, rstate->sw_enabled, rstate->user_enabled);
}
- g_object_get (G_OBJECT (device), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL);
- if (devtype == rstate->rtype)
- nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), enabled);
+ if (nm_device_get_rfkill_type (device) == rstate->rtype)
+ nm_device_set_enabled (device, enabled);
}
nm_device_clear_autoconnect_inhibit (device);
- if (nm_device_interface_spec_match_list (NM_DEVICE_INTERFACE (device), unmanaged_specs))
+ if (nm_device_spec_match_list (device, unmanaged_specs))
nm_device_set_managed (device, FALSE, NM_DEVICE_STATE_REASON_NOW_UNMANAGED);
else
nm_device_set_managed (device, TRUE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
@@ -2823,6 +3672,20 @@ nm_manager_start (NMManager *self)
nm_udev_manager_query_devices (priv->udev_mgr);
bluez_manager_resync_devices (self);
+
+ /* Query devices again to ensure that we catch all virtual interfaces (like
+ * VLANs) that require a parent. If during the first pass the VLAN
+ * interface was detected first, the parent wouldn't exist yet and creating
+ * the VLAN would fail. The second query ensures that we'll have a valid
+ * parent for the VLAN during the second pass.
+ */
+ nm_udev_manager_query_devices (priv->udev_mgr);
+
+ /*
+ * Connections added before the manager is started do not emit
+ * connection-added signals thus devices have to be created manually.
+ */
+ system_create_virtual_devices (self);
}
static gboolean
@@ -2857,6 +3720,23 @@ handle_firmware_changed (gpointer user_data)
return FALSE;
}
+#if WITH_CONCHECK
+static void
+connectivity_changed (NMConnectivity *connectivity,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ NMManager *self = NM_MANAGER (user_data);
+ gboolean connected;
+
+ connected = nm_connectivity_get_connected (connectivity);
+ nm_log_dbg (LOGD_CORE, "connectivity checking indicates %s",
+ connected ? "CONNECTED" : "NOT CONNECTED");
+
+ nm_manager_update_state (self);
+}
+#endif /* WITH_CONCHECK */
+
static void
firmware_dir_changed (GFileMonitor *monitor,
GFile *file,
@@ -3058,6 +3938,9 @@ nm_manager_new (NMSettings *settings,
gboolean initial_wifi_enabled,
gboolean initial_wwan_enabled,
gboolean initial_wimax_enabled,
+ const gchar *connectivity_uri,
+ gint connectivity_interval,
+ const gchar *connectivity_response,
GError **error)
{
NMManagerPrivate *priv;
@@ -3073,6 +3956,13 @@ nm_manager_new (NMSettings *settings,
priv = NM_MANAGER_GET_PRIVATE (singleton);
+#if WITH_CONCHECK
+ priv->connectivity = nm_connectivity_new (connectivity_uri, connectivity_interval, connectivity_response);
+
+ g_signal_connect (priv->connectivity, "notify::" NM_CONNECTIVITY_CONNECTED,
+ G_CALLBACK (connectivity_changed), singleton);
+#endif
+
bus = nm_dbus_manager_get_connection (priv->dbus_mgr);
g_assert (bus);
dbus_connection = dbus_g_connection_get_connection (bus);
@@ -3099,13 +3989,13 @@ nm_manager_new (NMSettings *settings,
g_signal_connect (priv->settings, "notify::" NM_SETTINGS_HOSTNAME,
G_CALLBACK (system_hostname_changed_cb), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_ADDED,
- G_CALLBACK (connections_changed), singleton);
+ G_CALLBACK (connection_added), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_UPDATED,
- G_CALLBACK (connections_changed), singleton);
+ G_CALLBACK (connection_changed), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_REMOVED,
- G_CALLBACK (connections_changed), singleton);
+ G_CALLBACK (connection_removed), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED,
- G_CALLBACK (connections_changed), singleton);
+ G_CALLBACK (connection_changed), singleton);
dbus_g_connection_register_g_object (bus, NM_DBUS_PATH, G_OBJECT (singleton));
@@ -3171,6 +4061,13 @@ dispose (GObject *object)
TRUE);
}
+#if WITH_CONCHECK
+ if (priv->connectivity) {
+ g_object_unref (priv->connectivity);
+ priv->connectivity = NULL;
+ }
+#endif
+
g_free (priv->hostname);
g_object_unref (priv->settings);
@@ -3224,6 +4121,8 @@ dispose (GObject *object)
g_object_unref (priv->fw_monitor);
}
+ g_slist_free (priv->factories);
+
if (priv->timestamp_update_id) {
g_source_remove (priv->timestamp_update_id);
priv->timestamp_update_id = 0;
@@ -3436,7 +4335,7 @@ periodic_update_active_connection_timestamps (gpointer user_data)
req = nm_manager_get_act_request_by_path (manager, active_path, &device);
if (device && nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED)
nm_settings_connection_update_timestamp (NM_SETTINGS_CONNECTION (nm_act_request_get_connection (req)),
- (guint64) time (NULL));
+ (guint64) time (NULL), FALSE);
else {
/* The connection is probably VPN */
NMVPNConnection *vpn_con;
@@ -3444,7 +4343,7 @@ periodic_update_active_connection_timestamps (gpointer user_data)
vpn_con = nm_vpn_manager_get_vpn_connection_for_active (priv->vpn_manager, active_path);
if (vpn_con && nm_vpn_connection_get_vpn_state (vpn_con) == NM_VPN_CONNECTION_STATE_ACTIVATED)
nm_settings_connection_update_timestamp (NM_SETTINGS_CONNECTION (nm_vpn_connection_get_connection (vpn_con)),
- (guint64) time (NULL));
+ (guint64) time (NULL), FALSE);
}
}
@@ -3570,6 +4469,8 @@ nm_manager_init (NMManager *manager)
KERNEL_FIRMWARE_DIR);
}
+ load_device_factories (manager);
+
/* Update timestamps in active connections */
priv->timestamp_update_id = g_timeout_add_seconds (300, (GSourceFunc) periodic_update_active_connection_timestamps, manager);
}
diff --git a/src/nm-manager.h b/src/nm-manager.h
index b044971f0..58ba46052 100644
--- a/src/nm-manager.h
+++ b/src/nm-manager.h
@@ -26,7 +26,6 @@
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include "nm-device.h"
-#include "nm-device-interface.h"
#include "nm-settings.h"
#define NM_TYPE_MANAGER (nm_manager_get_type ())
@@ -36,6 +35,19 @@
#define NM_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_MANAGER))
#define NM_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_MANAGER, NMManagerClass))
+typedef enum {
+ NM_MANAGER_ERROR_UNKNOWN_CONNECTION = 0, /*< nick=UnknownConnection >*/
+ NM_MANAGER_ERROR_UNKNOWN_DEVICE, /*< nick=UnknownDevice >*/
+ NM_MANAGER_ERROR_UNMANAGED_DEVICE, /*< nick=UnmanagedDevice >*/
+ NM_MANAGER_ERROR_SYSTEM_CONNECTION, /*< nick=SystemConnection >*/
+ NM_MANAGER_ERROR_PERMISSION_DENIED, /*< nick=PermissionDenied >*/
+ NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE, /*< nick=ConnectionNotActive >*/
+ NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE, /*< nick=AlreadyAsleepOrAwake >*/
+ NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED, /*< nick=AlreadyEnabledOrDisabled >*/
+ NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE, /*< nick=UnsupportedConnectionType >*/
+ NM_MANAGER_ERROR_DEPENDENCY_FAILED, /*< nick=DependencyFailed >*/
+} NMManagerError;
+
#define NM_MANAGER_VERSION "version"
#define NM_MANAGER_STATE "state"
#define NM_MANAGER_NETWORKING_ENABLED "networking-enabled"
@@ -73,7 +85,10 @@ NMManager *nm_manager_new (NMSettings *settings,
gboolean initial_net_enabled,
gboolean initial_wifi_enabled,
gboolean initial_wwan_enabled,
- gboolean initial_wimax_enabled,
+ gboolean initial_wimax_enabled,
+ const gchar *connectivity_uri,
+ gint connectivity_interval,
+ const gchar *connectivity_response,
GError **error);
NMManager *nm_manager_get (void);
@@ -84,12 +99,16 @@ void nm_manager_start (NMManager *manager);
GSList *nm_manager_get_devices (NMManager *manager);
-const char * nm_manager_activate_connection (NMManager *manager,
- NMConnection *connection,
- const char *specific_object,
- const char *device_path,
- const char *dbus_sender, /* NULL if automatic */
- GError **error);
+NMDevice *nm_manager_get_device_by_master (NMManager *manager,
+ const char *master,
+ const char *driver);
+
+NMActiveConnection *nm_manager_activate_connection (NMManager *manager,
+ NMConnection *connection,
+ const char *specific_object,
+ const char *device_path,
+ const char *dbus_sender, /* NULL if automatic */
+ GError **error);
gboolean nm_manager_deactivate_connection (NMManager *manager,
const char *connection_path,
diff --git a/src/nm-netlink-compat.c b/src/nm-netlink-compat.c
index e91a1ff22..974121ad1 100644
--- a/src/nm-netlink-compat.c
+++ b/src/nm-netlink-compat.c
@@ -20,7 +20,13 @@
#include <config.h>
#include <glib.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <linux/if_vlan.h>
+#include <linux/sockios.h>
+#include "nm-logging.h"
#include "nm-netlink-compat.h"
#ifndef HAVE_LIBNL1
@@ -102,4 +108,135 @@ nl_compat_error (int err)
return -err;
}
+
+int
+rtnl_link_vlan_get_id (struct rtnl_link *l)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+ char *if_name = NULL;
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+
+ if ((if_name = rtnl_link_get_name (l)) == NULL)
+ return -1;
+
+ strcpy (if_request.device1, if_name);
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ if_request.cmd = GET_VLAN_VID_CMD;
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't get vlan id for %s.", if_name);
+ goto err_out;
+ }
+
+ close(fd);
+ return if_request.u.VID;
+err_out:
+ close(fd);
+ return -1;
+}
+
+int
+rtnl_link_vlan_set_flags (struct rtnl_link *l, unsigned int flags)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+ char *if_name = NULL;
+
+
+ if ((if_name = rtnl_link_get_name (l)) == NULL)
+ return -1;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+ strcpy (if_request.device1, if_name);
+ if_request.cmd = SET_VLAN_FLAG_CMD;
+ if_request.u.flag = flags;
+
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't set flag in device %s.", if_name);
+ goto err_out;
+ }
+
+ close(fd);
+ return 0;
+err_out:
+ close(fd);
+ return -1;
+}
+
+int
+rtnl_link_vlan_set_ingress_map (struct rtnl_link *l, int from, uint32_t to)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+ char *if_name = NULL;
+
+ if ((if_name = rtnl_link_get_name (l)) == NULL)
+ return -1;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+ strcpy (if_request.device1, if_name);
+ if_request.cmd = SET_VLAN_INGRESS_PRIORITY_CMD;
+ if_request.u.skb_priority = from;
+ if_request.vlan_qos = to;
+
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't set ingress map on device %s.", if_name);
+ goto err_out;
+ }
+
+ close(fd);
+ return 0;
+err_out:
+ close(fd);
+ return -1;
+}
+
+int
+rtnl_link_vlan_set_egress_map (struct rtnl_link *l, int from, uint32_t to)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+ char *if_name = NULL;
+
+ if ((if_name = rtnl_link_get_name (l)) == NULL)
+ return -1;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+ strcpy (if_request.device1, if_name);
+ if_request.cmd = SET_VLAN_EGRESS_PRIORITY_CMD;
+ if_request.u.skb_priority = from;
+ if_request.vlan_qos = to;
+
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't set egress map on device %s.", if_name);
+ goto err_out;
+ }
+
+ close(fd);
+ return 0;
+err_out:
+ close(fd);
+ return -1;
+}
#endif
diff --git a/src/nm-netlink-compat.h b/src/nm-netlink-compat.h
index af21fb9ad..eb0926ad0 100644
--- a/src/nm-netlink-compat.h
+++ b/src/nm-netlink-compat.h
@@ -16,6 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2011 Caixa Magica Software.
+ * Copyright (C) 2011 - 2012 Red Hat, Inc.
*/
#ifndef NM_NETLINK_COMPAT_H
@@ -68,7 +69,7 @@ __rtnl_link_alloc_cache (struct nl_sock *h, struct nl_cache **cache)
/* functions with similar prototypes */
#define nlmsg_datalen nlmsg_len
-#endif
+#endif /* HAVE_LIBNL2 */
/* libnl-1.0 compat functions */
@@ -202,6 +203,79 @@ __nl_cache_include (struct nl_cache *cache, struct nl_object *obj, change_func_t
#define NLE_NOACCESS 27
#define NLE_PERM 28
#define NLE_PKTLOC_FILE 29
-#endif
+
+#endif /* HAVE_LIBNL1 */
+
+/* Stuff that only libnl3 has */
+#if defined(HAVE_LIBNL1) || defined(HAVE_LIBNL2)
+
+static inline int
+rtnl_link_bond_add (struct nl_sock *h, const char *name, void *data)
+{
+ /* Bonding only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+static inline int
+rtnl_link_get_kernel (struct nl_sock *h, int f, const char *name, struct rtnl_link **out_link)
+{
+ /* Bonding only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+static inline char *
+rtnl_link_get_type (struct rtnl_link *rtnl_link)
+{
+ /* Bonding only in libnl3 */
+ return NULL;
+}
+
+static inline int
+rtnl_link_bond_enslave_ifindex (struct nl_sock *h, int master_ifidx, int slave_ifidx)
+{
+ /* Bonding only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+static inline int
+rtnl_link_bond_release_ifindex (struct nl_sock *h, int slave_ifidx)
+{
+ /* Bonding only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+static inline int
+rtnl_link_vlan_set_id (struct rtnl_link *l, int id)
+{
+ /* VLAN only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+int rtnl_link_vlan_get_id (struct rtnl_link *l);
+int rtnl_link_vlan_set_flags (struct rtnl_link *l, unsigned int flags);
+int rtnl_link_vlan_set_ingress_map (struct rtnl_link *l, int from, uint32_t to);
+int rtnl_link_vlan_set_egress_map (struct rtnl_link *l, int from, uint32_t to);
+
+static inline int
+rtnl_link_set_type (struct rtnl_link *l, const char *type)
+{
+ /* Operation only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+static inline int
+rtnl_link_add (struct nl_sock *sk, struct rtnl_link *l, int flags)
+{
+ /* Operation only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+
+static inline int
+rtnl_link_delete(struct nl_sock *sk, const struct rtnl_link *l)
+{
+ /* Operation only in libnl3 */
+ return -NLE_OPNOTSUPP;
+}
+#endif /* HAVE_LIBNL1 || HAVE_LIBNL2 */
#endif /* NM_NETLINK_COMPAT_H */
diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
index 9b8dac5cb..29a21e3c7 100644
--- a/src/nm-netlink-monitor.c
+++ b/src/nm-netlink-monitor.c
@@ -76,7 +76,6 @@ enum {
NOTIFICATION = 0,
CARRIER_ON,
CARRIER_OFF,
- ERROR,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
@@ -84,11 +83,60 @@ static guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (NMNetlinkMonitor, nm_netlink_monitor, G_TYPE_OBJECT);
+/****************************************************************/
+
+static gboolean
+detach_monitor (gpointer data)
+{
+ nm_log_warn (LOGD_HW, "detaching netlink event monitor");
+ nm_netlink_monitor_detach (NM_NETLINK_MONITOR (data));
+ return FALSE;
+}
+
+static void
+log_error_limited (NMNetlinkMonitor *monitor, guint32 code, const char *fmt, ...)
+{
+ static time_t rl_time = 0;
+ static guint32 rl_code = 0;
+ static guint32 rl_count = 0;
+ va_list args;
+ char *msg;
+ time_t now;
+
+ g_return_if_fail (monitor != NULL);
+
+ now = time (NULL);
+
+ if ((code != rl_code) || (now > rl_time + 10)) {
+ va_start (args, fmt);
+ msg = g_strdup_vprintf (fmt, args);
+ va_end (args);
+
+ nm_log_warn (LOGD_HW, "error monitoring device for netlink events: %s\n", msg);
+ g_free (msg);
+
+ rl_time = now;
+ rl_code = code;
+ rl_count = 0;
+ }
+
+ rl_count++;
+ if (rl_count > 100) {
+ /* Broken drivers will sometimes cause a flood of netlink errors.
+ * rh #459205, novell #443429, lp #284507
+ */
+ nm_log_warn (LOGD_HW, "excessive netlink errors ocurred, disabling netlink monitor.");
+ nm_log_warn (LOGD_HW, "link change events will not be processed.");
+ g_idle_add_full (G_PRIORITY_HIGH, detach_monitor, monitor, NULL);
+ }
+}
+
+/****************************************************************/
+
static void
link_msg_handler (struct nl_object *obj, void *arg)
{
NMNetlinkMonitor *self = NM_NETLINK_MONITOR (arg);
- GError *error;
struct rtnl_link *filter;
struct rtnl_link *link_obj;
guint flags;
@@ -96,12 +144,9 @@ link_msg_handler (struct nl_object *obj, void *arg)
filter = rtnl_link_alloc ();
if (!filter) {
- error = g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_BAD_ALLOC,
- _("error processing netlink message: %s"),
- nl_geterror (ENOMEM));
- g_signal_emit (self, signals[ERROR], 0, error);
- g_error_free (error);
+ log_error_limited (self, NM_NETLINK_MONITOR_ERROR_BAD_ALLOC,
+ _("error processing netlink message: %s"),
+ nl_geterror (ENOMEM));
return;
}
@@ -195,7 +240,6 @@ event_handler (GIOChannel *channel,
{
NMNetlinkMonitor *self = (NMNetlinkMonitor *) user_data;
NMNetlinkMonitorPrivate *priv;
- GError *error = NULL;
int err;
g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), TRUE);
@@ -204,22 +248,17 @@ event_handler (GIOChannel *channel,
g_return_val_if_fail (priv->event_id > 0, TRUE);
if (io_condition & ERROR_CONDITIONS) {
- const char *err_msg;
+ const char *err_msg = _("error occurred while waiting for data on socket");
int err_code = 0;
socklen_t err_len = sizeof (err_code);
/* Grab error information */
if (getsockopt (g_io_channel_unix_get_fd (channel),
- SOL_SOCKET, SO_ERROR, (void *) &err_code, &err_len))
+ SOL_SOCKET, SO_ERROR,
+ (void *) &err_code, &err_len) == 0)
err_msg = strerror (err_code);
- else
- err_msg = _("error occurred while waiting for data on socket");
- error = g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA,
- "%s", err_msg);
- g_signal_emit (self, signals[ERROR], 0, error);
- g_error_free (error);
+ log_error_limited (self, NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA, "%s", err_msg);
return TRUE;
} else if (io_condition & DISCONNECT_CONDITIONS)
return FALSE;
@@ -229,12 +268,9 @@ event_handler (GIOChannel *channel,
/* Process the netlink messages */
err = nl_recvmsgs_default (priv->nlh_event);
if (err < 0) {
- error = g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_PROCESSING_MESSAGE,
- _("error processing netlink message: %s"),
- nl_geterror (err));
- g_signal_emit (self, signals[ERROR], 0, error);
- g_error_free (error);
+ log_error_limited (self, NM_NETLINK_MONITOR_ERROR_PROCESSING_MESSAGE,
+ _("error processing netlink message: %s"),
+ nl_geterror (err));
}
return TRUE;
@@ -578,20 +614,18 @@ deferred_emit_carrier_state (gpointer user_data)
return FALSE;
}
-gboolean
-nm_netlink_monitor_request_status (NMNetlinkMonitor *self, GError **error)
+void
+nm_netlink_monitor_request_status (NMNetlinkMonitor *self)
{
NMNetlinkMonitorPrivate *priv;
- g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE);
+ g_return_if_fail (NM_IS_NETLINK_MONITOR (self));
priv = NM_NETLINK_MONITOR_GET_PRIVATE (self);
/* Schedule the carrier state emission */
if (!priv->request_status_id)
priv->request_status_id = g_idle_add (deferred_emit_carrier_state, self);
-
- return TRUE;
}
typedef struct {
@@ -778,10 +812,26 @@ NMNetlinkMonitor *
nm_netlink_monitor_get (void)
{
static NMNetlinkMonitor *singleton = NULL;
+ GError *error = NULL;
- if (!singleton)
- singleton = NM_NETLINK_MONITOR (g_object_new (NM_TYPE_NETLINK_MONITOR, NULL));
- else
+ if (!singleton) {
+ singleton = (NMNetlinkMonitor *) g_object_new (NM_TYPE_NETLINK_MONITOR, NULL);
+ g_return_val_if_fail (singleton != NULL, NULL);
+
+ if (nm_netlink_monitor_open_connection (singleton, &error)) {
+ nm_netlink_monitor_attach (singleton);
+ /* Request initial status of cards */
+ nm_netlink_monitor_request_status (singleton);
+ } else {
+ nm_log_warn (LOGD_HW, "Failed to connect to netlink: (%d) %s",
+ error ? error->code : 0,
+ (error && error->message) ? error->message : "(unknown)");
+ g_clear_error (&error);
+
+ g_object_unref (singleton);
+ singleton = NULL;
+ }
+ } else
g_object_ref (singleton);
return singleton;
@@ -860,14 +910,6 @@ nm_netlink_monitor_class_init (NMNetlinkMonitorClass *monitor_class)
G_STRUCT_OFFSET (NMNetlinkMonitorClass, carrier_off),
NULL, NULL, g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
-
- signals[ERROR] =
- g_signal_new ("error",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (NMNetlinkMonitorClass, error),
- NULL, NULL, g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
}
GQuark
diff --git a/src/nm-netlink-monitor.h b/src/nm-netlink-monitor.h
index 5c1fa3399..4e0787bdc 100644
--- a/src/nm-netlink-monitor.h
+++ b/src/nm-netlink-monitor.h
@@ -58,7 +58,6 @@ typedef struct {
void (*notification) (NMNetlinkMonitor *monitor, struct nl_msg *msg);
void (*carrier_on) (NMNetlinkMonitor *monitor, int index);
void (*carrier_off) (NMNetlinkMonitor *monitor, int index);
- void (*error) (NMNetlinkMonitor *monitor, GError *error);
} NMNetlinkMonitorClass;
@@ -83,8 +82,8 @@ void nm_netlink_monitor_unsubscribe (NMNetlinkMonitor *monitor
gboolean nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *monitor,
GError **error);
-gboolean nm_netlink_monitor_request_status (NMNetlinkMonitor *monitor,
- GError **error);
+void nm_netlink_monitor_request_status (NMNetlinkMonitor *monitor);
+
gboolean nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *monitor,
guint32 ifindex,
guint32 *ifflags,
diff --git a/src/nm-netlink-utils.c b/src/nm-netlink-utils.c
index 4a62aa551..99aebcb80 100644
--- a/src/nm-netlink-utils.c
+++ b/src/nm-netlink-utils.c
@@ -165,45 +165,50 @@ nm_netlink_route_new (int ifindex,
}
/**
- * nm_netlink_route_add:
+ * _route_add:
* @route: the route to add
+ * @family: address family, either %AF_INET or %AF_INET6
+ * @dest: the route destination address, either a struct in_addr or a struct
+ * in6_addr depending on @family
+ * @dest_prefix: the CIDR prefix of @dest
+ * @gateway: the gateway through which to reach @dest, if any; given as a
+ * struct in_addr or struct in6_addr depending on @family
+ * @flags: flags to pass to rtnl_route_add(), eg %NLM_F_REPLACE
*
* Returns: zero if succeeded or the netlink error otherwise.
**/
-int nm_netlink_route_add(struct rtnl_route * route,
- int family,
- const void * dest, /* in_addr or in6_addr */
- int dest_prefix,
- const void * gateway, /* in_addr or in6_addr */
- int flags)
+static int
+_route_add (struct rtnl_route *route,
+ int family,
+ const void *dest, /* in_addr or in6_addr */
+ int dest_prefix,
+ const void *gateway, /* in_addr or in6_addr */
+ int flags)
{
- struct nl_sock * sk;
- struct nl_addr * dest_addr, * gw_addr;
- void * tmp_addr;
+ struct nl_sock *sk;
+ struct nl_addr *dest_addr, *gw_addr;
+ void *tmp_addr;
int addrlen, err, log;
- if(family == AF_INET) {
- addrlen = sizeof(struct in_addr);
+ if (family == AF_INET) {
+ addrlen = sizeof (struct in_addr);
log = LOGD_IP4;
- }
- else if (family == AF_INET6) {
- addrlen = sizeof(struct in6_addr);
+ } else if (family == AF_INET6) {
+ addrlen = sizeof (struct in6_addr);
log = LOGD_IP6;
- } else {
+ } else
g_assert_not_reached ();
- }
-
- sk = nm_netlink_get_default_handle();
+ sk = nm_netlink_get_default_handle ();
/* Build up the destination address */
if (dest) {
/* Copy to preserve const */
- tmp_addr = g_malloc0(addrlen);
- memcpy(tmp_addr, dest, addrlen);
+ tmp_addr = g_malloc0 (addrlen);
+ memcpy (tmp_addr, dest, addrlen);
dest_addr = nl_addr_build (family, tmp_addr, addrlen);
- g_free(tmp_addr);
+ g_free (tmp_addr);
g_return_val_if_fail (dest_addr != NULL, -NLE_INVAL);
nl_addr_set_prefixlen (dest_addr, dest_prefix);
@@ -214,20 +219,19 @@ int nm_netlink_route_add(struct rtnl_route * route,
/* Build up the gateway address */
if (gateway) {
- tmp_addr = g_malloc0(addrlen);
- memcpy(tmp_addr, gateway, addrlen);
+ tmp_addr = g_malloc0 (addrlen);
+ memcpy (tmp_addr, gateway, addrlen);
gw_addr = nl_addr_build (family, tmp_addr, addrlen);
- g_free(tmp_addr);
+ g_free (tmp_addr);
if (gw_addr) {
nl_addr_set_prefixlen (gw_addr, 0);
rtnl_route_set_gateway (route, gw_addr);
rtnl_route_set_scope (route, RT_SCOPE_UNIVERSE);
- nl_addr_put(gw_addr);
- } else {
+ nl_addr_put (gw_addr);
+ } else
nm_log_err (LOGD_DEVICE | log, "Invalid gateway");
- }
}
err = rtnl_route_add (sk, route, flags);
@@ -236,15 +240,54 @@ int nm_netlink_route_add(struct rtnl_route * route,
if (err == -NLE_FAILURE)
err = -NLE_OBJ_NOTFOUND;
- if (err)
- nm_log_warn (LOGD_DEVICE | log,
- "Failed to add route %s",
- nl_geterror(err));
-
return err;
}
/**
+ * nm_netlink_route4_add:
+ * @route: the route to add
+ * @dest: the route destination address in network byte order
+ * @dest_prefix: the CIDR prefix of @dest
+ * @gateway: the gateway through which to reach @dest, if any, in network byte order
+ * @flags: flags to pass to rtnl_route_add(), eg %NLM_F_REPLACE
+ *
+ * Adds an IPv4 route with the given parameters.
+ *
+ * Returns: zero if succeeded or the netlink error otherwise.
+ **/
+int
+nm_netlink_route4_add (struct rtnl_route *route,
+ guint32 *dst,
+ int prefix,
+ guint32 *gw,
+ int flags)
+{
+ return _route_add (route, AF_INET, dst, prefix, gw, flags);
+}
+
+/**
+ * nm_netlink_route6_add:
+ * @route: the route to add
+ * @dest: the route destination address
+ * @dest_prefix: the CIDR prefix of @dest
+ * @gateway: the gateway through which to reach @dest, if any
+ * @flags: flags to pass to rtnl_route_add(), eg %NLM_F_REPLACE
+ *
+ * Adds an IPv6 route with the given parameters.
+ *
+ * Returns: zero if succeeded or the netlink error otherwise.
+ **/
+int
+nm_netlink_route6_add (struct rtnl_route *route,
+ const struct in6_addr *dst,
+ int prefix,
+ const struct in6_addr *gw,
+ int flags)
+{
+ return _route_add (route, AF_INET6, dst, prefix, gw, flags);
+}
+
+/**
* nm_netlink_route_delete:
* @route: the route to delete
*
diff --git a/src/nm-netlink-utils.h b/src/nm-netlink-utils.h
index c6c452a00..697faaf01 100644
--- a/src/nm-netlink-utils.h
+++ b/src/nm-netlink-utils.h
@@ -24,6 +24,7 @@
#include <glib.h>
#include <netlink/route/rtnl.h>
#include <netlink/route/route.h>
+#include <netinet/in.h>
gboolean nm_netlink_find_address (int ifindex,
int family,
@@ -43,11 +44,16 @@ struct rtnl_route * nm_netlink_route_new (int ifindex,
int mss,
...) __attribute__((__sentinel__));
-int nm_netlink_route_add (struct rtnl_route *route,
- int family,
- const void * dst, /* struct in_addr or struct in6_addr */
+int nm_netlink_route4_add (struct rtnl_route *route,
+ guint32 *dst,
+ int prefix,
+ guint32 *gw,
+ int flags);
+
+int nm_netlink_route6_add (struct rtnl_route *route,
+ const struct in6_addr *dst,
int prefix,
- const void * gw, /* struct in_addr or struct in6_addr */
+ const struct in6_addr *gw,
int flags);
gboolean nm_netlink_route_delete (struct rtnl_route *route);
@@ -76,5 +82,5 @@ struct rtnl_route * nm_netlink_foreach_route (int ifindex,
NlRouteForeachFunc callback,
gpointer user_data);
-#endif /* NM_NETLINK_MONITOR_H */
+#endif /* NM_NETLINK_UTILS_H */
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 669db28b0..babf1649b 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -31,14 +31,7 @@
#include "nm-wifi-ap.h"
#include "nm-activation-request.h"
#include "nm-logging.h"
-#include "nm-device-interface.h"
#include "nm-device.h"
-#include "nm-device-wifi.h"
-#include "nm-device-ethernet.h"
-#include "nm-device-modem.h"
-#if WITH_WIMAX
-#include "nm-device-wimax.h"
-#endif
#include "nm-dbus-manager.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-connection.h"
@@ -47,6 +40,7 @@
#include "nm-vpn-manager.h"
#include "nm-policy-hostname.h"
#include "nm-manager-auth.h"
+#include "nm-firewall-manager.h"
struct NMPolicy {
NMManager *manager;
@@ -60,6 +54,9 @@ struct NMPolicy {
gulong vpn_activated_id;
gulong vpn_deactivated_id;
+ NMFirewallManager *fw_manager;
+ gulong fw_started_id;
+
NMSettings *settings;
NMDevice *default_device4;
@@ -80,6 +77,9 @@ struct NMPolicy {
#define RESET_RETRIES_TIMER 300
#define FAILURE_REASON_TAG "failure-reason"
+static void schedule_activate_all (NMPolicy *policy);
+
+
static NMDevice *
get_best_ip4_device (NMManager *manager, NMActRequest **out_req)
{
@@ -95,6 +95,7 @@ get_best_ip4_device (NMManager *manager, NMActRequest **out_req)
devices = nm_manager_get_devices (manager);
for (iter = devices; iter; iter = g_slist_next (iter)) {
NMDevice *dev = NM_DEVICE (iter->data);
+ NMDeviceType devtype = nm_device_get_device_type (dev);
NMActRequest *req;
NMConnection *connection;
NMIP4Config *ip4_config;
@@ -117,7 +118,7 @@ get_best_ip4_device (NMManager *manager, NMActRequest **out_req)
g_assert (connection);
/* Never set the default route through an IPv4LL-addressed device */
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
method = nm_setting_ip4_config_get_method (s_ip4);
@@ -135,7 +136,7 @@ get_best_ip4_device (NMManager *manager, NMActRequest **out_req)
}
}
- if (!can_default && !NM_IS_DEVICE_MODEM (dev))
+ if (!can_default && (devtype != NM_DEVICE_TYPE_MODEM))
continue;
/* 'never-default' devices can't ever be the default */
@@ -169,6 +170,7 @@ get_best_ip6_device (NMManager *manager, NMActRequest **out_req)
devices = nm_manager_get_devices (manager);
for (iter = devices; iter; iter = g_slist_next (iter)) {
NMDevice *dev = NM_DEVICE (iter->data);
+ NMDeviceType devtype = nm_device_get_device_type (dev);
NMActRequest *req;
NMConnection *connection;
NMIP6Config *ip6_config;
@@ -191,7 +193,7 @@ get_best_ip6_device (NMManager *manager, NMActRequest **out_req)
g_assert (connection);
/* Never set the default route through an IPv4LL-addressed device */
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6)
method = nm_setting_ip6_config_get_method (s_ip6);
@@ -209,7 +211,7 @@ get_best_ip6_device (NMManager *manager, NMActRequest **out_req)
}
}
- if (!can_default && !NM_IS_DEVICE_MODEM (dev))
+ if (!can_default && (devtype != NM_DEVICE_TYPE_MODEM))
continue;
/* 'never-default' devices can't ever be the default */
@@ -471,7 +473,7 @@ update_ip4_routing_and_dns (NMPolicy *policy, gboolean force_update)
can_default = FALSE;
/* Check the user's preference from the NMConnection */
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (vpn_connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (vpn_connection);
if (s_ip4 && nm_setting_ip4_config_get_never_default (s_ip4))
can_default = FALSE;
@@ -533,7 +535,7 @@ update_ip4_routing_and_dns (NMPolicy *policy, gboolean force_update)
req = nm_device_get_act_request (dev);
if (req && (req != best_req))
- nm_act_request_set_default (req, FALSE);
+ nm_active_connection_set_default (NM_ACTIVE_CONNECTION (req), FALSE);
}
dns_mgr = nm_dns_manager_get (NULL);
@@ -544,10 +546,10 @@ update_ip4_routing_and_dns (NMPolicy *policy, gboolean force_update)
* if the connection is shared dnsmasq picks up the right stuff.
*/
if (best_req)
- nm_act_request_set_default (best_req, TRUE);
+ nm_active_connection_set_default (NM_ACTIVE_CONNECTION (best_req), TRUE);
if (connection)
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
connection_id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
if (connection_id) {
@@ -598,7 +600,7 @@ update_ip6_routing_and_dns (NMPolicy *policy, gboolean force_update)
/* If it's marked 'never-default', don't make it default */
vpn_connection = nm_vpn_connection_get_connection (candidate);
g_assert (vpn_connection);
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (vpn_connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (vpn_connection);
if (s_ip6 && nm_setting_ip6_config_get_never_default (s_ip6))
can_default = FALSE;
@@ -660,7 +662,7 @@ update_ip6_routing_and_dns (NMPolicy *policy, gboolean force_update)
req = nm_device_get_act_request (dev);
if (req && (req != best_req))
- nm_act_request_set_default6 (req, FALSE);
+ nm_active_connection_set_default6 (NM_ACTIVE_CONNECTION (req), FALSE);
}
dns_mgr = nm_dns_manager_get (NULL);
@@ -671,10 +673,10 @@ update_ip6_routing_and_dns (NMPolicy *policy, gboolean force_update)
* if the connection is shared dnsmasq picks up the right stuff.
*/
if (best_req)
- nm_act_request_set_default6 (best_req, TRUE);
+ nm_active_connection_set_default6 (NM_ACTIVE_CONNECTION (best_req), TRUE);
if (connection)
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
connection_id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
if (connection_id) {
@@ -792,7 +794,9 @@ auto_activate_device (gpointer user_data)
NULL,
&error)) {
nm_log_info (LOGD_DEVICE, "Connection '%s' auto-activation failed: (%d) %s",
- nm_connection_get_id (best_connection), error->code, error->message);
+ nm_connection_get_id (best_connection),
+ error ? error->code : -1,
+ error ? error->message : "(none)");
g_error_free (error);
}
}
@@ -870,7 +874,7 @@ reset_retries_all (NMSettings *settings, NMDevice *device)
connections = nm_settings_get_connections (settings);
for (iter = connections; iter; iter = g_slist_next (iter)) {
- if (!device || nm_device_interface_check_connection_compatible (NM_DEVICE_INTERFACE (device), iter->data, &error))
+ if (!device || nm_device_check_connection_compatible (device, iter->data, &error))
set_connection_auto_retries (NM_CONNECTION (iter->data), RETRIES_DEFAULT);
g_clear_error (&error);
}
@@ -917,11 +921,11 @@ schedule_activate_check (NMPolicy *policy, NMDevice *device, guint delay_seconds
if (nm_manager_get_state (policy->manager) == NM_STATE_ASLEEP)
return;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device));
+ state = nm_device_get_state (device);
if (state < NM_DEVICE_STATE_DISCONNECTED)
return;
- if (!nm_device_interface_get_enabled (NM_DEVICE_INTERFACE (device)))
+ if (!nm_device_get_enabled (device))
return;
if (!nm_device_autoconnect_allowed (device))
@@ -940,6 +944,7 @@ reset_connections_retries (gpointer user_data)
NMPolicy *policy = (NMPolicy *) user_data;
GSList *connections, *iter;
time_t con_stamp, min_stamp, now;
+ gboolean changed = FALSE;
policy->reset_retries_id = 0;
@@ -952,6 +957,7 @@ reset_connections_retries (gpointer user_data)
if (con_stamp + RESET_RETRIES_TIMER <= now) {
set_connection_auto_retries (NM_CONNECTION (iter->data), RETRIES_DEFAULT);
g_object_set_data (G_OBJECT (iter->data), RESET_RETRIES_TIMESTAMP_TAG, GSIZE_TO_POINTER (0));
+ changed = TRUE;
continue;
}
if (con_stamp < min_stamp)
@@ -962,19 +968,53 @@ reset_connections_retries (gpointer user_data)
/* Schedule the handler again if there are some stamps left */
if (min_stamp != now)
policy->reset_retries_id = g_timeout_add_seconds (RESET_RETRIES_TIMER - (now - min_stamp), reset_connections_retries, policy);
+
+ /* If anything changed, try to activate the newly re-enabled connections */
+ if (changed)
+ schedule_activate_all (policy);
+
return FALSE;
}
static NMConnection *
get_device_connection (NMDevice *device)
{
- NMActRequest *req;
+ NMActRequest *req = NULL;
req = nm_device_get_act_request (device);
- if (!req)
- return NULL;
+ return req ? nm_act_request_get_connection (req) : NULL;
+}
+
+static void schedule_activate_all (NMPolicy *policy);
+
+static void
+activate_slave_connections (NMPolicy *policy, NMConnection *connection,
+ NMDevice *device)
+{
+ const char *master_device;
+ GSList *connections, *iter;
+
+ master_device = nm_device_get_iface (device);
+ g_assert (master_device);
+
+ connections = nm_settings_get_connections (policy->settings);
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *slave;
+ NMSettingConnection *s_slave_con;
+
+ slave = NM_CONNECTION (iter->data);
+ g_assert (slave);
- return nm_act_request_get_connection (req);
+ s_slave_con = nm_connection_get_setting_connection (slave);
+ g_assert (s_slave_con);
+
+ if (!g_strcmp0 (nm_setting_connection_get_master (s_slave_con), master_device))
+ set_connection_auto_retries (slave, RETRIES_DEFAULT);
+ }
+
+ g_slist_free (connections);
+
+ schedule_activate_all (policy);
}
static void
@@ -995,7 +1035,9 @@ device_state_changed (NMDevice *device,
/* Mark the connection invalid if it failed during activation so that
* it doesn't get automatically chosen over and over and over again.
*/
- if (connection && IS_ACTIVATING_STATE (old_state)) {
+ if ( connection
+ && old_state >= NM_DEVICE_STATE_PREPARE
+ && old_state <= NM_DEVICE_STATE_ACTIVATED) {
guint32 tries = get_connection_auto_retries (connection);
if (reason == NM_DEVICE_STATE_REASON_NO_SECRETS) {
@@ -1064,6 +1106,13 @@ device_state_changed (NMDevice *device,
update_routing_and_dns (policy, FALSE);
schedule_activate_check (policy, device, 0);
break;
+
+ case NM_DEVICE_STATE_PREPARE:
+ /* Reset auto-connect retries of all slaves and schedule them for
+ * activation. */
+ activate_slave_connections (policy, connection, device);
+ break;
+
default:
break;
}
@@ -1078,23 +1127,21 @@ device_ip_config_changed (NMDevice *device,
}
static void
-wireless_networks_changed (NMDeviceWifi *device, NMAccessPoint *ap, gpointer user_data)
+wireless_networks_changed (NMDevice *device, GObject *ap, gpointer user_data)
{
- schedule_activate_check ((NMPolicy *) user_data, NM_DEVICE (device), 0);
+ schedule_activate_check ((NMPolicy *) user_data, device, 0);
}
-#if WITH_WIMAX
static void
-nsps_changed (NMDeviceWimax *device, NMWimaxNsp *nsp, gpointer user_data)
+nsps_changed (NMDevice *device, GObject *nsp, gpointer user_data)
{
- schedule_activate_check ((NMPolicy *) user_data, NM_DEVICE (device), 0);
+ schedule_activate_check ((NMPolicy *) user_data, device, 0);
}
-#endif
static void
-modem_enabled_changed (NMDeviceModem *device, gpointer user_data)
+modem_enabled_changed (NMDevice *device, gpointer user_data)
{
- schedule_activate_check ((NMPolicy *) (user_data), NM_DEVICE (device), 0);
+ schedule_activate_check ((NMPolicy *) (user_data), device, 0);
}
typedef struct {
@@ -1120,19 +1167,23 @@ device_added (NMManager *manager, NMDevice *device, gpointer user_data)
NMPolicy *policy = (NMPolicy *) user_data;
_connect_device_signal (policy, device, "state-changed", device_state_changed);
- _connect_device_signal (policy, device, "notify::" NM_DEVICE_INTERFACE_IP4_CONFIG, device_ip_config_changed);
- _connect_device_signal (policy, device, "notify::" NM_DEVICE_INTERFACE_IP6_CONFIG, device_ip_config_changed);
+ _connect_device_signal (policy, device, "notify::" NM_DEVICE_IP4_CONFIG, device_ip_config_changed);
+ _connect_device_signal (policy, device, "notify::" NM_DEVICE_IP6_CONFIG, device_ip_config_changed);
- if (NM_IS_DEVICE_WIFI (device)) {
+ switch (nm_device_get_device_type (device)) {
+ case NM_DEVICE_TYPE_WIFI:
_connect_device_signal (policy, device, "access-point-added", wireless_networks_changed);
_connect_device_signal (policy, device, "access-point-removed", wireless_networks_changed);
-#if WITH_WIMAX
- } else if (NM_IS_DEVICE_WIMAX (device)) {
+ break;
+ case NM_DEVICE_TYPE_WIMAX:
_connect_device_signal (policy, device, "nsp-added", nsps_changed);
_connect_device_signal (policy, device, "nsp-removed", nsps_changed);
-#endif
- } else if (NM_IS_DEVICE_MODEM (device)) {
- _connect_device_signal (policy, device, NM_DEVICE_MODEM_ENABLE_CHANGED, modem_enabled_changed);
+ break;
+ case NM_DEVICE_TYPE_MODEM:
+ _connect_device_signal (policy, device, "enable-changed", modem_enabled_changed);
+ break;
+ default:
+ break;
}
}
@@ -1200,14 +1251,80 @@ connections_loaded (NMSettings *settings, gpointer user_data)
}
static void
+add_or_change_zone_cb (GError *error, gpointer user_data)
+{
+ NMDevice *device = NM_DEVICE (user_data);
+
+ if (error) {
+ /* FIXME: what do we do here? */
+ }
+
+ g_object_unref (device);
+}
+
+static void
+firewall_update_zone (NMPolicy *policy, NMConnection *connection)
+{
+ NMSettingConnection *s_con = nm_connection_get_setting_connection (connection);
+ GSList *iter, *devices;
+
+ devices = nm_manager_get_devices (policy->manager);
+ /* find dev with passed connection and change zone its interface belongs to */
+ for (iter = devices; iter; iter = g_slist_next (iter)) {
+ NMDevice *dev = NM_DEVICE (iter->data);
+
+ if ( (get_device_connection (dev) == connection)
+ && (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED)) {
+ nm_firewall_manager_add_or_change_zone (policy->fw_manager,
+ nm_device_get_ip_iface (dev),
+ nm_setting_connection_get_zone (s_con),
+ FALSE, /* change zone */
+ add_or_change_zone_cb,
+ g_object_ref (dev));
+ }
+ }
+}
+
+static void
+firewall_started (NMFirewallManager *manager,
+ gpointer user_data)
+{
+ NMPolicy *policy = (NMPolicy *) user_data;
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ GSList *iter, *devices;
+
+ devices = nm_manager_get_devices (policy->manager);
+ /* add interface of each device to correct zone */
+ for (iter = devices; iter; iter = g_slist_next (iter)) {
+ NMDevice *dev = NM_DEVICE (iter->data);
+
+ connection = get_device_connection (dev);
+ s_con = nm_connection_get_setting_connection (connection);
+ if (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED) {
+ nm_firewall_manager_add_or_change_zone (policy->fw_manager,
+ nm_device_get_ip_iface (dev),
+ nm_setting_connection_get_zone (s_con),
+ TRUE, /* add zone */
+ add_or_change_zone_cb,
+ g_object_ref (dev));
+ }
+ }
+}
+
+static void
connection_updated (NMSettings *settings,
NMConnection *connection,
gpointer user_data)
{
+ NMPolicy *policy = (NMPolicy *) user_data;
+
+ firewall_update_zone (policy, connection);
+
/* Reset auto retries back to default since connection was updated */
set_connection_auto_retries (connection, RETRIES_DEFAULT);
- schedule_activate_all ((NMPolicy *) user_data);
+ schedule_activate_all (policy);
}
static void
@@ -1325,6 +1442,11 @@ nm_policy_new (NMManager *manager,
G_CALLBACK (vpn_connection_deactivated), policy);
policy->vpn_deactivated_id = id;
+ policy->fw_manager = nm_firewall_manager_get();
+ id = g_signal_connect (policy->fw_manager, "started",
+ G_CALLBACK (firewall_started), policy);
+ policy->fw_started_id = id;
+
_connect_manager_signal (policy, "state-changed", global_state_changed);
_connect_manager_signal (policy, "notify::" NM_MANAGER_HOSTNAME, hostname_changed);
_connect_manager_signal (policy, "notify::" NM_MANAGER_SLEEPING, sleeping_changed);
@@ -1369,6 +1491,9 @@ nm_policy_destroy (NMPolicy *policy)
g_signal_handler_disconnect (policy->vpn_manager, policy->vpn_deactivated_id);
g_object_unref (policy->vpn_manager);
+ g_signal_handler_disconnect (policy->fw_manager, policy->fw_started_id);
+ g_object_unref (policy->fw_manager);
+
for (iter = policy->manager_ids; iter; iter = g_slist_next (iter))
g_signal_handler_disconnect (policy->manager, GPOINTER_TO_UINT (iter->data));
g_slist_free (policy->manager_ids);
diff --git a/src/nm-properties-changed-signal.c b/src/nm-properties-changed-signal.c
index 4a9db8afa..871d1bb00 100644
--- a/src/nm-properties-changed-signal.c
+++ b/src/nm-properties-changed-signal.c
@@ -16,13 +16,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2008 Red Hat, Inc.
+ * Copyright (C) 2008 - 2012 Red Hat, Inc.
*/
#include <string.h>
#include <stdio.h>
#include <dbus/dbus-glib.h>
+#ifdef DEBUG
+#include "nm-logging.h"
+#endif
#include "nm-properties-changed-signal.h"
#include "nm-dbus-glib-types.h"
diff --git a/src/nm-session-monitor.c b/src/nm-session-monitor-ck.c
index 7ee9013ac..72ffc9ff0 100644
--- a/src/nm-session-monitor.c
+++ b/src/nm-session-monitor-ck.c
@@ -20,13 +20,12 @@
#include "config.h"
#include <errno.h>
-#include <pwd.h>
#include <string.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <gio/gio.h>
#include "nm-logging.h"
+#include "nm-session-utils.h"
#include "nm-session-monitor.h"
#define CKDB_PATH "/var/run/ConsoleKit/database"
@@ -66,53 +65,6 @@ G_DEFINE_TYPE (NMSessionMonitor, nm_session_monitor, G_TYPE_OBJECT);
/********************************************************************/
-#define NM_SESSION_MONITOR_ERROR (nm_session_monitor_error_quark ())
-GQuark nm_session_monitor_error_quark (void) G_GNUC_CONST;
-GType nm_session_monitor_error_get_type (void) G_GNUC_CONST;
-
-typedef enum {
- NM_SESSION_MONITOR_ERROR_IO_ERROR = 0,
- NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE,
- NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
- NM_SESSION_MONITOR_ERROR_NO_DATABASE,
-} NMSessionMonitorError;
-
-GQuark
-nm_session_monitor_error_quark (void)
-{
- static GQuark ret = 0;
-
- if (G_UNLIKELY (ret == 0))
- ret = g_quark_from_static_string ("nm-session-monitor-error");
- return ret;
-}
-
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_session_monitor_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Some I/O operation on the CK database failed */
- ENUM_ENTRY (NM_SESSION_MONITOR_ERROR_IO_ERROR, "IOError"),
- /* Error parsing the CK database */
- ENUM_ENTRY (NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE, "MalformedDatabase"),
- /* Username or UID could could not be found */
- ENUM_ENTRY (NM_SESSION_MONITOR_ERROR_UNKNOWN_USER, "UnknownUser"),
- /* No ConsoleKit database */
- ENUM_ENTRY (NM_SESSION_MONITOR_ERROR_NO_DATABASE, "NoDatabase"),
- { 0, 0, 0 }
- };
-
- etype = g_enum_register_static ("NMSessionMonitorError", values);
- }
- return etype;
-}
-/********************************************************************/
-
typedef struct {
char *user;
uid_t uid;
@@ -149,7 +101,7 @@ session_new (GKeyFile *keyfile, const char *group, GError **error)
{
GError *local = NULL;
Session *s;
- struct passwd *pw;
+ const char *uname = NULL;
s = g_new0 (Session, 1);
g_assert (s);
@@ -173,16 +125,9 @@ session_new (GKeyFile *keyfile, const char *group, GError **error)
if (local)
goto error;
- pw = getpwuid (s->uid);
- if (!pw) {
- g_set_error (&local,
- NM_SESSION_MONITOR_ERROR,
- NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
- "Could not get username for UID %d",
- s->uid);
- goto error;
- }
- s->user = g_strdup (pw->pw_name);
+ if (!nm_session_uid_to_user (s->uid, &uname, error))
+ return FALSE;
+ s->user = g_strdup (uname);
return s;
@@ -289,10 +234,6 @@ ensure_database (NMSessionMonitor *self, GError **error)
{
gboolean ret = FALSE;
-#if NO_CONSOLEKIT
- return TRUE;
-#endif
-
if (self->database != NULL) {
struct stat statbuf;
@@ -339,10 +280,6 @@ nm_session_monitor_init (NMSessionMonitor *self)
GError *error = NULL;
GFile *file;
-#if NO_CONSOLEKIT
- return;
-#endif
-
/* Sessions-by-user is responsible for destroying the Session objects */
self->sessions_by_user = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, (GDestroyNotify) session_free);
@@ -428,50 +365,6 @@ nm_session_monitor_get (void)
/* ---------------------------------------------------------------------------------------------------- */
-#if NO_CONSOLEKIT
-static gboolean
-uid_to_user (uid_t uid, const char **out_user, GError **error)
-{
- struct passwd *pw;
-
- pw = getpwuid (uid);
- if (!pw) {
- g_set_error (error,
- NM_SESSION_MONITOR_ERROR,
- NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
- "Could not get username for UID %d",
- uid);
- return FALSE;
- }
-
- /* Ugly, but hey, use ConsoleKit */
- if (out_user)
- *out_user = pw->pw_name;
- return TRUE;
-}
-
-static gboolean
-user_to_uid (const char *user, uid_t *out_uid, GError **error)
-{
- struct passwd *pw;
-
- pw = getpwnam (user);
- if (!pw) {
- g_set_error (error,
- NM_SESSION_MONITOR_ERROR,
- NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
- "Could not get UID for username '%s'",
- user);
- return FALSE;
- }
-
- /* Ugly, but hey, use ConsoleKit */
- if (out_uid)
- *out_uid = pw->pw_uid;
- return TRUE;
-}
-#endif
-
/**
* nm_session_monitor_user_has_session:
* @monitor: A #NMSessionMonitor.
@@ -491,12 +384,6 @@ nm_session_monitor_user_has_session (NMSessionMonitor *monitor,
{
Session *s;
-#if NO_CONSOLEKIT
- if (!user_to_uid (username, out_uid, error))
- return FALSE;
- return TRUE;
-#endif
-
if (!ensure_database (monitor, error))
return FALSE;
@@ -534,12 +421,6 @@ nm_session_monitor_uid_has_session (NMSessionMonitor *monitor,
{
Session *s;
-#if NO_CONSOLEKIT
- if (!uid_to_user (uid, out_user, error))
- return FALSE;
- return TRUE;
-#endif
-
if (!ensure_database (monitor, error))
return FALSE;
@@ -576,10 +457,6 @@ nm_session_monitor_user_active (NMSessionMonitor *monitor,
{
Session *s;
-#if NO_CONSOLEKIT
- return TRUE;
-#endif
-
if (!ensure_database (monitor, error))
return FALSE;
@@ -614,10 +491,6 @@ nm_session_monitor_uid_active (NMSessionMonitor *monitor,
{
Session *s;
-#if NO_CONSOLEKIT
- return TRUE;
-#endif
-
if (!ensure_database (monitor, error))
return FALSE;
diff --git a/src/nm-session-monitor-null.c b/src/nm-session-monitor-null.c
new file mode 100644
index 000000000..beabcf213
--- /dev/null
+++ b/src/nm-session-monitor-null.c
@@ -0,0 +1,171 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2008 - 2010 Red Hat, Inc.
+ * Author: David Zeuthen <davidz@redhat.com>
+ * Author: Dan Williams <dcbw@redhat.com>
+ */
+
+#include "config.h"
+#include <string.h>
+#include "nm-logging.h"
+
+#include "nm-session-utils.h"
+#include "nm-session-monitor.h"
+
+/* <internal>
+ * SECTION:nm-session-monitor
+ * @title: NMSessionMonitor
+ * @short_description: Monitor sessions
+ *
+ * The #NMSessionMonitor class is a utility class to track and monitor sessions.
+ */
+
+struct _NMSessionMonitor {
+ GObject parent_instance;
+};
+
+struct _NMSessionMonitorClass {
+ GObjectClass parent_class;
+
+ void (*changed) (NMSessionMonitor *monitor);
+};
+
+
+enum {
+ CHANGED,
+ LAST_SIGNAL,
+};
+static guint signals[LAST_SIGNAL] = {0};
+
+G_DEFINE_TYPE (NMSessionMonitor, nm_session_monitor, G_TYPE_OBJECT);
+
+/********************************************************************/
+
+static void
+nm_session_monitor_init (NMSessionMonitor *self)
+{
+}
+
+static void
+nm_session_monitor_class_init (NMSessionMonitorClass *klass)
+{
+ /**
+ * NMSessionMonitor::changed:
+ * @monitor: A #NMSessionMonitor
+ *
+ * Emitted when something changes.
+ */
+ signals[CHANGED] = g_signal_new (NM_SESSION_MONITOR_CHANGED,
+ NM_TYPE_SESSION_MONITOR,
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+NMSessionMonitor *
+nm_session_monitor_get (void)
+{
+ static NMSessionMonitor *singleton = NULL;
+
+ if (singleton)
+ return g_object_ref (singleton);
+
+ singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
+ g_assert (singleton);
+ return singleton;
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+/**
+ * nm_session_monitor_user_has_session:
+ * @monitor: A #NMSessionMonitor.
+ * @username: A username.
+ * @error: Return location for error.
+ *
+ * Checks whether the given @username is logged into a session or not.
+ *
+ * Returns: %FALSE if @error is set otherwise %TRUE if the given @username is
+ * currently logged into a session.
+ */
+gboolean
+nm_session_monitor_user_has_session (NMSessionMonitor *monitor,
+ const char *username,
+ uid_t *out_uid,
+ GError **error)
+{
+ return nm_session_user_to_uid (username, out_uid, error);
+}
+
+/**
+ * nm_session_monitor_uid_has_session:
+ * @monitor: A #NMSessionMonitor.
+ * @uid: A user ID.
+ * @error: Return location for error.
+ *
+ * Checks whether the given @uid is logged into a session or not.
+ *
+ * Returns: %FALSE if @error is set otherwise %TRUE if the given @uid is
+ * currently logged into a session.
+ */
+gboolean
+nm_session_monitor_uid_has_session (NMSessionMonitor *monitor,
+ uid_t uid,
+ const char **out_user,
+ GError **error)
+{
+ return nm_session_uid_to_user (uid, out_user, error);
+}
+
+/**
+ * nm_session_monitor_user_active:
+ * @monitor: A #NMSessionMonitor.
+ * @username: A username.
+ * @error: Return location for error.
+ *
+ * Checks whether the given @username is logged into a active session or not.
+ *
+ * Returns: %FALSE if @error is set otherwise %TRUE if the given @username is
+ * logged into an active session.
+ */
+gboolean
+nm_session_monitor_user_active (NMSessionMonitor *monitor,
+ const char *username,
+ GError **error)
+{
+ return TRUE;
+}
+
+/**
+ * nm_session_monitor_uid_active:
+ * @monitor: A #NMSessionMonitor.
+ * @uid: A user ID.
+ * @error: Return location for error.
+ *
+ * Checks whether the given @uid is logged into a active session or not.
+ *
+ * Returns: %FALSE if @error is set otherwise %TRUE if the given @uid is
+ * logged into an active session.
+ */
+gboolean
+nm_session_monitor_uid_active (NMSessionMonitor *monitor,
+ uid_t uid,
+ GError **error)
+{
+ return TRUE;
+}
+
diff --git a/src/nm-session-monitor-systemd.c b/src/nm-session-monitor-systemd.c
new file mode 100644
index 000000000..29ba7c214
--- /dev/null
+++ b/src/nm-session-monitor-systemd.c
@@ -0,0 +1,251 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * Copyright (C) 2011 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Matthias Clasen
+ */
+
+#include "config.h"
+#include <errno.h>
+#include <pwd.h>
+#include <grp.h>
+#include <string.h>
+#include <glib/gstdio.h>
+#include <systemd/sd-login.h>
+#include <stdlib.h>
+
+#include "nm-session-utils.h"
+#include "nm-session-monitor.h"
+
+/********************************************************************/
+
+typedef struct {
+ GSource source;
+ GPollFD pollfd;
+ sd_login_monitor *monitor;
+} SdSource;
+
+static gboolean
+sd_source_prepare (GSource *source, gint *timeout)
+{
+ *timeout = -1;
+ return FALSE;
+}
+
+static gboolean
+sd_source_check (GSource *source)
+{
+ SdSource *sd_source = (SdSource *) source;
+
+ return sd_source->pollfd.revents != 0;
+}
+
+static gboolean
+sd_source_dispatch (GSource *source,
+ GSourceFunc callback,
+ gpointer user_data)
+
+{
+ SdSource *sd_source = (SdSource *)source;
+ gboolean ret;
+
+ g_warn_if_fail (callback != NULL);
+ ret = (*callback) (user_data);
+ sd_login_monitor_flush (sd_source->monitor);
+ return ret;
+}
+
+static void
+sd_source_finalize (GSource *source)
+{
+ SdSource *sd_source = (SdSource*) source;
+
+ sd_login_monitor_unref (sd_source->monitor);
+}
+
+static GSourceFuncs sd_source_funcs = {
+ sd_source_prepare,
+ sd_source_check,
+ sd_source_dispatch,
+ sd_source_finalize
+};
+
+static GSource *
+sd_source_new (void)
+{
+ GSource *source;
+ SdSource *sd_source;
+ int ret;
+
+ source = g_source_new (&sd_source_funcs, sizeof (SdSource));
+ sd_source = (SdSource *)source;
+
+ ret = sd_login_monitor_new (NULL, &sd_source->monitor);
+ if (ret < 0)
+ g_printerr ("Error getting login monitor: %d", ret);
+ else {
+ sd_source->pollfd.fd = sd_login_monitor_get_fd (sd_source->monitor);
+ sd_source->pollfd.events = G_IO_IN;
+ g_source_add_poll (source, &sd_source->pollfd);
+ }
+
+ return source;
+}
+
+struct _NMSessionMonitor {
+ GObject parent_instance;
+
+ GSource *sd_source;
+};
+
+struct _NMSessionMonitorClass {
+ GObjectClass parent_class;
+
+ void (*changed) (NMSessionMonitor *monitor);
+};
+
+
+enum {
+ CHANGED_SIGNAL,
+ LAST_SIGNAL,
+};
+static guint signals[LAST_SIGNAL] = {0};
+
+G_DEFINE_TYPE (NMSessionMonitor, nm_session_monitor, G_TYPE_OBJECT);
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+static gboolean
+sessions_changed (gpointer user_data)
+{
+ NMSessionMonitor *monitor = NM_SESSION_MONITOR (user_data);
+
+ g_signal_emit (monitor, signals[CHANGED_SIGNAL], 0);
+ return TRUE;
+}
+
+
+static void
+nm_session_monitor_init (NMSessionMonitor *monitor)
+{
+ monitor->sd_source = sd_source_new ();
+ g_source_set_callback (monitor->sd_source, sessions_changed, monitor, NULL);
+ g_source_attach (monitor->sd_source, NULL);
+}
+
+static void
+nm_session_monitor_finalize (GObject *object)
+{
+ NMSessionMonitor *monitor = NM_SESSION_MONITOR (object);
+
+ if (monitor->sd_source != NULL) {
+ g_source_destroy (monitor->sd_source);
+ g_source_unref (monitor->sd_source);
+ }
+
+ if (G_OBJECT_CLASS (nm_session_monitor_parent_class)->finalize != NULL)
+ G_OBJECT_CLASS (nm_session_monitor_parent_class)->finalize (object);
+}
+
+static void
+nm_session_monitor_class_init (NMSessionMonitorClass *klass)
+{
+ GObjectClass *gobject_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = nm_session_monitor_finalize;
+
+ /**
+ * NMSessionMonitor::changed:
+ * @monitor: A #NMSessionMonitor
+ *
+ * Emitted when something changes.
+ */
+ signals[CHANGED_SIGNAL] = g_signal_new ("changed",
+ NM_TYPE_SESSION_MONITOR,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NMSessionMonitorClass, changed),
+ NULL, /* accumulator */
+ NULL, /* accumulator data */
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+}
+
+NMSessionMonitor *
+nm_session_monitor_get (void)
+{
+ static NMSessionMonitor *singleton = NULL;
+
+ if (singleton)
+ return g_object_ref (singleton);
+
+ singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
+ g_assert (singleton);
+ return singleton;
+}
+
+gboolean
+nm_session_monitor_user_has_session (NMSessionMonitor *monitor,
+ const char *username,
+ uid_t *out_uid,
+ GError **error)
+{
+ uid_t uid;
+
+ if (!nm_session_user_to_uid (username, &uid, error))
+ return FALSE;
+
+ if (out_uid)
+ *out_uid = uid;
+
+ return nm_session_monitor_uid_has_session (monitor, uid, NULL, error);
+}
+
+gboolean
+nm_session_monitor_user_active (NMSessionMonitor *monitor,
+ const char *username,
+ GError **error)
+{
+ uid_t uid;
+
+ if (!nm_session_user_to_uid (username, &uid, error))
+ return FALSE;
+
+ return nm_session_monitor_uid_active (monitor, uid, error);
+}
+
+gboolean
+nm_session_monitor_uid_has_session (NMSessionMonitor *monitor,
+ uid_t uid,
+ const char **out_user,
+ GError **error)
+{
+ if (!nm_session_uid_to_user (uid, out_user, error))
+ return FALSE;
+
+ return sd_uid_get_sessions (uid, FALSE, NULL) > 0;
+}
+
+gboolean
+nm_session_monitor_uid_active (NMSessionMonitor *monitor,
+ uid_t uid,
+ GError **error)
+{
+ return sd_uid_get_sessions (uid, TRUE, NULL) > 0;
+}
diff --git a/src/nm-session-utils.c b/src/nm-session-utils.c
new file mode 100644
index 000000000..269e2f81c
--- /dev/null
+++ b/src/nm-session-utils.c
@@ -0,0 +1,79 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ * Author: Dan Williams <dcbw@redhat.com>
+ */
+
+#include <pwd.h>
+#include <sys/types.h>
+
+#include "nm-session-utils.h"
+
+/********************************************************************/
+
+GQuark
+nm_session_monitor_error_quark (void)
+{
+ static GQuark ret = 0;
+
+ if (G_UNLIKELY (ret == 0))
+ ret = g_quark_from_static_string ("nm-session-monitor-error");
+ return ret;
+}
+
+/********************************************************************/
+
+gboolean
+nm_session_uid_to_user (uid_t uid, const char **out_user, GError **error)
+{
+ struct passwd *pw;
+
+ pw = getpwuid (uid);
+ if (!pw) {
+ g_set_error (error,
+ NM_SESSION_MONITOR_ERROR,
+ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
+ "Could not get username for UID %d",
+ uid);
+ return FALSE;
+ }
+
+ if (out_user)
+ *out_user = pw->pw_name;
+ return TRUE;
+}
+
+gboolean
+nm_session_user_to_uid (const char *user, uid_t *out_uid, GError **error)
+{
+ struct passwd *pw;
+
+ pw = getpwnam (user);
+ if (!pw) {
+ g_set_error (error,
+ NM_SESSION_MONITOR_ERROR,
+ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
+ "Could not get UID for username '%s'",
+ user);
+ return FALSE;
+ }
+
+ /* Ugly, but hey, use ConsoleKit */
+ if (out_uid)
+ *out_uid = pw->pw_uid;
+ return TRUE;
+}
+
diff --git a/src/nm-session-utils.h b/src/nm-session-utils.h
new file mode 100644
index 000000000..54b6d4c43
--- /dev/null
+++ b/src/nm-session-utils.h
@@ -0,0 +1,41 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ * Author: Dan Williams <dcbw@redhat.com>
+ */
+
+#ifndef NM_SESSION_UTILS_H
+#define NM_SESSION_UTILS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#define NM_SESSION_MONITOR_ERROR (nm_session_monitor_error_quark ())
+GQuark nm_session_monitor_error_quark (void) G_GNUC_CONST;
+GType nm_session_monitor_error_get_type (void) G_GNUC_CONST;
+
+typedef enum {
+ NM_SESSION_MONITOR_ERROR_IO_ERROR = 0, /*< nick=IOError >*/
+ NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE, /*< nick=MalformedDatabase >*/
+ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER, /*< nick=UnknownUser >*/
+ NM_SESSION_MONITOR_ERROR_NO_DATABASE, /*< nick=NoDatabase >*/
+} NMSessionMonitorError;
+
+gboolean nm_session_uid_to_user (uid_t uid, const char **out_user, GError **error);
+
+gboolean nm_session_user_to_uid (const char *user, uid_t *out_uid, GError **error);
+
+#endif /* NM_SESSION_UTILS_H */
diff --git a/src/nm-system.c b/src/nm-system.c
index 62ab8b937..91153ec2a 100644
--- a/src/nm-system.c
+++ b/src/nm-system.c
@@ -21,6 +21,7 @@
* Copyright (C) January, 1998 Sergei Viznyuk <sv@phystech.com>
*/
+#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
@@ -41,6 +42,8 @@
#include <glib.h>
#include <ctype.h>
#include <linux/if.h>
+#include <linux/sockios.h>
+#include <linux/if_bonding.h>
#include "nm-system.h"
#include "nm-device.h"
@@ -57,6 +60,16 @@
#include <netlink/utils.h>
#include <netlink/route/link.h>
+#ifdef HAVE_LIBNL3
+#include <netlink/route/link/bonding.h>
+#include <netlink/route/link/vlan.h>
+#endif
+
+#if !HAVE_VLAN_FLAG_LOOSE_BINDING
+/* Older kernels don't have this flag */
+#define VLAN_FLAG_LOOSE_BINDING 0x04
+#endif
+
static void nm_system_device_set_priority (int ifindex,
NMIP4Config *config,
int priority);
@@ -108,7 +121,7 @@ nm_system_device_set_ip4_route (int ifindex,
g_return_val_if_fail (route != NULL, NULL);
/* Add the route */
- err = nm_netlink_route_add(route, AF_INET, &ip4_dest, ip4_prefix, &ip4_gateway, 0);
+ err = nm_netlink_route4_add (route, &ip4_dest, ip4_prefix, &ip4_gateway, 0);
if (err == -NLE_OBJ_NOTFOUND && ip4_gateway) {
/* Gateway might be over a bridge; try adding a route to gateway first */
struct rtnl_route *route2;
@@ -116,9 +129,9 @@ nm_system_device_set_ip4_route (int ifindex,
route2 = nm_netlink_route_new (ifindex, AF_INET, mss, NULL);
if (route2) {
/* Add route to gateway over bridge */
- err = nm_netlink_route_add(route2, AF_INET, &ip4_gateway, 32, NULL, 0);
+ err = nm_netlink_route4_add (route2, &ip4_gateway, 32, NULL, 0);
if (!err) {
- err = nm_netlink_route_add(route, AF_INET, &ip4_dest, ip4_prefix, &ip4_gateway, 0);
+ err = nm_netlink_route4_add (route, &ip4_dest, ip4_prefix, &ip4_gateway, 0);
if (err)
nm_netlink_route_delete (route2);
}
@@ -233,7 +246,7 @@ sync_addresses (int ifindex,
if (buf_valid) {
nm_log_dbg (log_domain, "(%s): removing address '%s/%d'",
- iface, buf, nl_addr_get_prefixlen (nladdr));
+ iface, buf, rtnl_addr_get_prefixlen (match_addr));
}
/* Otherwise, match_addr should be removed from the interface. */
@@ -479,18 +492,18 @@ nm_system_set_ip6_route (int ifindex,
g_return_val_if_fail (route != NULL, -1);
/* Add the route */
- err = nm_netlink_route_add(route, AF_INET6, &ip6_dest, ip6_prefix, &ip6_gateway, 0);
+ err = nm_netlink_route6_add (route, ip6_dest, ip6_prefix, ip6_gateway, 0);
if (err == -NLE_OBJ_NOTFOUND && ip6_gateway) {
/* Gateway might be over a bridge; try adding a route to gateway first */
struct rtnl_route *route2;
route2 = nm_netlink_route_new (ifindex, AF_INET6, mss, NULL);
if (route2) {
- err = nm_netlink_route_add(route, AF_INET6, &ip6_gateway, 128, NULL, 0);
+ err = nm_netlink_route6_add (route, ip6_gateway, 128, NULL, 0);
/* Add route to gateway over bridge */
if (!err) {
/* Try adding the route again */
- err = nm_netlink_route_add(route, AF_INET6, &ip6_dest, ip6_prefix, &ip6_gateway, 0);
+ err = nm_netlink_route6_add (route, ip6_dest, ip6_prefix, ip6_gateway, 0);
if (err)
nm_netlink_route_delete (route2);
}
@@ -588,7 +601,7 @@ nm_system_apply_ip6_config (int ifindex,
RTPROT_UNSPEC,
RT_TABLE_UNSPEC,
NULL);
- if (err) {
+ if (err && (err != -NLE_EXIST)) {
nm_log_err (LOGD_DEVICE | LOGD_IP6,
"(%s): failed to set IPv6 route: %s",
iface ? iface : "unknown",
@@ -657,15 +670,8 @@ nm_system_iface_set_up (int ifindex,
return success;
}
-/**
- * nm_system_iface_is_up:
- * @ifindex: interface index
- *
- * Returns: %TRUE if the interface is up, %FALSE if it was down or the check
- * failed.
- **/
-gboolean
-nm_system_iface_is_up (int ifindex)
+guint32
+nm_system_iface_get_flags (int ifindex)
{
struct rtnl_link *l;
guint32 flags;
@@ -686,7 +692,20 @@ nm_system_iface_is_up (int ifindex)
flags = rtnl_link_get_flags (l);
rtnl_link_put (l);
- return flags & IFF_UP;
+ return flags;
+}
+
+/**
+ * nm_system_iface_is_up:
+ * @ifindex: interface index
+ *
+ * Returns: %TRUE if the interface is up, %FALSE if it was down or the check
+ * failed.
+ **/
+gboolean
+nm_system_iface_is_up (int ifindex)
+{
+ return nm_system_iface_get_flags (ifindex) & IFF_UP;
}
/**
@@ -812,7 +831,7 @@ add_ip4_route_to_gateway (int ifindex, guint32 gw, guint32 mss)
g_return_val_if_fail (route != NULL, NULL);
/* Add direct route to the gateway */
- err = nm_netlink_route_add(route, AF_INET, &gw, 32, NULL, 0);
+ err = nm_netlink_route4_add (route, &gw, 32, NULL, 0);
if (err) {
char *iface = nm_netlink_index_to_iface (ifindex);
@@ -836,7 +855,7 @@ replace_default_ip4_route (int ifindex, guint32 gw, guint32 mss)
struct rtnl_route *route = NULL;
struct nl_sock *nlh;
int err = -1;
- int dst=0;
+ guint32 dst = 0;
g_return_val_if_fail (ifindex > 0, -ENODEV);
@@ -850,7 +869,9 @@ replace_default_ip4_route (int ifindex, guint32 gw, guint32 mss)
g_return_val_if_fail (route != NULL, -ENOMEM);
/* Add the new default route */
- err = nm_netlink_route_add (route, AF_INET, &dst, 0, &gw, NLM_F_REPLACE);
+ err = nm_netlink_route4_add (route, &dst, 0, &gw, NLM_F_REPLACE);
+ if (err == -NLE_EXIST)
+ err = 0;
rtnl_route_put (route);
return err;
@@ -985,7 +1006,7 @@ add_ip6_route_to_gateway (int ifindex, const struct in6_addr *gw)
g_return_val_if_fail (route != NULL, NULL);
/* Add direct route to the gateway */
- err = nm_netlink_route_add(route, AF_INET, gw, 128, NULL, 0);
+ err = nm_netlink_route6_add (route, gw, 128, NULL, 0);
if (err) {
char *iface = nm_netlink_index_to_iface (ifindex);
@@ -1020,11 +1041,10 @@ replace_default_ip6_route (int ifindex, const struct in6_addr *gw)
g_return_val_if_fail (route != NULL, -ENOMEM);
/* Add the new default route */
- nm_netlink_route_add(route, AF_INET6, NULL, 0, gw, NLM_F_REPLACE);
+ err = nm_netlink_route6_add (route, &in6addr_any, 0, gw, NLM_F_REPLACE);
if (err == -NLE_EXIST) {
/* FIXME: even though we use NLM_F_REPLACE the kernel won't replace
- * the route if it's the same. Should try to remove it first, then
- * add the new one again here.
+ * the route if it's the same. Suppress the pointless error.
*/
err = 0;
}
@@ -1051,6 +1071,9 @@ nm_system_replace_default_ip6_route (int ifindex, const struct in6_addr *gw)
if (err == 0)
return TRUE;
+ if (err == -NLE_EXIST)
+ return TRUE;
+
iface = nm_netlink_index_to_iface (ifindex);
if (!iface)
goto out;
@@ -1202,3 +1225,762 @@ nm_system_device_set_priority (int ifindex,
rtnl_route_put (found);
}
}
+
+static const struct {
+ const char *option;
+ const char *default_value;
+} bonding_defaults[] = {
+ { "mode", "balance-rr" },
+ { "arp_interval", "0" },
+ { "miimon", "0" },
+
+ { "ad_select", "stable" },
+ { "arp_validate", "none" },
+ { "downdelay", "0" },
+ { "fail_over_mac", "none" },
+ { "lacp_rate", "slow" },
+ { "min_links", "0" },
+ { "num_grat_arp", "1" },
+ { "num_unsol_na", "1" },
+ { "primary", "" },
+ { "primary_reselect", "always" },
+ { "resend_igmp", "1" },
+ { "updelay", "0" },
+ { "use_carrier", "1" },
+ { "xmit_hash_policy", "layer2" },
+ { NULL, NULL }
+};
+
+static void
+remove_bonding_entries (const char *iface, const char *path)
+{
+ char cmd[20];
+ char *value, **entries;
+ gboolean ret;
+ int i;
+
+ if (!g_file_get_contents (path, &value, NULL, NULL))
+ return;
+
+ entries = g_strsplit (value, " ", -1);
+ for (i = 0; entries[i]; i++) {
+ snprintf (cmd, sizeof (cmd), "-%s", g_strstrip (entries[i]));
+ ret = nm_utils_do_sysctl (path, cmd);
+ if (!ret) {
+ nm_log_warn (LOGD_HW, "(%s): failed to remove entry '%s' from '%s'",
+ iface, entries[i], path);
+ }
+ }
+ g_strfreev (entries);
+}
+
+static gboolean
+option_valid_for_nm_setting (const char *option, const char **valid_opts)
+{
+ while (*valid_opts) {
+ if (strcmp (option, *valid_opts) == 0)
+ return TRUE;
+ valid_opts++;
+ }
+ return FALSE;
+}
+
+gboolean
+nm_system_apply_bonding_config (const char *iface, NMSettingBond *s_bond)
+{
+ const char **valid_opts;
+ const char *option, *value;
+ char path[FILENAME_MAX];
+ char *current, *space;
+ gboolean ret;
+ int i;
+
+ g_return_val_if_fail (iface != NULL, FALSE);
+
+ /* Remove old slaves and arp_ip_targets */
+ snprintf (path, sizeof (path), "/sys/class/net/%s/bonding/arp_ip_target", iface);
+ remove_bonding_entries (iface, path);
+ snprintf (path, sizeof (path), "/sys/class/net/%s/bonding/slaves", iface);
+ remove_bonding_entries (iface, path);
+
+ /* Apply config/defaults */
+ valid_opts = nm_setting_bond_get_valid_options (s_bond);
+ for (i = 0; bonding_defaults[i].option; i++) {
+ option = bonding_defaults[i].option;
+ if (option_valid_for_nm_setting (option, valid_opts))
+ value = nm_setting_bond_get_option_by_name (s_bond, option);
+ else
+ value = NULL;
+ if (!value)
+ value = bonding_defaults[i].default_value;
+
+ snprintf (path, sizeof (path), "/sys/class/net/%s/bonding/%s", iface, option);
+ if (g_file_get_contents (path, &current, NULL, NULL)) {
+ g_strstrip (current);
+ space = strchr (current, ' ');
+ if (space)
+ *space = '\0';
+ if (strcmp (current, value) != 0) {
+ ret = nm_utils_do_sysctl (path, value);
+ if (!ret) {
+ nm_log_warn (LOGD_HW, "(%s): failed to set bonding attribute "
+ "'%s' to '%s'", iface, option, value);
+ }
+ }
+ }
+ }
+
+ /* Handle arp_ip_target */
+ value = nm_setting_bond_get_option_by_name (s_bond, "arp_ip_target");
+ if (value) {
+ char **addresses, cmd[20];
+
+ snprintf (path, sizeof (path), "/sys/class/net/%s/bonding/arp_ip_target", iface);
+ addresses = g_strsplit (value, ",", -1);
+ for (i = 0; addresses[i]; i++) {
+ snprintf (cmd, sizeof (cmd), "+%s", g_strstrip (addresses[i]));
+ ret = nm_utils_do_sysctl (path, cmd);
+ if (!ret) {
+ nm_log_warn (LOGD_HW, "(%s): failed to add arp_ip_target '%s'",
+ iface, addresses[i]);
+ }
+ }
+ g_strfreev (addresses);
+ }
+
+ return TRUE;
+}
+
+/**
+ * nm_system_add_bonding_master:
+ * @iface: the interface name for the new bond master
+ *
+ * Adds a virtual bonding device if it does not exist yet.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+nm_system_add_bonding_master (const char *iface)
+{
+ struct nl_sock *sock;
+ int err;
+
+ g_return_val_if_fail (iface != NULL, FALSE);
+
+ sock = nm_netlink_get_default_handle ();
+
+ /* Existing bonding devices with matching name will be reused */
+ err = rtnl_link_bond_add (sock, iface, NULL);
+ if (err < 0) {
+ nm_log_err (LOGD_DEVICE, "(%s): error %d returned from "
+ "rtnl_link_bond_add(): %s",
+ iface, err, nl_geterror (err));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static gboolean
+nm_system_iface_compat_enslave (const char *master_iface, const char *slave_iface)
+{
+ struct ifreq ifr;
+ int fd;
+ gboolean ret = FALSE;
+
+ memset (&ifr, 0, sizeof (ifr));
+
+ fd = socket (PF_INET, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return FALSE;
+ }
+
+ strncpy (ifr.ifr_name, master_iface, IFNAMSIZ);
+ strncpy (ifr.ifr_slave, slave_iface, IFNAMSIZ);
+
+ if (ioctl (fd, SIOCBONDENSLAVE, &ifr) < 0 &&
+ ioctl (fd, BOND_ENSLAVE_OLD, &ifr) < 0) {
+ nm_log_err (LOGD_DEVICE, "(%s): error enslaving %s: %d (%s)",
+ master_iface, slave_iface, errno, strerror (errno));
+ } else
+ ret = TRUE;
+
+ close (fd);
+
+ return ret;
+}
+
+/**
+ * nm_system_iface_enslave:
+ * @master_ifindex: master device interface index
+ * @master_iface: master device interface name
+ * @slave_ifindex: slave device interface index
+ * @slave_iface: slave device interface name
+ *
+ * Enslaves the 'slave' to 'master. This function targets implementing a
+ * generic interface to attaching all kinds of slaves to masters. Currently
+ * only bonding is properly supported due to the backwards compatibility
+ * function being bonding specific.
+ *
+ * The slave device needs to be down as a prerequisite.
+ *
+ * Returns: %TRUE on success, or %FALSE
+ */
+gboolean
+nm_system_iface_enslave (gint master_ifindex,
+ const char *master_iface,
+ gint slave_ifindex,
+ const char *slave_iface)
+{
+ struct nl_sock *sock;
+ int err;
+
+ g_return_val_if_fail (master_ifindex >= 0, FALSE);
+ g_return_val_if_fail (master_iface != NULL, FALSE);
+ g_return_val_if_fail (slave_ifindex >= 0, FALSE);
+ g_return_val_if_fail (slave_iface != NULL, FALSE);
+
+ sock = nm_netlink_get_default_handle ();
+
+ if (!(nm_system_iface_get_flags (master_ifindex) & IFF_MASTER)) {
+ nm_log_err (LOGD_DEVICE, "(%s): interface is not a master", master_iface);
+ return FALSE;
+ }
+
+ g_assert (!nm_system_iface_is_up (slave_ifindex));
+
+ if (nm_system_iface_get_flags (slave_ifindex) & IFF_SLAVE) {
+ nm_log_err (LOGD_DEVICE, "(%s): %s is already a slave",
+ master_iface, slave_iface);
+ return FALSE;
+ }
+
+ err = rtnl_link_bond_enslave_ifindex (sock, master_ifindex, slave_ifindex);
+ if (err == -NLE_OPNOTSUPP)
+ return nm_system_iface_compat_enslave (master_iface, slave_iface);
+
+ if (err < 0) {
+ nm_log_err (LOGD_DEVICE, "(%s): error enslaving %s: %d (%s)",
+ master_iface, slave_iface, err, nl_geterror (err));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+nm_system_iface_compat_release (const char *master_iface, const char *slave_iface)
+{
+ struct ifreq ifr;
+ int fd;
+ gboolean ret = FALSE;
+
+ memset (&ifr, 0, sizeof (ifr));
+
+ fd = socket (PF_INET, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return FALSE;
+ }
+
+ strncpy (ifr.ifr_name, master_iface, IFNAMSIZ);
+ strncpy (ifr.ifr_slave, slave_iface, IFNAMSIZ);
+
+ if (ioctl (fd, SIOCBONDRELEASE, &ifr) < 0 &&
+ ioctl (fd, BOND_RELEASE_OLD, &ifr) < 0) {
+ nm_log_err (LOGD_DEVICE, "(%s): error releasing slave %s: %d (%s)",
+ master_iface, slave_iface, errno, strerror (errno));
+ } else
+ ret = TRUE;
+
+ close (fd);
+ return ret;
+}
+
+/**
+ * nm_system_iface_release:
+ * @master_ifindex: master device interface index
+ * @master_iface: master device interface name
+ * @slave_ifindex: slave device interface index
+ * @slave_iface: slave device interface name
+ *
+ * Releases the 'slave' which is attached to 'master. This function targets
+ * implementing a generic interface to releasing all kinds of slaves. Currently
+ * only bonding is properly supported due to the backwards compatibility
+ * function being bonding specific.
+ *
+ * Returns: %TRUE on success, or %FALSE
+ */
+gboolean
+nm_system_iface_release (gint master_ifindex,
+ const char *master_iface,
+ gint slave_ifindex,
+ const char *slave_iface)
+{
+ struct nl_sock *sock;
+ int err;
+
+ g_return_val_if_fail (master_ifindex >= 0, FALSE);
+ g_return_val_if_fail (master_iface != NULL, FALSE);
+ g_return_val_if_fail (slave_ifindex >= 0, FALSE);
+ g_return_val_if_fail (slave_iface != NULL, FALSE);
+
+ sock = nm_netlink_get_default_handle ();
+
+ /* Only release if this is actually a slave */
+ if (!(nm_system_iface_get_flags (slave_ifindex) & IFF_SLAVE))
+ return TRUE;
+
+ err = rtnl_link_bond_release_ifindex (sock, slave_ifindex);
+ if (err == -NLE_OPNOTSUPP)
+ return nm_system_iface_compat_release (master_iface, slave_iface);
+ else if (err < 0) {
+ nm_log_err (LOGD_DEVICE, "(%s): error releasing slave %s: %d (%s)",
+ master_iface, slave_iface, err, nl_geterror (err));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * nm_system_get_iface_type:
+ * @ifindex: interface index
+ * @name: name of interface
+ *
+ * Lookup the type of an interface. At least one of @ifindex or @name must
+ * be provided.
+ *
+ * Returns: Interface type (NM_IFACE_TYPE_*) or NM_IFACE_TYPE_UNSPEC.
+ **/
+int
+nm_system_get_iface_type (int ifindex, const char *name)
+{
+ struct rtnl_link *result;
+ struct nl_sock *nlh;
+ char *type;
+ int res = NM_IFACE_TYPE_UNSPEC;
+
+ g_return_val_if_fail (ifindex >= 0 || name, NM_IFACE_TYPE_UNSPEC);
+
+ nlh = nm_netlink_get_default_handle ();
+ if (!nlh)
+ goto out;
+
+ /* Prefer interface indexes to names */
+ if (rtnl_link_get_kernel (nlh, ifindex, ifindex < 0 ? name : NULL, &result) < 0)
+ goto out;
+
+ type = rtnl_link_get_type (result);
+
+ if (!g_strcmp0 (type, "bond"))
+ res = NM_IFACE_TYPE_BOND;
+ else if (!g_strcmp0 (type, "vlan"))
+ res = NM_IFACE_TYPE_VLAN;
+ else if (!g_strcmp0 (type, "dummy"))
+ res = NM_IFACE_TYPE_DUMMY;
+
+ rtnl_link_put (result);
+out:
+ return res;
+}
+
+/**
+ * nm_system_get_iface_vlan_info:
+ * @ifindex: the VLAN interface index
+ * @out_parent_ifindex: on success, the interface index of the parent interface of
+ * @iface
+ * @out_vlan_id: on success, the VLAN ID of @iface
+ *
+ * Gets the VLAN parent interface name and VLAN ID.
+ *
+ * Returns: %TRUE if the interface is a VLAN device and no error occurred;
+ * %FALSE if the interface was not a VLAN interface or an error occurred
+ **/
+gboolean
+nm_system_get_iface_vlan_info (int ifindex,
+ int *out_parent_ifindex,
+ int *out_vlan_id)
+{
+ struct nl_sock *nlh;
+ struct rtnl_link *lk;
+ struct nl_cache *cache = NULL;
+ gboolean success = FALSE;
+ int ret;
+
+ if (nm_system_get_iface_type (ifindex, NULL) != NM_IFACE_TYPE_VLAN)
+ return FALSE;
+
+ nlh = nm_netlink_get_default_handle ();
+ if (!nlh)
+ return FALSE;
+
+ ret = rtnl_link_alloc_cache (nlh, &cache);
+ g_return_val_if_fail (ret == 0, FALSE);
+ g_return_val_if_fail (cache != NULL, FALSE);
+
+ lk = rtnl_link_get (cache, ifindex);
+ if (lk) {
+ if (out_parent_ifindex)
+ *out_parent_ifindex = rtnl_link_get_link (lk);
+ if (out_vlan_id)
+ *out_vlan_id = rtnl_link_vlan_get_id (lk);
+
+ rtnl_link_put (lk);
+ success = TRUE;
+ }
+
+ nl_cache_free (cache);
+ return success;
+}
+
+static gboolean
+nm_system_iface_compat_set_name (const char *old_name, const char *new_name)
+{
+ int fd;
+ struct ifreq ifr;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&ifr, 0, sizeof (struct ifreq));
+ strncpy (ifr.ifr_name, old_name, sizeof (ifr.ifr_name));
+ strncpy (ifr.ifr_newname, new_name, sizeof (ifr.ifr_newname));
+
+ if (ioctl (fd, SIOCSIFNAME, &ifr) < 0) {
+ nm_log_err (LOGD_DEVICE, "cann't change %s with %s.", old_name, new_name);
+ close (fd);
+ return FALSE;
+ }
+
+ close (fd);
+ return TRUE;
+}
+
+static gboolean
+nm_system_iface_compat_set_vlan_name_type (int name_type)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+ if_request.cmd = SET_VLAN_NAME_TYPE_CMD;
+ if_request.u.name_type = name_type;
+
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't set name type.");
+ close (fd);
+ return FALSE;
+ }
+
+ close (fd);
+ return TRUE;
+}
+
+static gboolean
+nm_system_iface_compat_add_vlan_device (const char *master, int vid)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+
+ g_return_val_if_fail (master, FALSE);
+ g_return_val_if_fail (vid < 4096, FALSE);
+
+ /*
+ * use VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD as default,
+ * we will overwrite it with rtnl_link_set_name() later.
+ */
+ if (!nm_system_iface_compat_set_vlan_name_type (VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD))
+ return FALSE;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+ strcpy (if_request.device1, master);
+ if_request.cmd = ADD_VLAN_CMD;
+ if_request.u.VID = vid;
+
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't add vlan device %s vid %d.", master, vid);
+ close (fd);
+ return FALSE;
+ }
+
+ close (fd);
+ return TRUE;
+}
+
+static gboolean
+nm_system_iface_compat_rem_vlan_device (const char *iface)
+{
+ int fd;
+ struct vlan_ioctl_args if_request;
+
+ if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't open control socket.");
+ return -1;
+ }
+
+ memset (&if_request, 0, sizeof (struct vlan_ioctl_args));
+ strcpy (if_request.device1, iface);
+ if_request.cmd = DEL_VLAN_CMD;
+
+ if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) {
+ nm_log_err (LOGD_DEVICE, "couldn't rem vlan device %s.", iface);
+ close (fd);
+ return FALSE;
+ }
+
+ close (fd);
+ return TRUE;
+}
+
+static gboolean
+nm_system_iface_compat_add_vlan (NMConnection *connection,
+ const char *iface,
+ int master_ifindex)
+{
+ NMSettingVlan *s_vlan;
+ int vlan_id;
+ guint32 vlan_flags = 0;
+ guint32 num, i, from, to;
+ int ifindex;
+ struct rtnl_link *new_link = NULL;
+ char *master = nm_netlink_index_to_iface (master_ifindex);
+ char *name = NULL;
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_return_val_if_fail (s_vlan, FALSE);
+
+ vlan_id = nm_setting_vlan_get_id (s_vlan);
+
+ if (!iface) {
+ iface = nm_connection_get_virtual_iface_name (connection);
+ g_return_val_if_fail (iface != NULL, FALSE);
+ }
+
+ /*
+ * Use VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD as default,
+ * we will overwrite it with rtnl_link_set_name() later.
+ */
+ name = nm_utils_new_vlan_name(master, vlan_id);
+
+ /*
+ * vconfig add
+ */
+
+ if (!nm_system_iface_compat_add_vlan_device (master, vlan_id))
+ goto err_out;
+
+ /*
+ * get corresponding rtnl_link
+ */
+
+ if (!nm_system_iface_compat_set_name (name, iface))
+ goto err_out_delete_vlan_with_default_name;
+
+ ifindex = nm_netlink_iface_to_index (iface);
+ if (ifindex <= 0)
+ goto err_out;
+
+ new_link = nm_netlink_index_to_rtnl_link (ifindex);
+ if (!new_link)
+ goto err_out_delete_vlan_with_default_name;
+
+ /*
+ * vconfig set_flag
+ */
+ vlan_flags = nm_setting_vlan_get_flags (s_vlan);
+ if (vlan_flags)
+ if (rtnl_link_vlan_set_flags (new_link, vlan_flags))
+ goto err_out_delete_vlan_with_new_name;
+
+ /*
+ * vconfig set_ingress_map
+ */
+ num = nm_setting_vlan_get_num_priorities (s_vlan, NM_VLAN_INGRESS_MAP);
+ for (i = 0; i < num; i++) {
+ if (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_INGRESS_MAP, i, &from, &to))
+ if (rtnl_link_vlan_set_ingress_map (new_link, from, to))
+ goto err_out_delete_vlan_with_new_name;
+ }
+
+ /*
+ * vconfig set_egress_map
+ */
+ num = nm_setting_vlan_get_num_priorities (s_vlan, NM_VLAN_EGRESS_MAP);
+ for (i = 0; i < num; i++) {
+ if (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_EGRESS_MAP, i, &from, &to))
+ if (rtnl_link_vlan_set_egress_map (new_link, from, to))
+ goto err_out_delete_vlan_with_new_name;
+ }
+
+ rtnl_link_put (new_link);
+ return TRUE;
+
+err_out:
+ g_free (name);
+ return FALSE;
+
+err_out_delete_vlan_with_default_name:
+ nm_system_iface_compat_rem_vlan_device (name);
+ g_free (name);
+ return FALSE;
+
+err_out_delete_vlan_with_new_name:
+ rtnl_link_put (new_link);
+ nm_system_iface_compat_rem_vlan_device (iface);
+ g_free (name);
+ return FALSE;
+}
+
+/**
+ * nm_system_add_vlan_iface:
+ * @connection: the #NMConnection that describes the VLAN interface
+ * @iface: the interface name of the new VLAN interface
+ * @parent_ifindex: the interface index of the new VLAN interface's master
+ * interface
+ *
+ * Add a VLAN device named @iface and specified in @connection.
+ *
+ * Returns: %TRUE on success, %FALSE on failure
+ */
+gboolean
+nm_system_add_vlan_iface (NMConnection *connection,
+ const char *iface,
+ int parent_ifindex)
+{
+ NMSettingVlan *s_vlan;
+ int ret = -1;
+ struct rtnl_link *new_link = NULL;
+ struct nl_sock *nlh = NULL;
+ guint32 vlan_id = 0;
+ guint32 vlan_flags = 0;
+ guint32 num, i, from, to;
+
+ g_return_val_if_fail (parent_ifindex >= 0, FALSE);
+
+ nlh = nm_netlink_get_default_handle ();
+ g_return_val_if_fail (nlh != NULL, FALSE);
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_return_val_if_fail (s_vlan, FALSE);
+
+ vlan_id = nm_setting_vlan_get_id (s_vlan);
+
+ if (!iface) {
+ iface = nm_connection_get_virtual_iface_name (connection);
+ g_return_val_if_fail (iface != NULL, FALSE);
+ }
+
+ new_link = rtnl_link_alloc ();
+ if (!new_link) {
+ g_warn_if_fail (new_link != NULL);
+ goto out;
+ }
+
+ ret = rtnl_link_set_type (new_link, "vlan");
+ if (ret == -NLE_OPNOTSUPP) {
+ /*
+ * There is no linbl3, try ioctl.
+ */
+ ret = -1;
+ if (nm_system_iface_compat_add_vlan (connection, iface, parent_ifindex))
+ ret = 0;
+ goto out;
+ }
+
+ rtnl_link_set_link (new_link, parent_ifindex);
+ rtnl_link_set_name (new_link, iface);
+ rtnl_link_vlan_set_id (new_link, vlan_id);
+
+ vlan_flags = nm_setting_vlan_get_flags (s_vlan);
+ if (vlan_flags) {
+ guint kernel_flags = 0;
+
+ if (vlan_flags & NM_VLAN_FLAG_REORDER_HEADERS)
+ kernel_flags |= VLAN_FLAG_REORDER_HDR;
+ if (vlan_flags & NM_VLAN_FLAG_GVRP)
+ kernel_flags |= VLAN_FLAG_GVRP;
+ if (vlan_flags & NM_VLAN_FLAG_LOOSE_BINDING)
+ kernel_flags |= VLAN_FLAG_LOOSE_BINDING;
+
+ rtnl_link_vlan_set_flags (new_link, kernel_flags);
+ }
+
+ num = nm_setting_vlan_get_num_priorities (s_vlan, NM_VLAN_INGRESS_MAP);
+ for (i = 0; i < num; i++) {
+ if (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_INGRESS_MAP, i, &from, &to))
+ rtnl_link_vlan_set_ingress_map (new_link, (int) from, (int) to);
+ }
+
+ num = nm_setting_vlan_get_num_priorities (s_vlan, NM_VLAN_EGRESS_MAP);
+ for (i = 0; i < num; i++) {
+ if (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_EGRESS_MAP, i, &from, &to))
+ rtnl_link_vlan_set_egress_map (new_link, (int) from, (int) to);
+ }
+
+ ret = rtnl_link_add (nlh, new_link, NLM_F_CREATE);
+
+out:
+ if (new_link)
+ rtnl_link_put (new_link);
+ return (ret == 0);
+}
+
+/**
+ * nm_system_del_vlan_iface:
+ * @iface: the interface name
+ *
+ * Delete a VLAN interface specified by @iface.
+ *
+ * Returns: %TRUE on success, or %FALSE
+ */
+gboolean
+nm_system_del_vlan_iface (const char *iface)
+{
+ int ret = 0;
+ struct nl_sock *nlh = NULL;
+ struct nl_cache *cache = NULL;
+ struct rtnl_link *new_link = NULL;
+ int itype;
+
+ g_return_val_if_fail (iface != NULL, FALSE);
+
+ itype = nm_system_get_iface_type (-1, iface);
+ g_return_val_if_fail (itype == NM_IFACE_TYPE_VLAN, FALSE);
+
+ nlh = nm_netlink_get_default_handle ();
+ g_return_val_if_fail (nlh != NULL, FALSE);
+
+ ret = rtnl_link_alloc_cache (nlh, &cache);
+ g_return_val_if_fail (ret == 0, FALSE);
+ g_return_val_if_fail (cache != NULL, FALSE);
+
+ new_link = rtnl_link_get_by_name (cache, iface);
+ if (new_link) {
+ ret = rtnl_link_delete (nlh, new_link);
+ if (ret == -NLE_OPNOTSUPP) {
+ /*
+ * There is no linbl3, try ioctl.
+ */
+ ret = -1;
+ if (nm_system_iface_compat_rem_vlan_device (iface))
+ ret = 0;
+ }
+ }
+
+ rtnl_link_put (new_link);
+ nl_cache_free (cache);
+ return (ret == 0) ? TRUE : FALSE;
+}
diff --git a/src/nm-system.h b/src/nm-system.h
index ae4e7d91f..84ae6c27e 100644
--- a/src/nm-system.h
+++ b/src/nm-system.h
@@ -30,6 +30,8 @@
#include <glib.h>
#include "nm-device.h"
#include "nm-ip4-config.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-vlan.h"
/* Prototypes for system/distribution dependent functions,
* implemented in the backend files in backends/ directory
@@ -56,9 +58,6 @@ struct rtnl_route *nm_system_add_ip4_vpn_gateway_route (NMDevice *parent_device,
gboolean nm_system_iface_flush_addresses (int ifindex, int family);
-void nm_system_enable_loopback (void);
-void nm_system_update_dns (void);
-
gboolean nm_system_apply_ip4_config (int ifindex,
NMIP4Config *config,
int priority,
@@ -83,10 +82,42 @@ gboolean nm_system_iface_set_up (int ifindex,
gboolean up,
gboolean *no_firmware);
+guint32 nm_system_iface_get_flags (int ifindex);
gboolean nm_system_iface_is_up (int ifindex);
gboolean nm_system_iface_set_mtu (int ifindex, guint32 mtu);
gboolean nm_system_iface_set_mac (int ifindex, const struct ether_addr *mac);
+gboolean nm_system_apply_bonding_config (const char *iface,
+ NMSettingBond *s_bond);
+gboolean nm_system_add_bonding_master (const char *iface);
+
+gboolean nm_system_iface_enslave (gint master_ifindex,
+ const char *master_iface,
+ gint slave_ifindex,
+ const char *slave_iface);
+gboolean nm_system_iface_release (gint master_ifindex,
+ const char *master_iface,
+ gint slave_ifindex,
+ const char *slave_iface);
+
+enum {
+ NM_IFACE_TYPE_UNSPEC = 0,
+ NM_IFACE_TYPE_BOND,
+ NM_IFACE_TYPE_VLAN,
+ NM_IFACE_TYPE_DUMMY,
+};
+
+int nm_system_get_iface_type (int ifindex, const char *name);
+
+gboolean nm_system_get_iface_vlan_info (int ifindex,
+ int *out_parent_ifindex,
+ int *out_vlan_id);
+
+gboolean nm_system_add_vlan_iface (NMConnection *connection,
+ const char *iface,
+ int parent_ifindex);
+gboolean nm_system_del_vlan_iface (const char *iface);
+
#endif
diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c
index e8c6b822d..45262f874 100644
--- a/src/nm-udev-manager.c
+++ b/src/nm-udev-manager.c
@@ -15,32 +15,19 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2009 - 2011 Red Hat, Inc.
+ * Copyright (C) 2009 - 2012 Red Hat, Inc.
*/
#include <config.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-
-#include "wireless-helper.h"
+#include <net/if_arp.h>
+#include <gmodule.h>
#include <gudev/gudev.h>
#include "nm-udev-manager.h"
#include "nm-marshal.h"
#include "nm-logging.h"
-#include "NetworkManagerUtils.h"
-#include "nm-device-wifi.h"
-#include "nm-device-olpc-mesh.h"
-#include "nm-device-ethernet.h"
-#if WITH_WIMAX
-#include "nm-device-wimax.h"
-#endif
+#include "nm-system.h"
typedef struct {
GUdevClient *client;
@@ -342,69 +329,52 @@ rfkill_remove (NMUdevManager *self,
}
}
-static gboolean
-is_wireless (GUdevDevice *device)
+static void
+net_add (NMUdevManager *self, GUdevDevice *udev_device)
{
- char phy80211_path[255];
- struct stat s;
- int fd;
- struct iwreq iwr;
- const char *ifname, *path;
- gboolean is_wifi = FALSE;
-
- ifname = g_udev_device_get_name (device);
- g_assert (ifname);
-
- fd = socket (PF_INET, SOCK_DGRAM, 0);
- if (fd == -1)
- return FALSE;
-
- strncpy (iwr.ifr_ifrn.ifrn_name, ifname, IFNAMSIZ);
-
- path = g_udev_device_get_sysfs_path (device);
- snprintf (phy80211_path, sizeof (phy80211_path), "%s/phy80211", path);
+ GUdevDevice *parent = NULL, *grandparent = NULL;
+ gint ifindex;
+ gint etype;
+ const char *ifname, *driver, *path, *subsys, *tmp;
+ gboolean is_ctc;
- if ( (ioctl (fd, SIOCGIWNAME, &iwr) == 0)
- || (stat (phy80211_path, &s) == 0 && (s.st_mode & S_IFDIR)))
- is_wifi = TRUE;
+ g_return_if_fail (udev_device != NULL);
- close (fd);
- return is_wifi;
-}
+ ifname = g_udev_device_get_name (udev_device);
+ if (!ifname) {
+ nm_log_dbg (LOGD_HW, "failed to get device's interface");
+ return;
+ }
-static gboolean
-is_olpc_mesh (GUdevDevice *device)
-{
- const gchar *prop = g_udev_device_get_property (device, "ID_NM_OLPC_MESH");
- return (prop != NULL);
-}
+ etype = g_udev_device_get_sysfs_attr_as_int (udev_device, "type");
+ is_ctc = (strncmp (ifname, "ctc", 3) == 0) && (etype == 256);
-static gboolean
-is_wimax (const char *driver)
-{
- /* FIXME: check 'DEVTYPE' instead; but since we only support Intel
- * WiMAX devices for now this is appropriate.
+ /* Ignore devices that don't report Ethernet encapsulation, except for
+ * s390 CTC-type devices that report 256 for some reason.
+ * FIXME: use something other than interface name to detect CTC here.
*/
- return g_strcmp0 (driver, "i2400m_usb") == 0;
-}
-
-static GObject *
-device_creator (NMUdevManager *manager,
- GUdevDevice *udev_device,
- gboolean sleeping)
-{
- GObject *device = NULL;
- const char *ifname, *driver, *path, *subsys;
- GUdevDevice *parent = NULL, *grandparent = NULL;
- gint ifindex;
+ if ((etype != ARPHRD_ETHER) && (etype != ARPHRD_INFINIBAND) && (is_ctc == FALSE)) {
+ nm_log_dbg (LOGD_HW, "(%s): ignoring interface with type %d", ifname, etype);
+ return;
+ }
- ifname = g_udev_device_get_name (udev_device);
- g_assert (ifname);
+ /* Not all ethernet devices are immediately usable; newer mobile broadband
+ * devices (Ericsson, Option, Sierra) require setup on the tty before the
+ * ethernet device is usable. 2.6.33 and later kernels set the 'DEVTYPE'
+ * uevent variable which we can use to ignore the interface as a NMDevice
+ * subclass. ModemManager will pick it up though and so we'll handle it
+ * through the mobile broadband stuff.
+ */
+ tmp = g_udev_device_get_property (udev_device, "DEVTYPE");
+ if (g_strcmp0 (tmp, "wwan") == 0) {
+ nm_log_dbg (LOGD_HW, "(%s): ignoring interface with devtype '%s'", ifname, tmp);
+ return;
+ }
path = g_udev_device_get_sysfs_path (udev_device);
if (!path) {
nm_log_warn (LOGD_HW, "couldn't determine device path; ignoring...");
- return NULL;
+ return;
}
driver = g_udev_device_get_driver (udev_device);
@@ -429,94 +399,39 @@ device_creator (NMUdevManager *manager,
}
}
- if (!driver) {
- if (g_str_has_prefix (ifname, "easytether")) {
- driver = "easytether";
- } else {
- nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
- goto out;
- }
- }
-
ifindex = g_udev_device_get_sysfs_attr_as_int (udev_device, "ifindex");
if (ifindex <= 0) {
nm_log_warn (LOGD_HW, "%s: device had invalid ifindex %d; ignoring...", path, (guint32) ifindex);
goto out;
}
- if (is_olpc_mesh (udev_device)) /* must be before is_wireless */
- device = (GObject *) nm_device_olpc_mesh_new (path, ifname, driver);
- else if (is_wireless (udev_device))
- device = (GObject *) nm_device_wifi_new (path, ifname, driver);
- else if (is_wimax (driver)) {
-#if WITH_WIMAX
- device = (GObject *) nm_device_wimax_new (path, ifname, driver);
-#endif
- } else
- device = (GObject *) nm_device_ethernet_new (path, ifname, driver);
+ if (!driver) {
+ switch (nm_system_get_iface_type (ifindex, ifname)) {
+ case NM_IFACE_TYPE_BOND:
+ driver = "bonding";
+ break;
+ case NM_IFACE_TYPE_VLAN:
+ driver = "8021q";
+ break;
+ default:
+ if (g_str_has_prefix (ifname, "easytether"))
+ driver = "easytether";
+ break;
+ }
+
+ if (!driver) {
+ nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path);
+ goto out;
+ }
+ }
+
+ g_signal_emit (self, signals[DEVICE_ADDED], 0, udev_device, ifname, path, driver, ifindex);
out:
if (grandparent)
g_object_unref (grandparent);
if (parent)
g_object_unref (parent);
- return device;
-}
-
-static void
-net_add (NMUdevManager *self, GUdevDevice *device)
-{
- gint etype;
- const char *iface;
- const char *tmp;
- gboolean is_ctc;
-
- g_return_if_fail (device != NULL);
-
- iface = g_udev_device_get_name (device);
- if (!iface) {
- nm_log_dbg (LOGD_HW, "failed to get device's interface");
- return;
- }
-
- etype = g_udev_device_get_sysfs_attr_as_int (device, "type");
- is_ctc = (strncmp (iface, "ctc", 3) == 0) && (etype == 256);
-
- /* Ignore devices that don't report Ethernet encapsulation, except for
- * s390 CTC-type devices that report 256 for some reason.
- * FIXME: use something other than interface name to detect CTC here.
- */
- if ((etype != 1) && (is_ctc == FALSE)) {
- nm_log_dbg (LOGD_HW, "(%s): ignoring interface with type %d", iface, etype);
- return;
- }
-
- /* Not all ethernet devices are immediately usable; newer mobile broadband
- * devices (Ericsson, Option, Sierra) require setup on the tty before the
- * ethernet device is usable. 2.6.33 and later kernels set the 'DEVTYPE'
- * uevent variable which we can use to ignore the interface as a NMDevice
- * subclass. ModemManager will pick it up though and so we'll handle it
- * through the mobile broadband stuff.
- */
- tmp = g_udev_device_get_property (device, "DEVTYPE");
- if (g_strcmp0 (tmp, "wwan") == 0) {
- nm_log_dbg (LOGD_HW, "(%s): ignoring interface with devtype '%s'", iface, tmp);
- return;
- }
-
- /* Ignore Nokia cdc-ether interfaces in PC-Suite mode since we need to
- * talk phonet to use them, which ModemManager doesn't do yet.
- */
- tmp = g_udev_device_get_property (device, "ID_VENDOR_ID");
- if (g_strcmp0 (tmp, "0421") == 0) { /* Nokia vendor ID */
- tmp = g_udev_device_get_property (device, "ID_MODEL");
- if (tmp && (strstr (tmp, "PC-Suite") || strstr (tmp, "PC Suite"))) {
- nm_log_dbg (LOGD_HW, "(%s): ignoring Nokia PC-Suite ethernet interface", iface);
- return;
- }
- }
-
- g_signal_emit (self, signals[DEVICE_ADDED], 0, device, device_creator);
}
static void
@@ -638,8 +553,8 @@ nm_udev_manager_class_init (NMUdevManagerClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMUdevManagerClass, device_added),
NULL, NULL,
- _nm_marshal_VOID__POINTER_POINTER,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+ _nm_marshal_VOID__POINTER_POINTER_POINTER_POINTER_INT,
+ G_TYPE_NONE, 5, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_INT);
signals[DEVICE_REMOVED] =
g_signal_new ("device-removed",
diff --git a/src/nm-udev-manager.h b/src/nm-udev-manager.h
index e7866f96e..61d3b7cf2 100644
--- a/src/nm-udev-manager.h
+++ b/src/nm-udev-manager.h
@@ -16,7 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2008 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_UDEV_MANAGER_H
@@ -52,7 +52,10 @@ typedef struct {
/* Virtual functions */
void (*device_added) (NMUdevManager *manager,
GUdevDevice *device,
- NMDeviceCreatorFn creator_fn);
+ const char *iface,
+ const char *sysfs_path,
+ const char *driver,
+ int ifindex);
void (*device_removed) (NMUdevManager *manager, GUdevDevice *device);
diff --git a/src/nm-wifi-ap.c b/src/nm-wifi-ap.c
index be836df0b..92a99b69a 100644
--- a/src/nm-wifi-ap.c
+++ b/src/nm-wifi-ap.c
@@ -19,10 +19,9 @@
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
-#include "wireless-helper.h"
-
#include <string.h>
#include <stdlib.h>
+#include <netinet/ether.h>
#include "nm-wifi-ap.h"
#include "nm-wifi-ap-utils.h"
@@ -30,7 +29,7 @@
#include "nm-utils.h"
#include "nm-logging.h"
#include "nm-dbus-manager.h"
-#include "wpa.h"
+
#include "nm-properties-changed-signal.h"
#include "nm-setting-wireless.h"
#include "nm-glib-compat.h"
@@ -43,6 +42,7 @@
typedef struct
{
char *dbus_path;
+ char *supplicant_path; /* D-Bus object path of this AP from wpa_supplicant */
/* Scanned or cached values */
GByteArray * ssid;
@@ -107,6 +107,7 @@ finalize (GObject *object)
NMAccessPointPrivate *priv = NM_AP_GET_PRIVATE (object);
g_free (priv->dbus_path);
+ g_free (priv->supplicant_path);
if (priv->ssid)
g_byte_array_free (priv->ssid, TRUE);
@@ -183,7 +184,7 @@ get_property (GObject *object, guint prop_id,
g_value_set_uint (value, priv->freq);
break;
case PROP_HW_ADDRESS:
- g_value_take_string (value, nm_ether_ntop (&priv->address));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (&priv->address, ARPHRD_ETHER));
break;
case PROP_MODE:
g_value_set_uint (value, priv->mode);
@@ -346,15 +347,10 @@ nm_ap_export_to_dbus (NMAccessPoint *ap)
* Create a new, blank user access point info structure
*
*/
-NMAccessPoint *nm_ap_new (void)
+static NMAccessPoint *
+nm_ap_new (void)
{
- GObject *object;
-
- object = g_object_new (NM_TYPE_AP, NULL);
- if (!object)
- return NULL;
-
- return (NMAccessPoint *) object;
+ return (NMAccessPoint *) g_object_new (NM_TYPE_AP, NULL);
}
static NM80211ApSecurityFlags
@@ -431,7 +427,7 @@ foreach_property_cb (gpointer key, gpointer value, gpointer user_data)
GArray *array = g_value_get_boxed (variant);
if (!strcmp (key, "SSID")) {
- guint32 len = MIN (IW_ESSID_MAX_SIZE, array->len);
+ guint32 len = MIN (32, array->len);
GByteArray *ssid;
/* Stupid ieee80211 layer uses <hidden> */
@@ -510,7 +506,7 @@ foreach_property_cb (gpointer key, gpointer value, gpointer user_data)
}
NMAccessPoint *
-nm_ap_new_from_properties (GHashTable *properties)
+nm_ap_new_from_properties (const char *supplicant_path, GHashTable *properties)
{
NMAccessPoint *ap;
GTimeVal cur_time;
@@ -525,6 +521,8 @@ nm_ap_new_from_properties (GHashTable *properties)
g_object_freeze_notify (G_OBJECT (ap));
g_hash_table_foreach (properties, foreach_property_cb, ap);
+ nm_ap_set_supplicant_path (ap, supplicant_path);
+
/* ignore APs with invalid BSSIDs */
addr = nm_ap_get_address (ap);
if ( !(memcmp (addr->ether_addr_octet, bad_bssid1, ETH_ALEN))
@@ -635,7 +633,7 @@ nm_ap_new_fake_from_connection (NMConnection *connection)
g_return_val_if_fail (connection != NULL, NULL);
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
g_return_val_if_fail (s_wireless != NULL, NULL);
ssid = nm_setting_wireless_get_ssid (s_wireless);
@@ -672,7 +670,7 @@ nm_ap_new_fake_from_connection (NMConnection *connection)
nm_ap_set_freq (ap, freq);
}
- s_wireless_sec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wireless_sec = nm_connection_get_setting_wireless_security (connection);
/* Assume presence of a security setting means the AP is encrypted */
if (!s_wireless_sec)
goto done;
@@ -784,6 +782,24 @@ nm_ap_get_dbus_path (NMAccessPoint *ap)
return NM_AP_GET_PRIVATE (ap)->dbus_path;
}
+const char *
+nm_ap_get_supplicant_path (NMAccessPoint *ap)
+{
+ g_return_val_if_fail (NM_IS_AP (ap), NULL);
+
+ return NM_AP_GET_PRIVATE (ap)->supplicant_path;
+}
+
+void
+nm_ap_set_supplicant_path (NMAccessPoint *ap, const char *path)
+{
+ g_return_if_fail (NM_IS_AP (ap));
+ g_return_if_fail (path != NULL);
+
+ g_free (NM_AP_GET_PRIVATE (ap)->supplicant_path);
+ NM_AP_GET_PRIVATE (ap)->supplicant_path = g_strdup (path);
+}
+
/*
* Get/set functions for ssid
*
@@ -1130,7 +1146,7 @@ nm_ap_check_compatible (NMAccessPoint *self,
priv = NM_AP_GET_PRIVATE (self);
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
if (s_wireless == NULL)
return FALSE;
@@ -1168,8 +1184,7 @@ nm_ap_check_compatible (NMAccessPoint *self,
return FALSE;
}
- s_wireless_sec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wireless_sec = nm_connection_get_setting_wireless_security (connection);
return nm_setting_wireless_ap_security_compatible (s_wireless,
s_wireless_sec,
diff --git a/src/nm-wifi-ap.h b/src/nm-wifi-ap.h
index 31100d341..a00873231 100644
--- a/src/nm-wifi-ap.h
+++ b/src/nm-wifi-ap.h
@@ -57,13 +57,17 @@ typedef struct {
GType nm_ap_get_type (void);
-NMAccessPoint * nm_ap_new (void);
-NMAccessPoint * nm_ap_new_from_properties (GHashTable *properties);
+NMAccessPoint * nm_ap_new_from_properties (const char *supplicant_path,
+ GHashTable *properties);
NMAccessPoint * nm_ap_new_fake_from_connection (NMConnection *connection);
void nm_ap_export_to_dbus (NMAccessPoint *ap);
const char * nm_ap_get_dbus_path (NMAccessPoint *ap);
+const char * nm_ap_get_supplicant_path (NMAccessPoint *ap);
+void nm_ap_set_supplicant_path (NMAccessPoint *ap,
+ const char *path);
+
const GByteArray * nm_ap_get_ssid (const NMAccessPoint * ap);
void nm_ap_set_ssid (NMAccessPoint * ap, const GByteArray * ssid);
diff --git a/src/NetworkManager.conf b/src/org.freedesktop.NetworkManager.conf
index 15b11b7e1..15b11b7e1 100644
--- a/src/NetworkManager.conf
+++ b/src/org.freedesktop.NetworkManager.conf
diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am
index 540e58559..8df2f5845 100644
--- a/src/ppp-manager/Makefile.am
+++ b/src/ppp-manager/Makefile.am
@@ -1,10 +1,13 @@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src \
- -I${top_srcdir}/src/logging \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
+ -I${top_srcdir}/src/logging
noinst_LTLIBRARIES = libppp-manager.la
@@ -28,7 +31,7 @@ libppp_manager_la_CPPFLAGS = \
-DPLUGINDIR=\"$(PPPD_PLUGIN_DIR)\"
libppp_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS)
diff --git a/src/ppp-manager/Makefile.in b/src/ppp-manager/Makefile.in
index 90f855b30..55355a7d2 100644
--- a/src/ppp-manager/Makefile.in
+++ b/src/ppp-manager/Makefile.in
@@ -79,7 +79,7 @@ am__installdirs = "$(DESTDIR)$(pppd_plugindir)"
LTLIBRARIES = $(noinst_LTLIBRARIES) $(pppd_plugin_LTLIBRARIES)
am__DEPENDENCIES_1 =
libppp_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libppp_manager_la_OBJECTS = libppp_manager_la-nm-ppp-manager.lo
@@ -177,6 +177,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -231,11 +233,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -246,6 +252,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -285,6 +292,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -351,10 +360,13 @@ top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/src \
- -I${top_srcdir}/src/logging \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
+ -I${top_srcdir}/src/logging
noinst_LTLIBRARIES = libppp-manager.la
libppp_manager_la_SOURCES = \
@@ -371,7 +383,7 @@ libppp_manager_la_CPPFLAGS = \
-DPLUGINDIR=\"$(PPPD_PLUGIN_DIR)\"
libppp_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS)
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 3546f8d74..59698c342 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -16,7 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2008 Novell, Inc.
- * Copyright (C) 2008 - 2010 Red Hat, Inc.
+ * Copyright (C) 2008 - 2011 Red Hat, Inc.
*/
#include <config.h>
@@ -374,7 +374,7 @@ extract_details_from_connection (NMConnection *connection,
g_return_val_if_fail (username != NULL, FALSE);
g_return_val_if_fail (password != NULL, FALSE);
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
connection_type = nm_setting_connection_get_connection_type (s_con);
@@ -579,7 +579,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager,
g_object_set_data (G_OBJECT (connection), PPP_MANAGER_SECRET_TRIES, NULL);
/* Merge in custom MTU */
- s_ppp = (NMSettingPPP *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
+ s_ppp = nm_connection_get_setting_ppp (connection);
if (s_ppp) {
guint32 mtu = nm_setting_ppp_get_mtu (s_ppp);
@@ -935,12 +935,6 @@ pppoe_fill_defaults (NMSettingPPP *setting)
if (!nm_setting_ppp_get_mru (setting))
g_object_set (setting, NM_SETTING_PPP_MRU, (guint32) 1492, NULL);
- if (!nm_setting_ppp_get_lcp_echo_interval (setting))
- g_object_set (setting, NM_SETTING_PPP_LCP_ECHO_INTERVAL, (guint32) 20, NULL);
-
- if (!nm_setting_ppp_get_lcp_echo_failure (setting))
- g_object_set (setting, NM_SETTING_PPP_LCP_ECHO_FAILURE, (guint32) 3, NULL);
-
g_object_set (setting,
NM_SETTING_PPP_NOAUTH, TRUE,
NM_SETTING_PPP_NODEFLATE, TRUE,
@@ -999,7 +993,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
connection = nm_act_request_get_connection (req);
g_assert (connection);
- s_ppp = (NMSettingPPP *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
+ s_ppp = nm_connection_get_setting_ppp (connection);
if (!s_ppp) {
/* If the PPP settings are all default we may not have a PPP setting yet,
* so just make a default one here.
@@ -1008,7 +1002,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
s_ppp_created = TRUE;
}
- pppoe_setting = (NMSettingPPPOE *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE);
+ pppoe_setting = nm_connection_get_setting_pppoe (connection);
if (pppoe_setting)
pppoe_fill_defaults (s_ppp);
diff --git a/src/settings/Makefile.am b/src/settings/Makefile.am
index 21dc5bb0e..8024d5414 100644
--- a/src/settings/Makefile.am
+++ b/src/settings/Makefile.am
@@ -2,10 +2,13 @@ SUBDIRS=plugins . tests
INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
- -I${top_srcdir}/src \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/src
noinst_LTLIBRARIES = libsettings.la libtest-settings-utils.la
@@ -64,7 +67,7 @@ libsettings_la_CPPFLAGS = \
libsettings_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(builddir)/plugins/keyfile/libnm-settings-plugin-keyfile.la \
$(DBUS_LIBS) \
diff --git a/src/settings/Makefile.in b/src/settings/Makefile.in
index b4f4508f9..d12782066 100644
--- a/src/settings/Makefile.in
+++ b/src/settings/Makefile.in
@@ -58,7 +58,7 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libsettings_la_DEPENDENCIES = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(builddir)/plugins/keyfile/libnm-settings-plugin-keyfile.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -203,6 +203,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -257,11 +259,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -272,6 +278,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -311,6 +318,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -377,10 +386,13 @@ top_srcdir = @top_srcdir@
SUBDIRS = plugins . tests
INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
- -I${top_srcdir}/src \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/src
noinst_LTLIBRARIES = libsettings.la libtest-settings-utils.la
libtest_settings_utils_la_SOURCES = \
@@ -438,7 +450,7 @@ libsettings_la_CPPFLAGS = \
libsettings_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(builddir)/plugins/keyfile/libnm-settings-plugin-keyfile.la \
$(DBUS_LIBS) \
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
index 5ccbdc672..b7057400b 100644
--- a/src/settings/nm-agent-manager.c
+++ b/src/settings/nm-agent-manager.c
@@ -36,6 +36,7 @@
#include "nm-manager-auth.h"
#include "nm-setting-vpn.h"
#include "nm-setting-connection.h"
+#include "nm-enum-types.h"
G_DEFINE_TYPE (NMAgentManager, nm_agent_manager, G_TYPE_OBJECT)
@@ -88,17 +89,6 @@ static void impl_agent_manager_unregister (NMAgentManager *self,
/********************************************************************/
#define NM_AGENT_MANAGER_ERROR (nm_agent_manager_error_quark ())
-#define NM_TYPE_AGENT_MANAGER_ERROR (nm_agent_manager_error_get_type ())
-
-typedef enum {
- NM_AGENT_MANAGER_ERROR_SENDER_UNKNOWN = 0,
- NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED,
- NM_AGENT_MANAGER_ERROR_SESSION_NOT_FOUND,
- NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER,
- NM_AGENT_MANAGER_ERROR_NOT_REGISTERED,
- NM_AGENT_MANAGER_ERROR_INTERNAL_ERROR,
- NM_AGENT_MANAGER_ERROR_NO_SECRETS
-} NMAgentManagerError;
static GQuark
nm_agent_manager_error_quark (void)
@@ -110,37 +100,6 @@ nm_agent_manager_error_quark (void)
return ret;
}
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_agent_manager_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unable to determine caller's sender or UID */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_SENDER_UNKNOWN, "SenderUnknown"),
- /* Permission for some operation was denied */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED, "PermissionDenied"),
- /* The caller's session could not be determined */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_SESSION_NOT_FOUND, "SessionNotFound"),
- /* The identifier was invalid */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER, "InvalidIdentifier"),
- /* Request was not from a registered agent */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_NOT_REGISTERED, "NotRegistered"),
- /* Some internal error occurred */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_INTERNAL_ERROR, "InternalError"),
- /* No secrets were available */
- ENUM_ENTRY (NM_AGENT_MANAGER_ERROR_NO_SECRETS, "NoSecrets"),
- { 0, 0, 0 }
- };
-
- etype = g_enum_register_static ("NMAgentManagerError", values);
- }
- return etype;
-}
-
/*************************************************************/
static gboolean
@@ -962,7 +921,7 @@ get_next_cb (Request *req)
* we use the 'modify.own' permission instead of 'modify.system'. If the
* request affects more than just the caller, require 'modify.system'.
*/
- s_con = (NMSettingConnection *) nm_connection_get_setting (req->connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (req->connection);
g_assert (s_con);
if (nm_setting_connection_get_num_permissions (s_con) == 1)
perm = NM_AUTH_PERMISSION_SETTINGS_MODIFY_OWN;
diff --git a/src/settings/nm-agent-manager.h b/src/settings/nm-agent-manager.h
index e49f579d7..9e8de44bb 100644
--- a/src/settings/nm-agent-manager.h
+++ b/src/settings/nm-agent-manager.h
@@ -34,6 +34,16 @@
#define NM_IS_AGENT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_AGENT_MANAGER))
#define NM_AGENT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_AGENT_MANAGER, NMAgentManagerClass))
+typedef enum {
+ NM_AGENT_MANAGER_ERROR_SENDER_UNKNOWN = 0, /*< nick=SenderUnknown >*/
+ NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED, /*< nick=PermissionDenied >*/
+ NM_AGENT_MANAGER_ERROR_SESSION_NOT_FOUND, /*< nick=SessionNotFound >*/
+ NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER, /*< nick=InvalidIdentifier >*/
+ NM_AGENT_MANAGER_ERROR_NOT_REGISTERED, /*< nick=NotRegistered >*/
+ NM_AGENT_MANAGER_ERROR_INTERNAL_ERROR, /*< nick=InternalError >*/
+ NM_AGENT_MANAGER_ERROR_NO_SECRETS /*< nick=NoSecrets >*/
+} NMAgentManagerError;
+
typedef struct {
GObject parent;
} NMAgentManager;
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index cdad83256..5d240c777 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -221,7 +221,7 @@ nm_settings_connection_recheck_visibility (NMSettingsConnection *self)
priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (self);
- s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (self), NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (NM_CONNECTION (self));
g_assert (s_con);
/* Check every user in the ACL for a session */
@@ -1024,7 +1024,7 @@ check_writable (NMConnection *connection, GError **error)
g_return_val_if_fail (connection != NULL, FALSE);
g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (!s_con) {
g_set_error_literal (error,
NM_SETTINGS_ERROR,
@@ -1175,11 +1175,11 @@ get_modify_permission_update (NMConnection *old, NMConnection *new)
NMSettingConnection *s_con;
guint32 orig_num = 0, new_num = 0;
- s_con = (NMSettingConnection *) nm_connection_get_setting (old, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (old);
g_assert (s_con);
orig_num = nm_setting_connection_get_num_permissions (s_con);
- s_con = (NMSettingConnection *) nm_connection_get_setting (new, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (new);
g_assert (s_con);
new_num = nm_setting_connection_get_num_permissions (s_con);
@@ -1283,7 +1283,7 @@ get_modify_permission_basic (NMSettingsConnection *connection)
* we use the 'modify.own' permission instead of 'modify.system'. If the
* request affects more than just the caller, require 'modify.system'.
*/
- s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (NM_CONNECTION (connection));
g_assert (s_con);
if (nm_setting_connection_get_num_permissions (s_con) == 1)
return NM_AUTH_PERMISSION_SETTINGS_MODIFY_OWN;
@@ -1422,11 +1422,14 @@ nm_settings_connection_get_timestamp (NMSettingsConnection *connection)
* @connection: the #NMSettingsConnection
* @timestamp: timestamp to set into the connection and to store into
* the timestamps database
+ * @flush_to_disk: if %TRUE, commit timestamp update to persistent storage
*
* Updates the connection and timestamps database with the provided timestamp.
**/
void
-nm_settings_connection_update_timestamp (NMSettingsConnection *connection, guint64 timestamp)
+nm_settings_connection_update_timestamp (NMSettingsConnection *connection,
+ guint64 timestamp,
+ gboolean flush_to_disk)
{
NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (connection);
const char *connection_uuid;
@@ -1438,6 +1441,9 @@ nm_settings_connection_update_timestamp (NMSettingsConnection *connection, guint
/* Update timestamp in private storage */
priv->timestamp = timestamp;
+ if (flush_to_disk == FALSE)
+ return;
+
/* Save timestamp to timestamps database file */
timestamps_file = g_key_file_new ();
if (!g_key_file_load_from_file (timestamps_file, SETTINGS_TIMESTAMPS_FILE, G_KEY_FILE_KEEP_COMMENTS, &error)) {
@@ -1576,7 +1582,7 @@ nm_settings_connection_add_seen_bssid (NMSettingsConnection *connection,
return; /* Already in the list */
/* Add the new BSSID; let the hash take ownership of the allocated BSSID string */
- bssid_str = nm_ether_ntop (seen_bssid);
+ bssid_str = nm_utils_hwaddr_ntoa (seen_bssid, ARPHRD_ETHER);
g_return_if_fail (bssid_str != NULL);
g_hash_table_insert (priv->seen_bssids, mac_dup (seen_bssid), bssid_str);
diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
index bc9e3c471..077a145d0 100644
--- a/src/settings/nm-settings-connection.h
+++ b/src/settings/nm-settings-connection.h
@@ -124,7 +124,9 @@ void nm_settings_connection_signal_remove (NMSettingsConnection *self);
guint64 nm_settings_connection_get_timestamp (NMSettingsConnection *connection);
-void nm_settings_connection_update_timestamp (NMSettingsConnection *connection, guint64 timestamp);
+void nm_settings_connection_update_timestamp (NMSettingsConnection *connection,
+ guint64 timestamp,
+ gboolean flush_to_disk);
void nm_settings_connection_read_and_fill_timestamp (NMSettingsConnection *connection);
diff --git a/src/settings/nm-settings-error.c b/src/settings/nm-settings-error.c
index 7e24fb71f..fd4eca364 100644
--- a/src/settings/nm-settings-error.c
+++ b/src/settings/nm-settings-error.c
@@ -31,53 +31,3 @@ nm_settings_error_quark (void)
return ret;
}
-
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_settings_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- ENUM_ENTRY (NM_SETTINGS_ERROR_GENERAL, "GeneralError"),
-
- /* The connection was invalid. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_INVALID_CONNECTION, "InvalidConnection"),
- /* The connection is read-only; modifications are not allowed. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_READ_ONLY_CONNECTION, "ReadOnlyConnection"),
- /* A bug in the settings service caused the error. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_INTERNAL_ERROR, "InternalError"),
- /* Retrieval or request of secrets failed. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_SECRETS_UNAVAILABLE, "SecretsUnavailable"),
- /* The request for secrets was canceled. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_SECRETS_REQUEST_CANCELED, "SecretsRequestCanceled"),
- /* The request could not be completed because permission was denied. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_PERMISSION_DENIED, "PermissionDenied"),
- /* The requested setting does not existing in this connection. */
- ENUM_ENTRY (NM_SETTINGS_ERROR_INVALID_SETTING, "InvalidSetting"),
- /* The caller does not have permission to perform this operation */
- ENUM_ENTRY (NM_SETTINGS_ERROR_NOT_PRIVILEGED, "NotPrivileged"),
- /* No plugin supports adding new connections */
- ENUM_ENTRY (NM_SETTINGS_ERROR_ADD_NOT_SUPPORTED, "AddNotSupported"),
- /* The plugin providing this connection does not support updating it */
- ENUM_ENTRY (NM_SETTINGS_ERROR_UPDATE_NOT_SUPPORTED, "UpdateNotSupported"),
- /* The plugin providing this connection does not support deleting it */
- ENUM_ENTRY (NM_SETTINGS_ERROR_DELETE_NOT_SUPPORTED, "DeleteNotSupported"),
- /* Failed to add the connection */
- ENUM_ENTRY (NM_SETTINGS_ERROR_ADD_FAILED, "AddFailed"),
- /* No plugin supports modifying the system hostname */
- ENUM_ENTRY (NM_SETTINGS_ERROR_SAVE_HOSTNAME_NOT_SUPPORTED, "SaveHostnameNotSupported"),
- /* Saving the system hostname failed */
- ENUM_ENTRY (NM_SETTINGS_ERROR_SAVE_HOSTNAME_FAILED, "SaveHostnameFailed"),
- /* A connection with this UUID already exists */
- ENUM_ENTRY (NM_SETTINGS_ERROR_UUID_EXISTS, "UuidExists"),
- { 0, 0, 0 }
- };
-
- etype = g_enum_register_static ("NMSettingsError", values);
- }
-
- return etype;
-}
diff --git a/src/settings/nm-settings-error.h b/src/settings/nm-settings-error.h
index b782a7791..82132c6f3 100644
--- a/src/settings/nm-settings-error.h
+++ b/src/settings/nm-settings-error.h
@@ -25,24 +25,24 @@
#include <glib.h>
#include <glib-object.h>
-enum {
- NM_SETTINGS_ERROR_GENERAL = 0,
- NM_SETTINGS_ERROR_INVALID_CONNECTION,
- NM_SETTINGS_ERROR_READ_ONLY_CONNECTION,
- NM_SETTINGS_ERROR_INTERNAL_ERROR,
- NM_SETTINGS_ERROR_SECRETS_UNAVAILABLE,
- NM_SETTINGS_ERROR_SECRETS_REQUEST_CANCELED,
- NM_SETTINGS_ERROR_PERMISSION_DENIED,
- NM_SETTINGS_ERROR_INVALID_SETTING,
- NM_SETTINGS_ERROR_NOT_PRIVILEGED,
- NM_SETTINGS_ERROR_ADD_NOT_SUPPORTED,
- NM_SETTINGS_ERROR_UPDATE_NOT_SUPPORTED,
- NM_SETTINGS_ERROR_DELETE_NOT_SUPPORTED,
- NM_SETTINGS_ERROR_ADD_FAILED,
- NM_SETTINGS_ERROR_SAVE_HOSTNAME_NOT_SUPPORTED,
- NM_SETTINGS_ERROR_SAVE_HOSTNAME_FAILED,
- NM_SETTINGS_ERROR_UUID_EXISTS,
-};
+typedef enum {
+ NM_SETTINGS_ERROR_GENERAL = 0, /*< nick=GeneralError >*/
+ NM_SETTINGS_ERROR_INVALID_CONNECTION, /*< nick=InvalidConnection >*/
+ NM_SETTINGS_ERROR_READ_ONLY_CONNECTION, /*< nick=ReadOnlyConnection >*/
+ NM_SETTINGS_ERROR_INTERNAL_ERROR, /*< nick=InternalError >*/
+ NM_SETTINGS_ERROR_SECRETS_UNAVAILABLE, /*< nick=SecretsUnavailable >*/
+ NM_SETTINGS_ERROR_SECRETS_REQUEST_CANCELED, /*< nick=SecretsRequestCanceled >*/
+ NM_SETTINGS_ERROR_PERMISSION_DENIED, /*< nick=PermissionDenied >*/
+ NM_SETTINGS_ERROR_INVALID_SETTING, /*< nick=InvalidSetting >*/
+ NM_SETTINGS_ERROR_NOT_PRIVILEGED, /*< nick=NotPrivileged >*/
+ NM_SETTINGS_ERROR_ADD_NOT_SUPPORTED, /*< nick=AddNotSupported >*/
+ NM_SETTINGS_ERROR_UPDATE_NOT_SUPPORTED, /*< nick=UpdateNotSupported >*/
+ NM_SETTINGS_ERROR_DELETE_NOT_SUPPORTED, /*< nick=DeleteNotSupported >*/
+ NM_SETTINGS_ERROR_ADD_FAILED, /*< nick=AddFailed >*/
+ NM_SETTINGS_ERROR_SAVE_HOSTNAME_NOT_SUPPORTED, /*< nick=SaveHostnameNotSupported >*/
+ NM_SETTINGS_ERROR_SAVE_HOSTNAME_FAILED, /*< nick=SaveHostnameFailed >*/
+ NM_SETTINGS_ERROR_UUID_EXISTS, /*< nick=UuidExists >*/
+} NMSettingsError;
#define NM_SETTINGS_ERROR (nm_settings_error_quark ())
GQuark nm_settings_error_quark (void);
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index f0bfc1628..1ead4f8b7 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -29,8 +29,7 @@
#include <string.h>
#include <ctype.h>
#include <gmodule.h>
-#include <net/ethernet.h>
-#include <netinet/ether.h>
+#include <net/if_arp.h>
#include <pwd.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -52,8 +51,11 @@
#include <nm-setting-wired.h>
#include <nm-setting-wireless.h>
#include <nm-setting-wireless-security.h>
+#include <nm-setting-bond.h>
+#include <nm-utils.h>
#include "../nm-device-ethernet.h"
+#include "../nm-device-wired.h"
#include "nm-dbus-glib-types.h"
#include "nm-settings.h"
#include "nm-settings-connection.h"
@@ -226,36 +228,49 @@ impl_settings_list_connections (NMSettings *self,
return TRUE;
}
-static gboolean
-impl_settings_get_connection_by_uuid (NMSettings *self,
- const char *uuid,
- char **out_object_path,
- GError **error)
+NMSettingsConnection *
+nm_settings_get_connection_by_uuid (NMSettings *self, const char *uuid)
{
- NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
+ NMSettingsPrivate *priv;
+ NMSettingsConnection *candidate;
GHashTableIter iter;
- NMConnection *candidate = NULL;
- gboolean found = FALSE;
+
+ g_return_val_if_fail (self != NULL, NULL);
+ g_return_val_if_fail (NM_IS_SETTINGS (self), NULL);
+ g_return_val_if_fail (uuid != NULL, NULL);
+
+ priv = NM_SETTINGS_GET_PRIVATE (self);
load_connections (self);
g_hash_table_iter_init (&iter, priv->connections);
while (g_hash_table_iter_next (&iter, NULL, (gpointer) &candidate)) {
- if (g_strcmp0 (uuid, nm_connection_get_uuid (candidate)) == 0) {
- *out_object_path = g_strdup (nm_connection_get_path (candidate));
- found = TRUE;
- break;
- }
+ if (g_strcmp0 (uuid, nm_connection_get_uuid (NM_CONNECTION (candidate))) == 0)
+ return candidate;
}
- if (!found) {
+ return NULL;
+}
+
+static gboolean
+impl_settings_get_connection_by_uuid (NMSettings *self,
+ const char *uuid,
+ char **out_object_path,
+ GError **error)
+{
+ NMSettingsConnection *connection = NULL;
+
+ connection = nm_settings_get_connection_by_uuid (self, uuid);
+ if (connection)
+ *out_object_path = g_strdup (nm_connection_get_path (NM_CONNECTION (connection)));
+ else {
g_set_error_literal (error,
NM_SETTINGS_ERROR,
NM_SETTINGS_ERROR_INVALID_CONNECTION,
"No connection with the UUID was found.");
}
- return found;
+ return !!connection;
}
static int
@@ -267,9 +282,9 @@ connection_sort (gconstpointer pa, gconstpointer pb)
NMSettingConnection *con_b;
guint64 ts_a, ts_b;
- con_a = (NMSettingConnection *) nm_connection_get_setting (a, NM_TYPE_SETTING_CONNECTION);
+ con_a = nm_connection_get_setting_connection (a);
g_assert (con_a);
- con_b = (NMSettingConnection *) nm_connection_get_setting (b, NM_TYPE_SETTING_CONNECTION);
+ con_b = nm_connection_get_setting_connection (b);
g_assert (con_b);
if (nm_setting_connection_get_autoconnect (con_a) != nm_setting_connection_get_autoconnect (con_b)) {
@@ -549,6 +564,7 @@ find_plugin (GSList *list, const char *pname)
static gboolean
load_plugins (NMSettings *self, const char **plugins, GError **error)
{
+ NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
GSList *list = NULL;
const char **iter;
gboolean success = TRUE;
@@ -558,7 +574,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
char *full_name, *path;
const char *pname = *iter;
GObject *obj;
- GObject * (*factory_func) (void);
+ GObject * (*factory_func) (const char *);
/* strip leading spaces */
while (isblank (*pname))
@@ -601,7 +617,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
break;
}
- obj = (*factory_func) ();
+ obj = (*factory_func) (priv->config_file);
if (!obj || !NM_IS_SYSTEM_CONFIG_INTERFACE (obj)) {
g_set_error (error, 0, 0,
"Plugin '%s' returned invalid system config object.",
@@ -901,6 +917,45 @@ add_new_connection (NMSettings *self,
return NULL;
}
+static gboolean
+secrets_filter_cb (NMSetting *setting,
+ const char *secret,
+ NMSettingSecretFlags flags,
+ gpointer user_data)
+{
+ NMSettingSecretFlags filter_flags = GPOINTER_TO_UINT (user_data);
+
+ /* Returns TRUE to remove the secret */
+
+ /* Can't use bitops with SECRET_FLAG_NONE so handle that specifically */
+ if ( (flags == NM_SETTING_SECRET_FLAG_NONE)
+ && (filter_flags == NM_SETTING_SECRET_FLAG_NONE))
+ return FALSE;
+
+ /* Otherwise if the secret has at least one of the desired flags keep it */
+ return (flags & filter_flags) ? FALSE : TRUE;
+}
+
+static void
+send_agent_owned_secrets (NMSettings *self,
+ NMSettingsConnection *connection,
+ gulong caller_uid)
+{
+ NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
+ NMConnection *for_agent;
+
+ /* Dupe the connection so we can clear out non-agent-owned secrets,
+ * as agent-owned secrets are the only ones we send back to be saved.
+ * Only send secrets to agents of the same UID that called update too.
+ */
+ for_agent = nm_connection_duplicate (NM_CONNECTION (connection));
+ nm_connection_clear_secrets_with_flags (for_agent,
+ secrets_filter_cb,
+ GUINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED));
+ nm_agent_manager_save_secrets (priv->agent_mgr, for_agent, TRUE, caller_uid);
+ g_object_unref (for_agent);
+}
+
static void
pk_add_cb (NMAuthChain *chain,
GError *chain_error,
@@ -915,6 +970,7 @@ pk_add_cb (NMAuthChain *chain,
NMSettingsConnection *added = NULL;
NMSettingsAddCallback callback;
gpointer callback_data;
+ gulong caller_uid;
const char *perm;
priv->auths = g_slist_remove (priv->auths, chain);
@@ -954,9 +1010,14 @@ pk_add_cb (NMAuthChain *chain,
done:
callback = nm_auth_chain_get_data (chain, "callback");
callback_data = nm_auth_chain_get_data (chain, "callback-data");
+ caller_uid = nm_auth_chain_get_data_ulong (chain, "caller-uid");
callback (self, added, error, context, callback_data);
+ /* Send agent-owned secrets to the agents */
+ if (!error && added)
+ send_agent_owned_secrets (self, added, caller_uid);
+
g_clear_error (&error);
nm_auth_chain_unref (chain);
}
@@ -974,6 +1035,38 @@ add_cb (NMSettings *self,
dbus_g_method_return (context, nm_connection_get_path (NM_CONNECTION (connection)));
}
+/* FIXME: remove if/when kernel supports adhoc wpa */
+static gboolean
+is_adhoc_wpa (NMConnection *connection)
+{
+ NMSettingWireless *s_wifi;
+ NMSettingWirelessSecurity *s_wsec;
+ const char *mode, *key_mgmt;
+
+ /* The kernel doesn't support Ad-Hoc WPA connections well at this time,
+ * and turns them into open networks. It's been this way since at least
+ * 2.6.30 or so; until that's fixed, disable WPA-protected Ad-Hoc networks.
+ */
+
+ s_wifi = nm_connection_get_setting_wireless (connection);
+ if (!s_wifi)
+ return FALSE;
+
+ mode = nm_setting_wireless_get_mode (s_wifi);
+ if (g_strcmp0 (mode, NM_SETTING_WIRELESS_MODE_ADHOC) != 0)
+ return FALSE;
+
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
+ if (!s_wsec)
+ return FALSE;
+
+ key_mgmt = nm_setting_wireless_security_get_key_mgmt (s_wsec);
+ if (g_strcmp0 (key_mgmt, "wpa-none") != 0)
+ return FALSE;
+
+ return TRUE;
+}
+
void
nm_settings_add_connection (NMSettings *self,
NMConnection *connection,
@@ -1001,6 +1094,19 @@ nm_settings_add_connection (NMSettings *self,
return;
}
+ /* The kernel doesn't support Ad-Hoc WPA connections well at this time,
+ * and turns them into open networks. It's been this way since at least
+ * 2.6.30 or so; until that's fixed, disable WPA-protected Ad-Hoc networks.
+ */
+ if (is_adhoc_wpa (connection)) {
+ error = g_error_new_literal (NM_SETTINGS_ERROR,
+ NM_SETTINGS_ERROR_INVALID_CONNECTION,
+ "WPA Ad-Hoc disabled due to kernel bugs");
+ callback (self, NULL, error, context, user_data);
+ g_error_free (error);
+ return;
+ }
+
/* Do any of the plugins support adding? */
if (!get_plugin (self, NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS)) {
error = g_error_new_literal (NM_SETTINGS_ERROR,
@@ -1044,7 +1150,7 @@ nm_settings_add_connection (NMSettings *self,
* we use the 'modify.own' permission instead of 'modify.system'. If the
* request affects more than just the caller, require 'modify.system'.
*/
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
if (nm_setting_connection_get_num_permissions (s_con) == 1)
perm = NM_AUTH_PERMISSION_SETTINGS_MODIFY_OWN;
@@ -1060,6 +1166,7 @@ nm_settings_add_connection (NMSettings *self,
nm_auth_chain_set_data (chain, "connection", g_object_ref (connection), g_object_unref);
nm_auth_chain_set_data (chain, "callback", callback, NULL);
nm_auth_chain_set_data (chain, "callback-data", user_data, NULL);
+ nm_auth_chain_set_data_ulong (chain, "caller-uid", caller_uid);
}
static void
@@ -1172,13 +1279,14 @@ impl_settings_save_hostname (NMSettings *self,
}
static gboolean
-have_connection_for_device (NMSettings *self, GByteArray *mac)
+have_connection_for_device (NMSettings *self, GByteArray *mac, NMDevice *device)
{
NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
GHashTableIter iter;
gpointer data;
NMSettingConnection *s_con;
NMSettingWired *s_wired;
+ NMSettingInfiniband *s_infiniband;
const GByteArray *setting_mac;
gboolean ret = FALSE;
@@ -1189,16 +1297,27 @@ have_connection_for_device (NMSettings *self, GByteArray *mac)
g_hash_table_iter_init (&iter, priv->connections);
while (g_hash_table_iter_next (&iter, NULL, &data)) {
NMConnection *connection = NM_CONNECTION (data);
- const char *ctype;
+ const char *ctype, *iface;
s_con = nm_connection_get_setting_connection (connection);
ctype = nm_setting_connection_get_connection_type (s_con);
+ iface = nm_connection_get_virtual_iface_name (connection);
+ if (iface) {
+ if (!strcmp (iface, nm_device_get_iface (device))) {
+ ret = TRUE;
+ break;
+ } else
+ continue;
+ }
+
if ( strcmp (ctype, NM_SETTING_WIRED_SETTING_NAME)
+ && strcmp (ctype, NM_SETTING_INFINIBAND_SETTING_NAME)
&& strcmp (ctype, NM_SETTING_PPPOE_SETTING_NAME))
continue;
s_wired = nm_connection_get_setting_wired (connection);
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
/* No wired setting; therefore the PPPoE connection applies to any device */
if (!s_wired && !strcmp (ctype, NM_SETTING_PPPOE_SETTING_NAME)) {
@@ -1206,10 +1325,15 @@ have_connection_for_device (NMSettings *self, GByteArray *mac)
break;
}
- setting_mac = nm_setting_wired_get_mac_address (s_wired);
+ g_assert (s_wired != NULL || s_infiniband != NULL);
+
+ setting_mac = s_wired ?
+ nm_setting_wired_get_mac_address (s_wired) :
+ nm_setting_infiniband_get_mac_address (s_infiniband);
if (setting_mac) {
/* A connection mac-locked to this device */
- if (!memcmp (setting_mac->data, mac->data, ETH_ALEN)) {
+ if (mac->len == setting_mac->len &&
+ !memcmp (setting_mac->data, mac->data, mac->len)) {
ret = TRUE;
break;
}
@@ -1225,7 +1349,7 @@ have_connection_for_device (NMSettings *self, GByteArray *mac)
/* Search through the list of blacklisted MAC addresses in the config file. */
static gboolean
-is_mac_auto_wired_blacklisted (NMSettings *self, const GByteArray *mac)
+is_mac_auto_wired_blacklisted (NMSettings *self, const GByteArray *mac, int hwaddr_type)
{
NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
GKeyFile *config;
@@ -1249,15 +1373,15 @@ is_mac_auto_wired_blacklisted (NMSettings *self, const GByteArray *mac)
list = g_key_file_get_string_list (config, "main", CONFIG_KEY_NO_AUTO_DEFAULT, NULL, NULL);
for (iter = list; iter && *iter; iter++) {
- struct ether_addr *candidate;
+ guint8 *candidate, buffer[NM_UTILS_HWADDR_LEN_MAX];
- if (strcmp(g_strstrip(*iter), "*") == 0) {
+ if (strcmp (g_strstrip (*iter), "*") == 0) {
found = TRUE;
break;
}
- candidate = ether_aton (*iter);
- if (candidate && !memcmp (mac->data, candidate->ether_addr_octet, ETH_ALEN)) {
+ candidate = nm_utils_hwaddr_aton (*iter, hwaddr_type, buffer);
+ if (candidate && !memcmp (mac->data, candidate, mac->len)) {
found = TRUE;
break;
}
@@ -1280,6 +1404,7 @@ default_wired_deleted (NMDefaultWiredConnection *wired,
{
NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
NMSettingConnection *s_con;
+ int hwaddr_type;
char *tmp;
GKeyFile *config;
char **list, **iter, **updated;
@@ -1297,8 +1422,7 @@ default_wired_deleted (NMDefaultWiredConnection *wired,
* connection for that device again.
*/
- s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (wired),
- NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (NM_CONNECTION (wired));
g_assert (s_con);
/* Ignore removals of read-only connections, since they couldn't have
@@ -1311,20 +1435,27 @@ default_wired_deleted (NMDefaultWiredConnection *wired,
if (!config)
goto cleanup;
+ if (nm_connection_get_setting_wired (NM_CONNECTION (wired)))
+ hwaddr_type = ARPHRD_ETHER;
+ else if (nm_connection_get_setting_infiniband (NM_CONNECTION (wired)))
+ hwaddr_type = ARPHRD_INFINIBAND;
+ else
+ goto cleanup;
+
g_key_file_set_list_separator (config, ',');
g_key_file_load_from_file (config, priv->config_file, G_KEY_FILE_KEEP_COMMENTS, NULL);
list = g_key_file_get_string_list (config, "main", CONFIG_KEY_NO_AUTO_DEFAULT, &len, NULL);
for (iter = list; iter && *iter; iter++) {
- struct ether_addr *candidate;
+ guint8 *candidate, buffer[NM_UTILS_HWADDR_LEN_MAX];
- if (strcmp(g_strstrip(*iter), "*") == 0) {
+ if (strcmp (g_strstrip (*iter), "*") == 0) {
found = TRUE;
break;
}
- candidate = ether_aton (*iter);
- if (candidate && !memcmp (mac->data, candidate->ether_addr_octet, ETH_ALEN)) {
+ candidate = nm_utils_hwaddr_aton (*iter, hwaddr_type, buffer);
+ if (candidate && !memcmp (mac->data, candidate, mac->len)) {
found = TRUE;
break;
}
@@ -1332,9 +1463,7 @@ default_wired_deleted (NMDefaultWiredConnection *wired,
/* Add this device's MAC to the list */
if (!found) {
- tmp = g_strdup_printf ("%02x:%02x:%02x:%02x:%02x:%02x",
- mac->data[0], mac->data[1], mac->data[2],
- mac->data[3], mac->data[4], mac->data[5]);
+ tmp = nm_utils_hwaddr_ntoa (mac->data, hwaddr_type);
/* New list; size + 1 for the new element, + 1 again for ending NULL */
updated = g_malloc0 (sizeof (char*) * (len + 2));
@@ -1424,13 +1553,14 @@ nm_settings_device_added (NMSettings *self, NMDevice *device)
{
NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
GByteArray *mac = NULL;
- struct ether_addr tmp;
+ const guint8 *hwaddr;
+ int hwaddr_type;
NMDefaultWiredConnection *wired;
gboolean read_only = TRUE;
const char *id;
char *defname;
- if (nm_device_get_device_type (device) != NM_DEVICE_TYPE_ETHERNET)
+ if (!NM_IS_DEVICE_WIRED (device))
return;
/* If the device isn't managed or it already has a default wired connection,
@@ -1440,13 +1570,14 @@ nm_settings_device_added (NMSettings *self, NMDevice *device)
|| g_object_get_data (G_OBJECT (device), DEFAULT_WIRED_TAG))
return;
- nm_device_ethernet_get_address (NM_DEVICE_ETHERNET (device), &tmp);
+ hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device));
+ hwaddr_type = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (device));
- mac = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (mac, tmp.ether_addr_octet, ETH_ALEN);
+ mac = g_byte_array_new ();
+ g_byte_array_append (mac, hwaddr, nm_utils_hwaddr_len (hwaddr_type));
- if ( have_connection_for_device (self, mac)
- || is_mac_auto_wired_blacklisted (self, mac))
+ if ( have_connection_for_device (self, mac, device)
+ || is_mac_auto_wired_blacklisted (self, mac, hwaddr_type))
goto ignore;
if (get_plugin (self, NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS))
@@ -1480,7 +1611,7 @@ nm_settings_device_removed (NMSettings *self, NMDevice *device)
{
NMDefaultWiredConnection *connection;
- if (nm_device_get_device_type (device) != NM_DEVICE_TYPE_ETHERNET)
+ if (!NM_IS_DEVICE_WIRED (device))
return;
connection = (NMDefaultWiredConnection *) g_object_get_data (G_OBJECT (device), DEFAULT_WIRED_TAG);
@@ -1518,7 +1649,7 @@ nm_settings_new (const char *config_file,
}
/* Add the keyfile plugin last */
- keyfile_plugin = nm_settings_keyfile_plugin_new ();
+ keyfile_plugin = nm_settings_keyfile_plugin_new (config_file);
g_assert (keyfile_plugin);
add_plugin (self, NM_SYSTEM_CONFIG_INTERFACE (keyfile_plugin));
diff --git a/src/settings/nm-settings.h b/src/settings/nm-settings.h
index 77485e19f..9a02f8feb 100644
--- a/src/settings/nm-settings.h
+++ b/src/settings/nm-settings.h
@@ -108,6 +108,9 @@ GSList *nm_settings_get_connections (NMSettings *settings);
NMSettingsConnection *nm_settings_get_connection_by_path (NMSettings *settings,
const char *path);
+NMSettingsConnection *nm_settings_get_connection_by_uuid (NMSettings *settings,
+ const char *uuid);
+
const GSList *nm_settings_get_unmanaged_specs (NMSettings *self);
char *nm_settings_get_hostname (NMSettings *self);
diff --git a/src/settings/nm-system-config-interface.h b/src/settings/nm-system-config-interface.h
index 96a640619..bbe74d492 100644
--- a/src/settings/nm-system-config-interface.h
+++ b/src/settings/nm-system-config-interface.h
@@ -39,7 +39,7 @@ G_BEGIN_DECLS
/* Plugin's factory function that returns a GObject that implements
* NMSystemConfigInterface.
*/
-GObject * nm_system_config_factory (void);
+GObject * nm_system_config_factory (const char *config_file);
#define NM_TYPE_SYSTEM_CONFIG_INTERFACE (nm_system_config_interface_get_type ())
#define NM_SYSTEM_CONFIG_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SYSTEM_CONFIG_INTERFACE, NMSystemConfigInterface))
diff --git a/src/settings/plugins/Makefile.in b/src/settings/plugins/Makefile.in
index 7c9c87841..0997f4452 100644
--- a/src/settings/plugins/Makefile.in
+++ b/src/settings/plugins/Makefile.in
@@ -152,6 +152,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -206,11 +208,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -221,6 +227,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -260,6 +267,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/src/settings/plugins/ifcfg-rh/Makefile.am b/src/settings/plugins/ifcfg-rh/Makefile.am
index 9874d352b..8b5b0f24b 100644
--- a/src/settings/plugins/ifcfg-rh/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/Makefile.am
@@ -23,11 +23,12 @@ libifcfg_rh_io_la_SOURCES = \
utils.h
INCLUDES = \
+ -I$(top_srcdir)/src/wifi \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-glib \
- -I$(top_srcdir)/libnm-util \
- -I$(top_builddir)/marshallers
+ -I$(top_srcdir)/libnm-util
libifcfg_rh_io_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
@@ -38,6 +39,7 @@ libifcfg_rh_io_la_CPPFLAGS = \
-DSBINDIR=\"$(sbindir)\"
libifcfg_rh_io_la_LIBADD = \
+ $(top_builddir)/src/wifi/libwifi-utils.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(GLIB_LIBS) \
$(NSS_LIBS)
@@ -59,7 +61,6 @@ libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version
libnm_settings_plugin_ifcfg_rh_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/libnm-glib/libnm-glib.la \
- $(top_builddir)/marshallers/libmarshallers.la \
libifcfg-rh-io.la \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
diff --git a/src/settings/plugins/ifcfg-rh/Makefile.in b/src/settings/plugins/ifcfg-rh/Makefile.in
index 79b66b2d0..3325c7e86 100644
--- a/src/settings/plugins/ifcfg-rh/Makefile.in
+++ b/src/settings/plugins/ifcfg-rh/Makefile.in
@@ -81,6 +81,7 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" \
LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libifcfg_rh_io_la_DEPENDENCIES = \
+ $(top_builddir)/src/wifi/libwifi-utils.la \
$(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_libifcfg_rh_io_la_OBJECTS = libifcfg_rh_io_la-shvar.lo \
@@ -92,9 +93,8 @@ am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
libnm_settings_plugin_ifcfg_rh_la_DEPENDENCIES = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/libnm-glib/libnm-glib.la \
- $(top_builddir)/marshallers/libmarshallers.la \
- libifcfg-rh-io.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libnm-glib/libnm-glib.la libifcfg-rh-io.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_libnm_settings_plugin_ifcfg_rh_la_OBJECTS = \
libnm_settings_plugin_ifcfg_rh_la-plugin.lo \
@@ -222,6 +222,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -276,11 +278,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -291,6 +297,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -330,6 +337,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -412,11 +421,12 @@ libifcfg_rh_io_la_SOURCES = \
utils.h
INCLUDES = \
+ -I$(top_srcdir)/src/wifi \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-glib \
- -I$(top_srcdir)/libnm-util \
- -I$(top_builddir)/marshallers
+ -I$(top_srcdir)/libnm-util
libifcfg_rh_io_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
@@ -427,6 +437,7 @@ libifcfg_rh_io_la_CPPFLAGS = \
-DSBINDIR=\"$(sbindir)\"
libifcfg_rh_io_la_LIBADD = \
+ $(top_builddir)/src/wifi/libwifi-utils.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(GLIB_LIBS) \
$(NSS_LIBS)
@@ -448,7 +459,6 @@ libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version
libnm_settings_plugin_ifcfg_rh_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/libnm-glib/libnm-glib.la \
- $(top_builddir)/marshallers/libmarshallers.la \
libifcfg-rh-io.la \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
diff --git a/src/settings/plugins/ifcfg-rh/common.h b/src/settings/plugins/ifcfg-rh/common.h
index 74a77c4c4..fc8ce22a5 100644
--- a/src/settings/plugins/ifcfg-rh/common.h
+++ b/src/settings/plugins/ifcfg-rh/common.h
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2008 - 2010 Red Hat, Inc.
+ * (C) Copyright 2008 - 2011 Red Hat, Inc.
*/
#ifndef __COMMON_H__
@@ -41,9 +41,12 @@
#define IFCFG_PLUGIN_NAME "ifcfg-rh"
#define IFCFG_PLUGIN_INFO "(c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list."
-#define TYPE_ETHERNET "Ethernet"
-#define TYPE_WIRELESS "Wireless"
-#define TYPE_BRIDGE "Bridge"
+#define TYPE_ETHERNET "Ethernet"
+#define TYPE_WIRELESS "Wireless"
+#define TYPE_INFINIBAND "InfiniBand"
+#define TYPE_BRIDGE "Bridge"
+#define TYPE_BOND "Bond"
+#define TYPE_VLAN "Vlan"
#define SECRET_FLAG_AGENT "user"
#define SECRET_FLAG_NOT_SAVED "ask"
diff --git a/src/settings/plugins/ifcfg-rh/plugin.c b/src/settings/plugins/ifcfg-rh/plugin.c
index b4be4cbaf..04d5463cd 100644
--- a/src/settings/plugins/ifcfg-rh/plugin.c
+++ b/src/settings/plugins/ifcfg-rh/plugin.c
@@ -569,7 +569,7 @@ impl_ifcfgrh_get_ifcfg_details (SCPluginIfcfg *plugin,
return FALSE;
}
- s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (NM_CONNECTION (connection));
if (!s_con) {
g_set_error (error,
NM_SETTINGS_ERROR,
@@ -790,7 +790,7 @@ system_config_interface_init (NMSystemConfigInterface *system_config_interface_c
}
G_MODULE_EXPORT GObject *
-nm_system_config_factory (void)
+nm_system_config_factory (const char *config_file)
{
static SCPluginIfcfg *singleton = NULL;
SCPluginIfcfgPrivate *priv;
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
index 910cca358..01d83c1b2 100644
--- a/src/settings/plugins/ifcfg-rh/reader.c
+++ b/src/settings/plugins/ifcfg-rh/reader.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2008 - 2011 Red Hat, Inc.
+ * Copyright (C) 2008 - 2012 Red Hat, Inc.
*/
#include <config.h>
@@ -33,25 +33,22 @@
#include <netinet/ether.h>
#include <linux/if.h>
-#ifndef __user
-#define __user
-#endif
-#include <linux/types.h>
-#include <wireless.h>
-#undef __user
-
#include <glib.h>
#include <glib/gi18n.h>
#include <nm-connection.h>
#include <NetworkManager.h>
#include <nm-setting-connection.h>
#include <nm-setting-ip4-config.h>
+#include <nm-setting-vlan.h>
#include <nm-setting-ip6-config.h>
#include <nm-setting-wired.h>
#include <nm-setting-wireless.h>
#include <nm-setting-8021x.h>
+#include <nm-setting-bond.h>
#include <nm-utils.h>
+#include "wifi-utils.h"
+
#include "common.h"
#include "shvar.h"
#include "utils.h"
@@ -77,16 +74,46 @@ get_int (const char *str, int *value)
return TRUE;
}
+static char *
+make_connection_name (shvarFile *ifcfg,
+ const char *ifcfg_name,
+ const char *suggested,
+ const char *prefix)
+{
+ char *full_name = NULL, *name;
+
+ /* If the ifcfg file already has a NAME, always use that */
+ name = svGetValue (ifcfg, "NAME", FALSE);
+ if (name && strlen (name))
+ return name;
+
+ /* Otherwise construct a new NAME */
+ g_free (name);
+ if (!prefix)
+ prefix = _("System");
+
+ /* For cosmetic reasons, if the suggested name is the same as
+ * the ifcfg files name, don't use it. Mainly for wifi so that
+ * the SSID is shown in the connection ID instead of just "wlan0".
+ */
+ if (suggested && strcmp (ifcfg_name, suggested))
+ full_name = g_strdup_printf ("%s %s (%s)", prefix, suggested, ifcfg_name);
+ else
+ full_name = g_strdup_printf ("%s %s", prefix, ifcfg_name);
+
+ return full_name;
+}
+
static NMSetting *
make_connection_setting (const char *file,
shvarFile *ifcfg,
const char *type,
- const char *suggested)
+ const char *suggested,
+ const char *prefix)
{
NMSettingConnection *s_con;
const char *ifcfg_name = NULL;
- char *new_id = NULL, *uuid = NULL, *value;
- char *ifcfg_id;
+ char *new_id, *uuid = NULL, *zone = NULL, *value;
ifcfg_name = utils_get_ifcfg_name (file, TRUE);
if (!ifcfg_name)
@@ -94,32 +121,9 @@ make_connection_setting (const char *file,
s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
- /* Try the ifcfg file's internally defined name if available */
- ifcfg_id = svGetValue (ifcfg, "NAME", FALSE);
- if (ifcfg_id && strlen (ifcfg_id))
- g_object_set (s_con, NM_SETTING_CONNECTION_ID, ifcfg_id, NULL);
-
- if (!nm_setting_connection_get_id (s_con)) {
- if (suggested) {
- /* For cosmetic reasons, if the suggested name is the same as
- * the ifcfg files name, don't use it. Mainly for wifi so that
- * the SSID is shown in the connection ID instead of just "wlan0".
- */
- if (strcmp (ifcfg_name, suggested)) {
- new_id = g_strdup_printf ("%s %s (%s)", reader_get_prefix (), suggested, ifcfg_name);
- g_object_set (s_con, NM_SETTING_CONNECTION_ID, new_id, NULL);
- }
- }
-
- /* Use the ifcfg file's name as a last resort */
- if (!nm_setting_connection_get_id (s_con)) {
- new_id = g_strdup_printf ("%s %s", reader_get_prefix (), ifcfg_name);
- g_object_set (s_con, NM_SETTING_CONNECTION_ID, new_id, NULL);
- }
- }
-
+ new_id = make_connection_name (ifcfg, ifcfg_name, suggested, prefix);
+ g_object_set (s_con, NM_SETTING_CONNECTION_ID, new_id, NULL);
g_free (new_id);
- g_free (ifcfg_id);
/* Try for a UUID key before falling back to hashing the file name */
uuid = svGetValue (ifcfg, "UUID", FALSE);
@@ -127,6 +131,7 @@ make_connection_setting (const char *file,
g_free (uuid);
uuid = nm_utils_uuid_generate_from_string (ifcfg->fileName);
}
+
g_object_set (s_con,
NM_SETTING_CONNECTION_TYPE, type,
NM_SETTING_CONNECTION_UUID, uuid,
@@ -153,14 +158,23 @@ make_connection_setting (const char *file,
g_strfreev (items);
}
+
+ zone = svGetValue(ifcfg, "ZONE", FALSE);
+ if (!zone || !strlen (zone)) {
+ g_free (zone);
+ zone = NULL;
+ }
+ g_object_set (s_con, NM_SETTING_CONNECTION_ZONE, zone, NULL);
+ g_free (zone);
+
return NM_SETTING (s_con);
}
static gboolean
-read_mac_address (shvarFile *ifcfg, const char *key, GByteArray **array, GError **error)
+read_mac_address (shvarFile *ifcfg, const char *key, int type,
+ GByteArray **array, GError **error)
{
char *value = NULL;
- struct ether_addr *mac;
g_return_val_if_fail (ifcfg != NULL, FALSE);
g_return_val_if_fail (array != NULL, FALSE);
@@ -174,8 +188,8 @@ read_mac_address (shvarFile *ifcfg, const char *key, GByteArray **array, GError
return TRUE;
}
- mac = ether_aton (value);
- if (!mac) {
+ *array = nm_utils_hwaddr_atoba (value, type);
+ if (!*array) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"%s: the MAC address '%s' was invalid.", key, value);
g_free (value);
@@ -183,8 +197,6 @@ read_mac_address (shvarFile *ifcfg, const char *key, GByteArray **array, GError
}
g_free (value);
- *array = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (*array, (guint8 *) mac->ether_addr_octet, ETH_ALEN);
return TRUE;
}
@@ -266,7 +278,7 @@ fill_ip4_setting_from_ibft (shvarFile *ifcfg,
goto done;
}
- if (!read_mac_address (ifcfg, "HWADDR", &ifcfg_mac, error))
+ if (!read_mac_address (ifcfg, "HWADDR", ARPHRD_ETHER, &ifcfg_mac, error))
goto done;
/* Ensure we got a MAC */
if (!ifcfg_mac) {
@@ -627,7 +639,6 @@ read_one_ip4_route (shvarFile *ifcfg,
g_return_val_if_fail (ifcfg != NULL, NULL);
g_return_val_if_fail (network_file != NULL, NULL);
- g_return_val_if_fail (which >= 0, NULL);
route = nm_ip4_route_new ();
@@ -1115,7 +1126,7 @@ static NMSetting *
make_ip4_setting (shvarFile *ifcfg,
const char *network_file,
const char *iscsiadm_path,
- gboolean valid_ip6_config,
+ gboolean can_disable_ip4,
GError **error)
{
NMSettingIP4Config *s_ip4 = NULL;
@@ -1230,7 +1241,7 @@ make_ip4_setting (shvarFile *ifcfg,
&& !tmp_ip4_0 && !tmp_prefix_0 && !tmp_netmask_0
&& !tmp_ip4_1 && !tmp_prefix_1 && !tmp_netmask_1
&& !tmp_ip4_2 && !tmp_prefix_2 && !tmp_netmask_2) {
- if (valid_ip6_config)
+ if (can_disable_ip4)
/* Nope, no IPv4 */
method = NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
else
@@ -1255,7 +1266,7 @@ make_ip4_setting (shvarFile *ifcfg,
NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS, !svTrueValue (ifcfg, "PEERDNS", TRUE),
NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, !svTrueValue (ifcfg, "PEERROUTES", TRUE),
NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, never_default,
- NM_SETTING_IP4_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV4_FAILURE_FATAL", TRUE),
+ NM_SETTING_IP4_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV4_FAILURE_FATAL", FALSE),
NULL);
if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0)
@@ -1424,6 +1435,9 @@ make_ip6_setting (shvarFile *ifcfg,
guint32 i;
shvarFile *network_ifcfg;
gboolean never_default = FALSE, tmp_success;
+ gboolean ip6_privacy, ip6_privacy_prefer_public_ip;
+ char *ip6_privacy_str;
+ NMSettingIP6ConfigPrivacy ip6_privacy_val;
s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
if (!s_ip6) {
@@ -1510,12 +1524,29 @@ make_ip6_setting (shvarFile *ifcfg,
}
/* TODO - handle other methods */
+ /* Read IPv6 Privacy Extensions configuration */
+ ip6_privacy_str = svGetValue (ifcfg, "IPV6_PRIVACY", FALSE);
+ if (ip6_privacy_str) {
+ ip6_privacy = svTrueValue (ifcfg, "IPV6_PRIVACY", FALSE);
+ if (!ip6_privacy)
+ ip6_privacy = g_strcmp0 (ip6_privacy_str, "rfc4941") == 0 ||
+ g_strcmp0 (ip6_privacy_str, "rfc3041") == 0;
+ }
+ ip6_privacy_prefer_public_ip = svTrueValue (ifcfg, "IPV6_PRIVACY_PREFER_PUBLIC_IP", FALSE);
+ ip6_privacy_val = ip6_privacy_str ?
+ (ip6_privacy ?
+ (ip6_privacy_prefer_public_ip ? NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR : NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR) :
+ NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED) :
+ NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN;
+ g_free (ip6_privacy_str);
+
g_object_set (s_ip6,
NM_SETTING_IP6_CONFIG_METHOD, method,
NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS, !svTrueValue (ifcfg, "IPV6_PEERDNS", TRUE),
NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES, !svTrueValue (ifcfg, "IPV6_PEERROUTES", TRUE),
NM_SETTING_IP6_CONFIG_NEVER_DEFAULT, never_default,
NM_SETTING_IP6_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV6_FAILURE_FATAL", FALSE),
+ NM_SETTING_IP6_CONFIG_IP6_PRIVACY, ip6_privacy_val,
NULL);
/* Don't bother to read IP, DNS and routes when IPv6 is disabled */
@@ -1926,6 +1957,7 @@ parse_wpa_psk (shvarFile *ifcfg,
{
shvarFile *keys_ifcfg;
char *psk = NULL, *p, *hashed = NULL;
+ size_t plen;
gboolean quoted = FALSE;
/* Passphrase must be between 10 and 66 characters in length because WPA
@@ -1949,8 +1981,10 @@ parse_wpa_psk (shvarFile *ifcfg,
return NULL;
p = psk;
+ plen = strlen (p);
- if (p[0] == '"' && psk[strlen (psk) - 1] == '"')
+ if ( (plen >= 2 && (p[0] == '"' || p[0] == '\'') && p[0] == p[plen - 1])
+ || (plen >= 3 && p[0] == '$' && p[1] == '\'' && p[1] == p[plen - 1]))
quoted = TRUE;
if (!quoted && (strlen (psk) == 64)) {
@@ -1970,21 +2004,18 @@ parse_wpa_psk (shvarFile *ifcfg,
* and between 8 and 63 characters as a passphrase.
*/
- if (quoted) {
- /* Get rid of the quotes */
- p++;
- p[strlen (p) - 1] = '\0';
- }
+ /* Get rid of the quotes */
+ hashed = utils_single_unquote_string (p);
/* Length check */
- if (strlen (p) < 8 || strlen (p) > 63) {
+ if (strlen (hashed) < 8 || strlen (hashed) > 63) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Invalid WPA_PSK (passphrases must be between "
"8 and 63 characters long (inclusive))");
+ g_free (hashed);
+ hashed = NULL;
goto out;
}
-
- hashed = g_strdup (p);
}
if (!hashed) {
@@ -2045,18 +2076,18 @@ eap_simple_reader (const char *eap_method,
}
static char *
-get_cert_file (const char *ifcfg_path, const char *cert_path)
+get_full_file_path (const char *ifcfg_path, const char *file_path)
{
- const char *base = cert_path;
+ const char *base = file_path;
char *p, *ret, *dirname;
g_return_val_if_fail (ifcfg_path != NULL, NULL);
- g_return_val_if_fail (cert_path != NULL, NULL);
+ g_return_val_if_fail (file_path != NULL, NULL);
- if (cert_path[0] == '/')
- return g_strdup (cert_path);
+ if (file_path[0] == '/')
+ return g_strdup (file_path);
- p = strrchr (cert_path, '/');
+ p = strrchr (file_path, '/');
if (p)
base = p + 1;
@@ -2102,7 +2133,7 @@ eap_tls_reader (const char *eap_method,
ca_cert = svGetValue (ifcfg, ca_cert_key, FALSE);
if (ca_cert) {
- real_path = get_cert_file (ifcfg->fileName, ca_cert);
+ real_path = get_full_file_path (ifcfg->fileName, ca_cert);
if (phase2) {
if (!nm_setting_802_1x_set_phase2_ca_cert (s_8021x,
real_path,
@@ -2159,7 +2190,7 @@ eap_tls_reader (const char *eap_method,
goto done;
}
- real_path = get_cert_file (ifcfg->fileName, privkey);
+ real_path = get_full_file_path (ifcfg->fileName, privkey);
if (phase2) {
if (!nm_setting_802_1x_set_phase2_private_key (s_8021x,
real_path,
@@ -2196,7 +2227,7 @@ eap_tls_reader (const char *eap_method,
goto done;
}
- real_path = get_cert_file (ifcfg->fileName, client_cert);
+ real_path = get_full_file_path (ifcfg->fileName, client_cert);
if (phase2) {
if (!nm_setting_802_1x_set_phase2_client_cert (s_8021x,
real_path,
@@ -2246,7 +2277,7 @@ eap_peap_reader (const char *eap_method,
ca_cert = svGetValue (ifcfg, "IEEE_8021X_CA_CERT", FALSE);
if (ca_cert) {
- real_cert_path = get_cert_file (ifcfg->fileName, ca_cert);
+ real_cert_path = get_full_file_path (ifcfg->fileName, ca_cert);
if (!nm_setting_802_1x_set_ca_cert (s_8021x,
real_cert_path,
NM_SETTING_802_1X_CK_SCHEME_PATH,
@@ -2352,7 +2383,7 @@ eap_ttls_reader (const char *eap_method,
ca_cert = svGetValue (ifcfg, "IEEE_8021X_CA_CERT", FALSE);
if (ca_cert) {
- real_cert_path = get_cert_file (ifcfg->fileName, ca_cert);
+ real_cert_path = get_full_file_path (ifcfg->fileName, ca_cert);
if (!nm_setting_802_1x_set_ca_cert (s_8021x,
real_cert_path,
NM_SETTING_802_1X_CK_SCHEME_PATH,
@@ -2422,6 +2453,111 @@ done:
return success;
}
+static gboolean
+eap_fast_reader (const char *eap_method,
+ shvarFile *ifcfg,
+ shvarFile *keys,
+ NMSetting8021x *s_8021x,
+ gboolean phase2,
+ GError **error)
+{
+ char *anon_ident = NULL;
+ char *pac_file = NULL;
+ char *real_pac_path = NULL;
+ char *inner_auth = NULL;
+ char *fast_provisioning = NULL;
+ char *lower;
+ char **list = NULL, **iter;
+ const char* pac_prov_str;
+ gboolean allow_unauth = FALSE, allow_auth = FALSE;
+ gboolean success = FALSE;
+
+ pac_file = svGetValue (ifcfg, "IEEE_8021X_PAC_FILE", FALSE);
+ if (pac_file) {
+ real_pac_path = get_full_file_path (ifcfg->fileName, pac_file);
+ g_object_set (s_8021x, NM_SETTING_802_1X_PAC_FILE, real_pac_path, NULL);
+ }
+
+ fast_provisioning = svGetValue (ifcfg, "IEEE_8021X_FAST_PROVISIONING", FALSE);
+ if (fast_provisioning) {
+ list = g_strsplit_set (fast_provisioning, " \t", 0);
+ for (iter = list; iter && *iter; iter++) {
+ if (**iter == '\0')
+ continue;
+ if (strcmp (*iter, "allow-unauth") == 0)
+ allow_unauth = TRUE;
+ else if (strcmp (*iter, "allow-auth") == 0)
+ allow_auth = TRUE;
+ else {
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid IEEE_8021X_FAST_PROVISIONING '%s' "
+ "(space-separated list of these values [allow-auth, allow-unauth] expected)",
+ *iter);
+ }
+ }
+ g_strfreev (list);
+ list = NULL;
+ }
+ pac_prov_str = allow_unauth ? (allow_auth ? "3" : "1") : (allow_auth ? "2" : "0");
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING, pac_prov_str, NULL);
+
+ if (!pac_file && !(allow_unauth || allow_auth)) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "IEEE_8021X_PAC_FILE not provided and EAP-FAST automatic PAC provisioning disabled.");
+ goto done;
+ }
+
+ anon_ident = svGetValue (ifcfg, "IEEE_8021X_ANON_IDENTITY", FALSE);
+ if (anon_ident && strlen (anon_ident))
+ g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, anon_ident, NULL);
+
+ inner_auth = svGetValue (ifcfg, "IEEE_8021X_INNER_AUTH_METHODS", FALSE);
+ if (!inner_auth) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Missing IEEE_8021X_INNER_AUTH_METHODS.");
+ goto done;
+ }
+
+ /* Handle options for the inner auth method */
+ list = g_strsplit (inner_auth, " ", 0);
+ for (iter = list; iter && *iter; iter++) {
+ if (!strlen (*iter))
+ continue;
+
+ if ( !strcmp (*iter, "MSCHAPV2")
+ || !strcmp (*iter, "GTC")) {
+ if (!eap_simple_reader (*iter, ifcfg, keys, s_8021x, TRUE, error))
+ goto done;
+ } else {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Unknown IEEE_8021X_INNER_AUTH_METHOD '%s'.",
+ *iter);
+ goto done;
+ }
+
+ lower = g_ascii_strdown (*iter, -1);
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, lower, NULL);
+ g_free (lower);
+ break;
+ }
+
+ if (!nm_setting_802_1x_get_phase2_auth (s_8021x)) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "No valid IEEE_8021X_INNER_AUTH_METHODS found.");
+ goto done;
+ }
+
+ success = TRUE;
+
+done:
+ g_strfreev (list);
+ g_free (inner_auth);
+ g_free (fast_provisioning);
+ g_free (real_pac_path);
+ g_free (pac_file);
+ g_free (anon_ident);
+ return success;
+}
+
typedef struct {
const char *method;
gboolean (*reader)(const char *eap_method,
@@ -2443,6 +2579,7 @@ static EAPReader eap_readers[] = {
{ "tls", eap_tls_reader, FALSE },
{ "peap", eap_peap_reader, FALSE },
{ "ttls", eap_ttls_reader, FALSE },
+ { "fast", eap_fast_reader, FALSE },
{ NULL, NULL }
};
@@ -2749,7 +2886,7 @@ make_wireless_setting (shvarFile *ifcfg,
s_wireless = NM_SETTING_WIRELESS (nm_setting_wireless_new ());
- if (read_mac_address (ifcfg, "HWADDR", &array, error)) {
+ if (read_mac_address (ifcfg, "HWADDR", ARPHRD_ETHER, &array, error)) {
if (array) {
g_object_set (s_wireless, NM_SETTING_WIRELESS_MAC_ADDRESS, array, NULL);
@@ -2773,7 +2910,7 @@ make_wireless_setting (shvarFile *ifcfg,
}
array = NULL;
- if (read_mac_address (ifcfg, "MACADDR", &array, error)) {
+ if (read_mac_address (ifcfg, "MACADDR", ARPHRD_ETHER, &array, error)) {
if (array) {
g_object_set (s_wireless, NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS, array, NULL);
g_byte_array_free (array, TRUE);
@@ -2901,19 +3038,16 @@ make_wireless_setting (shvarFile *ifcfg,
value = svGetValue (ifcfg, "BSSID", FALSE);
if (value) {
- struct ether_addr *eth;
GByteArray *bssid;
- eth = ether_aton (value);
- if (!eth) {
+ bssid = nm_utils_hwaddr_atoba (value, ARPHRD_ETHER);
+ if (!bssid) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Invalid BSSID '%s'", value);
g_free (value);
goto error;
}
- bssid = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (bssid, eth->ether_addr_octet, ETH_ALEN);
g_object_set (s_wireless, NM_SETTING_WIRELESS_BSSID, bssid, NULL);
g_byte_array_free (bssid, TRUE);
g_free (value);
@@ -3032,7 +3166,7 @@ wireless_connection_from_ifcfg (const char *file,
/* Connection */
con_setting = make_connection_setting (file, ifcfg,
NM_SETTING_WIRELESS_SETTING_NAME,
- printable_ssid);
+ printable_ssid, NULL);
g_free (printable_ssid);
if (!con_setting) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
@@ -3082,7 +3216,7 @@ make_wired_setting (shvarFile *ifcfg,
g_free (value);
}
- if (read_mac_address (ifcfg, "HWADDR", &mac, error)) {
+ if (read_mac_address (ifcfg, "HWADDR", ARPHRD_ETHER, &mac, error)) {
if (mac) {
g_object_set (s_wired, NM_SETTING_WIRED_MAC_ADDRESS, mac, NULL);
@@ -3193,7 +3327,7 @@ make_wired_setting (shvarFile *ifcfg,
}
mac = NULL;
- if (read_mac_address (ifcfg, "MACADDR", &mac, error)) {
+ if (read_mac_address (ifcfg, "MACADDR", ARPHRD_ETHER, &mac, error)) {
if (mac) {
g_object_set (s_wired, NM_SETTING_WIRED_CLONED_MAC_ADDRESS, mac, NULL);
g_byte_array_free (mac, TRUE);
@@ -3260,6 +3394,7 @@ wired_connection_from_ifcfg (const char *file,
NMSetting *con_setting = NULL;
NMSetting *wired_setting = NULL;
NMSetting8021x *s_8021x = NULL;
+ char *value;
g_return_val_if_fail (file != NULL, NULL);
g_return_val_if_fail (ifcfg != NULL, NULL);
@@ -3271,7 +3406,7 @@ wired_connection_from_ifcfg (const char *file,
return NULL;
}
- con_setting = make_connection_setting (file, ifcfg, NM_SETTING_WIRED_SETTING_NAME, NULL);
+ con_setting = make_connection_setting (file, ifcfg, NM_SETTING_WIRED_SETTING_NAME, NULL, NULL);
if (!con_setting) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Failed to create connection setting.");
@@ -3280,6 +3415,238 @@ wired_connection_from_ifcfg (const char *file,
}
nm_connection_add_setting (connection, con_setting);
+ /* Might be a bond slave; handle master device or connection */
+ value = svGetValue (ifcfg, "MASTER", FALSE);
+ if (value) {
+ g_object_set (con_setting, NM_SETTING_CONNECTION_MASTER, value, NULL);
+ g_object_set (con_setting,
+ NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BOND_SETTING_NAME,
+ NULL);
+ g_free (value);
+ }
+
+ wired_setting = make_wired_setting (ifcfg, file, nm_controlled, unmanaged, &s_8021x, error);
+ if (!wired_setting) {
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, wired_setting);
+
+ if (s_8021x)
+ nm_connection_add_setting (connection, NM_SETTING (s_8021x));
+
+ if (!nm_connection_verify (connection, error)) {
+ g_object_unref (connection);
+ return NULL;
+ }
+
+ return connection;
+}
+
+static NMSetting *
+make_infiniband_setting (shvarFile *ifcfg,
+ const char *file,
+ gboolean nm_controlled,
+ char **unmanaged,
+ GError **error)
+{
+ NMSettingInfiniband *s_infiniband;
+ char *value = NULL;
+ GByteArray *mac = NULL;
+ int mtu;
+
+ s_infiniband = NM_SETTING_INFINIBAND (nm_setting_infiniband_new ());
+
+ value = svGetValue (ifcfg, "MTU", FALSE);
+ if (value) {
+ if (get_int (value, &mtu)) {
+ if (mtu >= 0 && mtu < 65536)
+ g_object_set (s_infiniband, NM_SETTING_INFINIBAND_MTU, mtu, NULL);
+ } else {
+ /* Shouldn't be fatal... */
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid MTU '%s'", value);
+ }
+ g_free (value);
+ }
+
+ if (read_mac_address (ifcfg, "HWADDR", ARPHRD_INFINIBAND, &mac, error)) {
+ if (mac) {
+ g_object_set (s_infiniband, NM_SETTING_INFINIBAND_MAC_ADDRESS, mac, NULL);
+
+ /* A connection can only be unmanaged if we know the MAC address */
+ if (!nm_controlled) {
+ char *mac_str = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_INFINIBAND);
+ *unmanaged = g_strdup_printf ("mac:%s", mac_str);
+ g_free (mac_str);
+ }
+
+ g_byte_array_free (mac, TRUE);
+ }
+ } else {
+ g_object_unref (s_infiniband);
+ return NULL;
+ }
+
+ if (svTrueValue (ifcfg, "CONNECTED_MODE", FALSE))
+ g_object_set (s_infiniband, NM_SETTING_INFINIBAND_TRANSPORT_MODE, "connected", NULL);
+ else
+ g_object_set (s_infiniband, NM_SETTING_INFINIBAND_TRANSPORT_MODE, "datagram", NULL);
+
+ if (!nm_controlled && !*unmanaged) {
+ /* If NM_CONTROLLED=no but there wasn't a MAC address, notify
+ the user that the device cannot be unmanaged.
+ */
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: NM_CONTROLLED was false but HWADDR was missing; device will be managed");
+ }
+
+ return (NMSetting *) s_infiniband;
+}
+
+static NMConnection *
+infiniband_connection_from_ifcfg (const char *file,
+ shvarFile *ifcfg,
+ gboolean nm_controlled,
+ char **unmanaged,
+ GError **error)
+{
+ NMConnection *connection = NULL;
+ NMSetting *con_setting = NULL;
+ NMSetting *infiniband_setting = NULL;
+
+ g_return_val_if_fail (file != NULL, NULL);
+ g_return_val_if_fail (ifcfg != NULL, NULL);
+
+ connection = nm_connection_new ();
+ if (!connection) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to allocate new connection for %s.", file);
+ return NULL;
+ }
+
+ con_setting = make_connection_setting (file, ifcfg, NM_SETTING_INFINIBAND_SETTING_NAME, NULL, NULL);
+ if (!con_setting) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to create connection setting.");
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, con_setting);
+
+ infiniband_setting = make_infiniband_setting (ifcfg, file, nm_controlled, unmanaged, error);
+ if (!infiniband_setting) {
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, infiniband_setting);
+
+ if (!nm_connection_verify (connection, error)) {
+ g_object_unref (connection);
+ return NULL;
+ }
+
+ return connection;
+}
+
+static void
+handle_bond_option (NMSettingBond *s_bond,
+ const char *key,
+ const char *value)
+{
+ if (!nm_setting_bond_add_option (s_bond, key, value))
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid bonding option '%s'", key);
+}
+
+static NMSetting *
+make_bond_setting (shvarFile *ifcfg,
+ const char *file,
+ gboolean nm_controlled,
+ char **unmanaged,
+ GError **error)
+{
+ NMSettingBond *s_bond;
+ char *value;
+
+ s_bond = NM_SETTING_BOND (nm_setting_bond_new ());
+
+ value = svGetValue (ifcfg, "DEVICE", FALSE);
+ if (!value || !strlen (value)) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0, "mandatory DEVICE keyword missing");
+ goto error;
+ }
+
+ g_object_set (s_bond, NM_SETTING_BOND_INTERFACE_NAME, value, NULL);
+ g_free (value);
+
+ value = svGetValue (ifcfg, "BONDING_OPTS", FALSE);
+ if (value) {
+ char **items, **iter;
+
+ items = g_strsplit_set (value, " ", -1);
+ for (iter = items; iter && *iter; iter++) {
+ if (strlen (*iter)) {
+ char **keys, *key, *val;
+
+ keys = g_strsplit_set (*iter, "=", 2);
+ if (keys && *keys) {
+ key = *keys;
+ val = *(keys + 1);
+ if (val && strlen(key) && strlen(val))
+ handle_bond_option (s_bond, key, val);
+ }
+
+ g_strfreev (keys);
+ }
+ }
+ g_free (value);
+ g_strfreev (items);
+ }
+
+ return (NMSetting *) s_bond;
+
+error:
+ g_object_unref (s_bond);
+ return NULL;
+}
+
+static NMConnection *
+bond_connection_from_ifcfg (const char *file,
+ shvarFile *ifcfg,
+ gboolean nm_controlled,
+ char **unmanaged,
+ GError **error)
+{
+ NMConnection *connection = NULL;
+ NMSetting *con_setting = NULL;
+ NMSetting *bond_setting = NULL;
+ NMSetting *wired_setting = NULL;
+ NMSetting8021x *s_8021x = NULL;
+
+ g_return_val_if_fail (file != NULL, NULL);
+ g_return_val_if_fail (ifcfg != NULL, NULL);
+
+ connection = nm_connection_new ();
+ if (!connection) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to allocate new connection for %s.", file);
+ return NULL;
+ }
+
+ con_setting = make_connection_setting (file, ifcfg, NM_SETTING_BOND_SETTING_NAME, NULL, _("Bond"));
+ if (!con_setting) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to create connection setting.");
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, con_setting);
+
+ bond_setting = make_bond_setting (ifcfg, file, nm_controlled, unmanaged, error);
+ if (!bond_setting) {
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, bond_setting);
+
wired_setting = make_wired_setting (ifcfg, file, nm_controlled, unmanaged, &s_8021x, error);
if (!wired_setting) {
g_object_unref (connection);
@@ -3299,50 +3666,245 @@ wired_connection_from_ifcfg (const char *file,
}
static gboolean
-is_wireless_device (const char *iface)
+is_bond_device (const char *name, shvarFile *parsed)
{
- int fd;
- struct iw_range range;
- struct iwreq wrq;
- gboolean is_wireless = FALSE;
+ g_return_val_if_fail (name != NULL, FALSE);
+ g_return_val_if_fail (parsed != NULL, FALSE);
+
+ if (svTrueValue (parsed, "BONDING_MASTER", FALSE))
+ return TRUE;
+
+ /* XXX: Check for "bond[\d]+"? */
- g_return_val_if_fail (iface != NULL, FALSE);
+ return FALSE;
+}
- fd = socket(AF_INET, SOCK_DGRAM, 0);
- if (fd == -1)
- return FALSE;
+static gboolean
+is_vlan_device (const char *name, shvarFile *parsed)
+{
+ g_return_val_if_fail (name != NULL, FALSE);
+ g_return_val_if_fail (parsed != NULL, FALSE);
- memset (&wrq, 0, sizeof (struct iwreq));
- memset (&range, 0, sizeof (struct iw_range));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
- wrq.u.data.pointer = (caddr_t) &range;
- wrq.u.data.length = sizeof (struct iw_range);
+ if (svTrueValue (parsed, "VLAN", FALSE))
+ return TRUE;
- if (ioctl (fd, SIOCGIWRANGE, &wrq) == 0)
- is_wireless = TRUE;
- else {
- if (errno == EOPNOTSUPP)
- is_wireless = FALSE;
- else {
- /* Sigh... some wired devices (kvm/qemu) return EINVAL when the
- * device is down even though it's not a wireless device. So try
- * IWNAME as a fallback.
- */
- memset (&wrq, 0, sizeof (struct iwreq));
- strncpy (wrq.ifr_name, iface, IFNAMSIZ);
- if (ioctl (fd, SIOCGIWNAME, &wrq) == 0)
- is_wireless = TRUE;
+ return FALSE;
+}
+
+static void
+parse_prio_map_list (NMSettingVlan *s_vlan,
+ shvarFile *ifcfg,
+ const char *key,
+ NMVlanPriorityMap map)
+{
+ char *value;
+ gchar **list = NULL, **iter;
+
+ value = svGetValue (ifcfg, key, FALSE);
+ if (!value)
+ return;
+
+ list = g_strsplit_set (value, ",", -1);
+ g_free (value);
+
+ for (iter = list; iter && *iter; iter++) {
+ if (!*iter || !strchr (*iter, ':'))
+ continue;
+
+ if (!nm_setting_vlan_add_priority_str (s_vlan, map, *iter)) {
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: invalid %s priority map item '%s'",
+ key, *iter);
+ }
+ }
+ g_strfreev (list);
+}
+
+static NMSetting *
+make_vlan_setting (shvarFile *ifcfg,
+ const char *file,
+ gboolean nm_controlled,
+ char **out_master,
+ char **unmanaged,
+ NMSetting8021x **s_8021x,
+ GError **error)
+{
+ NMSettingVlan *s_vlan = NULL;
+ char *value = NULL;
+ char *iface_name = NULL;
+ char *parent = NULL;
+ const char *p = NULL, *w;
+ gboolean has_numbers = FALSE;
+ gint vlan_id = -1;
+ guint32 vlan_flags = 0;
+
+ value = svGetValue (ifcfg, "VLAN_ID", FALSE);
+ if (value) {
+ errno = 0;
+ vlan_id = (gint) g_ascii_strtoll (value, NULL, 10);
+ if (vlan_id < 0 || vlan_id > 4096 || errno) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0, "Invalid VLAN_ID '%s'", value);
+ g_free (value);
+ return NULL;
+ }
+ g_free (value);
+ }
+
+ /* Need DEVICE if we don't have a separate VLAN_ID property */
+ iface_name = svGetValue (ifcfg, "DEVICE", FALSE);
+ if (!iface_name && vlan_id < 0) {
+ g_set_error_literal (error, IFCFG_PLUGIN_ERROR, 0,
+ "Missing DEVICE property; cannot determine VLAN ID.");
+ return NULL;
+ }
+
+ s_vlan = NM_SETTING_VLAN (nm_setting_vlan_new ());
+
+ if (iface_name) {
+ g_object_set (s_vlan, NM_SETTING_VLAN_INTERFACE_NAME, iface_name, NULL);
+
+ p = strchr (iface_name, '.');
+ if (p) {
+ /* eth0.43; PHYSDEV is assumed from it */
+ parent = g_strndup (iface_name, p - iface_name);
+ p++;
+ } else {
+ /* format like vlan43; PHYSDEV or MASTER must be set */
+ if (g_str_has_prefix (iface_name, "vlan"))
+ p = iface_name + 4;
}
+
+ w = p;
+ while (*w && !has_numbers)
+ has_numbers = g_ascii_isdigit (*w);
+
+ /* Grab VLAN ID from interface name; this takes precedence over the
+ * separate VLAN_ID property for backwards compat.
+ */
+ if (has_numbers) {
+ errno = 0;
+ vlan_id = (gint) g_ascii_strtoll (p, NULL, 10);
+ if (vlan_id < 0 || vlan_id > 4095 || errno) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to determine VLAN ID from DEVICE '%s'",
+ iface_name);
+ goto error;
+ }
+ }
+ }
+
+ if (vlan_id < 0) {
+ g_set_error_literal (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to determine VLAN ID from DEVICE or VLAN_ID.");
+ goto error;
}
+ g_object_set (s_vlan, NM_SETTING_VLAN_ID, vlan_id, NULL);
- close (fd);
- return is_wireless;
+ if (!parent)
+ parent = svGetValue (ifcfg, "PHYSDEV", FALSE);
+ if (parent == NULL) {
+ g_set_error_literal (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to determine VLAN parent from DEVICE or PHYSDEV");
+ goto error;
+ }
+ g_object_set (s_vlan, NM_SETTING_VLAN_PARENT, parent, NULL);
+
+ if (svTrueValue (ifcfg, "REORDER_HDR", FALSE))
+ vlan_flags |= NM_VLAN_FLAG_REORDER_HEADERS;
+
+ value = svGetValue (ifcfg, "VLAN_FLAGS", FALSE);
+ if (value) {
+ if (g_strstr_len (value, -1, "GVRP"))
+ vlan_flags |= NM_VLAN_FLAG_GVRP;
+ if (g_strstr_len (value, -1, "LOOSE_BINDING"))
+ vlan_flags |= NM_VLAN_FLAG_LOOSE_BINDING;
+ }
+
+ g_object_set (s_vlan, NM_SETTING_VLAN_FLAGS, vlan_flags, NULL);
+ g_free (value);
+
+ parse_prio_map_list (s_vlan, ifcfg, "VLAN_INGRESS_PRIORITY_MAP", NM_VLAN_INGRESS_MAP);
+ parse_prio_map_list (s_vlan, ifcfg, "VLAN_EGRESS_PRIORITY_MAP", NM_VLAN_EGRESS_MAP);
+
+ if (out_master)
+ *out_master = svGetValue (ifcfg, "MASTER", FALSE);
+ return (NMSetting *) s_vlan;
+
+error:
+ g_free (parent);
+ g_free (iface_name);
+ g_object_unref (s_vlan);
+ return NULL;
+}
+
+static NMConnection *
+vlan_connection_from_ifcfg (const char *file,
+ shvarFile *ifcfg,
+ gboolean nm_controlled,
+ char **unmanaged,
+ GError **error)
+{
+ NMConnection *connection = NULL;
+ NMSetting *con_setting = NULL;
+ NMSetting *wired_setting = NULL;
+ NMSetting *vlan_setting = NULL;
+ NMSetting8021x *s_8021x = NULL;
+ char *master = NULL;
+
+ g_return_val_if_fail (file != NULL, NULL);
+ g_return_val_if_fail (ifcfg != NULL, NULL);
+
+ connection = nm_connection_new ();
+ if (!connection) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to allocate new connection for %s.", file);
+ return NULL;
+ }
+
+ con_setting = make_connection_setting (file, ifcfg, NM_SETTING_VLAN_SETTING_NAME, NULL, "Vlan");
+ if (!con_setting) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Failed to create connection setting.");
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, con_setting);
+
+ vlan_setting = make_vlan_setting (ifcfg, file, nm_controlled, &master, unmanaged, &s_8021x, error);
+ if (!vlan_setting) {
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, vlan_setting);
+
+ /* Handle master interface or connection */
+ if (master) {
+ g_object_set (con_setting, NM_SETTING_CONNECTION_MASTER, master, NULL);
+ g_object_set (con_setting,
+ NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_VLAN_SETTING_NAME,
+ NULL);
+ g_free (master);
+ }
+
+ wired_setting = make_wired_setting (ifcfg, file, nm_controlled, unmanaged, &s_8021x, error);
+ if (!wired_setting) {
+ g_object_unref (connection);
+ return NULL;
+ }
+ nm_connection_add_setting (connection, wired_setting);
+
+ if (s_8021x)
+ nm_connection_add_setting (connection, NM_SETTING (s_8021x));
+ if (!nm_connection_verify (connection, error)) {
+ g_object_unref (connection);
+ return NULL;
+ }
+
+ return connection;
}
enum {
IGNORE_REASON_NONE = 0x00,
IGNORE_REASON_BRIDGE = 0x01,
- IGNORE_REASON_VLAN = 0x02,
};
NMConnection *
@@ -3363,7 +3925,7 @@ connection_from_file (const char *filename,
NMSetting *s_ip4, *s_ip6;
const char *ifcfg_name = NULL;
gboolean nm_controlled = TRUE;
- gboolean ip6_used = FALSE;
+ gboolean can_disable_ip4 = FALSE;
GError *error = NULL;
guint32 ignore_reason = IGNORE_REASON_NONE;
@@ -3402,9 +3964,6 @@ connection_from_file (const char *filename,
if (!type) {
char *device;
- /* If no type, if the device has wireless extensions, it's wifi,
- * otherwise it's ethernet.
- */
device = svGetValue (parsed, "DEVICE", FALSE);
if (!device) {
g_set_error (&error, IFCFG_PLUGIN_ERROR, 0,
@@ -3422,8 +3981,12 @@ connection_from_file (const char *filename,
}
if (!test_type) {
+ if (is_bond_device (device, parsed))
+ type = g_strdup (TYPE_BOND);
+ else if (is_vlan_device (device, parsed))
+ type = g_strdup (TYPE_VLAN);
/* Test wireless extensions */
- if (is_wireless_device (device))
+ else if (wifi_utils_is_wifi (device, NULL))
type = g_strdup (TYPE_WIRELESS);
else
type = g_strdup (TYPE_ETHERNET);
@@ -3456,7 +4019,14 @@ connection_from_file (const char *filename,
g_free (lower);
}
- /* Ignore BRIDGE= and VLAN= connections for now too (rh #619863) */
+ if (svTrueValue (parsed, "BONDING_MASTER", FALSE) &&
+ strcasecmp (type, TYPE_BOND)) {
+ g_set_error (&error, IFCFG_PLUGIN_ERROR, 0,
+ "BONDING_MASTER=yes key only allowed in TYPE=bond connections");
+ goto done;
+ }
+
+ /* Ignore BRIDGE= connections for now too (rh #619863) */
tmp = svGetValue (parsed, "BRIDGE", FALSE);
if (tmp) {
g_free (tmp);
@@ -3464,24 +4034,21 @@ connection_from_file (const char *filename,
ignore_reason = IGNORE_REASON_BRIDGE;
}
- if (nm_controlled) {
- tmp = svGetValue (parsed, "VLAN", FALSE);
- if (tmp) {
- g_free (tmp);
- nm_controlled = FALSE;
- ignore_reason = IGNORE_REASON_VLAN;
- }
- }
-
/* Construct the connection */
if (!strcasecmp (type, TYPE_ETHERNET))
connection = wired_connection_from_ifcfg (filename, parsed, nm_controlled, unmanaged, &error);
else if (!strcasecmp (type, TYPE_WIRELESS))
connection = wireless_connection_from_ifcfg (filename, parsed, nm_controlled, unmanaged, &error);
- else if (!strcasecmp (type, TYPE_BRIDGE)) {
+ else if (!strcasecmp (type, TYPE_INFINIBAND))
+ connection = infiniband_connection_from_ifcfg (filename, parsed, nm_controlled, unmanaged, &error);
+ else if (!strcasecmp (type, TYPE_BOND))
+ connection = bond_connection_from_ifcfg (filename, parsed, nm_controlled, unmanaged, &error);
+ else if (!strcasecmp (type, TYPE_VLAN))
+ connection = vlan_connection_from_ifcfg (filename, parsed, nm_controlled, unmanaged, &error);
+ else if (!strcasecmp (type, TYPE_BRIDGE))
g_set_error (&error, IFCFG_PLUGIN_ERROR, 0,
"Bridge connections are not yet supported");
- } else {
+ else {
g_set_error (&error, IFCFG_PLUGIN_ERROR, 0,
"Unknown connection type '%s'", type);
}
@@ -3524,10 +4091,13 @@ connection_from_file (const char *filename,
nm_connection_add_setting (connection, s_ip6);
method = nm_setting_ip6_config_get_method (NM_SETTING_IP6_CONFIG (s_ip6));
if (method && strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE))
- ip6_used = TRUE;
+ can_disable_ip4 = TRUE;
}
- s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, ip6_used, &error);
+ if (utils_disabling_ip4_config_allowed (connection))
+ can_disable_ip4 = TRUE;
+
+ s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, can_disable_ip4, &error);
if (error) {
g_object_unref (connection);
connection = NULL;
@@ -3544,7 +4114,7 @@ connection_from_file (const char *filename,
&& !g_ascii_strcasecmp (bootproto, "ibft")) {
NMSettingConnection *s_con;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
g_object_set (G_OBJECT (s_con), NM_SETTING_CONNECTION_READ_ONLY, TRUE, NULL);
@@ -3569,9 +4139,3 @@ done:
return connection;
}
-const char *
-reader_get_prefix (void)
-{
- return _("System");
-}
-
diff --git a/src/settings/plugins/ifcfg-rh/reader.h b/src/settings/plugins/ifcfg-rh/reader.h
index 2a031977d..97c727cc7 100644
--- a/src/settings/plugins/ifcfg-rh/reader.h
+++ b/src/settings/plugins/ifcfg-rh/reader.h
@@ -37,6 +37,4 @@ NMConnection *connection_from_file (const char *filename,
GError **error,
gboolean *ignore_error);
-const char *reader_get_prefix (void);
-
#endif /* __READER_H__ */
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
index 1b76a4742..5b34ffe3d 100644
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
@@ -2,6 +2,7 @@ SUBDIRS=network-scripts
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(srcdir)/../
@@ -20,7 +21,9 @@ test_ifcfg_rh_CPPFLAGS = \
test_ifcfg_rh_LDADD = \
$(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
+ $(top_builddir)/src/wifi/libwifi-utils.la \
$(builddir)/../libifcfg-rh-io.la \
+ $(LIBM)
$(DBUS_LIBS)
test_ifcfg_rh_utils_SOURCES = \
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.in b/src/settings/plugins/ifcfg-rh/tests/Makefile.in
index 71c5d60b6..5e8abf833 100644
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.in
+++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.in
@@ -61,6 +61,7 @@ test_ifcfg_rh_OBJECTS = $(am_test_ifcfg_rh_OBJECTS)
am__DEPENDENCIES_1 =
test_ifcfg_rh_DEPENDENCIES = $(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
+ $(top_builddir)/src/wifi/libwifi-utils.la \
$(builddir)/../libifcfg-rh-io.la $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
@@ -183,6 +184,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -237,11 +240,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -252,6 +259,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -291,6 +299,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -357,6 +367,7 @@ top_srcdir = @top_srcdir@
SUBDIRS = network-scripts
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(srcdir)/../
@@ -373,8 +384,9 @@ test_ifcfg_rh_CPPFLAGS = \
test_ifcfg_rh_LDADD = \
$(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
+ $(top_builddir)/src/wifi/libwifi-utils.la \
$(builddir)/../libifcfg-rh-io.la \
- $(DBUS_LIBS)
+ $(LIBM)
test_ifcfg_rh_utils_SOURCES = \
test-ifcfg-rh-utils.c
@@ -833,6 +845,7 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am
+ $(DBUS_LIBS)
@WITH_TESTS_TRUE@check-local: test-ifcfg-rh
@WITH_TESTS_TRUE@ $(abs_builddir)/test-ifcfg-rh-utils
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am
index 935d0ec4a..776962f00 100644
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am
@@ -36,6 +36,8 @@ EXTRA_DIST = \
ifcfg-test-wifi-leap-always-ask \
ifcfg-test-wifi-wpa-psk \
keys-test-wifi-wpa-psk \
+ ifcfg-test-wifi-wpa-psk-2 \
+ keys-test-wifi-wpa-psk-2 \
ifcfg-test-wifi-wpa-psk-unquoted \
keys-test-wifi-wpa-psk-unquoted \
ifcfg-test-wifi-wpa-psk-unquoted2 \
@@ -79,11 +81,16 @@ EXTRA_DIST = \
ifcfg-test-bridge-main \
ifcfg-test-bridge-component \
ifcfg-test-vlan-interface \
+ ifcfg-test-vlan-only-vlanid \
+ ifcfg-test-vlan-only-device \
ifcfg-test-wifi-wep-no-keys \
ifcfg-test-permissions \
ifcfg-test-wifi-wep-agent-keys \
ifcfg-test-wifi-dynamic-wep-leap \
- keys-test-wifi-dynamic-wep-leap
+ keys-test-wifi-dynamic-wep-leap \
+ ifcfg-test-infiniband \
+ ifcfg-test-bond-main \
+ ifcfg-test-bond-slave
check-local:
@for f in $(EXTRA_DIST); do \
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in
index 6292f12cb..4f34cfc32 100644
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in
@@ -107,6 +107,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -161,11 +163,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -176,6 +182,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -215,6 +222,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,6 +325,8 @@ EXTRA_DIST = \
ifcfg-test-wifi-leap-always-ask \
ifcfg-test-wifi-wpa-psk \
keys-test-wifi-wpa-psk \
+ ifcfg-test-wifi-wpa-psk-2 \
+ keys-test-wifi-wpa-psk-2 \
ifcfg-test-wifi-wpa-psk-unquoted \
keys-test-wifi-wpa-psk-unquoted \
ifcfg-test-wifi-wpa-psk-unquoted2 \
@@ -359,11 +370,16 @@ EXTRA_DIST = \
ifcfg-test-bridge-main \
ifcfg-test-bridge-component \
ifcfg-test-vlan-interface \
+ ifcfg-test-vlan-only-vlanid \
+ ifcfg-test-vlan-only-device \
ifcfg-test-wifi-wep-no-keys \
ifcfg-test-permissions \
ifcfg-test-wifi-wep-agent-keys \
ifcfg-test-wifi-dynamic-wep-leap \
- keys-test-wifi-dynamic-wep-leap
+ keys-test-wifi-dynamic-wep-leap \
+ ifcfg-test-infiniband \
+ ifcfg-test-bond-main \
+ ifcfg-test-bond-slave
all: all-am
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-main b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-main
new file mode 100644
index 000000000..4c4834d54
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-main
@@ -0,0 +1,5 @@
+DEVICE=bond0
+ONBOOT=no
+TYPE=Bond
+BOOTPROTO=dhcp
+BONDING_OPTS="miimon=100"
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave
new file mode 100644
index 000000000..cfef2b16c
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave
@@ -0,0 +1,4 @@
+DEVICE=eth0
+HWADDR=00:22:15:59:62:97
+ONBOOT=no
+MASTER=bond0
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband
new file mode 100644
index 000000000..6c36f1def
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband
@@ -0,0 +1,8 @@
+TYPE=InfiniBand
+DEVICE=ib0
+HWADDR=80:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22
+CONNECTED_MODE=yes
+MTU=65520
+IPADDR=192.168.2.2
+NETMASK=255.255.255.0
+GATEWAY=192.168.2.1
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface
index 6c841855e..ccd75d7ff 100644
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface
@@ -1,7 +1,12 @@
-DEVICE=eth1.43
VLAN=yes
+TYPE=Vlan
+DEVICE=vlan43
+PHYSDEV=eth9
+REORDER_HDR=0
+VLAN_FLAGS=GVRP,LOOSE_BINDING
+VLAN_INGRESS_PRIORITY_MAP=0:1,2:5
+VLAN_EGRESS_PRIORITY_MAP=12:3,14:7,3:1
ONBOOT=yes
-BOOTPROTO=none
+BOOTPROTO=static
IPADDR=192.168.43.149
NETMASK=255.255.255.0
-
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-device b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-device
new file mode 100644
index 000000000..4ba06f28e
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-device
@@ -0,0 +1,4 @@
+VLAN=yes
+TYPE=Vlan
+DEVICE=eth0.9
+
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-vlanid b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-vlanid
new file mode 100644
index 000000000..622d41ec7
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-vlanid
@@ -0,0 +1,6 @@
+VLAN=yes
+TYPE=Vlan
+PHYSDEV=eth9
+VLAN_ID=43
+ONBOOT=yes
+
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-2 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-2
new file mode 100644
index 000000000..038b656d2
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-2
@@ -0,0 +1,19 @@
+TYPE=Wireless
+DEVICE=eth2
+HWADDR=00:16:41:11:22:33
+NM_CONTROLLED=yes
+BOOTPROTO=dhcp
+ESSID=ipsum
+CHANNEL=6
+MODE=Managed
+RATE=auto
+ONBOOT=yes
+USERCTL=yes
+PEERDNS=yes
+IPV6INIT=no
+CIPHER_PAIRWISE="TKIP CCMP"
+CIPHER_GROUP="TKIP CCMP WEP40 WEP104"
+KEY_MGMT=WPA-PSK
+WPA_ALLOW_WPA=yes
+WPA_ALLOW_WPA2=yes
+
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2
new file mode 100644
index 000000000..bf98da5a1
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2
@@ -0,0 +1,2 @@
+WPA_PSK=$'They\'re really saying I love you. >>`<<'
+
diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
index e32266cb9..62882a76d 100644
--- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <string.h>
#include <netinet/ether.h>
+#include <linux/if_infiniband.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
@@ -43,6 +44,7 @@
#include <nm-setting-gsm.h>
#include <nm-setting-cdma.h>
#include <nm-setting-serial.h>
+#include <nm-setting-vlan.h>
#include "nm-test-helpers.h"
@@ -235,7 +237,7 @@ test_read_minimal (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"minimal-wired-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_MINIMAL,
@@ -275,7 +277,7 @@ test_read_minimal (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"minimal-wired-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_MINIMAL,
@@ -307,7 +309,7 @@ test_read_minimal (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"minimal-wired-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_MINIMAL,
@@ -379,7 +381,7 @@ test_read_unmanaged (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"unmanaged-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_UNMANAGED,
@@ -417,7 +419,7 @@ test_read_unmanaged (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"unmanaged-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_UNMANAGED,
@@ -443,7 +445,7 @@ test_read_unmanaged (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 == NULL,
"unmanaged-verify-ip4", "failed to verify %s: unexpected %s setting",
TEST_IFCFG_UNMANAGED,
@@ -504,7 +506,7 @@ test_read_wired_static (const char *file, const char *expected_id)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-static-verify-connection", "failed to verify %s: missing %s setting",
file,
@@ -539,7 +541,7 @@ test_read_wired_static (const char *file, const char *expected_id)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-static-verify-wired", "failed to verify %s: missing %s setting",
file,
@@ -571,7 +573,7 @@ test_read_wired_static (const char *file, const char *expected_id)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-static-verify-ip4", "failed to verify %s: missing %s setting",
file,
@@ -586,7 +588,7 @@ test_read_wired_static (const char *file, const char *expected_id)
NM_SETTING_IP4_CONFIG_METHOD);
/* Implicit may-fail */
- ASSERT (nm_setting_ip4_config_get_may_fail (s_ip4) == FALSE,
+ ASSERT (nm_setting_ip4_config_get_may_fail (s_ip4) == TRUE,
"wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value",
file,
NM_SETTING_IP4_CONFIG_SETTING_NAME,
@@ -666,7 +668,7 @@ test_read_wired_static (const char *file, const char *expected_id)
if (!strcmp (expected_id, "System test-wired-static")) {
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-static-verify-ip6", "failed to verify %s: missing %s setting",
file,
@@ -807,7 +809,7 @@ test_read_wired_static_no_prefix (guint32 expected_prefix)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-static-no-prefix-verify-connection", "failed to verify %s: missing %s setting",
file,
@@ -829,7 +831,7 @@ test_read_wired_static_no_prefix (guint32 expected_prefix)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-static-no-prefix-verify-ip4", "failed to verify %s: missing %s setting",
file,
@@ -916,7 +918,7 @@ test_read_wired_dhcp (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-dhcp-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP,
@@ -951,7 +953,7 @@ test_read_wired_dhcp (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-dhcp-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP,
@@ -977,7 +979,7 @@ test_read_wired_dhcp (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-dhcp-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP,
@@ -1089,7 +1091,7 @@ test_read_wired_global_gateway (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-global-gateway-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_GLOBAL_GATEWAY,
@@ -1110,7 +1112,7 @@ test_read_wired_global_gateway (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-global-gateway-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_GLOBAL_GATEWAY,
@@ -1118,7 +1120,7 @@ test_read_wired_global_gateway (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-global-gateway-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_GLOBAL_GATEWAY,
@@ -1216,7 +1218,7 @@ test_read_wired_never_default (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-never-default-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_NEVER_DEFAULT,
@@ -1237,7 +1239,7 @@ test_read_wired_never_default (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-never-default-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_NEVER_DEFAULT,
@@ -1245,7 +1247,7 @@ test_read_wired_never_default (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-never-default-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_NEVER_DEFAULT,
@@ -1274,7 +1276,7 @@ test_read_wired_never_default (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-never-default-verify-ip6", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_NEVER_DEFAULT,
@@ -1341,7 +1343,7 @@ test_read_wired_defroute_no (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-defroute-no-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO,
@@ -1362,7 +1364,7 @@ test_read_wired_defroute_no (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-defroute-no-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO,
@@ -1370,7 +1372,7 @@ test_read_wired_defroute_no (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-defroute-no-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO,
@@ -1392,7 +1394,7 @@ test_read_wired_defroute_no (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-defroute-no-verify-ip6", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO,
@@ -1468,7 +1470,7 @@ test_read_wired_defroute_no_gatewaydev_yes (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-defroute-no-gatewaydev-yes-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES,
@@ -1489,7 +1491,7 @@ test_read_wired_defroute_no_gatewaydev_yes (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-defroute-no-gatewaydev-yes-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES,
@@ -1497,7 +1499,7 @@ test_read_wired_defroute_no_gatewaydev_yes (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-defroute-no-gatewaydev-yes-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES,
@@ -1519,7 +1521,7 @@ test_read_wired_defroute_no_gatewaydev_yes (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-defroute-no-gatewaydev-yes-verify-ip6", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES,
@@ -1597,7 +1599,7 @@ test_read_wired_static_routes (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-static-routes-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_STATIC_ROUTES,
@@ -1618,7 +1620,7 @@ test_read_wired_static_routes (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-static-routes-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_STATIC_ROUTES,
@@ -1626,7 +1628,7 @@ test_read_wired_static_routes (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-static-routes-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_STATIC_ROUTES,
@@ -1764,7 +1766,7 @@ test_read_wired_static_routes_legacy (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-static-routes-legacy-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_STATIC_ROUTES_LEGACY,
@@ -1785,7 +1787,7 @@ test_read_wired_static_routes_legacy (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-static-routes-legacy-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_STATIC_ROUTES_LEGACY,
@@ -1793,7 +1795,7 @@ test_read_wired_static_routes_legacy (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-static-routes-legacy-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_STATIC_ROUTES_LEGACY,
@@ -1961,7 +1963,7 @@ test_read_wired_ipv4_manual (const char *file, const char *expected_id)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-ipv4-manual-verify-connection", "failed to verify %s: missing %s setting",
file,
@@ -1982,7 +1984,7 @@ test_read_wired_ipv4_manual (const char *file, const char *expected_id)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-ipv4-manual-verify-wired", "failed to verify %s: missing %s setting",
file,
@@ -1990,7 +1992,7 @@ test_read_wired_ipv4_manual (const char *file, const char *expected_id)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-ipv4-manual-verify-ip4", "failed to verify %s: missing %s setting",
file,
@@ -2124,7 +2126,7 @@ test_read_wired_ipv6_manual (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-ipv6-manual-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2145,7 +2147,7 @@ test_read_wired_ipv6_manual (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-ipv6-manual-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2153,7 +2155,7 @@ test_read_wired_ipv6_manual (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-ipv6-manual-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2211,7 +2213,7 @@ test_read_wired_ipv6_manual (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-ipv6-manual-verify-ip6", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2415,7 +2417,7 @@ test_read_wired_ipv6_only (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-ipv6-only-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2436,7 +2438,7 @@ test_read_wired_ipv6_only (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-ipv6-only-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2444,7 +2446,7 @@ test_read_wired_ipv6_only (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-ipv6-only-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2459,7 +2461,7 @@ test_read_wired_ipv6_only (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-ipv6-only-verify-ip6", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_IPV6_MANUAL,
@@ -2568,7 +2570,7 @@ test_read_wired_dhcp6_only (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-dhcp6-only-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP6_ONLY,
@@ -2589,7 +2591,7 @@ test_read_wired_dhcp6_only (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-dhcp6-only-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP6_ONLY,
@@ -2597,7 +2599,7 @@ test_read_wired_dhcp6_only (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-dhcp6-only-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP6_ONLY,
@@ -2612,7 +2614,7 @@ test_read_wired_dhcp6_only (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"wired-dhcp6-only-verify-ip6", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_DHCP6_ONLY,
@@ -2668,7 +2670,7 @@ test_read_onboot_no (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"onboot-no-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_ONBOOT_NO,
@@ -2734,7 +2736,7 @@ test_read_wired_8021x_peap_mschapv2 (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-8021x-peap-mschapv2-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
@@ -2742,7 +2744,7 @@ test_read_wired_8021x_peap_mschapv2 (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-8021x-peap-mschapv2-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
@@ -2757,7 +2759,7 @@ test_read_wired_8021x_peap_mschapv2 (void)
NM_SETTING_IP4_CONFIG_METHOD);
/* ===== 802.1x SETTING ===== */
- s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ s_8021x = nm_connection_get_setting_802_1x (connection);
ASSERT (s_8021x != NULL,
"wired-8021x-peap-mschapv2-verify-8021x", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2,
@@ -2929,11 +2931,11 @@ test_read_wired_8021x_tls_secret_flags (const char *ifcfg, NMSettingSecretFlags
g_assert (success);
/* ===== WIRED SETTING ===== */
- s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
g_assert (s_wired);
/* ===== 802.1x SETTING ===== */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_assert (s_8021x);
g_assert_cmpint (nm_setting_802_1x_get_num_eap_methods (s_8021x), ==, 1);
g_assert_cmpstr (nm_setting_802_1x_get_eap_method (s_8021x, 0), ==, "tls");
@@ -3001,7 +3003,7 @@ test_read_wifi_open (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-open-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN,
@@ -3041,7 +3043,7 @@ test_read_wifi_open (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-open-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN,
@@ -3120,7 +3122,7 @@ test_read_wifi_open (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-open-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN,
@@ -3177,7 +3179,7 @@ test_read_wifi_open_auto (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-open-auto-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN_AUTO,
@@ -3198,7 +3200,7 @@ test_read_wifi_open_auto (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-open-auto-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN_AUTO,
@@ -3260,7 +3262,7 @@ test_read_wifi_open_ssid_hex (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-open-ssid-hex-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN_SSID_HEX,
@@ -3281,7 +3283,7 @@ test_read_wifi_open_ssid_hex (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-open-ssid-hex-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN_SSID_HEX,
@@ -3379,7 +3381,7 @@ test_read_wifi_open_ssid_quoted (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-open-ssid-quoted-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN_SSID_QUOTED,
@@ -3400,7 +3402,7 @@ test_read_wifi_open_ssid_quoted (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-open-ssid-quoted-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_OPEN_SSID_QUOTED,
@@ -3476,7 +3478,7 @@ test_read_wifi_wep (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wep-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP,
@@ -3516,7 +3518,7 @@ test_read_wifi_wep (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP,
@@ -3608,7 +3610,7 @@ test_read_wifi_wep (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP,
@@ -3687,7 +3689,7 @@ test_read_wifi_wep (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wep-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP,
@@ -3752,7 +3754,7 @@ test_read_wifi_wep_adhoc (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wep-adhoc-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_ADHOC,
@@ -3785,7 +3787,7 @@ test_read_wifi_wep_adhoc (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-adhoc-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_ADHOC,
@@ -3852,7 +3854,7 @@ test_read_wifi_wep_adhoc (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-adhoc-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_ADHOC,
@@ -3919,7 +3921,7 @@ test_read_wifi_wep_adhoc (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wep-adhoc-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_ADHOC,
@@ -4015,7 +4017,7 @@ test_read_wifi_wep_passphrase (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wep-passphrase-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_PASSPHRASE,
@@ -4023,7 +4025,7 @@ test_read_wifi_wep_passphrase (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_PASSPHRASE,
@@ -4045,7 +4047,7 @@ test_read_wifi_wep_passphrase (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_PASSPHRASE,
@@ -4153,7 +4155,7 @@ test_read_wifi_wep_40_ascii (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wep-40-ascii-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_40_ASCII,
@@ -4161,7 +4163,7 @@ test_read_wifi_wep_40_ascii (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-40-ascii-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_40_ASCII,
@@ -4182,7 +4184,7 @@ test_read_wifi_wep_40_ascii (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-40-ascii-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_40_ASCII,
@@ -4290,7 +4292,7 @@ test_read_wifi_wep_104_ascii (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wep-104-ascii-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_104_ASCII,
@@ -4298,7 +4300,7 @@ test_read_wifi_wep_104_ascii (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-104-ascii-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_104_ASCII,
@@ -4319,7 +4321,7 @@ test_read_wifi_wep_104_ascii (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-104-ascii-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_104_ASCII,
@@ -4428,7 +4430,7 @@ test_read_wifi_leap (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-leap-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_LEAP,
@@ -4449,7 +4451,7 @@ test_read_wifi_leap (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-leap-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_LEAP,
@@ -4471,7 +4473,7 @@ test_read_wifi_leap (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-leap-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_LEAP,
@@ -4566,13 +4568,13 @@ test_read_wifi_leap_secret_flags (const char *file, NMSettingSecretFlags expecte
g_assert (success);
/* ===== WIRELESS SETTING ===== */
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
g_assert (s_wifi);
g_assert (g_strcmp0 (nm_setting_wireless_get_security (s_wifi), NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0);
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
g_assert (s_wsec);
g_assert (g_strcmp0 (nm_setting_wireless_security_get_key_mgmt (s_wsec), "ieee8021x") == 0);
@@ -4643,7 +4645,7 @@ test_read_wifi_wpa_psk (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wpa-psk-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK,
@@ -4683,7 +4685,7 @@ test_read_wifi_wpa_psk (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wpa-psk-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK,
@@ -4774,7 +4776,7 @@ test_read_wifi_wpa_psk (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wpa-psk-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK,
@@ -4887,7 +4889,7 @@ test_read_wifi_wpa_psk (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wpa-psk-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK,
@@ -4908,6 +4910,111 @@ test_read_wifi_wpa_psk (void)
g_object_unref (connection);
}
+#define TEST_IFCFG_WIFI_WPA_PSK_2 TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-wpa-psk-2"
+
+static void
+test_read_wifi_wpa_psk_2 (void)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wsec;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+ const char *tmp;
+ const char *expected_id = "System ipsum (test-wifi-wpa-psk-2)";
+ const char *expected_psk = "They're really saying I love you. >>`<<";
+
+ connection = connection_from_file (TEST_IFCFG_WIFI_WPA_PSK_2,
+ NULL,
+ TYPE_WIRELESS,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ ASSERT (connection != NULL,
+ "wifi-wpa-psk-2-read", "failed to read %s: %s", TEST_IFCFG_WIFI_WPA_PSK_2, error->message);
+
+ ASSERT (nm_connection_verify (connection, &error),
+ "wifi-wpa-psk-2-verify", "failed to verify %s: %s", TEST_IFCFG_WIFI_WPA_PSK_2, error->message);
+
+ /* ===== CONNECTION SETTING ===== */
+
+ s_con = nm_connection_get_setting_connection (connection);
+ ASSERT (s_con != NULL,
+ "wifi-wpa-psk-2-verify-connection", "failed to verify %s: missing %s setting",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_CONNECTION_SETTING_NAME);
+
+ /* ID */
+ tmp = nm_setting_connection_get_id (s_con);
+ ASSERT (tmp != NULL,
+ "wifi-wpa-psk-2-verify-connection", "failed to verify %s: missing %s / %s key",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_ID);
+ ASSERT (strcmp (tmp, expected_id) == 0,
+ "wifi-wpa-psk-2-verify-connection", "failed to verify %s: unexpected %s / %s key value",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_ID);
+
+ /* ===== WIRELESS SETTING ===== */
+
+ s_wireless = nm_connection_get_setting_wireless (connection);
+ ASSERT (s_wireless != NULL,
+ "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: missing %s setting",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_WIRELESS_SETTING_NAME);
+
+ /* Security */
+ tmp = nm_setting_wireless_get_security (s_wireless);
+ ASSERT (tmp != NULL,
+ "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: missing %s / %s key",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_WIRELESS_SETTING_NAME,
+ NM_SETTING_WIRELESS_SEC);
+ ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0,
+ "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: unexpected %s / %s key value",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_WIRELESS_SETTING_NAME,
+ NM_SETTING_WIRELESS_SEC);
+
+ /* ===== WIRELESS SECURITY SETTING ===== */
+
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
+ ASSERT (s_wsec != NULL,
+ "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: missing %s setting",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME);
+
+ /* PSK */
+ tmp = nm_setting_wireless_security_get_psk (s_wsec);
+ ASSERT (tmp != NULL,
+ "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: missing %s / %s key",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_PSK);
+ ASSERT (strcmp (tmp, expected_psk) == 0,
+ "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: unexpected %s / %s key value",
+ TEST_IFCFG_WIFI_WPA_PSK_2,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_PSK);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+ g_object_unref (connection);
+}
+
#define TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted"
static void
@@ -4945,7 +5052,7 @@ test_read_wifi_wpa_psk_unquoted (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wpa-psk-unquoted-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED,
@@ -4966,7 +5073,7 @@ test_read_wifi_wpa_psk_unquoted (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wpa-psk-unquoted-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED,
@@ -4987,7 +5094,7 @@ test_read_wifi_wpa_psk_unquoted (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wpa-psk-unquoted-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED,
@@ -5092,7 +5199,7 @@ test_read_wifi_wpa_psk_adhoc (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wpa-psk-adhoc-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_ADHOC,
@@ -5113,7 +5220,7 @@ test_read_wifi_wpa_psk_adhoc (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wpa-psk-adhoc-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_ADHOC,
@@ -5147,7 +5254,7 @@ test_read_wifi_wpa_psk_adhoc (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wpa-psk-adhoc-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_ADHOC,
@@ -5221,7 +5328,7 @@ test_read_wifi_wpa_psk_adhoc (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wpa-psk-adhoc-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_ADHOC,
@@ -5283,7 +5390,7 @@ test_read_wifi_wpa_psk_hex (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wpa-psk-hex-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_HEX,
@@ -5304,7 +5411,7 @@ test_read_wifi_wpa_psk_hex (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wpa-psk-hex-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_HEX,
@@ -5343,7 +5450,7 @@ test_read_wifi_wpa_psk_hex (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wpa-psk-hex-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_HEX,
@@ -5377,7 +5484,7 @@ test_read_wifi_wpa_psk_hex (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wpa-psk-hex-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_PSK_HEX,
@@ -5441,7 +5548,7 @@ test_read_wifi_wpa_eap_tls (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wpa-eap-tls-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_EAP_TLS,
@@ -5449,7 +5556,7 @@ test_read_wifi_wpa_eap_tls (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wpa-eap-tls-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_EAP_TLS,
@@ -5464,7 +5571,7 @@ test_read_wifi_wpa_eap_tls (void)
NM_SETTING_IP4_CONFIG_METHOD);
/* ===== 802.1x SETTING ===== */
- s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ s_8021x = nm_connection_get_setting_802_1x (connection);
ASSERT (s_8021x != NULL,
"wifi-wpa-eap-tls-verify-8021x", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_EAP_TLS,
@@ -5591,7 +5698,7 @@ test_read_wifi_wpa_eap_ttls_tls (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wpa-eap-ttls-tls-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_EAP_TTLS_TLS,
@@ -5599,7 +5706,7 @@ test_read_wifi_wpa_eap_ttls_tls (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wpa-eap-ttls-tls-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_EAP_TTLS_TLS,
@@ -5614,7 +5721,7 @@ test_read_wifi_wpa_eap_ttls_tls (void)
NM_SETTING_IP4_CONFIG_METHOD);
/* ===== 802.1x SETTING ===== */
- s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ s_8021x = nm_connection_get_setting_802_1x (connection);
ASSERT (s_8021x != NULL,
"wifi-wpa-eap-ttls-tls-verify-8021x", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WPA_EAP_TTLS_TLS,
@@ -5756,13 +5863,13 @@ test_read_wifi_dynamic_wep_leap (void)
/* ===== WIRELESS SETTING ===== */
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
g_assert (s_wifi);
g_assert_cmpstr (nm_setting_wireless_get_security (s_wifi), ==, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME);
/* ===== WiFi SECURITY SETTING ===== */
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
g_assert (s_wsec);
/* Key management */
@@ -5778,7 +5885,7 @@ test_read_wifi_dynamic_wep_leap (void)
g_assert_cmpstr (nm_setting_wireless_security_get_leap_password (s_wsec), ==, NULL);
/* ===== 802.1x SETTING ===== */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_assert (s_8021x);
/* EAP method should be "leap" */
@@ -5839,7 +5946,7 @@ test_read_wifi_wep_eap_ttls_chap (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-eap-ttls-chap-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_EAP_TTLS_CHAP,
@@ -5847,7 +5954,7 @@ test_read_wifi_wep_eap_ttls_chap (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wifi-wep-eap-ttls-chap-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_EAP_TTLS_CHAP,
@@ -5862,7 +5969,7 @@ test_read_wifi_wep_eap_ttls_chap (void)
NM_SETTING_IP4_CONFIG_METHOD);
/* ===== 802.1x SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-eap-ttls-chap-verify-wireless-security", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_EAP_TTLS_CHAP,
@@ -5882,7 +5989,7 @@ test_read_wifi_wep_eap_ttls_chap (void)
NM_SETTING_WIRELESS_SECURITY_KEY_MGMT);
/* ===== 802.1x SETTING ===== */
- s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ s_8021x = nm_connection_get_setting_802_1x (connection);
ASSERT (s_8021x != NULL,
"wifi-wep-eap-ttls-chap-verify-8021x", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_EAP_TTLS_CHAP,
@@ -6005,7 +6112,7 @@ test_read_wired_qeth_static (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wired-qeth-static-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_QETH_STATIC,
@@ -6026,7 +6133,7 @@ test_read_wired_qeth_static (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"wired-qeth-static-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_QETH_STATIC,
@@ -6116,7 +6223,7 @@ test_read_wired_qeth_static (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"wired-qeth-static-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIRED_QETH_STATIC,
@@ -6247,7 +6354,7 @@ test_read_wifi_wep_no_keys (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"wifi-wep-no-keys-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_NO_KEYS,
@@ -6273,7 +6380,7 @@ test_read_wifi_wep_no_keys (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"wifi-wep-no-keys-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_NO_KEYS,
@@ -6295,7 +6402,7 @@ test_read_wifi_wep_no_keys (void)
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
ASSERT (s_wsec != NULL,
"wifi-wep-no-keys-verify-wireless", "failed to verify %s: missing %s setting",
TEST_IFCFG_WIFI_WEP_NO_KEYS,
@@ -6371,7 +6478,7 @@ test_read_permissions (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"permissions-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_PERMISSIONS,
@@ -6451,13 +6558,13 @@ test_read_wifi_wep_agent_keys (void)
*/
/* ===== WIRELESS SETTING ===== */
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
g_assert (s_wifi);
tmp = nm_setting_wireless_get_security (s_wifi);
g_assert (g_strcmp0 (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0);
/* ===== WIRELESS SECURITY SETTING ===== */
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
g_assert (s_wsec);
g_assert (strcmp (nm_setting_wireless_security_get_key_mgmt (s_wsec), "none") == 0);
@@ -6692,8 +6799,8 @@ test_write_wired_static (void)
* However after re-reading they are dropped into IPv4 setting.
* So, in order to comparison succeeded, move DNS domains back to IPv6 setting.
*/
- reread_s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (reread, NM_TYPE_SETTING_IP4_CONFIG));
- reread_s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (reread, NM_TYPE_SETTING_IP6_CONFIG));
+ reread_s_ip4 = nm_connection_get_setting_ip4_config (reread);
+ reread_s_ip6 = nm_connection_get_setting_ip6_config (reread);
nm_setting_ip6_config_add_dns_search (reread_s_ip6, nm_setting_ip4_config_get_dns_search (reread_s_ip4, 2));
nm_setting_ip6_config_add_dns_search (reread_s_ip6, nm_setting_ip4_config_get_dns_search (reread_s_ip4, 3));
nm_setting_ip4_config_remove_dns_search (reread_s_ip4, 3);
@@ -7018,7 +7125,7 @@ test_read_write_static_routes_legacy (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"read-write-static-routes-legacy-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_READ_WRITE_STATIC_ROUTES_LEGACY,
@@ -7041,7 +7148,7 @@ test_read_write_static_routes_legacy (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"read-write-static-routes-legacy-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_READ_WRITE_STATIC_ROUTES_LEGACY,
@@ -7049,7 +7156,7 @@ test_read_write_static_routes_legacy (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"read-write-static-routes-legacy-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_READ_WRITE_STATIC_ROUTES_LEGACY,
@@ -7628,7 +7735,7 @@ test_write_wired_8021x_tls (NMSetting8021xCKScheme scheme,
* matter what scheme was used in the original connection they will be read
* back in as paths.
*/
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (reread, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (reread);
g_assert (s_8021x);
g_assert_cmpint (nm_setting_802_1x_get_ca_cert_scheme (s_8021x), ==, NM_SETTING_802_1X_CK_SCHEME_PATH);
g_assert_cmpint (nm_setting_802_1x_get_client_cert_scheme (s_8021x), ==, NM_SETTING_802_1X_CK_SCHEME_PATH);
@@ -7657,7 +7764,7 @@ test_write_wired_8021x_tls (NMSetting8021xCKScheme scheme,
* say it's not system-owned, and therefore it should not show up
* in the re-read connection.
*/
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_object_set (s_8021x, NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, NULL, NULL);
}
@@ -10085,7 +10192,7 @@ test_write_wifi_wpa_then_open (void)
g_object_unref (reread);
/* Now change the connection to open and recheck */
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
g_assert (s_wifi);
g_object_set (s_wifi, NM_SETTING_WIRELESS_SEC, NULL, NULL);
nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
@@ -10534,7 +10641,7 @@ test_read_ibft_dhcp (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"ibft-dhcp-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_IBFT_DHCP,
@@ -10581,7 +10688,7 @@ test_read_ibft_dhcp (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"ibft-dhcp-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_IBFT_DHCP,
@@ -10613,7 +10720,7 @@ test_read_ibft_dhcp (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"ibft-dhcp-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_IBFT_DHCP,
@@ -10679,7 +10786,7 @@ test_read_ibft_static (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"ibft-static-verify-connection", "failed to verify %s: missing %s setting",
TEST_IFCFG_IBFT_STATIC,
@@ -10726,7 +10833,7 @@ test_read_ibft_static (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"ibft-static-verify-wired", "failed to verify %s: missing %s setting",
TEST_IFCFG_IBFT_STATIC,
@@ -10758,7 +10865,7 @@ test_read_ibft_static (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"ibft-static-verify-ip4", "failed to verify %s: missing %s setting",
TEST_IFCFG_IBFT_STATIC,
@@ -11754,6 +11861,8 @@ test_read_vlan_interface (void)
char *route6file = NULL;
gboolean ignore_error = FALSE;
GError *error = NULL;
+ NMSettingVlan *s_vlan;
+ guint32 from = 0, to = 0;
connection = connection_from_file (TEST_IFCFG_VLAN_INTERFACE,
NULL,
@@ -11765,13 +11874,844 @@ test_read_vlan_interface (void)
&route6file,
&error,
&ignore_error);
- ASSERT (connection == NULL,
- "vlan-interface-read", "unexpected success reading %s", TEST_IFCFG_VLAN_INTERFACE);
+ g_assert_no_error (error);
+ g_assert (connection != NULL);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_assert (s_vlan);
+
+ g_assert_cmpstr (nm_setting_vlan_get_interface_name (s_vlan), ==, "vlan43");
+ g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "eth9");
+ g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 43);
+ g_assert_cmpint (nm_setting_vlan_get_flags (s_vlan), ==,
+ NM_VLAN_FLAG_GVRP | NM_VLAN_FLAG_LOOSE_BINDING);
+
+ /* Ingress map */
+ g_assert_cmpint (nm_setting_vlan_get_num_priorities (s_vlan, NM_VLAN_INGRESS_MAP), ==, 2);
+
+ g_assert (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_INGRESS_MAP, 0, &from, &to));
+ g_assert_cmpint (from, ==, 0);
+ g_assert_cmpint (to, ==, 1);
+
+ g_assert (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_INGRESS_MAP, 1, &from, &to));
+ g_assert_cmpint (from, ==, 2);
+ g_assert_cmpint (to, ==, 5);
+
+ /* Egress map */
+ g_assert_cmpint (nm_setting_vlan_get_num_priorities (s_vlan, NM_VLAN_EGRESS_MAP), ==, 3);
+
+ g_assert (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_EGRESS_MAP, 0, &from, &to));
+ g_assert_cmpint (from, ==, 12);
+ g_assert_cmpint (to, ==, 3);
+
+ g_assert (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_EGRESS_MAP, 1, &from, &to));
+ g_assert_cmpint (from, ==, 14);
+ g_assert_cmpint (to, ==, 7);
+
+ g_assert (nm_setting_vlan_get_priority (s_vlan, NM_VLAN_EGRESS_MAP, 2, &from, &to));
+ g_assert_cmpint (from, ==, 3);
+ g_assert_cmpint (to, ==, 1);
+
+ g_object_unref (connection);
+}
+
+#define TEST_IFCFG_VLAN_ONLY_VLANID TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-only-vlanid"
+
+static void
+test_read_vlan_only_vlan_id (void)
+{
+ NMConnection *connection;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+ NMSettingVlan *s_vlan;
+
+ connection = connection_from_file (TEST_IFCFG_VLAN_ONLY_VLANID,
+ NULL,
+ TYPE_ETHERNET,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ g_assert_no_error (error);
+ g_assert (connection != NULL);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_assert (s_vlan);
+
+ g_assert (nm_setting_vlan_get_interface_name (s_vlan) == NULL);
+ g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "eth9");
+ g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 43);
+
+ g_object_unref (connection);
+}
+
+#define TEST_IFCFG_VLAN_ONLY_DEVICE TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-only-device"
+
+static void
+test_read_vlan_only_device (void)
+{
+ NMConnection *connection;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+ NMSettingVlan *s_vlan;
+
+ connection = connection_from_file (TEST_IFCFG_VLAN_ONLY_DEVICE,
+ NULL,
+ TYPE_ETHERNET,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ g_assert_no_error (error);
+ g_assert (connection != NULL);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ g_assert (s_vlan);
+
+ g_assert_cmpstr (nm_setting_vlan_get_interface_name (s_vlan), ==, "eth0.9");
+ g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "eth0");
+ g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 9);
+
+ g_object_unref (connection);
+}
+
+static void
+test_write_vlan (void)
+{
+ NMConnection *connection;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ char *written = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+ gboolean success = FALSE;
+
+ connection = connection_from_file (TEST_IFCFG_VLAN_INTERFACE,
+ NULL,
+ TYPE_VLAN,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ g_assert (connection != NULL);
+
+ success = writer_new_connection (connection,
+ TEST_SCRATCH_DIR "/network-scripts/",
+ &written,
+ &error);
+ g_assert (success);
+
+ unlink (written);
+ g_free (written);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+}
+
+static void
+test_write_vlan_only_vlanid (void)
+{
+ NMConnection *connection, *reread;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ char *written = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+ gboolean success = FALSE;
+
+ connection = connection_from_file (TEST_IFCFG_VLAN_ONLY_VLANID,
+ NULL,
+ TYPE_VLAN,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ g_assert_no_error (error);
+ g_assert (connection != NULL);
+
+ g_free (unmanaged);
+ unmanaged = NULL;
+ g_free (keyfile);
+ keyfile = NULL;
+ g_free (routefile);
+ routefile = NULL;
+ g_free (route6file);
+ route6file = NULL;
+
+ success = writer_new_connection (connection,
+ TEST_SCRATCH_DIR "/network-scripts/",
+ &written,
+ &error);
+ g_assert (success);
+
+ /* re-read the connection for comparison */
+ reread = connection_from_file (written,
+ NULL,
+ TYPE_ETHERNET,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ unlink (written);
+ g_free (written);
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+
+ g_assert_no_error (error);
+ g_assert (reread != NULL);
+
+ success = nm_connection_verify (reread, &error);
+ g_assert_no_error (error);
+ g_assert (success);
+
+ success = nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT);
+ g_assert (success);
+
+ g_object_unref (connection);
+ g_object_unref (reread);
+}
+
+#define TEST_IFCFG_BOND_MAIN TEST_IFCFG_DIR"/network-scripts/ifcfg-test-bond-main"
+
+static void
+test_read_bond_main (void)
+{
+ NMConnection *connection;
+ NMSettingBond *s_bond;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+
+ connection = connection_from_file (TEST_IFCFG_BOND_MAIN,
+ NULL,
+ TYPE_ETHERNET,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ ASSERT (connection != NULL,
+ "bond-main-read", "unexpected failure reading %s", TEST_IFCFG_BOND_MAIN);
+
+ ASSERT (nm_connection_verify (connection, &error),
+ "bond-main-read", "failed to verify %s: %s", TEST_IFCFG_BOND_MAIN, error->message);
+
+ /* ===== Bonding SETTING ===== */
+
+ s_bond = nm_connection_get_setting_bond (connection);
+ ASSERT (s_bond != NULL,
+ "bond-main", "failed to verify %s: missing %s setting",
+ TEST_IFCFG_BOND_MAIN,
+ NM_SETTING_BOND_SETTING_NAME);
+
+ ASSERT (g_strcmp0 (nm_setting_bond_get_interface_name (s_bond), "bond0") == 0,
+ "bond-main", "failed to verify %s: DEVICE=%s does not match bond0",
+ TEST_IFCFG_BOND_MAIN, nm_setting_bond_get_interface_name (s_bond));
+
+ ASSERT (g_strcmp0 (nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_MIIMON), "100") == 0,
+ "bond-main", "failed to verify %s: miimon=%s does not match 100",
+ TEST_IFCFG_BOND_MAIN, nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_MIIMON));
g_free (unmanaged);
g_free (keyfile);
g_free (routefile);
g_free (route6file);
+ g_object_unref (connection);
+}
+
+static void
+test_write_bond_main (void)
+{
+ NMConnection *connection;
+ NMConnection *reread;
+ NMSettingConnection *s_con;
+ NMSettingBond *s_bond;
+ NMSettingIP4Config *s_ip4;
+ NMSettingIP6Config *s_ip6;
+ NMSettingWired *s_wired;
+ char *uuid;
+ const guint32 ip1 = htonl (0x01010103);
+ const guint32 gw = htonl (0x01010101);
+ const guint32 prefix = 24;
+ NMIP4Address *addr;
+ gboolean success;
+ GError *error = NULL;
+ char *testfile = NULL;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+
+ connection = nm_connection_new ();
+ ASSERT (connection != NULL,
+ "bond-main-write", "failed to allocate new connection");
+
+ /* Connection setting */
+ s_con = (NMSettingConnection *) nm_setting_connection_new ();
+ ASSERT (s_con != NULL,
+ "bond-main-write", "failed to allocate new %s setting",
+ NM_SETTING_CONNECTION_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_con));
+
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_ID, "Test Write Bond Main",
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_BOND_SETTING_NAME,
+ NULL);
+ g_free (uuid);
+
+ /* Wired setting */
+ s_wired = (NMSettingWired *) nm_setting_wired_new ();
+ ASSERT (s_wired != NULL,
+ "bond-main-write", "failed to allocate new %s setting",
+ NM_SETTING_WIRED_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_wired));
+
+ /* bond setting */
+ s_bond = (NMSettingBond *) nm_setting_bond_new ();
+ ASSERT (s_bond != NULL,
+ "bond-main-write", "failed to allocate new %s setting",
+ NM_SETTING_BOND_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_bond));
+
+ g_object_set (s_bond,
+ NM_SETTING_BOND_INTERFACE_NAME, "bond0",
+ NULL);
+
+ /* IP4 setting */
+ s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
+ ASSERT (s_ip4 != NULL,
+ "bond-main-write", "failed to allocate new %s setting",
+ NM_SETTING_IP4_CONFIG_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip4));
+
+ g_object_set (s_ip4,
+ NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL,
+ NM_SETTING_IP4_CONFIG_MAY_FAIL, TRUE,
+ NULL);
+
+ addr = nm_ip4_address_new ();
+ nm_ip4_address_set_address (addr, ip1);
+ nm_ip4_address_set_prefix (addr, prefix);
+ nm_ip4_address_set_gateway (addr, gw);
+ nm_setting_ip4_config_add_address (s_ip4, addr);
+ nm_ip4_address_unref (addr);
+
+ /* IP6 setting */
+ s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
+ ASSERT (s_ip6 != NULL,
+ "bond-main-write", "failed to allocate new %s setting",
+ NM_SETTING_IP6_CONFIG_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip6));
+
+ g_object_set (s_ip6,
+ NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
+ NULL);
+
+ ASSERT (nm_connection_verify (connection, &error) == TRUE,
+ "bond-main-write", "failed to verify connection: %s",
+ (error && error->message) ? error->message : "(unknown)");
+
+ /* Save the ifcfg */
+ success = writer_new_connection (connection,
+ TEST_SCRATCH_DIR "/network-scripts/",
+ &testfile,
+ &error);
+ ASSERT (success == TRUE,
+ "bond-main-write", "failed to write connection to disk: %s",
+ (error && error->message) ? error->message : "(unknown)");
+
+ ASSERT (testfile != NULL,
+ "bond-main-write", "didn't get ifcfg file path back after writing connection");
+
+ /* re-read the connection for comparison */
+ reread = connection_from_file (testfile,
+ NULL,
+ TYPE_BOND,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ unlink (testfile);
+
+ ASSERT (reread != NULL,
+ "bond-main-write-reread", "failed to read %s: %s", testfile, error->message);
+
+ ASSERT (nm_connection_verify (reread, &error),
+ "bond-main-write-reread-verify", "failed to verify %s: %s", testfile, error->message);
+
+ ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE,
+ "bond-main-write", "written and re-read connection weren't the same.");
+
+ g_free (testfile);
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+ g_object_unref (connection);
+ g_object_unref (reread);
+}
+
+#define TEST_IFCFG_BOND_SLAVE TEST_IFCFG_DIR"/network-scripts/ifcfg-test-bond-slave"
+
+static void
+test_read_bond_slave (void)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+
+ connection = connection_from_file (TEST_IFCFG_BOND_SLAVE,
+ NULL,
+ TYPE_ETHERNET,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ ASSERT (connection != NULL,
+ "bond-slave-read", "unexpected failure reading %s", TEST_IFCFG_BOND_MAIN);
+
+ ASSERT (nm_connection_verify (connection, &error),
+ "bond-slave-read", "failed to verify %s: %s", TEST_IFCFG_BOND_MAIN, error->message);
+
+ s_con = nm_connection_get_setting_connection (connection);
+ ASSERT (s_con != NULL,
+ "bond-slave-read", "failed to verify %s: missing %s setting",
+ TEST_IFCFG_BOND_SLAVE, NM_SETTING_CONNECTION_SETTING_NAME);
+
+ ASSERT (g_strcmp0 (nm_setting_connection_get_master (s_con), "bond0") == 0,
+ "bond-slave-read", "failed to verify %s: master is not bond0",
+ TEST_IFCFG_BOND_SLAVE);
+
+ ASSERT (g_strcmp0 (nm_setting_connection_get_slave_type (s_con), NM_SETTING_BOND_SETTING_NAME) == 0,
+ "bond-slave-read", "failed to verify %s: slave-type is not bond",
+ TEST_IFCFG_BOND_SLAVE);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+ g_object_unref (connection);
+}
+
+static void
+test_write_bond_slave (void)
+{
+ NMConnection *connection;
+ NMConnection *reread;
+ NMSettingConnection *s_con;
+ NMSettingWired *s_wired;
+ NMSettingIP4Config *s_ip4;
+ NMSettingIP6Config *s_ip6;
+ static unsigned char tmpmac[] = { 0x31, 0x33, 0x33, 0x37, 0xbe, 0xcd };
+ GByteArray *mac;
+ guint32 mtu = 1492;
+ char *uuid;
+ gboolean success;
+ GError *error = NULL;
+ char *testfile = NULL;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+
+ connection = nm_connection_new ();
+ ASSERT (connection != NULL,
+ "bond-slave-write", "failed to allocate new connection");
+
+ /* Connection setting */
+ s_con = (NMSettingConnection *) nm_setting_connection_new ();
+ ASSERT (s_con != NULL,
+ "bond-slave-write", "failed to allocate new %s setting",
+ NM_SETTING_CONNECTION_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_con));
+
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_ID, "Test Write Bond Slave",
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
+ NM_SETTING_CONNECTION_MASTER, "bond0",
+ NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BOND_SETTING_NAME,
+ NULL);
+ g_free (uuid);
+
+ /* Wired setting */
+ s_wired = (NMSettingWired *) nm_setting_wired_new ();
+ ASSERT (s_wired != NULL,
+ "bond-main-write", "failed to allocate new %s setting",
+ NM_SETTING_WIRED_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_wired));
+
+ mac = g_byte_array_sized_new (sizeof (tmpmac));
+ g_byte_array_append (mac, &tmpmac[0], sizeof (tmpmac));
+
+ g_object_set (s_wired,
+ NM_SETTING_WIRED_MAC_ADDRESS, mac,
+ NM_SETTING_WIRED_MTU, mtu,
+ NULL);
+ g_byte_array_free (mac, TRUE);
+
+ /* IP4 setting */
+ s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
+ ASSERT (s_ip4 != NULL,
+ "bond-slave-write", "failed to allocate new %s setting",
+ NM_SETTING_IP4_CONFIG_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip4));
+
+ g_object_set (s_ip4,
+ NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_DISABLED,
+ NULL);
+
+ /* IP6 setting */
+ s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
+ ASSERT (s_ip6 != NULL,
+ "bond-slave-write", "failed to allocate new %s setting",
+ NM_SETTING_IP6_CONFIG_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip6));
+
+ g_object_set (s_ip6,
+ NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
+ NM_SETTING_IP6_CONFIG_MAY_FAIL, TRUE,
+ NULL);
+
+ ASSERT (nm_connection_verify (connection, &error) == TRUE,
+ "bond-slave-write", "failed to verify connection: %s",
+ (error && error->message) ? error->message : "(unknown)");
+
+ /* Save the ifcfg */
+ success = writer_new_connection (connection,
+ TEST_SCRATCH_DIR "/network-scripts/",
+ &testfile,
+ &error);
+ ASSERT (success == TRUE,
+ "bond-slave-write", "failed to write connection to disk: %s",
+ (error && error->message) ? error->message : "(unknown)");
+
+ ASSERT (testfile != NULL,
+ "bond-slave-write", "didn't get ifcfg file path back after writing connection");
+
+ /* re-read the connection for comparison */
+ reread = connection_from_file (testfile,
+ NULL,
+ TYPE_ETHERNET,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ unlink (testfile);
+
+ ASSERT (reread != NULL,
+ "bond-slave-write-reread", "failed to read %s: %s", testfile, error->message);
+
+ ASSERT (nm_connection_verify (reread, &error),
+ "bond-slave-write-reread-verify", "failed to verify %s: %s", testfile, error->message);
+
+ ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE,
+ "bond-slave-write", "written and re-read connection weren't the same.");
+
+ if (route6file)
+ unlink (route6file);
+
+ g_free (testfile);
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+ g_object_unref (connection);
+ g_object_unref (reread);
+}
+
+#define TEST_IFCFG_INFINIBAND TEST_IFCFG_DIR"/network-scripts/ifcfg-test-infiniband"
+
+static void
+test_read_infiniband (void)
+{
+ NMConnection *connection;
+ NMSettingInfiniband *s_infiniband;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+ GError *error = NULL;
+ const GByteArray *array;
+ char expected_mac_address[INFINIBAND_ALEN] = { 0x80, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22 };
+ const char *transport_mode;
+
+ connection = connection_from_file (TEST_IFCFG_INFINIBAND,
+ NULL,
+ TYPE_INFINIBAND,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ ASSERT (connection != NULL,
+ "infiniband-read", "failed to read %s: %s", TEST_IFCFG_INFINIBAND, error->message);
+
+ ASSERT (nm_connection_verify (connection, &error),
+ "infiniband-verify", "failed to verify %s: %s", TEST_IFCFG_INFINIBAND, error->message);
+
+ ASSERT (unmanaged == NULL,
+ "infiniband-verify", "failed to verify %s: unexpected unmanaged value", TEST_IFCFG_INFINIBAND);
+
+ /* ===== INFINIBAND SETTING ===== */
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ ASSERT (s_infiniband != NULL,
+ "infiniband-verify-wired", "failed to verify %s: missing %s setting",
+ TEST_IFCFG_INFINIBAND,
+ NM_SETTING_INFINIBAND_SETTING_NAME);
+
+ /* MAC address */
+ array = nm_setting_infiniband_get_mac_address (s_infiniband);
+ ASSERT (array != NULL,
+ "infiniband-verify-infiniband", "failed to verify %s: missing %s / %s key",
+ TEST_IFCFG_INFINIBAND,
+ NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS);
+ ASSERT (array->len == INFINIBAND_ALEN,
+ "infiniband-verify-infiniband", "failed to verify %s: unexpected %s / %s key value length",
+ TEST_IFCFG_INFINIBAND,
+ NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS);
+ ASSERT (memcmp (array->data, &expected_mac_address[0], sizeof (expected_mac_address)) == 0,
+ "infiniband-verify-infiniband", "failed to verify %s: unexpected %s / %s key value",
+ TEST_IFCFG_INFINIBAND,
+ NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS);
+
+ /* Transport mode */
+ transport_mode = nm_setting_infiniband_get_transport_mode (s_infiniband);
+ ASSERT (transport_mode != NULL,
+ "infiniband-verify-infiniband", "failed to verify %s: missing %s / %s key",
+ TEST_IFCFG_INFINIBAND,
+ NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE);
+ ASSERT (strcmp (transport_mode, "connected") == 0,
+ "infiniband-verify-infiniband", "failed to verify %s: unexpected %s / %s key value",
+ TEST_IFCFG_INFINIBAND,
+ NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE);
+
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+ g_object_unref (connection);
+}
+
+static void
+test_write_infiniband (void)
+{
+ NMConnection *connection;
+ NMConnection *reread;
+ NMSettingConnection *s_con;
+ NMSettingInfiniband *s_infiniband;
+ NMSettingIP4Config *s_ip4;
+ NMSettingIP6Config *s_ip6;
+ unsigned char tmpmac[INFINIBAND_ALEN] = { 0x80, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22 };
+ GByteArray *mac;
+ guint32 mtu = 65520;
+ char *uuid;
+ const guint32 ip1 = htonl (0x01010103);
+ const guint32 gw = htonl (0x01010101);
+ const guint32 prefix = 24;
+ NMIP4Address *addr;
+ gboolean success;
+ GError *error = NULL;
+ char *testfile = NULL;
+ char *unmanaged = NULL;
+ char *keyfile = NULL;
+ char *routefile = NULL;
+ char *route6file = NULL;
+ gboolean ignore_error = FALSE;
+
+ connection = nm_connection_new ();
+ ASSERT (connection != NULL,
+ "infiniband-write", "failed to allocate new connection");
+
+ /* Connection setting */
+ s_con = (NMSettingConnection *) nm_setting_connection_new ();
+ ASSERT (s_con != NULL,
+ "infiniband-write", "failed to allocate new %s setting",
+ NM_SETTING_CONNECTION_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_con));
+
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_ID, "Test Write InfiniBand",
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_INFINIBAND_SETTING_NAME,
+ NULL);
+ g_free (uuid);
+
+ /* InfiniBand setting */
+ s_infiniband = (NMSettingInfiniband *) nm_setting_infiniband_new ();
+ ASSERT (s_infiniband != NULL,
+ "infiniband-write", "failed to allocate new %s setting",
+ NM_SETTING_INFINIBAND_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_infiniband));
+
+ mac = g_byte_array_sized_new (sizeof (tmpmac));
+ g_byte_array_append (mac, &tmpmac[0], sizeof (tmpmac));
+
+ g_object_set (s_infiniband,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS, mac,
+ NM_SETTING_INFINIBAND_MTU, mtu,
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE, "connected",
+ NULL);
+ g_byte_array_free (mac, TRUE);
+
+ /* IP4 setting */
+ s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
+ ASSERT (s_ip4 != NULL,
+ "infiniband-write", "failed to allocate new %s setting",
+ NM_SETTING_IP4_CONFIG_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip4));
+
+ g_object_set (s_ip4,
+ NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL,
+ NM_SETTING_IP4_CONFIG_MAY_FAIL, TRUE,
+ NULL);
+
+ addr = nm_ip4_address_new ();
+ nm_ip4_address_set_address (addr, ip1);
+ nm_ip4_address_set_prefix (addr, prefix);
+ nm_ip4_address_set_gateway (addr, gw);
+ nm_setting_ip4_config_add_address (s_ip4, addr);
+ nm_ip4_address_unref (addr);
+
+ /* IP6 setting */
+ s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
+ ASSERT (s_ip6 != NULL,
+ "wired-static-write", "failed to allocate new %s setting",
+ NM_SETTING_IP6_CONFIG_SETTING_NAME);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip6));
+
+ g_object_set (s_ip6,
+ NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
+ NULL);
+
+ ASSERT (nm_connection_verify (connection, &error) == TRUE,
+ "infiniband-write", "failed to verify connection: %s",
+ (error && error->message) ? error->message : "(unknown)");
+
+ /* Save the ifcfg */
+ success = writer_new_connection (connection,
+ TEST_SCRATCH_DIR "/network-scripts/",
+ &testfile,
+ &error);
+ ASSERT (success == TRUE,
+ "infiniband-write", "failed to write connection to disk: %s",
+ (error && error->message) ? error->message : "(unknown)");
+
+ ASSERT (testfile != NULL,
+ "infiniband-write", "didn't get ifcfg file path back after writing connection");
+
+ /* re-read the connection for comparison */
+ reread = connection_from_file (testfile,
+ NULL,
+ TYPE_INFINIBAND,
+ NULL,
+ &unmanaged,
+ &keyfile,
+ &routefile,
+ &route6file,
+ &error,
+ &ignore_error);
+ unlink (testfile);
+
+ ASSERT (reread != NULL,
+ "infiniband-write-reread", "failed to read %s: %s", testfile, error->message);
+
+ ASSERT (nm_connection_verify (reread, &error),
+ "infiniband-write-reread-verify", "failed to verify %s: %s", testfile, error->message);
+
+ ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE,
+ "infiniband-write", "written and re-read connection weren't the same.");
+
+ g_free (testfile);
+ g_free (unmanaged);
+ g_free (keyfile);
+ g_free (routefile);
+ g_free (route6file);
+ g_object_unref (connection);
+ g_object_unref (reread);
}
#define TEST_IFCFG_WIFI_OPEN_SSID_BAD_HEX TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-open-ssid-bad-hex"
@@ -11843,6 +12783,7 @@ int main (int argc, char **argv)
test_read_wifi_leap_secret_flags (TEST_IFCFG_WIFI_LEAP_ALWAYS,
NM_SETTING_SECRET_FLAG_AGENT_OWNED | NM_SETTING_SECRET_FLAG_NOT_SAVED);
test_read_wifi_wpa_psk ();
+ test_read_wifi_wpa_psk_2 ();
test_read_wifi_wpa_psk_unquoted ();
test_read_wifi_wpa_psk_unquoted2 ();
test_read_wifi_wpa_psk_adhoc ();
@@ -11856,6 +12797,10 @@ int main (int argc, char **argv)
test_read_wifi_wep_no_keys ();
test_read_permissions ();
test_read_wifi_wep_agent_keys ();
+ test_read_infiniband ();
+ test_read_vlan_interface ();
+ test_read_vlan_only_vlan_id ();
+ test_read_vlan_only_device ();
test_write_wired_static ();
test_write_wired_static_ip6_only ();
@@ -11908,6 +12853,12 @@ int main (int argc, char **argv)
TRUE,
TRUE,
"really insecure passphrase04!");
+ test_write_wifi_wpa_psk ("Test Write Wifi WPA WPA2 PSK Passphrase Special Chars",
+ "wifi-wpa-wpa2-psk-passphrase-write-spec-chars",
+ FALSE,
+ TRUE,
+ TRUE,
+ "blah`oops\"grr'$*@~!%");
test_write_wifi_wpa_psk_adhoc ();
test_write_wifi_wpa_eap_tls ();
test_write_wifi_wpa_eap_ttls_tls ();
@@ -11919,6 +12870,9 @@ int main (int argc, char **argv)
test_write_wired_ctc_dhcp ();
test_write_permissions ();
test_write_wifi_wep_agent_keys ();
+ test_write_infiniband ();
+ test_write_vlan ();
+ test_write_vlan_only_vlanid ();
/* iSCSI / ibft */
test_read_ibft_dhcp ();
@@ -11930,6 +12884,12 @@ int main (int argc, char **argv)
test_read_ibft_malformed ("ibft-bad-dns1-read", TEST_IFCFG_DIR "/iscsiadm-test-bad-dns1");
test_read_ibft_malformed ("ibft-bad-dns2-read", TEST_IFCFG_DIR "/iscsiadm-test-bad-dns2");
+ /* bonding */
+ test_read_bond_main ();
+ test_read_bond_slave ();
+ test_write_bond_main ();
+ test_write_bond_slave ();
+
/* Stuff we expect to fail for now */
test_write_wired_pppoe ();
test_write_vpn ();
@@ -11937,7 +12897,6 @@ int main (int argc, char **argv)
test_write_mobile_broadband (FALSE);
test_read_bridge_main ();
test_read_bridge_component ();
- test_read_vlan_interface ();
base = g_path_get_basename (argv[0]);
fprintf (stdout, "%s: SUCCESS\n", base);
diff --git a/src/settings/plugins/ifcfg-rh/utils.c b/src/settings/plugins/ifcfg-rh/utils.c
index 92a0b802f..0b7ddf36d 100644
--- a/src/settings/plugins/ifcfg-rh/utils.c
+++ b/src/settings/plugins/ifcfg-rh/utils.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2008 - 2010 Red Hat, Inc.
+ * (C) Copyright 2008 - 2012 Red Hat, Inc.
*/
#include <glib.h>
@@ -116,6 +116,89 @@ utils_hexstr2bin (const char *hex, size_t len)
/* End from hostap */
/*
+ * utils_single_quote_string
+ *
+ * Put string inside single quotes and remove CR, LF characters. If single quote
+ * is present, escape it with a backslash and prepend the whole string with $
+ * in order to have $'string'. That allows us to use single quote inside
+ * single quotes without breaking bash syntax. (man bash, section QUOTING).
+ *
+ * Caller is responsible for freeing the returned string.
+ */
+char *
+utils_single_quote_string (const char *str)
+{
+ static const char const drop_chars[] = "\r\n"; /* drop CR and LF */
+ static const char escape_char = '\\'; /* escape char is backslash */
+ static const char quote_char = '\''; /* quote char is single quote */
+ size_t i, slen, j = 0;
+ size_t drop = 0, extra = 0;
+ char *new_str;
+
+ slen = strlen (str);
+ for (i = 0; i < slen; i++) {
+ if (str[i] == quote_char)
+ extra++;
+ if (strchr (drop_chars, str[i]))
+ drop++;
+ }
+ new_str = g_malloc0 (slen + extra - drop + 4); /* 4 is for $''\0*/
+ if (!new_str) return NULL;
+
+ if (extra > 0)
+ new_str[j++] = '$';
+ new_str[j++] = quote_char;
+ for (i = 0; i < slen; i++) {
+ if (strchr (drop_chars, str[i]))
+ continue;
+ if (str[i] == quote_char)
+ new_str[j++] = escape_char;
+ new_str[j++] = str[i];
+ }
+ new_str[j] = quote_char;
+
+ return new_str;
+}
+
+/*
+ * utils_single_unquote_string
+ *
+ * Remove string from single (or double) quotes, and remove escaping of '.
+ * Also remove first $ if the string is in the form of $'string'.
+ *
+ * Caller is responsible for freeing the returned string.
+ */
+char *
+utils_single_unquote_string (const char *str)
+{
+ static const char escape_char = '\\'; /* escape char is backslash */
+ static const char q_char = '\''; /* quote char is single quote */
+ static const char dq_char = '"'; /* double quote char */
+ size_t i, slen, j = 0, quote = 0, dollar = 0;
+ char *new_str;
+
+ slen = strlen (str);
+ new_str = g_malloc0 (slen + 1);
+ if (!new_str) return NULL;
+
+ if ( (slen >= 2 && (str[0] == dq_char || str[0] == q_char) && str[0] == str[slen-1])
+ || (slen >= 3 && str[0] == '$' && str[1] == q_char && str[1] == str[slen-1])) {
+ quote = 1;
+ if (str[0] == '$') dollar = 1;
+ }
+
+ i = quote + dollar;
+ while (i < slen - quote) {
+ if (str[i] == escape_char && str[i+1] == q_char)
+ i++;
+ new_str[j++] = str[i++];
+ }
+ new_str[j] = '\0';
+
+ return new_str;
+}
+
+/*
* Check ';[a-fA-F0-9]{8}' file suffix used for temporary files by rpm when
* installing packages.
*
@@ -360,3 +443,17 @@ gone:
return ret;
}
+gboolean
+utils_disabling_ip4_config_allowed (NMConnection *connection)
+{
+ NMSettingConnection *s_con;
+
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+
+ /* bonding slaves are allowed to have no ip configuration */
+ if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BOND_SETTING_NAME))
+ return TRUE;
+
+ return FALSE;
+}
diff --git a/src/settings/plugins/ifcfg-rh/utils.h b/src/settings/plugins/ifcfg-rh/utils.h
index d5e3a1335..4fe7303b6 100644
--- a/src/settings/plugins/ifcfg-rh/utils.h
+++ b/src/settings/plugins/ifcfg-rh/utils.h
@@ -15,13 +15,14 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2008 - 2009 Red Hat, Inc.
+ * (C) Copyright 2008 - 2012 Red Hat, Inc.
*/
#ifndef _UTILS_H_
#define _UTILS_H_
#include <glib.h>
+#include <nm-connection.h>
#include "shvar.h"
#include "common.h"
@@ -29,6 +30,10 @@ char *utils_bin2hexstr (const char *bytes, int len, int final_len);
char *utils_hexstr2bin (const char *hex, size_t len);
+char *utils_single_quote_string (const char *str);
+
+char *utils_single_unquote_string (const char *str);
+
char *utils_cert_path (const char *parent, const char *suffix);
const char *utils_get_ifcfg_name (const char *file, gboolean only_ifcfg);
@@ -47,5 +52,7 @@ shvarFile *utils_get_route6_ifcfg (const char *parent, gboolean should_create);
gboolean utils_has_route_file_new_syntax (const char *filename);
+gboolean utils_disabling_ip4_config_allowed (NMConnection *connection);
+
#endif /* _UTILS_H_ */
diff --git a/src/settings/plugins/ifcfg-rh/writer.c b/src/settings/plugins/ifcfg-rh/writer.c
index 068bcda25..e2aa57dda 100644
--- a/src/settings/plugins/ifcfg-rh/writer.c
+++ b/src/settings/plugins/ifcfg-rh/writer.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2009 - 2011 Red Hat, Inc.
+ * Copyright (C) 2009 - 2012 Red Hat, Inc.
*/
#include <ctype.h>
@@ -28,6 +28,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
+#include <netinet/ether.h>
#include <nm-setting-connection.h>
#include <nm-setting-wired.h>
@@ -36,6 +37,7 @@
#include <nm-setting-ip4-config.h>
#include <nm-setting-ip6-config.h>
#include <nm-setting-pppoe.h>
+#include <nm-setting-vlan.h>
#include <nm-utils.h>
#include "common.h"
@@ -456,7 +458,7 @@ write_8021x_setting (NMConnection *connection,
gboolean success = FALSE;
GString *phase2_auth;
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
if (!s_8021x) {
/* If wired, clear KEY_MGMT */
if (wired)
@@ -504,6 +506,24 @@ write_8021x_setting (NMConnection *connection,
if (value && !strcmp (value, "1"))
svSetValue (ifcfg, "IEEE_8021X_PEAP_FORCE_NEW_LABEL", "yes", FALSE);
+ /* PAC file */
+ value = nm_setting_802_1x_get_pac_file (s_8021x);
+ svSetValue (ifcfg, "IEEE_8021X_PAC_FILE", NULL, FALSE);
+ if (value)
+ svSetValue (ifcfg, "IEEE_8021X_PAC_FILE", value, FALSE);
+
+ /* FAST PAC provisioning */
+ value = nm_setting_802_1x_get_phase1_fast_provisioning (s_8021x);
+ svSetValue (ifcfg, "IEEE_8021X_FAST_PROVISIONING", NULL, FALSE);
+ if (value) {
+ if (strcmp (value, "1") == 0)
+ svSetValue (ifcfg, "IEEE_8021X_FAST_PROVISIONING", "allow-unauth", FALSE);
+ else if (strcmp (value, "2") == 0)
+ svSetValue (ifcfg, "IEEE_8021X_FAST_PROVISIONING", "allow-auth", FALSE);
+ else if (strcmp (value, "3") == 0)
+ svSetValue (ifcfg, "IEEE_8021X_FAST_PROVISIONING", "allow-unauth allow-auth", FALSE);
+ }
+
/* Phase2 auth methods */
svSetValue (ifcfg, "IEEE_8021X_INNER_AUTH_METHODS", NULL, FALSE);
phase2_auth = g_string_new (NULL);
@@ -554,7 +574,7 @@ write_wireless_security_setting (NMConnection *connection,
guint32 i, num;
GString *str;
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
if (!s_wsec) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Missing '%s' setting", NM_SETTING_WIRELESS_SECURITY_SETTING_NAME);
@@ -716,24 +736,20 @@ write_wireless_security_setting (NMConnection *connection,
/* WPA Passphrase */
if (wpa) {
- GString *quoted = NULL;
+ char *quoted = NULL;
psk = nm_setting_wireless_security_get_psk (s_wsec);
if (psk && (strlen (psk) != 64)) {
/* Quote the PSK since it's a passphrase */
- quoted = g_string_sized_new (strlen (psk) + 2); /* 2 for quotes */
- g_string_append_c (quoted, '"');
- g_string_append (quoted, psk);
- g_string_append_c (quoted, '"');
+ quoted = utils_single_quote_string (psk);
}
set_secret (ifcfg,
"WPA_PSK",
- quoted ? quoted->str : psk,
+ quoted ? quoted : psk,
"WPA_PSK_FLAGS",
nm_setting_wireless_security_get_psk_flags (s_wsec),
TRUE);
- if (quoted)
- g_string_free (quoted, TRUE);
+ g_free (quoted);
} else {
set_secret (ifcfg,
"WPA_PSK",
@@ -761,7 +777,7 @@ write_wireless_setting (NMConnection *connection,
gboolean adhoc = FALSE, hex_ssid = FALSE;
const GSList *macaddr_blacklist;
- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
if (!s_wireless) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Missing '%s' setting", NM_SETTING_WIRELESS_SETTING_NAME);
@@ -944,6 +960,48 @@ write_wireless_setting (NMConnection *connection,
}
static gboolean
+write_infiniband_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
+{
+ NMSettingInfiniband *s_infiniband;
+ const GByteArray *mac;
+ char *tmp;
+ const char *transport_mode;
+ guint32 mtu;
+
+ s_infiniband = nm_connection_get_setting_infiniband (connection);
+ if (!s_infiniband) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Missing '%s' setting", NM_SETTING_INFINIBAND_SETTING_NAME);
+ return FALSE;
+ }
+
+ svSetValue (ifcfg, "HWADDR", NULL, FALSE);
+ mac = nm_setting_infiniband_get_mac_address (s_infiniband);
+ if (mac) {
+ tmp = nm_utils_hwaddr_ntoa (mac->data, ARPHRD_INFINIBAND);
+ svSetValue (ifcfg, "HWADDR", tmp, FALSE);
+ g_free (tmp);
+ }
+
+ svSetValue (ifcfg, "MTU", NULL, FALSE);
+ mtu = nm_setting_infiniband_get_mtu (s_infiniband);
+ if (mtu) {
+ tmp = g_strdup_printf ("%u", mtu);
+ svSetValue (ifcfg, "MTU", tmp, FALSE);
+ g_free (tmp);
+ }
+
+ transport_mode = nm_setting_infiniband_get_transport_mode (s_infiniband);
+ svSetValue (ifcfg, "CONNECTED_MODE",
+ strcmp (transport_mode, "connected") == 0 ? "yes" : "no",
+ FALSE);
+
+ svSetValue (ifcfg, "TYPE", TYPE_INFINIBAND, FALSE);
+
+ return TRUE;
+}
+
+static gboolean
write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
{
NMSettingWired *s_wired;
@@ -955,7 +1013,7 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
GString *str;
const GSList *macaddr_blacklist;
- s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
if (!s_wired) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Missing '%s' setting", NM_SETTING_WIRED_SETTING_NAME);
@@ -1064,11 +1122,143 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
return TRUE;
}
+static GString *vlan_priority_maplist_to_stringlist (NMSettingVlan *s_vlan, NMVlanPriorityMap map)
+{
+ GSList *strlist = NULL, *iter;
+ GString *value = NULL;
+
+ if (map == NM_VLAN_INGRESS_MAP)
+ g_object_get (G_OBJECT (s_vlan), NM_SETTING_VLAN_INGRESS_PRIORITY_MAP, &strlist, NULL);
+ else if (map == NM_VLAN_EGRESS_MAP)
+ g_object_get (G_OBJECT (s_vlan), NM_SETTING_VLAN_EGRESS_PRIORITY_MAP, &strlist, NULL);
+ else
+ return NULL;
+
+ value = g_string_new ("");
+ for (iter = strlist; iter; iter = g_slist_next (iter))
+ g_string_append_printf (value, "%s%s", value->len ? "," : "", (const char *) iter->data);
+
+ nm_utils_slist_free (strlist, g_free);
+
+ return value;
+}
+
+static gboolean
+write_vlan_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
+{
+ NMSettingVlan *s_vlan;
+ NMSettingConnection *s_con;
+ char *tmp;
+ guint32 vlan_flags = 0;
+ GString *text = NULL;
+
+ s_con = nm_connection_get_setting_connection (connection);
+ if (!s_con) {
+ g_set_error_literal (error, IFCFG_PLUGIN_ERROR, 0, "Missing connection setting");
+ return FALSE;
+ }
+
+ s_vlan = nm_connection_get_setting_vlan (connection);
+ if (!s_vlan) {
+ g_set_error_literal (error, IFCFG_PLUGIN_ERROR, 0, "Missing VLAN setting");
+ return FALSE;
+ }
+
+ svSetValue (ifcfg, "VLAN", "yes", FALSE);
+ svSetValue (ifcfg, "TYPE", TYPE_VLAN, FALSE);
+ svSetValue (ifcfg, "DEVICE", nm_setting_vlan_get_interface_name (s_vlan), FALSE);
+ svSetValue (ifcfg, "PHYSDEV", nm_setting_vlan_get_parent (s_vlan), FALSE);
+ svSetValue (ifcfg, "MASTER", nm_setting_connection_get_master (s_con), FALSE);
+
+ tmp = g_strdup_printf ("%d", nm_setting_vlan_get_id (s_vlan));
+ svSetValue (ifcfg, "VLAN_ID", tmp, FALSE);
+ g_free (tmp);
+
+ vlan_flags = nm_setting_vlan_get_flags (s_vlan);
+ if (vlan_flags & NM_VLAN_FLAG_REORDER_HEADERS)
+ svSetValue (ifcfg, "REORDER_HDR", "1", FALSE);
+ else
+ svSetValue (ifcfg, "REORDER_HDR", "0", FALSE);
+
+ svSetValue (ifcfg, "VLAN_FLAGS", NULL, FALSE);
+ if (vlan_flags & NM_VLAN_FLAG_GVRP) {
+ if (vlan_flags & NM_VLAN_FLAG_LOOSE_BINDING)
+ svSetValue (ifcfg, "VLAN_FLAGS", "GVRP,LOOSE_BINDING", FALSE);
+ else
+ svSetValue (ifcfg, "VLAN_FLAGS", "GVRP", FALSE);
+ } else if (vlan_flags & NM_VLAN_FLAG_LOOSE_BINDING)
+ svSetValue (ifcfg, "VLAN_FLAGS", "LOOSE_BINDING", FALSE);
+
+ text = vlan_priority_maplist_to_stringlist (s_vlan, NM_VLAN_INGRESS_MAP);
+ svSetValue (ifcfg, "VLAN_INGRESS_PRIORITY_MAP", text ? text->str : NULL, FALSE);
+ if (text)
+ g_string_free (text, TRUE);
+
+ text = vlan_priority_maplist_to_stringlist (s_vlan, NM_VLAN_EGRESS_MAP);
+ svSetValue (ifcfg, "VLAN_EGRESS_PRIORITY_MAP", text ? text->str : NULL, FALSE);
+ if (text)
+ g_string_free (text, TRUE);
+
+ return TRUE;
+}
+
+static gboolean
+write_bonding_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
+{
+ NMSettingBond *s_bond;
+ const char *iface;
+ guint32 i, num_opts;
+
+ s_bond = nm_connection_get_setting_bond (connection);
+ if (!s_bond) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
+ "Missing '%s' setting", NM_SETTING_BOND_SETTING_NAME);
+ return FALSE;
+ }
+
+ iface = nm_setting_bond_get_interface_name (s_bond);
+ if (!iface) {
+ g_set_error (error, IFCFG_PLUGIN_ERROR, 0, "Missing interface name");
+ return FALSE;
+ }
+
+ svSetValue (ifcfg, "DEVICE", iface, FALSE);
+ svSetValue (ifcfg, "BONDING_OPTS", NULL, FALSE);
+
+ num_opts = nm_setting_bond_get_num_options (s_bond);
+ if (num_opts > 0) {
+ GString *str = g_string_sized_new (64);
+
+ for (i = 0; i < nm_setting_bond_get_num_options (s_bond); i++) {
+ const char *key, *value;
+
+ if (!nm_setting_bond_get_option (s_bond, i, &key, &value))
+ continue;
+
+ if (str->len)
+ g_string_append_c (str, ' ');
+
+ g_string_append_printf (str, "%s=%s", key, value);
+ }
+
+ if (str->len)
+ svSetValue (ifcfg, "BONDING_OPTS", str->str, FALSE);
+
+ g_string_free (str, TRUE);
+ }
+
+ svSetValue (ifcfg, "TYPE", TYPE_BOND, FALSE);
+ svSetValue (ifcfg, "BONDING_MASTER", "yes", FALSE);
+
+ return TRUE;
+}
+
static void
write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
{
guint32 n, i;
GString *str;
+ const char *master;
svSetValue (ifcfg, "NAME", nm_setting_connection_get_id (s_con), FALSE);
svSetValue (ifcfg, "UUID", nm_setting_connection_get_uuid (s_con), FALSE);
@@ -1097,6 +1287,14 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
svSetValue (ifcfg, "USERS", str->str, FALSE);
g_string_free (str, TRUE);
}
+
+ svSetValue (ifcfg, "ZONE", nm_setting_connection_get_zone(s_con), FALSE);
+
+ master = nm_setting_connection_get_master (s_con);
+ if (master) {
+ if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BOND_SETTING_NAME))
+ svSetValue (ifcfg, "MASTER", master, FALSE);
+ }
}
static gboolean
@@ -1172,7 +1370,7 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
gboolean fake_ip4 = FALSE;
const char *method = NULL;
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (s_ip4)
method = nm_setting_ip4_config_get_method (s_ip4);
@@ -1509,7 +1707,7 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
GString *ip_str1, *ip_str2, *ip_ptr;
char *route6_path;
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (!s_ip6) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Missing '%s' setting", NM_SETTING_IP6_CONFIG_SETTING_NAME);
@@ -1587,7 +1785,7 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
}
/* Write out DNS - 'DNS' key is used both for IPv4 and IPv6 */
- s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
num4 = s_ip4 ? nm_setting_ip4_config_get_num_dns (s_ip4) : 0; /* from where to start with IPv6 entries */
num = nm_setting_ip6_config_get_num_dns (s_ip6);
for (i = 0; i < 254; i++) {
@@ -1644,6 +1842,24 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
nm_setting_ip6_config_get_may_fail (s_ip6) ? "no" : "yes",
FALSE);
+ /* IPv6 Privacy Extensions */
+ svSetValue (ifcfg, "IPV6_PRIVACY", NULL, FALSE);
+ svSetValue (ifcfg, "IPV6_PRIVACY_PREFER_PUBLIC_IP", NULL, FALSE);
+ switch (nm_setting_ip6_config_get_ip6_privacy (s_ip6)){
+ case NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED:
+ svSetValue (ifcfg, "IPV6_PRIVACY", "no", FALSE);
+ break;
+ case NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR:
+ svSetValue (ifcfg, "IPV6_PRIVACY", "rfc3041", FALSE);
+ svSetValue (ifcfg, "IPV6_PRIVACY_PREFER_PUBLIC_IP", "yes", FALSE);
+ break;
+ case NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR:
+ svSetValue (ifcfg, "IPV6_PRIVACY", "rfc3041", FALSE);
+ break;
+ default:
+ break;
+ }
+
/* Static routes go to route6-<dev> file */
route6_path = utils_get_route6_path (ifcfg->fileName);
if (!route6_path) {
@@ -1665,6 +1881,7 @@ error:
static char *
escape_id (const char *id)
{
+ static const char const as_dash[] = "\\][|/=()!";
char *escaped = g_strdup (id);
char *p = escaped;
@@ -1672,9 +1889,7 @@ escape_id (const char *id)
while (*p) {
if (*p == ' ')
*p = '_';
- else if (*p == '/')
- *p = '-';
- else if (*p == '\\')
+ else if (strchr (as_dash, *p))
*p = '-';
p++;
}
@@ -1691,6 +1906,7 @@ write_connection (NMConnection *connection,
GError **error)
{
NMSettingConnection *s_con;
+ NMSettingIP4Config *s_ip4;
NMSettingIP6Config *s_ip6;
gboolean success = FALSE;
shvarFile *ifcfg = NULL;
@@ -1699,7 +1915,7 @@ write_connection (NMConnection *connection,
gboolean no_8021x = FALSE;
gboolean wired = FALSE;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
if (!s_con) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Missing '%s' setting", NM_SETTING_CONNECTION_SETTING_NAME);
@@ -1759,7 +1975,7 @@ write_connection (NMConnection *connection,
if (!strcmp (type, NM_SETTING_WIRED_SETTING_NAME)) {
// FIXME: can't write PPPoE at this time
- if (nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE)) {
+ if (nm_connection_get_setting_pppoe (connection)) {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Can't write connection type '%s'",
NM_SETTING_PPPOE_SETTING_NAME);
@@ -1769,9 +1985,18 @@ write_connection (NMConnection *connection,
if (!write_wired_setting (connection, ifcfg, error))
goto out;
wired = TRUE;
+ } else if (!strcmp (type, NM_SETTING_VLAN_SETTING_NAME)) {
+ if (!write_vlan_setting (connection, ifcfg, error))
+ goto out;
} else if (!strcmp (type, NM_SETTING_WIRELESS_SETTING_NAME)) {
if (!write_wireless_setting (connection, ifcfg, &no_8021x, error))
goto out;
+ } else if (!strcmp (type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
+ if (!write_infiniband_setting (connection, ifcfg, error))
+ goto out;
+ } else if (!strcmp (type, NM_SETTING_BOND_SETTING_NAME)) {
+ if (!write_bonding_setting (connection, ifcfg, error))
+ goto out;
} else {
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
"Can't write connection type '%s'", type);
@@ -1783,10 +2008,13 @@ write_connection (NMConnection *connection,
goto out;
}
- if (!write_ip4_setting (connection, ifcfg, error))
- goto out;
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
+ if (s_ip4 || !utils_disabling_ip4_config_allowed (connection)) {
+ if (!write_ip4_setting (connection, ifcfg, error))
+ goto out;
+ }
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6) {
if (!write_ip6_setting (connection, ifcfg, error))
goto out;
diff --git a/src/settings/plugins/ifcfg-suse/Makefile.in b/src/settings/plugins/ifcfg-suse/Makefile.in
index dfa84086d..ac5283425 100644
--- a/src/settings/plugins/ifcfg-suse/Makefile.in
+++ b/src/settings/plugins/ifcfg-suse/Makefile.in
@@ -170,6 +170,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -224,11 +226,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -239,6 +245,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -278,6 +285,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/src/settings/plugins/ifcfg-suse/plugin.c b/src/settings/plugins/ifcfg-suse/plugin.c
index 78db56e50..2ec90d81c 100644
--- a/src/settings/plugins/ifcfg-suse/plugin.c
+++ b/src/settings/plugins/ifcfg-suse/plugin.c
@@ -18,7 +18,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2007 - 2009 Red Hat, Inc.
+ * (C) Copyright 2007 - 2011 Red Hat, Inc.
* (C) Copyright 2007 - 2008 Novell, Inc.
*/
@@ -309,7 +309,7 @@ system_config_interface_init (NMSystemConfigInterface *system_config_interface_c
}
G_MODULE_EXPORT GObject *
-nm_system_config_factory (void)
+nm_system_config_factory (const char *config_file)
{
static SCPluginIfcfg *singleton = NULL;
diff --git a/src/settings/plugins/ifnet/Makefile.am b/src/settings/plugins/ifnet/Makefile.am
index 9bf8a79a1..84deda5b3 100644
--- a/src/settings/plugins/ifnet/Makefile.am
+++ b/src/settings/plugins/ifnet/Makefile.am
@@ -45,13 +45,13 @@ lib_ifnet_io_la_SOURCES = \
wpa_parser.c
lib_ifnet_io_la_CPPFLAGS = \
- $(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- -DG_DISABLE_DEPRECATED \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DSBINDIR=\"$(sbindir)\"
+ $(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS) \
+ -DG_DISABLE_DEPRECATED \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DSBINDIR=\"$(sbindir)\"
lib_ifnet_io_la_LIBADD = \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(GLIB_LIBS)\
- $(GIO_LIBS)
+ $(top_builddir)/libnm-util/libnm-util.la \
+ $(GLIB_LIBS)\
+ $(GIO_LIBS)
diff --git a/src/settings/plugins/ifnet/Makefile.in b/src/settings/plugins/ifnet/Makefile.in
index 8218b85a1..322adbf80 100644
--- a/src/settings/plugins/ifnet/Makefile.in
+++ b/src/settings/plugins/ifnet/Makefile.in
@@ -218,6 +218,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -272,11 +274,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -287,6 +293,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -326,6 +333,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -433,16 +442,16 @@ lib_ifnet_io_la_SOURCES = \
wpa_parser.c
lib_ifnet_io_la_CPPFLAGS = \
- $(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- -DG_DISABLE_DEPRECATED \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DSBINDIR=\"$(sbindir)\"
+ $(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS) \
+ -DG_DISABLE_DEPRECATED \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DSBINDIR=\"$(sbindir)\"
lib_ifnet_io_la_LIBADD = \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(GLIB_LIBS)\
- $(GIO_LIBS)
+ $(top_builddir)/libnm-util/libnm-util.la \
+ $(GLIB_LIBS)\
+ $(GIO_LIBS)
all: all-recursive
diff --git a/src/settings/plugins/ifnet/connection_parser.c b/src/settings/plugins/ifnet/connection_parser.c
index b4aaa8d2f..78812f977 100644
--- a/src/settings/plugins/ifnet/connection_parser.c
+++ b/src/settings/plugins/ifnet/connection_parser.c
@@ -45,12 +45,6 @@
#include "connection_parser.h"
#include "nm-ifnet-connection.h"
-static const char *
-get_prefix (void)
-{
- return _("System");
-}
-
static void
update_connection_id (NMConnection *connection, const char *conn_name)
{
@@ -62,16 +56,12 @@ update_connection_id (NMConnection *connection, const char *conn_name)
name_len = strlen (conn_name);
if ((name_len > 2) && (g_str_has_prefix (conn_name, "0x"))) {
- gchar * conn_name_printable = utils_hexstr2bin (conn_name + 2, name_len - 2);
- idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name_printable);
- g_free (conn_name_printable);
+ idstr = utils_hexstr2bin (conn_name + 2, name_len - 2);
} else
- idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name);
+ idstr = g_strdup_printf ("%s", conn_name);
uuid_base = idstr;
uuid = nm_utils_uuid_generate_from_string (uuid_base);
- setting =
- (NMSettingConnection *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_CONNECTION);
+ setting = nm_connection_get_setting_connection (connection);
g_object_set (setting, NM_SETTING_CONNECTION_ID, idstr,
NM_SETTING_CONNECTION_UUID, uuid, NULL);
PLUGIN_PRINT (IFNET_PLUGIN_NAME,
@@ -509,20 +499,17 @@ static gboolean
read_mac_address (const char *conn_name, GByteArray **array, GError **error)
{
const char *value = ifnet_get_data (conn_name, "mac");
- struct ether_addr *mac;
if (!value || !strlen (value))
return TRUE;
- mac = ether_aton (value);
- if (!mac) {
+ *array = nm_utils_hwaddr_atoba (value, ARPHRD_ETHER);
+ if (!*array) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
- "The MAC address '%s' was invalid.", value);
+ "The MAC address '%s' was invalid.", value);
return FALSE;
}
- *array = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (*array, (guint8 *) mac->ether_addr_octet, ETH_ALEN);
return TRUE;
}
@@ -567,7 +554,7 @@ make_wired_connection_setting (NMConnection *connection,
nm_connection_add_setting (connection, NM_SETTING (s_wired));
}
-/* add NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME,
+/* add NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME,
* NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID in future*/
static void
make_ip4_setting (NMConnection *connection,
@@ -596,19 +583,19 @@ make_ip4_setting (NMConnection *connection,
g_object_unref (ip4_setting);
return;
}
- if (!strcmp (method, "dhcp"))
+ if (strstr (method, "dhcp"))
g_object_set (ip4_setting,
NM_SETTING_IP4_CONFIG_METHOD,
NM_SETTING_IP4_CONFIG_METHOD_AUTO,
NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, FALSE, NULL);
- else if (!strcmp (method, "autoip")){
+ else if (strstr (method, "autoip")) {
g_object_set (ip4_setting,
NM_SETTING_IP4_CONFIG_METHOD,
NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL,
NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, FALSE, NULL);
nm_connection_add_setting (connection, NM_SETTING (ip4_setting));
return;
- } else if (!strcmp (method, "shared")){
+ } else if (strstr (method, "shared")) {
g_object_set (ip4_setting,
NM_SETTING_IP4_CONFIG_METHOD,
NM_SETTING_IP4_CONFIG_METHOD_SHARED,
@@ -663,7 +650,7 @@ make_ip4_setting (NMConnection *connection,
}
/* add dhcp hostname and client id */
- if (!is_static_block && !strcmp (method, "dhcp")) {
+ if (!is_static_block && strstr (method, "dhcp")) {
gchar *dhcp_hostname, *client_id;
get_dhcp_hostname_and_client_id (&dhcp_hostname, &client_id);
@@ -868,7 +855,7 @@ make_ip6_setting (NMConnection *connection,
nm_ip6_route_set_dest (route, iblock->ip);
nm_ip6_route_set_next_hop (route, iblock->next_hop);
nm_ip6_route_set_prefix (route, iblock->prefix);
- /* metric is not per routes configuration right now
+ /* metric is not per routes configuration right now
* global metric is also supported (metric="x") */
if ((metric_str = ifnet_get_data (conn_name, "metric")) != NULL) {
metric = strtol (metric_str, NULL, 10);
@@ -995,7 +982,7 @@ make_wireless_connection_setting (const char *conn_name,
goto error;
}
- /* mode=0: infrastructure
+ /* mode=0: infrastructure
* mode=1: adhoc */
value = wpa_get_value (conn_name, "mode");
if (value)
@@ -1012,18 +999,15 @@ make_wireless_connection_setting (const char *conn_name,
/* BSSID setting */
value = wpa_get_value (conn_name, "bssid");
if (value) {
- struct ether_addr *eth;
GByteArray *bssid;
- eth = ether_aton (value);
- if (!eth) {
+ bssid = nm_utils_hwaddr_atoba (value, ARPHRD_ETHER);
+ if (!bssid) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
- "Invalid BSSID '%s'", value);
+ "Invalid BSSID '%s'", value);
goto error;
}
- bssid = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (bssid, eth->ether_addr_octet, ETH_ALEN);
g_object_set (wireless_setting, NM_SETTING_WIRELESS_BSSID,
bssid, NULL);
g_byte_array_free (bssid, TRUE);
@@ -1666,9 +1650,7 @@ ifnet_update_connection_from_config_block (const char *conn_name, GError **error
connection = nm_connection_new ();
if (!connection)
return NULL;
- setting =
- (NMSettingConnection *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_CONNECTION);
+ setting = nm_connection_get_setting_connection (connection);
if (!setting) {
setting = NM_SETTING_CONNECTION (nm_setting_connection_new ());
g_assert (setting);
@@ -2021,10 +2003,7 @@ write_8021x_setting (NMConnection *connection,
GString *phase2_auth;
GString *phase1;
- s_8021x =
- (NMSetting8021x *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_802_1X);
-
+ s_8021x = nm_connection_get_setting_802_1x (connection);
if (!s_8021x) {
return TRUE;
}
@@ -2119,9 +2098,7 @@ write_wireless_security_setting (NMConnection * connection,
guint32 i, num;
GString *str;
- s_wsec =
- (NMSettingWirelessSecurity *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
if (!s_wsec) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
"Missing '%s' setting",
@@ -2171,7 +2148,6 @@ write_wireless_security_setting (NMConnection * connection,
wpa_set_data (conn_name, "auth_alg", NULL);
/* Default WEP TX key index */
- wpa_set_data (conn_name, "wep_tx_keyidx", NULL);
if (wep) {
tmp =
g_strdup_printf ("%d",
@@ -2179,7 +2155,8 @@ write_wireless_security_setting (NMConnection * connection,
(s_wsec));
wpa_set_data (conn_name, "wep_tx_keyidx", tmp);
g_free (tmp);
- }
+ } else
+ wpa_set_data (conn_name, "wep_tx_keyidx", NULL);
/* WEP keys */
for (i = 0; i < 4; i++) {
@@ -2287,7 +2264,7 @@ write_wireless_setting (NMConnection *connection,
gboolean adhoc = FALSE, hex_ssid = FALSE;
gchar *ssid_str, *tmp;
- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
if (!s_wireless) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
"Missing '%s' setting",
@@ -2406,9 +2383,7 @@ write_wired_setting (NMConnection *connection,
char *tmp;
guint32 mtu;
- s_wired =
- (NMSettingWired *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
if (!s_wired) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
"Missing '%s' setting",
@@ -2462,9 +2437,7 @@ write_ip4_setting (NMConnection *connection, const char *conn_name, GError **err
gboolean has_def_route = FALSE;
gboolean success = FALSE;
- s_ip4 =
- (NMSettingIP4Config *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_IP4_CONFIG);
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
if (!s_ip4) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
"Missing '%s' setting",
@@ -2668,9 +2641,7 @@ write_ip6_setting (NMConnection *connection, const char *conn_name, GError **err
NMIP6Address *addr;
const struct in6_addr *ip;
- s_ip6 =
- (NMSettingIP6Config *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (!s_ip6) {
g_set_error (error, ifnet_plugin_error_quark (), 0,
"Missing '%s' setting",
@@ -2856,7 +2827,7 @@ ifnet_update_parsers_by_connection (NMConnection *connection,
NMSettingPPPOE *s_pppoe;
/* Writing pppoe setting */
- s_pppoe = NM_SETTING_PPPOE (nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE));
+ s_pppoe = nm_connection_get_setting_pppoe (connection);
if (!write_pppoe_setting (conn_name, s_pppoe))
goto out;
pppoe = TRUE;
@@ -2884,7 +2855,7 @@ ifnet_update_parsers_by_connection (NMConnection *connection,
if (!write_ip4_setting (connection, conn_name, error))
goto out;
- s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6) {
/* IPv6 Setting */
if (!write_ip6_setting (connection, conn_name, error))
@@ -2972,9 +2943,7 @@ get_wireless_name (NMConnection * connection)
char buf[33];
int i = 0;
- s_wireless =
- (NMSettingWireless *) nm_connection_get_setting (connection,
- NM_TYPE_SETTING_WIRELESS);
+ s_wireless = nm_connection_get_setting_wireless (connection);
if (!s_wireless)
return NULL;
@@ -3020,7 +2989,7 @@ ifnet_add_new_connection (NMConnection *connection,
const char *type;
gchar *new_type, *new_name = NULL;
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
type = nm_setting_connection_get_connection_type (s_con);
g_assert (type);
diff --git a/src/settings/plugins/ifnet/net_parser.c b/src/settings/plugins/ifnet/net_parser.c
index a48103db8..38765f5fe 100644
--- a/src/settings/plugins/ifnet/net_parser.c
+++ b/src/settings/plugins/ifnet/net_parser.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <nm-system-config-interface.h>
#include <stdio.h>
+#include "plugin.h"
#include "net_parser.h"
#include "net_utils.h"
@@ -106,7 +107,6 @@ ignore_connection_name (const char *name)
if (strlen (name) == 12 && is_hex (name))
result = TRUE;
return result;
-
}
static gboolean
@@ -169,12 +169,10 @@ init_block_by_line (gchar * buf)
conn = add_new_connection_config ("wireless", pos);
}
data = g_strdup (key_value[1]);
- tmp = strip_string (data, '(');
- tmp = strip_string (tmp, ')');
- strip_string (tmp, '"');
+ tmp = strip_string (data, '"');
strip_string (tmp, '\'');
if (conn)
- g_hash_table_insert (conn, g_strdup (key_value[0]),
+ g_hash_table_insert (conn, strip_string (g_strdup (key_value[0]), ' '),
g_strdup (tmp));
g_free (data);
g_strfreev (key_value);
@@ -195,26 +193,31 @@ destroy_connection_config (GHashTable * conn)
g_hash_table_destroy (conn);
}
-// read settings from /etc/NetworkManager/nm-system-settings.conf
+/* Read settings from NetworkManager's config file */
const char *
ifnet_get_global_setting (const char *group, const char *key)
{
GError *error = NULL;
GKeyFile *keyfile = g_key_file_new ();
gchar *result = NULL;
+ const char *conf_file;
+
+ /* Get confing file name from plugin. */
+ conf_file = ifnet_plugin_get_conf_file ();
if (!g_key_file_load_from_file (keyfile,
- IFNET_SYSTEM_SETTINGS_KEY_FILE,
+ conf_file,
G_KEY_FILE_NONE, &error)) {
PLUGIN_WARN (IFNET_PLUGIN_NAME,
"loading system config file (%s) caused error: (%d) %s",
- IFNET_SYSTEM_SETTINGS_KEY_FILE,
+ conf_file,
error ? error->code : -1, error
&& error->message ? error->message : "(unknown)");
} else {
result = g_key_file_get_string (keyfile, group, key, &error);
}
g_key_file_free (keyfile);
+
return result;
}
@@ -283,6 +286,20 @@ is_function (gchar * line)
return FALSE;
}
+static void
+append_line (GString *buf, gchar* line)
+{
+ gchar *pos = NULL;
+
+ if ((pos = strchr (line, '#')) != NULL)
+ *pos = '\0';
+ g_strstrip (line);
+
+ if (line[0] != '\0')
+ g_string_append_printf (buf, " %s", line);
+ g_free (line);
+}
+
gboolean
ifnet_init (gchar * config_file)
{
@@ -292,6 +309,8 @@ ifnet_init (gchar * config_file)
/* Handle multiple lines with brackets */
gboolean complete = TRUE;
+ gboolean openrc_style = TRUE;
+
/* line buffer */
GString *buf;
@@ -319,36 +338,60 @@ ifnet_init (gchar * config_file)
strip_function (channel, line);
continue;
}
- if (line[0] != '#' && line[0] != '\0') {
- gchar *pos = NULL;
+ // New openrc style, bash arrays are not allowed. We only care about '"'
+ if (openrc_style && line[0] != '#' && line[0] != '\0'
+ && !strchr (line, '(') && !strchr (line, ')')) {
+ gchar *tmp = line;
+
+ while ((tmp = strchr (tmp, '"')) != NULL) {
+ complete = !complete;
+ ++tmp;
+ }
+
+ append_line (buf, line);
+ // Add "(separator) for routes. It will be easier for later parsing
+ if (strstr (buf->str, "via"))
+ g_string_append_printf (buf, "\"");
+
+ if (!complete)
+ continue;
+
+ strip_string (buf->str, '"');
+
+ init_block_by_line (buf->str);
+ g_string_free (buf, TRUE);
+ buf = g_string_new (NULL);
+ }
+ // Old bash arrays for baselayout-1, to be deleted
+ else if (line[0] != '#' && line[0] != '\0') {
if (!complete) {
complete =
g_strrstr (line,
")") == NULL ? FALSE : TRUE;
- if ((pos = strchr (line, '#')) != NULL)
- *pos = '\0';
- g_strstrip (line);
- if (line[0] != '\0') {
- g_string_append_printf (buf,
- " %s", line);
- }
- g_free (line);
- if (!complete)
+
+ append_line (buf, line);
+ if (!complete) {
+ openrc_style = FALSE;
continue;
+ }
+ else {
+ openrc_style = TRUE;
+ }
} else {
complete =
(g_strrstr (line, "(") != NULL
&& g_strrstr (line, ")") != NULL)
|| g_strrstr (line, "(") == NULL;
- if ((pos = strchr (line, '#')) != NULL)
- *pos = '\0';
- g_strstrip (line);
- if (line[0] != '\0')
- g_string_append (buf, line);
- g_free (line);
+
+ append_line (buf, line);
if (!complete)
+ {
+ openrc_style = FALSE;
continue;
+ } else {
+ openrc_style = TRUE;
+ }
}
init_block_by_line (buf->str);
g_string_free (buf, TRUE);
@@ -374,6 +417,34 @@ ifnet_get_data (const char *conn_name, const char *key)
return NULL;
}
+/* format ip values for comparison */
+static gchar*
+format_ip_for_comparison (const gchar * value)
+{
+ gchar **ipset;
+ guint length, i;
+ GString *formated_string = g_string_new (NULL);
+ gchar *formatted = NULL;
+
+ ipset = g_strsplit (value, "\"", 0);
+ length = g_strv_length (ipset);
+
+ for (i = 0; i < length; i++)
+ {
+ strip_string (ipset[i], ' ');
+ if (ipset[i][0] != '\0')
+ g_string_append_printf (formated_string,
+ "%s ", ipset[i]);
+ }
+ formatted = g_strdup (formated_string->str);
+ formatted[formated_string->len - 1] = '\0';
+
+ g_string_free (formated_string, TRUE);
+ g_strfreev (ipset);
+
+ return formatted;
+}
+
void
ifnet_set_data (const char *conn_name, const char *key, const char *value)
{
@@ -391,7 +462,31 @@ ifnet_set_data (const char *conn_name, const char *key, const char *value)
}
/* Remove existing key value pair */
if (g_hash_table_lookup_extended (conn, key, &old_key, &old_value)) {
- if (stripped && !strcmp(old_value, stripped)){
+
+ /* This ugly hack is due to baselayout compatibility. We have to
+ * deal with different ip format. So sometimes we have the same ips
+ * but different strings.
+ */
+ if (stripped &&
+ (!strcmp (key, "config")
+ || !strcmp (key, "routes")
+ || !strcmp (key, "pppd")
+ || !strcmp (key, "chat")))
+ {
+ gchar *old_ips = format_ip_for_comparison (old_value);
+ gchar *new_ips = format_ip_for_comparison (value);
+ if(!strcmp (old_ips, new_ips))
+ {
+ g_free (stripped);
+ g_free (old_ips);
+ g_free (new_ips);
+ return;
+ }
+ g_free (old_ips);
+ g_free (new_ips);
+ }
+
+ if (stripped && !strcmp (old_value, stripped)) {
g_free (stripped);
return;
}
@@ -436,22 +531,28 @@ format_ips (gchar * value, gchar ** out_line, gchar * key, gchar * name)
guint length, i;
GString *formated_string = g_string_new (NULL);
+ strip_string (value, '(');
+ strip_string (value, ')');
strip_string (value, '"');
- ipset = g_strsplit (value, "\" \"", 0);
+ ipset = g_strsplit (value, "\"", 0);
length = g_strv_length (ipset);
//only one line
if (length < 2) {
*out_line =
- g_strdup_printf ("%s_%s=( \"%s\" )\n", key, name, value);
+ g_strdup_printf ("%s_%s=\"%s\"\n", key, name, value);
goto done;
}
// Multiple lines
- g_string_append_printf (formated_string, "%s_%s=(\n", key, name);
+ g_string_append_printf (formated_string, "%s_%s=\"\n", key, name);
for (i = 0; i < length; i++)
- g_string_append_printf (formated_string,
- "\t\"%s\"\n", ipset[i]);
- g_string_append (formated_string, ")\n");
+ {
+ strip_string (ipset[i], ' ');
+ if (ipset[i][0] != '\0')
+ g_string_append_printf (formated_string,
+ "%s\n", ipset[i]);
+ }
+ g_string_append (formated_string, "\"\n");
*out_line = g_strdup (formated_string->str);
done:
g_string_free (formated_string, TRUE);
@@ -466,7 +567,7 @@ ifnet_flush_to_file (const char *config_file)
gpointer key, value, name, network;
GHashTableIter iter, iter_network;
GList *list_iter;
- gchar *out_line;
+ gchar *out_line = NULL;
gsize bytes_written;
gboolean result = FALSE;
@@ -475,6 +576,8 @@ ifnet_flush_to_file (const char *config_file)
if (!conn_table || !global_settings_table)
return FALSE;
+ backup_file (config_file);
+
channel = g_io_channel_new_file (config_file, "w", NULL);
if (!channel) {
PLUGIN_WARN (IFNET_PLUGIN_NAME,
diff --git a/src/settings/plugins/ifnet/net_parser.h b/src/settings/plugins/ifnet/net_parser.h
index 0411e939e..5dcc7e253 100644
--- a/src/settings/plugins/ifnet/net_parser.h
+++ b/src/settings/plugins/ifnet/net_parser.h
@@ -24,8 +24,8 @@
#include <glib.h>
-#define CONF_NET_FILE "/etc/conf.d/net"
-#define IFNET_SYSTEM_SETTINGS_KEY_FILE "/etc/NetworkManager/nm-system-settings.conf"
+#define CONF_NET_FILE SYSCONFDIR "/conf.d/net"
+#define IFNET_SYSTEM_SETTINGS_KEY_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf"
#define IFNET_KEY_FILE_GROUP "ifnet"
gboolean ifnet_init (gchar * config_file);
diff --git a/src/settings/plugins/ifnet/net_utils.c b/src/settings/plugins/ifnet/net_utils.c
index b533ae3f2..f1687479e 100644
--- a/src/settings/plugins/ifnet/net_utils.c
+++ b/src/settings/plugins/ifnet/net_utils.c
@@ -26,6 +26,7 @@
#include <errno.h>
#include <nm-utils.h>
#include <nm-system-config-interface.h>
+#include <gio/gio.h>
#include "net_utils.h"
#include "wpa_parser.h"
#include "net_parser.h"
@@ -242,8 +243,7 @@ read_hostname (const char *path)
if (g_str_has_prefix (all_lines[i], "hostname")) {
tmp = strstr (all_lines[i], "=");
tmp++;
- tmp = strip_string (tmp, '"');
- result = g_strdup (tmp);
+ result = g_shell_unquote (tmp, NULL);
break;
}
@@ -352,6 +352,49 @@ is_ip6_address (const char *in_address)
}
+// 'c' is only used for openrc style
+static gchar **
+split_addresses_by_char (const gchar *addresses, const gchar *c)
+{
+ gchar **ipset;
+
+ if (addresses == NULL)
+ return NULL;
+
+ if (strchr (addresses, '(') != NULL) { // old baselayout style
+ gchar *tmp = g_strdup (addresses);
+ strip_string (tmp, '(');
+ strip_string (tmp, ')');
+ strip_string (tmp, '"');
+ strip_string (tmp, '\'');
+ ipset = g_strsplit (tmp, "\" \"", 0);
+ g_free(tmp);
+ } else { // openrc style
+ if (strstr (addresses, "netmask"))
+ // There is only one ip address if "netmask" is specified.
+ // '\n' is not used in config so there will be only one split.
+ ipset = g_strsplit (addresses, "\n", 0);
+ else
+ ipset = g_strsplit (addresses, c, 0);
+ }
+
+ return ipset;
+}
+
+static gchar **
+split_addresses (const gchar* addresses)
+{
+ // " " is only used by openrc style
+ return split_addresses_by_char (addresses, " ");
+}
+
+static gchar **
+split_routes (const gchar* routes)
+{
+ // "\"" is only used by openrc style
+ return split_addresses_by_char (routes, "\"");
+}
+
gboolean
has_ip6_address (const char *conn_name)
{
@@ -360,7 +403,7 @@ has_ip6_address (const char *conn_name)
guint i;
g_return_val_if_fail (conn_name != NULL, FALSE);
- ipset = g_strsplit (ifnet_get_data (conn_name, "config"), "\" \"", 0);
+ ipset = split_addresses (ifnet_get_data (conn_name, "config"));
length = g_strv_length (ipset);
for (i = 0; i < length; i++) {
if (!is_ip6_address (ipset[i]))
@@ -512,8 +555,11 @@ get_ip4_gateway (gchar * gateway)
tmp = g_strdup (tmp);
strip_string (tmp, ' ');
strip_string (tmp, '"');
+
+ // Only one gateway is selected
if ((split = strstr (tmp, "\"")) != NULL)
*split = '\0';
+
if (!inet_pton (AF_INET, tmp, &tmp_ip4_addr))
goto error;
g_free (tmp);
@@ -567,14 +613,11 @@ convert_ip4_config_block (const char *conn_name)
gchar *ip;
guint32 def_gateway = 0;
const char *routes;
- gchar *pos;
ip_block *start = NULL, *current = NULL, *iblock = NULL;
- const char *pattern =
- "((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.)\\{(\\d{1,3})\\.\\.(\\d{1,3})\\}(/\\d{1,2}))";
g_return_val_if_fail (conn_name != NULL, NULL);
- ipset = g_strsplit (ifnet_get_data (conn_name, "config"), "\" \"", 0);
+ ipset = split_addresses (ifnet_get_data (conn_name, "config"));
length = g_strv_length (ipset);
routes = ifnet_get_data (conn_name, "routes");
@@ -584,73 +627,16 @@ convert_ip4_config_block (const char *conn_name)
for (i = 0; i < length; i++) {
ip = ipset[i];
ip = strip_string (ip, '"');
- //Handle ip like 192.168.4.{1..3}
- if ((pos = strchr (ip, '{')) != NULL) {
- gchar *ip_start, *ip_prefix;
- gchar *begin_str, *end_str;
- int begin, end, j;
- GRegex *regex;
- GMatchInfo *match_info;
-
- regex = g_regex_new (pattern, 0, 0, NULL);
- g_regex_match (regex, ip, 0, &match_info);
- g_regex_unref (regex);
-
- if (!g_match_info_matches (match_info)) {
- g_match_info_free (match_info);
- continue;
- }
- begin_str = g_match_info_fetch (match_info, 3);
- end_str = g_match_info_fetch (match_info, 4);
- begin = atoi (begin_str);
- end = atoi (end_str);
- ip_start = g_match_info_fetch (match_info, 2);
- ip_prefix = g_match_info_fetch (match_info, 5);
- if (end < begin || begin < 1 || end > 254) {
- g_match_info_free (match_info);
- continue;
- }
-
- for (j = begin; j <= end; j++) {
- char suf[4];
- gchar *newip;
-
- sprintf (suf, "%d", j);
- newip =
- g_strconcat (ip_start, suf, ip_prefix,
- NULL);
- iblock = create_ip4_block (newip);
- if (iblock == NULL) {
- g_free (newip);
- continue;
- }
- if (!iblock->gateway && def_gateway != 0)
- iblock->gateway = def_gateway;
- if (start == NULL)
- start = current = iblock;
- else {
- current->next = iblock;
- current = iblock;
- }
- g_free (newip);
- }
- g_free (begin_str);
- g_free (end_str);
- g_free (ip_start);
- g_free (ip_prefix);
- g_match_info_free (match_info);
- } else {
- iblock = create_ip4_block (ip);
- if (iblock == NULL)
- continue;
- if (!iblock->gateway && def_gateway != 0)
- iblock->gateway = def_gateway;
- if (start == NULL)
- start = current = iblock;
- else {
- current->next = iblock;
- current = iblock;
- }
+ iblock = create_ip4_block (ip);
+ if (iblock == NULL)
+ continue;
+ if (!iblock->gateway && def_gateway != 0)
+ iblock->gateway = def_gateway;
+ if (start == NULL)
+ start = current = iblock;
+ else {
+ current->next = iblock;
+ current = iblock;
}
}
g_strfreev (ipset);
@@ -667,7 +653,7 @@ convert_ip6_config_block (const char *conn_name)
ip6_block *start = NULL, *current = NULL, *iblock = NULL;
g_return_val_if_fail (conn_name != NULL, NULL);
- ipset = g_strsplit (ifnet_get_data (conn_name, "config"), "\" \"", 0);
+ ipset = split_addresses (ifnet_get_data (conn_name, "config"));
length = g_strv_length (ipset);
for (i = 0; i < length; i++) {
ip = ipset[i];
@@ -693,15 +679,11 @@ convert_ip4_routes_block (const char *conn_name)
guint length;
guint i;
gchar *ip;
- const char *routes;
ip_block *start = NULL, *current = NULL, *iblock = NULL;
g_return_val_if_fail (conn_name != NULL, NULL);
- routes = ifnet_get_data (conn_name, "routes");
- if (!routes)
- return NULL;
- ipset = g_strsplit (routes, "\" \"", 0);
+ ipset = split_routes (ifnet_get_data (conn_name, "routes"));
length = g_strv_length (ipset);
for (i = 0; i < length; i++) {
ip = ipset[i];
@@ -731,15 +713,11 @@ convert_ip6_routes_block (const char *conn_name)
guint length;
guint i;
gchar *ip, *tmp_addr;
- const char *routes;
ip6_block *start = NULL, *current = NULL, *iblock = NULL;
struct in6_addr *tmp_ip6_addr;
g_return_val_if_fail (conn_name != NULL, NULL);
- routes = ifnet_get_data (conn_name, "routes");
- if (!routes)
- return NULL;
- ipset = g_strsplit (routes, "\" \"", 0);
+ ipset = split_routes (ifnet_get_data (conn_name, "routes"));
length = g_strv_length (ipset);
for (i = 0; i < length; i++) {
ip = ipset[i];
@@ -897,8 +875,8 @@ void
get_dhcp_hostname_and_client_id (char **hostname, char **client_id)
{
const char *dhcp_client;
- const gchar *dhcpcd_conf = "/etc/dhcpcd.conf";
- const gchar *dhclient_conf = "/etc/dhcp/dhclient.conf";
+ const gchar *dhcpcd_conf = SYSCONFDIR "/dhcpcd.conf";
+ const gchar *dhclient_conf = SYSCONFDIR "/dhcp/dhclient.conf";
gchar *line = NULL, *tmp = NULL, *contents = NULL;
gchar **all_lines;
guint line_num, i;
@@ -972,3 +950,20 @@ get_dhcp_hostname_and_client_id (char **hostname, char **client_id)
g_strfreev (all_lines);
g_free (contents);
}
+
+void backup_file (const gchar* target)
+{
+ GFile *source, *backup;
+ gchar* backup_path;
+ GError **error = NULL;
+
+ source = g_file_new_for_path (target);
+ backup_path = g_strdup_printf ("%s.bak", target);
+ backup = g_file_new_for_path (backup_path);
+
+ g_file_copy (source, backup, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, error);
+ if (error && *error)
+ PLUGIN_WARN (IFNET_PLUGIN_NAME, "Backup failed: %s", (*error)->message);
+
+ g_free (backup_path);
+}
diff --git a/src/settings/plugins/ifnet/net_utils.h b/src/settings/plugins/ifnet/net_utils.h
index 42f8d6725..dee491439 100644
--- a/src/settings/plugins/ifnet/net_utils.h
+++ b/src/settings/plugins/ifnet/net_utils.h
@@ -77,4 +77,5 @@ gboolean is_true (const char *str);
void get_dhcp_hostname_and_client_id (char **hostname, char **client_id);
+void backup_file (const gchar* target);
#endif
diff --git a/src/settings/plugins/ifnet/plugin.c b/src/settings/plugins/ifnet/plugin.c
index 590836884..fff83805f 100644
--- a/src/settings/plugins/ifnet/plugin.c
+++ b/src/settings/plugins/ifnet/plugin.c
@@ -48,6 +48,7 @@
typedef struct {
GHashTable *config_connections;
gchar *hostname;
+ char *conf_file;
gboolean unmanaged_well_known;
GFileMonitor *hostname_monitor;
@@ -180,7 +181,7 @@ monitor_file_changes (const char *filename,
/* Callback for nm_settings_connection_replace_and_commit. Report any errors
* encountered when commiting connection settings updates. */
static void
-commit_cb (NMSettingsConnection *connection, GError *error, gpointer unused)
+commit_cb (NMSettingsConnection *connection, GError *error, gpointer unused)
{
if (error) {
PLUGIN_WARN (IFNET_PLUGIN_NAME, " error updating: %s",
@@ -188,8 +189,7 @@ commit_cb (NMSettingsConnection *connection, GError *error, gpointer unused)
} else {
NMSettingConnection *s_con;
- s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection),
- NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (NM_CONNECTION (connection));
g_assert (s_con);
PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Connection %s updated",
nm_setting_connection_get_id (s_con));
@@ -317,6 +317,26 @@ reload_connections (gpointer config)
g_list_free (conn_names);
}
+static void
+check_flagged_secrets (NMSetting *setting,
+ const char *key,
+ const GValue *value,
+ GParamFlags flags,
+ gpointer user_data)
+{
+ gboolean *is_system_secret = user_data;
+
+ if (flags & NM_SETTING_PARAM_SECRET) {
+ NMSettingSecretFlags secret_flags = NM_SETTING_SECRET_FLAG_NONE;
+
+ nm_setting_get_secret_flags (setting, key, &secret_flags, NULL);
+
+ if (secret_flags != NM_SETTING_SECRET_FLAG_NONE) {
+ *is_system_secret = TRUE;
+ }
+ }
+}
+
static NMSettingsConnection *
add_connection (NMSystemConfigInterface *config,
NMConnection *source,
@@ -324,11 +344,28 @@ add_connection (NMSystemConfigInterface *config,
{
NMIfnetConnection *connection = NULL;
char *conn_name;
+ gboolean has_flagged_secrets = FALSE;
+ NMSettingConnection *s_con;
+
+ s_con = nm_connection_get_setting_connection (source);
+ g_assert (s_con);
+
+ /* If the connection is not available for all users, ignore
+ * it as this plugin only deals with System Connections */
+ if (nm_setting_connection_get_num_permissions (s_con))
+ return NULL;
+
+ /* If the connection has flagged secrets, ignore
+ * it as this plugin does not deal with user agent service */
+ nm_connection_for_each_setting_value (source, check_flagged_secrets, &has_flagged_secrets);
+
+ if (!has_flagged_secrets) {
+ conn_name = ifnet_add_new_connection (source, CONF_NET_FILE, WPA_SUPPLICANT_CONF, error);
+ if (conn_name)
+ connection = nm_ifnet_connection_new (conn_name, source);
+ reload_connections (config);
+ }
- conn_name = ifnet_add_new_connection (source, CONF_NET_FILE, WPA_SUPPLICANT_CONF, error);
- if (conn_name)
- connection = nm_ifnet_connection_new (conn_name, source);
- reload_connections (config);
return connection ? NM_SETTINGS_CONNECTION (connection) : NULL;
}
@@ -494,6 +531,7 @@ dispose (GObject * object)
}
g_free (priv->hostname);
+ g_free (priv->conf_file);
ifnet_destroy ();
wpa_parser_destroy ();
G_OBJECT_CLASS (sc_plugin_ifnet_parent_class)->dispose (object);
@@ -527,16 +565,37 @@ sc_plugin_ifnet_class_init (SCPluginIfnetClass * req_class)
NM_SYSTEM_CONFIG_INTERFACE_HOSTNAME);
}
+const char *
+ifnet_plugin_get_conf_file (void)
+{
+ SCPluginIfnet *ifnet_plugin;
+ SCPluginIfnetPrivate *priv;
+
+ /* Get config file name. Plugin's singleton has already been created
+ * with correct config file path, so the string passed here has no efect
+ * and we get the valid file name.
+ */
+ ifnet_plugin = SC_PLUGIN_IFNET (nm_system_config_factory ("fake string"));
+ priv = SC_PLUGIN_IFNET_GET_PRIVATE (ifnet_plugin);
+ g_object_unref (ifnet_plugin);
+
+ return priv->conf_file;
+}
+
G_MODULE_EXPORT GObject *
-nm_system_config_factory (void)
+nm_system_config_factory (const char *config_file)
{
static SCPluginIfnet *singleton = NULL;
+ SCPluginIfnetPrivate *priv;
- if (!singleton)
- singleton
- =
- SC_PLUGIN_IFNET (g_object_new (SC_TYPE_PLUGIN_IFNET, NULL));
- else
+ if (!singleton) {
+ singleton = SC_PLUGIN_IFNET (g_object_new (SC_TYPE_PLUGIN_IFNET, NULL));
+ if (singleton) {
+ priv = SC_PLUGIN_IFNET_GET_PRIVATE (singleton);
+ priv->conf_file = strdup (config_file);
+ }
+ } else
g_object_ref (singleton);
+
return G_OBJECT (singleton);
}
diff --git a/src/settings/plugins/ifnet/plugin.h b/src/settings/plugins/ifnet/plugin.h
index 83099b63a..eecab1596 100644
--- a/src/settings/plugins/ifnet/plugin.h
+++ b/src/settings/plugins/ifnet/plugin.h
@@ -43,5 +43,7 @@ struct _SCPluginIfnetClass {
GObjectClass parent;
};
+const char * ifnet_plugin_get_conf_file (void);
+
GType sc_plugin_ifnet_get_type (void);
#endif
diff --git a/src/settings/plugins/ifnet/tests/Makefile.in b/src/settings/plugins/ifnet/tests/Makefile.in
index fe7f40e2f..02ee121f0 100644
--- a/src/settings/plugins/ifnet/tests/Makefile.in
+++ b/src/settings/plugins/ifnet/tests/Makefile.in
@@ -141,6 +141,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -195,11 +197,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -210,6 +216,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -249,6 +256,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/src/settings/plugins/ifnet/tests/net b/src/settings/plugins/ifnet/tests/net
index 0eef399a9..27d39f448 100644
--- a/src/settings/plugins/ifnet/tests/net
+++ b/src/settings/plugins/ifnet/tests/net
@@ -27,10 +27,9 @@ config_eth2=(
routes_eth2=("default via 4321:0:1:2:3:4:567:89ab")
enable_ipv6_eth2="true"
config_eth3=("nufjlsjlll")
-managed_eth4=("false")
+managed_eth4="false"
routes_eth4=("default via 4321:0:1:2:3:4:567:89ab")
config_eth5=("dhcp")
-config_eth6=("192.168.4.{1..101}/24")
config_eth7=( "dhcp" )
auto_eth7="true"
@@ -38,6 +37,14 @@ auto_eth7="true"
# missing config_eth8
auto_eth8="true"
+#new openrc style
+config_eth9="202.117.16.10/24 202.117.17.10/24"
+routes_eth9="default via 202.117.16.1
+10.0.0.0/8 via 192.168.0.1
+"
+config_eth10="202.117.16.2 netmask 255.255.255.0"
+routes_eth10="10.0.0.0/8 via 192.168.0.1"
+
config_myxjtu2=("202.117.16.121/24 brd 202.117.16.255")
routes_myxjtu2=("default via 202.117.16.1")
dns_servers_myxjtu2="202.117.0.20 202.117.0.21"
diff --git a/src/settings/plugins/ifnet/tests/test_all.c b/src/settings/plugins/ifnet/tests/test_all.c
index 52d9ce2ad..50441d4e0 100644
--- a/src/settings/plugins/ifnet/tests/test_all.c
+++ b/src/settings/plugins/ifnet/tests/test_all.c
@@ -33,11 +33,21 @@
#include "wpa_parser.h"
#include "connection_parser.h"
+/* Fake config file function to make the linker happy */
+const char *ifnet_plugin_get_conf_file (void);
+
+const char *
+ifnet_plugin_get_conf_file (void)
+{
+ return "/etc/foo/barasdfasdfasdfasdf";
+}
+
+
static void
test_getdata ()
{
ASSERT (ifnet_get_data ("eth1", "config")
- && strcmp (ifnet_get_data ("eth1", "config"), "dhcp") == 0,
+ && strcmp (ifnet_get_data ("eth1", "config"), "( \"dhcp\" )") == 0,
"get data", "config_eth1 is not correct");
ASSERT (ifnet_get_data ("ppp0", "username")
&& strcmp (ifnet_get_data ("ppp0", "username"), "user") == 0,
@@ -84,7 +94,7 @@ test_is_static ()
ASSERT (is_static_ip4 ("eth0") == TRUE, "is static",
"a static interface is recognized as dhcp");
ASSERT (!is_static_ip6 ("eth0") == TRUE, "is static",
- "a static interface is recognized as dhcp");
+ "a dhcp interface is recognized as static");
}
static void
@@ -182,10 +192,6 @@ test_convert_ipv4_config_block ()
ASSERT (iblock == NULL, "convert config_block",
"convert error configuration");
destroy_ip_block (iblock);
- iblock = convert_ip4_config_block ("eth6");
- ASSERT (iblock != NULL, "convert config_block",
- "convert error configuration");
- destroy_ip_block (iblock);
}
static void
@@ -200,6 +206,16 @@ test_convert_ipv4_routes_block ()
destroy_ip_block (tmp);
ASSERT (iblock == NULL, "convert ip4 routes",
"should only get one route");
+
+ iblock = convert_ip4_routes_block ("eth9");
+ tmp = iblock;
+
+ ASSERT (iblock != NULL, "convert ip4 routes", "should get one route");
+ check_ip_block (iblock, "10.0.0.0", "255.0.0.0", "192.168.0.1");
+ iblock = iblock->next;
+ destroy_ip_block (tmp);
+ ASSERT (iblock == NULL, "convert ip4 routes",
+ "should only get one route");
}
static void
@@ -222,6 +238,9 @@ test_wpa_parser ()
"wep_key0 of static-wep-test should be abcde, find %s", value);
ASSERT (exist_ssid ("leap-example"), "get wsec",
"ssid leap-example is not found");
+
+ value = wpa_get_value ("test-with-hash-in-psk", "psk");
+ g_assert_cmpstr (value, ==, "\"xjtudlc3731###asdfasdfasdf\"");
}
static void
@@ -272,6 +291,18 @@ test_new_connection ()
"new connection failed: %s",
error ? error->message : "NONE");
g_object_unref (connection);
+
+ connection = ifnet_update_connection_from_config_block ("eth9", &error);
+ ASSERT (connection != NULL, "new connection",
+ "new connection(eth9) failed: %s",
+ error ? error->message : "NONE");
+ g_object_unref (connection);
+
+ connection = ifnet_update_connection_from_config_block ("eth10", &error);
+ ASSERT (connection != NULL, "new connection",
+ "new connection(eth10) failed: %s",
+ error ? error->message : "NONE");
+ g_object_unref (connection);
}
#define NET_GEN_NAME "net.generate"
diff --git a/src/settings/plugins/ifnet/tests/wpa_supplicant.conf b/src/settings/plugins/ifnet/tests/wpa_supplicant.conf
index 4f5f68cf9..609ee0e10 100644
--- a/src/settings/plugins/ifnet/tests/wpa_supplicant.conf
+++ b/src/settings/plugins/ifnet/tests/wpa_supplicant.conf
@@ -863,3 +863,10 @@ network={
phase2="auth=CHAP"
priority=20
}
+
+network={
+ ssid="test-with-hash-in-psk"
+ key_mgmt=WPA-PSK
+ psk="xjtudlc3731###asdfasdfasdf"
+}
+
diff --git a/src/settings/plugins/ifnet/wpa_parser.c b/src/settings/plugins/ifnet/wpa_parser.c
index da2bc3bb9..0fd7d16bd 100644
--- a/src/settings/plugins/ifnet/wpa_parser.c
+++ b/src/settings/plugins/ifnet/wpa_parser.c
@@ -124,7 +124,7 @@ add_key_value (GHashTable * network, gchar * line)
g_strstrip (key_value[0]);
g_strstrip (key_value[1]);
- /* Reserve quotes for psk, wep_key, ssid
+ /* Reserve quotes for psk, wep_key, ssid
* Quotes will determine whether they are hex format */
if (strcmp (key_value[0], "psk") != 0
&& !g_str_has_prefix (key_value[0], "wep_key")
@@ -162,7 +162,7 @@ add_one_wep_key (GHashTable * table, int key_num, gchar * one_wep_key)
}
}
-/* Reading wep security information from /etc/conf.d/net.
+/* Reading wep security information from /etc/conf.d/net.
* This should not be used in futre, use wpa_supplicant instead. */
static void
add_keys_from_net ()
@@ -279,16 +279,21 @@ wpa_parser_init (const char *wpa_supplicant_conf)
} else {
GHashTable *network =
g_hash_table_new (g_str_hash, g_str_equal);
- gchar *tmp;
do {
+ gchar *quote_start, *quote_end = NULL, *comment;
+
if (line[0] == '#' || line[0] == '\0') {
g_free (line);
continue;
}
- /* ignore inline comments */
- if ((tmp = strchr (line, '#')) != NULL)
- *tmp = '\0';
+ /* ignore inline comments unless inside
+ a double-quoted string */
+ if ((quote_start = strchr (line, '"')) != NULL)
+ quote_end = strrchr (quote_start + 1, '"');
+ if ((comment = strchr ((quote_end != NULL) ?
+ quote_end : line, '#')) != NULL)
+ *comment = '\0';
if (strstr (line, "}") != NULL)
complete = TRUE;
add_key_value (network, line);
@@ -371,6 +376,8 @@ wpa_flush_to_file (const char *config_file)
if (!wsec_table || !wsec_global_table)
return FALSE;
+ backup_file (config_file);
+
channel = g_io_channel_new_file (config_file, "w", NULL);
if (!channel) {
PLUGIN_WARN (IFNET_PLUGIN_NAME,
diff --git a/src/settings/plugins/ifnet/wpa_parser.h b/src/settings/plugins/ifnet/wpa_parser.h
index 7fd77a056..3a0d377e5 100644
--- a/src/settings/plugins/ifnet/wpa_parser.h
+++ b/src/settings/plugins/ifnet/wpa_parser.h
@@ -21,8 +21,11 @@
#ifndef _WPA_PARSER_H
#define _WPA_PARSER_H
-#define WPA_SUPPLICANT_CONF "/etc/wpa_supplicant/wpa_supplicant.conf"
+
#include <glib.h>
+
+#define WPA_SUPPLICANT_CONF SYSCONFDIR "/wpa_supplicant/wpa_supplicant.conf"
+
void wpa_parser_init (const char *wpa_supplicant_conf);
void wpa_parser_destroy (void);
diff --git a/src/settings/plugins/ifupdown/Makefile.in b/src/settings/plugins/ifupdown/Makefile.in
index 98dded68d..f5087648a 100644
--- a/src/settings/plugins/ifupdown/Makefile.in
+++ b/src/settings/plugins/ifupdown/Makefile.in
@@ -217,6 +217,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -271,11 +273,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -286,6 +292,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -325,6 +332,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
diff --git a/src/settings/plugins/ifupdown/interface_parser.c b/src/settings/plugins/ifupdown/interface_parser.c
index b7c642423..38ed14792 100644
--- a/src/settings/plugins/ifupdown/interface_parser.c
+++ b/src/settings/plugins/ifupdown/interface_parser.c
@@ -294,6 +294,19 @@ const char *ifparser_getkey(if_block* iface, const char *key)
return NULL;
}
+gboolean
+ifparser_haskey(if_block* iface, const char *key)
+{
+ if_data *curr = iface->info;
+
+ while (curr != NULL) {
+ if (strcmp (curr->key, key) == 0)
+ return TRUE;
+ curr = curr->next;
+ }
+ return FALSE;
+}
+
int ifparser_get_num_info(if_block* iface)
{
int i = 0;
diff --git a/src/settings/plugins/ifupdown/interface_parser.h b/src/settings/plugins/ifupdown/interface_parser.h
index 0c1de23a5..e68abcf64 100644
--- a/src/settings/plugins/ifupdown/interface_parser.h
+++ b/src/settings/plugins/ifupdown/interface_parser.h
@@ -24,6 +24,8 @@
#ifndef _INTERFACE_PARSER_H
#define _INTERFACE_PARSER_H
+#include <glib.h>
+
typedef struct _if_data
{
char *key;
@@ -45,6 +47,7 @@ void ifparser_destroy(void);
if_block *ifparser_getif(const char* iface);
if_block *ifparser_getfirst(void);
const char *ifparser_getkey(if_block* iface, const char *key);
+gboolean ifparser_haskey(if_block* iface, const char *key);
int ifparser_get_num_blocks(void);
int ifparser_get_num_info(if_block* iface);
diff --git a/src/settings/plugins/ifupdown/parser.c b/src/settings/plugins/ifupdown/parser.c
index dc2f8abf6..6927f43fd 100644
--- a/src/settings/plugins/ifupdown/parser.c
+++ b/src/settings/plugins/ifupdown/parser.c
@@ -25,6 +25,7 @@
#include <arpa/inet.h>
#include <stdlib.h>
#include <errno.h>
+#include <ctype.h>
#include <nm-connection.h>
#include <NetworkManager.h>
@@ -311,8 +312,7 @@ update_wireless_security_setting_from_if_block(NMConnection *connection,
return;
}
- s_wireless = NM_SETTING_WIRELESS(nm_connection_get_setting(connection,
- NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless(connection);
g_return_if_fail(s_wireless);
PLUGIN_PRINT ("SCPlugin-Ifupdown","update wireless security settings (%s).", block->name);
@@ -433,96 +433,263 @@ eni_plugin_error_quark() {
return error_quark;
}
-
static void
+ifupdown_ip4_add_dns (NMSettingIP4Config *s_ip4, const char *dns)
+{
+ struct in_addr addr;
+ char **list, **iter;
+
+ if (dns == NULL)
+ return;
+
+ list = g_strsplit_set (dns, " \t", -1);
+ for (iter = list; iter && *iter; iter++) {
+ g_strstrip (*iter);
+ if (isblank (*iter[0]))
+ continue;
+ if (!inet_pton (AF_INET, *iter, &addr)) {
+ PLUGIN_WARN ("SCPlugin-Ifupdown",
+ " warning: ignoring invalid nameserver '%s'", *iter);
+ continue;
+ }
+
+ if (!nm_setting_ip4_config_add_dns (s_ip4, addr.s_addr)) {
+ PLUGIN_WARN ("SCPlugin-Ifupdown",
+ " warning: duplicate DNS domain '%s'", *iter);
+ }
+ }
+ g_strfreev (list);
+}
+
+static gboolean
update_ip4_setting_from_if_block(NMConnection *connection,
- if_block *block)
+ if_block *block,
+ GError **error)
{
- NMSettingIP4Config *ip4_setting = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new());
+ NMSettingIP4Config *s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new());
const char *type = ifparser_getkey(block, "inet");
gboolean is_static = type && !strcmp("static", type);
- if(!is_static) {
- g_object_set(ip4_setting,
- NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO,
- NULL);
+ if (!is_static) {
+ g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
} else {
- struct in_addr tmp_ip4_addr;
- NMIP4Address *ip4_addr = nm_ip4_address_new ();
-
- const char *address_v = ifparser_getkey(block, "address");
- const char *netmask_v = ifparser_getkey(block, "netmask");
- const char *gateway_v = ifparser_getkey(block, "gateway");
- const char *nameserver_v = ifparser_getkey(block, "dns-nameserver");
- const char *nameservers_v = ifparser_getkey(block, "dns-nameservers");
- GSList* nameservers_list = NULL;
- GSList* nameservers_list_i = NULL;
- GError *error = NULL;
-
- if(nameservers_v)
- nameservers_list_i = nameservers_list = string_to_glist_of_strings (nameservers_v);
- if(nameserver_v)
- nameservers_list_i = nameservers_list = g_slist_append(nameservers_list, g_strdup(nameserver_v));
-
- if (!address_v)
- address_v = g_strdup ("0.0.0.0");
-
- if (inet_pton (AF_INET, address_v, &tmp_ip4_addr))
- nm_ip4_address_set_address (ip4_addr, tmp_ip4_addr.s_addr);
- else
- g_set_error (&error, eni_plugin_error_quark (), 0,
- "Invalid %s IP4 address '%s'", "address", address_v);
- if (!netmask_v)
- netmask_v = g_strdup( "255.255.255.255");
-
- if (inet_pton (AF_INET, netmask_v, &tmp_ip4_addr))
- nm_ip4_address_set_prefix (ip4_addr, nm_utils_ip4_netmask_to_prefix(tmp_ip4_addr.s_addr));
- else
- g_set_error (&error, eni_plugin_error_quark (), 0,
- "Invalid %s IP4 address '%s'", "netmask", netmask_v);
+ struct in_addr tmp_addr, tmp_mask, tmp_gw;
+ NMIP4Address *addr;
+ const char *address_v;
+ const char *netmask_v;
+ const char *gateway_v;
+ const char *nameserver_v;
+ const char *nameservers_v;
+ const char *search_v;
+ char **list, **iter;
+ guint32 netmask_int = 32;
+
+ /* Address */
+ address_v = ifparser_getkey (block, "address");
+ if (!address_v || !inet_pton (AF_INET, address_v, &tmp_addr)) {
+ g_set_error (error, eni_plugin_error_quark (), 0,
+ "Missing IPv4 address '%s'",
+ address_v ? address_v : "(none)");
+ goto error;
+ }
+ /* mask/prefix */
+ netmask_v = ifparser_getkey (block, "netmask");
+ if (netmask_v) {
+ if (!inet_pton (AF_INET, netmask_v, &tmp_mask)) {
+ g_set_error (error, eni_plugin_error_quark (), 0,
+ "Invalid IPv4 netmask '%s'", netmask_v);
+ goto error;
+ }
+ netmask_int = nm_utils_ip4_netmask_to_prefix (tmp_mask.s_addr);
+ }
+
+ /* gateway */
+ gateway_v = ifparser_getkey (block, "gateway");
if (!gateway_v)
- gateway_v = g_strdup (address_v);
+ gateway_v = address_v; /* dcbw: whaaa?? */
+ if (!inet_pton (AF_INET, gateway_v, &tmp_gw)) {
+ g_set_error (error, eni_plugin_error_quark (), 0,
+ "Invalid IPv4 gateway '%s'", gateway_v);
+ goto error;
+ }
- if (inet_pton (AF_INET, gateway_v, &tmp_ip4_addr))
- nm_ip4_address_set_gateway (ip4_addr, tmp_ip4_addr.s_addr);
- else
- g_set_error (&error, eni_plugin_error_quark (), 0,
- "Invalid %s IP4 address '%s'", "gateway", gateway_v);
+ /* Add the new address to the setting */
+ addr = nm_ip4_address_new ();
+ nm_ip4_address_set_address (addr, tmp_addr.s_addr);
+ nm_ip4_address_set_prefix (addr, netmask_int);
+ nm_ip4_address_set_gateway (addr, tmp_gw.s_addr);
- if (nm_setting_ip4_config_add_address (ip4_setting, ip4_addr)) {
+ if (nm_setting_ip4_config_add_address (s_ip4, addr)) {
PLUGIN_PRINT("SCPlugin-Ifupdown", "addresses count: %d",
- nm_setting_ip4_config_get_num_addresses (ip4_setting));
+ nm_setting_ip4_config_get_num_addresses (s_ip4));
} else {
PLUGIN_PRINT("SCPlugin-Ifupdown", "ignoring duplicate IP4 address");
}
- while(nameservers_list_i) {
- gchar *dns = nameservers_list_i->data;
- nameservers_list_i = nameservers_list_i -> next;
- if(!dns)
- continue;
- if (inet_pton (AF_INET, dns, &tmp_ip4_addr)) {
- if (!nm_setting_ip4_config_add_dns (ip4_setting, tmp_ip4_addr.s_addr))
- PLUGIN_PRINT("SCPlugin-Ifupdown", "ignoring duplicate DNS server '%s'", dns);
- } else
- g_set_error (&error, eni_plugin_error_quark (), 0,
- "Invalid %s IP4 address nameserver '%s'", "nameserver", dns);
+ nameserver_v = ifparser_getkey (block, "dns-nameserver");
+ ifupdown_ip4_add_dns (s_ip4, nameserver_v);
+
+ nameservers_v = ifparser_getkey (block, "dns-nameservers");
+ ifupdown_ip4_add_dns (s_ip4, nameservers_v);
+
+ if (!nm_setting_ip4_config_get_num_dns (s_ip4))
+ PLUGIN_PRINT("SCPlugin-Ifupdown", "No dns-nameserver configured in /etc/network/interfaces");
+
+ /* DNS searches */
+ search_v = ifparser_getkey (block, "dns-search");
+ if (search_v) {
+ list = g_strsplit_set (search_v, " \t", -1);
+ for (iter = list; iter && *iter; iter++) {
+ g_strstrip (*iter);
+ if (isblank (*iter[0]))
+ continue;
+ if (!nm_setting_ip4_config_add_dns_search (s_ip4, *iter)) {
+ PLUGIN_WARN ("SCPlugin-Ifupdown",
+ " warning: duplicate DNS domain '%s'", *iter);
+ }
+ }
+ g_strfreev (list);
}
- if (!nm_setting_ip4_config_get_num_dns (ip4_setting))
+
+ g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL, NULL);
+ }
+
+ nm_connection_add_setting (connection, NM_SETTING (s_ip4));
+ return TRUE;
+
+error:
+ g_object_unref (s_ip4);
+ return FALSE;
+}
+
+static void
+ifupdown_ip6_add_dns (NMSettingIP6Config *s_ip6, const char *dns)
+{
+ struct in6_addr addr;
+ char **list, **iter;
+
+ if (dns == NULL)
+ return;
+
+ list = g_strsplit_set (dns, " \t", -1);
+ for (iter = list; iter && *iter; iter++) {
+ g_strstrip (*iter);
+ if (isblank (*iter[0]))
+ continue;
+ if (!inet_pton (AF_INET6, *iter, &addr)) {
+ PLUGIN_WARN ("SCPlugin-Ifupdown",
+ " warning: ignoring invalid nameserver '%s'", *iter);
+ continue;
+ }
+
+ if (!nm_setting_ip6_config_add_dns (s_ip6, &addr)) {
+ PLUGIN_WARN ("SCPlugin-Ifupdown",
+ " warning: duplicate DNS domain '%s'", *iter);
+ }
+ }
+ g_strfreev (list);
+}
+
+static gboolean
+update_ip6_setting_from_if_block(NMConnection *connection,
+ if_block *block,
+ GError **error)
+{
+ NMSettingIP6Config *s_ip6 = NM_SETTING_IP6_CONFIG (nm_setting_ip6_config_new());
+ const char *type = ifparser_getkey(block, "inet6");
+ gboolean is_static = type && (!strcmp("static", type) ||
+ !strcmp("v4tunnel", type));
+
+ if (!is_static) {
+ g_object_set(s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO, NULL);
+ } else {
+ struct in6_addr tmp_addr, tmp_gw;
+ NMIP6Address *addr;
+ const char *address_v;
+ const char *prefix_v;
+ const char *gateway_v;
+ const char *nameserver_v;
+ const char *nameservers_v;
+ const char *search_v;
+ int prefix_int = 128;
+ char **list, **iter;
+
+ /* Address */
+ address_v = ifparser_getkey(block, "address");
+ if (!address_v || !inet_pton (AF_INET6, address_v, &tmp_addr)) {
+ g_set_error (error, eni_plugin_error_quark (), 0,
+ "Missing IPv6 address '%s'",
+ address_v ? address_v : "(none)");
+ goto error;
+ }
+
+ /* Prefix */
+ prefix_v = ifparser_getkey(block, "netmask");
+ if (prefix_v)
+ prefix_int = g_ascii_strtoll (prefix_v, NULL, 10);
+
+ /* Gateway */
+ gateway_v = ifparser_getkey (block, "gateway");
+ if (!gateway_v)
+ gateway_v = address_v; /* dcbw: whaaa?? */
+ if (!inet_pton (AF_INET6, gateway_v, &tmp_gw)) {
+ g_set_error (error, eni_plugin_error_quark (), 0,
+ "Invalid IPv6 gateway '%s'", gateway_v);
+ goto error;
+ }
+
+ /* Add the new address to the setting */
+ addr = nm_ip6_address_new ();
+ nm_ip6_address_set_address (addr, &tmp_addr);
+ nm_ip6_address_set_prefix (addr, prefix_int);
+ nm_ip6_address_set_gateway (addr, &tmp_gw);
+
+ if (nm_setting_ip6_config_add_address (s_ip6, addr)) {
+ PLUGIN_PRINT("SCPlugin-Ifupdown", "addresses count: %d",
+ nm_setting_ip6_config_get_num_addresses (s_ip6));
+ } else {
+ PLUGIN_PRINT("SCPlugin-Ifupdown", "ignoring duplicate IP6 address");
+ }
+
+ nameserver_v = ifparser_getkey(block, "dns-nameserver");
+ ifupdown_ip6_add_dns (s_ip6, nameserver_v);
+
+ nameservers_v = ifparser_getkey(block, "dns-nameservers");
+ ifupdown_ip6_add_dns (s_ip6, nameservers_v);
+
+ if (!nm_setting_ip6_config_get_num_dns (s_ip6))
PLUGIN_PRINT("SCPlugin-Ifupdown", "No dns-nameserver configured in /etc/network/interfaces");
- g_object_set(ip4_setting,
- NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL,
- NULL);
+ /* DNS searches */
+ search_v = ifparser_getkey (block, "dns-search");
+ if (search_v) {
+ list = g_strsplit_set (search_v, " \t", -1);
+ for (iter = list; iter && *iter; iter++) {
+ g_strstrip (*iter);
+ if (isblank (*iter[0]))
+ continue;
+ if (!nm_setting_ip6_config_add_dns_search (s_ip6, *iter)) {
+ PLUGIN_WARN ("SCPlugin-Ifupdown",
+ " warning: duplicate DNS domain '%s'", *iter);
+ }
+ }
+ g_strfreev (list);
+ }
- g_slist_foreach (nameservers_list, (GFunc) g_free, NULL);
- g_slist_free (nameservers_list);
+ g_object_set (s_ip6,
+ NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL,
+ NULL);
}
- nm_connection_add_setting(connection, NM_SETTING(ip4_setting));
+ nm_connection_add_setting (connection, NM_SETTING (s_ip6));
+ return TRUE;
+
+error:
+ g_object_unref (s_ip6);
+ return FALSE;
}
gboolean
@@ -537,7 +704,7 @@ ifupdown_update_connection_from_if_block (NMConnection *connection,
NMSettingConnection *s_con;
gboolean success = FALSE;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if(!s_con) {
s_con = NM_SETTING_CONNECTION (nm_setting_connection_new());
g_assert (s_con);
@@ -562,15 +729,19 @@ ifupdown_update_connection_from_if_block (NMConnection *connection,
block->name, type, idstr, nm_setting_connection_get_uuid (s_con));
if (!strcmp (NM_SETTING_WIRED_SETTING_NAME, type))
- update_wired_setting_from_if_block (connection, block);
+ update_wired_setting_from_if_block (connection, block);
else if (!strcmp (NM_SETTING_WIRELESS_SETTING_NAME, type)) {
update_wireless_setting_from_if_block (connection, block);
update_wireless_security_setting_from_if_block (connection, block);
}
- update_ip4_setting_from_if_block (connection, block);
+ if (ifparser_haskey(block, "inet6"))
+ success = update_ip6_setting_from_if_block (connection, block, error);
+ else
+ success = update_ip4_setting_from_if_block (connection, block, error);
- success = nm_connection_verify (connection, error);
+ if (success == TRUE)
+ success = nm_connection_verify (connection, error);
g_free (idstr);
return success;
diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c
index 9679edeac..4dbb0aa28 100644
--- a/src/settings/plugins/ifupdown/plugin.c
+++ b/src/settings/plugins/ifupdown/plugin.c
@@ -19,7 +19,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2007,2008 Canonical Ltd.
- * (C) Copyright 2009 Red Hat, Inc.
+ * (C) Copyright 2009 - 2011 Red Hat, Inc.
*/
#include <string.h>
@@ -42,6 +42,7 @@
#include "nm-setting-wireless.h"
#include "nm-setting-wired.h"
#include "nm-setting-ppp.h"
+#include "nm-utils.h"
#include "nm-ifupdown-connection.h"
#include "plugin.h"
@@ -60,9 +61,6 @@
#define IFUPDOWN_PLUGIN_INFO "(C) 2008 Canonical Ltd. To report bugs please use the NetworkManager mailing list."
#define IFUPDOWN_SYSTEM_HOSTNAME_FILE "/etc/hostname"
-#define IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE SYSCONFDIR "/NetworkManager/NetworkManager.conf"
-#define IFUPDOWN_OLD_SYSTEM_SETTINGS_KEY_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf"
-
#define IFUPDOWN_KEY_FILE_GROUP "ifupdown"
#define IFUPDOWN_KEY_FILE_KEY_MANAGED "managed"
#define IFUPDOWN_UNMANAGE_WELL_KNOWN_DEFAULT TRUE
@@ -81,7 +79,7 @@ typedef struct {
GHashTable *well_known_interfaces;
GHashTable *well_known_ifaces;
gboolean unmanage_well_known;
- const char *conf_file;
+ char *conf_file;
gulong inotify_event_id;
int inotify_system_hostname_wd;
@@ -190,10 +188,9 @@ bind_device_to_connection (SCPluginIfupdown *self,
NMIfupdownConnection *exported)
{
GByteArray *mac_address;
- NMSetting *s_wired = NULL;
- NMSetting *s_wifi = NULL;
+ NMSettingWired *s_wired;
+ NMSettingWireless *s_wifi;
const char *iface, *address;
- struct ether_addr *tmp_mac;
iface = g_udev_device_get_name (device);
if (!iface) {
@@ -207,18 +204,15 @@ bind_device_to_connection (SCPluginIfupdown *self,
return;
}
- tmp_mac = ether_aton (address);
- if (!tmp_mac) {
+ mac_address = nm_utils_hwaddr_atoba (address, ARPHRD_ETHER);
+ if (!mac_address) {
PLUGIN_WARN ("SCPluginIfupdown", "failed to parse MAC address '%s' for %s",
address, iface);
return;
}
- mac_address = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (mac_address, &(tmp_mac->ether_addr_octet[0]), ETH_ALEN);
-
- s_wired = nm_connection_get_setting (NM_CONNECTION (exported), NM_TYPE_SETTING_WIRED);
- s_wifi = nm_connection_get_setting (NM_CONNECTION (exported), NM_TYPE_SETTING_WIRELESS);
+ s_wired = nm_connection_get_setting_wired (NM_CONNECTION (exported));
+ s_wifi = nm_connection_get_setting_wireless (NM_CONNECTION (exported));
if (s_wired) {
PLUGIN_PRINT ("SCPluginIfupdown", "locking wired connection setting");
g_object_set (s_wired, NM_SETTING_WIRED_MAC_ADDRESS, mac_address, NULL);
@@ -432,13 +426,13 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config)
keys = g_hash_table_get_keys (priv->iface_connections);
for (iter = keys; iter; iter = g_list_next (iter)) {
NMIfupdownConnection *exported;
- NMSetting *setting;
+ NMSettingConnection *setting;
if (!g_hash_table_lookup (auto_ifaces, iter->data))
continue;
exported = g_hash_table_lookup (priv->iface_connections, iter->data);
- setting = NM_SETTING (nm_connection_get_setting (NM_CONNECTION (exported), NM_TYPE_SETTING_CONNECTION));
+ setting = nm_connection_get_setting_connection (NM_CONNECTION (exported));
g_object_set (setting, NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, NULL);
nm_settings_connection_commit_changes (NM_SETTINGS_CONNECTION (exported), ignore_cb, NULL);
@@ -448,12 +442,7 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config)
g_list_free (keys);
g_hash_table_destroy (auto_ifaces);
- /* Find the config file */
- if (g_file_test (IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE, G_FILE_TEST_EXISTS))
- priv->conf_file = IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE;
- else
- priv->conf_file = IFUPDOWN_OLD_SYSTEM_SETTINGS_KEY_FILE;
-
+ /* Read the config file to find out whether to manage interfaces */
keyfile = g_key_file_new ();
if (!g_key_file_load_from_file (keyfile,
priv->conf_file,
@@ -706,20 +695,28 @@ GObject__dispose (GObject *object)
if (priv->well_known_interfaces)
g_hash_table_destroy(priv->well_known_interfaces);
+ g_free (priv->conf_file);
+
if (priv->client)
g_object_unref (priv->client);
+
G_OBJECT_CLASS (sc_plugin_ifupdown_parent_class)->dispose (object);
}
G_MODULE_EXPORT GObject *
-nm_system_config_factory (void)
+nm_system_config_factory (const char *config_file)
{
static SCPluginIfupdown *singleton = NULL;
+ SCPluginIfupdownPrivate *priv;
- if (!singleton)
+ if (!singleton) {
singleton = SC_PLUGIN_IFUPDOWN (g_object_new (SC_TYPE_PLUGIN_IFUPDOWN, NULL));
- else
+ if (singleton) {
+ priv = SC_PLUGIN_IFUPDOWN_GET_PRIVATE (singleton);
+ priv->conf_file = strdup (config_file);
+ }
+ } else
g_object_ref (singleton);
return G_OBJECT (singleton);
diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am
index aed861973..ff219d5de 100644
--- a/src/settings/plugins/ifupdown/tests/Makefile.am
+++ b/src/settings/plugins/ifupdown/tests/Makefile.am
@@ -29,4 +29,4 @@ endif
EXTRA_DIST = \
test1 test2 test3 test4 test5 test6 test7 test8 test9 test11 test12 \
- test13 test14 test15 test16
+ test13 test14 test15 test16 test17-wired-static-verify-ip4
diff --git a/src/settings/plugins/ifupdown/tests/Makefile.in b/src/settings/plugins/ifupdown/tests/Makefile.in
index aca48837c..a03be1bde 100644
--- a/src/settings/plugins/ifupdown/tests/Makefile.in
+++ b/src/settings/plugins/ifupdown/tests/Makefile.in
@@ -141,6 +141,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -195,11 +197,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -210,6 +216,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -249,6 +256,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -334,7 +343,7 @@ test_ifupdown_LDADD = \
EXTRA_DIST = \
test1 test2 test3 test4 test5 test6 test7 test8 test9 test11 test12 \
- test13 test14 test15 test16
+ test13 test14 test15 test16 test17-wired-static-verify-ip4
all: all-am
diff --git a/src/settings/plugins/ifupdown/tests/test-ifupdown.c b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
index 164653645..01020bdfd 100644
--- a/src/settings/plugins/ifupdown/tests/test-ifupdown.c
+++ b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
@@ -21,6 +21,9 @@
#include <glib.h>
#include <string.h>
+#include <nm-utils.h>
+
+#include "nm-test-helpers.h"
#include "interface_parser.h"
#include "parser.h"
@@ -455,6 +458,386 @@ test16_missing_newline (const char *path)
ifparser_destroy ();
expected_free (e);
}
+static void
+test17_read_static_ipv4 (const char *path)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingIP4Config *s_ip4;
+ NMSettingWired *s_wired;
+ char *unmanaged = NULL;
+ GError *error = NULL;
+ const char* tmp;
+ const char *expected_address = "10.0.0.3";
+ const char *expected_id = "Ifupdown (eth0)";
+ const char *expected_dns1 = "10.0.0.1";
+ const char *expected_dns2 = "10.0.0.2";
+ const char *expected_search1 = "example.com";
+ const char *expected_search2 = "foo.example.com";
+ guint32 expected_prefix = 8;
+ NMIP4Address *ip4_addr;
+ struct in_addr addr;
+#define TEST17_NAME "wired-static-verify-ip4"
+ if_block *block = NULL;
+
+ const char* file = "test17-" TEST17_NAME;
+
+ init_ifparser_with_file (path, file);
+ block = ifparser_getfirst ();
+ connection = nm_connection_new();
+ ifupdown_update_connection_from_if_block(connection, block, &error);
+
+ ASSERT (connection != NULL,
+ TEST17_NAME, "failed to read %s: %s", file, error->message);
+
+ ASSERT (nm_connection_verify (connection, &error),
+ TEST17_NAME, "failed to verify %s: %s", file, error->message);
+
+ ASSERT (unmanaged == NULL,
+ TEST17_NAME, "failed to verify %s: unexpected unmanaged value", file);
+
+ /* ===== CONNECTION SETTING ===== */
+
+ s_con = nm_connection_get_setting_connection (connection);
+ ASSERT (s_con != NULL,
+ TEST17_NAME, "failed to verify %s: missing %s setting",
+ file,
+ NM_SETTING_CONNECTION_SETTING_NAME);
+
+ /* ID */
+ tmp = nm_setting_connection_get_id (s_con);
+ ASSERT (tmp != NULL,
+ TEST17_NAME, "failed to verify %s: missing %s / %s key",
+ file,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_ID);
+ ASSERT (strcmp (tmp, expected_id) == 0,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value: %s",
+ file,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_ID, tmp);
+
+ /* ===== WIRED SETTING ===== */
+
+ s_wired = nm_connection_get_setting_wired (connection);
+ ASSERT (s_wired != NULL,
+ TEST17_NAME, "failed to verify %s: missing %s setting",
+ file,
+ NM_SETTING_WIRED_SETTING_NAME);
+
+ /* ===== IPv4 SETTING ===== */
+
+ ASSERT (inet_pton (AF_INET, expected_address, &addr) > 0,
+ TEST17_NAME, "failed to verify %s: couldn't convert IP address #1",
+ file);
+
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
+ ASSERT (s_ip4 != NULL,
+ TEST17_NAME, "failed to verify %s: missing %s setting",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME);
+
+ /* Method */
+ tmp = nm_setting_ip4_config_get_method (s_ip4);
+ ASSERT (strcmp (tmp, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) == 0,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_METHOD);
+
+ /* IP addresses */
+ ASSERT (nm_setting_ip4_config_get_num_addresses (s_ip4) == 1,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_ADDRESSES);
+
+ ip4_addr = nm_setting_ip4_config_get_address (s_ip4, 0);
+ ASSERT (ip4_addr,
+ TEST17_NAME, "failed to verify %s: missing IP4 address #1",
+ file);
+
+ ASSERT (nm_ip4_address_get_prefix (ip4_addr) == expected_prefix,
+ TEST17_NAME, "failed to verify %s: unexpected IP4 address prefix",
+ file);
+
+ ASSERT (nm_ip4_address_get_address (ip4_addr) == addr.s_addr,
+ TEST17_NAME, "failed to verify %s: unexpected IP4 address: %s",
+ file, addr.s_addr);
+
+ /* DNS Addresses */
+ ASSERT (nm_setting_ip4_config_get_num_dns (s_ip4) == 2,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ ASSERT (inet_pton (AF_INET, expected_dns1, &addr) > 0,
+ TEST17_NAME, "failed to verify %s: couldn't convert DNS IP address #1",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ ASSERT (nm_setting_ip4_config_get_dns (s_ip4, 0) == addr.s_addr,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value #1",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ ASSERT (inet_pton (AF_INET, expected_dns2, &addr) > 0,
+ TEST17_NAME, "failed to verify %s: couldn't convert DNS IP address #2",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ ASSERT (nm_setting_ip4_config_get_dns (s_ip4, 1) == addr.s_addr,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value #2",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ ASSERT (nm_setting_ip4_config_get_num_addresses (s_ip4) == 1,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ /* DNS search domains */
+ ASSERT (nm_setting_ip4_config_get_num_dns_searches (s_ip4) == 2,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS);
+
+ tmp = nm_setting_ip4_config_get_dns_search (s_ip4, 0);
+ ASSERT (tmp != NULL,
+ TEST17_NAME, "failed to verify %s: missing %s / %s key",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS_SEARCH);
+ ASSERT (strcmp (tmp, expected_search1) == 0,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS_SEARCH);
+
+ tmp = nm_setting_ip4_config_get_dns_search (s_ip4, 1);
+ ASSERT (tmp != NULL,
+ TEST17_NAME, "failed to verify %s: missing %s / %s key",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS_SEARCH);
+
+ ASSERT (strcmp (tmp, expected_search2) == 0,
+ TEST17_NAME, "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_DNS_SEARCH);
+
+ g_object_unref (connection);
+}
+
+static void
+test18_read_static_ipv6 (const char *path)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingIP6Config *s_ip6;
+ NMSettingWired *s_wired;
+ char *unmanaged = NULL;
+ GError *error = NULL;
+ const char* tmp;
+ const char *expected_address = "fc00::1";
+ const char *expected_id = "Ifupdown (myip6tunnel)";
+ const char *expected_dns1 = "fc00::2";
+ const char *expected_dns2 = "fc00::3";
+ const char *expected_search1 = "example.com";
+ const char *expected_search2 = "foo.example.com";
+ guint32 expected_prefix = 64;
+ NMIP6Address *ip6_addr;
+ struct in6_addr addr;
+ if_block *block = NULL;
+#define TEST18_NAME "wired-static-verify-ip6"
+ const char* file = "test18-" TEST18_NAME;
+
+ init_ifparser_with_file (path, file);
+ block = ifparser_getfirst ();
+ connection = nm_connection_new();
+ ifupdown_update_connection_from_if_block(connection, block, &error);
+
+ ASSERT (connection != NULL,
+ TEST18_NAME
+ "failed to read %s: %s", file, error->message);
+
+ ASSERT (nm_connection_verify (connection, &error),
+ TEST18_NAME,
+ "failed to verify %s: %s", file, error->message);
+
+ ASSERT (unmanaged == NULL,
+ TEST18_NAME,
+ "failed to verify %s: unexpected unmanaged value", file);
+
+ /* ===== CONNECTION SETTING ===== */
+
+ s_con = nm_connection_get_setting_connection (connection);
+ ASSERT (s_con != NULL,
+ TEST18_NAME, "failed to verify %s: missing %s setting",
+ file,
+ NM_SETTING_CONNECTION_SETTING_NAME);
+
+ /* ID */
+ tmp = nm_setting_connection_get_id (s_con);
+ ASSERT (tmp != NULL,
+ TEST18_NAME,
+ "failed to verify %s: missing %s / %s key",
+ file,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_ID);
+
+ ASSERT (strcmp (tmp, expected_id) == 0,
+ TEST18_NAME,
+ "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ NM_SETTING_CONNECTION_ID);
+
+ /* ===== WIRED SETTING ===== */
+
+ s_wired = nm_connection_get_setting_wired (connection);
+ ASSERT (s_wired != NULL,
+ TEST18_NAME, "failed to verify %s: missing %s setting",
+ file,
+ NM_SETTING_WIRED_SETTING_NAME);
+
+ /* ===== IPv6 SETTING ===== */
+
+ ASSERT (inet_pton (AF_INET6, expected_address, &addr) > 0,
+ TEST18_NAME,
+ "failed to verify %s: couldn't convert IP address #1",
+ file);
+
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
+ ASSERT (s_ip6 != NULL,
+ TEST18_NAME,
+ "failed to verify %s: missing %s setting",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME);
+
+ /* Method */
+ tmp = nm_setting_ip6_config_get_method (s_ip6);
+ ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0,
+ TEST18_NAME,
+ "failed to verify %s: unexpected %s / %s key value",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_METHOD);
+
+ /* IP addresses */
+ ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 1,
+ TEST18_NAME,
+ "failed to verify %s: unexpected number of %s / %s",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_ADDRESSES);
+
+ ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0);
+ ASSERT (ip6_addr,
+ TEST18_NAME,
+ "failed to verify %s: missing %s / %s #1",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_ADDRESSES);
+
+ ASSERT (nm_ip6_address_get_prefix (ip6_addr) == expected_prefix,
+ TEST18_NAME
+ "failed to verify %s: unexpected %s / %s prefix",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_ADDRESSES);
+
+ ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr),
+ &addr),
+ TEST18_NAME,
+ "failed to verify %s: unexpected %s / %s",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_ADDRESSES);
+
+ /* DNS Addresses */
+ ASSERT (nm_setting_ip6_config_get_num_dns (s_ip6) == 2,
+ TEST18_NAME,
+ "failed to verify %s: unexpected number of %s / %s values",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS);
+
+ ASSERT (inet_pton (AF_INET6, expected_dns1, &addr) > 0,
+ TEST18_NAME,
+ "failed to verify %s: couldn't convert DNS IP address #1",
+ file);
+
+ ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 0),
+ &addr),
+ TEST18_NAME,
+ "failed to verify %s: unexpected %s / %s #1",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS);
+
+ ASSERT (inet_pton (AF_INET6, expected_dns2, &addr) > 0,
+ TEST18_NAME,
+ "failed to verify %s: couldn't convert DNS IP address #2",
+ file);
+
+ ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 1),
+ &addr),
+ TEST18_NAME, "failed to verify %s: unexpected %s / %s #2",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS);
+
+ /* DNS search domains */
+ ASSERT (nm_setting_ip6_config_get_num_dns_searches (s_ip6) == 2,
+ TEST18_NAME,
+ "failed to verify %s: unexpected number of %s / %s values",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS_SEARCH);
+
+ tmp = nm_setting_ip6_config_get_dns_search (s_ip6, 0);
+ ASSERT (tmp != NULL,
+ "wired-ipv6-manual-verify-ip6",
+ "failed to verify %s: missing %s / %s #1",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS_SEARCH);
+
+ ASSERT (strcmp (tmp, expected_search1) == 0,
+ "wired-ipv6-manual-verify-ip6",
+ "failed to verify %s: unexpected %s / %s #1",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS_SEARCH);
+
+ tmp = nm_setting_ip6_config_get_dns_search (s_ip6, 1);
+ ASSERT (tmp != NULL,
+ TEST18_NAME,
+ "failed to verify %s: missing %s / %s #2",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS_SEARCH);
+
+ ASSERT (strcmp (tmp, expected_search2) == 0,
+ TEST18_NAME,
+ "failed to verify %s: unexpected %s / %s #2",
+ file,
+ NM_SETTING_IP6_CONFIG_SETTING_NAME,
+ NM_SETTING_IP6_CONFIG_DNS_SEARCH);
+
+ g_free (unmanaged);
+ g_object_unref (connection);
+}
+
#if GLIB_CHECK_VERSION(2,25,12)
typedef GTestFixtureFunc TCFunc;
@@ -467,6 +850,12 @@ typedef void (*TCFunc)(void);
int main (int argc, char **argv)
{
GTestSuite *suite;
+ GError *error = NULL;
+
+ g_type_init ();
+
+ if (!nm_utils_init (&error))
+ FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
g_test_init (&argc, &argv, NULL);
@@ -490,6 +879,8 @@ int main (int argc, char **argv)
g_test_suite_add (suite, TESTCASE (test14_mixed_whitespace_block_start, TEST_ENI_DIR));
g_test_suite_add (suite, TESTCASE (test15_trailing_space, TEST_ENI_DIR));
g_test_suite_add (suite, TESTCASE (test16_missing_newline, TEST_ENI_DIR));
+ g_test_suite_add (suite, TESTCASE (test17_read_static_ipv4, TEST_ENI_DIR));
+ g_test_suite_add (suite, TESTCASE (test18_read_static_ipv6, TEST_ENI_DIR));
return g_test_run ();
}
diff --git a/src/settings/plugins/ifupdown/tests/test17-wired-static-verify-ip4 b/src/settings/plugins/ifupdown/tests/test17-wired-static-verify-ip4
new file mode 100644
index 000000000..9e5243a7e
--- /dev/null
+++ b/src/settings/plugins/ifupdown/tests/test17-wired-static-verify-ip4
@@ -0,0 +1,5 @@
+iface eth0 inet static
+ address 10.0.0.3
+ netmask 255.0.0.0
+ dns-search example.com foo.example.com
+ dns-nameservers 10.0.0.1 10.0.0.2
diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am
index 3b2421422..83031c241 100644
--- a/src/settings/plugins/keyfile/Makefile.am
+++ b/src/settings/plugins/keyfile/Makefile.am
@@ -3,7 +3,9 @@ SUBDIRS=. tests
INCLUDES = \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-util
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util
noinst_LTLIBRARIES = \
libkeyfile-io.la \
diff --git a/src/settings/plugins/keyfile/Makefile.in b/src/settings/plugins/keyfile/Makefile.in
index ae0c9f8e9..c766e7949 100644
--- a/src/settings/plugins/keyfile/Makefile.in
+++ b/src/settings/plugins/keyfile/Makefile.in
@@ -193,6 +193,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -247,11 +249,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -262,6 +268,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -301,6 +308,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -368,7 +377,9 @@ SUBDIRS = . tests
INCLUDES = \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-util
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util
noinst_LTLIBRARIES = \
libkeyfile-io.la \
diff --git a/src/settings/plugins/keyfile/plugin.c b/src/settings/plugins/keyfile/plugin.c
index af69c2001..d53907a9f 100644
--- a/src/settings/plugins/keyfile/plugin.c
+++ b/src/settings/plugins/keyfile/plugin.c
@@ -42,9 +42,6 @@
#include "common.h"
#include "utils.h"
-#define CONF_FILE SYSCONFDIR "/NetworkManager/NetworkManager.conf"
-#define OLD_CONF_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf"
-
static char *plugin_get_hostname (SCPluginKeyfile *plugin);
static void system_config_interface_init (NMSystemConfigInterface *system_config_interface_class);
@@ -60,7 +57,7 @@ typedef struct {
GFileMonitor *monitor;
guint monitor_id;
- const char *conf_file;
+ char *conf_file;
GFileMonitor *conf_file_monitor;
guint conf_file_monitor_id;
@@ -354,13 +351,15 @@ setup_monitoring (NMSystemConfigInterface *config)
priv->monitor = monitor;
}
- file = g_file_new_for_path (priv->conf_file);
- monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL);
- g_object_unref (file);
+ if (priv->conf_file) {
+ file = g_file_new_for_path (priv->conf_file);
+ monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL);
+ g_object_unref (file);
- if (monitor) {
- priv->conf_file_monitor_id = g_signal_connect (monitor, "changed", G_CALLBACK (conf_file_changed), config);
- priv->conf_file_monitor = monitor;
+ if (monitor) {
+ priv->conf_file_monitor_id = g_signal_connect (monitor, "changed", G_CALLBACK (conf_file_changed), config);
+ priv->conf_file_monitor = monitor;
+ }
}
}
@@ -410,6 +409,9 @@ get_unmanaged_specs (NMSystemConfigInterface *config)
GSList *specs = NULL;
GError *error = NULL;
+ if (!priv->conf_file)
+ return NULL;
+
key_file = g_key_file_new ();
if (g_key_file_load_from_file (key_file, priv->conf_file, G_KEY_FILE_NONE, &error)) {
char *str;
@@ -460,6 +462,9 @@ plugin_get_hostname (SCPluginKeyfile *plugin)
char *hostname = NULL;
GError *error = NULL;
+ if (!priv->conf_file)
+ return NULL;
+
key_file = g_key_file_new ();
if (g_key_file_load_from_file (key_file, priv->conf_file, G_KEY_FILE_NONE, &error))
hostname = g_key_file_get_value (key_file, "keyfile", "hostname", NULL);
@@ -481,6 +486,11 @@ plugin_set_hostname (SCPluginKeyfile *plugin, const char *hostname)
GError *error = NULL;
gboolean result = FALSE;
+ if (!priv->conf_file) {
+ g_warning ("Error saving hostname: no config file");
+ return FALSE;
+ }
+
key_file = g_key_file_new ();
if (g_key_file_load_from_file (key_file, priv->conf_file, G_KEY_FILE_NONE, &error)) {
char *data;
@@ -517,14 +527,6 @@ plugin_set_hostname (SCPluginKeyfile *plugin, const char *hostname)
static void
sc_plugin_keyfile_init (SCPluginKeyfile *plugin)
{
- SCPluginKeyfilePrivate *priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (plugin);
-
- if (g_file_test (CONF_FILE, G_FILE_TEST_EXISTS))
- priv->conf_file = CONF_FILE;
- else
- priv->conf_file = OLD_CONF_FILE;
-
- priv->hostname = plugin_get_hostname (plugin);
}
static void
@@ -597,6 +599,7 @@ dispose (GObject *object)
}
g_free (priv->hostname);
+ g_free (priv->conf_file);
if (priv->hash)
g_hash_table_destroy (priv->hash);
@@ -642,13 +645,22 @@ system_config_interface_init (NMSystemConfigInterface *system_config_interface_c
}
GObject *
-nm_settings_keyfile_plugin_new (void)
+nm_settings_keyfile_plugin_new (const char *config_file)
{
static SCPluginKeyfile *singleton = NULL;
+ SCPluginKeyfilePrivate *priv;
- if (!singleton)
+ if (!singleton) {
singleton = SC_PLUGIN_KEYFILE (g_object_new (SC_TYPE_PLUGIN_KEYFILE, NULL));
- else
+ if (singleton) {
+ priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (singleton);
+
+ priv->conf_file = g_strdup (config_file);
+
+ /* plugin_set_hostname() has to be called *after* priv->conf_file is set */
+ priv->hostname = plugin_get_hostname (singleton);
+ }
+ } else
g_object_ref (singleton);
return G_OBJECT (singleton);
diff --git a/src/settings/plugins/keyfile/plugin.h b/src/settings/plugins/keyfile/plugin.h
index af5147ef1..05d4e2b0d 100644
--- a/src/settings/plugins/keyfile/plugin.h
+++ b/src/settings/plugins/keyfile/plugin.h
@@ -16,7 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2008 Novell, Inc.
- * Copyright (C) 2008 Red Hat, Inc.
+ * Copyright (C) 2008 - 2011 Red Hat, Inc.
*/
#ifndef _PLUGIN_H_
@@ -43,6 +43,6 @@ GType sc_plugin_keyfile_get_type (void);
GQuark keyfile_plugin_error_quark (void);
-GObject *nm_settings_keyfile_plugin_new (void);
+GObject *nm_settings_keyfile_plugin_new (const char *config_file);
#endif /* _PLUGIN_H_ */
diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c
index 4128b9f2c..c7889cfc8 100644
--- a/src/settings/plugins/keyfile/reader.c
+++ b/src/settings/plugins/keyfile/reader.c
@@ -34,8 +34,10 @@
#include <nm-setting-wireless.h>
#include <nm-setting-bluetooth.h>
#include <nm-setting-8021x.h>
+#include <nm-utils.h>
#include <arpa/inet.h>
#include <netinet/ether.h>
+#include <linux/if_infiniband.h>
#include <string.h>
#include <ctype.h>
@@ -650,12 +652,11 @@ static void
mac_address_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path)
{
const char *setting_name = nm_setting_get_name (setting);
- struct ether_addr *eth;
char *tmp_string = NULL, *p;
gint *tmp_list;
GByteArray *array = NULL;
gsize length;
- int i;
+ int i, type;
p = tmp_string = g_key_file_get_string (keyfile, setting_name, key, NULL);
if (tmp_string) {
@@ -666,43 +667,45 @@ mac_address_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, cons
i++;
p++;
}
- if (i == 5) {
- /* parse as a MAC address */
- eth = ether_aton (tmp_string);
- if (eth) {
- g_free (tmp_string);
- array = g_byte_array_sized_new (ETH_ALEN);
- g_byte_array_append (array, eth->ether_addr_octet, ETH_ALEN);
- goto done;
- }
- }
+
+ /* If we found enough it's probably a string-format MAC address */
+ type = nm_utils_hwaddr_type (i + 1);
+ if (type > 0)
+ array = nm_utils_hwaddr_atoba (tmp_string, type);
}
g_free (tmp_string);
- /* Old format; list of ints */
- tmp_list = g_key_file_get_integer_list (keyfile, setting_name, key, &length, NULL);
- array = g_byte_array_sized_new (length);
- for (i = 0; i < length; i++) {
- int val = tmp_list[i];
- unsigned char v = (unsigned char) (val & 0xFF);
-
- if (val < 0 || val > 255) {
- g_warning ("%s: %s / %s ignoring invalid byte element '%d' (not "
- " between 0 and 255 inclusive)", __func__, setting_name,
- key, val);
- } else
- g_byte_array_append (array, (const unsigned char *) &v, sizeof (v));
+ if (array == NULL) {
+ /* Old format; list of ints */
+ tmp_list = g_key_file_get_integer_list (keyfile, setting_name, key, &length, NULL);
+ type = nm_utils_hwaddr_type (length);
+ if (type < 0) {
+ array = g_byte_array_sized_new (length);
+ for (i = 0; i < length; i++) {
+ int val = tmp_list[i];
+ const guint8 v = (guint8) (val & 0xFF);
+
+ if (val < 0 || val > 255) {
+ g_warning ("%s: %s / %s ignoring invalid byte element '%d' (not "
+ " between 0 and 255 inclusive)", __func__, setting_name,
+ key, val);
+ g_byte_array_free (array, TRUE);
+ array = NULL;
+ break;
+ }
+ g_byte_array_append (array, &v, 1);
+ }
+ }
+ g_free (tmp_list);
}
- g_free (tmp_list);
-done:
- if (array->len == ETH_ALEN) {
+ if (array) {
g_object_set (setting, key, array, NULL);
+ g_byte_array_free (array, TRUE);
} else {
g_warning ("%s: ignoring invalid MAC address for %s / %s",
__func__, setting_name, key);
}
- g_byte_array_free (array, TRUE);
}
static void
@@ -825,6 +828,22 @@ ssid_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char
}
}
+static void
+password_raw_parser (NMSetting *setting, const char *key, GKeyFile *keyfile, const char *keyfile_path)
+{
+ const char *setting_name = nm_setting_get_name (setting);
+ GByteArray *array;
+
+ array = get_uchar_array (keyfile, setting_name, key, FALSE, TRUE);
+ if (array) {
+ g_object_set (setting, key, array, NULL);
+ g_byte_array_free (array, TRUE);
+ } else {
+ g_warning ("%s: ignoring invalid raw password for %s / %s",
+ __func__, setting_name, key);
+ }
+}
+
static char *
get_cert_path (const char *keyfile_path, GByteArray *cert_path)
{
@@ -1019,11 +1038,19 @@ static KeyParser key_parsers[] = {
NM_SETTING_BLUETOOTH_BDADDR,
TRUE,
mac_address_parser },
+ { NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS,
+ TRUE,
+ mac_address_parser },
{ NM_SETTING_WIRELESS_SETTING_NAME,
NM_SETTING_WIRELESS_SSID,
TRUE,
ssid_parser },
{ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PASSWORD_RAW,
+ TRUE,
+ password_raw_parser },
+ { NM_SETTING_802_1X_SETTING_NAME,
NM_SETTING_802_1X_CA_CERT,
TRUE,
cert_parser },
@@ -1300,7 +1327,7 @@ nm_keyfile_plugin_connection_from_file (const char *filename, GError **error)
* the keyfile didn't include it, which can happen when the base
* device type setting is all default values (like ethernet).
*/
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (s_con) {
ctype = nm_setting_connection_get_connection_type (s_con);
setting = nm_connection_get_setting_by_name (connection, ctype);
@@ -1314,7 +1341,7 @@ nm_keyfile_plugin_connection_from_file (const char *filename, GError **error)
if (vpn_secrets) {
NMSettingVPN *s_vpn;
- s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
+ s_vpn = nm_connection_get_setting_vpn (connection);
if (s_vpn)
read_vpn_secrets (key_file, s_vpn);
}
diff --git a/src/settings/plugins/keyfile/tests/Makefile.am b/src/settings/plugins/keyfile/tests/Makefile.am
index affe8dcae..2adbf8739 100644
--- a/src/settings/plugins/keyfile/tests/Makefile.am
+++ b/src/settings/plugins/keyfile/tests/Makefile.am
@@ -2,7 +2,9 @@ SUBDIRS=keyfiles
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(srcdir)/../
diff --git a/src/settings/plugins/keyfile/tests/Makefile.in b/src/settings/plugins/keyfile/tests/Makefile.in
index c1fc662d8..ff08e529f 100644
--- a/src/settings/plugins/keyfile/tests/Makefile.in
+++ b/src/settings/plugins/keyfile/tests/Makefile.in
@@ -179,6 +179,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -233,11 +235,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -248,6 +254,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -287,6 +294,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -353,7 +362,9 @@ top_srcdir = @top_srcdir@
SUBDIRS = keyfiles
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(srcdir)/../
diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am
index 55dda7ee0..f163312ea 100644
--- a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am
+++ b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am
@@ -13,7 +13,8 @@ KEYFILES = \
Test_Wired_TLS_Old \
Test_Wired_TLS_New \
Test_Wired_TLS_Blob \
- Test_Wired_TLS_Path_Missing
+ Test_Wired_TLS_Path_Missing \
+ Test_InfiniBand_Connection
CERTS = \
test-ca-cert.pem \
diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in
index 0ea23ebcf..cf5b868f3 100644
--- a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in
+++ b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in
@@ -107,6 +107,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -161,11 +163,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -176,6 +182,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -215,6 +222,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -293,7 +302,8 @@ KEYFILES = \
Test_Wired_TLS_Old \
Test_Wired_TLS_New \
Test_Wired_TLS_Blob \
- Test_Wired_TLS_Path_Missing
+ Test_Wired_TLS_Path_Missing \
+ Test_InfiniBand_Connection
CERTS = \
test-ca-cert.pem \
diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Test_InfiniBand_Connection b/src/settings/plugins/keyfile/tests/keyfiles/Test_InfiniBand_Connection
new file mode 100644
index 000000000..3a984b774
--- /dev/null
+++ b/src/settings/plugins/keyfile/tests/keyfiles/Test_InfiniBand_Connection
@@ -0,0 +1,13 @@
+[connection]
+id=Test InfiniBand Connection
+uuid=4e80a56d-c99f-4aad-a6dd-b449bc398c57
+type=infiniband
+
+[infiniband]
+mac-address=00:11:22:33:44:55:66:77:88:99:01:12:23:34:45:56:67:78:89:90
+transport-mode=datagram
+mtu=1400
+
+[ipv4]
+method=auto
+
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index 2859cb3e4..79fa2f9ce 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -26,6 +26,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
+#include <linux/if_infiniband.h>
#include <nm-utils.h>
#include <nm-setting-connection.h>
@@ -38,6 +39,7 @@
#include <nm-setting-ppp.h>
#include <nm-setting-gsm.h>
#include <nm-setting-8021x.h>
+#include <nm-setting-infiniband.h>
#include "nm-test-helpers.h"
@@ -93,7 +95,7 @@ test_read_valid_wired_connection (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"connection-verify-connection", "failed to verify %s: missing %s setting",
TEST_WIRED_FILE,
@@ -142,7 +144,7 @@ test_read_valid_wired_connection (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"connection-verify-wired", "failed to verify %s: missing %s setting",
TEST_WIRED_FILE,
@@ -174,7 +176,7 @@ test_read_valid_wired_connection (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"connection-verify-ip4", "failed to verify %s: missing %s setting",
TEST_WIRED_FILE,
@@ -297,7 +299,7 @@ test_read_valid_wired_connection (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"connection-verify-ip6", "failed to verify %s: missing %s setting",
TEST_WIRED_FILE,
@@ -745,7 +747,7 @@ test_read_ip6_wired_connection (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"connection-verify-connection", "failed to verify %s: missing %s setting",
TEST_WIRED_IP6_FILE,
@@ -779,7 +781,7 @@ test_read_ip6_wired_connection (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"connection-verify-wired", "failed to verify %s: missing %s setting",
TEST_WIRED_IP6_FILE,
@@ -787,7 +789,7 @@ test_read_ip6_wired_connection (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"connection-verify-ip4", "failed to verify %s: missing %s setting",
TEST_WIRED_IP6_FILE,
@@ -809,7 +811,7 @@ test_read_ip6_wired_connection (void)
/* ===== IPv6 SETTING ===== */
- s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG));
+ s_ip6 = nm_connection_get_setting_ip6_config (connection);
ASSERT (s_ip6 != NULL,
"connection-verify-ip6", "failed to verify %s: missing %s setting",
TEST_WIRED_IP6_FILE,
@@ -1001,7 +1003,7 @@ test_read_wired_mac_case (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"connection-verify-connection", "failed to verify %s: missing %s setting",
TEST_WIRED_MAC_CASE_FILE,
@@ -1035,7 +1037,7 @@ test_read_wired_mac_case (void)
/* ===== WIRED SETTING ===== */
- s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ s_wired = nm_connection_get_setting_wired (connection);
ASSERT (s_wired != NULL,
"connection-verify-wired", "failed to verify %s: missing %s setting",
TEST_WIRED_MAC_CASE_FILE,
@@ -1087,7 +1089,7 @@ test_read_valid_wireless_connection (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"connection-verify-connection", "failed to verify %s: missing %s setting",
TEST_WIRELESS_FILE,
@@ -1136,7 +1138,7 @@ test_read_valid_wireless_connection (void)
/* ===== WIRED SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"connection-verify-wireless", "failed to verify %s: missing %s setting",
TEST_WIRELESS_FILE,
@@ -1162,7 +1164,7 @@ test_read_valid_wireless_connection (void)
/* ===== IPv4 SETTING ===== */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (connection);
ASSERT (s_ip4 != NULL,
"connection-verify-ip4", "failed to verify %s: missing %s setting",
TEST_WIRELESS_FILE,
@@ -1315,7 +1317,7 @@ test_read_string_ssid (void)
/* ===== WIRELESS SETTING ===== */
- s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ s_wireless = nm_connection_get_setting_wireless (connection);
ASSERT (s_wireless != NULL,
"connection-verify-wireless", "failed to verify %s: missing %s setting",
TEST_STRING_SSID_FILE,
@@ -1832,7 +1834,7 @@ test_read_bt_dun_connection (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"connection-verify-connection", "failed to verify %s: missing %s setting",
TEST_BT_DUN_FILE,
@@ -1866,7 +1868,7 @@ test_read_bt_dun_connection (void)
/* ===== BLUETOOTH SETTING ===== */
- s_bluetooth = NM_SETTING_BLUETOOTH (nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH));
+ s_bluetooth = nm_connection_get_setting_bluetooth (connection);
ASSERT (s_bluetooth != NULL,
"connection-verify-bt", "failed to verify %s: missing %s setting",
TEST_WIRELESS_FILE,
@@ -1905,7 +1907,7 @@ test_read_bt_dun_connection (void)
/* ===== GSM SETTING ===== */
- s_gsm = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM));
+ s_gsm = nm_connection_get_setting_gsm (connection);
ASSERT (s_gsm != NULL,
"connection-verify-gsm", "failed to verify %s: missing %s setting",
TEST_BT_DUN_FILE,
@@ -1952,7 +1954,7 @@ test_read_bt_dun_connection (void)
/* ===== SERIAL SETTING ===== */
- s_serial = NM_SETTING_SERIAL (nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL));
+ s_serial = nm_connection_get_setting_serial (connection);
ASSERT (s_serial != NULL,
"connection-verify-serial", "failed to verify %s: missing %s setting",
TEST_BT_DUN_FILE,
@@ -2081,7 +2083,7 @@ test_read_gsm_connection (void)
NMSettingConnection *s_con;
NMSettingSerial *s_serial;
NMSettingGsm *s_gsm;
- NMSetting *s_bluetooth;
+ NMSettingBluetooth *s_bluetooth;
GError *error = NULL;
const char *tmp;
const char *expected_id = "AT&T Data Connect";
@@ -2100,7 +2102,7 @@ test_read_gsm_connection (void)
/* ===== CONNECTION SETTING ===== */
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
ASSERT (s_con != NULL,
"connection-verify-connection", "failed to verify %s: missing %s setting",
TEST_GSM_FILE,
@@ -2134,7 +2136,7 @@ test_read_gsm_connection (void)
/* ===== BLUETOOTH SETTING ===== */
/* Plain GSM, so no BT setting expected */
- s_bluetooth = nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH);
+ s_bluetooth = nm_connection_get_setting_bluetooth (connection);
ASSERT (s_bluetooth == NULL,
"connection-verify-bt", "unexpected %s setting",
TEST_GSM_FILE,
@@ -2142,7 +2144,7 @@ test_read_gsm_connection (void)
/* ===== GSM SETTING ===== */
- s_gsm = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM));
+ s_gsm = nm_connection_get_setting_gsm (connection);
ASSERT (s_gsm != NULL,
"connection-verify-gsm", "failed to verify %s: missing %s setting",
TEST_GSM_FILE,
@@ -2215,7 +2217,7 @@ test_read_gsm_connection (void)
/* ===== SERIAL SETTING ===== */
- s_serial = NM_SETTING_SERIAL (nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL));
+ s_serial = nm_connection_get_setting_serial (connection);
ASSERT (s_serial != NULL,
"connection-verify-serial", "failed to verify %s: missing %s setting",
TEST_GSM_FILE,
@@ -2324,7 +2326,7 @@ static void
test_read_wired_8021x_tls_blob_connection (void)
{
NMConnection *connection;
- NMSetting *s_wired;
+ NMSettingWired *s_wired;
NMSetting8021x *s_8021x;
GError *error = NULL;
const char *tmp;
@@ -2346,11 +2348,11 @@ test_read_wired_8021x_tls_blob_connection (void)
}
/* ===== Wired Setting ===== */
- s_wired = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
g_assert (s_wired != NULL);
/* ===== 802.1x Setting ===== */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_assert (s_8021x != NULL);
g_assert (nm_setting_802_1x_get_num_eap_methods (s_8021x) == 1);
@@ -2389,7 +2391,7 @@ static void
test_read_wired_8021x_tls_bad_path_connection (void)
{
NMConnection *connection;
- NMSetting *s_wired;
+ NMSettingWired *s_wired;
NMSetting8021x *s_8021x;
GError *error = NULL;
const char *tmp;
@@ -2411,11 +2413,11 @@ test_read_wired_8021x_tls_bad_path_connection (void)
}
/* ===== Wired Setting ===== */
- s_wired = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
g_assert (s_wired != NULL);
/* ===== 802.1x Setting ===== */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_assert (s_8021x != NULL);
g_assert (nm_setting_802_1x_get_num_eap_methods (s_8021x) == 1);
@@ -2451,7 +2453,7 @@ static void
test_read_wired_8021x_tls_old_connection (void)
{
NMConnection *connection;
- NMSetting *s_wired;
+ NMSettingWired *s_wired;
NMSetting8021x *s_8021x;
GError *error = NULL;
const char *tmp;
@@ -2472,11 +2474,11 @@ test_read_wired_8021x_tls_old_connection (void)
}
/* ===== Wired Setting ===== */
- s_wired = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
g_assert (s_wired != NULL);
/* ===== 802.1x Setting ===== */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_assert (s_8021x != NULL);
g_assert (nm_setting_802_1x_get_num_eap_methods (s_8021x) == 1);
@@ -2507,7 +2509,7 @@ static void
test_read_wired_8021x_tls_new_connection (void)
{
NMConnection *connection;
- NMSetting *s_wired;
+ NMSettingWired *s_wired;
NMSetting8021x *s_8021x;
GError *error = NULL;
const char *tmp;
@@ -2529,11 +2531,11 @@ test_read_wired_8021x_tls_new_connection (void)
}
/* ===== Wired Setting ===== */
- s_wired = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
+ s_wired = nm_connection_get_setting_wired (connection);
g_assert (s_wired != NULL);
/* ===== 802.1x Setting ===== */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
g_assert (s_8021x != NULL);
g_assert (nm_setting_802_1x_get_num_eap_methods (s_8021x) == 1);
@@ -2779,7 +2781,7 @@ test_write_wired_8021x_tls_connection_blob (void)
g_assert (testfile);
/* Check that the new certs got written out */
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
uuid = nm_setting_connection_get_uuid (s_con);
g_assert (uuid);
@@ -2805,7 +2807,7 @@ test_write_wired_8021x_tls_connection_blob (void)
}
/* Ensure the re-read connection's certificates use the path scheme */
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (reread, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (reread);
g_assert (s_8021x);
g_assert (nm_setting_802_1x_get_ca_cert_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH);
g_assert (nm_setting_802_1x_get_client_cert_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH);
@@ -2828,6 +2830,134 @@ test_write_wired_8021x_tls_connection_blob (void)
g_object_unref (connection);
}
+#define TEST_INFINIBAND_FILE TEST_KEYFILES_DIR"/Test_InfiniBand_Connection"
+
+static void
+test_read_infiniband_connection (void)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingInfiniband *s_ib;
+ GError *error = NULL;
+ const GByteArray *array;
+ guint8 expected_mac[INFINIBAND_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
+ 0x77, 0x88, 0x99, 0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89,
+ 0x90 };
+ const char *expected_id = "Test InfiniBand Connection";
+ const char *expected_uuid = "4e80a56d-c99f-4aad-a6dd-b449bc398c57";
+ gboolean success;
+
+ connection = nm_keyfile_plugin_connection_from_file (TEST_INFINIBAND_FILE, &error);
+ g_assert_no_error (error);
+ g_assert (connection);
+ success = nm_connection_verify (connection, &error);
+ g_assert_no_error (error);
+ g_assert (success);
+
+ /* Connection setting */
+ s_con = nm_connection_get_setting_connection (connection);
+ g_assert (s_con);
+ g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, expected_id);
+ g_assert_cmpstr (nm_setting_connection_get_uuid (s_con), ==, expected_uuid);
+
+ /* InfiniBand setting */
+ s_ib = nm_connection_get_setting_infiniband (connection);
+ g_assert (s_ib);
+
+ array = nm_setting_infiniband_get_mac_address (s_ib);
+ g_assert (array);
+ g_assert_cmpint (array->len, ==, INFINIBAND_ALEN);
+ g_assert_cmpint (memcmp (array->data, expected_mac, sizeof (expected_mac)), ==, 0);
+
+ g_object_unref (connection);
+}
+
+static void
+test_write_infiniband_connection (void)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingInfiniband *s_ib;
+ NMSettingIP4Config *s_ip4;
+ NMSettingIP6Config *s_ip6;
+ char *uuid;
+ GByteArray *mac;
+ guint8 tmpmac[] = { 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0xab, 0xbc,
+ 0xcd, 0xde, 0xef, 0xf0, 0x0a, 0x1b, 0x2c, 0x3d, 0x4e, 0x5f, 0x6f, 0xba
+ };
+ gboolean success;
+ NMConnection *reread;
+ char *testfile = NULL;
+ GError *error = NULL;
+ pid_t owner_grp;
+ uid_t owner_uid;
+
+ connection = nm_connection_new ();
+ g_assert (connection);
+
+ /* Connection setting */
+
+ s_con = (NMSettingConnection *) nm_setting_connection_new ();
+ g_assert (s_con);
+ nm_connection_add_setting (connection, NM_SETTING (s_con));
+
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_ID, "Work InfiniBand",
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NM_SETTING_CONNECTION_AUTOCONNECT, FALSE,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_INFINIBAND_SETTING_NAME,
+ NULL);
+ g_free (uuid);
+
+ /* InfiniBand setting */
+ s_ib = (NMSettingInfiniband *) nm_setting_infiniband_new ();
+ g_assert (s_ib);
+ nm_connection_add_setting (connection, NM_SETTING (s_ib));
+
+ mac = g_byte_array_sized_new (sizeof (tmpmac));
+ g_byte_array_append (mac, &tmpmac[0], sizeof (tmpmac));
+ g_object_set (s_ib,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS, mac,
+ NM_SETTING_INFINIBAND_MTU, 900,
+ NM_SETTING_INFINIBAND_TRANSPORT_MODE, "datagram",
+ NULL);
+ g_byte_array_free (mac, TRUE);
+
+ /* IP4 setting */
+ s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
+ g_assert (s_ip4);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip4));
+ g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
+
+ /* IP6 setting */
+ s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
+ g_assert (s_ip6);
+ nm_connection_add_setting (connection, NM_SETTING (s_ip6));
+ g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO, NULL);
+
+ /* Write out the connection */
+ owner_uid = geteuid ();
+ owner_grp = getegid ();
+ success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
+ g_assert_no_error (error);
+ g_assert (success);
+ g_assert (testfile);
+
+ /* Read the connection back in and compare it to the one we just wrote out */
+ reread = nm_keyfile_plugin_connection_from_file (testfile, &error);
+ g_assert_no_error (error);
+ g_assert (reread);
+
+ g_assert (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT));
+
+ unlink (testfile);
+ g_free (testfile);
+
+ g_object_unref (reread);
+ g_object_unref (connection);
+}
+
int main (int argc, char **argv)
{
GError *error = NULL;
@@ -2876,6 +3006,9 @@ int main (int argc, char **argv)
test_write_wired_8021x_tls_connection_path ();
test_write_wired_8021x_tls_connection_blob ();
+ test_read_infiniband_connection ();
+ test_write_infiniband_connection ();
+
base = g_path_get_basename (argv[0]);
fprintf (stdout, "%s: SUCCESS\n", base);
g_free (base);
diff --git a/src/settings/plugins/keyfile/writer.c b/src/settings/plugins/keyfile/writer.c
index 2babe2671..bbd6a7c3b 100644
--- a/src/settings/plugins/keyfile/writer.c
+++ b/src/settings/plugins/keyfile/writer.c
@@ -416,7 +416,7 @@ mac_address_writer (GKeyFile *file,
GByteArray *array;
const char *setting_name = nm_setting_get_name (setting);
char *mac;
- struct ether_addr tmp;
+ int type;
g_return_if_fail (G_VALUE_HOLDS (value, DBUS_TYPE_G_UCHAR_ARRAY));
@@ -424,15 +424,16 @@ mac_address_writer (GKeyFile *file,
if (!array)
return;
- if (array->len != ETH_ALEN) {
+ type = nm_utils_hwaddr_type (array->len);
+ if (type < 0) {
g_warning ("%s: invalid %s / %s MAC address length %d",
__func__, setting_name, key, array->len);
return;
}
- memcpy (tmp.ether_addr_octet, array->data, ETH_ALEN);
- mac = ether_ntoa (&tmp);
+ mac = nm_utils_hwaddr_ntoa (array->data, type);
g_key_file_set_string (file, setting_name, key, mac);
+ g_free (mac);
}
static void
@@ -532,6 +533,31 @@ ssid_writer (GKeyFile *file,
}
}
+static void
+password_raw_writer (GKeyFile *file,
+ const char *keyfile_dir,
+ const char *uuid,
+ NMSetting *setting,
+ const char *key,
+ const GValue *value)
+{
+ const char *setting_name = nm_setting_get_name (setting);
+ GByteArray *array;
+ int i, *tmp_array;
+
+ g_return_if_fail (G_VALUE_HOLDS (value, DBUS_TYPE_G_UCHAR_ARRAY));
+
+ array = (GByteArray *) g_value_get_boxed (value);
+ if (!array || !array->len)
+ return;
+
+ tmp_array = g_new (gint, array->len);
+ for (i = 0; i < array->len; i++)
+ tmp_array[i] = (int) array->data[i];
+ g_key_file_set_integer_list (file, setting_name, key, tmp_array, array->len);
+ g_free (tmp_array);
+}
+
typedef struct ObjectType {
const char *key;
const char *suffix;
@@ -787,10 +813,16 @@ static KeyWriter key_writers[] = {
{ NM_SETTING_BLUETOOTH_SETTING_NAME,
NM_SETTING_BLUETOOTH_BDADDR,
mac_address_writer },
+ { NM_SETTING_INFINIBAND_SETTING_NAME,
+ NM_SETTING_INFINIBAND_MAC_ADDRESS,
+ mac_address_writer },
{ NM_SETTING_WIRELESS_SETTING_NAME,
NM_SETTING_WIRELESS_SSID,
ssid_writer },
{ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PASSWORD_RAW,
+ password_raw_writer },
+ { NM_SETTING_802_1X_SETTING_NAME,
NM_SETTING_802_1X_CA_CERT,
cert_writer },
{ NM_SETTING_802_1X_SETTING_NAME,
diff --git a/src/settings/tests/Makefile.am b/src/settings/tests/Makefile.am
index 4a4513986..57d56fc48 100644
--- a/src/settings/tests/Makefile.am
+++ b/src/settings/tests/Makefile.am
@@ -1,5 +1,6 @@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_srcdir)/src/settings
diff --git a/src/settings/tests/Makefile.in b/src/settings/tests/Makefile.in
index 7c966ba2d..de5474d4d 100644
--- a/src/settings/tests/Makefile.in
+++ b/src/settings/tests/Makefile.in
@@ -143,6 +143,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -197,11 +199,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -212,6 +218,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -251,6 +258,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,6 +325,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_srcdir)/src/settings
diff --git a/src/supplicant-manager/Makefile.am b/src/supplicant-manager/Makefile.am
index 359fc70ae..e8a2ce743 100644
--- a/src/supplicant-manager/Makefile.am
+++ b/src/supplicant-manager/Makefile.am
@@ -2,10 +2,13 @@ SUBDIRS=. tests
INCLUDES = \
-I${top_srcdir}/src \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
- -I${top_builddir}/marshallers
+ -I${top_builddir}/libnm-util
noinst_LTLIBRARIES = libsupplicant-manager.la
@@ -27,7 +30,6 @@ libsupplicant_manager_la_CPPFLAGS = \
-DNM_LOCALSTATEDIR=\"$(localstatedir)\"
libsupplicant_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS)
diff --git a/src/supplicant-manager/Makefile.in b/src/supplicant-manager/Makefile.in
index 5a7a2f2f8..fbb43bde2 100644
--- a/src/supplicant-manager/Makefile.in
+++ b/src/supplicant-manager/Makefile.in
@@ -57,7 +57,6 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libsupplicant_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libsupplicant_manager_la_OBJECTS = \
@@ -184,6 +183,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -238,11 +239,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -253,6 +258,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -292,6 +298,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -358,10 +366,13 @@ top_srcdir = @top_srcdir@
SUBDIRS = . tests
INCLUDES = \
-I${top_srcdir}/src \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
- -I${top_builddir}/marshallers
+ -I${top_builddir}/libnm-util
noinst_LTLIBRARIES = libsupplicant-manager.la
libsupplicant_manager_la_SOURCES = \
@@ -382,7 +393,6 @@ libsupplicant_manager_la_CPPFLAGS = \
-DNM_LOCALSTATEDIR=\"$(localstatedir)\"
libsupplicant_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS)
diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c
index 4860314b0..a8e4ab9d5 100644
--- a/src/supplicant-manager/nm-supplicant-config.c
+++ b/src/supplicant-manager/nm-supplicant-config.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2006 - 2010 Red Hat, Inc.
+ * Copyright (C) 2006 - 2012 Red Hat, Inc.
* Copyright (C) 2007 - 2008 Novell, Inc.
*/
@@ -54,6 +54,7 @@ typedef struct
GHashTable *config;
GHashTable *blobs;
guint32 ap_scan;
+ gboolean fast_required;
gboolean dispose_has_run;
} NMSupplicantConfigPrivate;
@@ -278,6 +279,14 @@ nm_supplicant_config_set_ap_scan (NMSupplicantConfig * self,
NM_SUPPLICANT_CONFIG_GET_PRIVATE (self)->ap_scan = ap_scan;
}
+gboolean
+nm_supplicant_config_fast_required (NMSupplicantConfig *self)
+{
+ g_return_val_if_fail (NM_IS_SUPPLICANT_CONFIG (self), FALSE);
+
+ return NM_SUPPLICANT_CONFIG_GET_PRIVATE (self)->fast_required;
+}
+
static void
get_hash_cb (gpointer key, gpointer value, gpointer user_data)
{
@@ -293,6 +302,7 @@ get_hash_cb (gpointer key, gpointer value, gpointer user_data)
g_value_set_int (variant, atoi (opt->value));
break;
case TYPE_BYTES:
+ case TYPE_UTF8:
array = g_byte_array_sized_new (opt->len);
g_byte_array_append (array, (const guint8 *) opt->value, opt->len);
g_value_init (variant, DBUS_TYPE_G_UCHAR_ARRAY);
@@ -583,7 +593,7 @@ gboolean
nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self,
NMSettingWirelessSecurity *setting,
NMSetting8021x *setting_8021x,
- const char *connection_uid)
+ const char *con_uuid)
{
char *value;
gboolean success;
@@ -592,7 +602,7 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self,
g_return_val_if_fail (NM_IS_SUPPLICANT_CONFIG (self), FALSE);
g_return_val_if_fail (setting != NULL, FALSE);
- g_return_val_if_fail (connection_uid != NULL, FALSE);
+ g_return_val_if_fail (con_uuid != NULL, FALSE);
key_mgmt = nm_setting_wireless_security_get_key_mgmt (setting);
if (!add_string_val (self, key_mgmt, "key_mgmt", TRUE, FALSE))
@@ -692,7 +702,7 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self,
if (!strcmp (key_mgmt, "ieee8021x") || !strcmp (key_mgmt, "wpa-eap")) {
if (!setting_8021x)
return FALSE;
- if (!nm_supplicant_config_add_setting_8021x (self, setting_8021x, connection_uid, FALSE))
+ if (!nm_supplicant_config_add_setting_8021x (self, setting_8021x, con_uuid, FALSE))
return FALSE;
}
@@ -711,24 +721,43 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self,
gboolean
nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
NMSetting8021x *setting,
- const char *connection_uid,
+ const char *con_uuid,
gboolean wired)
{
+ NMSupplicantConfigPrivate *priv;
char *tmp;
const char *peapver, *value, *path;
gboolean success, added;
GString *phase1, *phase2;
const GByteArray *array;
- gboolean peap = FALSE;
+ gboolean peap = FALSE, fast = FALSE;
guint32 i, num_eap;
+ gboolean fast_provisoning_allowed = FALSE;
g_return_val_if_fail (NM_IS_SUPPLICANT_CONFIG (self), FALSE);
g_return_val_if_fail (setting != NULL, FALSE);
- g_return_val_if_fail (connection_uid != NULL, FALSE);
+ g_return_val_if_fail (con_uuid != NULL, FALSE);
+
+ priv = NM_SUPPLICANT_CONFIG_GET_PRIVATE (self);
value = nm_setting_802_1x_get_password (setting);
- if (!add_string_val (self, value, "password", FALSE, TRUE))
- return FALSE;
+ if (value) {
+ if (!add_string_val (self, value, "password", FALSE, TRUE))
+ return FALSE;
+ } else {
+ array = nm_setting_802_1x_get_password_raw (setting);
+ if (array) {
+ success = nm_supplicant_config_add_option (self,
+ "password",
+ (const char *)array->data,
+ array->len,
+ TRUE);
+ if (!success) {
+ nm_log_warn (LOGD_SUPPLICANT, "Error adding password-raw to supplicant config.");
+ return FALSE;
+ }
+ }
+ }
value = nm_setting_802_1x_get_pin (setting);
if (!add_string_val (self, value, "pin", FALSE, TRUE))
return FALSE;
@@ -744,14 +773,16 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
ADD_STRING_LIST_VAL (setting, 802_1x, eap_method, eap_methods, "eap", ' ', TRUE, FALSE);
- /* Check for PEAP + GTC */
+ /* Check EAP method for special handling: PEAP + GTC, FAST */
num_eap = nm_setting_802_1x_get_num_eap_methods (setting);
for (i = 0; i < num_eap; i++) {
const char *method = nm_setting_802_1x_get_eap_method (setting, i);
- if (method && (strcasecmp (method, "peap") == 0)) {
+ if (method && (strcasecmp (method, "peap") == 0))
peap = TRUE;
- break;
+ if (method && (strcasecmp (method, "fast") == 0)) {
+ fast = TRUE;
+ priv->fast_required = TRUE;
}
}
@@ -785,6 +816,16 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
g_string_append_printf (phase1, "peaplabel=%s", nm_setting_802_1x_get_phase1_peaplabel (setting));
}
+ value = nm_setting_802_1x_get_phase1_fast_provisioning (setting);
+ if (value) {
+ if (phase1->len)
+ g_string_append_c (phase1, ' ');
+ g_string_append_printf (phase1, "fast_provisioning=%s", value);
+
+ if (strcmp (value, "0") != 0)
+ fast_provisoning_allowed = TRUE;
+ }
+
if (phase1->len) {
if (!add_string_val (self, phase1->str, "phase1", FALSE, FALSE)) {
g_string_free (phase1, TRUE);
@@ -794,7 +835,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
g_string_free (phase1, TRUE);
phase2 = g_string_new (NULL);
- if (nm_setting_802_1x_get_phase2_auth (setting)) {
+ if (nm_setting_802_1x_get_phase2_auth (setting) && !fast_provisoning_allowed) {
tmp = g_ascii_strup (nm_setting_802_1x_get_phase2_auth (setting), -1);
g_string_append_printf (phase2, "auth=%s", tmp);
g_free (tmp);
@@ -816,6 +857,32 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
}
g_string_free (phase2, TRUE);
+ /* PAC file */
+ path = nm_setting_802_1x_get_pac_file (setting);
+ if (path) {
+ if (!add_string_val (self, path, "pac_file", FALSE, FALSE))
+ return FALSE;
+ } else {
+ /* PAC file is not specified.
+ * If provisioning is allowed, use an blob format.
+ */
+ if (fast_provisoning_allowed) {
+ char *blob_name = g_strdup_printf ("blob://pac-blob-%s", con_uuid);
+ if (!add_string_val (self, blob_name, "pac_file", FALSE, FALSE)) {
+ g_free (blob_name);
+ return FALSE;
+ }
+ g_free (blob_name);
+ } else {
+ /* This is only error for EAP-FAST; don't disturb other methods. */
+ if (fast) {
+ nm_log_err (LOGD_SUPPLICANT, "EAP-FAST error: no PAC file provided and "
+ "automatic PAC provisioning is disabled.");
+ return FALSE;
+ }
+ }
+ }
+
/* CA path */
path = nm_setting_802_1x_get_ca_path (setting);
if (nm_setting_802_1x_get_system_ca_certs (setting))
@@ -838,7 +905,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
switch (nm_setting_802_1x_get_ca_cert_scheme (setting)) {
case NM_SETTING_802_1X_CK_SCHEME_BLOB:
array = nm_setting_802_1x_get_ca_cert_blob (setting);
- ADD_BLOB_VAL (array, "ca_cert", connection_uid);
+ ADD_BLOB_VAL (array, "ca_cert", con_uuid);
break;
case NM_SETTING_802_1X_CK_SCHEME_PATH:
path = nm_setting_802_1x_get_ca_cert_path (setting);
@@ -853,7 +920,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
switch (nm_setting_802_1x_get_phase2_ca_cert_scheme (setting)) {
case NM_SETTING_802_1X_CK_SCHEME_BLOB:
array = nm_setting_802_1x_get_phase2_ca_cert_blob (setting);
- ADD_BLOB_VAL (array, "ca_cert2", connection_uid);
+ ADD_BLOB_VAL (array, "ca_cert2", con_uuid);
break;
case NM_SETTING_802_1X_CK_SCHEME_PATH:
path = nm_setting_802_1x_get_phase2_ca_cert_path (setting);
@@ -881,7 +948,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
switch (nm_setting_802_1x_get_private_key_scheme (setting)) {
case NM_SETTING_802_1X_CK_SCHEME_BLOB:
array = nm_setting_802_1x_get_private_key_blob (setting);
- ADD_BLOB_VAL (array, "private_key", connection_uid);
+ ADD_BLOB_VAL (array, "private_key", con_uuid);
added = TRUE;
break;
case NM_SETTING_802_1X_CK_SCHEME_PATH:
@@ -919,7 +986,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
switch (nm_setting_802_1x_get_client_cert_scheme (setting)) {
case NM_SETTING_802_1X_CK_SCHEME_BLOB:
array = nm_setting_802_1x_get_client_cert_blob (setting);
- ADD_BLOB_VAL (array, "client_cert", connection_uid);
+ ADD_BLOB_VAL (array, "client_cert", con_uuid);
break;
case NM_SETTING_802_1X_CK_SCHEME_PATH:
path = nm_setting_802_1x_get_client_cert_path (setting);
@@ -937,7 +1004,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
switch (nm_setting_802_1x_get_phase2_private_key_scheme (setting)) {
case NM_SETTING_802_1X_CK_SCHEME_BLOB:
array = nm_setting_802_1x_get_phase2_private_key_blob (setting);
- ADD_BLOB_VAL (array, "private_key2", connection_uid);
+ ADD_BLOB_VAL (array, "private_key2", con_uuid);
added = TRUE;
break;
case NM_SETTING_802_1X_CK_SCHEME_PATH:
@@ -975,7 +1042,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
switch (nm_setting_802_1x_get_phase2_client_cert_scheme (setting)) {
case NM_SETTING_802_1X_CK_SCHEME_BLOB:
array = nm_setting_802_1x_get_phase2_client_cert_blob (setting);
- ADD_BLOB_VAL (array, "client_cert2", connection_uid);
+ ADD_BLOB_VAL (array, "client_cert2", con_uuid);
break;
case NM_SETTING_802_1X_CK_SCHEME_PATH:
path = nm_setting_802_1x_get_phase2_client_cert_path (setting);
diff --git a/src/supplicant-manager/nm-supplicant-config.h b/src/supplicant-manager/nm-supplicant-config.h
index dad23e29f..a8d304709 100644
--- a/src/supplicant-manager/nm-supplicant-config.h
+++ b/src/supplicant-manager/nm-supplicant-config.h
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2006 - 2008 Red Hat, Inc.
+ * Copyright (C) 2006 - 2012 Red Hat, Inc.
* Copyright (C) 2007 - 2008 Novell, Inc.
*/
@@ -57,6 +57,8 @@ guint32 nm_supplicant_config_get_ap_scan (NMSupplicantConfig *self);
void nm_supplicant_config_set_ap_scan (NMSupplicantConfig *self,
guint32 ap_scan);
+gboolean nm_supplicant_config_fast_required (NMSupplicantConfig *self);
+
GHashTable *nm_supplicant_config_get_hash (NMSupplicantConfig *self);
GHashTable *nm_supplicant_config_get_blobs (NMSupplicantConfig *self);
@@ -70,13 +72,13 @@ gboolean nm_supplicant_config_add_setting_wireless (NMSupplicantConfig *self,
gboolean nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self,
NMSettingWirelessSecurity *setting,
NMSetting8021x *setting_8021x,
- const char *connection_uid);
+ const char *con_uuid);
gboolean nm_supplicant_config_add_no_security (NMSupplicantConfig *self);
gboolean nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
NMSetting8021x *setting,
- const char *connection_uid,
+ const char *con_uuid,
gboolean wired);
G_END_DECLS
diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c
index 857cde51c..f8ad8f18a 100644
--- a/src/supplicant-manager/nm-supplicant-interface.c
+++ b/src/supplicant-manager/nm-supplicant-interface.c
@@ -15,10 +15,11 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2006 - 2010 Red Hat, Inc.
+ * Copyright (C) 2006 - 2012 Red Hat, Inc.
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
+#include <config.h>
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -55,11 +56,14 @@ static void wpas_iface_scan_done (DBusGProxy *proxy,
/* Signals */
enum {
- STATE, /* change in the interface's state */
- REMOVED, /* interface was removed by the supplicant */
- NEW_BSS, /* interface saw a new access point from a scan */
- SCAN_DONE, /* wifi scan is complete */
- CONNECTION_ERROR, /* an error occurred during a connection request */
+ STATE, /* change in the interface's state */
+ REMOVED, /* interface was removed by the supplicant */
+ NEW_BSS, /* interface saw a new access point from a scan */
+ BSS_UPDATED, /* a BSS property changed */
+ BSS_REMOVED, /* supplicant removed BSS from its scan list */
+ SCAN_DONE, /* wifi scan is complete */
+ CONNECTION_ERROR, /* an error occurred during a connection request */
+ CREDENTIALS_REQUEST, /* 802.1x identity or password requested */
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
@@ -79,6 +83,8 @@ typedef struct {
NMDBusManager * dbus_mgr;
char * dev;
gboolean is_wireless;
+ gboolean has_credreq; /* Whether querying 802.1x credentials is supported */
+ gboolean fast_supported;
char * object_path;
guint32 state;
@@ -92,6 +98,7 @@ typedef struct {
DBusGProxy * props_proxy;
char * net_path;
guint32 blobs_left;
+ GHashTable * bss_proxies;
guint32 last_scan;
@@ -100,6 +107,28 @@ typedef struct {
gboolean disposed;
} NMSupplicantInterfacePrivate;
+/* FIXME: remove this and just store the standard D-Bus properties
+ * proxy object in bss_proxies when we drop support for wpa_supplicant
+ * 0.7.x.
+ */
+typedef struct {
+ /* Proxy for standard D-Bus Properties interface */
+ DBusGProxy *props;
+ /* Proxy for old wpa_supplicant-specific PropertiesChanged signal */
+ DBusGProxy *old_props;
+} BssProxies;
+
+static void
+bss_proxies_free (gpointer data)
+{
+ BssProxies *proxies = data;
+
+ g_object_unref (proxies->props);
+ g_object_unref (proxies->old_props);
+ memset (proxies, 0, sizeof (*proxies));
+ g_free (proxies);
+}
+
static gboolean
cancel_all_cb (GObject *object, gpointer call_id, gpointer user_data)
{
@@ -192,6 +221,14 @@ emit_error_helper (NMSupplicantInterface *self,
}
static void
+signal_new_bss (NMSupplicantInterface *self,
+ const char *object_path,
+ GHashTable *props)
+{
+ g_signal_emit (self, signals[NEW_BSS], 0, object_path, props);
+}
+
+static void
bssid_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMSupplicantInfo *info = (NMSupplicantInfo *) user_data;
@@ -201,7 +238,7 @@ bssid_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_
if (dbus_g_proxy_end_call (proxy, call_id, &error,
DBUS_TYPE_G_MAP_OF_VARIANT, &props,
G_TYPE_INVALID)) {
- g_signal_emit (info->interface, signals[NEW_BSS], 0, props);
+ signal_new_bss (info->interface, dbus_g_proxy_get_path (proxy), props);
g_hash_table_destroy (props);
} else {
if (!strstr (error->message, "The BSSID requested was invalid")) {
@@ -213,31 +250,93 @@ bssid_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_
}
static void
-request_bss_properties (NMSupplicantInterface *self,
- GPtrArray *paths)
+bss_properties_changed (DBusGProxy *proxy,
+ const char *interface,
+ GHashTable *props,
+ const char **unused,
+ gpointer user_data)
+{
+ NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data);
+
+ if (g_strcmp0 (interface, WPAS_DBUS_IFACE_BSS) == 0)
+ g_signal_emit (self, signals[BSS_UPDATED], 0, dbus_g_proxy_get_path (proxy), props);
+}
+
+static void
+old_bss_properties_changed (DBusGProxy *proxy,
+ GHashTable *props,
+ gpointer user_data)
+{
+ NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data);
+
+ g_signal_emit (self, signals[BSS_UPDATED], 0, dbus_g_proxy_get_path (proxy), props);
+}
+
+static void
+handle_new_bss (NMSupplicantInterface *self,
+ const char *object_path,
+ GHashTable *props)
{
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
- int i;
-
- /* Fire off a "properties" call for each returned BSSID */
- for (i = 0; i < paths->len; i++) {
- NMSupplicantInfo *info;
- DBusGProxy *proxy;
- DBusGProxyCall *call;
-
- proxy = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr),
- WPAS_DBUS_SERVICE,
- g_ptr_array_index (paths, i),
- DBUS_INTERFACE_PROPERTIES);
- info = nm_supplicant_info_new (self, proxy, priv->other_pcalls);
- call = dbus_g_proxy_begin_call (proxy, "GetAll",
- bssid_properties_cb,
- info,
- nm_supplicant_info_destroy,
- G_TYPE_STRING, WPAS_DBUS_IFACE_BSS,
- G_TYPE_INVALID);
+ NMSupplicantInfo *info;
+ DBusGProxyCall *call;
+ BssProxies *proxies;
+
+ g_return_if_fail (object_path != NULL);
+
+ if (g_hash_table_lookup (priv->bss_proxies, object_path))
+ return;
+
+ proxies = g_malloc0 (sizeof (*proxies));
+ proxies->props = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr),
+ WPAS_DBUS_SERVICE,
+ object_path,
+ DBUS_INTERFACE_PROPERTIES);
+ proxies->old_props = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr),
+ WPAS_DBUS_SERVICE,
+ object_path,
+ WPAS_DBUS_IFACE_BSS);
+ g_hash_table_insert (priv->bss_proxies,
+ (gpointer) dbus_g_proxy_get_path (proxies->props),
+ proxies);
+
+ /* Standard D-Bus PropertiesChanged signal */
+ dbus_g_object_register_marshaller (_nm_marshal_VOID__STRING_BOXED_BOXED,
+ G_TYPE_NONE,
+ G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT, G_TYPE_STRV,
+ G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (proxies->props, "PropertiesChanged",
+ G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT, G_TYPE_STRV,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (proxies->props, "PropertiesChanged",
+ G_CALLBACK (bss_properties_changed),
+ self, NULL);
+
+ /* Old wpa_supplicant-specific PropertiesChanged signal; since it's using
+ * a different interface, we have to use a different DBusGProxy
+ */
+ dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE,
+ DBUS_TYPE_G_MAP_OF_VARIANT,
+ G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (proxies->old_props, "PropertiesChanged",
+ DBUS_TYPE_G_MAP_OF_VARIANT,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (proxies->old_props, "PropertiesChanged",
+ G_CALLBACK (old_bss_properties_changed),
+ self, NULL);
+
+ if (props) {
+ signal_new_bss (self, object_path, props);
+ } else {
+ info = nm_supplicant_info_new (self, proxies->props, priv->other_pcalls);
+ call = dbus_g_proxy_begin_call (proxies->props, "GetAll",
+ bssid_properties_cb,
+ info,
+ nm_supplicant_info_destroy,
+ G_TYPE_STRING, WPAS_DBUS_IFACE_BSS,
+ G_TYPE_INVALID);
nm_supplicant_info_set_call (info, call);
- g_object_unref (proxy);
}
}
@@ -247,7 +346,20 @@ wpas_iface_bss_added (DBusGProxy *proxy,
GHashTable *props,
gpointer user_data)
{
- g_signal_emit (NM_SUPPLICANT_INTERFACE (user_data), signals[NEW_BSS], 0, props);
+ handle_new_bss (NM_SUPPLICANT_INTERFACE (user_data), object_path, props);
+}
+
+static void
+wpas_iface_bss_removed (DBusGProxy *proxy,
+ const char *object_path,
+ gpointer user_data)
+{
+ NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data);
+ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
+
+ g_signal_emit (self, signals[BSS_REMOVED], 0, object_path);
+
+ g_hash_table_remove (priv->bss_proxies, object_path);
}
static int
@@ -318,6 +430,10 @@ set_state (NMSupplicantInterface *self, guint32 new_state)
"BSSAdded",
G_CALLBACK (wpas_iface_bss_added),
self);
+ dbus_g_proxy_disconnect_signal (priv->iface_proxy,
+ "BSSRemoved",
+ G_CALLBACK (wpas_iface_bss_removed),
+ self);
}
}
@@ -403,8 +519,13 @@ wpas_iface_properties_changed (DBusGProxy *proxy,
set_state_from_string (self, g_value_get_string (value));
value = g_hash_table_lookup (props, "BSSs");
- if (value && G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH))
- request_bss_properties (self, g_value_get_boxed (value));
+ if (value && G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH)) {
+ GPtrArray *paths = g_value_get_boxed (value);
+ int i;
+
+ for (i = 0; paths && (i < paths->len); i++)
+ handle_new_bss (self, g_ptr_array_index (paths, i), NULL);
+ }
}
static void
@@ -443,6 +564,92 @@ wpas_iface_get_props (NMSupplicantInterface *self)
nm_supplicant_info_set_call (info, call);
}
+gboolean
+nm_supplicant_interface_credentials_reply (NMSupplicantInterface *self,
+ const char *field,
+ const char *value,
+ GError **error)
+{
+ NMSupplicantInterfacePrivate *priv;
+
+ g_return_val_if_fail (self != NULL, FALSE);
+ g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), FALSE);
+ g_return_val_if_fail (field != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
+ g_return_val_if_fail (priv->has_credreq == TRUE, FALSE);
+
+ /* Need a network block object path */
+ g_return_val_if_fail (priv->net_path, FALSE);
+ return dbus_g_proxy_call_with_timeout (priv->iface_proxy, "NetworkReply",
+ 5000,
+ error,
+ DBUS_TYPE_G_OBJECT_PATH, priv->net_path,
+ G_TYPE_STRING, field,
+ G_TYPE_STRING, value,
+ G_TYPE_INVALID);
+}
+
+static void
+wpas_iface_network_request (DBusGProxy *proxy,
+ const char *object_path,
+ const char *field,
+ const char *message,
+ gpointer user_data)
+{
+ NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data);
+ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
+
+ g_return_if_fail (priv->has_credreq == TRUE);
+ g_return_if_fail (priv->net_path != NULL);
+ g_return_if_fail (g_strcmp0 (object_path, priv->net_path) == 0);
+
+ g_signal_emit (self, signals[CREDENTIALS_REQUEST], 0, field, message);
+}
+
+static void
+iface_check_netreply_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
+{
+ NMSupplicantInfo *info = (NMSupplicantInfo *) user_data;
+ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface);
+ GError *error = NULL;
+
+ if ( dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)
+ || dbus_g_error_has_name (error, "fi.w1.wpa_supplicant1.InvalidArgs")) {
+ /* We know NetworkReply is supported if the NetworkReply method returned
+ * successfully (which is unexpected since we sent a bogus network
+ * object path) or if we got an "InvalidArgs" (which indicates NetworkReply
+ * is supported). We know it's not supported if we get an
+ * "UnknownMethod" error.
+ */
+ priv->has_credreq = TRUE;
+
+ nm_log_dbg (LOGD_SUPPLICANT, "Supplicant %s network credentials requests",
+ priv->has_credreq ? "supports" : "does not support");
+ }
+ g_clear_error (&error);
+}
+
+static void
+wpas_iface_check_network_reply (NMSupplicantInterface *self)
+{
+ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
+ NMSupplicantInfo *info;
+ DBusGProxyCall *call;
+
+ info = nm_supplicant_info_new (self, priv->props_proxy, priv->other_pcalls);
+ call = dbus_g_proxy_begin_call (priv->iface_proxy, "NetworkReply",
+ iface_check_netreply_cb,
+ info,
+ nm_supplicant_info_destroy,
+ DBUS_TYPE_G_OBJECT_PATH, "/foobaraasdfasdf",
+ G_TYPE_STRING, "foobar",
+ G_TYPE_STRING, "foobar",
+ G_TYPE_INVALID);
+ nm_supplicant_info_set_call (info, call);
+}
+
static void
interface_add_done (NMSupplicantInterface *self, char *path)
{
@@ -486,6 +693,30 @@ interface_add_done (NMSupplicantInterface *self, char *path)
self,
NULL);
+ dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE,
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (priv->iface_proxy, "BSSRemoved",
+ DBUS_TYPE_G_OBJECT_PATH,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (priv->iface_proxy, "BSSRemoved",
+ G_CALLBACK (wpas_iface_bss_removed),
+ self,
+ NULL);
+
+ dbus_g_object_register_marshaller (_nm_marshal_VOID__STRING_STRING_STRING,
+ G_TYPE_NONE,
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (priv->iface_proxy, "NetworkRequest",
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (priv->iface_proxy, "NetworkRequest",
+ G_CALLBACK (wpas_iface_network_request),
+ self,
+ NULL);
+
priv->props_proxy = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr),
WPAS_DBUS_SERVICE,
path,
@@ -493,6 +724,9 @@ interface_add_done (NMSupplicantInterface *self, char *path)
/* Get initial properties */
wpas_iface_get_props (self);
+ /* Check whether NetworkReply is supported */
+ wpas_iface_check_network_reply (self);
+
set_state (self, NM_SUPPLICANT_INTERFACE_STATE_READY);
}
@@ -574,6 +808,12 @@ interface_add_cb (DBusGProxy *proxy,
}
}
+#if HAVE_WEXT
+#define DEFAULT_WIFI_DRIVER "nl80211,wext"
+#else
+#define DEFAULT_WIFI_DRIVER "nl80211"
+#endif
+
static void
interface_add (NMSupplicantInterface *self, gboolean is_wireless)
{
@@ -602,7 +842,7 @@ interface_add (NMSupplicantInterface *self, gboolean is_wireless)
driver = g_new0 (GValue, 1);
g_value_init (driver, G_TYPE_STRING);
- g_value_set_string (driver, is_wireless ? "nl80211,wext" : "wired");
+ g_value_set_string (driver, is_wireless ? DEFAULT_WIFI_DRIVER : "wired");
g_hash_table_insert (hash, "Driver", driver);
ifname = g_new0 (GValue, 1);
@@ -851,7 +1091,15 @@ nm_supplicant_interface_set_config (NMSupplicantInterface * self,
priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
nm_supplicant_interface_disconnect (self);
-
+
+ /* Make sure the supplicant supports EAP-FAST before trying to send
+ * it an EAP-FAST configuration.
+ */
+ if (nm_supplicant_config_fast_required (cfg) && !priv->fast_supported) {
+ nm_log_warn (LOGD_SUPPLICANT, "EAP-FAST is not supported by the supplicant");
+ return FALSE;
+ }
+
if (priv->cfg)
g_object_unref (priv->cfg);
priv->cfg = cfg;
@@ -1017,6 +1265,7 @@ NMSupplicantInterface *
nm_supplicant_interface_new (NMSupplicantManager *smgr,
const char *ifname,
gboolean is_wireless,
+ gboolean fast_supported,
gboolean start_now)
{
NMSupplicantInterface *self;
@@ -1039,6 +1288,7 @@ nm_supplicant_interface_new (NMSupplicantManager *smgr,
priv->dev = g_strdup (ifname);
priv->is_wireless = is_wireless;
+ priv->fast_supported = fast_supported;
if (start_now)
interface_add (self, priv->is_wireless);
@@ -1063,6 +1313,8 @@ nm_supplicant_interface_init (NMSupplicantInterface * self)
WPAS_DBUS_SERVICE,
WPAS_DBUS_PATH,
WPAS_DBUS_INTERFACE);
+
+ priv->bss_proxies = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, bss_proxies_free);
}
static void
@@ -1123,6 +1375,8 @@ dispose (GObject *object)
if (priv->wpas_proxy)
g_object_unref (priv->wpas_proxy);
+ g_hash_table_destroy (priv->bss_proxies);
+
if (priv->smgr) {
if (priv->smgr_avail_id)
g_signal_handler_disconnect (priv->smgr, priv->smgr_avail_id);
@@ -1187,8 +1441,26 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NMSupplicantInterfaceClass, new_bss),
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ _nm_marshal_VOID__STRING_POINTER,
+ G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER);
+
+ signals[BSS_UPDATED] =
+ g_signal_new (NM_SUPPLICANT_INTERFACE_BSS_UPDATED,
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NMSupplicantInterfaceClass, bss_updated),
+ NULL, NULL,
+ _nm_marshal_VOID__STRING_POINTER,
+ G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER);
+
+ signals[BSS_REMOVED] =
+ g_signal_new (NM_SUPPLICANT_INTERFACE_BSS_REMOVED,
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NMSupplicantInterfaceClass, bss_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
signals[SCAN_DONE] =
g_signal_new (NM_SUPPLICANT_INTERFACE_SCAN_DONE,
@@ -1207,5 +1479,14 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass)
NULL, NULL,
_nm_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
+
+ signals[CREDENTIALS_REQUEST] =
+ g_signal_new (NM_SUPPLICANT_INTERFACE_CREDENTIALS_REQUEST,
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NMSupplicantInterfaceClass, credentials_request),
+ NULL, NULL,
+ _nm_marshal_VOID__STRING_STRING,
+ G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
}
diff --git a/src/supplicant-manager/nm-supplicant-interface.h b/src/supplicant-manager/nm-supplicant-interface.h
index e32411d7c..608ee0590 100644
--- a/src/supplicant-manager/nm-supplicant-interface.h
+++ b/src/supplicant-manager/nm-supplicant-interface.h
@@ -57,8 +57,11 @@ enum {
#define NM_SUPPLICANT_INTERFACE_STATE "state"
#define NM_SUPPLICANT_INTERFACE_REMOVED "removed"
#define NM_SUPPLICANT_INTERFACE_NEW_BSS "new-bss"
+#define NM_SUPPLICANT_INTERFACE_BSS_UPDATED "bss-updated"
+#define NM_SUPPLICANT_INTERFACE_BSS_REMOVED "bss-removed"
#define NM_SUPPLICANT_INTERFACE_SCAN_DONE "scan-done"
#define NM_SUPPLICANT_INTERFACE_CONNECTION_ERROR "connection-error"
+#define NM_SUPPLICANT_INTERFACE_CREDENTIALS_REQUEST "credentials-request"
struct _NMSupplicantInterface {
GObject parent;
@@ -79,8 +82,18 @@ typedef struct {
/* interface saw a new BSS */
void (*new_bss) (NMSupplicantInterface *iface,
+ const char *object_path,
GHashTable *props);
+ /* a BSS property changed */
+ void (*bss_updated) (NMSupplicantInterface *iface,
+ const char *object_path,
+ GHashTable *props);
+
+ /* supplicant removed a BSS from its scan list */
+ void (*bss_removed) (NMSupplicantInterface *iface,
+ const char *object_path);
+
/* wireless scan is done */
void (*scan_done) (NMSupplicantInterface *iface,
gboolean success);
@@ -89,6 +102,11 @@ typedef struct {
void (*connection_error) (NMSupplicantInterface * iface,
const char * name,
const char * message);
+
+ /* 802.1x credentials requested */
+ void (*credentials_request) (NMSupplicantInterface *iface,
+ const char *field,
+ const char *message);
} NMSupplicantInterfaceClass;
@@ -97,6 +115,7 @@ GType nm_supplicant_interface_get_type (void);
NMSupplicantInterface * nm_supplicant_interface_new (NMSupplicantManager * smgr,
const char *ifname,
gboolean is_wireless,
+ gboolean fast_supported,
gboolean start_now);
gboolean nm_supplicant_interface_set_config (NMSupplicantInterface * iface,
@@ -118,4 +137,11 @@ gboolean nm_supplicant_interface_get_scanning (NMSupplicantInterface *self);
const char *nm_supplicant_interface_get_ifname (NMSupplicantInterface *self);
+gboolean nm_supplicant_interface_get_has_credentials_request (NMSupplicantInterface *self);
+
+gboolean nm_supplicant_interface_credentials_reply (NMSupplicantInterface *self,
+ const char *field,
+ const char *value,
+ GError **error);
+
#endif /* NM_SUPPLICANT_INTERFACE_H */
diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c
index 349f722a6..ae1508651 100644
--- a/src/supplicant-manager/nm-supplicant-manager.c
+++ b/src/supplicant-manager/nm-supplicant-manager.c
@@ -86,7 +86,7 @@ nm_supplicant_manager_iface_get (NMSupplicantManager * self,
start_now = !die_count_exceeded (priv->die_count);
nm_log_dbg (LOGD_SUPPLICANT, "(%s): creating new supplicant interface", ifname);
- iface = nm_supplicant_interface_new (self, ifname, is_wireless, start_now);
+ iface = nm_supplicant_interface_new (self, ifname, is_wireless, priv->fast_supported, start_now);
if (iface)
g_hash_table_insert (priv->ifaces, g_strdup (ifname), iface);
} else {
diff --git a/src/supplicant-manager/nm-supplicant-settings-verify.c b/src/supplicant-manager/nm-supplicant-settings-verify.c
index aea5bfece..76de84d82 100644
--- a/src/supplicant-manager/nm-supplicant-settings-verify.c
+++ b/src/supplicant-manager/nm-supplicant-settings-verify.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2006 - 2008 Red Hat, Inc.
+ * Copyright (C) 2006 - 2012 Red Hat, Inc.
*/
#include <glib.h>
@@ -44,6 +44,10 @@ static gboolean validate_type_bytes (const struct Opt * opt,
const char * value,
const guint32 len);
+static gboolean validate_type_utf8 (const struct Opt *opt,
+ const char * value,
+ const guint32 len);
+
static gboolean validate_type_keyword (const struct Opt * opt,
const char * value,
const guint32 len);
@@ -58,6 +62,7 @@ struct validate_entry {
static const struct validate_entry validate_table[] = {
{ TYPE_INT, validate_type_int },
{ TYPE_BYTES, validate_type_bytes },
+ { TYPE_UTF8, validate_type_utf8 },
{ TYPE_KEYWORD, validate_type_keyword },
};
@@ -73,7 +78,9 @@ const char * eap_allowed[] = { "LEAP", "MD5", "TLS", "PEAP", "TTLS", "SIM",
const char * phase1_allowed[] = {"peapver=0", "peapver=1", "peaplabel=1",
"peap_outer_success=0", "include_tls_length=1",
- "sim_min_num_chal=3", NULL };
+ "sim_min_num_chal=3", "fast_provisioning=0",
+ "fast_provisioning=1", "fast_provisioning=2",
+ "fast_provisioning=3", NULL };
const char * phase2_allowed[] = {"auth=PAP", "auth=CHAP", "auth=MSCHAP",
"auth=MSCHAPV2", "auth=GTC", "auth=OTP",
"auth=MD5", "auth=TLS", "autheap=MD5",
@@ -100,7 +107,7 @@ static const struct Opt opt_table[] = {
{ "eapol_flags", TYPE_INT, 0, 3, FALSE, NULL },
{ "eap", TYPE_KEYWORD, 0, 0, FALSE, eap_allowed },
{ "identity", TYPE_BYTES, 0, 0, FALSE, NULL },
- { "password", TYPE_BYTES, 0, 0, FALSE, NULL },
+ { "password", TYPE_UTF8, 0, 0, FALSE, NULL },
{ "ca_path", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "subject_match", TYPE_BYTES, 0, 0, FALSE, NULL },
{ "altsubject_match", TYPE_BYTES, 0, 0, FALSE, NULL },
@@ -129,6 +136,7 @@ static const struct Opt opt_table[] = {
{ "fragment_size", TYPE_INT, 1, 2000, FALSE, NULL },
{ "proactive_key_caching", TYPE_INT, 0, 1, FALSE, NULL },
{ "bgscan", TYPE_BYTES, 0, 0, FALSE, NULL },
+ { "pac_file", TYPE_BYTES, 0, 1024, FALSE, NULL },
};
@@ -174,6 +182,26 @@ validate_type_bytes (const struct Opt * opt,
}
static gboolean
+validate_type_utf8 (const struct Opt *opt,
+ const char * value,
+ const guint32 len)
+{
+ guint32 check_len;
+
+ g_return_val_if_fail (opt != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ check_len = opt->int_high ? opt->int_high : 255;
+ /* Note that we deliberately don't validate the UTF-8, because
+ some "UTF-8" fields, such as 8021x.password, do not actually
+ have to be valid UTF-8 */
+ if (g_utf8_strlen (value, len) > check_len)
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
validate_type_keyword (const struct Opt * opt,
const char * value,
const guint32 len)
diff --git a/src/supplicant-manager/nm-supplicant-settings-verify.h b/src/supplicant-manager/nm-supplicant-settings-verify.h
index 0939ebdb0..eb213e0e8 100644
--- a/src/supplicant-manager/nm-supplicant-settings-verify.h
+++ b/src/supplicant-manager/nm-supplicant-settings-verify.h
@@ -21,10 +21,11 @@
#ifndef NM_SUPPLICANT_SETTINGS_VERIFY_H
#define NM_SUPPLICANT_SETTINGS_VERIFY_H
-typedef enum OptType {
+typedef enum {
TYPE_INVALID = 0,
TYPE_INT,
TYPE_BYTES,
+ TYPE_UTF8,
TYPE_KEYWORD,
TYPE_STRING
} OptType;
diff --git a/src/supplicant-manager/tests/Makefile.am b/src/supplicant-manager/tests/Makefile.am
index b5e4db61d..47ae66c57 100644
--- a/src/supplicant-manager/tests/Makefile.am
+++ b/src/supplicant-manager/tests/Makefile.am
@@ -1,6 +1,8 @@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/supplicant-manager
diff --git a/src/supplicant-manager/tests/Makefile.in b/src/supplicant-manager/tests/Makefile.in
index 25e60e86f..65be2b390 100644
--- a/src/supplicant-manager/tests/Makefile.in
+++ b/src/supplicant-manager/tests/Makefile.in
@@ -143,6 +143,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -197,11 +199,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -212,6 +218,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -251,6 +258,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -316,7 +325,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/supplicant-manager
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 296668aa9..904870429 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -1,6 +1,8 @@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src/dhcp-manager \
-I$(top_builddir)/marshallers \
-I$(top_srcdir)/src \
diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
index 39390e4b0..7d367415c 100644
--- a/src/tests/Makefile.in
+++ b/src/tests/Makefile.in
@@ -160,6 +160,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -214,11 +216,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -229,6 +235,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -268,6 +275,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -333,7 +342,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
+ -I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src/dhcp-manager \
-I$(top_builddir)/marshallers \
-I$(top_srcdir)/src \
diff --git a/src/tests/test-wifi-ap-utils.c b/src/tests/test-wifi-ap-utils.c
index 93bd325a5..faa023fc7 100644
--- a/src/tests/test-wifi-ap-utils.c
+++ b/src/tests/test-wifi-ap-utils.c
@@ -162,7 +162,7 @@ fill_wifi_empty (NMConnection *connection)
{
NMSettingWireless *s_wifi;
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
if (!s_wifi) {
s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
nm_connection_add_setting (connection, NM_SETTING (s_wifi));
@@ -175,7 +175,7 @@ fill_wifi (NMConnection *connection, const KeyData items[])
{
NMSettingWireless *s_wifi;
- s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ s_wifi = nm_connection_get_setting_wireless (connection);
if (!s_wifi) {
s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
nm_connection_add_setting (connection, NM_SETTING (s_wifi));
@@ -190,7 +190,7 @@ fill_wsec (NMConnection *connection, const KeyData items[])
{
NMSettingWirelessSecurity *s_wsec;
- s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ s_wsec = nm_connection_get_setting_wireless_security (connection);
if (!s_wsec) {
s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
nm_connection_add_setting (connection, NM_SETTING (s_wsec));
@@ -205,7 +205,7 @@ fill_8021x (NMConnection *connection, const KeyData items[])
{
NMSetting8021x *s_8021x;
- s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ s_8021x = nm_connection_get_setting_802_1x (connection);
if (!s_8021x) {
s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
diff --git a/src/vpn-manager/Makefile.am b/src/vpn-manager/Makefile.am
index ce99728ed..c3c5b5252 100644
--- a/src/vpn-manager/Makefile.am
+++ b/src/vpn-manager/Makefile.am
@@ -1,10 +1,13 @@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src \
- -I${top_builddir}/marshallers \
-I${top_srcdir}/src/dns-manager \
-DVPN_NAME_FILES_DIR=\""$(sysconfdir)/NetworkManager/VPN"\"
@@ -16,8 +19,6 @@ libvpn_manager_la_SOURCES = \
nm-vpn-manager.h \
nm-vpn-service.c \
nm-vpn-service.h \
- nm-vpn-connection-base.c \
- nm-vpn-connection-base.h \
nm-vpn-connection.c \
nm-vpn-connection.h
@@ -28,16 +29,13 @@ libvpn_manager_la_CPPFLAGS = \
-DG_DISABLE_DEPRECATED
libvpn_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS) \
$(GLIB_LIBS)
-nm-vpn-connection-base-glue.h: $(top_srcdir)/introspection/nm-active-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection_base --mode=glib-server --output=$@ $<
-
nm-vpn-connection-glue.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-server --output=$@ $<
@@ -46,7 +44,6 @@ nm-vpn-plugin-bindings.h: $(top_srcdir)/introspection/nm-vpn-plugin.xml
BUILT_SOURCES = \
- nm-vpn-connection-base-glue.h \
nm-vpn-connection-glue.h \
nm-vpn-plugin-bindings.h
diff --git a/src/vpn-manager/Makefile.in b/src/vpn-manager/Makefile.in
index 51a125078..9a7e5e425 100644
--- a/src/vpn-manager/Makefile.in
+++ b/src/vpn-manager/Makefile.in
@@ -57,13 +57,12 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libvpn_manager_la_DEPENDENCIES = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libvpn_manager_la_OBJECTS = libvpn_manager_la-nm-vpn-manager.lo \
libvpn_manager_la-nm-vpn-service.lo \
- libvpn_manager_la-nm-vpn-connection-base.lo \
libvpn_manager_la-nm-vpn-connection.lo
libvpn_manager_la_OBJECTS = $(am_libvpn_manager_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
@@ -145,6 +144,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -199,11 +200,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -214,6 +219,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -253,6 +259,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -319,10 +327,13 @@ top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/include \
+ -I${top_builddir}/include \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src/generated \
+ -I${top_builddir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src \
- -I${top_builddir}/marshallers \
-I${top_srcdir}/src/dns-manager \
-DVPN_NAME_FILES_DIR=\""$(sysconfdir)/NetworkManager/VPN"\"
@@ -332,8 +343,6 @@ libvpn_manager_la_SOURCES = \
nm-vpn-manager.h \
nm-vpn-service.c \
nm-vpn-service.h \
- nm-vpn-connection-base.c \
- nm-vpn-connection-base.h \
nm-vpn-connection.c \
nm-vpn-connection.h
@@ -344,7 +353,7 @@ libvpn_manager_la_CPPFLAGS = \
-DG_DISABLE_DEPRECATED
libvpn_manager_la_LIBADD = \
- $(top_builddir)/marshallers/libmarshallers.la \
+ $(top_builddir)/src/generated/libnm-generated.la \
$(top_builddir)/src/logging/libnm-logging.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(LIBNL_LIBS) \
@@ -352,7 +361,6 @@ libvpn_manager_la_LIBADD = \
$(GLIB_LIBS)
BUILT_SOURCES = \
- nm-vpn-connection-base-glue.h \
nm-vpn-connection-glue.h \
nm-vpn-plugin-bindings.h
@@ -410,7 +418,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-manager.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvpn_manager_la-nm-vpn-service.Plo@am__quote@
@@ -458,14 +465,6 @@ libvpn_manager_la-nm-vpn-service.lo: nm-vpn-service.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvpn_manager_la-nm-vpn-service.lo `test -f 'nm-vpn-service.c' || echo '$(srcdir)/'`nm-vpn-service.c
-libvpn_manager_la-nm-vpn-connection-base.lo: nm-vpn-connection-base.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvpn_manager_la-nm-vpn-connection-base.lo -MD -MP -MF $(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Tpo -c -o libvpn_manager_la-nm-vpn-connection-base.lo `test -f 'nm-vpn-connection-base.c' || echo '$(srcdir)/'`nm-vpn-connection-base.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Tpo $(DEPDIR)/libvpn_manager_la-nm-vpn-connection-base.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-vpn-connection-base.c' object='libvpn_manager_la-nm-vpn-connection-base.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvpn_manager_la-nm-vpn-connection-base.lo `test -f 'nm-vpn-connection-base.c' || echo '$(srcdir)/'`nm-vpn-connection-base.c
-
libvpn_manager_la-nm-vpn-connection.lo: nm-vpn-connection.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvpn_manager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvpn_manager_la-nm-vpn-connection.lo -MD -MP -MF $(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Tpo -c -o libvpn_manager_la-nm-vpn-connection.lo `test -f 'nm-vpn-connection.c' || echo '$(srcdir)/'`nm-vpn-connection.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Tpo $(DEPDIR)/libvpn_manager_la-nm-vpn-connection.Plo
@@ -682,9 +681,6 @@ uninstall-am:
pdf pdf-am ps ps-am tags uninstall uninstall-am
-nm-vpn-connection-base-glue.h: $(top_srcdir)/introspection/nm-active-connection.xml
- $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection_base --mode=glib-server --output=$@ $<
-
nm-vpn-connection-glue.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-server --output=$@ $<
diff --git a/src/vpn-manager/nm-vpn-connection-base.c b/src/vpn-manager/nm-vpn-connection-base.c
deleted file mode 100644
index bc2cffb27..000000000
--- a/src/vpn-manager/nm-vpn-connection-base.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2005 - 2011 Red Hat, Inc.
- * Copyright (C) 2007 - 2008 Novell, Inc.
- */
-
-#include "NetworkManager.h"
-#include "nm-vpn-connection-base.h"
-#include "nm-active-connection.h"
-#include "nm-vpn-connection-base-glue.h"
-#include "nm-dbus-manager.h"
-
-G_DEFINE_ABSTRACT_TYPE (NMVpnConnectionBase, nm_vpn_connection_base, G_TYPE_OBJECT)
-
-#define NM_VPN_CONNECTION_BASE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- NM_TYPE_VPN_CONNECTION_BASE, \
- NMVpnConnectionBasePrivate))
-
-typedef struct {
- gboolean disposed;
-
- NMConnection *connection;
- char *ac_path;
- char *specific_object;
- gboolean is_default;
- gboolean is_default6;
- NMActiveConnectionState state;
-} NMVpnConnectionBasePrivate;
-
-enum {
- PROP_0,
- PROP_CONNECTION,
- PROP_UUID,
- PROP_SPECIFIC_OBJECT,
- PROP_DEVICES,
- PROP_STATE,
- PROP_DEFAULT,
- PROP_DEFAULT6,
- PROP_VPN,
-
- LAST_PROP
-};
-
-/****************************************************************/
-
-void
-nm_vpn_connection_base_set_state (NMVpnConnectionBase *self,
- NMVPNConnectionState vpn_state)
-{
- NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (self);
- NMActiveConnectionState new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
-
- /* Set the NMActiveConnection state based on VPN state */
- switch (vpn_state) {
- case NM_VPN_CONNECTION_STATE_PREPARE:
- case NM_VPN_CONNECTION_STATE_NEED_AUTH:
- case NM_VPN_CONNECTION_STATE_CONNECT:
- case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
- new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATING;
- break;
- case NM_VPN_CONNECTION_STATE_ACTIVATED:
- new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATED;
- break;
- default:
- break;
- }
-
- if (new_ac_state != priv->state) {
- priv->state = new_ac_state;
- g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_STATE);
- }
-}
-
-const char *
-nm_vpn_connection_base_get_ac_path (NMVpnConnectionBase *self)
-{
- return NM_VPN_CONNECTION_BASE_GET_PRIVATE (self)->ac_path;
-}
-
-const char *
-nm_vpn_connection_base_get_specific_object (NMVpnConnectionBase *self)
-{
- return NM_VPN_CONNECTION_BASE_GET_PRIVATE (self)->specific_object;
-}
-
-void
-nm_vpn_connection_base_export (NMVpnConnectionBase *self,
- NMConnection *connection,
- const char *specific_object)
-{
- NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (self);
- NMDBusManager *dbus_mgr;
-
- g_return_if_fail (priv->connection == NULL);
-
- priv->connection = g_object_ref (connection);
- priv->specific_object = g_strdup (specific_object);
-
- dbus_mgr = nm_dbus_manager_get ();
- dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (dbus_mgr),
- priv->ac_path, G_OBJECT (self));
- g_object_unref (dbus_mgr);
-}
-
-/****************************************************************/
-
-static void
-nm_vpn_connection_base_init (NMVpnConnectionBase *self)
-{
- NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (self);
-
- priv->state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
- priv->ac_path = nm_active_connection_get_next_object_path ();
-}
-
-static void
-dispose (GObject *object)
-{
- NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (object);
-
- if (!priv->disposed) {
- priv->disposed = TRUE;
-
- g_free (priv->ac_path);
- g_free (priv->specific_object);
- g_object_unref (priv->connection);
- }
-
- G_OBJECT_CLASS (nm_vpn_connection_base_parent_class)->dispose (object);
-}
-
-static void
-get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- NMVpnConnectionBasePrivate *priv = NM_VPN_CONNECTION_BASE_GET_PRIVATE (object);
-
- switch (prop_id) {
- case PROP_CONNECTION:
- g_value_set_boxed (value, nm_connection_get_path (priv->connection));
- break;
- case PROP_UUID:
- g_value_set_string (value, nm_connection_get_uuid (priv->connection));
- break;
- case PROP_SPECIFIC_OBJECT:
- g_value_set_boxed (value, priv->specific_object);
- break;
- case PROP_DEVICES:
- g_value_take_boxed (value, g_ptr_array_new ());
- break;
- case PROP_STATE:
- g_value_set_uint (value, priv->state);
- break;
- case PROP_DEFAULT:
- g_value_set_boolean (value, priv->is_default);
- break;
- case PROP_DEFAULT6:
- g_value_set_boolean (value, priv->is_default6);
- break;
- case PROP_VPN:
- g_value_set_boolean (value, TRUE);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-nm_vpn_connection_base_class_init (NMVpnConnectionBaseClass *vpn_class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (vpn_class);
-
- g_type_class_add_private (vpn_class, sizeof (NMVpnConnectionBasePrivate));
-
- /* virtual methods */
- object_class->get_property = get_property;
- object_class->dispose = dispose;
-
- /* properties */
- nm_active_connection_install_properties (object_class,
- PROP_CONNECTION,
- PROP_UUID,
- PROP_SPECIFIC_OBJECT,
- PROP_DEVICES,
- PROP_STATE,
- PROP_DEFAULT,
- PROP_DEFAULT6,
- PROP_VPN);
-
- dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (vpn_class),
- &dbus_glib_nm_vpn_connection_base_object_info);
-}
-
diff --git a/src/vpn-manager/nm-vpn-connection-base.h b/src/vpn-manager/nm-vpn-connection-base.h
deleted file mode 100644
index 6f19e7c53..000000000
--- a/src/vpn-manager/nm-vpn-connection-base.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2005 - 2011 Red Hat, Inc.
- */
-
-#ifndef NM_VPN_CONNECTION_BASE_H
-#define NM_VPN_CONNECTION_BASE_H
-
-#include <glib-object.h>
-#include "NetworkManagerVPN.h"
-#include "nm-connection.h"
-
-#define NM_TYPE_VPN_CONNECTION_BASE (nm_vpn_connection_base_get_type ())
-#define NM_VPN_CONNECTION_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION_BASE, NMVpnConnectionBase))
-#define NM_VPN_CONNECTION_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPN_CONNECTION_BASE, NMVpnConnectionBaseClass))
-#define NM_IS_VPN_CONNECTION_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_VPN_CONNECTION_BASE))
-#define NM_IS_VPN_CONNECTION_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_VPN_CONNECTION_BASE))
-#define NM_VPN_CONNECTION_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_CONNECTION_BASE, NMVpnConnectionBaseClass))
-
-typedef struct {
- GObject parent;
-} NMVpnConnectionBase;
-
-typedef struct {
- GObjectClass parent;
-} NMVpnConnectionBaseClass;
-
-GType nm_vpn_connection_base_get_type (void);
-
-const char *nm_vpn_connection_base_get_ac_path (NMVpnConnectionBase *self);
-
-const char *nm_vpn_connection_base_get_specific_object (NMVpnConnectionBase *self);
-
-void nm_vpn_connection_base_export (NMVpnConnectionBase *self,
- NMConnection *connection,
- const char *specific_object);
-
-void nm_vpn_connection_base_set_state (NMVpnConnectionBase *self,
- NMVPNConnectionState vpn_state);
-
-#endif /* NM_VPN_CONNECTION_BASE_H */
-
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index 73f2b553c..b391f1eca 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2005 - 2012 Red Hat, Inc.
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
@@ -30,7 +30,6 @@
#include "NetworkManager.h"
#include "NetworkManagerVPN.h"
#include "nm-vpn-connection.h"
-#include "nm-device-interface.h"
#include "nm-setting-connection.h"
#include "nm-setting-vpn.h"
#include "nm-setting-ip4-config.h"
@@ -52,7 +51,7 @@
#include "nm-vpn-connection-glue.h"
-G_DEFINE_TYPE (NMVPNConnection, nm_vpn_connection, NM_TYPE_VPN_CONNECTION_BASE)
+G_DEFINE_TYPE (NMVPNConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
typedef enum {
/* Only system secrets */
@@ -108,12 +107,31 @@ enum {
PROP_0,
PROP_VPN_STATE,
PROP_BANNER,
+ PROP_MASTER = 2000,
LAST_PROP
};
static void get_secrets (NMVPNConnection *self, SecretsReq secrets_idx);
+static NMActiveConnectionState
+ac_state_from_vpn_state (NMVPNConnectionState vpn_state)
+{
+ /* Set the NMActiveConnection state based on VPN state */
+ switch (vpn_state) {
+ case NM_VPN_CONNECTION_STATE_PREPARE:
+ case NM_VPN_CONNECTION_STATE_NEED_AUTH:
+ case NM_VPN_CONNECTION_STATE_CONNECT:
+ case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
+ return NM_ACTIVE_CONNECTION_STATE_ACTIVATING;
+ case NM_VPN_CONNECTION_STATE_ACTIVATED:
+ return NM_ACTIVE_CONNECTION_STATE_ACTIVATED;
+ default:
+ break;
+ }
+ return NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
+}
+
static void
nm_vpn_connection_set_vpn_state (NMVPNConnection *connection,
NMVPNConnectionState vpn_state,
@@ -134,7 +152,8 @@ nm_vpn_connection_set_vpn_state (NMVPNConnection *connection,
priv->vpn_state = vpn_state;
/* Update active connection base class state */
- nm_vpn_connection_base_set_state (NM_VPN_CONNECTION_BASE (connection), vpn_state);
+ nm_active_connection_set_state (NM_ACTIVE_CONNECTION (connection),
+ ac_state_from_vpn_state (vpn_state));
/* Save ip_iface since when the VPN goes down it may get freed
* before we're done with it.
@@ -231,7 +250,10 @@ nm_vpn_connection_new (NMConnection *connection,
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (NM_IS_DEVICE (parent_device), NULL);
- self = (NMVPNConnection *) g_object_new (NM_TYPE_VPN_CONNECTION, NULL);
+ self = (NMVPNConnection *) g_object_new (NM_TYPE_VPN_CONNECTION,
+ NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, specific_object,
+ NM_ACTIVE_CONNECTION_VPN, TRUE,
+ NULL);
if (!self)
return NULL;
@@ -246,11 +268,16 @@ nm_vpn_connection_new (NMConnection *connection,
G_CALLBACK (device_state_changed),
self);
- priv->device_ip4 = g_signal_connect (parent_device, "notify::" NM_DEVICE_INTERFACE_IP4_CONFIG,
+ priv->device_ip4 = g_signal_connect (parent_device, "notify::" NM_DEVICE_IP4_CONFIG,
G_CALLBACK (device_ip4_config_changed),
self);
- nm_vpn_connection_base_export (NM_VPN_CONNECTION_BASE (self), connection, specific_object);
+ if (!nm_active_connection_export (NM_ACTIVE_CONNECTION (self),
+ connection,
+ nm_device_get_path (parent_device))) {
+ g_object_unref (self);
+ self = NULL;
+ }
return self;
}
@@ -259,10 +286,10 @@ static const char *
nm_vpn_connection_get_service (NMVPNConnection *connection)
{
NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection);
- NMSettingVPN *setting;
+ NMSettingVPN *s_vpn;
- setting = (NMSettingVPN *) nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_VPN);
- return nm_setting_vpn_get_service_type (setting);
+ s_vpn = nm_connection_get_setting_vpn (priv->connection);
+ return nm_setting_vpn_get_service_type (s_vpn);
}
static void
@@ -452,7 +479,7 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
/* Grab the interface index for address/routing operations */
priv->ip_ifindex = nm_netlink_iface_to_index (priv->ip_iface);
- if (!priv->ip_ifindex) {
+ if (priv->ip_ifindex < 0) {
nm_log_err (LOGD_VPN, "(%s): failed to look up VPN interface index", priv->ip_iface);
goto error;
}
@@ -520,6 +547,15 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
if (val)
nm_ip4_config_add_domain (config, g_value_get_string (val));
+ val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAINS);
+ if (val) {
+ const char **domains = g_value_get_boxed (val);
+ const char **domain;
+
+ for (domain = domains; domain && *domain; domain++)
+ nm_ip4_config_add_domain (config, *domain);
+ }
+
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_BANNER);
if (val) {
g_free (priv->banner);
@@ -559,7 +595,7 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
print_vpn_config (config, priv->ip4_internal_gw, priv->ip_iface, priv->banner);
/* Merge in user overrides from the NMConnection's IPv4 setting */
- s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_IP4_CONFIG));
+ s_ip4 = nm_connection_get_setting_ip4_config (priv->connection);
nm_utils_merge_ip4_config (config, s_ip4);
nm_system_iface_set_up (priv->ip_ifindex, TRUE, NULL);
@@ -646,22 +682,22 @@ static GHashTable *
_hash_with_username (NMConnection *connection, const char *username)
{
NMConnection *dup;
- NMSetting *s_vpn;
+ NMSettingVPN *s_vpn;
GHashTable *hash;
const char *existing;
/* Shortcut if we weren't given a username or if there already was one in
* the VPN setting; don't bother duplicating the connection and everything.
*/
- s_vpn = nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
+ s_vpn = nm_connection_get_setting_vpn (connection);
g_assert (s_vpn);
- existing = nm_setting_vpn_get_user_name (NM_SETTING_VPN (s_vpn));
+ existing = nm_setting_vpn_get_user_name (s_vpn);
if (username == NULL || existing)
return nm_connection_to_hash (connection, NM_SETTING_HASH_FLAG_ALL);
dup = nm_connection_duplicate (connection);
g_assert (dup);
- s_vpn = nm_connection_get_setting (dup, NM_TYPE_SETTING_VPN);
+ s_vpn = nm_connection_get_setting_vpn (dup);
g_assert (s_vpn);
g_object_set (s_vpn, NM_SETTING_VPN_USER_NAME, username, NULL);
hash = nm_connection_to_hash (dup, NM_SETTING_HASH_FLAG_ALL);
@@ -737,25 +773,17 @@ nm_vpn_connection_activate (NMVPNConnection *connection)
}
const char *
-nm_vpn_connection_get_active_connection_path (NMVPNConnection *connection)
-{
- g_return_val_if_fail (NM_IS_VPN_CONNECTION (connection), NULL);
-
- return nm_vpn_connection_base_get_ac_path (NM_VPN_CONNECTION_BASE (connection));
-}
-
-const char *
nm_vpn_connection_get_name (NMVPNConnection *connection)
{
NMVPNConnectionPrivate *priv;
- NMSettingConnection *setting;
+ NMSettingConnection *s_con;
g_return_val_if_fail (NM_IS_VPN_CONNECTION (connection), NULL);
priv = NM_VPN_CONNECTION_GET_PRIVATE (connection);
- setting = (NMSettingConnection *) nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (priv->connection);
- return nm_setting_connection_get_id (setting);
+ return nm_setting_connection_get_id (s_con);
}
NMConnection *
@@ -1152,6 +1180,9 @@ get_property (GObject *object, guint prop_id,
case PROP_BANNER:
g_value_set_string (value, priv->banner ? priv->banner : "");
break;
+ case PROP_MASTER:
+ g_value_set_boxed (value, nm_device_get_path (priv->parent_dev));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1171,6 +1202,8 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class)
object_class->dispose = dispose;
object_class->finalize = finalize;
+ g_object_class_override_property (object_class, PROP_MASTER, NM_ACTIVE_CONNECTION_MASTER);
+
/* properties */
g_object_class_install_property (object_class, PROP_VPN_STATE,
g_param_spec_uint (NM_VPN_CONNECTION_VPN_STATE,
@@ -1199,10 +1232,6 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class)
G_TYPE_NONE, 2,
G_TYPE_UINT, G_TYPE_UINT);
- signals[PROPERTIES_CHANGED] =
- nm_properties_changed_signal_new (object_class,
- G_STRUCT_OFFSET (NMVPNConnectionClass, properties_changed));
-
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (object_class),
&dbus_glib_nm_vpn_connection_object_info);
}
diff --git a/src/vpn-manager/nm-vpn-connection.h b/src/vpn-manager/nm-vpn-connection.h
index c0d15f8af..93cc06d16 100644
--- a/src/vpn-manager/nm-vpn-connection.h
+++ b/src/vpn-manager/nm-vpn-connection.h
@@ -26,7 +26,6 @@
#include <glib-object.h>
#include "NetworkManagerVPN.h"
#include "nm-device.h"
-#include "nm-vpn-connection-base.h"
#define NM_TYPE_VPN_CONNECTION (nm_vpn_connection_get_type ())
#define NM_VPN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnection))
@@ -39,18 +38,16 @@
#define NM_VPN_CONNECTION_BANNER "banner"
typedef struct {
- NMVpnConnectionBase parent;
+ NMActiveConnection parent;
} NMVPNConnection;
typedef struct {
- NMVpnConnectionBaseClass parent;
+ NMActiveConnectionClass parent;
/* Signals */
void (*vpn_state_changed) (NMVPNConnection *connection,
NMVPNConnectionState state,
NMVPNConnectionStateReason reason);
-
- void (*properties_changed) (NMVPNConnection *connection, GHashTable *properties);
} NMVPNConnectionClass;
GType nm_vpn_connection_get_type (void);
@@ -63,8 +60,6 @@ NMVPNConnection * nm_vpn_connection_new (NMConnection *connection,
void nm_vpn_connection_activate (NMVPNConnection *connection);
NMConnection * nm_vpn_connection_get_connection (NMVPNConnection *connection);
-const char * nm_vpn_connection_get_active_connection_path (NMVPNConnection *connection);
-const char * nm_vpn_connection_get_specific_object_path (NMVPNConnection *connection);
const char * nm_vpn_connection_get_name (NMVPNConnection *connection);
NMVPNConnectionState nm_vpn_connection_get_vpn_state (NMVPNConnection *connection);
const char * nm_vpn_connection_get_banner (NMVPNConnection *connection);
diff --git a/src/vpn-manager/nm-vpn-manager.c b/src/vpn-manager/nm-vpn-manager.c
index 41e96c0be..341319646 100644
--- a/src/vpn-manager/nm-vpn-manager.c
+++ b/src/vpn-manager/nm-vpn-manager.c
@@ -29,6 +29,7 @@
#include "nm-dbus-manager.h"
#include "NetworkManagerVPN.h"
#include "nm-marshal.h"
+#include "nm-enum-types.h"
#include "nm-logging.h"
G_DEFINE_TYPE (NMVPNManager, nm_vpn_manager, G_TYPE_OBJECT)
@@ -61,31 +62,6 @@ nm_vpn_manager_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_vpn_manager_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* The base device for the VPN connection is not active. */
- ENUM_ENTRY (NM_VPN_MANAGER_ERROR_DEVICE_NOT_ACTIVE, "BaseDeviceNotActive"),
- /* The requested VPN connection was invalid. */
- ENUM_ENTRY (NM_VPN_MANAGER_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* The VPN service required by this VPN connection did not exist or was invalid. */
- ENUM_ENTRY (NM_VPN_MANAGER_ERROR_SERVICE_INVALID, "ServiceInvalid"),
- /* The VPN service required by this VPN connection could not be started. */
- ENUM_ENTRY (NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED, "ServiceStartFailed"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMVPNManagerError", values);
- }
- return etype;
-}
-
static NMVPNService *
get_service_by_namefile (NMVPNManager *self, const char *namefile)
@@ -158,7 +134,7 @@ connection_vpn_state_changed (NMVPNConnection *connection,
}
}
-NMVPNConnection *
+NMActiveConnection *
nm_vpn_manager_activate_connection (NMVPNManager *manager,
NMConnection *connection,
NMDevice *device,
@@ -185,7 +161,7 @@ nm_vpn_manager_activate_connection (NMVPNManager *manager,
return NULL;
}
- vpn_setting = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
+ vpn_setting = nm_connection_get_setting_vpn (connection);
if (!vpn_setting) {
g_set_error (error,
NM_VPN_MANAGER_ERROR, NM_VPN_MANAGER_ERROR_CONNECTION_INVALID,
@@ -217,7 +193,7 @@ nm_vpn_manager_activate_connection (NMVPNManager *manager,
manager);
}
- return vpn;
+ return (NMActiveConnection *) vpn;
}
gboolean
@@ -243,7 +219,7 @@ nm_vpn_manager_deactivate_connection (NMVPNManager *self,
NMVPNConnection *vpn = NM_VPN_CONNECTION (aiter->data);
const char *vpn_path;
- vpn_path = nm_vpn_connection_get_active_connection_path (vpn);
+ vpn_path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (vpn));
if (!strcmp (path, vpn_path)) {
nm_vpn_connection_disconnect (vpn, reason);
success = TRUE;
@@ -279,7 +255,7 @@ nm_vpn_manager_add_active_connections (NMVPNManager *self,
const char *path;
if (!filter || (nm_vpn_connection_get_connection (vpn) == filter)) {
- path = nm_vpn_connection_get_active_connection_path (vpn);
+ path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (vpn));
g_ptr_array_add (array, g_strdup (path));
}
}
@@ -326,7 +302,7 @@ nm_vpn_manager_get_vpn_connection_for_active (NMVPNManager *manager,
NMVPNConnection *vpn = NM_VPN_CONNECTION (elt->data);
const char *ac_path;
- ac_path = nm_vpn_connection_get_active_connection_path (vpn);
+ ac_path = nm_active_connection_get_path (NM_ACTIVE_CONNECTION (vpn));
if (ac_path && !strcmp (ac_path, active_path))
return vpn;
}
diff --git a/src/vpn-manager/nm-vpn-manager.h b/src/vpn-manager/nm-vpn-manager.h
index 78a5220b9..cec370c8f 100644
--- a/src/vpn-manager/nm-vpn-manager.h
+++ b/src/vpn-manager/nm-vpn-manager.h
@@ -35,14 +35,13 @@
typedef enum
{
- NM_VPN_MANAGER_ERROR_DEVICE_NOT_ACTIVE = 0,
- NM_VPN_MANAGER_ERROR_CONNECTION_INVALID,
- NM_VPN_MANAGER_ERROR_SERVICE_INVALID,
- NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED,
+ NM_VPN_MANAGER_ERROR_DEVICE_NOT_ACTIVE = 0, /*< nick=BaseDeviceNotActive >*/
+ NM_VPN_MANAGER_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_VPN_MANAGER_ERROR_SERVICE_INVALID, /*< nick=ServiceInvalid >*/
+ NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED, /*< nick=ServiceStartFailed >*/
} NMVPNManagerError;
#define NM_VPN_MANAGER_ERROR (nm_vpn_manager_error_quark ())
-#define NM_TYPE_VPN_MANAGER_ERROR (nm_vpn_manager_error_get_type ())
GQuark nm_vpn_manager_error_quark (void);
GType nm_vpn_manager_error_get_type (void);
@@ -66,13 +65,13 @@ GType nm_vpn_manager_get_type (void);
NMVPNManager *nm_vpn_manager_get (void);
-NMVPNConnection *nm_vpn_manager_activate_connection (NMVPNManager *manager,
- NMConnection *connection,
- NMDevice *device,
- const char *specific_object,
- gboolean user_requested,
- gulong user_uid,
- GError **error);
+NMActiveConnection *nm_vpn_manager_activate_connection (NMVPNManager *manager,
+ NMConnection *connection,
+ NMDevice *device,
+ const char *specific_object,
+ gboolean user_requested,
+ gulong user_uid,
+ GError **error);
gboolean nm_vpn_manager_deactivate_connection (NMVPNManager *manager,
const char *path,
diff --git a/src/wifi/Makefile.am b/src/wifi/Makefile.am
new file mode 100644
index 000000000..c9a1b4749
--- /dev/null
+++ b/src/wifi/Makefile.am
@@ -0,0 +1,31 @@
+INCLUDES = \
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src
+
+noinst_LTLIBRARIES = libwifi-utils.la
+
+libwifi_utils_la_SOURCES = \
+ wifi-utils.c \
+ wifi-utils.h \
+ wifi-utils-private.h \
+ wifi-utils-nl80211.c \
+ wifi-utils-nl80211.h
+
+if WITH_WEXT
+libwifi_utils_la_SOURCES += wifi-utils-wext.c wifi-utils-wext.h
+endif
+
+libwifi_utils_la_CPPFLAGS = \
+ $(GLIB_CFLAGS) \
+ $(LIBNL_CFLAGS)
+
+libwifi_utils_la_LIBADD = \
+ $(top_builddir)/src/logging/libnm-logging.la \
+ $(top_builddir)/libnm-util/libnm-util.la \
+ $(GLIB_LIBS) \
+ $(LIBNL_LIBS)
+
diff --git a/src/wifi/Makefile.in b/src/wifi/Makefile.in
new file mode 100644
index 000000000..028469bf4
--- /dev/null
+++ b/src/wifi/Makefile.in
@@ -0,0 +1,665 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@WITH_WEXT_TRUE@am__append_1 = wifi-utils-wext.c wifi-utils-wext.h
+subdir = src/wifi
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnl-check.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libwifi_utils_la_DEPENDENCIES = \
+ $(top_builddir)/src/logging/libnm-logging.la \
+ $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am__libwifi_utils_la_SOURCES_DIST = wifi-utils.c wifi-utils.h \
+ wifi-utils-private.h wifi-utils-nl80211.c wifi-utils-nl80211.h \
+ wifi-utils-wext.c wifi-utils-wext.h
+@WITH_WEXT_TRUE@am__objects_1 = libwifi_utils_la-wifi-utils-wext.lo
+am_libwifi_utils_la_OBJECTS = libwifi_utils_la-wifi-utils.lo \
+ libwifi_utils_la-wifi-utils-nl80211.lo $(am__objects_1)
+libwifi_utils_la_OBJECTS = $(am_libwifi_utils_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libwifi_utils_la_SOURCES)
+DIST_SOURCES = $(am__libwifi_utils_la_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DHCLIENT_PATH = @DHCLIENT_PATH@
+DHCLIENT_VERSION = @DHCLIENT_VERSION@
+DHCPCD_PATH = @DHCPCD_PATH@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+IPTABLES_PATH = @IPTABLES_PATH@
+IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@
+IWMX_SDK_LIBS = @IWMX_SDK_LIBS@
+KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDL = @LIBDL@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBNL1_CFLAGS = @LIBNL1_CFLAGS@
+LIBNL1_LIBS = @LIBNL1_LIBS@
+LIBNL2_CFLAGS = @LIBNL2_CFLAGS@
+LIBNL2_LIBS = @LIBNL2_LIBS@
+LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
+LIBNL3_LIBS = @LIBNL3_LIBS@
+LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
+LIBNL_LIBS = @LIBNL_LIBS@
+LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
+LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
+NM_MICRO_VERSION = @NM_MICRO_VERSION@
+NM_MINOR_VERSION = @NM_MINOR_VERSION@
+NM_VERSION = @NM_VERSION@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG_PATH = @PKGCONFIG_PATH@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
+QT_CFLAGS = @QT_CFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+RESOLVCONF_PATH = @RESOLVCONF_PATH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
+SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
+UDEV_BASE_DIR = @UDEV_BASE_DIR@
+USE_NLS = @USE_NLS@
+UUID_CFLAGS = @UUID_CFLAGS@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = \
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/src/logging \
+ -I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
+ -I${top_srcdir}/src
+
+noinst_LTLIBRARIES = libwifi-utils.la
+libwifi_utils_la_SOURCES = wifi-utils.c wifi-utils.h \
+ wifi-utils-private.h wifi-utils-nl80211.c wifi-utils-nl80211.h \
+ $(am__append_1)
+libwifi_utils_la_CPPFLAGS = \
+ $(GLIB_CFLAGS) \
+ $(LIBNL_CFLAGS)
+
+libwifi_utils_la_LIBADD = \
+ $(top_builddir)/src/logging/libnm-logging.la \
+ $(top_builddir)/libnm-util/libnm-util.la \
+ $(GLIB_LIBS) \
+ $(LIBNL_LIBS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/wifi/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/wifi/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libwifi-utils.la: $(libwifi_utils_la_OBJECTS) $(libwifi_utils_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libwifi_utils_la_OBJECTS) $(libwifi_utils_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwifi_utils_la-wifi-utils-nl80211.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwifi_utils_la-wifi-utils-wext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwifi_utils_la-wifi-utils.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libwifi_utils_la-wifi-utils.lo: wifi-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwifi_utils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwifi_utils_la-wifi-utils.lo -MD -MP -MF $(DEPDIR)/libwifi_utils_la-wifi-utils.Tpo -c -o libwifi_utils_la-wifi-utils.lo `test -f 'wifi-utils.c' || echo '$(srcdir)/'`wifi-utils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwifi_utils_la-wifi-utils.Tpo $(DEPDIR)/libwifi_utils_la-wifi-utils.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wifi-utils.c' object='libwifi_utils_la-wifi-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwifi_utils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwifi_utils_la-wifi-utils.lo `test -f 'wifi-utils.c' || echo '$(srcdir)/'`wifi-utils.c
+
+libwifi_utils_la-wifi-utils-nl80211.lo: wifi-utils-nl80211.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwifi_utils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwifi_utils_la-wifi-utils-nl80211.lo -MD -MP -MF $(DEPDIR)/libwifi_utils_la-wifi-utils-nl80211.Tpo -c -o libwifi_utils_la-wifi-utils-nl80211.lo `test -f 'wifi-utils-nl80211.c' || echo '$(srcdir)/'`wifi-utils-nl80211.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwifi_utils_la-wifi-utils-nl80211.Tpo $(DEPDIR)/libwifi_utils_la-wifi-utils-nl80211.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wifi-utils-nl80211.c' object='libwifi_utils_la-wifi-utils-nl80211.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwifi_utils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwifi_utils_la-wifi-utils-nl80211.lo `test -f 'wifi-utils-nl80211.c' || echo '$(srcdir)/'`wifi-utils-nl80211.c
+
+libwifi_utils_la-wifi-utils-wext.lo: wifi-utils-wext.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwifi_utils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwifi_utils_la-wifi-utils-wext.lo -MD -MP -MF $(DEPDIR)/libwifi_utils_la-wifi-utils-wext.Tpo -c -o libwifi_utils_la-wifi-utils-wext.lo `test -f 'wifi-utils-wext.c' || echo '$(srcdir)/'`wifi-utils-wext.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwifi_utils_la-wifi-utils-wext.Tpo $(DEPDIR)/libwifi_utils_la-wifi-utils-wext.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wifi-utils-wext.c' object='libwifi_utils_la-wifi-utils-wext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwifi_utils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwifi_utils_la-wifi-utils-wext.lo `test -f 'wifi-utils-wext.c' || echo '$(srcdir)/'`wifi-utils-wext.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/wifi/wifi-utils-nl80211.c b/src/wifi/wifi-utils-nl80211.c
new file mode 100644
index 000000000..4a4e661e6
--- /dev/null
+++ b/src/wifi/wifi-utils-nl80211.c
@@ -0,0 +1,819 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2006 - 2008 Novell, Inc.
+ * Copyright (C) 2011 Intel Corporation. All rights reserved.
+ */
+
+#include <config.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <net/ethernet.h>
+#include <unistd.h>
+#include <math.h>
+
+#include <glib.h>
+
+#include <netlink/genl/genl.h>
+#include <netlink/genl/family.h>
+#include <netlink/genl/ctrl.h>
+
+#include <linux/nl80211.h>
+
+#include "wifi-utils-private.h"
+#include "wifi-utils-nl80211.h"
+#include "nm-logging.h"
+#include "nm-utils.h"
+#include "nm-netlink-compat.h"
+
+typedef struct {
+ WifiData parent;
+ struct nl_sock *nl_sock;
+ int id;
+ struct nl_cb *nl_cb;
+ guint32 *freqs;
+ int num_freqs;
+} WifiDataNl80211;
+
+static int ack_handler (struct nl_msg *msg, void *arg)
+{
+ int *done = arg;
+ *done = 1;
+ return NL_STOP;
+}
+
+static int finish_handler (struct nl_msg *msg, void *arg)
+{
+ int *done = arg;
+ *done = 1;
+ return NL_SKIP;
+}
+
+static int error_handler (struct sockaddr_nl *nla, struct nlmsgerr *err,
+ void *arg)
+{
+ int *done = arg;
+ *done = err->error;
+ return NL_SKIP;
+}
+
+static struct nl_msg *
+_nl80211_alloc_msg (int id, int ifindex, guint32 cmd, guint32 flags)
+{
+ struct nl_msg *msg;
+
+ msg = nlmsg_alloc ();
+ if (msg) {
+ genlmsg_put (msg, 0, 0, id, 0, flags, cmd, 0);
+ NLA_PUT_U32 (msg, NL80211_ATTR_IFINDEX, ifindex);
+ }
+ return msg;
+
+ nla_put_failure:
+ nlmsg_free (msg);
+ return NULL;
+}
+
+static struct nl_msg *
+nl80211_alloc_msg (WifiDataNl80211 *nl80211, guint32 cmd, guint32 flags)
+{
+ return _nl80211_alloc_msg (nl80211->id, nl80211->parent.ifindex, cmd, flags);
+}
+
+/* NOTE: this function consumes 'msg' */
+static int
+_nl80211_send_and_recv (struct nl_sock *nl_sock,
+ struct nl_cb *nl_cb,
+ struct nl_msg *msg,
+ int (*valid_handler)(struct nl_msg *, void *),
+ void *valid_data)
+{
+ struct nl_cb *cb;
+ int err, done;
+
+ g_return_val_if_fail (msg != NULL, -ENOMEM);
+ g_return_val_if_fail (valid_handler != NULL, -EINVAL);
+
+ cb = nl_cb_clone (nl_cb);
+ if (!cb) {
+ err = -ENOMEM;
+ goto out;
+ }
+
+ err = nl_send_auto_complete (nl_sock, msg);
+ if (err < 0)
+ goto out;
+
+ done = 0;
+ nl_cb_err (cb, NL_CB_CUSTOM, error_handler, &done);
+ nl_cb_set (cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &done);
+ nl_cb_set (cb, NL_CB_ACK, NL_CB_CUSTOM, ack_handler, &done);
+ nl_cb_set (cb, NL_CB_VALID, NL_CB_CUSTOM, valid_handler, valid_data);
+
+ /* Loop until one of our NL callbacks says we're done; on success
+ * done will be 1, on error it will be < 0.
+ */
+ while (!done) {
+ err = nl_recvmsgs (nl_sock, cb);
+ if (err && err != -NLE_AGAIN) {
+ nm_log_warn (LOGD_WIFI, "nl_recvmsgs() error: (%d) %s",
+ err, nl_geterror (err));
+ break;
+ }
+ }
+ if (err == 0 && done < 0)
+ err = done;
+
+ out:
+ nl_cb_put (cb);
+ nlmsg_free (msg);
+ return err;
+}
+
+static int
+nl80211_send_and_recv (WifiDataNl80211 *nl80211,
+ struct nl_msg *msg,
+ int (*valid_handler)(struct nl_msg *, void *),
+ void *valid_data)
+{
+ return _nl80211_send_and_recv (nl80211->nl_sock, nl80211->nl_cb, msg, valid_handler, valid_data);
+}
+
+static void
+wifi_nl80211_deinit (WifiData *parent)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) parent;
+
+ if (nl80211->nl_sock)
+ nl_socket_free (nl80211->nl_sock);
+ if (nl80211->nl_cb)
+ nl_cb_put (nl80211->nl_cb);
+}
+
+struct nl80211_iface_info {
+ NM80211Mode mode;
+};
+
+static int nl80211_iface_info_handler (struct nl_msg *msg, void *arg)
+{
+ struct nl80211_iface_info *info = arg;
+ struct genlmsghdr *gnlh = nlmsg_data (nlmsg_hdr (msg));
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+
+ if (nla_parse (tb, NL80211_ATTR_MAX, genlmsg_attrdata (gnlh, 0),
+ genlmsg_attrlen (gnlh, 0), NULL) < 0)
+ return NL_SKIP;
+
+ if (!tb[NL80211_ATTR_IFTYPE])
+ return NL_SKIP;
+
+ switch (nla_get_u32 (tb[NL80211_ATTR_IFTYPE])) {
+ case NL80211_IFTYPE_ADHOC:
+ info->mode = NM_802_11_MODE_ADHOC;
+ break;
+ case NL80211_IFTYPE_STATION:
+ info->mode = NM_802_11_MODE_INFRA;
+ break;
+ }
+
+ return NL_SKIP;
+}
+
+static NM80211Mode
+wifi_nl80211_get_mode (WifiData *data)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ struct nl80211_iface_info iface_info = {
+ .mode = NM_802_11_MODE_UNKNOWN,
+ };
+ struct nl_msg *msg;
+
+ msg = nl80211_alloc_msg (nl80211, NL80211_CMD_GET_INTERFACE, 0);
+
+ if (nl80211_send_and_recv (nl80211, msg, nl80211_iface_info_handler,
+ &iface_info) < 0)
+ return NM_802_11_MODE_UNKNOWN;
+
+ return iface_info.mode;
+}
+
+static gboolean
+wifi_nl80211_set_mode (WifiData *data, const NM80211Mode mode)
+{
+ /*
+ * Used only to set mode for scanning as some old cards
+ * don't properly scan in IBSS mode, nl80211 cards are
+ * expected to scan properly so ignore this.
+ */
+ return TRUE;
+}
+
+/* @divisor: pass what value @xbm should be divided by to get dBm */
+static guint32 nl80211_xbm_to_percent (gint32 xbm, guint32 divisor)
+{
+#define NOISE_FLOOR_DBM -90
+#define SIGNAL_MAX_DBM -20
+
+ xbm /= divisor;
+ xbm = CLAMP(xbm, NOISE_FLOOR_DBM, SIGNAL_MAX_DBM);
+
+ return 100 - 70 * (((float) SIGNAL_MAX_DBM - (float) xbm) /
+ ((float) SIGNAL_MAX_DBM - (float) NOISE_FLOOR_DBM));
+}
+
+struct nl80211_bss_info {
+ guint32 freq;
+ guint8 bssid[ETH_ALEN];
+ guint8 ssid[32];
+ guint32 ssid_len;
+ guint32 beacon_signal;
+ gboolean valid;
+};
+
+#define WLAN_EID_SSID 0
+
+static void find_ssid (guint8 *ies, guint32 ies_len,
+ guint8 **ssid, guint32 *ssid_len)
+{
+ *ssid = NULL;
+ *ssid_len = 0;
+
+ while (ies_len > 2 && ies[0] != WLAN_EID_SSID) {
+ ies_len -= ies[1] + 2;
+ ies += ies[1] + 2;
+ }
+ if (ies_len < 2)
+ return;
+ if (ies_len < 2 + ies[1])
+ return;
+
+ *ssid_len = ies[1];
+ *ssid = ies + 2;
+}
+
+static int nl80211_bss_dump_handler (struct nl_msg *msg, void *arg)
+{
+ struct nl80211_bss_info *info = arg;
+ struct genlmsghdr *gnlh = nlmsg_data (nlmsg_hdr (msg));
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ struct nlattr *bss[NL80211_BSS_MAX + 1];
+ static struct nla_policy bss_policy[NL80211_BSS_MAX + 1] = {
+ [NL80211_BSS_TSF] = { .type = NLA_U64 },
+ [NL80211_BSS_FREQUENCY] = { .type = NLA_U32 },
+ [NL80211_BSS_BSSID] = { },
+ [NL80211_BSS_BEACON_INTERVAL] = { .type = NLA_U16 },
+ [NL80211_BSS_CAPABILITY] = { .type = NLA_U16 },
+ [NL80211_BSS_INFORMATION_ELEMENTS] = { },
+ [NL80211_BSS_SIGNAL_MBM] = { .type = NLA_U32 },
+ [NL80211_BSS_SIGNAL_UNSPEC] = { .type = NLA_U8 },
+ [NL80211_BSS_STATUS] = { .type = NLA_U32 },
+ };
+ guint32 status;
+
+ if (nla_parse (tb, NL80211_ATTR_MAX, genlmsg_attrdata (gnlh, 0),
+ genlmsg_attrlen (gnlh, 0), NULL) < 0)
+ return NL_SKIP;
+
+ if (tb[NL80211_ATTR_BSS] == NULL)
+ return NL_SKIP;
+
+ if (nla_parse_nested (bss, NL80211_BSS_MAX,
+ tb[NL80211_ATTR_BSS],
+ bss_policy))
+ return NL_SKIP;
+
+ if (bss[NL80211_BSS_STATUS] == NULL)
+ return NL_SKIP;
+
+ status = nla_get_u32 (bss[NL80211_BSS_STATUS]);
+
+ if (status != NL80211_BSS_STATUS_ASSOCIATED &&
+ status != NL80211_BSS_STATUS_IBSS_JOINED)
+ return NL_SKIP;
+
+ if (bss[NL80211_BSS_BSSID] == NULL)
+ return NL_SKIP;
+ memcpy(info->bssid, nla_data (bss[NL80211_BSS_BSSID]), ETH_ALEN);
+
+ if (bss[NL80211_BSS_FREQUENCY])
+ info->freq = nla_get_u32 (bss[NL80211_BSS_FREQUENCY]);
+
+ if (bss[NL80211_BSS_SIGNAL_UNSPEC])
+ info->beacon_signal =
+ nla_get_u8 (bss[NL80211_BSS_SIGNAL_UNSPEC]);
+
+ if (bss[NL80211_BSS_SIGNAL_MBM])
+ info->beacon_signal =
+ nl80211_xbm_to_percent (nla_get_u32 (bss[NL80211_BSS_SIGNAL_MBM]), 100);
+
+ if (bss[NL80211_BSS_INFORMATION_ELEMENTS]) {
+ guint8 *ssid;
+ guint32 ssid_len;
+
+ find_ssid(nla_data (bss[NL80211_BSS_INFORMATION_ELEMENTS]),
+ nla_len (bss[NL80211_BSS_INFORMATION_ELEMENTS]),
+ &ssid, &ssid_len);
+ if (ssid && ssid_len && ssid_len <= sizeof(info->ssid)) {
+ memcpy (info->ssid, ssid, ssid_len);
+ info->ssid_len = ssid_len;
+ }
+ }
+
+ info->valid = TRUE;
+
+ return NL_SKIP;
+}
+
+static void nl80211_get_bss_info (WifiDataNl80211 *nl80211,
+ struct nl80211_bss_info *bss_info)
+{
+ struct nl_msg *msg;
+
+ memset(bss_info, 0, sizeof(*bss_info));
+
+ msg = nl80211_alloc_msg (nl80211, NL80211_CMD_GET_SCAN, NLM_F_DUMP);
+
+ nl80211_send_and_recv (nl80211, msg, nl80211_bss_dump_handler, bss_info);
+}
+
+static guint32
+wifi_nl80211_get_freq (WifiData *data)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ struct nl80211_bss_info bss_info;
+
+ nl80211_get_bss_info (nl80211, &bss_info);
+
+ return bss_info.freq;
+}
+
+static guint32
+wifi_nl80211_find_freq (WifiData *data, const guint32 *freqs)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ int i;
+
+ for (i = 0; i < nl80211->num_freqs; i++) {
+ while (*freqs) {
+ if (nl80211->freqs[i] == *freqs)
+ return *freqs;
+ freqs++;
+ }
+ }
+ return 0;
+}
+
+static GByteArray *
+wifi_nl80211_get_ssid (WifiData *data)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ GByteArray *array = NULL;
+ struct nl80211_bss_info bss_info;
+
+ nl80211_get_bss_info (nl80211, &bss_info);
+
+ if (bss_info.valid) {
+ array = g_byte_array_sized_new (bss_info.ssid_len);
+ g_byte_array_append (array, (const guint8 *) bss_info.ssid,
+ bss_info.ssid_len);
+ }
+
+ return array;
+}
+
+static gboolean
+wifi_nl80211_get_bssid (WifiData *data, struct ether_addr *out_bssid)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ struct nl80211_bss_info bss_info;
+
+ nl80211_get_bss_info (nl80211, &bss_info);
+
+ if (bss_info.valid)
+ memcpy(out_bssid, bss_info.bssid, ETH_ALEN);
+
+ return bss_info.valid;
+}
+
+struct nl80211_station_info {
+ guint32 txrate;
+ gboolean txrate_valid;
+ guint8 signal;
+ gboolean signal_valid;
+};
+
+static int nl80211_station_handler (struct nl_msg *msg, void *arg)
+{
+ struct nl80211_station_info *info = arg;
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh = nlmsg_data (nlmsg_hdr (msg));
+ struct nlattr *sinfo[NL80211_STA_INFO_MAX + 1];
+ struct nlattr *rinfo[NL80211_RATE_INFO_MAX + 1];
+ static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = {
+ [NL80211_STA_INFO_INACTIVE_TIME] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_RX_BYTES] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_TX_BYTES] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_RX_PACKETS] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_TX_PACKETS] = { .type = NLA_U32 },
+ [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
+ [NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
+ [NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
+ [NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
+ [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
+ };
+
+ static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = {
+ [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 },
+ [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 },
+ [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG },
+ [NL80211_RATE_INFO_SHORT_GI] = { .type = NLA_FLAG },
+ };
+
+ if (nla_parse (tb, NL80211_ATTR_MAX, genlmsg_attrdata (gnlh, 0),
+ genlmsg_attrlen (gnlh, 0), NULL) < 0)
+ return NL_SKIP;
+
+ if (tb[NL80211_ATTR_STA_INFO] == NULL)
+ return NL_SKIP;
+
+ if (nla_parse_nested (sinfo, NL80211_STA_INFO_MAX,
+ tb[NL80211_ATTR_STA_INFO],
+ stats_policy))
+ return NL_SKIP;
+
+ if (sinfo[NL80211_STA_INFO_TX_BITRATE] == NULL)
+ return NL_SKIP;
+
+ if (nla_parse_nested (rinfo, NL80211_RATE_INFO_MAX,
+ sinfo[NL80211_STA_INFO_TX_BITRATE],
+ rate_policy))
+ return NL_SKIP;
+
+ if (rinfo[NL80211_RATE_INFO_BITRATE] == NULL)
+ return NL_SKIP;
+
+ /* convert from nl80211's units of 100kbps to NM's kbps */
+ info->txrate = nla_get_u16 (rinfo[NL80211_RATE_INFO_BITRATE]) * 100;
+ info->txrate_valid = TRUE;
+
+ if (sinfo[NL80211_STA_INFO_SIGNAL] != NULL) {
+ info->signal = nl80211_xbm_to_percent ((gint8) nla_get_u8 (sinfo[NL80211_STA_INFO_SIGNAL]), 1);
+ info->signal_valid = TRUE;
+ }
+
+ return NL_SKIP;
+}
+
+static void nl80211_get_ap_info (WifiDataNl80211 *nl80211,
+ struct nl80211_station_info *sta_info)
+{
+ struct nl_msg *msg;
+ struct nl80211_bss_info bss_info;
+
+ memset(sta_info, 0, sizeof(*sta_info));
+
+ nl80211_get_bss_info (nl80211, &bss_info);
+ if (!bss_info.valid)
+ return;
+
+ msg = nl80211_alloc_msg (nl80211, NL80211_CMD_GET_STATION, 0);
+ if (msg) {
+ NLA_PUT (msg, NL80211_ATTR_MAC, ETH_ALEN, bss_info.bssid);
+
+ nl80211_send_and_recv (nl80211, msg, nl80211_station_handler, sta_info);
+ if (!sta_info->signal_valid) {
+ /* Fall back to bss_info signal quality (both are in percent) */
+ sta_info->signal = bss_info.beacon_signal;
+ }
+ }
+
+ return;
+
+ nla_put_failure:
+ nlmsg_free (msg);
+ return;
+}
+
+static guint32
+wifi_nl80211_get_rate (WifiData *data)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ struct nl80211_station_info sta_info;
+
+ nl80211_get_ap_info (nl80211, &sta_info);
+
+ return sta_info.txrate;
+}
+
+static int
+wifi_nl80211_get_qual (WifiData *data)
+{
+ WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data;
+ struct nl80211_station_info sta_info;
+
+ nl80211_get_ap_info (nl80211, &sta_info);
+ return sta_info.signal;
+}
+
+struct nl80211_device_info {
+ guint32 *freqs;
+ int num_freqs;
+ guint32 caps;
+ gboolean can_scan, can_scan_ssid;
+ gboolean success;
+};
+
+static int nl80211_wiphy_info_handler (struct nl_msg *msg, void *arg)
+{
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh = nlmsg_data (nlmsg_hdr (msg));
+ struct nl80211_device_info *info = arg;
+ struct nlattr *tb_band[NL80211_BAND_ATTR_MAX + 1];
+ struct nlattr *tb_freq[NL80211_FREQUENCY_ATTR_MAX + 1];
+ struct nlattr *nl_band;
+ struct nlattr *nl_freq;
+ int rem_freq;
+ int rem_band;
+ int freq_idx;
+ static struct nla_policy freq_policy[NL80211_FREQUENCY_ATTR_MAX + 1] = {
+ [NL80211_FREQUENCY_ATTR_FREQ] = { .type = NLA_U32 },
+ [NL80211_FREQUENCY_ATTR_DISABLED] = { .type = NLA_FLAG },
+ [NL80211_FREQUENCY_ATTR_PASSIVE_SCAN] = { .type = NLA_FLAG },
+ [NL80211_FREQUENCY_ATTR_NO_IBSS] = { .type = NLA_FLAG },
+ [NL80211_FREQUENCY_ATTR_RADAR] = { .type = NLA_FLAG },
+ [NL80211_FREQUENCY_ATTR_MAX_TX_POWER] = { .type = NLA_U32 },
+ };
+
+ if (nla_parse (tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
+ genlmsg_attrlen (gnlh, 0), NULL) < 0)
+ return NL_SKIP;
+
+ if (tb[NL80211_ATTR_WIPHY_BANDS] == NULL)
+ return NL_SKIP;
+
+ if (tb[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]) {
+ info->can_scan_ssid =
+ nla_get_u8 (tb[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]) > 0;
+ } else {
+ /* old kernel that only had mac80211, so assume it can */
+ info->can_scan_ssid = TRUE;
+ }
+
+ if (tb[NL80211_ATTR_SUPPORTED_COMMANDS]) {
+ struct nlattr *nl_cmd;
+ int i;
+
+ nla_for_each_nested (nl_cmd,
+ tb[NL80211_ATTR_SUPPORTED_COMMANDS], i) {
+ guint32 cmd = nla_get_u32 (nl_cmd);
+ if (cmd == NL80211_CMD_TRIGGER_SCAN)
+ info->can_scan = TRUE;
+ }
+ }
+
+ info->num_freqs = 0;
+
+ nla_for_each_nested (nl_band, tb[NL80211_ATTR_WIPHY_BANDS], rem_band) {
+ if (nla_parse_nested (tb_band, NL80211_BAND_ATTR_MAX, nl_band,
+ NULL) < 0)
+ return NL_SKIP;
+
+ nla_for_each_nested(nl_freq, tb_band[NL80211_BAND_ATTR_FREQS],
+ rem_freq) {
+ nla_parse_nested (tb_freq, NL80211_FREQUENCY_ATTR_MAX,
+ nl_freq, freq_policy);
+
+ if (!tb_freq[NL80211_FREQUENCY_ATTR_FREQ])
+ continue;
+
+ info->num_freqs++;
+ }
+ }
+
+ info->freqs = g_malloc0 (sizeof(guint32) * info->num_freqs);
+
+ freq_idx = 0;
+ nla_for_each_nested (nl_band, tb[NL80211_ATTR_WIPHY_BANDS], rem_band) {
+ if (nla_parse_nested (tb_band, NL80211_BAND_ATTR_MAX, nl_band,
+ NULL) < 0)
+ return NL_SKIP;
+
+ nla_for_each_nested(nl_freq, tb_band[NL80211_BAND_ATTR_FREQS],
+ rem_freq) {
+ nla_parse_nested (tb_freq, NL80211_FREQUENCY_ATTR_MAX,
+ nl_freq, freq_policy);
+
+ if (!tb_freq[NL80211_FREQUENCY_ATTR_FREQ])
+ continue;
+
+ info->freqs[freq_idx] =
+ nla_get_u32 (tb_freq[NL80211_FREQUENCY_ATTR_FREQ]);
+ freq_idx++;
+ }
+ }
+
+ if (tb[NL80211_ATTR_CIPHER_SUITES]) {
+ int num;
+ int i;
+ __u32 *ciphers = nla_data (tb[NL80211_ATTR_CIPHER_SUITES]);
+
+ num = nla_len (tb[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
+ for (i = 0; i < num; i++) {
+ switch (ciphers[i]) {
+ case 0x000fac01:
+ info->caps |= NM_WIFI_DEVICE_CAP_CIPHER_WEP40;
+ break;
+ case 0x000fac05:
+ info->caps |= NM_WIFI_DEVICE_CAP_CIPHER_WEP104;
+ break;
+ case 0x000fac02:
+ info->caps |= NM_WIFI_DEVICE_CAP_CIPHER_TKIP |
+ NM_WIFI_DEVICE_CAP_WPA;
+ break;
+ case 0x000fac04:
+ info->caps |= NM_WIFI_DEVICE_CAP_CIPHER_CCMP |
+ NM_WIFI_DEVICE_CAP_RSN;
+ break;
+ }
+ }
+ }
+
+ if (tb[NL80211_ATTR_SUPPORTED_IFTYPES]) {
+ struct nlattr *nl_mode;
+ int i;
+
+ nla_for_each_nested (nl_mode, tb[NL80211_ATTR_SUPPORTED_IFTYPES], i) {
+ if (nla_type (nl_mode) == NL80211_IFTYPE_AP) {
+ info->caps |= NM_WIFI_DEVICE_CAP_AP;
+ break;
+ }
+ }
+ }
+
+ info->success = TRUE;
+
+ return NL_SKIP;
+}
+
+WifiData *
+wifi_nl80211_init (const char *iface, int ifindex)
+{
+ WifiDataNl80211 *nl80211;
+ struct nl_msg *msg;
+ struct nl80211_device_info device_info = {};
+
+ nl80211 = wifi_data_new (iface, ifindex, sizeof (*nl80211));
+ nl80211->parent.get_mode = wifi_nl80211_get_mode;
+ nl80211->parent.set_mode = wifi_nl80211_set_mode;
+ nl80211->parent.get_freq = wifi_nl80211_get_freq;
+ nl80211->parent.find_freq = wifi_nl80211_find_freq;
+ nl80211->parent.get_ssid = wifi_nl80211_get_ssid;
+ nl80211->parent.get_bssid = wifi_nl80211_get_bssid;
+ nl80211->parent.get_rate = wifi_nl80211_get_rate;
+ nl80211->parent.get_qual = wifi_nl80211_get_qual;
+ nl80211->parent.deinit = wifi_nl80211_deinit;
+
+ nl80211->nl_sock = nl_socket_alloc ();
+ if (nl80211->nl_sock == NULL)
+ goto error;
+
+ if (genl_connect (nl80211->nl_sock))
+ goto error;
+
+ nl80211->id = genl_ctrl_resolve (nl80211->nl_sock, "nl80211");
+ if (nl80211->id < 0)
+ goto error;
+
+ nl80211->nl_cb = nl_cb_alloc (NL_CB_DEFAULT);
+ if (nl80211->nl_cb == NULL)
+ goto error;
+
+ msg = nl80211_alloc_msg (nl80211, NL80211_CMD_GET_WIPHY, 0);
+
+ if (nl80211_send_and_recv (nl80211, msg, nl80211_wiphy_info_handler,
+ &device_info) < 0) {
+ nm_log_dbg (LOGD_HW | LOGD_WIFI,
+ "(%s): NL80211_CMD_GET_WIPHY request failed",
+ nl80211->parent.iface);
+ goto error;
+ }
+
+ if (!device_info.success) {
+ nm_log_dbg (LOGD_HW | LOGD_WIFI,
+ "(%s): NL80211_CMD_GET_WIPHY request indicated failure",
+ nl80211->parent.iface);
+ goto error;
+ }
+
+ if (!device_info.can_scan_ssid) {
+ nm_log_err (LOGD_HW | LOGD_WIFI,
+ "(%s): driver does not support SSID scans",
+ nl80211->parent.iface);
+ goto error;
+ }
+
+ if (device_info.num_freqs == 0 || device_info.freqs == NULL) {
+ nm_log_err (LOGD_HW | LOGD_WIFI,
+ "(%s): driver reports no supported frequencies",
+ nl80211->parent.iface);
+ goto error;
+ }
+
+ nl80211->freqs = device_info.freqs;
+ nl80211->num_freqs = device_info.num_freqs;
+ nl80211->parent.can_scan_ssid = device_info.can_scan_ssid;
+ nl80211->parent.caps = device_info.caps;
+
+ nm_log_info (LOGD_HW | LOGD_WIFI,
+ "(%s): using nl80211 for WiFi device control",
+ nl80211->parent.iface);
+
+ return (WifiData *) nl80211;
+
+error:
+ wifi_utils_deinit ((WifiData *) nl80211);
+ return NULL;
+}
+
+static int
+iface_to_index (struct nl_sock *nl_sock, const char *iface)
+{
+ struct nl_cache *link_cache = NULL;
+ int err, ifindex;
+
+ /* name to index */
+ err = rtnl_link_alloc_cache (nl_sock, &link_cache);
+ if (err < 0) {
+ nm_log_warn (LOGD_HW, "failed to allocate link cache: (%d) %s",
+ err, nl_geterror (err));
+ return -1;
+ }
+ nl_cache_mngt_provide (link_cache);
+ nl_cache_refill (nl_sock, link_cache);
+ ifindex = rtnl_link_name2i (link_cache, iface);
+ nl_cache_free (link_cache);
+
+ return ifindex;
+}
+
+gboolean
+wifi_nl80211_is_wifi (const char *iface)
+{
+ struct nl_sock *nl_sock;
+ struct nl_cb *nl_cb = NULL;
+ struct nl_msg *msg = NULL;
+ int id, ifindex;
+ struct nl80211_iface_info iface_info = {
+ .mode = NM_802_11_MODE_UNKNOWN,
+ };
+ gboolean is_wifi = FALSE;
+
+ nl_sock = nl_socket_alloc ();
+ if (nl_sock == NULL)
+ return FALSE;
+
+ if (genl_connect (nl_sock))
+ goto error;
+
+ ifindex = iface_to_index (nl_sock, iface);
+ if (ifindex < 0)
+ goto error;
+
+ id = genl_ctrl_resolve (nl_sock, "nl80211");
+ if (id < 0)
+ goto error;
+
+ nl_cb = nl_cb_alloc (NL_CB_DEFAULT);
+ if (nl_cb) {
+ msg = _nl80211_alloc_msg (id, ifindex, NL80211_CMD_GET_INTERFACE, 0);
+ if (_nl80211_send_and_recv (nl_sock,
+ nl_cb,
+ msg,
+ nl80211_iface_info_handler,
+ &iface_info) >= 0)
+ is_wifi = (iface_info.mode != NM_802_11_MODE_UNKNOWN);
+ }
+
+ error:
+ if (nl_cb)
+ nl_cb_put (nl_cb);
+ nl_socket_free (nl_sock);
+ return is_wifi;
+}
+
diff --git a/src/wifi/wifi-utils-nl80211.h b/src/wifi/wifi-utils-nl80211.h
new file mode 100644
index 000000000..2a7fe874a
--- /dev/null
+++ b/src/wifi/wifi-utils-nl80211.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Intel Corporation. All rights reserved.
+ */
+
+#ifndef WIFI_UTILS_NL80211_H
+#define WIFI_UTILS_NL80211_H
+
+#include "wifi-utils.h"
+
+WifiData *wifi_nl80211_init (const char *iface, int ifindex);
+
+gboolean wifi_nl80211_is_wifi (const char *iface);
+
+#endif /* WIFI_UTILS_NL80211_H */
diff --git a/src/wifi/wifi-utils-private.h b/src/wifi/wifi-utils-private.h
new file mode 100644
index 000000000..83075090d
--- /dev/null
+++ b/src/wifi/wifi-utils-private.h
@@ -0,0 +1,74 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Red Hat, Inc.
+ */
+
+#ifndef WIFI_UTILS_PRIVATE_H
+#define WIFI_UTILS_PRIVATE_H
+
+#include <glib.h>
+
+#include "NetworkManager.h"
+#include "wifi-utils.h"
+
+struct WifiData {
+ char *iface;
+ int ifindex;
+ NMDeviceWifiCapabilities caps;
+ gboolean can_scan_ssid;
+
+ NM80211Mode (*get_mode) (WifiData *data);
+
+ gboolean (*set_mode) (WifiData *data, const NM80211Mode mode);
+
+ /* Return current frequency in MHz (really associated BSS frequency) */
+ guint32 (*get_freq) (WifiData *data);
+
+ /* Return first supported frequency in the zero-terminated list */
+ guint32 (*find_freq) (WifiData *data, const guint32 *freqs);
+
+ /* If SSID is empty/blank (zero-length or all \0s) return NULL */
+ GByteArray * (*get_ssid) (WifiData *data);
+
+ /* Return current bitrate in Kbps */
+ guint32 (*get_rate) (WifiData *data);
+
+ gboolean (*get_bssid) (WifiData *data, struct ether_addr *out_bssid);
+
+ /* Return a signal strength percentage 0 - 100% for the current BSSID;
+ * return -1 on errors or if not associated.
+ */
+ int (*get_qual) (WifiData *data);
+
+ void (*deinit) (WifiData *data);
+
+ /* OLPC Mesh-only functions */
+
+ guint32 (*get_mesh_channel) (WifiData *data);
+
+ /* channel == 0 means "auto channel" */
+ gboolean (*set_mesh_channel) (WifiData *data, guint32 channel);
+
+ /* ssid == NULL means "auto SSID" */
+ gboolean (*set_mesh_ssid) (WifiData *data, const GByteArray *ssid);
+};
+
+gpointer wifi_data_new (const char *iface, int ifindex, gsize len);
+void wifi_data_free (WifiData *data);
+
+#endif /* WIFI_UTILS_PRIVATE_H */
diff --git a/src/wifi/wifi-utils-wext.c b/src/wifi/wifi-utils-wext.c
new file mode 100644
index 000000000..75d00f412
--- /dev/null
+++ b/src/wifi/wifi-utils-wext.c
@@ -0,0 +1,663 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2006 - 2008 Novell, Inc.
+ */
+
+#include <config.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <net/ethernet.h>
+#include <unistd.h>
+#include <math.h>
+
+#include <glib.h>
+
+#include "wifi-utils-private.h"
+#include "wifi-utils-wext.h"
+#include "nm-logging.h"
+#include "nm-utils.h"
+
+/* Hacks necessary to #include wireless.h; yay for WEXT */
+#ifndef __user
+#define __user
+#endif
+#include <sys/types.h>
+#include <linux/types.h>
+#include <sys/socket.h>
+#include <linux/if.h>
+#include <linux/wireless.h>
+
+
+typedef struct {
+ WifiData parent;
+ int fd;
+ struct iw_quality max_qual;
+ gint8 num_freqs;
+ guint32 freqs[IW_MAX_FREQUENCIES];
+} WifiDataWext;
+
+/* Until a new wireless-tools comes out that has the defs and the structure,
+ * need to copy them here.
+ */
+/* Scan capability flags - in (struct iw_range *)->scan_capa */
+#define NM_IW_SCAN_CAPA_NONE 0x00
+#define NM_IW_SCAN_CAPA_ESSID 0x01
+
+struct iw_range_with_scan_capa
+{
+ guint32 throughput;
+ guint32 min_nwid;
+ guint32 max_nwid;
+ guint16 old_num_channels;
+ guint8 old_num_frequency;
+
+ guint8 scan_capa;
+/* don't need the rest... */
+};
+
+static guint32
+iw_freq_to_uint32 (struct iw_freq *freq)
+{
+ if (freq->e == 0) {
+ /* Some drivers report channel not frequency. Convert to a
+ * frequency; but this assumes that the device is in b/g mode.
+ */
+ if ((freq->m >= 1) && (freq->m <= 13))
+ return 2407 + (5 * freq->m);
+ else if (freq->m == 14)
+ return 2484;
+ }
+
+ return (guint32) (((double) freq->m) * pow (10, freq->e) / 1000000);
+}
+
+static void
+wifi_wext_deinit (WifiData *parent)
+{
+ WifiDataWext *wext = (WifiDataWext *) parent;
+
+ if (wext->fd >= 0)
+ close (wext->fd);
+}
+
+static NM80211Mode
+wifi_wext_get_mode (WifiData *data)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+
+ memset (&wrq, 0, sizeof (struct iwreq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+
+ if (ioctl (wext->fd, SIOCGIWMODE, &wrq) < 0) {
+ if (errno != ENODEV) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI,
+ "(%s): error %d getting card mode",
+ wext->parent.iface, errno);
+ }
+ return NM_802_11_MODE_UNKNOWN;
+ }
+
+ switch (wrq.u.mode) {
+ case IW_MODE_ADHOC:
+ return NM_802_11_MODE_ADHOC;
+ case IW_MODE_INFRA:
+ return NM_802_11_MODE_INFRA;
+ default:
+ break;
+ }
+ return NM_802_11_MODE_UNKNOWN;
+}
+
+static gboolean
+wifi_wext_set_mode (WifiData *data, const NM80211Mode mode)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+
+ if (wifi_wext_get_mode (data) == mode)
+ return TRUE;
+
+ memset (&wrq, 0, sizeof (struct iwreq));
+ switch (mode) {
+ case NM_802_11_MODE_ADHOC:
+ wrq.u.mode = IW_MODE_ADHOC;
+ break;
+ case NM_802_11_MODE_INFRA:
+ wrq.u.mode = IW_MODE_INFRA;
+ break;
+ default:
+ g_warn_if_reached ();
+ return FALSE;
+ }
+
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ if (ioctl (wext->fd, SIOCSIWMODE, &wrq) < 0) {
+ if (errno != ENODEV) {
+ nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): error setting mode %d",
+ wext->parent.iface, mode);
+ }
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static guint32
+wifi_wext_get_freq (WifiData *data)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+
+ memset (&wrq, 0, sizeof (struct iwreq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ if (ioctl (wext->fd, SIOCGIWFREQ, &wrq) < 0) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI,
+ "(%s): error getting frequency: %s",
+ wext->parent.iface, strerror (errno));
+ return 0;
+ }
+
+ return iw_freq_to_uint32 (&wrq.u.freq);
+}
+
+static guint32
+wifi_wext_find_freq (WifiData *data, const guint32 *freqs)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ int i;
+
+ for (i = 0; i < wext->num_freqs; i++) {
+ while (*freqs) {
+ if (wext->freqs[i] == *freqs)
+ return *freqs;
+ freqs++;
+ }
+ }
+ return 0;
+}
+
+static GByteArray *
+wifi_wext_get_ssid (WifiData *data)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+ char ssid[IW_ESSID_MAX_SIZE + 2];
+ guint32 len;
+ GByteArray *array = NULL;
+
+ memset (ssid, 0, sizeof (ssid));
+ wrq.u.essid.pointer = (caddr_t) &ssid;
+ wrq.u.essid.length = sizeof (ssid);
+ wrq.u.essid.flags = 0;
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+
+ if (ioctl (wext->fd, SIOCGIWESSID, &wrq) < 0) {
+ nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): couldn't get SSID: %d",
+ wext->parent.iface, errno);
+ return NULL;
+ }
+
+ len = wrq.u.essid.length;
+ if (nm_utils_is_empty_ssid ((guint8 *) ssid, len) == FALSE) {
+ array = g_byte_array_sized_new (len);
+ g_byte_array_append (array, (const guint8 *) ssid, len);
+ }
+
+ return array;
+}
+
+static gboolean
+wifi_wext_get_bssid (WifiData *data, struct ether_addr *out_bssid)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+
+ memset (&wrq, 0, sizeof (wrq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ if (ioctl (wext->fd, SIOCGIWAP, &wrq) < 0) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI,
+ "(%s): error getting associated BSSID: %s",
+ wext->parent.iface, strerror (errno));
+ return FALSE;
+ }
+ memcpy (out_bssid->ether_addr_octet, &(wrq.u.ap_addr.sa_data), ETH_ALEN);
+ return TRUE;
+}
+
+static guint32
+wifi_wext_get_rate (WifiData *data)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+ int err;
+
+ memset (&wrq, 0, sizeof (wrq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ err = ioctl (wext->fd, SIOCGIWRATE, &wrq);
+ return ((err == 0) ? wrq.u.bitrate.value / 1000 : 0);
+}
+
+static int
+wext_qual_to_percent (const struct iw_quality *qual,
+ const struct iw_quality *max_qual)
+{
+ int percent = -1;
+ int level_percent = -1;
+
+ g_return_val_if_fail (qual != NULL, -1);
+ g_return_val_if_fail (max_qual != NULL, -1);
+
+ /* Magically convert the many different WEXT quality representations to a percentage */
+
+ nm_log_dbg (LOGD_WIFI,
+ "QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X",
+ (__s8) qual->qual, qual->qual, qual->qual,
+ (__s8) qual->level, qual->level, qual->level,
+ (__s8) qual->noise, qual->noise, qual->noise,
+ qual->updated,
+ (__s8) max_qual->qual, max_qual->qual, max_qual->qual,
+ (__s8) max_qual->level, max_qual->level, max_qual->level,
+ (__s8) max_qual->noise, max_qual->noise, max_qual->noise,
+ max_qual->updated);
+
+ /* Try using the card's idea of the signal quality first as long as it tells us what the max quality is.
+ * Drivers that fill in quality values MUST treat them as percentages, ie the "Link Quality" MUST be
+ * bounded by 0 and max_qual->qual, and MUST change in a linear fashion. Within those bounds, drivers
+ * are free to use whatever they want to calculate "Link Quality".
+ */
+ if ((max_qual->qual != 0) && !(max_qual->updated & IW_QUAL_QUAL_INVALID) && !(qual->updated & IW_QUAL_QUAL_INVALID))
+ percent = (int)(100 * ((double)qual->qual / (double)max_qual->qual));
+
+ /* If the driver doesn't specify a complete and valid quality, we have two options:
+ *
+ * 1) dBm: driver must specify max_qual->level = 0, and have valid values for
+ * qual->level and (qual->noise OR max_qual->noise)
+ * 2) raw RSSI: driver must specify max_qual->level > 0, and have valid values for
+ * qual->level and max_qual->level
+ *
+ * This is the WEXT spec. If this interpretation is wrong, I'll fix it. Otherwise,
+ * If drivers don't conform to it, they are wrong and need to be fixed.
+ */
+
+ if ( (max_qual->level == 0) && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level == 0 */
+ && !(qual->updated & IW_QUAL_LEVEL_INVALID) /* Must have valid qual->level */
+ && ( ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID)) /* Must have valid max_qual->noise */
+ || ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))) /* OR valid qual->noise */
+ ) {
+ /* Absolute power values (dBm) */
+
+ /* Reasonable fallbacks for dumb drivers that don't specify either level. */
+ #define FALLBACK_NOISE_FLOOR_DBM -90
+ #define FALLBACK_SIGNAL_MAX_DBM -20
+ int max_level = FALLBACK_SIGNAL_MAX_DBM;
+ int noise = FALLBACK_NOISE_FLOOR_DBM;
+ int level = qual->level - 0x100;
+
+ level = CLAMP (level, FALLBACK_NOISE_FLOOR_DBM, FALLBACK_SIGNAL_MAX_DBM);
+
+ if ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))
+ noise = qual->noise - 0x100;
+ else if ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID))
+ noise = max_qual->noise - 0x100;
+ noise = CLAMP (noise, FALLBACK_NOISE_FLOOR_DBM, FALLBACK_SIGNAL_MAX_DBM);
+
+ /* A sort of signal-to-noise ratio calculation */
+ level_percent = (int)(100 - 70 *(
+ ((double)max_level - (double)level) /
+ ((double)max_level - (double)noise)));
+ nm_log_dbg (LOGD_WIFI, "QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.",
+ level_percent, max_level, level, noise);
+ } else if ( (max_qual->level != 0)
+ && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level as upper bound */
+ && !(qual->updated & IW_QUAL_LEVEL_INVALID)) {
+ /* Relative power values (RSSI) */
+
+ int level = qual->level;
+
+ /* Signal level is relavtive (0 -> max_qual->level) */
+ level = CLAMP (level, 0, max_qual->level);
+ level_percent = (int)(100 * ((double)level / (double)max_qual->level));
+ nm_log_dbg (LOGD_WIFI, "QL2: level_percent is %d. max_level %d, level %d.",
+ level_percent, max_qual->level, level);
+ } else if (percent == -1) {
+ nm_log_dbg (LOGD_WIFI, "QL: Could not get quality %% value from driver. Driver is probably buggy.");
+ }
+
+ /* If the quality percent was 0 or doesn't exist, then try to use signal levels instead */
+ if ((percent < 1) && (level_percent >= 0))
+ percent = level_percent;
+
+ nm_log_dbg (LOGD_WIFI, "QL: Final quality percent is %d (%d).",
+ percent, CLAMP (percent, 0, 100));
+ return (CLAMP (percent, 0, 100));
+}
+
+static int
+wifi_wext_get_qual (WifiData *data)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+ struct iw_statistics stats;
+
+ memset (&stats, 0, sizeof (stats));
+ wrq.u.data.pointer = &stats;
+ wrq.u.data.length = sizeof (stats);
+ wrq.u.data.flags = 1; /* Clear updated flag */
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+
+ if (ioctl (wext->fd, SIOCGIWSTATS, &wrq) < 0) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI,
+ "(%s): error getting signal strength: %s",
+ wext->parent.iface, strerror (errno));
+ return -1;
+ }
+
+ return wext_qual_to_percent (&stats.qual, &wext->max_qual);
+}
+
+/*********************/
+/* OLPC Mesh-only functions */
+
+static guint32
+wifi_wext_get_mesh_channel (WifiData *data)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ guint32 freq;
+ int i;
+
+ freq = wifi_utils_get_freq (data);
+ for (i = 0; i < wext->num_freqs; i++) {
+ if (freq == wext->freqs[i])
+ return i + 1;
+ }
+ return 0;
+}
+
+static gboolean
+wifi_wext_set_mesh_channel (WifiData *data, guint32 channel)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+
+ memset (&wrq, 0, sizeof (struct iwreq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+
+ if (channel > 0) {
+ wrq.u.freq.flags = IW_FREQ_FIXED;
+ wrq.u.freq.e = 0;
+ wrq.u.freq.m = channel;
+ }
+
+ if (ioctl (wext->fd, SIOCSIWFREQ, &wrq) < 0) {
+ nm_log_err (LOGD_HW | LOGD_WIFI | LOGD_OLPC_MESH,
+ "(%s): error setting channel to %d: %s",
+ wext->parent.iface, channel, strerror (errno));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+wifi_wext_set_mesh_ssid (WifiData *data, const GByteArray *ssid)
+{
+ WifiDataWext *wext = (WifiDataWext *) data;
+ struct iwreq wrq;
+ guint32 len = 0;
+ char buf[IW_ESSID_MAX_SIZE + 1];
+
+ memset (buf, 0, sizeof (buf));
+ if (ssid) {
+ len = ssid->len;
+ memcpy (buf, ssid->data, MIN (sizeof (buf) - 1, len));
+ }
+ wrq.u.essid.pointer = (caddr_t) buf;
+ wrq.u.essid.length = len;
+ wrq.u.essid.flags = (len > 0) ? 1 : 0; /* 1=enable SSID, 0=disable/any */
+
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ if (ioctl (wext->fd, SIOCSIWESSID, &wrq) == 0)
+ return TRUE;
+
+ if (errno != ENODEV) {
+ nm_log_err (LOGD_HW | LOGD_WIFI | LOGD_OLPC_MESH,
+ "(%s): error setting SSID to '%s': %s",
+ wext->parent.iface,
+ ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(null)",
+ strerror (errno));
+ }
+
+ return FALSE;
+}
+
+/*********************/
+
+static gboolean
+wext_can_scan (WifiDataWext *wext)
+{
+ struct iwreq wrq;
+
+ memset (&wrq, 0, sizeof (struct iwreq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ if (ioctl (wext->fd, SIOCSIWSCAN, &wrq) < 0) {
+ if (errno == EOPNOTSUPP)
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static gboolean
+wext_get_range (WifiDataWext *wext,
+ struct iw_range *range,
+ guint32 *response_len)
+{
+ int i = 26;
+ gboolean success = FALSE;
+ struct iwreq wrq;
+
+ memset (&wrq, 0, sizeof (struct iwreq));
+ strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ);
+ wrq.u.data.pointer = (caddr_t) range;
+ wrq.u.data.length = sizeof (struct iw_range);
+
+ /* Need to give some drivers time to recover after suspend/resume
+ * (ex ipw3945 takes a few seconds to talk to its regulatory daemon;
+ * see rh bz#362421)
+ */
+ while (i-- > 0) {
+ if (ioctl (wext->fd, SIOCGIWRANGE, &wrq) == 0) {
+ if (response_len)
+ *response_len = wrq.u.data.length;
+ success = TRUE;
+ break;
+ } else if (errno != EAGAIN) {
+ nm_log_err (LOGD_HW | LOGD_WIFI,
+ "(%s): couldn't get driver range information (%d).",
+ wext->parent.iface, errno);
+ break;
+ }
+
+ g_usleep (G_USEC_PER_SEC / 4);
+ }
+
+ if (i <= 0) {
+ nm_log_warn (LOGD_HW | LOGD_WIFI,
+ "(%s): driver took too long to respond to IWRANGE query.",
+ wext->parent.iface);
+ }
+
+ return success;
+}
+
+#define WPA_CAPS (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | \
+ NM_WIFI_DEVICE_CAP_CIPHER_CCMP | \
+ NM_WIFI_DEVICE_CAP_WPA | \
+ NM_WIFI_DEVICE_CAP_RSN)
+
+static guint32
+wext_get_caps (WifiDataWext *wext, struct iw_range *range)
+{
+ guint32 caps = NM_WIFI_DEVICE_CAP_NONE;
+
+ g_return_val_if_fail (wext != NULL, NM_WIFI_DEVICE_CAP_NONE);
+ g_return_val_if_fail (range != NULL, NM_WIFI_DEVICE_CAP_NONE);
+
+ /* All drivers should support WEP by default */
+ caps |= NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104;
+
+ if (range->enc_capa & IW_ENC_CAPA_CIPHER_TKIP)
+ caps |= NM_WIFI_DEVICE_CAP_CIPHER_TKIP;
+
+ if (range->enc_capa & IW_ENC_CAPA_CIPHER_CCMP)
+ caps |= NM_WIFI_DEVICE_CAP_CIPHER_CCMP;
+
+ if (range->enc_capa & IW_ENC_CAPA_WPA)
+ caps |= NM_WIFI_DEVICE_CAP_WPA;
+
+ if (range->enc_capa & IW_ENC_CAPA_WPA2)
+ caps |= NM_WIFI_DEVICE_CAP_RSN;
+
+ /* Check for cipher support but not WPA support */
+ if ( (caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
+ && !(caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))) {
+ nm_log_warn (LOGD_WIFI, "%s: device supports WPA ciphers but not WPA protocol; "
+ "WPA unavailable.", wext->parent.iface);
+ caps &= ~WPA_CAPS;
+ }
+
+ /* Check for WPA support but not cipher support */
+ if ( (caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))
+ && !(caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))) {
+ nm_log_warn (LOGD_WIFI, "%s: device supports WPA protocol but not WPA ciphers; "
+ "WPA unavailable.", wext->parent.iface);
+ caps &= ~WPA_CAPS;
+ }
+
+ return caps;
+}
+
+WifiData *
+wifi_wext_init (const char *iface, int ifindex, gboolean check_scan)
+{
+ WifiDataWext *wext;
+ struct iw_range range;
+ guint32 response_len = 0;
+ struct iw_range_with_scan_capa *scan_capa_range;
+ int i;
+
+ wext = wifi_data_new (iface, ifindex, sizeof (*wext));
+ wext->parent.get_mode = wifi_wext_get_mode;
+ wext->parent.set_mode = wifi_wext_set_mode;
+ wext->parent.get_freq = wifi_wext_get_freq;
+ wext->parent.find_freq = wifi_wext_find_freq;
+ wext->parent.get_ssid = wifi_wext_get_ssid;
+ wext->parent.get_bssid = wifi_wext_get_bssid;
+ wext->parent.get_rate = wifi_wext_get_rate;
+ wext->parent.get_qual = wifi_wext_get_qual;
+ wext->parent.deinit = wifi_wext_deinit;
+ wext->parent.get_mesh_channel = wifi_wext_get_mesh_channel;
+ wext->parent.set_mesh_channel = wifi_wext_set_mesh_channel;
+ wext->parent.set_mesh_ssid = wifi_wext_set_mesh_ssid;
+
+ wext->fd = socket (PF_INET, SOCK_DGRAM, 0);
+ if (wext->fd < 0)
+ goto error;
+
+ memset (&range, 0, sizeof (struct iw_range));
+ if (wext_get_range (wext, &range, &response_len) == FALSE) {
+ nm_log_info (LOGD_HW | LOGD_WIFI, "(%s): driver WEXT range request failed",
+ wext->parent.iface);
+ goto error;
+ }
+
+ if ((response_len < 300) || (range.we_version_compiled < 21)) {
+ nm_log_info (LOGD_HW | LOGD_WIFI,
+ "(%s): driver WEXT version too old (got %d, expected >= 21)",
+ wext->parent.iface,
+ range.we_version_compiled);
+ goto error;
+ }
+
+ wext->max_qual.qual = range.max_qual.qual;
+ wext->max_qual.level = range.max_qual.level;
+ wext->max_qual.noise = range.max_qual.noise;
+ wext->max_qual.updated = range.max_qual.updated;
+
+ wext->num_freqs = MIN (range.num_frequency, IW_MAX_FREQUENCIES);
+ for (i = 0; i < wext->num_freqs; i++)
+ wext->freqs[i] = iw_freq_to_uint32 (&range.freq[i]);
+
+ /* Check for scanning capability; cards that can't scan are not supported */
+ if (check_scan && (wext_can_scan (wext) == FALSE)) {
+ nm_log_info (LOGD_HW | LOGD_WIFI,
+ "(%s): drivers that cannot scan are unsupported",
+ wext->parent.iface);
+ goto error;
+ }
+
+ /* Check for the ability to scan specific SSIDs. Until the scan_capa
+ * field gets added to wireless-tools, need to work around that by casting
+ * to the custom structure.
+ */
+ scan_capa_range = (struct iw_range_with_scan_capa *) &range;
+ if (scan_capa_range->scan_capa & NM_IW_SCAN_CAPA_ESSID) {
+ wext->parent.can_scan_ssid = TRUE;
+ nm_log_info (LOGD_HW | LOGD_WIFI,
+ "(%s): driver supports SSID scans (scan_capa 0x%02X).",
+ wext->parent.iface,
+ scan_capa_range->scan_capa);
+ } else {
+ nm_log_info (LOGD_HW | LOGD_WIFI,
+ "(%s): driver does not support SSID scans (scan_capa 0x%02X).",
+ wext->parent.iface,
+ scan_capa_range->scan_capa);
+ }
+
+ wext->parent.caps = wext_get_caps (wext, &range);
+
+ nm_log_info (LOGD_HW | LOGD_WIFI,
+ "(%s): using WEXT for WiFi device control",
+ wext->parent.iface);
+
+ return (WifiData *) wext;
+
+error:
+ wifi_utils_deinit ((WifiData *) wext);
+ return NULL;
+}
+
+gboolean
+wifi_wext_is_wifi (const char *iface)
+{
+ int fd;
+ struct iwreq iwr;
+ gboolean is_wifi = FALSE;
+
+ fd = socket (PF_INET, SOCK_DGRAM, 0);
+ if (fd >= 0) {
+ strncpy (iwr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
+ if (ioctl (fd, SIOCGIWNAME, &iwr) == 0)
+ is_wifi = TRUE;
+ close (fd);
+ }
+ return is_wifi;
+}
+
diff --git a/src/wifi/wifi-utils-wext.h b/src/wifi/wifi-utils-wext.h
new file mode 100644
index 000000000..96ad74eb4
--- /dev/null
+++ b/src/wifi/wifi-utils-wext.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Red Hat, Inc.
+ */
+
+#ifndef WIFI_UTILS_WEXT_H
+#define WIFI_UTILS_WEXT_H
+
+#include "wifi-utils.h"
+
+WifiData *wifi_wext_init (const char *iface, int ifindex, gboolean check_scan);
+
+gboolean wifi_wext_is_wifi (const char *iface);
+
+#endif /* WIFI_UTILS_WEXT_H */
diff --git a/src/wifi/wifi-utils.c b/src/wifi/wifi-utils.c
new file mode 100644
index 000000000..a99a4b7bc
--- /dev/null
+++ b/src/wifi/wifi-utils.c
@@ -0,0 +1,213 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2006 - 2008 Novell, Inc.
+ */
+
+#include <config.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+
+#include "wifi-utils.h"
+#include "wifi-utils-private.h"
+#include "wifi-utils-nl80211.h"
+#if HAVE_WEXT
+#include "wifi-utils-wext.h"
+#endif
+
+gpointer
+wifi_data_new (const char *iface, int ifindex, gsize len)
+{
+ WifiData *data;
+
+ data = g_malloc0 (len);
+ data->iface = g_strdup (iface);
+ data->ifindex = ifindex;
+ return data;
+}
+
+void
+wifi_data_free (WifiData *data)
+{
+ g_free (data->iface);
+ memset (data, 0, sizeof (*data));
+ g_free (data);
+}
+
+/***************************************************************/
+
+WifiData *
+wifi_utils_init (const char *iface, int ifindex, gboolean check_scan)
+{
+ WifiData *ret;
+
+ g_return_val_if_fail (iface != NULL, NULL);
+ g_return_val_if_fail (ifindex > 0, NULL);
+
+ ret = wifi_nl80211_init (iface, ifindex);
+ if (ret == NULL) {
+#if HAVE_WEXT
+ ret = wifi_wext_init (iface, ifindex, check_scan);
+#endif
+ }
+ return ret;
+}
+
+NMDeviceWifiCapabilities
+wifi_utils_get_caps (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, NM_WIFI_DEVICE_CAP_NONE);
+
+ return data->caps;
+}
+
+gboolean
+wifi_utils_can_scan_ssid (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, FALSE);
+ return data->can_scan_ssid;
+}
+
+NM80211Mode
+wifi_utils_get_mode (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, NM_802_11_MODE_UNKNOWN);
+ return data->get_mode (data);
+}
+
+gboolean
+wifi_utils_set_mode (WifiData *data, const NM80211Mode mode)
+{
+ g_return_val_if_fail (data != NULL, FALSE);
+ g_return_val_if_fail ((mode == NM_802_11_MODE_INFRA) || (mode == NM_802_11_MODE_ADHOC), FALSE);
+
+ /* nl80211 probably doesn't need this */
+ return data->set_mode ? data->set_mode (data, mode) : TRUE;
+}
+
+guint32
+wifi_utils_get_freq (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, 0);
+ return data->get_freq (data);
+}
+
+guint32
+wifi_utils_find_freq (WifiData *data, const guint32 *freqs)
+{
+ g_return_val_if_fail (data != NULL, 0);
+ g_return_val_if_fail (freqs != NULL, 0);
+ return data->find_freq (data, freqs);
+}
+
+GByteArray *
+wifi_utils_get_ssid (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, NULL);
+ return data->get_ssid (data);
+}
+
+gboolean
+wifi_utils_get_bssid (WifiData *data, struct ether_addr *out_bssid)
+{
+ g_return_val_if_fail (data != NULL, FALSE);
+ g_return_val_if_fail (out_bssid != NULL, FALSE);
+
+ memset (out_bssid, 0, sizeof (*out_bssid));
+ return data->get_bssid (data, out_bssid);
+}
+
+guint32
+wifi_utils_get_rate (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, 0);
+ return data->get_rate (data);
+}
+
+int
+wifi_utils_get_qual (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, 0);
+ return data->get_qual (data);
+}
+
+void
+wifi_utils_deinit (WifiData *data)
+{
+ g_return_if_fail (data != NULL);
+ data->deinit (data);
+ wifi_data_free (data);
+}
+
+gboolean
+wifi_utils_is_wifi (const char *iface, const char *sysfs_path)
+{
+ char phy80211_path[255];
+ struct stat s;
+
+ g_return_val_if_fail (iface != NULL, FALSE);
+
+ if (sysfs_path) {
+ /* Check for nl80211 sysfs paths */
+ snprintf (phy80211_path, sizeof (phy80211_path), "%s/phy80211", sysfs_path);
+ if ((stat (phy80211_path, &s) == 0 && (s.st_mode & S_IFDIR)))
+ return TRUE;
+ }
+
+ if (wifi_nl80211_is_wifi (iface))
+ return TRUE;
+
+#if HAVE_WEXT
+ if (wifi_wext_is_wifi (iface))
+ return TRUE;
+#endif
+
+ return FALSE;
+}
+
+
+/* OLPC Mesh-only functions */
+
+guint32
+wifi_utils_get_mesh_channel (WifiData *data)
+{
+ g_return_val_if_fail (data != NULL, FALSE);
+ g_return_val_if_fail (data->get_mesh_channel != NULL, FALSE);
+ return data->get_mesh_channel (data);
+}
+
+gboolean
+wifi_utils_set_mesh_channel (WifiData *data, guint32 channel)
+{
+ g_return_val_if_fail (data != NULL, FALSE);
+ g_return_val_if_fail (channel >= 0, FALSE);
+ g_return_val_if_fail (channel <= 13, FALSE);
+ g_return_val_if_fail (data->set_mesh_channel != NULL, FALSE);
+ return data->set_mesh_channel (data, channel);
+}
+
+gboolean
+wifi_utils_set_mesh_ssid (WifiData *data, const GByteArray *ssid)
+{
+ g_return_val_if_fail (data != NULL, FALSE);
+ g_return_val_if_fail (data->set_mesh_ssid != NULL, FALSE);
+ return data->set_mesh_ssid (data, ssid);
+}
+
diff --git a/src/wifi/wifi-utils.h b/src/wifi/wifi-utils.h
new file mode 100644
index 000000000..09583e7bd
--- /dev/null
+++ b/src/wifi/wifi-utils.h
@@ -0,0 +1,72 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2005 - 2011 Red Hat, Inc.
+ * Copyright (C) 2006 - 2008 Novell, Inc.
+ */
+
+#ifndef WIFI_UTILS_H
+#define WIFI_UTILS_H
+
+#include <net/ethernet.h>
+#include <glib.h>
+
+#include "NetworkManager.h"
+
+typedef struct WifiData WifiData;
+
+gboolean wifi_utils_is_wifi (const char *iface, const char *sysfs_path);
+
+WifiData *wifi_utils_init (const char *iface, int ifindex, gboolean check_scan);
+
+void wifi_utils_deinit (WifiData *data);
+
+NMDeviceWifiCapabilities wifi_utils_get_caps (WifiData *data);
+
+gboolean wifi_utils_can_scan_ssid (WifiData *data);
+
+NM80211Mode wifi_utils_get_mode (WifiData *data);
+
+gboolean wifi_utils_set_mode (WifiData *data, const NM80211Mode mode);
+
+/* Returns frequency in MHz */
+guint32 wifi_utils_get_freq (WifiData *data);
+
+/* Return the first supported frequency in the zero-terminated list */
+guint32 wifi_utils_find_freq (WifiData *data, const guint32 *freqs);
+
+/* Caller must free returned byte array */
+GByteArray *wifi_utils_get_ssid (WifiData *data);
+
+/* Caller must free returned byte array */
+gboolean wifi_utils_get_bssid (WifiData *data, struct ether_addr *out_bssid);
+
+/* Returns current bitrate in Kbps */
+guint32 wifi_utils_get_rate (WifiData *data);
+
+/* Returns quality 0 - 100% on succes, or -1 on error */
+int wifi_utils_get_qual (WifiData *data);
+
+
+/* OLPC Mesh-only functions */
+guint32 wifi_utils_get_mesh_channel (WifiData *data);
+
+gboolean wifi_utils_set_mesh_channel (WifiData *data, guint32 channel);
+
+gboolean wifi_utils_set_mesh_ssid (WifiData *data, const GByteArray *ssid);
+
+#endif /* WIFI_UTILS_H */
diff --git a/src/wimax/Makefile.am b/src/wimax/Makefile.am
index 91f1dc4e0..63c95dc71 100644
--- a/src/wimax/Makefile.am
+++ b/src/wimax/Makefile.am
@@ -1,13 +1,14 @@
INCLUDES = \
-I${top_srcdir}/src \
+ -I${top_srcdir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
- -I${top_srcdir}/libnm-util \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/libnm-util
-noinst_LTLIBRARIES = libwimax.la
+pkglib_LTLIBRARIES = libnm-device-plugin-wimax.la
-libwimax_la_SOURCES = \
+libnm_device_plugin_wimax_la_SOURCES = \
+ nm-wimax-factory.c \
nm-device-wimax.c \
nm-device-wimax.h \
nm-wimax-nsp.c \
@@ -18,14 +19,18 @@ libwimax_la_SOURCES = \
iwmxsdk.c \
iwmxsdk.h
-libwimax_la_CPPFLAGS = \
+libnm_device_plugin_wimax_la_CPPFLAGS = \
$(DBUS_CFLAGS) \
- $(IWMX_SDK_CFLAGS)
+ $(IWMX_SDK_CFLAGS) \
+ $(LIBNL_CFLAGS) \
+ $(GUDEV_CFLAGS)
-libwimax_la_LIBADD = \
+libnm_device_plugin_wimax_la_LDFLAGS = -module -avoid-version
+libnm_device_plugin_wimax_la_LIBADD = \
$(DBUS_LIBS) \
$(IWMX_SDK_LIBS) \
- $(top_builddir)/marshallers/libmarshallers.la
+ $(GUDEV_LIBS) \
+ $(top_builddir)/src/generated/libnm-generated.la
nm-wimax-nsp-glue.h: $(top_srcdir)/introspection/nm-wimax-nsp.xml
dbus-binding-tool --prefix=nm_wimax_nsp --mode=glib-server --output=$@ $<
diff --git a/src/wimax/Makefile.in b/src/wimax/Makefile.in
index e9b51e9f8..2de521800 100644
--- a/src/wimax/Makefile.in
+++ b/src/wimax/Makefile.in
@@ -54,17 +54,48 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
am__DEPENDENCIES_1 =
-libwimax_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(top_builddir)/marshallers/libmarshallers.la
-am_libwimax_la_OBJECTS = libwimax_la-nm-device-wimax.lo \
- libwimax_la-nm-wimax-nsp.lo libwimax_la-nm-wimax-util.lo \
- libwimax_la-iwmxsdk.lo
-libwimax_la_OBJECTS = $(am_libwimax_la_OBJECTS)
+libnm_device_plugin_wimax_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/generated/libnm-generated.la
+am_libnm_device_plugin_wimax_la_OBJECTS = \
+ libnm_device_plugin_wimax_la-nm-wimax-factory.lo \
+ libnm_device_plugin_wimax_la-nm-device-wimax.lo \
+ libnm_device_plugin_wimax_la-nm-wimax-nsp.lo \
+ libnm_device_plugin_wimax_la-nm-wimax-util.lo \
+ libnm_device_plugin_wimax_la-iwmxsdk.lo
+libnm_device_plugin_wimax_la_OBJECTS = \
+ $(am_libnm_device_plugin_wimax_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
+libnm_device_plugin_wimax_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libnm_device_plugin_wimax_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -91,8 +122,8 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(libwimax_la_SOURCES)
-DIST_SOURCES = $(libwimax_la_SOURCES)
+SOURCES = $(libnm_device_plugin_wimax_la_SOURCES)
+DIST_SOURCES = $(libnm_device_plugin_wimax_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -141,6 +172,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -195,11 +228,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -210,6 +247,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -249,6 +287,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -314,13 +354,14 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = \
-I${top_srcdir}/src \
+ -I${top_srcdir}/src/generated \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
- -I${top_srcdir}/libnm-util \
- -I${top_builddir}/marshallers
+ -I${top_srcdir}/libnm-util
-noinst_LTLIBRARIES = libwimax.la
-libwimax_la_SOURCES = \
+pkglib_LTLIBRARIES = libnm-device-plugin-wimax.la
+libnm_device_plugin_wimax_la_SOURCES = \
+ nm-wimax-factory.c \
nm-device-wimax.c \
nm-device-wimax.h \
nm-wimax-nsp.c \
@@ -331,14 +372,18 @@ libwimax_la_SOURCES = \
iwmxsdk.c \
iwmxsdk.h
-libwimax_la_CPPFLAGS = \
+libnm_device_plugin_wimax_la_CPPFLAGS = \
$(DBUS_CFLAGS) \
- $(IWMX_SDK_CFLAGS)
+ $(IWMX_SDK_CFLAGS) \
+ $(LIBNL_CFLAGS) \
+ $(GUDEV_CFLAGS)
-libwimax_la_LIBADD = \
+libnm_device_plugin_wimax_la_LDFLAGS = -module -avoid-version
+libnm_device_plugin_wimax_la_LIBADD = \
$(DBUS_LIBS) \
$(IWMX_SDK_LIBS) \
- $(top_builddir)/marshallers/libmarshallers.la
+ $(GUDEV_LIBS) \
+ $(top_builddir)/src/generated/libnm-generated.la
BUILT_SOURCES = \
nm-wimax-nsp-glue.h \
@@ -380,17 +425,39 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libwimax.la: $(libwimax_la_OBJECTS) $(libwimax_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libwimax_la_OBJECTS) $(libwimax_la_LIBADD) $(LIBS)
+libnm-device-plugin-wimax.la: $(libnm_device_plugin_wimax_la_OBJECTS) $(libnm_device_plugin_wimax_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libnm_device_plugin_wimax_la_LINK) -rpath $(pkglibdir) $(libnm_device_plugin_wimax_la_OBJECTS) $(libnm_device_plugin_wimax_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -398,10 +465,11 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwimax_la-iwmxsdk.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwimax_la-nm-device-wimax.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwimax_la-nm-wimax-nsp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwimax_la-nm-wimax-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_device_plugin_wimax_la-iwmxsdk.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_device_plugin_wimax_la-nm-device-wimax.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-factory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-nsp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-util.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -430,37 +498,45 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-libwimax_la-nm-device-wimax.lo: nm-device-wimax.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwimax_la-nm-device-wimax.lo -MD -MP -MF $(DEPDIR)/libwimax_la-nm-device-wimax.Tpo -c -o libwimax_la-nm-device-wimax.lo `test -f 'nm-device-wimax.c' || echo '$(srcdir)/'`nm-device-wimax.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwimax_la-nm-device-wimax.Tpo $(DEPDIR)/libwimax_la-nm-device-wimax.Plo
+libnm_device_plugin_wimax_la-nm-wimax-factory.lo: nm-wimax-factory.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_device_plugin_wimax_la-nm-wimax-factory.lo -MD -MP -MF $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-factory.Tpo -c -o libnm_device_plugin_wimax_la-nm-wimax-factory.lo `test -f 'nm-wimax-factory.c' || echo '$(srcdir)/'`nm-wimax-factory.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-factory.Tpo $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-factory.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-wimax-factory.c' object='libnm_device_plugin_wimax_la-nm-wimax-factory.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_device_plugin_wimax_la-nm-wimax-factory.lo `test -f 'nm-wimax-factory.c' || echo '$(srcdir)/'`nm-wimax-factory.c
+
+libnm_device_plugin_wimax_la-nm-device-wimax.lo: nm-device-wimax.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_device_plugin_wimax_la-nm-device-wimax.lo -MD -MP -MF $(DEPDIR)/libnm_device_plugin_wimax_la-nm-device-wimax.Tpo -c -o libnm_device_plugin_wimax_la-nm-device-wimax.lo `test -f 'nm-device-wimax.c' || echo '$(srcdir)/'`nm-device-wimax.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_device_plugin_wimax_la-nm-device-wimax.Tpo $(DEPDIR)/libnm_device_plugin_wimax_la-nm-device-wimax.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-wimax.c' object='libwimax_la-nm-device-wimax.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-device-wimax.c' object='libnm_device_plugin_wimax_la-nm-device-wimax.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwimax_la-nm-device-wimax.lo `test -f 'nm-device-wimax.c' || echo '$(srcdir)/'`nm-device-wimax.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_device_plugin_wimax_la-nm-device-wimax.lo `test -f 'nm-device-wimax.c' || echo '$(srcdir)/'`nm-device-wimax.c
-libwimax_la-nm-wimax-nsp.lo: nm-wimax-nsp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwimax_la-nm-wimax-nsp.lo -MD -MP -MF $(DEPDIR)/libwimax_la-nm-wimax-nsp.Tpo -c -o libwimax_la-nm-wimax-nsp.lo `test -f 'nm-wimax-nsp.c' || echo '$(srcdir)/'`nm-wimax-nsp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwimax_la-nm-wimax-nsp.Tpo $(DEPDIR)/libwimax_la-nm-wimax-nsp.Plo
+libnm_device_plugin_wimax_la-nm-wimax-nsp.lo: nm-wimax-nsp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_device_plugin_wimax_la-nm-wimax-nsp.lo -MD -MP -MF $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-nsp.Tpo -c -o libnm_device_plugin_wimax_la-nm-wimax-nsp.lo `test -f 'nm-wimax-nsp.c' || echo '$(srcdir)/'`nm-wimax-nsp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-nsp.Tpo $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-nsp.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-wimax-nsp.c' object='libwimax_la-nm-wimax-nsp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-wimax-nsp.c' object='libnm_device_plugin_wimax_la-nm-wimax-nsp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwimax_la-nm-wimax-nsp.lo `test -f 'nm-wimax-nsp.c' || echo '$(srcdir)/'`nm-wimax-nsp.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_device_plugin_wimax_la-nm-wimax-nsp.lo `test -f 'nm-wimax-nsp.c' || echo '$(srcdir)/'`nm-wimax-nsp.c
-libwimax_la-nm-wimax-util.lo: nm-wimax-util.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwimax_la-nm-wimax-util.lo -MD -MP -MF $(DEPDIR)/libwimax_la-nm-wimax-util.Tpo -c -o libwimax_la-nm-wimax-util.lo `test -f 'nm-wimax-util.c' || echo '$(srcdir)/'`nm-wimax-util.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwimax_la-nm-wimax-util.Tpo $(DEPDIR)/libwimax_la-nm-wimax-util.Plo
+libnm_device_plugin_wimax_la-nm-wimax-util.lo: nm-wimax-util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_device_plugin_wimax_la-nm-wimax-util.lo -MD -MP -MF $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-util.Tpo -c -o libnm_device_plugin_wimax_la-nm-wimax-util.lo `test -f 'nm-wimax-util.c' || echo '$(srcdir)/'`nm-wimax-util.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-util.Tpo $(DEPDIR)/libnm_device_plugin_wimax_la-nm-wimax-util.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-wimax-util.c' object='libwimax_la-nm-wimax-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nm-wimax-util.c' object='libnm_device_plugin_wimax_la-nm-wimax-util.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwimax_la-nm-wimax-util.lo `test -f 'nm-wimax-util.c' || echo '$(srcdir)/'`nm-wimax-util.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_device_plugin_wimax_la-nm-wimax-util.lo `test -f 'nm-wimax-util.c' || echo '$(srcdir)/'`nm-wimax-util.c
-libwimax_la-iwmxsdk.lo: iwmxsdk.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libwimax_la-iwmxsdk.lo -MD -MP -MF $(DEPDIR)/libwimax_la-iwmxsdk.Tpo -c -o libwimax_la-iwmxsdk.lo `test -f 'iwmxsdk.c' || echo '$(srcdir)/'`iwmxsdk.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwimax_la-iwmxsdk.Tpo $(DEPDIR)/libwimax_la-iwmxsdk.Plo
+libnm_device_plugin_wimax_la-iwmxsdk.lo: iwmxsdk.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnm_device_plugin_wimax_la-iwmxsdk.lo -MD -MP -MF $(DEPDIR)/libnm_device_plugin_wimax_la-iwmxsdk.Tpo -c -o libnm_device_plugin_wimax_la-iwmxsdk.lo `test -f 'iwmxsdk.c' || echo '$(srcdir)/'`iwmxsdk.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnm_device_plugin_wimax_la-iwmxsdk.Tpo $(DEPDIR)/libnm_device_plugin_wimax_la-iwmxsdk.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iwmxsdk.c' object='libwimax_la-iwmxsdk.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iwmxsdk.c' object='libnm_device_plugin_wimax_la-iwmxsdk.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libwimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libwimax_la-iwmxsdk.lo `test -f 'iwmxsdk.c' || echo '$(srcdir)/'`iwmxsdk.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnm_device_plugin_wimax_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnm_device_plugin_wimax_la-iwmxsdk.lo `test -f 'iwmxsdk.c' || echo '$(srcdir)/'`iwmxsdk.c
mostlyclean-libtool:
-rm -f *.lo
@@ -555,6 +631,9 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
@@ -585,7 +664,7 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
@@ -612,7 +691,7 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am:
+install-exec-am: install-pkglibLTLIBRARIES
install-html: install-html-am
@@ -652,22 +731,23 @@ ps: ps-am
ps-am:
-uninstall-am:
+uninstall-am: uninstall-pkglibLTLIBRARIES
.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am
+ install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
nm-wimax-nsp-glue.h: $(top_srcdir)/introspection/nm-wimax-nsp.xml
diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c
index 2d8553a09..1f1a622c4 100644
--- a/src/wimax/nm-device-wimax.c
+++ b/src/wimax/nm-device-wimax.c
@@ -25,6 +25,7 @@
#include <net/ethernet.h>
#include <sys/socket.h>
#include <linux/if.h>
+#include <netinet/ether.h>
#include <WiMaxAPI.h>
#include <WiMaxAPIEx.h>
@@ -32,7 +33,6 @@
#include "nm-device-wimax.h"
#include "nm-wimax-util.h"
#include "nm-logging.h"
-#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-system.h"
#include "NetworkManagerUtils.h"
@@ -43,15 +43,13 @@
#include "nm-utils.h"
#include "nm-rfkill.h"
#include "iwmxsdk.h"
+#include "nm-enum-types.h"
static gboolean impl_device_get_nsp_list (NMDeviceWimax *device, GPtrArray **list, GError **error);
#include "nm-device-wimax-glue.h"
-static void device_interface_init (NMDeviceInterface *iface_class);
-
-G_DEFINE_TYPE_EXTENDED (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init))
+G_DEFINE_TYPE (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE)
enum {
PROP_0,
@@ -113,16 +111,7 @@ typedef struct {
/***********************************************************/
-typedef enum
-{
- NM_WIMAX_ERROR_CONNECTION_NOT_WIMAX = 0,
- NM_WIMAX_ERROR_CONNECTION_INVALID,
- NM_WIMAX_ERROR_CONNECTION_INCOMPATIBLE,
- NM_WIMAX_ERROR_NSP_NOT_FOUND,
-} NMWimaxError;
-
#define NM_WIMAX_ERROR (nm_wimax_error_quark ())
-#define NM_TYPE_WIMAX_ERROR (nm_wimax_error_get_type ())
static GQuark
nm_wimax_error_quark (void)
@@ -133,31 +122,6 @@ nm_wimax_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-static GType
-nm_wimax_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Connection was not a wired connection. */
- ENUM_ENTRY (NM_WIMAX_ERROR_CONNECTION_NOT_WIMAX, "ConnectionNotWimax"),
- /* Connection was not a valid wired connection. */
- ENUM_ENTRY (NM_WIMAX_ERROR_CONNECTION_INVALID, "ConnectionInvalid"),
- /* Connection does not apply to this device. */
- ENUM_ENTRY (NM_WIMAX_ERROR_CONNECTION_INCOMPATIBLE, "ConnectionIncompatible"),
- /* NSP not found in the scan list. */
- ENUM_ENTRY (NM_WIMAX_ERROR_NSP_NOT_FOUND, "NspNotFound"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMWimaxError", values);
- }
- return etype;
-}
-
/***********************************************************/
void
@@ -321,7 +285,7 @@ update_availability (NMDeviceWimax *self, gboolean old_available)
if (new_available == old_available)
return FALSE;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
+ state = nm_device_get_state (device);
if (state == NM_DEVICE_STATE_UNAVAILABLE) {
if (new_available == TRUE) {
nm_device_state_changed (device,
@@ -344,7 +308,7 @@ update_availability (NMDeviceWimax *self, gboolean old_available)
/* NMDeviceInterface interface */
static void
-real_set_enabled (NMDeviceInterface *device, gboolean enabled)
+real_set_enabled (NMDevice *device, gboolean enabled)
{
NMDeviceWimax *self = NM_DEVICE_WIMAX (device);
NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
@@ -446,6 +410,35 @@ real_update_hw_address (NMDevice *dev)
}
static gboolean
+hwaddr_matches (NMDevice *device,
+ NMConnection *connection,
+ const guint8 *other_hwaddr,
+ guint other_hwaddr_len,
+ gboolean fail_if_no_hwaddr)
+{
+ NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device);
+ NMSettingWimax *s_wimax;
+ const GByteArray *mac = NULL;
+
+ s_wimax = nm_connection_get_setting_wimax (connection);
+ if (s_wimax)
+ mac = nm_setting_wimax_get_mac_address (s_wimax);
+
+ if (mac) {
+ g_return_val_if_fail (mac->len == ETH_ALEN, FALSE);
+ if (other_hwaddr) {
+ g_return_val_if_fail (other_hwaddr_len == ETH_ALEN, FALSE);
+ if (memcmp (mac->data, other_hwaddr, mac->len) == 0)
+ return TRUE;
+ } else if (memcmp (mac->data, priv->hw_addr.ether_addr_octet, mac->len) == 0)
+ return TRUE;
+ } else if (fail_if_no_hwaddr == FALSE)
+ return TRUE;
+
+ return FALSE;
+}
+
+static gboolean
real_check_connection_compatible (NMDevice *device,
NMConnection *connection,
GError **error)
@@ -731,7 +724,7 @@ real_act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason)
if (!req)
return NM_ACT_STAGE_RETURN_FAILURE;
- path = nm_act_request_get_specific_object (req);
+ path = nm_active_connection_get_specific_object (NM_ACTIVE_CONNECTION (req));
if (!path)
return NM_ACT_STAGE_RETURN_FAILURE;
@@ -774,7 +767,7 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
iface = nm_device_get_iface (device);
g_assert (iface);
- connection = nm_act_request_get_connection (nm_device_get_act_request (device));
+ connection = nm_device_get_connection (device);
g_assert (connection);
s_wimax = nm_connection_get_setting_wimax (connection);
@@ -878,7 +871,7 @@ wmx_state_change_cb (struct wmxsdk *wmxsdk,
if (new_status == old_status)
return;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
+ state = nm_device_get_state (NM_DEVICE (self));
old_available = nm_device_is_available (NM_DEVICE (self));
priv->status = new_status;
@@ -917,7 +910,7 @@ wmx_state_change_cb (struct wmxsdk *wmxsdk,
}
/* Handle activation success and failure */
- if (IS_ACTIVATING_STATE (state)) {
+ if (nm_device_is_activating (NM_DEVICE (self))) {
if (new_status == WIMAX_API_DEVICE_STATUS_Data_Connected) {
/* Success */
clear_activation_timeout (self);
@@ -993,7 +986,7 @@ wmx_media_status_cb (struct wmxsdk *wmxsdk,
const char *iface;
iface = nm_device_get_iface (NM_DEVICE (self));
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
+ state = nm_device_get_state (NM_DEVICE (self));
nm_log_dbg (LOGD_WIMAX, "(%s): media status change to %s",
iface, iwmx_sdk_media_status_to_str (new_status));
@@ -1032,10 +1025,8 @@ wmx_connect_result_cb (struct wmxsdk *wmxsdk,
{
NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- NMDeviceState state;
- state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
- if (IS_ACTIVATING_STATE (state)) {
+ if (nm_device_is_activating (NM_DEVICE (self))) {
priv->connect_failed = (result == WIMAX_API_CONNECTION_SUCCESS);
/* Wait for the state change so we can get the reason code; we
* cache the connect failure so we don't have to wait for the
@@ -1373,12 +1364,12 @@ nm_device_wimax_new (const char *udi,
g_return_val_if_fail (driver != NULL, NULL);
device = (NMDevice *) g_object_new (NM_TYPE_DEVICE_WIMAX,
- NM_DEVICE_INTERFACE_UDI, udi,
- NM_DEVICE_INTERFACE_IFACE, iface,
- NM_DEVICE_INTERFACE_DRIVER, driver,
- NM_DEVICE_INTERFACE_TYPE_DESC, "WiMAX",
- NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_WIMAX,
- NM_DEVICE_INTERFACE_RFKILL_TYPE, RFKILL_TYPE_WIMAX,
+ NM_DEVICE_UDI, udi,
+ NM_DEVICE_IFACE, iface,
+ NM_DEVICE_DRIVER, driver,
+ NM_DEVICE_TYPE_DESC, "WiMAX",
+ NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_WIMAX,
+ NM_DEVICE_RFKILL_TYPE, RFKILL_TYPE_WIMAX,
NULL);
if (device) {
struct wmxsdk *sdk;
@@ -1399,12 +1390,6 @@ nm_device_wimax_new (const char *udi,
}
static void
-device_interface_init (NMDeviceInterface *iface_class)
-{
- iface_class->set_enabled = real_set_enabled;
-}
-
-static void
nm_device_wimax_init (NMDeviceWimax *self)
{
NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
@@ -1434,7 +1419,7 @@ get_property (GObject *object, guint prop_id,
switch (prop_id) {
case PROP_HW_ADDRESS:
nm_device_wimax_get_hw_address (self, &hw_addr);
- g_value_take_string (value, nm_ether_ntop (&hw_addr));
+ g_value_take_string (value, nm_utils_hwaddr_ntoa (&hw_addr, ARPHRD_ETHER));
break;
case PROP_ACTIVE_NSP:
if (priv->current_nsp)
@@ -1526,6 +1511,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *klass)
device_class->act_stage1_prepare = real_act_stage1_prepare;
device_class->act_stage2_config = real_act_stage2_config;
device_class->deactivate = real_deactivate;
+ device_class->set_enabled = real_set_enabled;
+ device_class->hwaddr_matches = hwaddr_matches;
/* Properties */
g_object_class_install_property
diff --git a/src/wimax/nm-device-wimax.h b/src/wimax/nm-device-wimax.h
index d70380acc..a67ff17d0 100644
--- a/src/wimax/nm-device-wimax.h
+++ b/src/wimax/nm-device-wimax.h
@@ -35,6 +35,14 @@ G_BEGIN_DECLS
#define NM_IS_DEVICE_WIMAX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIMAX))
#define NM_DEVICE_WIMAX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxClass))
+typedef enum
+{
+ NM_WIMAX_ERROR_CONNECTION_NOT_WIMAX = 0, /*< nick=ConnectionNotWimax >*/
+ NM_WIMAX_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/
+ NM_WIMAX_ERROR_CONNECTION_INCOMPATIBLE, /*< nick=ConnectionIncompatible >*/
+ NM_WIMAX_ERROR_NSP_NOT_FOUND, /*< nick=NspNotFound >*/
+} NMWimaxError;
+
#define NM_DEVICE_WIMAX_HW_ADDRESS "hw-address"
#define NM_DEVICE_WIMAX_ACTIVE_NSP "active-nsp"
#define NM_DEVICE_WIMAX_CENTER_FREQUENCY "center-frequency"
diff --git a/src/wimax/nm-wimax-factory.c b/src/wimax/nm-wimax-factory.c
new file mode 100644
index 000000000..95cb4bf74
--- /dev/null
+++ b/src/wimax/nm-wimax-factory.c
@@ -0,0 +1,58 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2011 Red Hat, Inc.
+ */
+
+#include <gmodule.h>
+
+#include "nm-device-factory.h"
+#include "nm-device-wimax.h"
+
+G_MODULE_EXPORT GObject *
+nm_device_factory_create_device (GUdevDevice *device,
+ const char *devpath,
+ const char *ifname,
+ const char *driver,
+ GError **error)
+{
+ GObject *dev;
+
+ /* FIXME: check 'DEVTYPE' instead; but since we only support Intel
+ * WiMAX devices for now this is appropriate.
+ */
+ if (g_strcmp0 (driver, "i2400m_usb") != 0)
+ return NULL; /* unsupported */
+
+ dev = (GObject *) nm_device_wimax_new (devpath, ifname, driver);
+ if (dev == NULL)
+ g_set_error_literal (error, 0, 0, "Failed to create WiMAX device.");
+ return dev;
+}
+
+G_MODULE_EXPORT guint32
+nm_device_factory_get_priority (void)
+{
+ return 0;
+}
+
+G_MODULE_EXPORT NMDeviceType
+nm_device_factory_get_type (void)
+{
+ return NM_DEVICE_TYPE_WIMAX;
+}
+
diff --git a/src/wimax/nm-wimax-nsp.c b/src/wimax/nm-wimax-nsp.c
index b10cee399..491cb5da5 100644
--- a/src/wimax/nm-wimax-nsp.c
+++ b/src/wimax/nm-wimax-nsp.c
@@ -118,7 +118,7 @@ nm_wimax_nsp_check_compatible (NMWimaxNsp *self,
priv = GET_PRIVATE (self);
- s_wimax = NM_SETTING_WIMAX (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIMAX));
+ s_wimax = nm_connection_get_setting_wimax (connection);
if (!s_wimax)
return FALSE;
diff --git a/src/wpa.c b/src/wpa.c
deleted file mode 100644
index 7d0e22617..000000000
--- a/src/wpa.c
+++ /dev/null
@@ -1,455 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * WPA Supplicant - WPA state machine and EAPOL-Key processing
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline@cc.hut.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this file may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#include "wireless-helper.h"
-
-#include <stdint.h>
-#include <string.h>
-#include <glib.h>
-
-#include "wpa.h"
-#include "nm-logging.h"
-
-typedef guint16 u16;
-typedef guint8 u8;
-
-#define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
-
-#define BIT(n) (1 << (n))
-#define WPA_CAPABILITY_PREAUTH BIT(0)
-
-#define WPA_REPLAY_COUNTER_LEN 8
-#define WPA_NONCE_LEN 32
-
-#define PMKID_LEN 16
-
-static const int WPA_SELECTOR_LEN = 4;
-static const u8 WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
-static const u16 WPA_VERSION = 1;
-static const u8 WPA_AUTH_KEY_MGMT_NONE[] = { 0x00, 0x50, 0xf2, 0 };
-static const u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[] = { 0x00, 0x50, 0xf2, 1 };
-static const u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[] = { 0x00, 0x50, 0xf2, 2 };
-static const u8 WPA_CIPHER_SUITE_NONE[] = { 0x00, 0x50, 0xf2, 0 };
-static const u8 WPA_CIPHER_SUITE_WEP40[] = { 0x00, 0x50, 0xf2, 1 };
-static const u8 WPA_CIPHER_SUITE_TKIP[] = { 0x00, 0x50, 0xf2, 2 };
-static const u8 WPA_CIPHER_SUITE_WRAP[] = { 0x00, 0x50, 0xf2, 3 };
-static const u8 WPA_CIPHER_SUITE_CCMP[] = { 0x00, 0x50, 0xf2, 4 };
-static const u8 WPA_CIPHER_SUITE_WEP104[] = { 0x00, 0x50, 0xf2, 5 };
-
-/* WPA IE version 1
- * 00-50-f2:1 (OUI:OUI type)
- * 0x01 0x00 (version; little endian)
- * (all following fields are optional:)
- * Group Suite Selector (4 octets) (default: TKIP)
- * Pairwise Suite Count (2 octets, little endian) (default: 1)
- * Pairwise Suite List (4 * n octets) (default: TKIP)
- * Authenticated Key Management Suite Count (2 octets, little endian)
- * (default: 1)
- * Authenticated Key Management Suite List (4 * n octets)
- * (default: unspec 802.1X)
- * WPA Capabilities (2 octets, little endian) (default: 0)
- */
-
-struct wpa_ie_hdr {
- u8 elem_id;
- u8 len;
- u8 oui[3];
- u8 oui_type;
- u8 version[2];
-} __attribute__ ((packed));
-
-
-static const int RSN_SELECTOR_LEN = 4;
-static const u16 RSN_VERSION = 1;
-static const u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X[] = { 0x00, 0x0f, 0xac, 1 };
-static const u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X[] = { 0x00, 0x0f, 0xac, 2 };
-static const u8 RSN_CIPHER_SUITE_NONE[] = { 0x00, 0x0f, 0xac, 0 };
-static const u8 RSN_CIPHER_SUITE_WEP40[] = { 0x00, 0x0f, 0xac, 1 };
-static const u8 RSN_CIPHER_SUITE_TKIP[] = { 0x00, 0x0f, 0xac, 2 };
-static const u8 RSN_CIPHER_SUITE_WRAP[] = { 0x00, 0x0f, 0xac, 3 };
-static const u8 RSN_CIPHER_SUITE_CCMP[] = { 0x00, 0x0f, 0xac, 4 };
-static const u8 RSN_CIPHER_SUITE_WEP104[] = { 0x00, 0x0f, 0xac, 5 };
-
-/* EAPOL-Key Key Data Encapsulation
- * GroupKey and STAKey require encryption, otherwise, encryption is optional.
- */
-static const u8 RSN_KEY_DATA_GROUPKEY[] = { 0x00, 0x0f, 0xac, 1 };
-static const u8 RSN_KEY_DATA_STAKEY[] = { 0x00, 0x0f, 0xac, 2 };
-static const u8 RSN_KEY_DATA_MAC_ADDR[] = { 0x00, 0x0f, 0xac, 3 };
-static const u8 RSN_KEY_DATA_PMKID[] = { 0x00, 0x0f, 0xac, 4 };
-
-/* RSN IE version 1
- * 0x01 0x00 (version; little endian)
- * (all following fields are optional:)
- * Group Suite Selector (4 octets) (default: CCMP)
- * Pairwise Suite Count (2 octets, little endian) (default: 1)
- * Pairwise Suite List (4 * n octets) (default: CCMP)
- * Authenticated Key Management Suite Count (2 octets, little endian)
- * (default: 1)
- * Authenticated Key Management Suite List (4 * n octets)
- * (default: unspec 802.1X)
- * RSN Capabilities (2 octets, little endian) (default: 0)
- * PMKID Count (2 octets) (default: 0)
- * PMKID List (16 * n octets)
- */
-
-struct rsn_ie_hdr {
- u8 elem_id; /* WLAN_EID_RSN */
- u8 len;
- u8 version[2];
-} __attribute__ ((packed));
-
-
-#define WPA_KEY_INFO_TYPE_MASK (BIT(0) | BIT(1) | BIT(2))
-#define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 BIT(0)
-#define WPA_KEY_INFO_TYPE_HMAC_SHA1_AES BIT(1)
-#define WPA_KEY_INFO_KEY_TYPE BIT(3) /* 1 = Pairwise, 0 = Group key */
-/* bit4..5 is used in WPA, but is reserved in IEEE 802.11i/RSN */
-#define WPA_KEY_INFO_KEY_INDEX_MASK (BIT(4) | BIT(5))
-#define WPA_KEY_INFO_KEY_INDEX_SHIFT 4
-#define WPA_KEY_INFO_INSTALL BIT(6) /* pairwise */
-#define WPA_KEY_INFO_TXRX BIT(6) /* group */
-#define WPA_KEY_INFO_ACK BIT(7)
-#define WPA_KEY_INFO_MIC BIT(8)
-#define WPA_KEY_INFO_SECURE BIT(9)
-#define WPA_KEY_INFO_ERROR BIT(10)
-#define WPA_KEY_INFO_REQUEST BIT(11)
-#define WPA_KEY_INFO_ENCR_KEY_DATA BIT(12) /* IEEE 802.11i/RSN only */
-
-
-
-static int wpa_selector_to_bitfield(const u8 *s)
-{
- if (memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_NONE;
- if (memcmp(s, WPA_CIPHER_SUITE_WEP40, WPA_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_WEP40;
- if (memcmp(s, WPA_CIPHER_SUITE_TKIP, WPA_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_TKIP;
- if (memcmp(s, WPA_CIPHER_SUITE_CCMP, WPA_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_CCMP;
- if (memcmp(s, WPA_CIPHER_SUITE_WEP104, WPA_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_WEP104;
- return 0;
-}
-
-
-static int wpa_key_mgmt_to_bitfield(const u8 *s)
-{
- if (memcmp(s, WPA_AUTH_KEY_MGMT_UNSPEC_802_1X, WPA_SELECTOR_LEN) == 0)
- return IW_AUTH_KEY_MGMT_802_1X;
- if (memcmp(s, WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X, WPA_SELECTOR_LEN) ==
- 0)
- return IW_AUTH_KEY_MGMT_PSK;
- if (memcmp(s, WPA_AUTH_KEY_MGMT_NONE, WPA_SELECTOR_LEN) == 0)
- return 0;
- return 0;
-}
-
-
-static int rsn_selector_to_bitfield(const u8 *s)
-{
- if (memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_NONE;
- if (memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_WEP40;
- if (memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_TKIP;
- if (memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_CCMP;
- if (memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == 0)
- return IW_AUTH_CIPHER_WEP104;
- return 0;
-}
-
-
-static int rsn_key_mgmt_to_bitfield(const u8 *s)
-{
- if (memcmp(s, RSN_AUTH_KEY_MGMT_UNSPEC_802_1X, RSN_SELECTOR_LEN) == 0)
- return IW_AUTH_KEY_MGMT_802_1X;
- if (memcmp(s, RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X, RSN_SELECTOR_LEN) ==
- 0)
- return IW_AUTH_KEY_MGMT_PSK;
- return 0;
-}
-
-
-static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len,
- struct wpa_ie_data *data)
-{
- const struct wpa_ie_hdr *hdr;
- const u8 *pos;
- int left;
- int i, count;
-
- data->proto = IW_AUTH_WPA_VERSION_WPA;
- data->pairwise_cipher = IW_AUTH_CIPHER_TKIP;
- data->group_cipher = IW_AUTH_CIPHER_TKIP;
- data->key_mgmt = IW_AUTH_KEY_MGMT_802_1X;
- data->capabilities = 0;
- data->pmkid = NULL;
- data->num_pmkid = 0;
-
- if (wpa_ie_len == 0) {
- /* No WPA IE - fail silently */
- return -1;
- }
-
- if (wpa_ie_len < sizeof(struct wpa_ie_hdr)) {
- nm_log_dbg (LOGD_WIFI, "IE len too short %lu",
- (unsigned long) wpa_ie_len);
- return -1;
- }
-
- hdr = (const struct wpa_ie_hdr *) wpa_ie;
-
- if (hdr->elem_id != WPA_GENERIC_INFO_ELEM ||
- hdr->len != wpa_ie_len - 2 ||
- memcmp(hdr->oui, WPA_OUI_TYPE, WPA_SELECTOR_LEN) != 0 ||
- WPA_GET_LE16(hdr->version) != WPA_VERSION) {
- nm_log_dbg (LOGD_WIFI, "malformed IE or unknown version");
- return -1;
- }
-
- pos = (const u8 *) (hdr + 1);
- left = wpa_ie_len - sizeof(*hdr);
-
- if (left >= WPA_SELECTOR_LEN) {
- data->group_cipher = wpa_selector_to_bitfield(pos);
- pos += WPA_SELECTOR_LEN;
- left -= WPA_SELECTOR_LEN;
- } else if (left > 0) {
- nm_log_dbg (LOGD_WIFI, "IE length mismatch, %u too much", left);
- return -1;
- }
-
- if (left >= 2) {
- data->pairwise_cipher = 0;
- count = WPA_GET_LE16(pos);
- pos += 2;
- left -= 2;
- if (count == 0 || left < count * WPA_SELECTOR_LEN) {
- nm_log_dbg (LOGD_WIFI, "IE count botch (pairwise), "
- "count %u left %u", count, left);
- return -1;
- }
- for (i = 0; i < count; i++) {
- data->pairwise_cipher |= wpa_selector_to_bitfield(pos);
- pos += WPA_SELECTOR_LEN;
- left -= WPA_SELECTOR_LEN;
- }
- } else if (left == 1) {
- nm_log_dbg (LOGD_WIFI, "IE too short (for key mgmt)");
- return -1;
- }
-
- if (left >= 2) {
- data->key_mgmt = 0;
- count = WPA_GET_LE16(pos);
- pos += 2;
- left -= 2;
- if (count == 0 || left < count * WPA_SELECTOR_LEN) {
- nm_log_dbg (LOGD_WIFI, "IE count botch (key mgmt), "
- "count %u left %u", count, left);
- return -1;
- }
- for (i = 0; i < count; i++) {
- data->key_mgmt |= wpa_key_mgmt_to_bitfield(pos);
- pos += WPA_SELECTOR_LEN;
- left -= WPA_SELECTOR_LEN;
- }
- } else if (left == 1) {
- nm_log_dbg (LOGD_WIFI, "IE too short (for capabilities)");
- return -1;
- }
-
- if (left >= 2) {
- if (WPA_GET_LE16 (pos) & WPA_CAPABILITY_PREAUTH)
- data->capabilities |= IW_PMKID_CAND_PREAUTH;
- pos += 2;
- left -= 2;
- }
-
- if (left > 0) {
- nm_log_dbg (LOGD_WIFI, "IE has %u trailing bytes", left);
- return -1;
- }
-
- return 0;
-}
-
-
-static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
- struct wpa_ie_data *data)
-{
- const struct rsn_ie_hdr *hdr;
- const u8 *pos;
- int left;
- int i, count;
-
- data->proto = IW_AUTH_WPA_VERSION_WPA2;
- data->pairwise_cipher = IW_AUTH_CIPHER_CCMP;
- data->group_cipher = IW_AUTH_CIPHER_CCMP;
- data->key_mgmt = IW_AUTH_KEY_MGMT_802_1X;
- data->capabilities = 0;
- data->pmkid = NULL;
- data->num_pmkid = 0;
-
- if (rsn_ie_len == 0) {
- /* No RSN IE - fail silently */
- return -1;
- }
-
- if (rsn_ie_len < sizeof(struct rsn_ie_hdr)) {
- nm_log_dbg (LOGD_WIFI, "IE len too short %lu",
- (unsigned long) rsn_ie_len);
- return -1;
- }
-
- hdr = (const struct rsn_ie_hdr *) rsn_ie;
-
- if (hdr->elem_id != WPA_RSN_INFO_ELEM ||
- hdr->len != rsn_ie_len - 2 ||
- WPA_GET_LE16(hdr->version) != RSN_VERSION) {
- nm_log_dbg (LOGD_WIFI, "malformed IE or unknown version");
- return -1;
- }
-
- pos = (const u8 *) (hdr + 1);
- left = rsn_ie_len - sizeof(*hdr);
-
- if (left >= RSN_SELECTOR_LEN) {
- data->group_cipher = rsn_selector_to_bitfield(pos);
- pos += RSN_SELECTOR_LEN;
- left -= RSN_SELECTOR_LEN;
- } else if (left > 0) {
- nm_log_dbg (LOGD_WIFI, "IE length mismatch, %u too much", left);
- return -1;
- }
-
- if (left >= 2) {
- data->pairwise_cipher = 0;
- count = WPA_GET_LE16(pos);
- pos += 2;
- left -= 2;
- if (count == 0 || left < count * RSN_SELECTOR_LEN) {
- nm_log_dbg (LOGD_WIFI, "IE count botch (pairwise), "
- "count %u left %u", count, left);
- return -1;
- }
- for (i = 0; i < count; i++) {
- data->pairwise_cipher |= rsn_selector_to_bitfield(pos);
- pos += RSN_SELECTOR_LEN;
- left -= RSN_SELECTOR_LEN;
- }
- } else if (left == 1) {
- nm_log_dbg (LOGD_WIFI, "IE too short (for key mgmt)");
- return -1;
- }
-
- if (left >= 2) {
- data->key_mgmt = 0;
- count = WPA_GET_LE16(pos);
- pos += 2;
- left -= 2;
- if (count == 0 || left < count * RSN_SELECTOR_LEN) {
- nm_log_dbg (LOGD_WIFI, "IE count botch (key mgmt), "
- "count %u left %u", count, left);
- return -1;
- }
- for (i = 0; i < count; i++) {
- data->key_mgmt |= rsn_key_mgmt_to_bitfield(pos);
- pos += RSN_SELECTOR_LEN;
- left -= RSN_SELECTOR_LEN;
- }
- } else if (left == 1) {
- nm_log_dbg (LOGD_WIFI, "IE too short (for capabilities)");
- return -1;
- }
-
- if (left >= 2) {
- if (WPA_GET_LE16 (pos) & WPA_CAPABILITY_PREAUTH)
- data->capabilities |= IW_PMKID_CAND_PREAUTH;
- pos += 2;
- left -= 2;
- }
-
- if (left >= 2) {
- data->num_pmkid = WPA_GET_LE16(pos);
- pos += 2;
- left -= 2;
- if (left < data->num_pmkid * PMKID_LEN) {
- nm_log_dbg (LOGD_WIFI, "PMKID underflow "
- "(num_pmkid=%d left=%d)",
- data->num_pmkid, left);
- data->num_pmkid = 0;
- } else {
- data->pmkid = pos;
- pos += data->num_pmkid * PMKID_LEN;
- left -= data->num_pmkid * PMKID_LEN;
- }
- }
-
- if (left > 0) {
- nm_log_dbg (LOGD_WIFI, "IE has %u trailing bytes - ignored", left);
- }
-
- return 0;
-}
-
-
-/**
- * wpa_parse_wpa_ie - Parse WPA/RSN IE
- * @wpa_ie: Pointer to WPA or RSN IE
- * @wpa_ie_len: Length of the WPA/RSN IE
- * @data: Pointer to data area for parsing results
- * Returns: parsed results on success, NULL on failure
- *
- * Parse the contents of WPA or RSN IE and write the parsed data into data.
- */
-wpa_ie_data * wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len)
-{
- wpa_ie_data *data = NULL;
- int err = -1;
-
- if (!wpa_ie || wpa_ie_len <= 0)
- return NULL;
-
- data = g_slice_new0 (wpa_ie_data);
-
- if (wpa_ie_len >= 1 && wpa_ie[0] == WPA_RSN_INFO_ELEM)
- err = wpa_parse_wpa_ie_rsn(wpa_ie, wpa_ie_len, data);
- else
- err = wpa_parse_wpa_ie_wpa(wpa_ie, wpa_ie_len, data);
-
- if (err != 0) {
- g_slice_free (wpa_ie_data, data);
- data = NULL;
- }
-
- if (data) {
- nm_log_dbg (LOGD_WIFI, "WPA IE: -------------------");
- nm_log_dbg (LOGD_WIFI, " proto 0x%X", data->proto);
- nm_log_dbg (LOGD_WIFI, " pw cipher 0x%X", data->pairwise_cipher);
- nm_log_dbg (LOGD_WIFI, " gr cipher 0x%X", data->group_cipher);
- nm_log_dbg (LOGD_WIFI, " key mgmt 0x%X", data->key_mgmt);
- nm_log_dbg (LOGD_WIFI, " capabilities 0x%X", data->capabilities);
- nm_log_dbg (LOGD_WIFI, " # pmkid 0x%X", data->num_pmkid);
- nm_log_dbg (LOGD_WIFI, " ");
- }
-
- return data;
-}
-
diff --git a/src/wpa.h b/src/wpa.h
deleted file mode 100644
index 18d1dbee9..000000000
--- a/src/wpa.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * wpa_supplicant - WPA definitions
- * Copyright (c) 2003-2005, Jouni Malinen <jkmaline@cc.hut.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this file may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#ifndef WPA_H
-#define WPA_H
-
-#include <stdint.h>
-
-#define WPA_GENERIC_INFO_ELEM 0xdd
-#define WPA_RSN_INFO_ELEM 0x30
-
-#define WPA_MAX_IE_LEN 40
-
-typedef struct wpa_ie_data {
- int proto;
- int pairwise_cipher;
- int group_cipher;
- int key_mgmt;
- int capabilities;
- int num_pmkid;
- const uint8_t *pmkid;
-} wpa_ie_data;
-
-
-wpa_ie_data * wpa_parse_wpa_ie (const uint8_t *wpa_ie, size_t wpa_ie_len);
-
-#endif /* WPA_H */
diff --git a/test/Makefile.am b/test/Makefile.am
index 7bdaf0db9..b62853676 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,9 @@
INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-glib \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include
AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
diff --git a/test/Makefile.in b/test/Makefile.in
index f8d7cfa3c..bb988be94 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -160,6 +160,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -214,11 +216,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -229,6 +235,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -268,6 +275,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -333,8 +342,10 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/libnm-util \
+ -I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-glib \
- -I${top_srcdir}/include
+ -I${top_srcdir}/include \
+ -I${top_builddir}/include
AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
diff --git a/test/nm-tool.c b/test/nm-tool.c
index 9ce44f88a..d8c75cee6 100644
--- a/test/nm-tool.c
+++ b/test/nm-tool.c
@@ -627,7 +627,7 @@ detail_vpn (gpointer data, gpointer user_data)
connection = get_connection_for_active (active);
g_return_if_fail (connection != NULL);
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
g_return_if_fail (s_con != NULL);
print_header ("VPN", NULL, nm_setting_connection_get_id (s_con));
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 09a3f0edd..dbbe18c63 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1 +1 @@
-EXTRA_DIST = doc-generator.xsl check-exports.sh
+EXTRA_DIST = doc-generator.xsl check-exports.sh glib-mkenums
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 619c2cb5a..29ec3eeba 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -107,6 +107,8 @@ GIO_LIBS = @GIO_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
+GLIB_MAKEFILE = @GLIB_MAKEFILE@
+GLIB_MKENUMS = @GLIB_MKENUMS@
GMODULE_CFLAGS = @GMODULE_CFLAGS@
GMODULE_LIBS = @GMODULE_LIBS@
GMSGFMT = @GMSGFMT@
@@ -161,11 +163,15 @@ LIBNL2_LIBS = @LIBNL2_LIBS@
LIBNL3_CFLAGS = @LIBNL3_CFLAGS@
LIBNL3_LIBS = @LIBNL3_LIBS@
LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_GENL3_CFLAGS = @LIBNL_GENL3_CFLAGS@
+LIBNL_GENL3_LIBS = @LIBNL_GENL3_LIBS@
LIBNL_LIBS = @LIBNL_LIBS@
LIBNL_ROUTE3_CFLAGS = @LIBNL_ROUTE3_CFLAGS@
LIBNL_ROUTE3_LIBS = @LIBNL_ROUTE3_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
+LIBSOUP_LIBS = @LIBSOUP_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
@@ -176,6 +182,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
+MOC = @MOC@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
@@ -215,6 +222,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+SYSTEMD_LIBS = @SYSTEMD_LIBS@
SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
UDEV_BASE_DIR = @UDEV_BASE_DIR@
USE_NLS = @USE_NLS@
@@ -278,7 +287,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = doc-generator.xsl check-exports.sh
+EXTRA_DIST = doc-generator.xsl check-exports.sh glib-mkenums
all: all-am
.SUFFIXES:
diff --git a/tools/glib-mkenums b/tools/glib-mkenums
new file mode 100755
index 000000000..470f0939b
--- /dev/null
+++ b/tools/glib-mkenums
@@ -0,0 +1,570 @@
+#! /usr/bin/perl
+
+# This is glib-mkenums from glib 2.31.17, which adds the
+# --identifier-prefix and --symbol-prefix arguments which
+# are needed to correctly parse NM's enum names. It can
+# go away when NetworkManager depends on glib >= 2.32
+
+use warnings;
+use File::Basename;
+use Safe;
+
+# glib-mkenums.pl
+# Information about the current enumeration
+my $flags; # Is enumeration a bitmask?
+my $option_underscore_name; # Overriden underscore variant of the enum name
+ # for example to fix the cases we don't get the
+ # mixed-case -> underscorized transform right.
+my $option_lowercase_name; # DEPRECATED. A lower case name to use as part
+ # of the *_get_type() function, instead of the
+ # one that we guess. For instance, when an enum
+ # uses abnormal capitalization and we can not
+ # guess where to put the underscores.
+my $seenbitshift; # Have we seen bitshift operators?
+my $enum_prefix; # Prefix for this enumeration
+my $enumname; # Name for this enumeration
+my $enumshort; # $enumname without prefix
+my $enumname_prefix; # prefix of $enumname
+my $enumindex = 0; # Global enum counter
+my $firstenum = 1; # Is this the first enumeration per file?
+my @entries; # [ $name, $val ] for each entry
+my $sandbox = Safe->new; # sandbox for safe evaluation of expressions
+
+sub parse_trigraph {
+ my $opts = shift;
+ my @opts;
+
+ for $opt (split /\s*,\s*/, $opts) {
+ $opt =~ s/^\s*//;
+ $opt =~ s/\s*$//;
+ my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/;
+ defined $val or $val = 1;
+ push @opts, $key, $val;
+ }
+ @opts;
+}
+sub parse_entries {
+ my $file = shift;
+ my $file_name = shift;
+ my $looking_for_name = 0;
+
+ while (<$file>) {
+ # read lines until we have no open comments
+ while (m@/\*([^*]|\*(?!/))*$@) {
+ my $new;
+ defined ($new = <$file>) || die "Unmatched comment in $ARGV";
+ $_ .= $new;
+ }
+ # strip comments w/o options
+ s@/\*(?!<)
+ ([^*]+|\*(?!/))*
+ \*/@@gx;
+
+ # strip newlines
+ s@\n@ @;
+
+ # skip empty lines
+ next if m@^\s*$@;
+
+ if ($looking_for_name) {
+ if (/^\s*(\w+)/) {
+ $enumname = $1;
+ return 1;
+ }
+ }
+
+ # Handle include files
+ if (/^\#include\s*<([^>]*)>/ ) {
+ my $file= "../$1";
+ open NEWFILE, $file or die "Cannot open include file $file: $!\n";
+
+ if (parse_entries (\*NEWFILE, $NEWFILE)) {
+ return 1;
+ } else {
+ next;
+ }
+ }
+
+ if (/^\s*\}\s*(\w+)/) {
+ $enumname = $1;
+ $enumindex++;
+ return 1;
+ }
+
+ if (/^\s*\}/) {
+ $enumindex++;
+ $looking_for_name = 1;
+ next;
+ }
+
+ if (m@^\s*
+ (\w+)\s* # name
+ (?:=( # value
+ \s*\w+\s*\(.*\)\s* # macro with multiple args
+ | # OR
+ (?:[^,/]|/(?!\*))* # anything but a comma or comment
+ ))?,?\s*
+ (?:/\*< # options
+ (([^*]|\*(?!/))*)
+ >\s*\*/)?,?
+ \s*$
+ @x) {
+ my ($name, $value, $options) = ($1,$2,$3);
+
+ if (!defined $flags && defined $value && $value =~ /<</) {
+ $seenbitshift = 1;
+ }
+
+ if (defined $options) {
+ my %options = parse_trigraph($options);
+ if (!defined $options{skip}) {
+ push @entries, [ $name, $value, $options{nick} ];
+ }
+ } else {
+ push @entries, [ $name, $value ];
+ }
+ } elsif (m@^\s*\#@) {
+ # ignore preprocessor directives
+ } else {
+ print STDERR "$0: $file_name:$.: Failed to parse `$_'\n";
+ }
+ }
+
+ return 0;
+}
+
+sub version {
+ print "glib-mkenums version glib-2.31.17\n";
+ print "glib-mkenums comes with ABSOLUTELY NO WARRANTY.\n";
+ print "You may redistribute copies of glib-mkenums under the terms of\n";
+ print "the GNU General Public License which can be found in the\n";
+ print "GLib source package. Sources, examples and contact\n";
+ print "information are available at http://www.gtk.org\n";
+ exit 0;
+}
+sub usage {
+ print "Usage:\n";
+ print " glib-mkenums [OPTION...] [FILES...]\n\n";
+ print "Help Options:\n";
+ print " -h, --help Show this help message\n\n";
+ print "Utility Options:\n";
+ print " --identifier-prefix <text> Identifier prefix\n";
+ print " --symbol-prefix <text> Symbol prefix\n";
+ print " --fhead <text> Output file header\n";
+ print " --fprod <text> Per input file production\n";
+ print " --ftail <text> Output file trailer\n";
+ print " --eprod <text> Per enum text (produced prior to value itarations)\n";
+ print " --vhead <text> Value header, produced before iterating over enum values\n";
+ print " --vprod <text> Value text, produced for each enum value\n";
+ print " --vtail <text> Value tail, produced after iterating over enum values\n";
+ print " --comments <text> Comment structure\n";
+ print " --template file Template file\n";
+ print " -v, --version Print version informations\n\n";
+ print "Production text substitutions:\n";
+ print " \@EnumName\@ PrefixTheXEnum\n";
+ print " \@enum_name\@ prefix_the_xenum\n";
+ print " \@ENUMNAME\@ PREFIX_THE_XENUM\n";
+ print " \@ENUMSHORT\@ THE_XENUM\n";
+ print " \@ENUMPREFIX\@ PREFIX\n";
+ print " \@VALUENAME\@ PREFIX_THE_XVALUE\n";
+ print " \@valuenick\@ the-xvalue\n";
+ print " \@valuenum\@ the integer value (limited support, Since: 2.26)\n";
+ print " \@type\@ either enum or flags\n";
+ print " \@Type\@ either Enum or Flags\n";
+ print " \@TYPE\@ either ENUM or FLAGS\n";
+ print " \@filename\@ name of current input file\n";
+ print " \@basename\@ base name of the current input file (Since: 2.22)\n";
+ exit 0;
+}
+
+# production variables:
+my $idprefix = ""; # "G", "Gtk", etc
+my $symprefix = ""; # "g", "gtk", etc, if not just lc($idprefix)
+my $fhead = ""; # output file header
+my $fprod = ""; # per input file production
+my $ftail = ""; # output file trailer
+my $eprod = ""; # per enum text (produced prior to value itarations)
+my $vhead = ""; # value header, produced before iterating over enum values
+my $vprod = ""; # value text, produced for each enum value
+my $vtail = ""; # value tail, produced after iterating over enum values
+my $comment_tmpl = ""; # comment template
+
+sub read_template_file {
+ my ($file) = @_;
+ my %tmpl = ('file-header', $fhead,
+ 'file-production', $fprod,
+ 'file-tail', $ftail,
+ 'enumeration-production', $eprod,
+ 'value-header', $vhead,
+ 'value-production', $vprod,
+ 'value-tail', $vtail,
+ 'comment', $comment_tmpl);
+ my $in = 'junk';
+ open (FILE, $file) || die "Can't open $file: $!\n";
+ while (<FILE>) {
+ if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) {
+ if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) {
+ $in = $2;
+ next;
+ }
+ elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) {
+ $in = 'junk';
+ next;
+ } else {
+ die "Malformed template file $file\n";
+ }
+ }
+ if (!($in eq 'junk')) {
+ $tmpl{$in} .= $_;
+ }
+ }
+ close (FILE);
+ if (!($in eq 'junk')) {
+ die "Malformed template file $file\n";
+ }
+ $fhead = $tmpl{'file-header'};
+ $fprod = $tmpl{'file-production'};
+ $ftail = $tmpl{'file-tail'};
+ $eprod = $tmpl{'enumeration-production'};
+ $vhead = $tmpl{'value-header'};
+ $vprod = $tmpl{'value-production'};
+ $vtail = $tmpl{'value-tail'};
+ $comment_tmpl = $tmpl{'comment'};
+
+ # default to C-style comments
+ $comment_tmpl = "/* \@comment\@ */" if $comment_tmpl eq "";
+}
+
+if (!defined $ARGV[0]) {
+ usage;
+}
+while ($_=$ARGV[0],/^-/) {
+ shift;
+ last if /^--$/;
+ if (/^--template$/) { read_template_file (shift); }
+ elsif (/^--identifier-prefix$/) { $idprefix = shift }
+ elsif (/^--symbol-prefix$/) { $symprefix = shift }
+ elsif (/^--fhead$/) { $fhead = $fhead . shift }
+ elsif (/^--fprod$/) { $fprod = $fprod . shift }
+ elsif (/^--ftail$/) { $ftail = $ftail . shift }
+ elsif (/^--eprod$/) { $eprod = $eprod . shift }
+ elsif (/^--vhead$/) { $vhead = $vhead . shift }
+ elsif (/^--vprod$/) { $vprod = $vprod . shift }
+ elsif (/^--vtail$/) { $vtail = $vtail . shift }
+ elsif (/^--comments$/) { $comment_tmpl = shift }
+ elsif (/^--help$/ || /^-h$/ || /^-\?$/) { usage; }
+ elsif (/^--version$/ || /^-v$/) { version; }
+ else { usage; }
+ last if not defined($ARGV[0]);
+}
+
+# put auto-generation comment
+{
+ my $comment = $comment_tmpl;
+ $comment =~ s/\@comment\@/Generated data (by glib-mkenums)/;
+ print "\n" . $comment . "\n\n";
+}
+
+if (length($fhead)) {
+ my $prod = $fhead;
+ my $base = basename ($ARGV[0]);
+
+ $prod =~ s/\@filename\@/$ARGV[0]/g;
+ $prod =~ s/\@basename\@/$base/g;
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ chomp ($prod);
+
+ print "$prod\n";
+}
+
+while (<>) {
+ if (eof) {
+ close (ARGV); # reset line numbering
+ $firstenum = 1; # Flag to print filename at next enum
+ }
+
+ # read lines until we have no open comments
+ while (m@/\*([^*]|\*(?!/))*$@) {
+ my $new;
+ defined ($new = <>) || die "Unmatched comment in $ARGV";
+ $_ .= $new;
+ }
+ # strip comments w/o options
+ s@/\*(?!<)
+ ([^*]+|\*(?!/))*
+ \*/@@gx;
+
+ # ignore forward declarations
+ next if /^\s*typedef\s+enum.*;/;
+
+ if (m@^\s*typedef\s+enum\s*
+ ({)?\s*
+ (?:/\*<
+ (([^*]|\*(?!/))*)
+ >\s*\*/)?
+ \s*({)?
+ @x) {
+ if (defined $2) {
+ my %options = parse_trigraph ($2);
+ next if defined $options{skip};
+ $enum_prefix = $options{prefix};
+ $flags = $options{flags};
+ $option_lowercase_name = $options{lowercase_name};
+ $option_underscore_name = $options{underscore_name};
+ } else {
+ $enum_prefix = undef;
+ $flags = undef;
+ $option_lowercase_name = undef;
+ $option_underscore_name = undef;
+ }
+ if (defined $option_lowercase_name) {
+ if (defined $option_underscore_name) {
+ print STDERR "$0: $ARGV:$.: lowercase_name overriden with underscore_name\n";
+ $option_lowercase_name = undef;
+ } else {
+ print STDERR "$0: $ARGV:$.: lowercase_name is deprecated, use underscore_name\n";
+ }
+ }
+ # Didn't have trailing '{' look on next lines
+ if (!defined $1 && !defined $4) {
+ while (<>) {
+ if (eof) {
+ die "Hit end of file while parsing enum in $ARGV";
+ }
+ if (s/^\s*\{//) {
+ last;
+ }
+ }
+ }
+
+ $seenbitshift = 0;
+ @entries = ();
+
+ # Now parse the entries
+ parse_entries (\*ARGV, $ARGV);
+
+ # figure out if this was a flags or enums enumeration
+ if (!defined $flags) {
+ $flags = $seenbitshift;
+ }
+
+ # Autogenerate a prefix
+ if (!defined $enum_prefix) {
+ for (@entries) {
+ my $nick = $_->[2];
+ if (!defined $nick) {
+ my $name = $_->[0];
+ if (defined $enum_prefix) {
+ my $tmp = ~ ($name ^ $enum_prefix);
+ ($tmp) = $tmp =~ /(^\xff*)/;
+ $enum_prefix = $enum_prefix & $tmp;
+ } else {
+ $enum_prefix = $name;
+ }
+ }
+ }
+ if (!defined $enum_prefix) {
+ $enum_prefix = "";
+ } else {
+ # Trim so that it ends in an underscore
+ $enum_prefix =~ s/_[^_]*$/_/;
+ }
+ } else {
+ # canonicalize user defined prefixes
+ $enum_prefix = uc($enum_prefix);
+ $enum_prefix =~ s/-/_/g;
+ $enum_prefix =~ s/(.*)([^_])$/$1$2_/;
+ }
+
+ for $entry (@entries) {
+ my ($name,$num,$nick) = @{$entry};
+ if (!defined $nick) {
+ ($nick = $name) =~ s/^$enum_prefix//;
+ $nick =~ tr/_/-/;
+ $nick = lc($nick);
+ @{$entry} = ($name, $num, $nick);
+ }
+ }
+
+
+ # Spit out the output
+ if (defined $option_underscore_name) {
+ $enumlong = uc $option_underscore_name;
+ $enumsym = lc $option_underscore_name;
+ $enumshort = $enumlong;
+ $enumshort =~ s/^[A-Z][A-Z0-9]*_//;
+
+ $enumname_prefix = $enumlong;
+ $enumname_prefix =~ s/_$enumshort$//;
+ } elsif (!$symprefix && !$idprefix) {
+ # enumname is e.g. GMatchType
+ $enspace = $enumname;
+ $enspace =~ s/^([A-Z][a-z]*).*$/$1/;
+
+ $enumshort = $enumname;
+ $enumshort =~ s/^[A-Z][a-z]*//;
+ $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g;
+ $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
+ $enumshort = uc($enumshort);
+
+ $enumname_prefix = $enumname;
+ $enumname_prefix =~ s/^([A-Z][a-z]*).*$/$1/;
+ $enumname_prefix = uc($enumname_prefix);
+
+ $enumlong = uc($enspace) . "_" . $enumshort;
+ $enumsym = lc($enspace) . "_" . lc($enumshort);
+
+ if (defined($option_lowercase_name)) {
+ $enumsym = $option_lowercase_name;
+ }
+ } else {
+ $enumshort = $enumname;
+ if ($idprefix) {
+ $enumshort =~ s/^${idprefix}//;
+ } else {
+ $enumshort =~ s/^[A-Z][a-z]*//;
+ }
+ $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g;
+ $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
+ $enumshort = uc($enumshort);
+
+ $enumname_prefix = $symprefix && uc($symprefix) || uc($idprefix);
+
+ $enumlong = $enumname_prefix . "_" . $enumshort;
+ $enumsym = lc($enumlong);
+ }
+
+ if ($firstenum) {
+ $firstenum = 0;
+
+ if (length($fprod)) {
+ my $prod = $fprod;
+ my $base = basename ($ARGV);
+
+ $prod =~ s/\@filename\@/$ARGV/g;
+ $prod =~ s/\@basename\@/$base/g;
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ chomp ($prod);
+
+ print "$prod\n";
+ }
+ }
+
+ if (length($eprod)) {
+ my $prod = $eprod;
+
+ $prod =~ s/\@enum_name\@/$enumsym/g;
+ $prod =~ s/\@EnumName\@/$enumname/g;
+ $prod =~ s/\@ENUMSHORT\@/$enumshort/g;
+ $prod =~ s/\@ENUMNAME\@/$enumlong/g;
+ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g;
+ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; }
+ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; }
+ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; }
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ chomp ($prod);
+
+ print "$prod\n";
+ }
+
+ if (length($vhead)) {
+ my $prod = $vhead;
+
+ $prod =~ s/\@enum_name\@/$enumsym/g;
+ $prod =~ s/\@EnumName\@/$enumname/g;
+ $prod =~ s/\@ENUMSHORT\@/$enumshort/g;
+ $prod =~ s/\@ENUMNAME\@/$enumlong/g;
+ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g;
+ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; }
+ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; }
+ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; }
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ chomp ($prod);
+
+ print "$prod\n";
+ }
+
+ if (length($vprod)) {
+ my $prod = $vprod;
+ my $next_num = 0;
+
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ for (@entries) {
+ my ($name,$num,$nick) = @{$_};
+ my $tmp_prod = $prod;
+
+ if ($prod =~ /\@valuenum\@/) {
+ # only attempt to eval the value if it is requested
+ # this prevents us from throwing errors otherwise
+ if (defined $num) {
+ # use sandboxed perl evaluation as a reasonable
+ # approximation to C constant folding
+ $num = $sandbox->reval ($num);
+
+ # make sure it parsed to an integer
+ if (!defined $num or $num !~ /^-?\d+$/) {
+ die "Unable to parse enum value '$num'";
+ }
+ } else {
+ $num = $next_num;
+ }
+
+ $tmp_prod =~ s/\@valuenum\@/$num/g;
+ $next_num = $num + 1;
+ }
+
+ $tmp_prod =~ s/\@VALUENAME\@/$name/g;
+ $tmp_prod =~ s/\@valuenick\@/$nick/g;
+ if ($flags) { $tmp_prod =~ s/\@type\@/flags/g; } else { $tmp_prod =~ s/\@type\@/enum/g; }
+ if ($flags) { $tmp_prod =~ s/\@Type\@/Flags/g; } else { $tmp_prod =~ s/\@Type\@/Enum/g; }
+ if ($flags) { $tmp_prod =~ s/\@TYPE\@/FLAGS/g; } else { $tmp_prod =~ s/\@TYPE\@/ENUM/g; }
+ chomp ($tmp_prod);
+
+ print "$tmp_prod\n";
+ }
+ }
+
+ if (length($vtail)) {
+ my $prod = $vtail;
+
+ $prod =~ s/\@enum_name\@/$enumsym/g;
+ $prod =~ s/\@EnumName\@/$enumname/g;
+ $prod =~ s/\@ENUMSHORT\@/$enumshort/g;
+ $prod =~ s/\@ENUMNAME\@/$enumlong/g;
+ $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g;
+ if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; }
+ if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; }
+ if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; }
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ chomp ($prod);
+
+ print "$prod\n";
+ }
+ }
+}
+
+if (length($ftail)) {
+ my $prod = $ftail;
+ my $base = basename ($ARGV);
+
+ $prod =~ s/\@filename\@/$ARGV/g;
+ $prod =~ s/\@basename\@/$base/g;
+ $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
+ $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
+ chomp ($prod);
+
+ print "$prod\n";
+}
+
+# put auto-generation comment
+{
+ my $comment = $comment_tmpl;
+ $comment =~ s/\@comment\@/Generated data ends here/;
+ print "\n" . $comment . "\n\n";
+}