From 7d8baf4ac0480a542f000c1201df85427a22332c Mon Sep 17 00:00:00 2001 From: Jeremy Bicha Date: Tue, 8 Feb 2022 12:07:45 -0500 Subject: New upstream version 1.35.90 --- CONTRIBUTING.md | 34 +- Makefile.am | 85 +- Makefile.in | 388 +- NEWS | 56 +- TODO | 24 +- config.h.in | 3 + config.h.meson | 3 + configure | 58 +- configure.ac | 23 +- docs/api/Makefile.in | 2 + docs/api/html/NetworkManager-dispatcher.html | 4 +- docs/api/html/NetworkManager.conf.html | 46 +- docs/api/html/NetworkManager.devhelp2 | 1 + docs/api/html/NetworkManager.html | 4 +- docs/api/html/ch01.html | 4 +- docs/api/html/dbus-secret-agent.html | 4 +- docs/api/html/dbus-types.html | 4 +- docs/api/html/dbus-vpn-plugin.html | 4 +- docs/api/html/dbus-vpn-types.html | 4 +- ...org.freedesktop.NetworkManager.AccessPoint.html | 4 +- ...rg.freedesktop.NetworkManager.AgentManager.html | 4 +- ...-org.freedesktop.NetworkManager.Checkpoint.html | 4 +- ...eedesktop.NetworkManager.Connection.Active.html | 4 +- ...org.freedesktop.NetworkManager.DHCP4Config.html | 4 +- ...org.freedesktop.NetworkManager.DHCP6Config.html | 4 +- ...org.freedesktop.NetworkManager.Device.Adsl.html | 4 +- ...reedesktop.NetworkManager.Device.Bluetooth.html | 4 +- ...org.freedesktop.NetworkManager.Device.Bond.html | 4 +- ...g.freedesktop.NetworkManager.Device.Bridge.html | 4 +- ...rg.freedesktop.NetworkManager.Device.Dummy.html | 4 +- ....freedesktop.NetworkManager.Device.Generic.html | 4 +- ...freedesktop.NetworkManager.Device.IPTunnel.html | 4 +- ...eedesktop.NetworkManager.Device.Infiniband.html | 4 +- ...g.freedesktop.NetworkManager.Device.Lowpan.html | 4 +- ...g.freedesktop.NetworkManager.Device.Macsec.html | 4 +- ....freedesktop.NetworkManager.Device.Macvlan.html | 4 +- ...rg.freedesktop.NetworkManager.Device.Modem.html | 4 +- ...freedesktop.NetworkManager.Device.OlpcMesh.html | 4 +- ...reedesktop.NetworkManager.Device.OvsBridge.html | 4 +- ...desktop.NetworkManager.Device.OvsInterface.html | 4 +- ....freedesktop.NetworkManager.Device.OvsPort.html | 4 +- ...-org.freedesktop.NetworkManager.Device.Ppp.html | 4 +- ...eedesktop.NetworkManager.Device.Statistics.html | 4 +- ...org.freedesktop.NetworkManager.Device.Team.html | 4 +- ...-org.freedesktop.NetworkManager.Device.Tun.html | 4 +- ...org.freedesktop.NetworkManager.Device.Veth.html | 4 +- ...org.freedesktop.NetworkManager.Device.Vlan.html | 4 +- ...-org.freedesktop.NetworkManager.Device.Vrf.html | 4 +- ...rg.freedesktop.NetworkManager.Device.Vxlan.html | 4 +- ....freedesktop.NetworkManager.Device.WifiP2P.html | 4 +- ...reedesktop.NetworkManager.Device.WireGuard.html | 4 +- ...rg.freedesktop.NetworkManager.Device.Wired.html | 4 +- ...freedesktop.NetworkManager.Device.Wireless.html | 4 +- ...org.freedesktop.NetworkManager.Device.Wpan.html | 4 +- ...dbus-org.freedesktop.NetworkManager.Device.html | 4 +- ...-org.freedesktop.NetworkManager.DnsManager.html | 4 +- ...s-org.freedesktop.NetworkManager.IP4Config.html | 4 +- ...s-org.freedesktop.NetworkManager.IP6Config.html | 4 +- .../gdbus-org.freedesktop.NetworkManager.PPP.html | 4 +- ...org.freedesktop.NetworkManager.SecretAgent.html | 4 +- ...desktop.NetworkManager.Settings.Connection.html | 4 +- ...us-org.freedesktop.NetworkManager.Settings.html | 4 +- ....freedesktop.NetworkManager.VPN.Connection.html | 4 +- ...-org.freedesktop.NetworkManager.VPN.Plugin.html | 4 +- ...org.freedesktop.NetworkManager.WifiP2PPeer.html | 4 +- .../html/gdbus-org.freedesktop.NetworkManager.html | 4 +- docs/api/html/index.html | 6 +- docs/api/html/ix01.html | 6 +- docs/api/html/license.html | 4 +- docs/api/html/manpages.html | 4 +- docs/api/html/nm-cloud-setup.html | 4 +- docs/api/html/nm-dbus-types.html | 19 +- docs/api/html/nm-initrd-generator.html | 13 +- docs/api/html/nm-online.html | 4 +- docs/api/html/nm-openvswitch.html | 4 +- docs/api/html/nm-settings-dbus.html | 17 +- docs/api/html/nm-settings-ifcfg-rh.html | 6 +- docs/api/html/nm-settings-keyfile.html | 4 +- docs/api/html/nm-settings-nmcli.html | 18 +- docs/api/html/nm-vpn-dbus-types.html | 4 +- docs/api/html/nmcli-examples.html | 4 +- docs/api/html/nmcli.html | 4 +- docs/api/html/nmtui.html | 4 +- docs/api/html/ref-dbus-access-points.html | 4 +- docs/api/html/ref-dbus-active-connections.html | 4 +- docs/api/html/ref-dbus-agent-manager.html | 4 +- docs/api/html/ref-dbus-checkpoint.html | 4 +- docs/api/html/ref-dbus-devices.html | 4 +- docs/api/html/ref-dbus-dhcp4-configs.html | 4 +- docs/api/html/ref-dbus-dhcp6-configs.html | 4 +- docs/api/html/ref-dbus-dns-manager.html | 4 +- docs/api/html/ref-dbus-ip4-configs.html | 4 +- docs/api/html/ref-dbus-ip6-configs.html | 4 +- docs/api/html/ref-dbus-manager.html | 4 +- docs/api/html/ref-dbus-settings-manager.html | 4 +- docs/api/html/ref-dbus-settings.html | 4 +- docs/api/html/ref-dbus-wifi-p2p-peers.html | 4 +- docs/api/html/ref-settings.html | 4 +- docs/api/html/secret-agents.html | 4 +- docs/api/html/secrets-flags.html | 4 +- docs/api/html/settings-6lowpan.html | 4 +- docs/api/html/settings-802-11-olpc-mesh.html | 4 +- .../html/settings-802-11-wireless-security.html | 4 +- docs/api/html/settings-802-11-wireless.html | 4 +- docs/api/html/settings-802-1x.html | 4 +- docs/api/html/settings-802-3-ethernet.html | 4 +- docs/api/html/settings-adsl.html | 4 +- docs/api/html/settings-bluetooth.html | 4 +- docs/api/html/settings-bond-port.html | 4 +- docs/api/html/settings-bond.html | 4 +- docs/api/html/settings-bridge-port.html | 4 +- docs/api/html/settings-bridge.html | 4 +- docs/api/html/settings-cdma.html | 4 +- docs/api/html/settings-connection.html | 4 +- docs/api/html/settings-dcb.html | 4 +- docs/api/html/settings-dummy.html | 4 +- docs/api/html/settings-ethtool.html | 4 +- docs/api/html/settings-generic.html | 4 +- docs/api/html/settings-gsm.html | 4 +- docs/api/html/settings-hostname.html | 4 +- docs/api/html/settings-infiniband.html | 4 +- docs/api/html/settings-ip-tunnel.html | 4 +- docs/api/html/settings-ipv4.html | 4 +- docs/api/html/settings-ipv6.html | 4 +- docs/api/html/settings-macsec.html | 4 +- docs/api/html/settings-macvlan.html | 4 +- docs/api/html/settings-match.html | 4 +- docs/api/html/settings-ovs-bridge.html | 4 +- docs/api/html/settings-ovs-dpdk.html | 16 +- docs/api/html/settings-ovs-external-ids.html | 4 +- docs/api/html/settings-ovs-interface.html | 4 +- docs/api/html/settings-ovs-patch.html | 4 +- docs/api/html/settings-ovs-port.html | 4 +- docs/api/html/settings-ppp.html | 4 +- docs/api/html/settings-pppoe.html | 4 +- docs/api/html/settings-proxy.html | 4 +- docs/api/html/settings-serial.html | 4 +- docs/api/html/settings-sriov.html | 4 +- docs/api/html/settings-tc.html | 4 +- docs/api/html/settings-team-port.html | 4 +- docs/api/html/settings-team.html | 4 +- docs/api/html/settings-tun.html | 4 +- docs/api/html/settings-user.html | 4 +- docs/api/html/settings-veth.html | 4 +- docs/api/html/settings-vlan.html | 4 +- docs/api/html/settings-vpn.html | 4 +- docs/api/html/settings-vrf.html | 4 +- docs/api/html/settings-vxlan.html | 4 +- docs/api/html/settings-wifi-p2p.html | 4 +- docs/api/html/settings-wimax.html | 4 +- docs/api/html/settings-wireguard.html | 4 +- docs/api/html/settings-wpan.html | 4 +- docs/api/html/spec.html | 4 +- docs/api/html/vpn-plugins.html | 4 +- docs/api/settings-spec.xml | 2 +- docs/api/version.xml | 2 +- docs/libnm/Makefile.in | 2 + docs/libnm/html/NMAccessPoint.html | 8 +- docs/libnm/html/NMActiveConnection.html | 16 +- docs/libnm/html/NMCheckpoint.html | 4 +- docs/libnm/html/NMClient.html | 74 +- docs/libnm/html/NMConnection.html | 94 +- docs/libnm/html/NMDevice.html | 32 +- docs/libnm/html/NMDevice6Lowpan.html | 6 +- docs/libnm/html/NMDeviceAdsl.html | 4 +- docs/libnm/html/NMDeviceBond.html | 4 +- docs/libnm/html/NMDeviceBridge.html | 4 +- docs/libnm/html/NMDeviceBt.html | 4 +- docs/libnm/html/NMDeviceDummy.html | 4 +- docs/libnm/html/NMDeviceEthernet.html | 6 +- docs/libnm/html/NMDeviceGeneric.html | 4 +- docs/libnm/html/NMDeviceIPTunnel.html | 6 +- docs/libnm/html/NMDeviceInfiniband.html | 4 +- docs/libnm/html/NMDeviceMacsec.html | 6 +- docs/libnm/html/NMDeviceMacvlan.html | 6 +- docs/libnm/html/NMDeviceModem.html | 4 +- docs/libnm/html/NMDeviceOlpcMesh.html | 6 +- docs/libnm/html/NMDeviceOvsBridge.html | 4 +- docs/libnm/html/NMDeviceOvsInterface.html | 4 +- docs/libnm/html/NMDeviceOvsPort.html | 4 +- docs/libnm/html/NMDevicePpp.html | 4 +- docs/libnm/html/NMDeviceTeam.html | 4 +- docs/libnm/html/NMDeviceTun.html | 4 +- docs/libnm/html/NMDeviceVeth.html | 6 +- docs/libnm/html/NMDeviceVlan.html | 6 +- docs/libnm/html/NMDeviceVrf.html | 4 +- docs/libnm/html/NMDeviceVxlan.html | 6 +- docs/libnm/html/NMDeviceWifi.html | 8 +- docs/libnm/html/NMDeviceWifiP2P.html | 6 +- docs/libnm/html/NMDeviceWimax.html | 8 +- docs/libnm/html/NMDeviceWireGuard.html | 6 +- docs/libnm/html/NMDeviceWpan.html | 4 +- docs/libnm/html/NMDhcpConfig.html | 6 +- docs/libnm/html/NMIPConfig.html | 18 +- docs/libnm/html/NMObject.html | 6 +- docs/libnm/html/NMRemoteConnection.html | 10 +- docs/libnm/html/NMSecretAgentOld.html | 16 +- docs/libnm/html/NMSetting.html | 12 +- docs/libnm/html/NMSetting6Lowpan.html | 6 +- docs/libnm/html/NMSetting8021x.html | 18 +- docs/libnm/html/NMSettingAdsl.html | 4 +- docs/libnm/html/NMSettingBluetooth.html | 6 +- docs/libnm/html/NMSettingBond.html | 12 +- docs/libnm/html/NMSettingBondPort.html | 6 +- docs/libnm/html/NMSettingBridge.html | 12 +- docs/libnm/html/NMSettingBridgePort.html | 8 +- docs/libnm/html/NMSettingCdma.html | 4 +- docs/libnm/html/NMSettingConnection.html | 4 +- docs/libnm/html/NMSettingDcb.html | 6 +- docs/libnm/html/NMSettingDummy.html | 6 +- docs/libnm/html/NMSettingEthtool.html | 8 +- docs/libnm/html/NMSettingGeneric.html | 6 +- docs/libnm/html/NMSettingGsm.html | 4 +- docs/libnm/html/NMSettingHostname.html | 6 +- docs/libnm/html/NMSettingIP4Config.html | 6 +- docs/libnm/html/NMSettingIP6Config.html | 6 +- docs/libnm/html/NMSettingIPConfig.html | 54 +- docs/libnm/html/NMSettingIPTunnel.html | 6 +- docs/libnm/html/NMSettingInfiniband.html | 6 +- docs/libnm/html/NMSettingMacsec.html | 6 +- docs/libnm/html/NMSettingMacvlan.html | 6 +- docs/libnm/html/NMSettingMatch.html | 14 +- docs/libnm/html/NMSettingOlpcMesh.html | 6 +- docs/libnm/html/NMSettingOvsBridge.html | 6 +- docs/libnm/html/NMSettingOvsDpdk.html | 50 +- docs/libnm/html/NMSettingOvsExternalIDs.html | 10 +- docs/libnm/html/NMSettingOvsInterface.html | 6 +- docs/libnm/html/NMSettingOvsPatch.html | 6 +- docs/libnm/html/NMSettingOvsPort.html | 6 +- docs/libnm/html/NMSettingPpp.html | 6 +- docs/libnm/html/NMSettingPppoe.html | 6 +- docs/libnm/html/NMSettingProxy.html | 4 +- docs/libnm/html/NMSettingSerial.html | 6 +- docs/libnm/html/NMSettingSriov.html | 20 +- docs/libnm/html/NMSettingTCConfig.html | 34 +- docs/libnm/html/NMSettingTeam.html | 18 +- docs/libnm/html/NMSettingTeamPort.html | 8 +- docs/libnm/html/NMSettingTun.html | 6 +- docs/libnm/html/NMSettingUser.html | 8 +- docs/libnm/html/NMSettingVeth.html | 6 +- docs/libnm/html/NMSettingVlan.html | 6 +- docs/libnm/html/NMSettingVpn.html | 10 +- docs/libnm/html/NMSettingVrf.html | 6 +- docs/libnm/html/NMSettingVxlan.html | 6 +- docs/libnm/html/NMSettingWifiP2P.html | 8 +- docs/libnm/html/NMSettingWimax.html | 4 +- docs/libnm/html/NMSettingWireGuard.html | 28 +- docs/libnm/html/NMSettingWired.html | 14 +- docs/libnm/html/NMSettingWireless.html | 8 +- docs/libnm/html/NMSettingWirelessSecurity.html | 6 +- docs/libnm/html/NMSettingWpan.html | 6 +- docs/libnm/html/NMSimpleConnection.html | 10 +- docs/libnm/html/NMVpnConnection.html | 4 +- docs/libnm/html/NMVpnEditor.html | 8 +- docs/libnm/html/NMVpnEditorPlugin.html | 20 +- docs/libnm/html/NMVpnPluginInfo.html | 36 +- docs/libnm/html/NMVpnPluginOld.html | 10 +- docs/libnm/html/NMVpnServicePlugin.html | 10 +- docs/libnm/html/NMWifiP2PPeer.html | 8 +- docs/libnm/html/NMWimaxNsp.html | 6 +- docs/libnm/html/annotation-glossary.html | 14 +- docs/libnm/html/api-index-full.html | 32 +- docs/libnm/html/ch02.html | 4 +- docs/libnm/html/ch03.html | 4 +- docs/libnm/html/ch04.html | 4 +- docs/libnm/html/ch05.html | 4 +- docs/libnm/html/ch06.html | 4 +- docs/libnm/html/index.html | 6 +- docs/libnm/html/libnm-nm-dbus-interface.html | 11 +- docs/libnm/html/libnm-nm-errors.html | 4 +- docs/libnm/html/libnm-nm-keyfile.html | 20 +- docs/libnm/html/libnm-nm-utils.html | 62 +- docs/libnm/html/libnm-nm-version.html | 36 +- docs/libnm/html/libnm.devhelp2 | 6 + docs/libnm/html/license.html | 4 +- docs/libnm/html/object-tree.html | 4 +- docs/libnm/html/ref-overview.html | 4 +- docs/libnm/html/usage.html | 6 +- docs/libnm/libnm-sections.txt | 6 + docs/libnm/version.xml | 2 +- examples/C/glib/add-connection-gdbus.c | 12 +- examples/C/glib/add-connection-libnm.c | 16 +- examples/C/glib/get-active-connections-gdbus.c | 26 +- examples/C/glib/get-ap-info-libnm.c | 44 +- examples/C/glib/list-connections-gdbus.c | 4 +- examples/C/glib/list-connections-libnm.c | 8 +- examples/C/glib/monitor-nm-running-gdbus.c | 6 +- examples/C/glib/monitor-nm-state-gdbus.c | 12 +- examples/C/glib/vpn-import-libnm.c | 22 +- gtk-doc.make | 1 + man/NetworkManager-dispatcher.8 | 4 +- man/NetworkManager.8 | 6 +- man/NetworkManager.conf.5 | 17 +- man/NetworkManager.conf.xml | 36 +- man/common.ent.in | 1 + man/nm-cloud-setup.8 | 6 +- man/nm-initrd-generator.8 | 14 +- man/nm-initrd-generator.xml | 16 + man/nm-online.1 | 6 +- man/nm-openvswitch.7 | 6 +- man/nm-settings-dbus.5 | 16 +- man/nm-settings-dbus.xml | 4 +- man/nm-settings-docs-dbus.xml | 2 +- man/nm-settings-docs-nmcli.xml | 2 +- man/nm-settings-ifcfg-rh.5 | 8 +- man/nm-settings-ifcfg-rh.xml | 4 +- man/nm-settings-keyfile.5 | 6 +- man/nm-settings-keyfile.xml | 2 +- man/nm-settings-nmcli.5 | 13 +- man/nm-settings-nmcli.xml | 5 +- man/nmcli-examples.7 | 6 +- man/nmcli.1 | 6 +- man/nmtui.1 | 6 +- meson.build | 11 +- meson_options.txt | 1 + po/POTFILES.in | 1 - po/ar.po | 2 +- po/as.po | 2 +- po/be@latin.po | 2 +- po/bg.po | 2 +- po/bn_IN.po | 2 +- po/bs.po | 2 +- po/ca.po | 2 +- po/cs.po | 2 +- po/da.po | 2 +- po/de.po | 2 +- po/dz.po | 2 +- po/el.po | 2 +- po/en_CA.po | 2 +- po/en_GB.po | 2 +- po/eo.po | 2 +- po/es.po | 2 +- po/et.po | 2 +- po/eu.po | 2 +- po/fi.po | 2 +- po/fr.po | 2 +- po/gd.po | 2 +- po/gl.po | 2 +- po/gu.po | 2 +- po/he.po | 2 +- po/hi.po | 2 +- po/hr.po | 2 +- po/hu.po | 2 +- po/id.po | 2 +- po/it.po | 2 +- po/ja.po | 2 +- po/ka.po | 2 +- po/kn.po | 2 +- po/ko.po | 2 +- po/ku.po | 2 +- po/lt.po | 2 +- po/lv.po | 2 +- po/mk.po | 2 +- po/ml.po | 2 +- po/mr.po | 2 +- po/nb.po | 2 +- po/ne.po | 2 +- po/nl.po | 2 +- po/oc.po | 2 +- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 2 +- po/pt.po | 2 +- po/pt_BR.po | 2 +- po/ru.po | 2 +- po/rw.po | 2 +- po/sk.po | 2 +- po/sl.po | 2 +- po/sq.po | 2 +- po/sr.po | 2 +- po/sr@latin.po | 2 +- po/sv.po | 2 +- po/ta.po | 2 +- po/te.po | 2 +- po/th.po | 2 +- po/tr.po | 2 +- po/uk.po | 2 +- po/vi.po | 2 +- po/wa.po | 2 +- po/zh_CN.po | 4344 ++++----- po/zh_HK.po | 2 +- po/zh_TW.po | 2 +- src/contrib/nm-compat.c | 2 +- src/contrib/nm-vpn-editor-plugin-call.h | 64 +- src/contrib/nm-vpn-plugin-utils.c | 20 +- src/contrib/nm-vpn-plugin-utils.h | 14 +- src/core/NetworkManagerUtils.c | 345 +- src/core/NetworkManagerUtils.h | 70 +- src/core/devices/adsl/nm-atm-manager.c | 38 +- src/core/devices/adsl/nm-device-adsl.c | 373 +- src/core/devices/bluetooth/nm-bluez-manager.c | 320 +- src/core/devices/bluetooth/nm-bluez-manager.h | 12 +- src/core/devices/bluetooth/nm-bluez5-dun.c | 48 +- src/core/devices/bluetooth/nm-bluez5-dun.h | 12 +- src/core/devices/bluetooth/nm-device-bt.c | 225 +- src/core/devices/bluetooth/nm-device-bt.h | 14 +- src/core/devices/bluetooth/tests/nm-bt-test.c | 18 +- src/core/devices/nm-acd-manager.c | 497 - src/core/devices/nm-acd-manager.h | 34 - src/core/devices/nm-device-6lowpan.c | 34 +- src/core/devices/nm-device-bond.c | 77 +- src/core/devices/nm-device-bridge.c | 120 +- src/core/devices/nm-device-dummy.c | 29 +- src/core/devices/nm-device-ethernet.c | 641 +- src/core/devices/nm-device-factory.c | 50 +- src/core/devices/nm-device-factory.h | 40 +- src/core/devices/nm-device-generic.c | 12 +- src/core/devices/nm-device-infiniband.c | 41 +- src/core/devices/nm-device-ip-tunnel.c | 75 +- src/core/devices/nm-device-macsec.c | 122 +- src/core/devices/nm-device-macvlan.c | 57 +- src/core/devices/nm-device-ppp.c | 288 +- src/core/devices/nm-device-private.h | 139 +- src/core/devices/nm-device-tun.c | 51 +- src/core/devices/nm-device-utils.c | 25 +- src/core/devices/nm-device-utils.h | 13 +- src/core/devices/nm-device-veth.c | 24 +- src/core/devices/nm-device-vlan.c | 84 +- src/core/devices/nm-device-vrf.c | 42 +- src/core/devices/nm-device-vxlan.c | 49 +- src/core/devices/nm-device-wireguard.c | 259 +- src/core/devices/nm-device-wpan.c | 31 +- src/core/devices/nm-device.c | 9639 +++++++++----------- src/core/devices/nm-device.h | 231 +- src/core/devices/nm-lldp-listener.c | 70 +- src/core/devices/nm-lldp-listener.h | 2 +- src/core/devices/ovs/nm-device-ovs-bridge.c | 28 +- src/core/devices/ovs/nm-device-ovs-interface.c | 100 +- src/core/devices/ovs/nm-device-ovs-port.c | 51 +- src/core/devices/ovs/nm-ovs-factory.c | 62 +- src/core/devices/ovs/nm-ovsdb.c | 339 +- src/core/devices/ovs/nm-ovsdb.h | 26 +- src/core/devices/team/nm-device-team.c | 145 +- src/core/devices/team/nm-team-factory.c | 10 +- src/core/devices/tests/meson.build | 1 - src/core/devices/tests/test-acd.c | 259 - src/core/devices/tests/test-lldp.c | 32 +- src/core/devices/wifi/meson.build | 1 + src/core/devices/wifi/nm-device-iwd-p2p.c | 1262 +++ src/core/devices/wifi/nm-device-iwd-p2p.h | 36 + src/core/devices/wifi/nm-device-iwd.c | 462 +- src/core/devices/wifi/nm-device-iwd.h | 4 +- src/core/devices/wifi/nm-device-olpc-mesh.c | 46 +- src/core/devices/wifi/nm-device-wifi-p2p.c | 212 +- src/core/devices/wifi/nm-device-wifi.c | 559 +- src/core/devices/wifi/nm-device-wifi.h | 4 +- src/core/devices/wifi/nm-iwd-manager.c | 497 +- src/core/devices/wifi/nm-iwd-manager.h | 40 +- src/core/devices/wifi/nm-wifi-ap.c | 48 +- src/core/devices/wifi/nm-wifi-ap.h | 14 +- src/core/devices/wifi/nm-wifi-common.c | 44 +- src/core/devices/wifi/nm-wifi-factory.c | 77 +- src/core/devices/wifi/nm-wifi-p2p-peer.c | 128 +- src/core/devices/wifi/nm-wifi-p2p-peer.h | 21 +- src/core/devices/wifi/nm-wifi-utils.c | 256 +- src/core/devices/wifi/nm-wifi-utils.h | 25 +- src/core/devices/wifi/tests/test-devices-wifi.c | 122 +- src/core/devices/wwan/libnm-wwan.ver | 5 +- src/core/devices/wwan/nm-device-modem.c | 296 +- src/core/devices/wwan/nm-modem-broadband.c | 606 +- src/core/devices/wwan/nm-modem-manager.c | 92 +- src/core/devices/wwan/nm-modem-ofono.c | 278 +- src/core/devices/wwan/nm-modem.c | 985 +- src/core/devices/wwan/nm-modem.h | 137 +- src/core/devices/wwan/nm-service-providers.c | 82 +- src/core/devices/wwan/nm-service-providers.h | 18 +- src/core/devices/wwan/nm-wwan-factory.c | 20 +- .../devices/wwan/tests/test-service-providers.c | 36 +- src/core/dhcp/nm-dhcp-client-logging.h | 4 +- src/core/dhcp/nm-dhcp-client.c | 1331 ++- src/core/dhcp/nm-dhcp-client.h | 265 +- src/core/dhcp/nm-dhcp-dhclient-utils.c | 91 +- src/core/dhcp/nm-dhcp-dhclient-utils.h | 18 +- src/core/dhcp/nm-dhcp-dhclient.c | 209 +- src/core/dhcp/nm-dhcp-dhcpcanon.c | 42 +- src/core/dhcp/nm-dhcp-dhcpcd.c | 30 +- src/core/dhcp/nm-dhcp-helper.c | 20 +- src/core/dhcp/nm-dhcp-listener.c | 32 +- src/core/dhcp/nm-dhcp-manager.c | 382 +- src/core/dhcp/nm-dhcp-manager.h | 48 +- src/core/dhcp/nm-dhcp-nettools.c | 420 +- src/core/dhcp/nm-dhcp-options.c | 23 +- src/core/dhcp/nm-dhcp-options.h | 5 +- src/core/dhcp/nm-dhcp-systemd.c | 513 +- src/core/dhcp/nm-dhcp-utils.c | 367 +- src/core/dhcp/nm-dhcp-utils.h | 35 +- src/core/dhcp/tests/test-dhcp-dhclient.c | 45 +- src/core/dhcp/tests/test-dhcp-utils.c | 581 +- src/core/dns/nm-dns-dnsmasq.c | 109 +- src/core/dns/nm-dns-manager.c | 784 +- src/core/dns/nm-dns-manager.h | 20 +- src/core/dns/nm-dns-plugin.c | 8 +- src/core/dns/nm-dns-plugin.h | 16 +- src/core/dns/nm-dns-systemd-resolved.c | 193 +- src/core/dns/nm-dns-systemd-resolved.h | 10 +- src/core/dns/nm-dns-unbound.c | 12 +- src/core/dnsmasq/nm-dnsmasq-manager.c | 73 +- src/core/dnsmasq/nm-dnsmasq-manager.h | 10 +- src/core/dnsmasq/nm-dnsmasq-utils.c | 6 +- src/core/dnsmasq/nm-dnsmasq-utils.h | 6 +- src/core/main-utils.c | 25 +- src/core/main-utils.h | 11 +- src/core/main.c | 40 +- src/core/meson.build | 41 +- src/core/ndisc/nm-fake-ndisc.c | 90 +- src/core/ndisc/nm-fake-ndisc.h | 18 +- src/core/ndisc/nm-lndp-ndisc.c | 112 +- src/core/ndisc/nm-lndp-ndisc.h | 13 +- src/core/ndisc/nm-ndisc-private.h | 2 +- src/core/ndisc/nm-ndisc.c | 587 +- src/core/ndisc/nm-ndisc.h | 66 +- src/core/ndisc/tests/test-ndisc-fake.c | 138 +- src/core/ndisc/tests/test-ndisc-linux.c | 55 +- src/core/nm-act-request.c | 88 +- src/core/nm-act-request.h | 30 +- src/core/nm-active-connection.c | 84 +- src/core/nm-active-connection.h | 33 +- src/core/nm-audit-manager.c | 86 +- src/core/nm-audit-manager.h | 34 +- src/core/nm-auth-manager.c | 80 +- src/core/nm-auth-manager.h | 10 +- src/core/nm-auth-utils.c | 36 +- src/core/nm-auth-utils.h | 20 +- src/core/nm-checkpoint-manager.c | 30 +- src/core/nm-checkpoint-manager.h | 18 +- src/core/nm-checkpoint.c | 76 +- src/core/nm-checkpoint.h | 6 +- src/core/nm-config-data.c | 250 +- src/core/nm-config-data.h | 95 +- src/core/nm-config.c | 326 +- src/core/nm-config.h | 49 +- src/core/nm-connectivity.c | 81 +- src/core/nm-connectivity.h | 8 +- src/core/nm-core-utils.c | 290 +- src/core/nm-core-utils.h | 134 +- src/core/nm-dbus-manager.c | 222 +- src/core/nm-dbus-manager.h | 42 +- src/core/nm-dbus-object.c | 14 +- src/core/nm-dbus-object.h | 14 +- src/core/nm-dbus-utils.c | 20 +- src/core/nm-dbus-utils.h | 26 +- src/core/nm-dcb.c | 18 +- src/core/nm-dcb.h | 12 +- src/core/nm-dhcp-config.c | 99 +- src/core/nm-dhcp-config.h | 5 +- src/core/nm-dispatcher.c | 263 +- src/core/nm-dispatcher.h | 30 +- src/core/nm-firewall-utils.c | 40 +- src/core/nm-firewalld-manager.c | 76 +- src/core/nm-firewalld-manager.h | 16 +- src/core/nm-hostname-manager.c | 129 +- src/core/nm-hostname-manager.h | 8 +- src/core/nm-iface-helper.c | 857 -- src/core/nm-ip-config.c | 857 +- src/core/nm-ip-config.h | 60 +- src/core/nm-ip4-config.c | 3337 ------- src/core/nm-ip4-config.h | 673 -- src/core/nm-ip6-config.c | 2675 ------ src/core/nm-ip6-config.h | 205 - src/core/nm-keep-alive.c | 30 +- src/core/nm-keep-alive.h | 6 +- src/core/nm-l3-config-data.c | 505 +- src/core/nm-l3-config-data.h | 90 +- src/core/nm-l3-ipv4ll.c | 28 +- src/core/nm-l3-ipv6ll.c | 24 +- src/core/nm-l3-ipv6ll.h | 21 +- src/core/nm-l3cfg.c | 575 +- src/core/nm-l3cfg.h | 49 +- src/core/nm-manager.c | 1256 ++- src/core/nm-manager.h | 52 +- src/core/nm-netns.c | 46 +- src/core/nm-netns.h | 8 +- src/core/nm-pacrunner-manager.c | 149 +- src/core/nm-pacrunner-manager.h | 7 +- src/core/nm-policy.c | 655 +- src/core/nm-priv-helper-call.c | 12 +- src/core/nm-priv-helper-call.h | 2 +- src/core/nm-proxy-config.c | 172 - src/core/nm-proxy-config.h | 41 - src/core/nm-rfkill-manager.c | 34 +- src/core/nm-session-monitor.c | 16 +- src/core/nm-sleep-monitor.c | 14 +- src/core/nm-test-utils-core.h | 32 +- src/core/nm-types.h | 9 +- src/core/platform/nm-fake-platform.c | 120 +- src/core/platform/tests/test-address.c | 26 +- src/core/platform/tests/test-cleanup.c | 12 +- src/core/platform/tests/test-common.c | 128 +- src/core/platform/tests/test-common.h | 88 +- src/core/platform/tests/test-link.c | 136 +- src/core/platform/tests/test-nmp-object.c | 52 +- src/core/platform/tests/test-platform-general.c | 16 +- src/core/platform/tests/test-route.c | 260 +- src/core/platform/tests/test-tc.c | 24 +- src/core/ppp/nm-ppp-manager-call.c | 32 +- src/core/ppp/nm-ppp-manager-call.h | 14 +- src/core/ppp/nm-ppp-manager.c | 436 +- src/core/ppp/nm-ppp-manager.h | 5 +- src/core/ppp/nm-ppp-mgr.c | 620 ++ src/core/ppp/nm-ppp-mgr.h | 131 + src/core/ppp/nm-ppp-plugin-api.h | 14 +- src/core/ppp/nm-ppp-status.h | 5 +- src/core/ppp/nm-pppd-plugin.c | 12 +- src/core/settings/nm-agent-manager.c | 202 +- src/core/settings/nm-agent-manager.h | 44 +- src/core/settings/nm-secret-agent.c | 116 +- src/core/settings/nm-secret-agent.h | 36 +- src/core/settings/nm-settings-connection.c | 392 +- src/core/settings/nm-settings-connection.h | 62 +- src/core/settings/nm-settings-plugin.c | 30 +- src/core/settings/nm-settings-plugin.h | 64 +- src/core/settings/nm-settings-storage.h | 6 +- src/core/settings/nm-settings-utils.c | 8 +- src/core/settings/nm-settings.c | 579 +- src/core/settings/nm-settings.h | 44 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c | 208 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 754 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-reader.h | 10 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-storage.c | 14 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-storage.h | 12 +- .../settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c | 14 +- .../settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h | 8 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 370 +- .../plugins/ifcfg-rh/nms-ifcfg-rh-writer.h | 12 +- src/core/settings/plugins/ifcfg-rh/shvar.c | 46 +- src/core/settings/plugins/ifcfg-rh/shvar.h | 4 +- .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 1668 ++-- .../ifupdown/nms-ifupdown-interface-parser.c | 10 +- .../ifupdown/nms-ifupdown-interface-parser.h | 4 +- .../plugins/ifupdown/nms-ifupdown-parser.c | 70 +- .../plugins/ifupdown/nms-ifupdown-plugin.c | 40 +- .../plugins/ifupdown/tests/test-ifupdown.c | 100 +- .../settings/plugins/keyfile/nms-keyfile-plugin.c | 258 +- .../settings/plugins/keyfile/nms-keyfile-plugin.h | 30 +- .../settings/plugins/keyfile/nms-keyfile-reader.c | 40 +- .../settings/plugins/keyfile/nms-keyfile-reader.h | 20 +- .../settings/plugins/keyfile/nms-keyfile-storage.c | 28 +- .../settings/plugins/keyfile/nms-keyfile-storage.h | 18 +- .../settings/plugins/keyfile/nms-keyfile-utils.c | 42 +- .../settings/plugins/keyfile/nms-keyfile-utils.h | 32 +- .../settings/plugins/keyfile/nms-keyfile-writer.c | 98 +- .../settings/plugins/keyfile/nms-keyfile-writer.h | 28 +- .../plugins/keyfile/tests/test-keyfile-settings.c | 534 +- src/core/supplicant/nm-supplicant-config.c | 172 +- src/core/supplicant/nm-supplicant-config.h | 20 +- src/core/supplicant/nm-supplicant-interface.c | 441 +- src/core/supplicant/nm-supplicant-interface.h | 38 +- src/core/supplicant/nm-supplicant-manager.c | 170 +- src/core/supplicant/nm-supplicant-manager.h | 16 +- .../supplicant/nm-supplicant-settings-verify.c | 4 +- src/core/supplicant/nm-supplicant-types.h | 4 +- src/core/supplicant/tests/test-supplicant-config.c | 196 +- src/core/tests/config/nm-test-device.c | 2 +- src/core/tests/config/test-config.c | 192 +- src/core/tests/meson.build | 2 - src/core/tests/test-core-with-expect.c | 12 +- src/core/tests/test-core.c | 142 +- src/core/tests/test-dcb.c | 20 +- src/core/tests/test-ip4-config.c | 380 - src/core/tests/test-ip6-config.c | 538 -- src/core/tests/test-l3cfg.c | 87 +- src/core/tests/test-systemd.c | 14 +- src/core/tests/test-utils.c | 12 +- src/core/tests/test-wired-defname.c | 8 +- src/core/vpn/nm-vpn-connection.c | 4012 ++++---- src/core/vpn/nm-vpn-connection.h | 25 +- src/core/vpn/nm-vpn-manager.c | 36 +- src/libnm-base/nm-ethtool-base.c | 2 +- src/libnm-client-aux-extern/nm-libnm-aux.c | 20 +- src/libnm-client-aux-extern/nm-libnm-aux.h | 14 +- .../tests/test-libnm-client-aux.c | 8 +- src/libnm-client-impl/libnm.ver | 5 + src/libnm-client-impl/nm-access-point.c | 26 +- src/libnm-client-impl/nm-active-connection.c | 14 +- src/libnm-client-impl/nm-checkpoint.c | 4 +- src/libnm-client-impl/nm-client.c | 852 +- src/libnm-client-impl/nm-dbus-helpers.c | 10 +- src/libnm-client-impl/nm-device-6lowpan.c | 2 +- src/libnm-client-impl/nm-device-adsl.c | 2 +- src/libnm-client-impl/nm-device-bond.c | 2 +- src/libnm-client-impl/nm-device-bridge.c | 2 +- src/libnm-client-impl/nm-device-bt.c | 10 +- src/libnm-client-impl/nm-device-ethernet.c | 12 +- src/libnm-client-impl/nm-device-generic.c | 2 +- src/libnm-client-impl/nm-device-infiniband.c | 4 +- src/libnm-client-impl/nm-device-ip-tunnel.c | 10 +- src/libnm-client-impl/nm-device-macsec.c | 4 +- src/libnm-client-impl/nm-device-macvlan.c | 6 +- src/libnm-client-impl/nm-device-modem.c | 24 +- src/libnm-client-impl/nm-device-olpc-mesh.c | 2 +- src/libnm-client-impl/nm-device-ovs-bridge.c | 2 +- src/libnm-client-impl/nm-device-ovs-port.c | 2 +- src/libnm-client-impl/nm-device-team.c | 2 +- src/libnm-client-impl/nm-device-tun.c | 6 +- src/libnm-client-impl/nm-device-veth.c | 2 +- src/libnm-client-impl/nm-device-vlan.c | 8 +- src/libnm-client-impl/nm-device-vrf.c | 2 +- src/libnm-client-impl/nm-device-vxlan.c | 6 +- src/libnm-client-impl/nm-device-wifi-p2p.c | 18 +- src/libnm-client-impl/nm-device-wifi.c | 34 +- src/libnm-client-impl/nm-device.c | 164 +- src/libnm-client-impl/nm-dhcp-config.c | 12 +- src/libnm-client-impl/nm-dns-manager.c | 8 +- src/libnm-client-impl/nm-dns-manager.h | 2 +- src/libnm-client-impl/nm-ip-config.c | 52 +- src/libnm-client-impl/nm-libnm-utils.c | 22 +- src/libnm-client-impl/nm-libnm-utils.h | 142 +- src/libnm-client-impl/nm-object.c | 16 +- .../nm-property-infos-ifcfg-rh.xml | 2 +- src/libnm-client-impl/nm-remote-connection.c | 64 +- src/libnm-client-impl/nm-secret-agent-old.c | 238 +- src/libnm-client-impl/nm-settings-docs-gir.xml | 1 + src/libnm-client-impl/nm-vpn-connection.c | 6 +- src/libnm-client-impl/nm-vpn-plugin-old.c | 90 +- src/libnm-client-impl/nm-vpn-service-plugin.c | 112 +- src/libnm-client-impl/nm-wifi-p2p-peer.c | 20 +- src/libnm-client-impl/tests/test-libnm.c | 28 +- src/libnm-client-impl/tests/test-nm-client.c | 255 +- .../tests/test-remote-settings-client.c | 44 +- src/libnm-client-impl/tests/test-secret-agent.c | 128 +- src/libnm-client-public/nm-access-point.h | 4 +- src/libnm-client-public/nm-active-connection.h | 20 +- src/libnm-client-public/nm-client.h | 174 +- src/libnm-client-public/nm-device-wifi-p2p.h | 10 +- src/libnm-client-public/nm-device-wifi.h | 18 +- src/libnm-client-public/nm-device.h | 64 +- src/libnm-client-public/nm-ip-config.h | 6 +- src/libnm-client-public/nm-remote-connection.h | 56 +- src/libnm-client-public/nm-secret-agent-old.h | 64 +- src/libnm-client-public/nm-vpn-connection.h | 2 +- src/libnm-client-public/nm-vpn-plugin-old.h | 16 +- src/libnm-client-public/nm-vpn-service-plugin.h | 20 +- src/libnm-client-test/nm-test-libnm-utils.h | 32 +- src/libnm-client-test/nm-test-utils-impl.c | 104 +- src/libnm-core-aux-extern/nm-libnm-core-aux.c | 20 +- src/libnm-core-aux-intern/nm-auth-subject.c | 6 +- src/libnm-core-aux-intern/nm-libnm-core-utils.c | 12 +- src/libnm-core-aux-intern/nm-libnm-core-utils.h | 12 +- src/libnm-core-impl/nm-connection-private.h | 20 +- src/libnm-core-impl/nm-connection.c | 180 +- src/libnm-core-impl/nm-crypto-gnutls.c | 24 +- src/libnm-core-impl/nm-crypto-impl.h | 24 +- src/libnm-core-impl/nm-crypto-nss.c | 44 +- src/libnm-core-impl/nm-crypto.c | 128 +- src/libnm-core-impl/nm-crypto.h | 44 +- src/libnm-core-impl/nm-dbus-utils.c | 30 +- src/libnm-core-impl/nm-keyfile-utils.c | 60 +- src/libnm-core-impl/nm-keyfile.c | 614 +- src/libnm-core-impl/nm-meta-setting-base-impl.c | 4 +- src/libnm-core-impl/nm-property-compare.c | 6 +- src/libnm-core-impl/nm-setting-6lowpan.c | 6 +- src/libnm-core-impl/nm-setting-8021x.c | 190 +- src/libnm-core-impl/nm-setting-adsl.c | 14 +- src/libnm-core-impl/nm-setting-bluetooth.c | 6 +- src/libnm-core-impl/nm-setting-bond-port.c | 6 +- src/libnm-core-impl/nm-setting-bond.c | 26 +- src/libnm-core-impl/nm-setting-bridge-port.c | 6 +- src/libnm-core-impl/nm-setting-bridge.c | 124 +- src/libnm-core-impl/nm-setting-cdma.c | 12 +- src/libnm-core-impl/nm-setting-connection.c | 95 +- src/libnm-core-impl/nm-setting-dcb.c | 16 +- src/libnm-core-impl/nm-setting-ethtool.c | 14 +- src/libnm-core-impl/nm-setting-gsm.c | 342 +- src/libnm-core-impl/nm-setting-hostname.c | 4 +- src/libnm-core-impl/nm-setting-infiniband.c | 180 +- src/libnm-core-impl/nm-setting-ip-config.c | 328 +- src/libnm-core-impl/nm-setting-ip-tunnel.c | 271 +- src/libnm-core-impl/nm-setting-ip4-config.c | 73 +- src/libnm-core-impl/nm-setting-ip6-config.c | 140 +- src/libnm-core-impl/nm-setting-macsec.c | 262 +- src/libnm-core-impl/nm-setting-macvlan.c | 116 +- src/libnm-core-impl/nm-setting-match.c | 12 +- src/libnm-core-impl/nm-setting-olpc-mesh.c | 6 +- src/libnm-core-impl/nm-setting-ovs-bridge.c | 104 +- src/libnm-core-impl/nm-setting-ovs-dpdk.c | 106 +- src/libnm-core-impl/nm-setting-ovs-external-ids.c | 46 +- src/libnm-core-impl/nm-setting-ovs-interface.c | 84 +- src/libnm-core-impl/nm-setting-ovs-patch.c | 72 +- src/libnm-core-impl/nm-setting-ovs-port.c | 12 +- src/libnm-core-impl/nm-setting-ppp.c | 4 +- src/libnm-core-impl/nm-setting-pppoe.c | 10 +- src/libnm-core-impl/nm-setting-private.h | 164 +- src/libnm-core-impl/nm-setting-proxy.c | 8 +- src/libnm-core-impl/nm-setting-serial.c | 4 +- src/libnm-core-impl/nm-setting-sriov.c | 104 +- src/libnm-core-impl/nm-setting-tc-config.c | 76 +- src/libnm-core-impl/nm-setting-team-port.c | 22 +- src/libnm-core-impl/nm-setting-team.c | 54 +- src/libnm-core-impl/nm-setting-tun.c | 8 +- src/libnm-core-impl/nm-setting-user.c | 34 +- src/libnm-core-impl/nm-setting-veth.c | 72 +- src/libnm-core-impl/nm-setting-vlan.c | 78 +- src/libnm-core-impl/nm-setting-vpn.c | 160 +- src/libnm-core-impl/nm-setting-vrf.c | 4 +- src/libnm-core-impl/nm-setting-vxlan.c | 397 +- src/libnm-core-impl/nm-setting-wifi-p2p.c | 6 +- src/libnm-core-impl/nm-setting-wimax.c | 90 +- src/libnm-core-impl/nm-setting-wired.c | 214 +- src/libnm-core-impl/nm-setting-wireguard.c | 394 +- src/libnm-core-impl/nm-setting-wireless-security.c | 485 +- src/libnm-core-impl/nm-setting-wireless.c | 335 +- src/libnm-core-impl/nm-setting-wpan.c | 6 +- src/libnm-core-impl/nm-setting.c | 701 +- src/libnm-core-impl/nm-simple-connection.c | 4 +- src/libnm-core-impl/nm-team-utils.c | 144 +- src/libnm-core-impl/nm-team-utils.h | 32 +- src/libnm-core-impl/nm-utils-private.h | 23 +- src/libnm-core-impl/nm-utils.c | 554 +- src/libnm-core-impl/nm-vpn-editor-plugin.c | 38 +- src/libnm-core-impl/nm-vpn-plugin-info.c | 60 +- src/libnm-core-impl/tests/test-compare.c | 8 +- src/libnm-core-impl/tests/test-crypto.c | 28 +- src/libnm-core-impl/tests/test-general.c | 814 +- src/libnm-core-impl/tests/test-keyfile.c | 130 +- src/libnm-core-impl/tests/test-secrets.c | 108 +- src/libnm-core-impl/tests/test-setting.c | 488 +- src/libnm-core-impl/tests/test-settings-defaults.c | 4 +- src/libnm-core-intern/nm-core-internal.h | 193 +- src/libnm-core-intern/nm-keyfile-internal.h | 12 +- src/libnm-core-intern/nm-keyfile-utils.h | 36 +- src/libnm-core-intern/nm-meta-setting-base-impl.h | 16 +- src/libnm-core-public/nm-connection.h | 72 +- src/libnm-core-public/nm-dbus-interface.h | 4 + src/libnm-core-public/nm-dbus-types.xml | 5 + src/libnm-core-public/nm-keyfile.h | 38 +- src/libnm-core-public/nm-setting-8021x.h | 82 +- src/libnm-core-public/nm-setting-adsl.h | 10 +- src/libnm-core-public/nm-setting-bluetooth.h | 2 +- src/libnm-core-public/nm-setting-bond.h | 6 +- src/libnm-core-public/nm-setting-cdma.h | 8 +- src/libnm-core-public/nm-setting-connection.h | 24 +- src/libnm-core-public/nm-setting-dcb.h | 2 +- src/libnm-core-public/nm-setting-infiniband.h | 2 +- src/libnm-core-public/nm-setting-ip-config.h | 40 +- src/libnm-core-public/nm-setting-match.h | 8 +- src/libnm-core-public/nm-setting-olpc-mesh.h | 4 +- src/libnm-core-public/nm-setting-ovs-dpdk.h | 3 + .../nm-setting-ovs-external-ids.h | 6 +- src/libnm-core-public/nm-setting-pppoe.h | 8 +- src/libnm-core-public/nm-setting-serial.h | 2 +- src/libnm-core-public/nm-setting-tc-config.h | 2 +- src/libnm-core-public/nm-setting-team.h | 16 +- src/libnm-core-public/nm-setting-vlan.h | 14 +- src/libnm-core-public/nm-setting-vpn.h | 2 +- src/libnm-core-public/nm-setting-wired.h | 14 +- src/libnm-core-public/nm-setting-wireguard.h | 14 +- .../nm-setting-wireless-security.h | 16 +- src/libnm-core-public/nm-setting-wireless.h | 6 +- src/libnm-core-public/nm-setting.h | 28 +- src/libnm-core-public/nm-utils.h | 44 +- src/libnm-core-public/nm-version-macros.h | 7 +- src/libnm-core-public/nm-version-macros.h.in | 3 +- src/libnm-core-public/nm-version.h | 14 + src/libnm-core-public/nm-vpn-editor-plugin.h | 30 +- src/libnm-core-public/nm-vpn-plugin-info.h | 2 +- src/libnm-glib-aux/nm-c-list.h | 2 +- src/libnm-glib-aux/nm-dbus-aux.c | 120 +- src/libnm-glib-aux/nm-dbus-aux.h | 92 +- src/libnm-glib-aux/nm-dedup-multi.c | 112 +- src/libnm-glib-aux/nm-dedup-multi.h | 78 +- src/libnm-glib-aux/nm-enum-utils.c | 18 +- src/libnm-glib-aux/nm-enum-utils.h | 10 +- src/libnm-glib-aux/nm-errno.c | 2 +- src/libnm-glib-aux/nm-glib.h | 12 +- src/libnm-glib-aux/nm-hash-utils.c | 42 +- src/libnm-glib-aux/nm-hash-utils.h | 14 +- src/libnm-glib-aux/nm-io-utils.c | 50 +- src/libnm-glib-aux/nm-io-utils.h | 26 +- src/libnm-glib-aux/nm-json-aux.c | 6 +- src/libnm-glib-aux/nm-json-aux.h | 2 +- src/libnm-glib-aux/nm-keyfile-aux.c | 32 +- src/libnm-glib-aux/nm-keyfile-aux.h | 10 +- src/libnm-glib-aux/nm-logging-base.c | 4 +- src/libnm-glib-aux/nm-macros-internal.h | 45 +- src/libnm-glib-aux/nm-random-utils.c | 6 +- src/libnm-glib-aux/nm-ref-string.c | 42 + src/libnm-glib-aux/nm-ref-string.h | 65 +- src/libnm-glib-aux/nm-secret-utils.h | 20 +- src/libnm-glib-aux/nm-shared-utils.c | 344 +- src/libnm-glib-aux/nm-shared-utils.h | 211 +- src/libnm-glib-aux/nm-str-buf.h | 2 +- src/libnm-glib-aux/nm-test-utils.h | 266 +- src/libnm-glib-aux/nm-uuid.c | 24 +- src/libnm-glib-aux/nm-uuid.h | 10 +- src/libnm-glib-aux/nm-value-type.h | 6 +- src/libnm-glib-aux/tests/test-json-aux.c | 2 +- src/libnm-glib-aux/tests/test-shared-general.c | 48 +- src/libnm-log-core/nm-logging.c | 28 +- src/libnm-platform/nm-linux-platform.c | 778 +- src/libnm-platform/nm-netlink.c | 93 +- src/libnm-platform/nm-netlink.h | 44 +- src/libnm-platform/nm-platform-private.h | 2 +- src/libnm-platform/nm-platform-utils.c | 64 +- src/libnm-platform/nm-platform-utils.h | 8 +- src/libnm-platform/nm-platform.c | 443 +- src/libnm-platform/nm-platform.h | 338 +- src/libnm-platform/nmp-netns.c | 24 +- src/libnm-platform/nmp-object.c | 160 +- src/libnm-platform/nmp-object.h | 93 +- src/libnm-platform/nmp-rules-manager.c | 34 +- src/libnm-platform/nmp-rules-manager.h | 6 +- src/libnm-platform/wifi/nm-wifi-utils-nl80211.c | 86 +- src/libnm-platform/wifi/nm-wifi-utils-private.h | 4 +- src/libnm-platform/wifi/nm-wifi-utils-wext.c | 14 +- src/libnm-platform/wifi/nm-wifi-utils.c | 4 +- src/libnm-platform/wifi/nm-wifi-utils.h | 4 +- src/libnm-platform/wpan/nm-wpan-utils.c | 22 +- src/libnm-std-aux/c-list-util.h | 2 +- src/libnm-systemd-core/meson.build | 2 - src/libnm-systemd-core/nm-sd-utils-dhcp.h | 2 +- src/libnm-systemd-core/nm-sd.h | 2 - .../src/libsystemd-network/arp-util.c | 34 +- .../src/libsystemd-network/arp-util.h | 4 +- .../src/libsystemd-network/dhcp-identifier.c | 6 +- .../src/libsystemd-network/dhcp-internal.h | 4 +- .../src/libsystemd-network/dhcp-lease-internal.h | 6 + .../src/libsystemd-network/dhcp-network.c | 66 +- .../src/libsystemd-network/dhcp-packet.c | 33 +- .../src/libsystemd-network/dhcp6-internal.h | 8 + .../src/libsystemd-network/dhcp6-lease-internal.h | 16 +- .../src/libsystemd-network/dhcp6-network.c | 4 + .../src/libsystemd-network/dhcp6-option.c | 189 +- .../src/libsystemd-network/dhcp6-protocol.h | 120 +- .../src/libsystemd-network/lldp-neighbor.c | 50 +- .../src/libsystemd-network/lldp-network.c | 21 +- .../src/libsystemd-network/network-common.h | 4 +- .../src/libsystemd-network/sd-dhcp-client.c | 61 +- .../src/libsystemd-network/sd-dhcp-lease.c | 96 +- .../src/libsystemd-network/sd-dhcp6-client.c | 316 +- .../src/libsystemd-network/sd-dhcp6-lease.c | 103 +- .../src/libsystemd-network/sd-ipv4acd.c | 616 -- .../src/libsystemd-network/sd-ipv4ll.c | 382 - .../src/libsystemd-network/sd-lldp-rx.c | 29 +- .../src/libsystemd/sd-event/event-source.h | 6 + .../src/libsystemd/sd-event/event-util.c | 24 + .../src/libsystemd/sd-event/event-util.h | 26 +- .../src/libsystemd/sd-event/sd-event.c | 204 +- .../src/libsystemd/sd-id128/id128-util.c | 2 +- .../src/libsystemd/sd-id128/sd-id128.c | 43 +- .../src/systemd/sd-dhcp-client.h | 117 +- src/libnm-systemd-core/src/systemd/sd-dhcp-lease.h | 7 + .../src/systemd/sd-dhcp6-client.h | 169 +- .../src/systemd/sd-dhcp6-lease.h | 4 + src/libnm-systemd-core/src/systemd/sd-event.h | 2 + src/libnm-systemd-core/src/systemd/sd-ipv4acd.h | 63 - src/libnm-systemd-core/src/systemd/sd-ipv4ll.h | 65 - src/libnm-systemd-core/src/systemd/sd-ndisc.h | 3 - .../sd-adapt-shared/filesystems.h | 3 + src/libnm-systemd-shared/sd-adapt-shared/hmac.h | 3 + .../sd-adapt-shared/missing_magic.h | 2 + .../sd-adapt-shared/netif-util.h | 3 + src/libnm-systemd-shared/src/basic/alloc-util.h | 51 +- src/libnm-systemd-shared/src/basic/cgroup-util.h | 28 + src/libnm-systemd-shared/src/basic/env-util.c | 22 +- src/libnm-systemd-shared/src/basic/errno-util.h | 38 +- src/libnm-systemd-shared/src/basic/escape.c | 6 +- src/libnm-systemd-shared/src/basic/escape.h | 2 +- .../src/basic/ether-addr-util.c | 216 +- .../src/basic/ether-addr-util.h | 56 +- src/libnm-systemd-shared/src/basic/fd-util.c | 261 +- src/libnm-systemd-shared/src/basic/fd-util.h | 15 +- src/libnm-systemd-shared/src/basic/fileio.c | 24 +- src/libnm-systemd-shared/src/basic/fileio.h | 5 +- src/libnm-systemd-shared/src/basic/format-util.h | 8 +- src/libnm-systemd-shared/src/basic/fs-util.c | 188 +- src/libnm-systemd-shared/src/basic/fs-util.h | 6 +- src/libnm-systemd-shared/src/basic/hostname-util.c | 3 +- src/libnm-systemd-shared/src/basic/hostname-util.h | 7 +- src/libnm-systemd-shared/src/basic/in-addr-util.c | 125 +- src/libnm-systemd-shared/src/basic/in-addr-util.h | 12 + src/libnm-systemd-shared/src/basic/inotify-util.c | 18 +- src/libnm-systemd-shared/src/basic/list.h | 11 +- src/libnm-systemd-shared/src/basic/log.h | 9 +- src/libnm-systemd-shared/src/basic/macro.h | 27 +- .../src/basic/missing_syscall.h | 66 +- src/libnm-systemd-shared/src/basic/parse-util.c | 6 +- src/libnm-systemd-shared/src/basic/path-util.c | 38 +- src/libnm-systemd-shared/src/basic/process-util.c | 156 +- src/libnm-systemd-shared/src/basic/process-util.h | 47 +- src/libnm-systemd-shared/src/basic/random-util.c | 18 +- src/libnm-systemd-shared/src/basic/signal-util.c | 20 +- src/libnm-systemd-shared/src/basic/socket-util.c | 60 +- src/libnm-systemd-shared/src/basic/socket-util.h | 5 + src/libnm-systemd-shared/src/basic/sort-util.h | 22 +- src/libnm-systemd-shared/src/basic/sparse-endian.h | 12 +- src/libnm-systemd-shared/src/basic/stat-util.c | 51 +- src/libnm-systemd-shared/src/basic/string-util.h | 4 + src/libnm-systemd-shared/src/basic/strv.c | 88 +- src/libnm-systemd-shared/src/basic/strv.h | 52 +- src/libnm-systemd-shared/src/basic/strxcpyx.c | 67 +- src/libnm-systemd-shared/src/basic/strxcpyx.h | 33 +- src/libnm-systemd-shared/src/basic/time-util.c | 12 +- src/libnm-systemd-shared/src/basic/tmpfile-util.c | 25 +- src/libnm-systemd-shared/src/basic/umask-util.h | 3 + src/libnm-systemd-shared/src/basic/utf8.c | 39 +- src/libnm-systemd-shared/src/basic/utf8.h | 2 + src/libnm-systemd-shared/src/basic/util.c | 66 - src/libnm-systemd-shared/src/basic/util.h | 46 +- .../src/fundamental/macro-fundamental.h | 72 +- .../src/fundamental/string-util-fundamental.c | 8 +- .../src/fundamental/string-util-fundamental.h | 4 +- src/libnm-systemd-shared/src/fundamental/type.h | 22 - .../src/fundamental/types-fundamental.h | 39 + src/libnm-systemd-shared/src/shared/dns-domain.c | 4 +- src/libnm-systemd-shared/src/shared/dns-domain.h | 4 + src/libnm-udev-aux/nm-udev-utils.c | 24 +- src/libnm-udev-aux/nm-udev-utils.h | 4 +- src/libnmc-base/nm-client-utils.c | 38 +- src/libnmc-base/nm-client-utils.h | 12 +- src/libnmc-base/nm-polkit-listener.c | 104 +- src/libnmc-base/nm-secret-agent-simple.c | 206 +- src/libnmc-base/nm-secret-agent-simple.h | 12 +- src/libnmc-base/nm-vpn-helpers.c | 94 +- src/libnmc-base/nm-vpn-helpers.h | 10 +- src/libnmc-base/qrcodegen.c | 2 +- src/libnmc-base/qrcodegen.h | 2 +- src/libnmc-setting/nm-meta-setting-access.c | 74 +- src/libnmc-setting/nm-meta-setting-access.h | 40 +- src/libnmc-setting/nm-meta-setting-base-impl.c | 4 +- src/libnmc-setting/nm-meta-setting-base-impl.h | 16 +- src/libnmc-setting/nm-meta-setting-desc.c | 598 +- src/libnmc-setting/nm-meta-setting-desc.h | 94 +- src/libnmc-setting/settings-docs-input.xml | 2 +- src/libnmc-setting/settings-docs.h | 1 + src/libnmc-setting/settings-docs.h.in | 1 + src/libnmc-setting/tests/test-libnmc-setting.c | 98 +- src/libnmt-newt/nmt-newt-button-box.c | 16 +- src/libnmt-newt/nmt-newt-button.c | 6 +- src/libnmt-newt/nmt-newt-checkbox.c | 10 +- src/libnmt-newt/nmt-newt-component.c | 8 +- src/libnmt-newt/nmt-newt-container.c | 8 +- src/libnmt-newt/nmt-newt-entry-numeric.c | 10 +- src/libnmt-newt/nmt-newt-entry.c | 16 +- src/libnmt-newt/nmt-newt-entry.h | 2 +- src/libnmt-newt/nmt-newt-form.c | 18 +- src/libnmt-newt/nmt-newt-grid.c | 32 +- src/libnmt-newt/nmt-newt-hacks.c | 10 +- src/libnmt-newt/nmt-newt-label.c | 6 +- src/libnmt-newt/nmt-newt-listbox.c | 12 +- src/libnmt-newt/nmt-newt-popup.c | 18 +- src/libnmt-newt/nmt-newt-section.c | 20 +- src/libnmt-newt/nmt-newt-stack.c | 8 +- src/libnmt-newt/nmt-newt-textbox.c | 14 +- src/libnmt-newt/nmt-newt-toggle-button.c | 12 +- src/libnmt-newt/nmt-newt-utils.c | 24 +- src/nm-cloud-setup/main.c | 122 +- src/nm-cloud-setup/nm-cloud-setup-utils.c | 54 +- src/nm-cloud-setup/nm-cloud-setup-utils.h | 28 +- src/nm-cloud-setup/nm-http-client.c | 104 +- src/nm-cloud-setup/nm-http-client.h | 30 +- src/nm-cloud-setup/nmcs-provider-aliyun.c | 48 +- src/nm-cloud-setup/nmcs-provider-azure.c | 78 +- src/nm-cloud-setup/nmcs-provider-ec2.c | 42 +- src/nm-cloud-setup/nmcs-provider-gcp.c | 64 +- src/nm-cloud-setup/nmcs-provider.c | 20 +- src/nm-cloud-setup/nmcs-provider.h | 16 +- .../tests/test-cloud-setup-general.c | 8 +- src/nm-dispatcher/nm-dispatcher-utils.c | 68 +- src/nm-dispatcher/nm-dispatcher-utils.h | 30 +- src/nm-dispatcher/nm-dispatcher.c | 82 +- src/nm-dispatcher/tests/test-dispatcher-envp.c | 146 +- src/nm-initrd-generator/nm-initrd-generator.c | 55 +- src/nm-initrd-generator/nm-initrd-generator.h | 7 +- src/nm-initrd-generator/nmi-cmdline-reader.c | 265 +- src/nm-initrd-generator/nmi-dt-reader.c | 46 +- src/nm-initrd-generator/nmi-ibft-reader.c | 52 +- .../tests/test-cmdline-reader.c | 471 +- src/nm-initrd-generator/tests/test-dt-reader.c | 20 +- src/nm-initrd-generator/tests/test-ibft-reader.c | 62 +- src/nm-online/nm-online.c | 8 +- src/nm-priv-helper/nm-priv-helper.c | 42 +- src/nmcli/agent.c | 23 +- src/nmcli/common.c | 152 +- src/nmcli/common.h | 32 +- src/nmcli/connections.c | 1133 +-- src/nmcli/connections.h | 8 +- src/nmcli/devices.c | 524 +- src/nmcli/general.c | 93 +- src/nmcli/generate-docs-nm-settings-nmcli.c | 10 +- src/nmcli/generate-docs-nm-settings-nmcli.xml | 2 + src/nmcli/generate-docs-nm-settings-nmcli.xml.in | 2 + src/nmcli/nmcli.c | 26 +- src/nmcli/nmcli.h | 14 +- src/nmcli/polkit-agent.c | 2 +- src/nmcli/settings.c | 78 +- src/nmcli/settings.h | 18 +- src/nmcli/utils.c | 174 +- src/nmcli/utils.h | 54 +- src/nmtui/nm-editor-bindings.c | 200 +- src/nmtui/nm-editor-bindings.h | 68 +- src/nmtui/nm-editor-utils.c | 44 +- src/nmtui/nm-editor-utils.h | 2 +- src/nmtui/nmt-address-list.c | 20 +- src/nmtui/nmt-connect-connection-list.c | 86 +- src/nmtui/nmt-connect-connection-list.h | 18 +- src/nmtui/nmt-device-entry.c | 48 +- src/nmtui/nmt-device-entry.h | 4 +- src/nmtui/nmt-edit-connection-list.c | 42 +- src/nmtui/nmt-edit-connection-list.h | 2 +- src/nmtui/nmt-editor-grid.c | 50 +- src/nmtui/nmt-editor-grid.h | 6 +- src/nmtui/nmt-editor-page-device.c | 8 +- src/nmtui/nmt-editor-page.c | 2 +- src/nmtui/nmt-editor-section.c | 8 +- src/nmtui/nmt-editor-section.h | 2 +- src/nmtui/nmt-editor.c | 44 +- src/nmtui/nmt-ip-entry.c | 2 +- src/nmtui/nmt-mac-entry.c | 2 +- src/nmtui/nmt-mtu-entry.c | 8 +- src/nmtui/nmt-page-bond-port.c | 10 +- src/nmtui/nmt-page-bond.c | 58 +- src/nmtui/nmt-page-bridge-port.c | 10 +- src/nmtui/nmt-page-bridge.c | 14 +- src/nmtui/nmt-page-dsl.c | 16 +- src/nmtui/nmt-page-ethernet.c | 12 +- src/nmtui/nmt-page-infiniband.c | 12 +- src/nmtui/nmt-page-ip-tunnel.c | 18 +- src/nmtui/nmt-page-ip4.c | 18 +- src/nmtui/nmt-page-ip6.c | 18 +- src/nmtui/nmt-page-ppp.c | 32 +- src/nmtui/nmt-page-team-port.c | 18 +- src/nmtui/nmt-page-team.c | 26 +- src/nmtui/nmt-page-vlan.c | 12 +- src/nmtui/nmt-page-wifi.c | 44 +- src/nmtui/nmt-page-wireguard.c | 12 +- src/nmtui/nmt-password-dialog.c | 18 +- src/nmtui/nmt-password-dialog.h | 4 +- src/nmtui/nmt-password-fields.c | 12 +- src/nmtui/nmt-route-editor.c | 12 +- src/nmtui/nmt-route-entry.c | 10 +- src/nmtui/nmt-route-table.c | 32 +- src/nmtui/nmt-slave-list.c | 12 +- src/nmtui/nmt-slave-list.h | 2 +- src/nmtui/nmt-utils.c | 2 +- src/nmtui/nmt-widget-list.c | 8 +- src/nmtui/nmt-widget-list.h | 2 +- src/nmtui/nmt-wireguard-peer-editor.c | 22 +- src/nmtui/nmt-wireguard-peer-list.c | 34 +- src/nmtui/nmtui-connect.c | 64 +- src/nmtui/nmtui-edit.c | 48 +- src/nmtui/nmtui-edit.h | 6 +- src/nmtui/nmtui-hostname.c | 14 +- src/nmtui/nmtui.c | 26 +- .../test-client.check-on-disk/test_003.expected | 152 +- .../test-client.check-on-disk/test_004.expected | 132 +- tools/run-nm-test.sh | 5 + tools/test-networkmanager-service.py | 6 + 1147 files changed, 44652 insertions(+), 52133 deletions(-) delete mode 100644 src/core/devices/nm-acd-manager.c delete mode 100644 src/core/devices/nm-acd-manager.h delete mode 100644 src/core/devices/tests/test-acd.c create mode 100644 src/core/devices/wifi/nm-device-iwd-p2p.c create mode 100644 src/core/devices/wifi/nm-device-iwd-p2p.h delete mode 100644 src/core/nm-iface-helper.c delete mode 100644 src/core/nm-ip4-config.c delete mode 100644 src/core/nm-ip4-config.h delete mode 100644 src/core/nm-ip6-config.c delete mode 100644 src/core/nm-ip6-config.h delete mode 100644 src/core/nm-proxy-config.c delete mode 100644 src/core/nm-proxy-config.h create mode 100644 src/core/ppp/nm-ppp-mgr.c create mode 100644 src/core/ppp/nm-ppp-mgr.h delete mode 100644 src/core/tests/test-ip4-config.c delete mode 100644 src/core/tests/test-ip6-config.c delete mode 100644 src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c delete mode 100644 src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c delete mode 100644 src/libnm-systemd-core/src/systemd/sd-ipv4acd.h delete mode 100644 src/libnm-systemd-core/src/systemd/sd-ipv4ll.h create mode 100644 src/libnm-systemd-shared/sd-adapt-shared/filesystems.h create mode 100644 src/libnm-systemd-shared/sd-adapt-shared/hmac.h create mode 100644 src/libnm-systemd-shared/sd-adapt-shared/netif-util.h delete mode 100644 src/libnm-systemd-shared/src/fundamental/type.h create mode 100644 src/libnm-systemd-shared/src/fundamental/types-fundamental.h diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f5de7da..246bcdbb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,8 +69,24 @@ $ git config --add 'blame.ignoreRevsFile' '.git-blame-ignore-revs' ### Style -Since our coding style is entirely automated, the following are just -some details of the style we use: +As we use clang-format, our style is in parts determined by the tool. +Run the tool to format the code. See the earlier point. + +The formatting tool cannot cover all questions. The most important rule is +to mimic the existing code and *imitate the surrounding style*. + +In general, we require to build without compiler warnings, for the warnings +that we enable. Our language is C11 with some GCC-isms (like typeof(), +expression statements, cleanup attribute). In practice, we support various versions +of GCC and clang. The supported C "dialect", compilers and libc are those that we +can practically build and test in our CI. We don't target a theoretical, pure C11/POSIX +standard or a libc/compiler that we cannot test. +Patches for making NetworkManager more portable are welcome, if there is a +practical use and checked by CI. Glibc and musl libc are supported. + +We follow a mixture of [glib's](https://developer.gnome.org/documentation/guidelines/programming/coding-style.html) +and [systemd's](https://github.com/systemd/systemd/blob/main/docs/CODING_STYLE.md) style, which already have extensive +guidelines. Following there are a few noteworthy points. * Use cleanup functions (`gs_free`, `gs_*`, `nm_auto*`) to let a stack variable own a resource instead of explicit free. Combine them with @@ -84,6 +100,10 @@ some details of the style we use: * Don't use `GDBusProxy` or `GDBusObjectManager`. Use plain `GDBusConnection`. +* Names in our header files should always have an "nm" prefix (like "nm_", + "NM_", "_nm_", "_nmp_"). Names in source files usually should not have an + "nm" prefix. + * Indent with spaces. (_no_ tabs). * C-style comments @@ -101,14 +121,8 @@ some details of the style we use: - GOOD: `#define MY_CONSTANT 42` - BAD: `static const unsigned myConstant = 42;` -Additionally, we require to build without compiler warnings for the warnings -that we enable. Also, our language is C11 with some GCC-isms (like typeof(), -expression statements, cleanup attribute). In practice, we support various versions -of GCC and clang. The supported C "dialect", compilers and libc are those that we -can practically build and test in our CI. We don't target a theoretical, pure C11/POSIX -standard or a libc/compiler that we cannot test. -Patches for making NetworkManager more portable are welcome, if there is a -practical use and CI tests. Glibc and musl libc are supported. +* Always use curly braces for blocks that span multiple lines. For single lines + the braces may be omitted, but are not prohibited. ### Checkpatch diff --git a/Makefile.am b/Makefile.am index 1c51afbf..ed4ffb04 100644 --- a/Makefile.am +++ b/Makefile.am @@ -202,7 +202,8 @@ data_edit = sed \ -e 's|@NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT)|g' \ -e 's|@NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT)|g' \ -e 's|@NM_CONFIG_DEFAULT_MAIN_RC_MANAGER[@]|$(NM_CONFIG_DEFAULT_MAIN_RC_MANAGER)|g' \ - -e 's|@NM_CONFIG_DEFAULT_MAIN_DHCP[@]|$(NM_CONFIG_DEFAULT_MAIN_DHCP)|g' + -e 's|@NM_CONFIG_DEFAULT_MAIN_DHCP[@]|$(NM_CONFIG_DEFAULT_MAIN_DHCP)|g' \ + -e 's|@NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT[@]|$(NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT)|g' ############################################################################### @@ -2074,9 +2075,6 @@ src_core_ldflags = $(CODE_COVERAGE_LDFLAGS) sbin_PROGRAMS += \ src/core/NetworkManager -libexec_PROGRAMS += \ - src/core/nm-iface-helper - noinst_LTLIBRARIES += \ src/core/libNetworkManagerBase.la \ src/core/libNetworkManager.la \ @@ -2124,8 +2122,10 @@ src_libnm_systemd_shared_libnm_systemd_shared_la_SOURCES = \ src/libnm-systemd-shared/sd-adapt-shared/dhcp-server-internal.h \ src/libnm-systemd-shared/sd-adapt-shared/dirent-util.h \ src/libnm-systemd-shared/sd-adapt-shared/errno-list.h \ + src/libnm-systemd-shared/sd-adapt-shared/filesystems.h \ src/libnm-systemd-shared/sd-adapt-shared/glob-util.h \ src/libnm-systemd-shared/sd-adapt-shared/gunicode.h \ + src/libnm-systemd-shared/sd-adapt-shared/hmac.h \ src/libnm-systemd-shared/sd-adapt-shared/idn-util.h \ src/libnm-systemd-shared/sd-adapt-shared/ioprio.h \ src/libnm-systemd-shared/sd-adapt-shared/locale-util.h \ @@ -2140,6 +2140,7 @@ src_libnm_systemd_shared_libnm_systemd_shared_la_SOURCES = \ src/libnm-systemd-shared/sd-adapt-shared/missing_timerfd.h \ src/libnm-systemd-shared/sd-adapt-shared/mkdir.h \ src/libnm-systemd-shared/sd-adapt-shared/namespace-util.h \ + src/libnm-systemd-shared/sd-adapt-shared/netif-util.h \ src/libnm-systemd-shared/sd-adapt-shared/nm-sd-adapt-shared.h \ src/libnm-systemd-shared/sd-adapt-shared/nulstr-util.h \ src/libnm-systemd-shared/sd-adapt-shared/os-util.h \ @@ -2247,7 +2248,7 @@ src_libnm_systemd_shared_libnm_systemd_shared_la_SOURCES = \ src/libnm-systemd-shared/src/fundamental/macro-fundamental.h \ src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c \ src/libnm-systemd-shared/src/fundamental/string-util-fundamental.h \ - src/libnm-systemd-shared/src/fundamental/type.h \ + src/libnm-systemd-shared/src/fundamental/types-fundamental.h \ src/libnm-systemd-shared/src/shared/dns-domain.c \ src/libnm-systemd-shared/src/shared/dns-domain.h \ src/libnm-systemd-shared/src/shared/log-link.h \ @@ -2323,8 +2324,6 @@ src_libnm_systemd_core_libnm_systemd_core_la_SOURCES = \ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c \ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c \ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c \ - src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c \ - src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c \ src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c \ src/libnm-systemd-core/src/libsystemd/sd-event/event-source.h \ src/libnm-systemd-core/src/libsystemd/sd-event/event-util.c \ @@ -2342,8 +2341,6 @@ src_libnm_systemd_core_libnm_systemd_core_la_SOURCES = \ src/libnm-systemd-core/src/systemd/sd-dhcp6-option.h \ src/libnm-systemd-core/src/systemd/sd-event.h \ src/libnm-systemd-core/src/systemd/sd-id128.h \ - src/libnm-systemd-core/src/systemd/sd-ipv4acd.h \ - src/libnm-systemd-core/src/systemd/sd-ipv4ll.h \ src/libnm-systemd-core/src/systemd/sd-lldp-rx.h \ src/libnm-systemd-core/src/systemd/sd-lldp.h \ src/libnm-systemd-core/src/systemd/sd-ndisc.h \ @@ -2394,10 +2391,6 @@ src_core_libNetworkManagerBase_la_SOURCES = \ src/core/nm-l3cfg.h \ src/core/nm-ip-config.c \ src/core/nm-ip-config.h \ - src/core/nm-ip4-config.c \ - src/core/nm-ip4-config.h \ - src/core/nm-ip6-config.c \ - src/core/nm-ip6-config.h \ \ src/core/dhcp/nm-dhcp-client.c \ src/core/dhcp/nm-dhcp-client.h \ @@ -2436,8 +2429,6 @@ src_core_libNetworkManager_la_SOURCES = \ src/core/nm-checkpoint-manager.c \ src/core/nm-checkpoint-manager.h \ \ - src/core/devices/nm-acd-manager.c \ - src/core/devices/nm-acd-manager.h \ src/core/devices/nm-lldp-listener.c \ src/core/devices/nm-lldp-listener.h \ src/core/devices/nm-device-utils.c \ @@ -2513,6 +2504,8 @@ src_core_libNetworkManager_la_SOURCES = \ src/core/dnsmasq/nm-dnsmasq-utils.c \ src/core/dnsmasq/nm-dnsmasq-utils.h \ \ + src/core/ppp/nm-ppp-mgr.c \ + src/core/ppp/nm-ppp-mgr.h \ src/core/ppp/nm-ppp-manager-call.c \ src/core/ppp/nm-ppp-manager-call.h \ src/core/ppp/nm-ppp-manager.h \ @@ -2586,8 +2579,6 @@ src_core_libNetworkManager_la_SOURCES = \ src/core/nm-firewall-utils.h \ src/core/nm-firewalld-manager.c \ src/core/nm-firewalld-manager.h \ - src/core/nm-proxy-config.c \ - src/core/nm-proxy-config.h \ src/core/nm-auth-manager.c \ src/core/nm-auth-manager.h \ src/core/nm-auth-utils.c \ @@ -2721,44 +2712,6 @@ $(src_core_NetworkManager_OBJECTS): $(src_libnm_core_public_mkenums_h) ############################################################################### -src_core_nm_iface_helper_CPPFLAGS = $(src_core_cppflags) - -src_core_nm_iface_helper_SOURCES = \ - src/core/nm-iface-helper.c - -src_core_nm_iface_helper_LDADD = \ - src/core/libNetworkManagerBase.la \ - src/libnm-core-aux-extern/libnm-core-aux-extern.la \ - src/libnm-core-impl/libnm-core-impl.la \ - $(libnm_crypto_lib) \ - src/libnm-core-aux-intern/libnm-core-aux-intern.la \ - src/libnm-platform/libnm-platform.la \ - src/libnm-base/libnm-base.la \ - src/libnm-log-core/libnm-log-core.la \ - src/libnm-udev-aux/libnm-udev-aux.la \ - src/libnm-glib-aux/libnm-glib-aux.la \ - src/libnm-std-aux/libnm-std-aux.la \ - src/libnm-systemd-core/libnm-systemd-core.la \ - src/libnm-systemd-shared/libnm-systemd-shared.la \ - src/n-acd/libn-acd.la \ - src/n-dhcp4/libn-dhcp4.la \ - src/c-rbtree/libc-rbtree.la \ - src/c-siphash/libc-siphash.la \ - $(SYSTEMD_JOURNAL_LIBS) \ - $(GLIB_LIBS) \ - $(LIBUDEV_LIBS) \ - $(LIBNDP_LIBS) \ - $(DL_LIBS) \ - $(NULL) - -src_core_nm_iface_helper_LDFLAGS = \ - -Wl,--version-script="$(srcdir)/linker-script-binary.ver" \ - $(SANITIZER_EXEC_LDFLAGS) - -$(src_core_nm_iface_helper_OBJECTS): $(src_libnm_core_public_mkenums_h) - -############################################################################### - noinst_LTLIBRARIES += src/nm-initrd-generator/libnmi-core.la src_nm_initrd_generator_libnmi_core_la_CPPFLAGS = \ @@ -3985,6 +3938,8 @@ if WITH_IWD src_core_devices_wifi_libnm_wifi_base_la_SOURCES += \ src/core/devices/wifi/nm-device-iwd.c \ src/core/devices/wifi/nm-device-iwd.h \ + src/core/devices/wifi/nm-device-iwd-p2p.c \ + src/core/devices/wifi/nm-device-iwd-p2p.h \ src/core/devices/wifi/nm-iwd-manager.c \ src/core/devices/wifi/nm-iwd-manager.h \ $(NULL) @@ -4275,20 +4230,14 @@ src_core_devices_tests_ldflags = \ check_programs += \ src/core/devices/tests/test-lldp \ - src/core/devices/tests/test-acd + $(NULL) src_core_devices_tests_test_lldp_CPPFLAGS = $(src_core_cppflags_test) src_core_devices_tests_test_lldp_LDFLAGS = $(src_core_devices_tests_ldflags) src_core_devices_tests_test_lldp_LDADD = \ src/core/libNetworkManagerTest.la -src_core_devices_tests_test_acd_CPPFLAGS = $(src_core_cppflags_test) -src_core_devices_tests_test_acd_LDFLAGS = $(src_core_devices_tests_ldflags) -src_core_devices_tests_test_acd_LDADD = \ - src/core/libNetworkManagerTest.la - $(src_core_devices_tests_test_lldp_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_devices_tests_test_acd_OBJECTS): $(src_libnm_core_public_mkenums_h) EXTRA_DIST += \ src/core/devices/tests/meson.build @@ -4391,22 +4340,12 @@ check_programs += \ src/core/tests/test-core \ src/core/tests/test-core-with-expect \ src/core/tests/test-dcb \ - src/core/tests/test-ip4-config \ - src/core/tests/test-ip6-config \ src/core/tests/test-l3cfg \ src/core/tests/test-systemd \ src/core/tests/test-utils \ src/core/tests/test-wired-defname \ $(NULL) -src_core_tests_test_ip4_config_CPPFLAGS = $(src_core_cppflags_test) -src_core_tests_test_ip4_config_LDFLAGS = $(src_core_tests_ldflags) -src_core_tests_test_ip4_config_LDADD = $(src_core_tests_ldadd) - -src_core_tests_test_ip6_config_CPPFLAGS = $(src_core_cppflags_test) -src_core_tests_test_ip6_config_LDFLAGS = $(src_core_tests_ldflags) -src_core_tests_test_ip6_config_LDADD = $(src_core_tests_ldadd) - src_core_tests_test_dcb_CPPFLAGS = $(src_core_cppflags_test) src_core_tests_test_dcb_LDFLAGS = $(src_core_tests_ldflags) src_core_tests_test_dcb_LDADD = $(src_core_tests_ldadd) @@ -4434,8 +4373,6 @@ src_core_tests_test_l3cfg_LDADD = $(src_core_tests_ldadd) $(src_core_tests_test_core_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_core_with_expect_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_dcb_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_tests_test_ip4_config_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_tests_test_ip6_config_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_l3cfg_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_utils_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_wired_defname_OBJECTS): $(src_libnm_core_public_mkenums_h) diff --git a/Makefile.in b/Makefile.in index b4c2bca8..6b7bf804 100644 --- a/Makefile.in +++ b/Makefile.in @@ -143,7 +143,7 @@ check_PROGRAMS = $(am__EXEEXT_16) sbin_PROGRAMS = src/core/NetworkManager$(EXEEXT) bin_PROGRAMS = src/nm-online/nm-online$(EXEEXT) $(am__EXEEXT_1) \ $(am__EXEEXT_2) -libexec_PROGRAMS = src/core/nm-iface-helper$(EXEEXT) \ +libexec_PROGRAMS = \ src/nm-initrd-generator/nm-initrd-generator$(EXEEXT) \ src/core/dhcp/nm-dhcp-helper$(EXEEXT) \ src/nm-dispatcher/nm-dispatcher$(EXEEXT) \ @@ -256,6 +256,8 @@ TESTS = $(am__EXEEXT_11) @WITH_IWD_TRUE@@WITH_WIFI_TRUE@am__append_43 = \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd.c \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd.h \ +@WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd-p2p.c \ +@WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd-p2p.h \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-iwd-manager.c \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-iwd-manager.h \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ $(NULL) @@ -460,15 +462,12 @@ am__EXEEXT_11 = src/libnm-platform/tests/test-nm-platform$(EXEEXT) \ src/core/platform/tests/test-route-linux$(EXEEXT) \ src/core/platform/tests/test-tc-linux$(EXEEXT) \ src/core/devices/tests/test-lldp$(EXEEXT) \ - src/core/devices/tests/test-acd$(EXEEXT) \ src/core/ndisc/tests/test-ndisc-fake$(EXEEXT) \ src/core/supplicant/tests/test-supplicant-config$(EXEEXT) \ src/core/tests/config/test-config$(EXEEXT) \ src/core/tests/test-core$(EXEEXT) \ src/core/tests/test-core-with-expect$(EXEEXT) \ src/core/tests/test-dcb$(EXEEXT) \ - src/core/tests/test-ip4-config$(EXEEXT) \ - src/core/tests/test-ip6-config$(EXEEXT) \ src/core/tests/test-l3cfg$(EXEEXT) \ src/core/tests/test-systemd$(EXEEXT) \ src/core/tests/test-utils$(EXEEXT) \ @@ -830,9 +829,12 @@ am__src_core_devices_wifi_libnm_wifi_base_la_SOURCES_DIST = \ src/core/devices/wifi/nm-wifi-utils.h \ src/core/devices/wifi/nm-device-iwd.c \ src/core/devices/wifi/nm-device-iwd.h \ + src/core/devices/wifi/nm-device-iwd-p2p.c \ + src/core/devices/wifi/nm-device-iwd-p2p.h \ src/core/devices/wifi/nm-iwd-manager.c \ src/core/devices/wifi/nm-iwd-manager.h @WITH_IWD_TRUE@@WITH_WIFI_TRUE@am__objects_3 = src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd.lo \ +@WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/libnm_wifi_base_la-nm-iwd-manager.lo @WITH_WIFI_TRUE@am_src_core_devices_wifi_libnm_wifi_base_la_OBJECTS = src/core/devices/wifi/libnm_wifi_base_la-nm-device-olpc-mesh.lo \ @WITH_WIFI_TRUE@ src/core/devices/wifi/libnm_wifi_base_la-nm-device-wifi-p2p.lo \ @@ -914,7 +916,6 @@ src_core_libNetworkManager_la_DEPENDENCIES = \ am_src_core_libNetworkManager_la_OBJECTS = \ src/core/libNetworkManager_la-nm-checkpoint.lo \ src/core/libNetworkManager_la-nm-checkpoint-manager.lo \ - src/core/devices/libNetworkManager_la-nm-acd-manager.lo \ src/core/devices/libNetworkManager_la-nm-lldp-listener.lo \ src/core/devices/libNetworkManager_la-nm-device-utils.lo \ src/core/devices/libNetworkManager_la-nm-device.lo \ @@ -950,6 +951,7 @@ am_src_core_libNetworkManager_la_OBJECTS = \ src/core/dns/libNetworkManager_la-nm-dns-unbound.lo \ src/core/dnsmasq/libNetworkManager_la-nm-dnsmasq-manager.lo \ src/core/dnsmasq/libNetworkManager_la-nm-dnsmasq-utils.lo \ + src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo \ src/core/ppp/libNetworkManager_la-nm-ppp-manager-call.lo \ src/core/libNetworkManager_la-nm-hostname-manager.lo \ src/core/settings/libNetworkManager_la-nm-agent-manager.lo \ @@ -982,7 +984,6 @@ am_src_core_libNetworkManager_la_OBJECTS = \ src/core/libNetworkManager_la-nm-dispatcher.lo \ src/core/libNetworkManager_la-nm-firewall-utils.lo \ src/core/libNetworkManager_la-nm-firewalld-manager.lo \ - src/core/libNetworkManager_la-nm-proxy-config.lo \ src/core/libNetworkManager_la-nm-auth-manager.lo \ src/core/libNetworkManager_la-nm-auth-utils.lo \ src/core/libNetworkManager_la-nm-manager.lo \ @@ -1010,8 +1011,6 @@ am_src_core_libNetworkManagerBase_la_OBJECTS = \ src/core/libNetworkManagerBase_la-nm-l3-ipv6ll.lo \ src/core/libNetworkManagerBase_la-nm-l3cfg.lo \ src/core/libNetworkManagerBase_la-nm-ip-config.lo \ - src/core/libNetworkManagerBase_la-nm-ip4-config.lo \ - src/core/libNetworkManagerBase_la-nm-ip6-config.lo \ src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-client.lo \ src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-nettools.lo \ src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-utils.lo \ @@ -1492,8 +1491,6 @@ am_src_libnm_systemd_core_libnm_systemd_core_la_OBJECTS = src/libnm-systemd-core src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp-lease.lo \ src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp6-client.lo \ src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp6-lease.lo \ - src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo \ - src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo \ src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-lldp-rx.lo \ src/libnm-systemd-core/src/libsystemd/sd-event/libnm_systemd_core_la-event-util.lo \ src/libnm-systemd-core/src/libsystemd/sd-event/libnm_systemd_core_la-sd-event.lo \ @@ -1729,16 +1726,6 @@ src_core_devices_bluetooth_tests_nm_bt_test_LINK = $(LIBTOOL) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(src_core_devices_bluetooth_tests_nm_bt_test_LDFLAGS) \ $(LDFLAGS) -o $@ -src_core_devices_tests_test_acd_SOURCES = \ - src/core/devices/tests/test-acd.c -src_core_devices_tests_test_acd_OBJECTS = \ - src/core/devices/tests/test_acd-test-acd.$(OBJEXT) -src_core_devices_tests_test_acd_DEPENDENCIES = \ - src/core/libNetworkManagerTest.la -src_core_devices_tests_test_acd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) \ - $(src_core_devices_tests_test_acd_LDFLAGS) $(LDFLAGS) -o $@ src_core_devices_tests_test_lldp_SOURCES = \ src/core/devices/tests/test-lldp.c src_core_devices_tests_test_lldp_OBJECTS = \ @@ -1840,32 +1827,6 @@ src_core_ndisc_tests_test_ndisc_linux_LINK = $(LIBTOOL) $(AM_V_lt) \ $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(src_core_ndisc_tests_test_ndisc_linux_LDFLAGS) $(LDFLAGS) -o \ $@ -am_src_core_nm_iface_helper_OBJECTS = \ - src/core/nm_iface_helper-nm-iface-helper.$(OBJEXT) -src_core_nm_iface_helper_OBJECTS = \ - $(am_src_core_nm_iface_helper_OBJECTS) -src_core_nm_iface_helper_DEPENDENCIES = \ - src/core/libNetworkManagerBase.la \ - src/libnm-core-aux-extern/libnm-core-aux-extern.la \ - src/libnm-core-impl/libnm-core-impl.la $(libnm_crypto_lib) \ - src/libnm-core-aux-intern/libnm-core-aux-intern.la \ - src/libnm-platform/libnm-platform.la \ - src/libnm-base/libnm-base.la \ - src/libnm-log-core/libnm-log-core.la \ - src/libnm-udev-aux/libnm-udev-aux.la \ - src/libnm-glib-aux/libnm-glib-aux.la \ - src/libnm-std-aux/libnm-std-aux.la \ - src/libnm-systemd-core/libnm-systemd-core.la \ - src/libnm-systemd-shared/libnm-systemd-shared.la \ - src/n-acd/libn-acd.la src/n-dhcp4/libn-dhcp4.la \ - src/c-rbtree/libc-rbtree.la src/c-siphash/libc-siphash.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -src_core_nm_iface_helper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(src_core_nm_iface_helper_LDFLAGS) \ - $(LDFLAGS) -o $@ src_core_platform_tests_monitor_SOURCES = \ src/core/platform/tests/monitor.c src_core_platform_tests_monitor_OBJECTS = \ @@ -2070,24 +2031,6 @@ src_core_tests_test_dcb_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(src_core_tests_test_dcb_LDFLAGS) \ $(LDFLAGS) -o $@ -src_core_tests_test_ip4_config_SOURCES = \ - src/core/tests/test-ip4-config.c -src_core_tests_test_ip4_config_OBJECTS = \ - src/core/tests/test_ip4_config-test-ip4-config.$(OBJEXT) -src_core_tests_test_ip4_config_DEPENDENCIES = $(src_core_tests_ldadd) -src_core_tests_test_ip4_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) \ - $(src_core_tests_test_ip4_config_LDFLAGS) $(LDFLAGS) -o $@ -src_core_tests_test_ip6_config_SOURCES = \ - src/core/tests/test-ip6-config.c -src_core_tests_test_ip6_config_OBJECTS = \ - src/core/tests/test_ip6_config-test-ip6-config.$(OBJEXT) -src_core_tests_test_ip6_config_DEPENDENCIES = $(src_core_tests_ldadd) -src_core_tests_test_ip6_config_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) \ - $(src_core_tests_test_ip6_config_LDFLAGS) $(LDFLAGS) -o $@ src_core_tests_test_l3cfg_SOURCES = src/core/tests/test-l3cfg.c src_core_tests_test_l3cfg_OBJECTS = \ src/core/tests/test_l3cfg-test-l3cfg.$(OBJEXT) @@ -2777,8 +2720,6 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-object.Plo \ src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-utils.Plo \ src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip-config.Plo \ - src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Plo \ - src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Plo \ src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-config-data.Plo \ src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv4ll.Plo \ src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv6ll.Plo \ @@ -2806,12 +2747,9 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/core/$(DEPDIR)/libNetworkManager_la-nm-pacrunner-manager.Plo \ src/core/$(DEPDIR)/libNetworkManager_la-nm-policy.Plo \ src/core/$(DEPDIR)/libNetworkManager_la-nm-priv-helper-call.Plo \ - src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Plo \ src/core/$(DEPDIR)/libNetworkManager_la-nm-rfkill-manager.Plo \ src/core/$(DEPDIR)/libNetworkManager_la-nm-session-monitor.Plo \ src/core/$(DEPDIR)/libNetworkManager_la-nm-sleep-monitor.Plo \ - src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Po \ - src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Plo \ src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-6lowpan.Plo \ src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bond.Plo \ src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bridge.Plo \ @@ -2849,9 +2787,9 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/core/devices/ovs/$(DEPDIR)/libnm_device_plugin_ovs_la-nm-ovsdb.Plo \ src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-device-team.Plo \ src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-team-factory.Plo \ - src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Po \ src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Po \ src/core/devices/wifi/$(DEPDIR)/libnm_device_plugin_wifi_la-nm-wifi-factory.Plo \ + src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Plo \ src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd.Plo \ src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-olpc-mesh.Plo \ src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-wifi-p2p.Plo \ @@ -2913,6 +2851,7 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/core/platform/tests/$(DEPDIR)/test_route_linux-test-route.Po \ src/core/platform/tests/$(DEPDIR)/test_tc_linux-test-tc.Po \ src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo \ + src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo \ src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo \ src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo \ src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo \ @@ -2948,8 +2887,6 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/core/tests/$(DEPDIR)/test_core-test-core.Po \ src/core/tests/$(DEPDIR)/test_core_with_expect-test-core-with-expect.Po \ src/core/tests/$(DEPDIR)/test_dcb-test-dcb.Po \ - src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Po \ - src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Po \ src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Po \ src/core/tests/$(DEPDIR)/test_systemd-test-systemd.Po \ src/core/tests/$(DEPDIR)/test_utils-test-utils.Po \ @@ -3154,8 +3091,6 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp-lease.Plo \ src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-client.Plo \ src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-lease.Plo \ - src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Plo \ - src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Plo \ src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Plo \ src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-event-util.Plo \ src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-sd-event.Plo \ @@ -3426,7 +3361,6 @@ SOURCES = $(src_libnmt_newt_libnmt_newt_a_SOURCES) \ $(src_core_NetworkManager_SOURCES) \ $(src_core_NetworkManager_all_sym_SOURCES) \ src/core/devices/bluetooth/tests/nm-bt-test.c \ - src/core/devices/tests/test-acd.c \ src/core/devices/tests/test-lldp.c \ $(src_core_devices_wifi_tests_test_devices_wifi_SOURCES) \ $(src_core_devices_wwan_tests_test_service_providers_SOURCES) \ @@ -3436,7 +3370,6 @@ SOURCES = $(src_libnmt_newt_libnmt_newt_a_SOURCES) \ src/core/dnsmasq/tests/test-dnsmasq-utils.c \ src/core/ndisc/tests/test-ndisc-fake.c \ src/core/ndisc/tests/test-ndisc-linux.c \ - $(src_core_nm_iface_helper_SOURCES) \ src/core/platform/tests/monitor.c \ $(src_core_platform_tests_test_address_fake_SOURCES) \ $(src_core_platform_tests_test_address_linux_SOURCES) \ @@ -3456,8 +3389,7 @@ SOURCES = $(src_libnmt_newt_libnmt_newt_a_SOURCES) \ $(src_core_tests_config_test_config_SOURCES) \ src/core/tests/test-core.c \ src/core/tests/test-core-with-expect.c \ - src/core/tests/test-dcb.c src/core/tests/test-ip4-config.c \ - src/core/tests/test-ip6-config.c src/core/tests/test-l3cfg.c \ + src/core/tests/test-dcb.c src/core/tests/test-l3cfg.c \ src/core/tests/test-systemd.c src/core/tests/test-utils.c \ src/core/tests/test-wired-defname.c \ src/libnm-client-aux-extern/tests/test-libnm-client-aux.c \ @@ -3554,7 +3486,6 @@ DIST_SOURCES = $(am__src_libnmt_newt_libnmt_newt_a_SOURCES_DIST) \ $(src_core_NetworkManager_SOURCES) \ $(src_core_NetworkManager_all_sym_SOURCES) \ src/core/devices/bluetooth/tests/nm-bt-test.c \ - src/core/devices/tests/test-acd.c \ src/core/devices/tests/test-lldp.c \ $(am__src_core_devices_wifi_tests_test_devices_wifi_SOURCES_DIST) \ $(am__src_core_devices_wwan_tests_test_service_providers_SOURCES_DIST) \ @@ -3564,7 +3495,6 @@ DIST_SOURCES = $(am__src_libnmt_newt_libnmt_newt_a_SOURCES_DIST) \ src/core/dnsmasq/tests/test-dnsmasq-utils.c \ src/core/ndisc/tests/test-ndisc-fake.c \ src/core/ndisc/tests/test-ndisc-linux.c \ - $(src_core_nm_iface_helper_SOURCES) \ src/core/platform/tests/monitor.c \ $(src_core_platform_tests_test_address_fake_SOURCES) \ $(src_core_platform_tests_test_address_linux_SOURCES) \ @@ -3584,8 +3514,7 @@ DIST_SOURCES = $(am__src_libnmt_newt_libnmt_newt_a_SOURCES_DIST) \ $(src_core_tests_config_test_config_SOURCES) \ src/core/tests/test-core.c \ src/core/tests/test-core-with-expect.c \ - src/core/tests/test-dcb.c src/core/tests/test-ip4-config.c \ - src/core/tests/test-ip6-config.c src/core/tests/test-l3cfg.c \ + src/core/tests/test-dcb.c src/core/tests/test-l3cfg.c \ src/core/tests/test-systemd.c src/core/tests/test-utils.c \ src/core/tests/test-wired-defname.c \ src/libnm-client-aux-extern/tests/test-libnm-client-aux.c \ @@ -4054,6 +3983,7 @@ NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT = @NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT@ NM_CONFIG_DEFAULT_MAIN_DHCP = @NM_CONFIG_DEFAULT_MAIN_DHCP@ NM_CONFIG_DEFAULT_MAIN_RC_MANAGER = @NM_CONFIG_DEFAULT_MAIN_RC_MANAGER@ +NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT = @NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT@ NM_DIST_VERSION = @NM_DIST_VERSION@ NM_LOG_COMPILER = @NM_LOG_COMPILER@ NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ @@ -5131,13 +5061,11 @@ check_programs = src/libnm-platform/tests/test-nm-platform \ src/core/platform/tests/test-route-fake \ src/core/platform/tests/test-route-linux \ src/core/platform/tests/test-tc-linux $(NULL) \ - src/core/devices/tests/test-lldp \ - src/core/devices/tests/test-acd \ + src/core/devices/tests/test-lldp $(NULL) \ src/core/ndisc/tests/test-ndisc-fake \ src/core/supplicant/tests/test-supplicant-config \ src/core/tests/config/test-config src/core/tests/test-core \ src/core/tests/test-core-with-expect src/core/tests/test-dcb \ - src/core/tests/test-ip4-config src/core/tests/test-ip6-config \ src/core/tests/test-l3cfg src/core/tests/test-systemd \ src/core/tests/test-utils src/core/tests/test-wired-defname \ $(NULL) src/nm-dispatcher/tests/test-dispatcher-envp \ @@ -5253,7 +5181,8 @@ data_edit = sed \ -e 's|@NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT)|g' \ -e 's|@NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT)|g' \ -e 's|@NM_CONFIG_DEFAULT_MAIN_RC_MANAGER[@]|$(NM_CONFIG_DEFAULT_MAIN_RC_MANAGER)|g' \ - -e 's|@NM_CONFIG_DEFAULT_MAIN_DHCP[@]|$(NM_CONFIG_DEFAULT_MAIN_DHCP)|g' + -e 's|@NM_CONFIG_DEFAULT_MAIN_DHCP[@]|$(NM_CONFIG_DEFAULT_MAIN_DHCP)|g' \ + -e 's|@NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT[@]|$(NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT)|g' ############################################################################### @@ -6670,8 +6599,10 @@ src_libnm_systemd_shared_libnm_systemd_shared_la_SOURCES = \ src/libnm-systemd-shared/sd-adapt-shared/dhcp-server-internal.h \ src/libnm-systemd-shared/sd-adapt-shared/dirent-util.h \ src/libnm-systemd-shared/sd-adapt-shared/errno-list.h \ + src/libnm-systemd-shared/sd-adapt-shared/filesystems.h \ src/libnm-systemd-shared/sd-adapt-shared/glob-util.h \ src/libnm-systemd-shared/sd-adapt-shared/gunicode.h \ + src/libnm-systemd-shared/sd-adapt-shared/hmac.h \ src/libnm-systemd-shared/sd-adapt-shared/idn-util.h \ src/libnm-systemd-shared/sd-adapt-shared/ioprio.h \ src/libnm-systemd-shared/sd-adapt-shared/locale-util.h \ @@ -6686,6 +6617,7 @@ src_libnm_systemd_shared_libnm_systemd_shared_la_SOURCES = \ src/libnm-systemd-shared/sd-adapt-shared/missing_timerfd.h \ src/libnm-systemd-shared/sd-adapt-shared/mkdir.h \ src/libnm-systemd-shared/sd-adapt-shared/namespace-util.h \ + src/libnm-systemd-shared/sd-adapt-shared/netif-util.h \ src/libnm-systemd-shared/sd-adapt-shared/nm-sd-adapt-shared.h \ src/libnm-systemd-shared/sd-adapt-shared/nulstr-util.h \ src/libnm-systemd-shared/sd-adapt-shared/os-util.h \ @@ -6793,7 +6725,7 @@ src_libnm_systemd_shared_libnm_systemd_shared_la_SOURCES = \ src/libnm-systemd-shared/src/fundamental/macro-fundamental.h \ src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c \ src/libnm-systemd-shared/src/fundamental/string-util-fundamental.h \ - src/libnm-systemd-shared/src/fundamental/type.h \ + src/libnm-systemd-shared/src/fundamental/types-fundamental.h \ src/libnm-systemd-shared/src/shared/dns-domain.c \ src/libnm-systemd-shared/src/shared/dns-domain.h \ src/libnm-systemd-shared/src/shared/log-link.h \ @@ -6867,8 +6799,6 @@ src_libnm_systemd_core_libnm_systemd_core_la_SOURCES = \ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c \ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c \ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c \ - src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c \ - src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c \ src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c \ src/libnm-systemd-core/src/libsystemd/sd-event/event-source.h \ src/libnm-systemd-core/src/libsystemd/sd-event/event-util.c \ @@ -6886,8 +6816,6 @@ src_libnm_systemd_core_libnm_systemd_core_la_SOURCES = \ src/libnm-systemd-core/src/systemd/sd-dhcp6-option.h \ src/libnm-systemd-core/src/systemd/sd-event.h \ src/libnm-systemd-core/src/systemd/sd-id128.h \ - src/libnm-systemd-core/src/systemd/sd-ipv4acd.h \ - src/libnm-systemd-core/src/systemd/sd-ipv4ll.h \ src/libnm-systemd-core/src/systemd/sd-lldp-rx.h \ src/libnm-systemd-core/src/systemd/sd-lldp.h \ src/libnm-systemd-core/src/systemd/sd-ndisc.h \ @@ -6935,10 +6863,6 @@ src_core_libNetworkManagerBase_la_SOURCES = \ src/core/nm-l3cfg.h \ src/core/nm-ip-config.c \ src/core/nm-ip-config.h \ - src/core/nm-ip4-config.c \ - src/core/nm-ip4-config.h \ - src/core/nm-ip6-config.c \ - src/core/nm-ip6-config.h \ \ src/core/dhcp/nm-dhcp-client.c \ src/core/dhcp/nm-dhcp-client.h \ @@ -6974,8 +6898,6 @@ src_core_libNetworkManager_la_SOURCES = \ src/core/nm-checkpoint-manager.c \ src/core/nm-checkpoint-manager.h \ \ - src/core/devices/nm-acd-manager.c \ - src/core/devices/nm-acd-manager.h \ src/core/devices/nm-lldp-listener.c \ src/core/devices/nm-lldp-listener.h \ src/core/devices/nm-device-utils.c \ @@ -7051,6 +6973,8 @@ src_core_libNetworkManager_la_SOURCES = \ src/core/dnsmasq/nm-dnsmasq-utils.c \ src/core/dnsmasq/nm-dnsmasq-utils.h \ \ + src/core/ppp/nm-ppp-mgr.c \ + src/core/ppp/nm-ppp-mgr.h \ src/core/ppp/nm-ppp-manager-call.c \ src/core/ppp/nm-ppp-manager-call.h \ src/core/ppp/nm-ppp-manager.h \ @@ -7124,8 +7048,6 @@ src_core_libNetworkManager_la_SOURCES = \ src/core/nm-firewall-utils.h \ src/core/nm-firewalld-manager.c \ src/core/nm-firewalld-manager.h \ - src/core/nm-proxy-config.c \ - src/core/nm-proxy-config.h \ src/core/nm-auth-manager.c \ src/core/nm-auth-manager.h \ src/core/nm-auth-utils.c \ @@ -7232,41 +7154,6 @@ src_core_NetworkManager_LDFLAGS = \ $(SANITIZER_EXEC_LDFLAGS) \ $(NULL) - -############################################################################### -src_core_nm_iface_helper_CPPFLAGS = $(src_core_cppflags) -src_core_nm_iface_helper_SOURCES = \ - src/core/nm-iface-helper.c - -src_core_nm_iface_helper_LDADD = \ - src/core/libNetworkManagerBase.la \ - src/libnm-core-aux-extern/libnm-core-aux-extern.la \ - src/libnm-core-impl/libnm-core-impl.la \ - $(libnm_crypto_lib) \ - src/libnm-core-aux-intern/libnm-core-aux-intern.la \ - src/libnm-platform/libnm-platform.la \ - src/libnm-base/libnm-base.la \ - src/libnm-log-core/libnm-log-core.la \ - src/libnm-udev-aux/libnm-udev-aux.la \ - src/libnm-glib-aux/libnm-glib-aux.la \ - src/libnm-std-aux/libnm-std-aux.la \ - src/libnm-systemd-core/libnm-systemd-core.la \ - src/libnm-systemd-shared/libnm-systemd-shared.la \ - src/n-acd/libn-acd.la \ - src/n-dhcp4/libn-dhcp4.la \ - src/c-rbtree/libc-rbtree.la \ - src/c-siphash/libc-siphash.la \ - $(SYSTEMD_JOURNAL_LIBS) \ - $(GLIB_LIBS) \ - $(LIBUDEV_LIBS) \ - $(LIBNDP_LIBS) \ - $(DL_LIBS) \ - $(NULL) - -src_core_nm_iface_helper_LDFLAGS = \ - -Wl,--version-script="$(srcdir)/linker-script-binary.ver" \ - $(SANITIZER_EXEC_LDFLAGS) - src_nm_initrd_generator_libnmi_core_la_CPPFLAGS = \ $(dflt_cppflags) \ -I$(srcdir)/src/libnm-core-public \ @@ -7851,11 +7738,6 @@ src_core_devices_tests_test_lldp_LDFLAGS = $(src_core_devices_tests_ldflags) src_core_devices_tests_test_lldp_LDADD = \ src/core/libNetworkManagerTest.la -src_core_devices_tests_test_acd_CPPFLAGS = $(src_core_cppflags_test) -src_core_devices_tests_test_acd_LDFLAGS = $(src_core_devices_tests_ldflags) -src_core_devices_tests_test_acd_LDADD = \ - src/core/libNetworkManagerTest.la - ############################################################################### # src/core/ndisc/tests @@ -7904,12 +7786,6 @@ src_core_tests_ldflags = \ src_core_tests_ldadd = \ src/core/libNetworkManagerTest.la -src_core_tests_test_ip4_config_CPPFLAGS = $(src_core_cppflags_test) -src_core_tests_test_ip4_config_LDFLAGS = $(src_core_tests_ldflags) -src_core_tests_test_ip4_config_LDADD = $(src_core_tests_ldadd) -src_core_tests_test_ip6_config_CPPFLAGS = $(src_core_cppflags_test) -src_core_tests_test_ip6_config_LDFLAGS = $(src_core_tests_ldflags) -src_core_tests_test_ip6_config_LDADD = $(src_core_tests_ldadd) src_core_tests_test_dcb_CPPFLAGS = $(src_core_cppflags_test) src_core_tests_test_dcb_LDFLAGS = $(src_core_tests_ldflags) src_core_tests_test_dcb_LDADD = $(src_core_tests_ldadd) @@ -9394,6 +9270,9 @@ src/core/devices/wifi/libnm_wifi_base_la-nm-wifi-utils.lo: \ src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd.lo: \ src/core/devices/wifi/$(am__dirstamp) \ src/core/devices/wifi/$(DEPDIR)/$(am__dirstamp) +src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo: \ + src/core/devices/wifi/$(am__dirstamp) \ + src/core/devices/wifi/$(DEPDIR)/$(am__dirstamp) src/core/devices/wifi/libnm_wifi_base_la-nm-iwd-manager.lo: \ src/core/devices/wifi/$(am__dirstamp) \ src/core/devices/wifi/$(DEPDIR)/$(am__dirstamp) @@ -9449,9 +9328,6 @@ src/core/devices/$(am__dirstamp): src/core/devices/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/core/devices/$(DEPDIR) @: > src/core/devices/$(DEPDIR)/$(am__dirstamp) -src/core/devices/libNetworkManager_la-nm-acd-manager.lo: \ - src/core/devices/$(am__dirstamp) \ - src/core/devices/$(DEPDIR)/$(am__dirstamp) src/core/devices/libNetworkManager_la-nm-lldp-listener.lo: \ src/core/devices/$(am__dirstamp) \ src/core/devices/$(DEPDIR)/$(am__dirstamp) @@ -9581,6 +9457,9 @@ src/core/ppp/$(am__dirstamp): src/core/ppp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/core/ppp/$(DEPDIR) @: > src/core/ppp/$(DEPDIR)/$(am__dirstamp) +src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo: \ + src/core/ppp/$(am__dirstamp) \ + src/core/ppp/$(DEPDIR)/$(am__dirstamp) src/core/ppp/libNetworkManager_la-nm-ppp-manager-call.lo: \ src/core/ppp/$(am__dirstamp) \ src/core/ppp/$(DEPDIR)/$(am__dirstamp) @@ -9688,8 +9567,6 @@ src/core/libNetworkManager_la-nm-firewall-utils.lo: \ src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) src/core/libNetworkManager_la-nm-firewalld-manager.lo: \ src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) -src/core/libNetworkManager_la-nm-proxy-config.lo: \ - src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) src/core/libNetworkManager_la-nm-auth-manager.lo: \ src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) src/core/libNetworkManager_la-nm-auth-utils.lo: \ @@ -9745,10 +9622,6 @@ src/core/libNetworkManagerBase_la-nm-l3cfg.lo: \ src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) src/core/libNetworkManagerBase_la-nm-ip-config.lo: \ src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) -src/core/libNetworkManagerBase_la-nm-ip4-config.lo: \ - src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) -src/core/libNetworkManagerBase_la-nm-ip6-config.lo: \ - src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-client.lo: \ src/core/dhcp/$(am__dirstamp) \ src/core/dhcp/$(DEPDIR)/$(am__dirstamp) @@ -10564,12 +10437,6 @@ src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp6-cli src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp6-lease.lo: \ src/libnm-systemd-core/src/libsystemd-network/$(am__dirstamp) \ src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/$(am__dirstamp) -src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo: \ - src/libnm-systemd-core/src/libsystemd-network/$(am__dirstamp) \ - src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/$(am__dirstamp) -src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo: \ - src/libnm-systemd-core/src/libsystemd-network/$(am__dirstamp) \ - src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/$(am__dirstamp) src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-lldp-rx.lo: \ src/libnm-systemd-core/src/libsystemd-network/$(am__dirstamp) \ src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/$(am__dirstamp) @@ -11037,13 +10904,6 @@ src/core/devices/tests/$(am__dirstamp): src/core/devices/tests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/core/devices/tests/$(DEPDIR) @: > src/core/devices/tests/$(DEPDIR)/$(am__dirstamp) -src/core/devices/tests/test_acd-test-acd.$(OBJEXT): \ - src/core/devices/tests/$(am__dirstamp) \ - src/core/devices/tests/$(DEPDIR)/$(am__dirstamp) - -src/core/devices/tests/test-acd$(EXEEXT): $(src_core_devices_tests_test_acd_OBJECTS) $(src_core_devices_tests_test_acd_DEPENDENCIES) $(EXTRA_src_core_devices_tests_test_acd_DEPENDENCIES) src/core/devices/tests/$(am__dirstamp) - @rm -f src/core/devices/tests/test-acd$(EXEEXT) - $(AM_V_CCLD)$(src_core_devices_tests_test_acd_LINK) $(src_core_devices_tests_test_acd_OBJECTS) $(src_core_devices_tests_test_acd_LDADD) $(LIBS) src/core/devices/tests/test_lldp-test-lldp.$(OBJEXT): \ src/core/devices/tests/$(am__dirstamp) \ src/core/devices/tests/$(DEPDIR)/$(am__dirstamp) @@ -11140,12 +11000,6 @@ src/core/ndisc/tests/test_ndisc_linux-test-ndisc-linux.$(OBJEXT): \ src/core/ndisc/tests/test-ndisc-linux$(EXEEXT): $(src_core_ndisc_tests_test_ndisc_linux_OBJECTS) $(src_core_ndisc_tests_test_ndisc_linux_DEPENDENCIES) $(EXTRA_src_core_ndisc_tests_test_ndisc_linux_DEPENDENCIES) src/core/ndisc/tests/$(am__dirstamp) @rm -f src/core/ndisc/tests/test-ndisc-linux$(EXEEXT) $(AM_V_CCLD)$(src_core_ndisc_tests_test_ndisc_linux_LINK) $(src_core_ndisc_tests_test_ndisc_linux_OBJECTS) $(src_core_ndisc_tests_test_ndisc_linux_LDADD) $(LIBS) -src/core/nm_iface_helper-nm-iface-helper.$(OBJEXT): \ - src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp) - -src/core/nm-iface-helper$(EXEEXT): $(src_core_nm_iface_helper_OBJECTS) $(src_core_nm_iface_helper_DEPENDENCIES) $(EXTRA_src_core_nm_iface_helper_DEPENDENCIES) src/core/$(am__dirstamp) - @rm -f src/core/nm-iface-helper$(EXEEXT) - $(AM_V_CCLD)$(src_core_nm_iface_helper_LINK) $(src_core_nm_iface_helper_OBJECTS) $(src_core_nm_iface_helper_LDADD) $(LIBS) src/core/platform/tests/monitor-monitor.$(OBJEXT): \ src/core/platform/tests/$(am__dirstamp) \ src/core/platform/tests/$(DEPDIR)/$(am__dirstamp) @@ -11325,20 +11179,6 @@ src/core/tests/test_dcb-test-dcb.$(OBJEXT): \ src/core/tests/test-dcb$(EXEEXT): $(src_core_tests_test_dcb_OBJECTS) $(src_core_tests_test_dcb_DEPENDENCIES) $(EXTRA_src_core_tests_test_dcb_DEPENDENCIES) src/core/tests/$(am__dirstamp) @rm -f src/core/tests/test-dcb$(EXEEXT) $(AM_V_CCLD)$(src_core_tests_test_dcb_LINK) $(src_core_tests_test_dcb_OBJECTS) $(src_core_tests_test_dcb_LDADD) $(LIBS) -src/core/tests/test_ip4_config-test-ip4-config.$(OBJEXT): \ - src/core/tests/$(am__dirstamp) \ - src/core/tests/$(DEPDIR)/$(am__dirstamp) - -src/core/tests/test-ip4-config$(EXEEXT): $(src_core_tests_test_ip4_config_OBJECTS) $(src_core_tests_test_ip4_config_DEPENDENCIES) $(EXTRA_src_core_tests_test_ip4_config_DEPENDENCIES) src/core/tests/$(am__dirstamp) - @rm -f src/core/tests/test-ip4-config$(EXEEXT) - $(AM_V_CCLD)$(src_core_tests_test_ip4_config_LINK) $(src_core_tests_test_ip4_config_OBJECTS) $(src_core_tests_test_ip4_config_LDADD) $(LIBS) -src/core/tests/test_ip6_config-test-ip6-config.$(OBJEXT): \ - src/core/tests/$(am__dirstamp) \ - src/core/tests/$(DEPDIR)/$(am__dirstamp) - -src/core/tests/test-ip6-config$(EXEEXT): $(src_core_tests_test_ip6_config_OBJECTS) $(src_core_tests_test_ip6_config_DEPENDENCIES) $(EXTRA_src_core_tests_test_ip6_config_DEPENDENCIES) src/core/tests/$(am__dirstamp) - @rm -f src/core/tests/test-ip6-config$(EXEEXT) - $(AM_V_CCLD)$(src_core_tests_test_ip6_config_LINK) $(src_core_tests_test_ip6_config_OBJECTS) $(src_core_tests_test_ip6_config_LDADD) $(LIBS) src/core/tests/test_l3cfg-test-l3cfg.$(OBJEXT): \ src/core/tests/$(am__dirstamp) \ src/core/tests/$(DEPDIR)/$(am__dirstamp) @@ -12033,8 +11873,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-utils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip-config.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-config-data.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv4ll.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv6ll.Plo@am__quote@ # am--include-marker @@ -12062,12 +11900,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-pacrunner-manager.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-policy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-priv-helper-call.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-rfkill-manager.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-session-monitor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libNetworkManager_la-nm-sleep-monitor.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-6lowpan.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bond.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bridge.Plo@am__quote@ # am--include-marker @@ -12105,9 +11940,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/ovs/$(DEPDIR)/libnm_device_plugin_ovs_la-nm-ovsdb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-device-team.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-team-factory.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/wifi/$(DEPDIR)/libnm_device_plugin_wifi_la-nm-wifi-factory.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-olpc-mesh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-wifi-p2p.Plo@am__quote@ # am--include-marker @@ -12169,6 +12004,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/core/platform/tests/$(DEPDIR)/test_route_linux-test-route.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/platform/tests/$(DEPDIR)/test_tc_linux-test-tc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo@am__quote@ # am--include-marker @@ -12204,8 +12040,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_core-test-core.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_core_with_expect-test-core-with-expect.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_dcb-test-dcb.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_systemd-test-systemd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/tests/$(DEPDIR)/test_utils-test-utils.Po@am__quote@ # am--include-marker @@ -12410,8 +12244,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp-lease.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-client.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-lease.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-event-util.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-sd-event.Plo@am__quote@ # am--include-marker @@ -13498,6 +13330,13 @@ src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd.lo: src/core/devices/wifi @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_wifi_libnm_wifi_base_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd.lo `test -f 'src/core/devices/wifi/nm-device-iwd.c' || echo '$(srcdir)/'`src/core/devices/wifi/nm-device-iwd.c +src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo: src/core/devices/wifi/nm-device-iwd-p2p.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_wifi_libnm_wifi_base_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo -MD -MP -MF src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Tpo -c -o src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo `test -f 'src/core/devices/wifi/nm-device-iwd-p2p.c' || echo '$(srcdir)/'`src/core/devices/wifi/nm-device-iwd-p2p.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Tpo src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/devices/wifi/nm-device-iwd-p2p.c' object='src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_wifi_libnm_wifi_base_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/devices/wifi/libnm_wifi_base_la-nm-device-iwd-p2p.lo `test -f 'src/core/devices/wifi/nm-device-iwd-p2p.c' || echo '$(srcdir)/'`src/core/devices/wifi/nm-device-iwd-p2p.c + src/core/devices/wifi/libnm_wifi_base_la-nm-iwd-manager.lo: src/core/devices/wifi/nm-iwd-manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_wifi_libnm_wifi_base_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/wifi/libnm_wifi_base_la-nm-iwd-manager.lo -MD -MP -MF src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-iwd-manager.Tpo -c -o src/core/devices/wifi/libnm_wifi_base_la-nm-iwd-manager.lo `test -f 'src/core/devices/wifi/nm-iwd-manager.c' || echo '$(srcdir)/'`src/core/devices/wifi/nm-iwd-manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-iwd-manager.Tpo src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-iwd-manager.Plo @@ -13568,13 +13407,6 @@ src/core/libNetworkManager_la-nm-checkpoint-manager.lo: src/core/nm-checkpoint-m @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/libNetworkManager_la-nm-checkpoint-manager.lo `test -f 'src/core/nm-checkpoint-manager.c' || echo '$(srcdir)/'`src/core/nm-checkpoint-manager.c -src/core/devices/libNetworkManager_la-nm-acd-manager.lo: src/core/devices/nm-acd-manager.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/libNetworkManager_la-nm-acd-manager.lo -MD -MP -MF src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Tpo -c -o src/core/devices/libNetworkManager_la-nm-acd-manager.lo `test -f 'src/core/devices/nm-acd-manager.c' || echo '$(srcdir)/'`src/core/devices/nm-acd-manager.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Tpo src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/devices/nm-acd-manager.c' object='src/core/devices/libNetworkManager_la-nm-acd-manager.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/devices/libNetworkManager_la-nm-acd-manager.lo `test -f 'src/core/devices/nm-acd-manager.c' || echo '$(srcdir)/'`src/core/devices/nm-acd-manager.c - src/core/devices/libNetworkManager_la-nm-lldp-listener.lo: src/core/devices/nm-lldp-listener.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/libNetworkManager_la-nm-lldp-listener.lo -MD -MP -MF src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-lldp-listener.Tpo -c -o src/core/devices/libNetworkManager_la-nm-lldp-listener.lo `test -f 'src/core/devices/nm-lldp-listener.c' || echo '$(srcdir)/'`src/core/devices/nm-lldp-listener.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-lldp-listener.Tpo src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-lldp-listener.Plo @@ -13820,6 +13652,13 @@ src/core/dnsmasq/libNetworkManager_la-nm-dnsmasq-utils.lo: src/core/dnsmasq/nm-d @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/dnsmasq/libNetworkManager_la-nm-dnsmasq-utils.lo `test -f 'src/core/dnsmasq/nm-dnsmasq-utils.c' || echo '$(srcdir)/'`src/core/dnsmasq/nm-dnsmasq-utils.c +src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo: src/core/ppp/nm-ppp-mgr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo -MD -MP -MF src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Tpo -c -o src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo `test -f 'src/core/ppp/nm-ppp-mgr.c' || echo '$(srcdir)/'`src/core/ppp/nm-ppp-mgr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Tpo src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/ppp/nm-ppp-mgr.c' object='src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/ppp/libNetworkManager_la-nm-ppp-mgr.lo `test -f 'src/core/ppp/nm-ppp-mgr.c' || echo '$(srcdir)/'`src/core/ppp/nm-ppp-mgr.c + src/core/ppp/libNetworkManager_la-nm-ppp-manager-call.lo: src/core/ppp/nm-ppp-manager-call.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/ppp/libNetworkManager_la-nm-ppp-manager-call.lo -MD -MP -MF src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Tpo -c -o src/core/ppp/libNetworkManager_la-nm-ppp-manager-call.lo `test -f 'src/core/ppp/nm-ppp-manager-call.c' || echo '$(srcdir)/'`src/core/ppp/nm-ppp-manager-call.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Tpo src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo @@ -14044,13 +13883,6 @@ src/core/libNetworkManager_la-nm-firewalld-manager.lo: src/core/nm-firewalld-man @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/libNetworkManager_la-nm-firewalld-manager.lo `test -f 'src/core/nm-firewalld-manager.c' || echo '$(srcdir)/'`src/core/nm-firewalld-manager.c -src/core/libNetworkManager_la-nm-proxy-config.lo: src/core/nm-proxy-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/libNetworkManager_la-nm-proxy-config.lo -MD -MP -MF src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Tpo -c -o src/core/libNetworkManager_la-nm-proxy-config.lo `test -f 'src/core/nm-proxy-config.c' || echo '$(srcdir)/'`src/core/nm-proxy-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Tpo src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/nm-proxy-config.c' object='src/core/libNetworkManager_la-nm-proxy-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/libNetworkManager_la-nm-proxy-config.lo `test -f 'src/core/nm-proxy-config.c' || echo '$(srcdir)/'`src/core/nm-proxy-config.c - src/core/libNetworkManager_la-nm-auth-manager.lo: src/core/nm-auth-manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManager_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/libNetworkManager_la-nm-auth-manager.lo -MD -MP -MF src/core/$(DEPDIR)/libNetworkManager_la-nm-auth-manager.Tpo -c -o src/core/libNetworkManager_la-nm-auth-manager.lo `test -f 'src/core/nm-auth-manager.c' || echo '$(srcdir)/'`src/core/nm-auth-manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libNetworkManager_la-nm-auth-manager.Tpo src/core/$(DEPDIR)/libNetworkManager_la-nm-auth-manager.Plo @@ -14205,20 +14037,6 @@ src/core/libNetworkManagerBase_la-nm-ip-config.lo: src/core/nm-ip-config.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManagerBase_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/libNetworkManagerBase_la-nm-ip-config.lo `test -f 'src/core/nm-ip-config.c' || echo '$(srcdir)/'`src/core/nm-ip-config.c -src/core/libNetworkManagerBase_la-nm-ip4-config.lo: src/core/nm-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) $(src_core_libNetworkManagerBase_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/libNetworkManagerBase_la-nm-ip4-config.lo -MD -MP -MF src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Tpo -c -o src/core/libNetworkManagerBase_la-nm-ip4-config.lo `test -f 'src/core/nm-ip4-config.c' || echo '$(srcdir)/'`src/core/nm-ip4-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Tpo src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/nm-ip4-config.c' object='src/core/libNetworkManagerBase_la-nm-ip4-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManagerBase_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/libNetworkManagerBase_la-nm-ip4-config.lo `test -f 'src/core/nm-ip4-config.c' || echo '$(srcdir)/'`src/core/nm-ip4-config.c - -src/core/libNetworkManagerBase_la-nm-ip6-config.lo: src/core/nm-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) $(src_core_libNetworkManagerBase_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/libNetworkManagerBase_la-nm-ip6-config.lo -MD -MP -MF src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Tpo -c -o src/core/libNetworkManagerBase_la-nm-ip6-config.lo `test -f 'src/core/nm-ip6-config.c' || echo '$(srcdir)/'`src/core/nm-ip6-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Tpo src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/nm-ip6-config.c' object='src/core/libNetworkManagerBase_la-nm-ip6-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManagerBase_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/libNetworkManagerBase_la-nm-ip6-config.lo `test -f 'src/core/nm-ip6-config.c' || echo '$(srcdir)/'`src/core/nm-ip6-config.c - src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-client.lo: src/core/dhcp/nm-dhcp-client.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_libNetworkManagerBase_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-client.lo -MD -MP -MF src/core/dhcp/$(DEPDIR)/libNetworkManagerBase_la-nm-dhcp-client.Tpo -c -o src/core/dhcp/libNetworkManagerBase_la-nm-dhcp-client.lo `test -f 'src/core/dhcp/nm-dhcp-client.c' || echo '$(srcdir)/'`src/core/dhcp/nm-dhcp-client.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/dhcp/$(DEPDIR)/libNetworkManagerBase_la-nm-dhcp-client.Tpo src/core/dhcp/$(DEPDIR)/libNetworkManagerBase_la-nm-dhcp-client.Plo @@ -15633,20 +15451,6 @@ src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp6-lea @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libnm_systemd_core_libnm_systemd_core_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-dhcp6-lease.lo `test -f 'src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c' || echo '$(srcdir)/'`src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c -src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo: src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libnm_systemd_core_libnm_systemd_core_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo -MD -MP -MF src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Tpo -c -o src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo `test -f 'src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c' || echo '$(srcdir)/'`src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Tpo src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c' object='src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libnm_systemd_core_libnm_systemd_core_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4acd.lo `test -f 'src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c' || echo '$(srcdir)/'`src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c - -src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo: src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libnm_systemd_core_libnm_systemd_core_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo -MD -MP -MF src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Tpo -c -o src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo `test -f 'src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c' || echo '$(srcdir)/'`src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Tpo src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c' object='src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libnm_systemd_core_libnm_systemd_core_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-ipv4ll.lo `test -f 'src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c' || echo '$(srcdir)/'`src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c - src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-lldp-rx.lo: src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libnm_systemd_core_libnm_systemd_core_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-lldp-rx.lo -MD -MP -MF src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Tpo -c -o src/libnm-systemd-core/src/libsystemd-network/libnm_systemd_core_la-sd-lldp-rx.lo `test -f 'src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c' || echo '$(srcdir)/'`src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Tpo src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Plo @@ -16319,20 +16123,6 @@ src/core/devices/bluetooth/tests/nm_bt_test-nm-bt-test.obj: src/core/devices/blu @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_bluetooth_tests_nm_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/devices/bluetooth/tests/nm_bt_test-nm-bt-test.obj `if test -f 'src/core/devices/bluetooth/tests/nm-bt-test.c'; then $(CYGPATH_W) 'src/core/devices/bluetooth/tests/nm-bt-test.c'; else $(CYGPATH_W) '$(srcdir)/src/core/devices/bluetooth/tests/nm-bt-test.c'; fi` -src/core/devices/tests/test_acd-test-acd.o: src/core/devices/tests/test-acd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_tests_test_acd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/tests/test_acd-test-acd.o -MD -MP -MF src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Tpo -c -o src/core/devices/tests/test_acd-test-acd.o `test -f 'src/core/devices/tests/test-acd.c' || echo '$(srcdir)/'`src/core/devices/tests/test-acd.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Tpo src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/devices/tests/test-acd.c' object='src/core/devices/tests/test_acd-test-acd.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_tests_test_acd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/devices/tests/test_acd-test-acd.o `test -f 'src/core/devices/tests/test-acd.c' || echo '$(srcdir)/'`src/core/devices/tests/test-acd.c - -src/core/devices/tests/test_acd-test-acd.obj: src/core/devices/tests/test-acd.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_tests_test_acd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/tests/test_acd-test-acd.obj -MD -MP -MF src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Tpo -c -o src/core/devices/tests/test_acd-test-acd.obj `if test -f 'src/core/devices/tests/test-acd.c'; then $(CYGPATH_W) 'src/core/devices/tests/test-acd.c'; else $(CYGPATH_W) '$(srcdir)/src/core/devices/tests/test-acd.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Tpo src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/devices/tests/test-acd.c' object='src/core/devices/tests/test_acd-test-acd.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_tests_test_acd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/devices/tests/test_acd-test-acd.obj `if test -f 'src/core/devices/tests/test-acd.c'; then $(CYGPATH_W) 'src/core/devices/tests/test-acd.c'; else $(CYGPATH_W) '$(srcdir)/src/core/devices/tests/test-acd.c'; fi` - src/core/devices/tests/test_lldp-test-lldp.o: src/core/devices/tests/test-lldp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_devices_tests_test_lldp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/devices/tests/test_lldp-test-lldp.o -MD -MP -MF src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Tpo -c -o src/core/devices/tests/test_lldp-test-lldp.o `test -f 'src/core/devices/tests/test-lldp.c' || echo '$(srcdir)/'`src/core/devices/tests/test-lldp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Tpo src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Po @@ -16473,20 +16263,6 @@ src/core/ndisc/tests/test_ndisc_linux-test-ndisc-linux.obj: src/core/ndisc/tests @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_ndisc_tests_test_ndisc_linux_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/ndisc/tests/test_ndisc_linux-test-ndisc-linux.obj `if test -f 'src/core/ndisc/tests/test-ndisc-linux.c'; then $(CYGPATH_W) 'src/core/ndisc/tests/test-ndisc-linux.c'; else $(CYGPATH_W) '$(srcdir)/src/core/ndisc/tests/test-ndisc-linux.c'; fi` -src/core/nm_iface_helper-nm-iface-helper.o: src/core/nm-iface-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_nm_iface_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/nm_iface_helper-nm-iface-helper.o -MD -MP -MF src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Tpo -c -o src/core/nm_iface_helper-nm-iface-helper.o `test -f 'src/core/nm-iface-helper.c' || echo '$(srcdir)/'`src/core/nm-iface-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Tpo src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/nm-iface-helper.c' object='src/core/nm_iface_helper-nm-iface-helper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_nm_iface_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/nm_iface_helper-nm-iface-helper.o `test -f 'src/core/nm-iface-helper.c' || echo '$(srcdir)/'`src/core/nm-iface-helper.c - -src/core/nm_iface_helper-nm-iface-helper.obj: src/core/nm-iface-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_nm_iface_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/nm_iface_helper-nm-iface-helper.obj -MD -MP -MF src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Tpo -c -o src/core/nm_iface_helper-nm-iface-helper.obj `if test -f 'src/core/nm-iface-helper.c'; then $(CYGPATH_W) 'src/core/nm-iface-helper.c'; else $(CYGPATH_W) '$(srcdir)/src/core/nm-iface-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Tpo src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/nm-iface-helper.c' object='src/core/nm_iface_helper-nm-iface-helper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_nm_iface_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/nm_iface_helper-nm-iface-helper.obj `if test -f 'src/core/nm-iface-helper.c'; then $(CYGPATH_W) 'src/core/nm-iface-helper.c'; else $(CYGPATH_W) '$(srcdir)/src/core/nm-iface-helper.c'; fi` - src/core/platform/tests/monitor-monitor.o: src/core/platform/tests/monitor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_platform_tests_monitor_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/platform/tests/monitor-monitor.o -MD -MP -MF src/core/platform/tests/$(DEPDIR)/monitor-monitor.Tpo -c -o src/core/platform/tests/monitor-monitor.o `test -f 'src/core/platform/tests/monitor.c' || echo '$(srcdir)/'`src/core/platform/tests/monitor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/platform/tests/$(DEPDIR)/monitor-monitor.Tpo src/core/platform/tests/$(DEPDIR)/monitor-monitor.Po @@ -16781,34 +16557,6 @@ src/core/tests/test_dcb-test-dcb.obj: src/core/tests/test-dcb.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_dcb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/tests/test_dcb-test-dcb.obj `if test -f 'src/core/tests/test-dcb.c'; then $(CYGPATH_W) 'src/core/tests/test-dcb.c'; else $(CYGPATH_W) '$(srcdir)/src/core/tests/test-dcb.c'; fi` -src/core/tests/test_ip4_config-test-ip4-config.o: src/core/tests/test-ip4-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip4_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/tests/test_ip4_config-test-ip4-config.o -MD -MP -MF src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Tpo -c -o src/core/tests/test_ip4_config-test-ip4-config.o `test -f 'src/core/tests/test-ip4-config.c' || echo '$(srcdir)/'`src/core/tests/test-ip4-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Tpo src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/tests/test-ip4-config.c' object='src/core/tests/test_ip4_config-test-ip4-config.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip4_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/tests/test_ip4_config-test-ip4-config.o `test -f 'src/core/tests/test-ip4-config.c' || echo '$(srcdir)/'`src/core/tests/test-ip4-config.c - -src/core/tests/test_ip4_config-test-ip4-config.obj: src/core/tests/test-ip4-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip4_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/tests/test_ip4_config-test-ip4-config.obj -MD -MP -MF src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Tpo -c -o src/core/tests/test_ip4_config-test-ip4-config.obj `if test -f 'src/core/tests/test-ip4-config.c'; then $(CYGPATH_W) 'src/core/tests/test-ip4-config.c'; else $(CYGPATH_W) '$(srcdir)/src/core/tests/test-ip4-config.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Tpo src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/tests/test-ip4-config.c' object='src/core/tests/test_ip4_config-test-ip4-config.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip4_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/tests/test_ip4_config-test-ip4-config.obj `if test -f 'src/core/tests/test-ip4-config.c'; then $(CYGPATH_W) 'src/core/tests/test-ip4-config.c'; else $(CYGPATH_W) '$(srcdir)/src/core/tests/test-ip4-config.c'; fi` - -src/core/tests/test_ip6_config-test-ip6-config.o: src/core/tests/test-ip6-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip6_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/tests/test_ip6_config-test-ip6-config.o -MD -MP -MF src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Tpo -c -o src/core/tests/test_ip6_config-test-ip6-config.o `test -f 'src/core/tests/test-ip6-config.c' || echo '$(srcdir)/'`src/core/tests/test-ip6-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Tpo src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/tests/test-ip6-config.c' object='src/core/tests/test_ip6_config-test-ip6-config.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip6_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/tests/test_ip6_config-test-ip6-config.o `test -f 'src/core/tests/test-ip6-config.c' || echo '$(srcdir)/'`src/core/tests/test-ip6-config.c - -src/core/tests/test_ip6_config-test-ip6-config.obj: src/core/tests/test-ip6-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip6_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/tests/test_ip6_config-test-ip6-config.obj -MD -MP -MF src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Tpo -c -o src/core/tests/test_ip6_config-test-ip6-config.obj `if test -f 'src/core/tests/test-ip6-config.c'; then $(CYGPATH_W) 'src/core/tests/test-ip6-config.c'; else $(CYGPATH_W) '$(srcdir)/src/core/tests/test-ip6-config.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Tpo src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/tests/test-ip6-config.c' object='src/core/tests/test_ip6_config-test-ip6-config.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_ip6_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/tests/test_ip6_config-test-ip6-config.obj `if test -f 'src/core/tests/test-ip6-config.c'; then $(CYGPATH_W) 'src/core/tests/test-ip6-config.c'; else $(CYGPATH_W) '$(srcdir)/src/core/tests/test-ip6-config.c'; fi` - src/core/tests/test_l3cfg-test-l3cfg.o: src/core/tests/test-l3cfg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_tests_test_l3cfg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/tests/test_l3cfg-test-l3cfg.o -MD -MP -MF src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Tpo -c -o src/core/tests/test_l3cfg-test-l3cfg.o `test -f 'src/core/tests/test-l3cfg.c' || echo '$(srcdir)/'`src/core/tests/test-l3cfg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Tpo src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Po @@ -19242,13 +18990,6 @@ src/core/devices/tests/test-lldp.log: src/core/devices/tests/test-lldp$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -src/core/devices/tests/test-acd.log: src/core/devices/tests/test-acd$(EXEEXT) - @p='src/core/devices/tests/test-acd$(EXEEXT)'; \ - b='src/core/devices/tests/test-acd'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) src/core/ndisc/tests/test-ndisc-fake.log: src/core/ndisc/tests/test-ndisc-fake$(EXEEXT) @p='src/core/ndisc/tests/test-ndisc-fake$(EXEEXT)'; \ b='src/core/ndisc/tests/test-ndisc-fake'; \ @@ -19291,20 +19032,6 @@ src/core/tests/test-dcb.log: src/core/tests/test-dcb$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -src/core/tests/test-ip4-config.log: src/core/tests/test-ip4-config$(EXEEXT) - @p='src/core/tests/test-ip4-config$(EXEEXT)'; \ - b='src/core/tests/test-ip4-config'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -src/core/tests/test-ip6-config.log: src/core/tests/test-ip6-config$(EXEEXT) - @p='src/core/tests/test-ip6-config$(EXEEXT)'; \ - b='src/core/tests/test-ip6-config'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) src/core/tests/test-l3cfg.log: src/core/tests/test-l3cfg$(EXEEXT) @p='src/core/tests/test-l3cfg$(EXEEXT)'; \ b='src/core/tests/test-l3cfg'; \ @@ -19887,8 +19614,6 @@ distclean: distclean-recursive -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-object.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-utils.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip-config.Plo - -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Plo - -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-config-data.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv4ll.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv6ll.Plo @@ -19916,12 +19641,9 @@ distclean: distclean-recursive -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-pacrunner-manager.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-policy.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-priv-helper-call.Plo - -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-rfkill-manager.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-session-monitor.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-sleep-monitor.Plo - -rm -f src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Po - -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Plo -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-6lowpan.Plo -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bond.Plo -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bridge.Plo @@ -19959,9 +19681,9 @@ distclean: distclean-recursive -rm -f src/core/devices/ovs/$(DEPDIR)/libnm_device_plugin_ovs_la-nm-ovsdb.Plo -rm -f src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-device-team.Plo -rm -f src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-team-factory.Plo - -rm -f src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Po -rm -f src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Po -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_device_plugin_wifi_la-nm-wifi-factory.Plo + -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Plo -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd.Plo -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-olpc-mesh.Plo -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-wifi-p2p.Plo @@ -20023,6 +19745,7 @@ distclean: distclean-recursive -rm -f src/core/platform/tests/$(DEPDIR)/test_route_linux-test-route.Po -rm -f src/core/platform/tests/$(DEPDIR)/test_tc_linux-test-tc.Po -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo + -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo -rm -f src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo -rm -f src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo -rm -f src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo @@ -20058,8 +19781,6 @@ distclean: distclean-recursive -rm -f src/core/tests/$(DEPDIR)/test_core-test-core.Po -rm -f src/core/tests/$(DEPDIR)/test_core_with_expect-test-core-with-expect.Po -rm -f src/core/tests/$(DEPDIR)/test_dcb-test-dcb.Po - -rm -f src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Po - -rm -f src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Po -rm -f src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Po -rm -f src/core/tests/$(DEPDIR)/test_systemd-test-systemd.Po -rm -f src/core/tests/$(DEPDIR)/test_utils-test-utils.Po @@ -20264,8 +19985,6 @@ distclean: distclean-recursive -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp-lease.Plo -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-client.Plo -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-lease.Plo - -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Plo - -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Plo -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Plo -rm -f src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-event-util.Plo -rm -f src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-sd-event.Plo @@ -20564,8 +20283,6 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-object.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-dbus-utils.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip-config.Plo - -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip4-config.Plo - -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-ip6-config.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-config-data.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv4ll.Plo -rm -f src/core/$(DEPDIR)/libNetworkManagerBase_la-nm-l3-ipv6ll.Plo @@ -20593,12 +20310,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-pacrunner-manager.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-policy.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-priv-helper-call.Plo - -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-proxy-config.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-rfkill-manager.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-session-monitor.Plo -rm -f src/core/$(DEPDIR)/libNetworkManager_la-nm-sleep-monitor.Plo - -rm -f src/core/$(DEPDIR)/nm_iface_helper-nm-iface-helper.Po - -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-acd-manager.Plo -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-6lowpan.Plo -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bond.Plo -rm -f src/core/devices/$(DEPDIR)/libNetworkManager_la-nm-device-bridge.Plo @@ -20636,9 +20350,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/core/devices/ovs/$(DEPDIR)/libnm_device_plugin_ovs_la-nm-ovsdb.Plo -rm -f src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-device-team.Plo -rm -f src/core/devices/team/$(DEPDIR)/libnm_device_plugin_team_la-nm-team-factory.Plo - -rm -f src/core/devices/tests/$(DEPDIR)/test_acd-test-acd.Po -rm -f src/core/devices/tests/$(DEPDIR)/test_lldp-test-lldp.Po -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_device_plugin_wifi_la-nm-wifi-factory.Plo + -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd-p2p.Plo -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-iwd.Plo -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-olpc-mesh.Plo -rm -f src/core/devices/wifi/$(DEPDIR)/libnm_wifi_base_la-nm-device-wifi-p2p.Plo @@ -20700,6 +20414,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/core/platform/tests/$(DEPDIR)/test_route_linux-test-route.Po -rm -f src/core/platform/tests/$(DEPDIR)/test_tc_linux-test-tc.Po -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo + -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo -rm -f src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo -rm -f src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo -rm -f src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo @@ -20735,8 +20450,6 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/core/tests/$(DEPDIR)/test_core-test-core.Po -rm -f src/core/tests/$(DEPDIR)/test_core_with_expect-test-core-with-expect.Po -rm -f src/core/tests/$(DEPDIR)/test_dcb-test-dcb.Po - -rm -f src/core/tests/$(DEPDIR)/test_ip4_config-test-ip4-config.Po - -rm -f src/core/tests/$(DEPDIR)/test_ip6_config-test-ip6-config.Po -rm -f src/core/tests/$(DEPDIR)/test_l3cfg-test-l3cfg.Po -rm -f src/core/tests/$(DEPDIR)/test_systemd-test-systemd.Po -rm -f src/core/tests/$(DEPDIR)/test_utils-test-utils.Po @@ -20941,8 +20654,6 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp-lease.Plo -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-client.Plo -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-dhcp6-lease.Plo - -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4acd.Plo - -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-ipv4ll.Plo -rm -f src/libnm-systemd-core/src/libsystemd-network/$(DEPDIR)/libnm_systemd_core_la-sd-lldp-rx.Plo -rm -f src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-event-util.Plo -rm -f src/libnm-systemd-core/src/libsystemd/sd-event/$(DEPDIR)/libnm_systemd_core_la-sd-event.Plo @@ -21439,8 +21150,6 @@ src/core/NetworkManager.ver: src/core/NetworkManager-all-sym $(core_plugins) $(src_core_NetworkManager_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_nm_iface_helper_OBJECTS): $(src_libnm_core_public_mkenums_h) - $(src_nm_initrd_generator_libnmi_core_la_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_nm_initrd_generator_nm_initrd_generator_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_nm_initrd_generator_tests_test_cmdline_reader_OBJECTS): $(src_libnm_core_public_mkenums_h) @@ -21550,7 +21259,6 @@ $(src_core_platform_tests_test_tc_fake_OBJECTS): $(src_libnm_core_publi $(src_core_platform_tests_test_tc_linux_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_devices_tests_test_lldp_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_devices_tests_test_acd_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_ndisc_tests_test_ndisc_linux_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_ndisc_tests_test_ndisc_fake_OBJECTS): $(src_libnm_core_public_mkenums_h) @@ -21562,8 +21270,6 @@ $(src_core_tests_config_test_config_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_core_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_core_with_expect_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_dcb_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_tests_test_ip4_config_OBJECTS): $(src_libnm_core_public_mkenums_h) -$(src_core_tests_test_ip6_config_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_l3cfg_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_utils_OBJECTS): $(src_libnm_core_public_mkenums_h) $(src_core_tests_test_wired_defname_OBJECTS): $(src_libnm_core_public_mkenums_h) diff --git a/NEWS b/NEWS index fe0f7fec..c1034116 100644 --- a/NEWS +++ b/NEWS @@ -1,15 +1,59 @@ +============================================= +NetworkManager-1.36-rc1 +Overview of changes since NetworkManager-1.34 +============================================= + +This is a release candidate. The API is subject to change +and not guaranteed to be compatible with the later release. +USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! + +* The handling of Layer 3 configurations has been substantially reworked. + While this is mostly internal change, it results in more robust + behavior when addressing information from multiple sources (DHCP, + manually configured, VPN) need to be applied simultaneously. + Overall performance and memory use have also slightly improved. +* Manually configured addresses can no longer expire even if the same + addresses are also obtained dynamically. +* Code for systemd-based DHCP and DHCPv6 clients has been updated from + upstream. +* NTP servers obtained via DHCPv6 are now exposed on the DBus API, visible + in nmcli and available for use by dispatcher scripts. +* 5G NR (New Radio) modems are now supported. +* The "rd.znet_ifnames" kernel command line option is now honored on + network bootups on an IBM s390 platform. +* Wi-Fi P2P support dows now work with the IWD backend, in addition to + wpa_supplicant backend. +* Routes managed by routing daemons are now ignored. This is done to + address a performance bottleneck on specialized routers. +* It is now possible to start NetworkManager without root user privileges. + This is experimental doesn't necessarily result in a working daemon. + NetworkManager service already drops many of capabilities available + to the root user. +* WPA3 Wi-FI network security have been improved by enabling new H2E (hash + to element) method for generating SAE password element. +* It is now possible to select the default Wi-Fi backend (wpa_supplicant or + IWD) at build-time. +* Replies from broken DHCP servers that send duplicate address or mask + options are now handled gracefully. +* Bridge support has gained the possibility of turning off MAC ageing. +* "configure-and-quit" mode and nm-iface-helper have been removed. + +It is likely that some of these changes have been or will be included in +1.34.x stable releases. This section will be updated to reflect that in +the 1.36.0 release. + ============================================= NetworkManager-1.34 Overview of changes since NetworkManager-1.32 ============================================= -* initrd: wait for both IPv4 and IPv6 with "ip=dhcp,dhcp6" -* core: better handle sd-resolved errors when resolving hostnames +* initrd: wait for both IPv4 and IPv6 with "ip=dhcp,dhcp6". +* core: better handle sd-resolved errors when resolving hostnames. * nmcli: fix import WireGuard profile with DNS domain and address - family disabled -* ndisc: send router solicitations before expiry -* policy: send earlier the ip configs to the DNS manager -* core: support linking with LLD 13 + family disabled. +* ndisc: send router solicitations before expiry. +* policy: send earlier the ip configs to the DNS manager. +* core: support linking with LLD 13. * wireguard: importing wg-quick configuration files with nmcli no longer sets a negative, exclusive "dns-priority". This plays better with common split DNS setups that use systemd-resolved. diff --git a/TODO b/TODO index 0732bcc4..97b0df43 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,12 @@ So you're interested in hacking on NetworkManager? Here's some cool stuff you could do... + +* IPv6 Multihop Routes in Platform + +See src/libnm-platform/README.md + + * Use netlink API instead of ioctl based ethtool. NetworkManager uses ethtool API to set/obtain certain settings of network @@ -21,24 +27,6 @@ port authentication), enterprise Wi-Fi and MACSec. From the GUI and dialog desig possibly get inspired by nm-connection-editor. -* Add Azure support to nm-cloud-setup. - -Currently, nm-cloud-setup only works for EC2 (and only for IPv4). Add support for Azure -cloud. See for example SUSE's cloud-netconfig which supports Azure -(https://github.com/SUSE-Enceladus/cloud-netconfig, -https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/). Note that cloud-netconfig -is under an incompatible license, so be careful not to reuse any code. But that would -anyway be almost impossible, because one is written in bash and the other in C. - - -* Improve our gitlab-ci integration. - -Currently, our .gitlab-ci starts various base containers and first installs -the necessary dependencies. That takes time and consumes bandwidth, we should -instead use more suitable containers. We should instead use ci-templates from -https://gitlab.freedesktop.org/freedesktop/ci-templates. - - * Ethernet Network Auto-detection There are various methods we can use to autodetect which wired network connection diff --git a/config.h.in b/config.h.in index b3426b12..15823ea9 100644 --- a/config.h.in +++ b/config.h.in @@ -195,6 +195,9 @@ (--with-config-dns-rc-manager-default) */ #undef NM_CONFIG_DEFAULT_MAIN_RC_MANAGER +/* Default configuration option for wifi.backend */ +#undef NM_CONFIG_DEFAULT_WIFI_BACKEND + /* Define the distribution version string */ #undef NM_DIST_VERSION diff --git a/config.h.meson b/config.h.meson index 901535cf..192246e5 100644 --- a/config.h.meson +++ b/config.h.meson @@ -100,6 +100,9 @@ /* Default value for main.rc-manager setting */ #mesondefine NM_CONFIG_DEFAULT_MAIN_RC_MANAGER +/* Default configuration option for wifi.backend */ +#mesondefine NM_CONFIG_DEFAULT_WIFI_BACKEND + /* Define the distribution version string */ #mesondefine NM_DIST_VERSION diff --git a/configure b/configure index ec0ded7e..6aed7fac 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.69 for NetworkManager 1.34.0. +# Generated by GNU Autoconf 2.69 for NetworkManager 1.35.90. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='NetworkManager' PACKAGE_TARNAME='NetworkManager' -PACKAGE_VERSION='1.34.0' -PACKAGE_STRING='NetworkManager 1.34.0' +PACKAGE_VERSION='1.35.90' +PACKAGE_STRING='NetworkManager 1.35.90' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager' PACKAGE_URL='' @@ -793,6 +793,7 @@ SYSTEMD_INHIBIT_LIBS SYSTEMD_INHIBIT_CFLAGS SYSTEMD_LOGIN_LIBS SYSTEMD_LOGIN_CFLAGS +NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT SYSTEMD_JOURNAL_LIBS SYSTEMD_JOURNAL_CFLAGS @@ -1071,6 +1072,7 @@ with_systemdsystemunitdir with_hostname_persist with_systemd_journal with_config_logging_backend_default +with_config_wifi_backend_default with_systemd_logind with_consolekit with_session_tracking @@ -1745,7 +1747,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 1.34.0 to adapt to many kinds of systems. +\`configure' configures NetworkManager 1.35.90 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1817,7 +1819,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of NetworkManager 1.34.0:";; + short | recursive ) echo "Configuration of NetworkManager 1.35.90:";; esac cat <<\_ACEOF @@ -1917,6 +1919,8 @@ Optional Packages: Use systemd journal for logging --with-config-logging-backend-default=backend Default value for logging.backend + --with-config-wifi-backend-default=backend + Default value for wifi.backend --with-systemd-logind=yes|no Support systemd session tracking --with-consolekit=yes|no @@ -2166,7 +2170,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -NetworkManager configure 1.34.0 +NetworkManager configure 1.35.90 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2939,7 +2943,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 1.34.0, which was +It was created by NetworkManager $as_me 1.35.90, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3809,7 +3813,7 @@ fi # Define the identity of the package. PACKAGE='NetworkManager' - VERSION='1.34.0' + VERSION='1.35.90' cat >>confdefs.h <<_ACEOF @@ -17992,9 +17996,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu NM_MAJOR_VERSION=1 -NM_MINOR_VERSION=34 -NM_MICRO_VERSION=0 -NM_VERSION=1.34.0 +NM_MINOR_VERSION=35 +NM_MICRO_VERSION=90 +NM_VERSION=1.35.90 @@ -18002,7 +18006,7 @@ NM_VERSION=1.34.0 -NM_GIT_SHA=9133a30c9deb3a003a20b09a617a25b07ada18ae +NM_GIT_SHA=7d0faf5077aeb97b620dc755a82013ae407c3951 if test """" != "no-config-h" ; then @@ -22566,6 +22570,32 @@ _ACEOF NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT="$nm_config_logging_backend_default" + +# Check whether --with-config-wifi-backend-default was given. +if test "${with_config_wifi_backend_default+set}" = set; then : + withval=$with_config_wifi_backend_default; nm_config_wifi_backend_default="$withval" +else + nm_config_wifi_backend_default="wpa_supplicant" +fi + + +if test "$nm_config_wifi_backend_default" != 'iwd' \ + -a "$nm_config_wifi_backend_default" != 'wpa_supplicant'; then + as_fn_error $? "The default Wi-Fi backend must be either wpa_supplicant or iwd." "$LINENO" 5 +fi +if test "$nm_config_wifi_backend_default" = "iwd"; then + if test "$ac_with_iwd" != "yes"; then + as_fn_error $? "Setting the default Wi-Fi backend to iwd requires iwd support." "$LINENO" 5 + fi +fi + +cat >>confdefs.h <<_ACEOF +#define NM_CONFIG_DEFAULT_WIFI_BACKEND "$nm_config_wifi_backend_default" +_ACEOF + +NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT="$nm_config_wifi_backend_default" + + # Session tracking support # Check whether --with-systemd-logind was given. @@ -30472,7 +30502,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 1.34.0, which was +This file was extended by NetworkManager $as_me 1.35.90, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30538,7 +30568,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 1.34.0 +NetworkManager config.status 1.35.90 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index abd83a60..a3a7b94e 100644 --- a/configure.ac +++ b/configure.ac @@ -7,8 +7,8 @@ dnl - add corresponding NM_VERSION_x_y_z macros in dnl "shared/nm-version-macros.h.in" dnl - update number in meson.build m4_define([nm_major_version], [1]) -m4_define([nm_minor_version], [34]) -m4_define([nm_micro_version], [0]) +m4_define([nm_minor_version], [35]) +m4_define([nm_micro_version], [90]) m4_define([nm_version], [nm_major_version.nm_minor_version.nm_micro_version]) @@ -404,6 +404,25 @@ AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_LOGGING_BACKEND, "$nm_config_logging_backen NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT="$nm_config_logging_backend_default" AC_SUBST(NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT) +AC_ARG_WITH(config-wifi-backend-default, + AS_HELP_STRING([--with-config-wifi-backend-default=backend], + [Default value for wifi.backend]), + nm_config_wifi_backend_default="$withval", + nm_config_wifi_backend_default="wpa_supplicant") + +if test "$nm_config_wifi_backend_default" != 'iwd' \ + -a "$nm_config_wifi_backend_default" != 'wpa_supplicant'; then + AC_MSG_ERROR([The default Wi-Fi backend must be either wpa_supplicant or iwd.]) +fi +if test "$nm_config_wifi_backend_default" = "iwd"; then + if test "$ac_with_iwd" != "yes"; then + AC_MSG_ERROR([Setting the default Wi-Fi backend to iwd requires iwd support.]) + fi +fi +AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_WIFI_BACKEND, "$nm_config_wifi_backend_default", [Default configuration option for wifi.backend]) +NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT="$nm_config_wifi_backend_default" +AC_SUBST(NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT) + # Session tracking support AC_ARG_WITH(systemd-logind, AS_HELP_STRING([--with-systemd-logind=yes|no], diff --git a/docs/api/Makefile.in b/docs/api/Makefile.in index 38492ffc..85f8ce86 100644 --- a/docs/api/Makefile.in +++ b/docs/api/Makefile.in @@ -306,6 +306,7 @@ NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT = @NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT@ NM_CONFIG_DEFAULT_MAIN_DHCP = @NM_CONFIG_DEFAULT_MAIN_DHCP@ NM_CONFIG_DEFAULT_MAIN_RC_MANAGER = @NM_CONFIG_DEFAULT_MAIN_RC_MANAGER@ +NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT = @NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT@ NM_DIST_VERSION = @NM_DIST_VERSION@ NM_LOG_COMPILER = @NM_LOG_COMPILER@ NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ @@ -566,6 +567,7 @@ DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ + $(DOC_MODULE).actions \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ diff --git a/docs/api/html/NetworkManager-dispatcher.html b/docs/api/html/NetworkManager-dispatcher.html index 0343fc1b..b5dbdaf7 100644 --- a/docs/api/html/NetworkManager-dispatcher.html +++ b/docs/api/html/NetworkManager-dispatcher.html @@ -8,7 +8,7 @@ - + @@ -325,6 +325,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/NetworkManager.conf.html b/docs/api/html/NetworkManager.conf.html index d1a0cc39..02029c2e 100644 --- a/docs/api/html/NetworkManager.conf.html +++ b/docs/api/html/NetworkManager.conf.html @@ -8,7 +8,7 @@ - + @@ -245,24 +245,29 @@ no-auto-default=*

configure-and-quit

-

- When set to 'true', NetworkManager quits after - performing initial network configuration but spawns small helpers - to preserve DHCP leases and IPv6 addresses. This is useful in - environments where network setup is more or less static or it is - desirable to save process time but still handle some dynamic - configurations. When this option is true, - network configuration for Wi-Fi, WWAN, Bluetooth, ADSL, and PPPoE - interfaces cannot be preserved due to their use of external - services, and these devices will be deconfigured when NetworkManager - quits even though other interface's configuration may be preserved. - Also, to preserve DHCP addresses the 'dhcp' option - must be set to 'internal'. The default value of - the 'configure-and-quit' option is - 'false', meaning that NetworkManager will continue - running after initial network configuration and continue responding - to system and hardware events, D-Bus requests, and user commands. -

+ +

+ This option is no longer useful to configure in NetworkManager.conf file. + It can however also be configured on the command line with the same + values, where it has some use. +

+

+ When set to 'initrd', NetworkManager does not connect + to D-Bus and quits after configuring the network. This is an implementation + detail how the NetworkManager module of dracut can run NetworkManager. + An alternative to this is having NetworkManager as a systemd service + with D-Bus in initrd. +

+

+ The value 'true' is unsupported since version 1.36. + Previously this was a mode where NetworkManager would quit after configuring + the network and run helper processes for DHCP and SLAAC. +

+

+ Otherwise, NetworkManager runs a system service with D-Bus and does not + quit during normal operation. +

+

hostname-mode

@@ -1215,6 +1220,7 @@ managed=1

Specify the Wi-Fi backend used for the device. Currently, supported are wpa_supplicant and iwd (experimental). + If unspecified, the default is "wpa_supplicant".

@@ -1788,6 +1794,6 @@ interface-name:vboxnet*,except:interface-name:vboxnet2 +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/NetworkManager.devhelp2 b/docs/api/html/NetworkManager.devhelp2 index 613b9266..6ec1ed73 100644 --- a/docs/api/html/NetworkManager.devhelp2 +++ b/docs/api/html/NetworkManager.devhelp2 @@ -635,6 +635,7 @@ + diff --git a/docs/api/html/NetworkManager.html b/docs/api/html/NetworkManager.html index 3f5dfac1..c143f903 100644 --- a/docs/api/html/NetworkManager.html +++ b/docs/api/html/NetworkManager.html @@ -8,7 +8,7 @@ - + @@ -338,6 +338,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ch01.html b/docs/api/html/ch01.html index 9863c8bd..e4cd603e 100644 --- a/docs/api/html/ch01.html +++ b/docs/api/html/ch01.html @@ -8,7 +8,7 @@ - + @@ -182,6 +182,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/dbus-secret-agent.html b/docs/api/html/dbus-secret-agent.html index b8a0c998..71d7ea52 100644 --- a/docs/api/html/dbus-secret-agent.html +++ b/docs/api/html/dbus-secret-agent.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/dbus-types.html b/docs/api/html/dbus-types.html index cfdccb55..b5eb97fd 100644 --- a/docs/api/html/dbus-types.html +++ b/docs/api/html/dbus-types.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/dbus-vpn-plugin.html b/docs/api/html/dbus-vpn-plugin.html index 1c6124e0..7bec3827 100644 --- a/docs/api/html/dbus-vpn-plugin.html +++ b/docs/api/html/dbus-vpn-plugin.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/dbus-vpn-types.html b/docs/api/html/dbus-vpn-types.html index a6c5d516..bb2edb32 100644 --- a/docs/api/html/dbus-vpn-types.html +++ b/docs/api/html/dbus-vpn-types.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.AccessPoint.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.AccessPoint.html index 7bd6ac6c..6a144d11 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.AccessPoint.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.AccessPoint.html @@ -8,7 +8,7 @@ - + @@ -158,6 +158,6 @@ LastSeen readable i +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.AgentManager.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.AgentManager.html index 4a2591b4..a237c1b3 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.AgentManager.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.AgentManager.html @@ -8,7 +8,7 @@ - + @@ -105,6 +105,6 @@ Unregister (); +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Checkpoint.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Checkpoint.html index c8427bf1..6feba5a0 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Checkpoint.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Checkpoint.html @@ -8,7 +8,7 @@ - + @@ -77,6 +77,6 @@ RollbackTimeout readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Connection.Active.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Connection.Active.html index 7de2af06..ededf2a5 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Connection.Active.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Connection.Active.html @@ -8,7 +8,7 @@ - + @@ -277,6 +277,6 @@ Master readable o +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP4Config.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP4Config.html index 3c371944..33acdb6e 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP4Config.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP4Config.html @@ -8,7 +8,7 @@ - + @@ -56,6 +56,6 @@ Options readable a{sv} +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP6Config.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP6Config.html index fa80f1ae..6093224e 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP6Config.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.DHCP6Config.html @@ -8,7 +8,7 @@ - + @@ -56,6 +56,6 @@ Options readable a{sv} +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Adsl.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Adsl.html index d0642057..b5814980 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Adsl.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Adsl.html @@ -8,7 +8,7 @@ - + @@ -58,6 +58,6 @@ Carrier readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bluetooth.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bluetooth.html index e3b2bdf1..29a9dfb4 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bluetooth.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bluetooth.html @@ -8,7 +8,7 @@ - + @@ -79,6 +79,6 @@ BtCapabilities readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bond.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bond.html index 7799cb8a..e9ddb7cf 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bond.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bond.html @@ -8,7 +8,7 @@ - + @@ -83,6 +83,6 @@ Slaves readable ao +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bridge.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bridge.html index 43bdf84d..c5c5dc4c 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bridge.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Bridge.html @@ -8,7 +8,7 @@ - + @@ -83,6 +83,6 @@ Slaves readable ao +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Dummy.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Dummy.html index db37e64c..3e872607 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Dummy.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Dummy.html @@ -8,7 +8,7 @@ - + @@ -57,6 +57,6 @@ n +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Generic.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Generic.html index 3b0460ef..2a5c04e1 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Generic.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Generic.html @@ -8,7 +8,7 @@ - + @@ -67,6 +67,6 @@ TypeDescription readable s +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.IPTunnel.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.IPTunnel.html index 90895a23..c24f0c03 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.IPTunnel.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.IPTunnel.html @@ -8,7 +8,7 @@ - + @@ -169,6 +169,6 @@ Flags readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Infiniband.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Infiniband.html index 8f2bcefc..fdd56e10 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Infiniband.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Infiniband.html @@ -8,7 +8,7 @@ - + @@ -71,6 +71,6 @@ Carrier readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Lowpan.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Lowpan.html index b45c0fb8..c6182a65 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Lowpan.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Lowpan.html @@ -8,7 +8,7 @@ - + @@ -67,6 +67,6 @@ Parent readable o +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macsec.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macsec.html index 434ecbee..2b8af716 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macsec.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macsec.html @@ -8,7 +8,7 @@ - + @@ -181,6 +181,6 @@ ReplayProtect readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macvlan.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macvlan.html index 94047cd2..7cb0bc12 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macvlan.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Macvlan.html @@ -8,7 +8,7 @@ - + @@ -85,6 +85,6 @@ Tap readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Modem.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Modem.html index 5884a6a7..7bf0e5dd 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Modem.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Modem.html @@ -8,7 +8,7 @@ - + @@ -112,6 +112,6 @@ Apn readable s +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OlpcMesh.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OlpcMesh.html index 5d26a420..075efe28 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OlpcMesh.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OlpcMesh.html @@ -8,7 +8,7 @@ - + @@ -77,6 +77,6 @@ ActiveChannel readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsBridge.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsBridge.html index e5e0d5ab..46b75f3c 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsBridge.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsBridge.html @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ Slaves readable ao +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsInterface.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsInterface.html index 204bb733..cc22610f 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsInterface.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsInterface.html @@ -8,7 +8,7 @@ - + @@ -37,6 +37,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsPort.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsPort.html index 542df52b..b6132ca6 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsPort.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.OvsPort.html @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ Slaves readable ao +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Ppp.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Ppp.html index e26e63ae..a16f51b7 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Ppp.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Ppp.html @@ -8,7 +8,7 @@ - + @@ -37,6 +37,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Statistics.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Statistics.html index a9fdb5f2..f29363ff 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Statistics.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Statistics.html @@ -8,7 +8,7 @@ - + @@ -78,6 +78,6 @@ RxBytes readable t +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Team.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Team.html index ad6d735f..881d9091 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Team.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Team.html @@ -8,7 +8,7 @@ - + @@ -93,6 +93,6 @@ Config readable s +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Tun.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Tun.html index 2df79868..ec2c90d0 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Tun.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Tun.html @@ -8,7 +8,7 @@ - + @@ -120,6 +120,6 @@ n +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Veth.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Veth.html index 789d46ca..12248e2f 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Veth.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Veth.html @@ -8,7 +8,7 @@ - + @@ -55,6 +55,6 @@ Peer readable o +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vlan.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vlan.html index 99dfb9ee..0d3270eb 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vlan.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vlan.html @@ -8,7 +8,7 @@ - + @@ -91,6 +91,6 @@ VlanId readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vrf.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vrf.html index afd573f7..3e9572d8 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vrf.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vrf.html @@ -8,7 +8,7 @@ - + @@ -55,6 +55,6 @@ Table readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vxlan.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vxlan.html index 428931b5..239291fa 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vxlan.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Vxlan.html @@ -8,7 +8,7 @@ - + @@ -224,6 +224,6 @@ L3miss readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WifiP2P.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WifiP2P.html index b426b894..91dd84a1 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WifiP2P.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WifiP2P.html @@ -8,7 +8,7 @@ - + @@ -168,6 +168,6 @@ Peers readable ao +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WireGuard.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WireGuard.html index 5bb89c90..f07fb943 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WireGuard.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.WireGuard.html @@ -8,7 +8,7 @@ - + @@ -76,6 +76,6 @@ FwMark readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wired.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wired.html index ff9a9da0..be9291d6 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wired.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wired.html @@ -8,7 +8,7 @@ - + @@ -101,6 +101,6 @@ Carrier readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wireless.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wireless.html index 530a13b0..949ae377 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wireless.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wireless.html @@ -8,7 +8,7 @@ - + @@ -254,6 +254,6 @@ LastScan readable x +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wpan.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wpan.html index 0b20a21f..f894cc0a 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wpan.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.Wpan.html @@ -8,7 +8,7 @@ - + @@ -57,6 +57,6 @@ HwAddress readable s +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.html index 2cb81d13..194c22c4 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Device.html @@ -8,7 +8,7 @@ - + @@ -621,6 +621,6 @@ Ports readable ao +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.DnsManager.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.DnsManager.html index fa0bd56f..f6091bf4 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.DnsManager.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.DnsManager.html @@ -8,7 +8,7 @@ - + @@ -82,6 +82,6 @@ Configuration readable aa{sv} +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP4Config.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP4Config.html index 9b52d070..9755da10 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP4Config.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP4Config.html @@ -8,7 +8,7 @@ - + @@ -192,6 +192,6 @@ WinsServerData readable as +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP6Config.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP6Config.html index 55aead66..57a7613c 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP6Config.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.IP6Config.html @@ -8,7 +8,7 @@ - + @@ -151,6 +151,6 @@ DnsPriority readable i +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.PPP.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.PPP.html index c8b3d2f7..4670db2d 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.PPP.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.PPP.html @@ -8,7 +8,7 @@ - + @@ -147,6 +147,6 @@ SetIfindex (IN i ifindex); +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.SecretAgent.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.SecretAgent.html index a141eb1f..c8d1d6bb 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.SecretAgent.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.SecretAgent.html @@ -8,7 +8,7 @@ - + @@ -197,6 +197,6 @@ DeleteSecrets (IN a{sa{sv}} connection, +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.Connection.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.Connection.html index 9955af25..5191afc2 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.Connection.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.Connection.html @@ -8,7 +8,7 @@ - + @@ -335,6 +335,6 @@ Filename readable s +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.html index 555315e7..b69eb8d7 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.Settings.html @@ -8,7 +8,7 @@ - + @@ -403,6 +403,6 @@ CanModify readable b +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Connection.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Connection.html index 5999eb50..fa22c0dc 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Connection.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Connection.html @@ -8,7 +8,7 @@ - + @@ -104,6 +104,6 @@ Banner readable s +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Plugin.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Plugin.html index 1eb6ca27..b63ea74a 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Plugin.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.VPN.Plugin.html @@ -8,7 +8,7 @@ - + @@ -415,6 +415,6 @@ State readable u +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.WifiP2PPeer.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.WifiP2PPeer.html index 12ef5c77..478368a5 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.WifiP2PPeer.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.WifiP2PPeer.html @@ -8,7 +8,7 @@ - + @@ -170,6 +170,6 @@ LastSeen readable i +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/gdbus-org.freedesktop.NetworkManager.html b/docs/api/html/gdbus-org.freedesktop.NetworkManager.html index b0e4d095..7af44492 100644 --- a/docs/api/html/gdbus-org.freedesktop.NetworkManager.html +++ b/docs/api/html/gdbus-org.freedesktop.NetworkManager.html @@ -8,7 +8,7 @@ - + @@ -1019,6 +1019,6 @@ GlobalDnsConfiguration readwrite a{sv} +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/index.html b/docs/api/html/index.html index e53118af..8110f465 100644 --- a/docs/api/html/index.html +++ b/docs/api/html/index.html @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@

- for NetworkManager 1.34.0 + for NetworkManager 1.35.90 The latest version of this documentation can be found on-line at https://networkmanager.dev/docs/api/latest/. @@ -458,6 +458,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ix01.html b/docs/api/html/ix01.html index 2ee52be7..5d1d6bb0 100644 --- a/docs/api/html/ix01.html +++ b/docs/api/html/ix01.html @@ -8,7 +8,7 @@ - + @@ -1091,6 +1091,8 @@

N

+
n-rxq, ovs-dpdk +
network-id, gsm
network-name, wimax @@ -1652,6 +1654,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/license.html b/docs/api/html/license.html index 45ca298c..e1b68486 100644 --- a/docs/api/html/license.html +++ b/docs/api/html/license.html @@ -7,7 +7,7 @@ - + @@ -55,6 +55,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/manpages.html b/docs/api/html/manpages.html index d12ec76c..8727cbc8 100644 --- a/docs/api/html/manpages.html +++ b/docs/api/html/manpages.html @@ -8,7 +8,7 @@ - + @@ -71,6 +71,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-cloud-setup.html b/docs/api/html/nm-cloud-setup.html index b5d6c808..e5f2354c 100644 --- a/docs/api/html/nm-cloud-setup.html +++ b/docs/api/html/nm-cloud-setup.html @@ -8,7 +8,7 @@ - + @@ -335,6 +335,6 @@ ln -s /etc/systemd/system/timers.target.wants/nm-cloud-setup.timer /usr/lib/syst +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-dbus-types.html b/docs/api/html/nm-dbus-types.html index 4d5580fd..df7ab257 100644 --- a/docs/api/html/nm-dbus-types.html +++ b/docs/api/html/nm-dbus-types.html @@ -8,7 +8,7 @@ - + @@ -1717,6 +1717,21 @@   + + +

NM_DEVICE_MODEM_CAPABILITY_5GNR

+

+ + +

= 0x00000040

+

+ + +

modem has 5GNR data capability (Since: 1.36)

+

+ +  + @@ -5226,6 +5241,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-initrd-generator.html b/docs/api/html/nm-initrd-generator.html index 274c2c41..8962d9c1 100644 --- a/docs/api/html/nm-initrd-generator.html +++ b/docs/api/html/nm-initrd-generator.html @@ -8,7 +8,7 @@ - + @@ -54,6 +54,14 @@

Output connection directory.

+

+ -p | --persistent-connections-dir + path +

+

Persistent connection directory. If it exists, rd.neednet will not + cause a default connection to be generated in absence of other options.

+ +

-i | --initrd-data-dir path @@ -100,6 +108,7 @@ rd.net.timeout.dhcp rd.net.timeout.carrier rd.znet +rd.znet_ifnames BOOTIF

Please consult the dracut.cmdline(7) @@ -161,6 +170,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-online.html b/docs/api/html/nm-online.html index 84fef32f..ab6a6a63 100644 --- a/docs/api/html/nm-online.html +++ b/docs/api/html/nm-online.html @@ -8,7 +8,7 @@ - + @@ -149,6 +149,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-openvswitch.html b/docs/api/html/nm-openvswitch.html index 3718e83b..b88e33a8 100644 --- a/docs/api/html/nm-openvswitch.html +++ b/docs/api/html/nm-openvswitch.html @@ -8,7 +8,7 @@ - + @@ -172,6 +172,6 @@ Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-settings-dbus.html b/docs/api/html/nm-settings-dbus.html index f9307059..8ccfcdb7 100644 --- a/docs/api/html/nm-settings-dbus.html +++ b/docs/api/html/nm-settings-dbus.html @@ -8,7 +8,7 @@ - + @@ -2337,13 +2337,22 @@ Default Value Value Description - + + devargs string   Open vSwitch DPDK device arguments. - + + + +n-rxq +uint32 +0 +Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue. + +
@@ -4269,6 +4278,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-settings-ifcfg-rh.html b/docs/api/html/nm-settings-ifcfg-rh.html index b4400d0d..e9a5ce46 100644 --- a/docs/api/html/nm-settings-ifcfg-rh.html +++ b/docs/api/html/nm-settings-ifcfg-rh.html @@ -8,7 +8,7 @@ - + @@ -2419,7 +2419,7 @@ Allowed values: none, ieee8021x, owe, wpa-psk, sae, wpa-eap, wpa wep-tx-keyidx DEFAULTKEY 1 -Index of active WEP key. +Index of active WEP key. Note that in ifcfg format the index starts counting at 1, while NetworkManager API otherwise is zero based. Allowed values: 1, 2, 3, 4 @@ -2789,6 +2789,6 @@ Allowed values: "yes", "no" +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-settings-keyfile.html b/docs/api/html/nm-settings-keyfile.html index 67754ad9..bb671c8e 100644 --- a/docs/api/html/nm-settings-keyfile.html +++ b/docs/api/html/nm-settings-keyfile.html @@ -8,7 +8,7 @@ - + @@ -567,6 +567,6 @@ Example: mac-address-blacklist= 00:22:68:12:79:A6;00:22:68:12:79 +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-settings-nmcli.html b/docs/api/html/nm-settings-nmcli.html index 0043313f..ea8a9bc4 100644 --- a/docs/api/html/nm-settings-nmcli.html +++ b/docs/api/html/nm-settings-nmcli.html @@ -8,7 +8,7 @@ - + @@ -2841,14 +2841,24 @@ - + +

devargs

Open vSwitch DPDK device arguments.

Format: string

- + + +

n-rxq

+ +

Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue.

+

+ Format: uint32

+ + +
@@ -5250,6 +5260,6 @@ The actual string to print. +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nm-vpn-dbus-types.html b/docs/api/html/nm-vpn-dbus-types.html index 7673b32e..31c1d323 100644 --- a/docs/api/html/nm-vpn-dbus-types.html +++ b/docs/api/html/nm-vpn-dbus-types.html @@ -8,7 +8,7 @@ - + @@ -555,6 +555,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nmcli-examples.html b/docs/api/html/nmcli-examples.html index 1ea0c026..28cf6604 100644 --- a/docs/api/html/nmcli-examples.html +++ b/docs/api/html/nmcli-examples.html @@ -8,7 +8,7 @@ - + @@ -649,6 +649,6 @@ Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nmcli.html b/docs/api/html/nmcli.html index d33f9424..1b9fdecf 100644 --- a/docs/api/html/nmcli.html +++ b/docs/api/html/nmcli.html @@ -8,7 +8,7 @@ - + @@ -1791,6 +1791,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/nmtui.html b/docs/api/html/nmtui.html index edf90abf..ee9ab9f0 100644 --- a/docs/api/html/nmtui.html +++ b/docs/api/html/nmtui.html @@ -8,7 +8,7 @@ - + @@ -83,6 +83,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-access-points.html b/docs/api/html/ref-dbus-access-points.html index 0b4bb69a..f59402cb 100644 --- a/docs/api/html/ref-dbus-access-points.html +++ b/docs/api/html/ref-dbus-access-points.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-active-connections.html b/docs/api/html/ref-dbus-active-connections.html index 4c2cd24f..a46f4dd6 100644 --- a/docs/api/html/ref-dbus-active-connections.html +++ b/docs/api/html/ref-dbus-active-connections.html @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-agent-manager.html b/docs/api/html/ref-dbus-agent-manager.html index eccc57bf..a64f484d 100644 --- a/docs/api/html/ref-dbus-agent-manager.html +++ b/docs/api/html/ref-dbus-agent-manager.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-checkpoint.html b/docs/api/html/ref-dbus-checkpoint.html index 1795082e..59f7aae3 100644 --- a/docs/api/html/ref-dbus-checkpoint.html +++ b/docs/api/html/ref-dbus-checkpoint.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-devices.html b/docs/api/html/ref-dbus-devices.html index 6537de27..8abca654 100644 --- a/docs/api/html/ref-dbus-devices.html +++ b/docs/api/html/ref-dbus-devices.html @@ -8,7 +8,7 @@ - + @@ -119,6 +119,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-dhcp4-configs.html b/docs/api/html/ref-dbus-dhcp4-configs.html index 1f222e0e..9c77a264 100644 --- a/docs/api/html/ref-dbus-dhcp4-configs.html +++ b/docs/api/html/ref-dbus-dhcp4-configs.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-dhcp6-configs.html b/docs/api/html/ref-dbus-dhcp6-configs.html index 0845bf07..b318d44d 100644 --- a/docs/api/html/ref-dbus-dhcp6-configs.html +++ b/docs/api/html/ref-dbus-dhcp6-configs.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-dns-manager.html b/docs/api/html/ref-dbus-dns-manager.html index 1ab7f8a5..ba431bcc 100644 --- a/docs/api/html/ref-dbus-dns-manager.html +++ b/docs/api/html/ref-dbus-dns-manager.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-ip4-configs.html b/docs/api/html/ref-dbus-ip4-configs.html index 2bc3e165..b9c03bdd 100644 --- a/docs/api/html/ref-dbus-ip4-configs.html +++ b/docs/api/html/ref-dbus-ip4-configs.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-ip6-configs.html b/docs/api/html/ref-dbus-ip6-configs.html index befd32ea..b3014326 100644 --- a/docs/api/html/ref-dbus-ip6-configs.html +++ b/docs/api/html/ref-dbus-ip6-configs.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-manager.html b/docs/api/html/ref-dbus-manager.html index ba94fe42..28b4399c 100644 --- a/docs/api/html/ref-dbus-manager.html +++ b/docs/api/html/ref-dbus-manager.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-settings-manager.html b/docs/api/html/ref-dbus-settings-manager.html index d122fcc9..b31916fc 100644 --- a/docs/api/html/ref-dbus-settings-manager.html +++ b/docs/api/html/ref-dbus-settings-manager.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-settings.html b/docs/api/html/ref-dbus-settings.html index d1d5c70f..ace2d15a 100644 --- a/docs/api/html/ref-dbus-settings.html +++ b/docs/api/html/ref-dbus-settings.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-dbus-wifi-p2p-peers.html b/docs/api/html/ref-dbus-wifi-p2p-peers.html index 99d0470f..52991144 100644 --- a/docs/api/html/ref-dbus-wifi-p2p-peers.html +++ b/docs/api/html/ref-dbus-wifi-p2p-peers.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/ref-settings.html b/docs/api/html/ref-settings.html index b2bacf2e..5e7e464d 100644 --- a/docs/api/html/ref-settings.html +++ b/docs/api/html/ref-settings.html @@ -8,7 +8,7 @@ - + @@ -196,6 +196,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/secret-agents.html b/docs/api/html/secret-agents.html index b3df856d..72c06961 100644 --- a/docs/api/html/secret-agents.html +++ b/docs/api/html/secret-agents.html @@ -8,7 +8,7 @@ - + @@ -33,6 +33,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/secrets-flags.html b/docs/api/html/secrets-flags.html index 1d59a930..66c07cef 100644 --- a/docs/api/html/secrets-flags.html +++ b/docs/api/html/secrets-flags.html @@ -8,7 +8,7 @@ - + @@ -58,6 +58,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-6lowpan.html b/docs/api/html/settings-6lowpan.html index 7daf602d..fd163b30 100644 --- a/docs/api/html/settings-6lowpan.html +++ b/docs/api/html/settings-6lowpan.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-802-11-olpc-mesh.html b/docs/api/html/settings-802-11-olpc-mesh.html index 1dd33145..b5370389 100644 --- a/docs/api/html/settings-802-11-olpc-mesh.html +++ b/docs/api/html/settings-802-11-olpc-mesh.html @@ -8,7 +8,7 @@ - + @@ -78,6 +78,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-802-11-wireless-security.html b/docs/api/html/settings-802-11-wireless-security.html index 033d365e..d2926389 100644 --- a/docs/api/html/settings-802-11-wireless-security.html +++ b/docs/api/html/settings-802-11-wireless-security.html @@ -8,7 +8,7 @@ - + @@ -180,6 +180,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-802-11-wireless.html b/docs/api/html/settings-802-11-wireless.html index ecdbfab9..68d7e07c 100644 --- a/docs/api/html/settings-802-11-wireless.html +++ b/docs/api/html/settings-802-11-wireless.html @@ -8,7 +8,7 @@ - + @@ -180,6 +180,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-802-1x.html b/docs/api/html/settings-802-1x.html index a1f6f6cf..91015533 100644 --- a/docs/api/html/settings-802-1x.html +++ b/docs/api/html/settings-802-1x.html @@ -8,7 +8,7 @@ - + @@ -342,6 +342,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-802-3-ethernet.html b/docs/api/html/settings-802-3-ethernet.html index 3b38ba11..b743783e 100644 --- a/docs/api/html/settings-802-3-ethernet.html +++ b/docs/api/html/settings-802-3-ethernet.html @@ -8,7 +8,7 @@ - + @@ -156,6 +156,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-adsl.html b/docs/api/html/settings-adsl.html index baa6ce9c..10cdb8d2 100644 --- a/docs/api/html/settings-adsl.html +++ b/docs/api/html/settings-adsl.html @@ -8,7 +8,7 @@ - + @@ -102,6 +102,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-bluetooth.html b/docs/api/html/settings-bluetooth.html index 76216b18..91bdf443 100644 --- a/docs/api/html/settings-bluetooth.html +++ b/docs/api/html/settings-bluetooth.html @@ -8,7 +8,7 @@ - + @@ -72,6 +72,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-bond-port.html b/docs/api/html/settings-bond-port.html index 4516d8c5..6496b891 100644 --- a/docs/api/html/settings-bond-port.html +++ b/docs/api/html/settings-bond-port.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-bond.html b/docs/api/html/settings-bond.html index 77da2c93..30fc8781 100644 --- a/docs/api/html/settings-bond.html +++ b/docs/api/html/settings-bond.html @@ -8,7 +8,7 @@ - + @@ -72,6 +72,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-bridge-port.html b/docs/api/html/settings-bridge-port.html index 5c2aa4f7..7b72a526 100644 --- a/docs/api/html/settings-bridge-port.html +++ b/docs/api/html/settings-bridge-port.html @@ -8,7 +8,7 @@ - + @@ -84,6 +84,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-bridge.html b/docs/api/html/settings-bridge.html index b19b3f0f..244f728a 100644 --- a/docs/api/html/settings-bridge.html +++ b/docs/api/html/settings-bridge.html @@ -8,7 +8,7 @@ - + @@ -228,6 +228,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-cdma.html b/docs/api/html/settings-cdma.html index fb29acc4..054dee32 100644 --- a/docs/api/html/settings-cdma.html +++ b/docs/api/html/settings-cdma.html @@ -8,7 +8,7 @@ - + @@ -90,6 +90,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-connection.html b/docs/api/html/settings-connection.html index 0756d597..c1e231e6 100644 --- a/docs/api/html/settings-connection.html +++ b/docs/api/html/settings-connection.html @@ -8,7 +8,7 @@ - + @@ -216,6 +216,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-dcb.html b/docs/api/html/settings-dcb.html index 784cff03..b4df6ea6 100644 --- a/docs/api/html/settings-dcb.html +++ b/docs/api/html/settings-dcb.html @@ -8,7 +8,7 @@ - + @@ -150,6 +150,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-dummy.html b/docs/api/html/settings-dummy.html index d5c7d25c..027121fe 100644 --- a/docs/api/html/settings-dummy.html +++ b/docs/api/html/settings-dummy.html @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ethtool.html b/docs/api/html/settings-ethtool.html index 011f8cb5..42717eb2 100644 --- a/docs/api/html/settings-ethtool.html +++ b/docs/api/html/settings-ethtool.html @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-generic.html b/docs/api/html/settings-generic.html index 2e03accd..c6a5a552 100644 --- a/docs/api/html/settings-generic.html +++ b/docs/api/html/settings-generic.html @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-gsm.html b/docs/api/html/settings-gsm.html index a0c4cca8..682118ee 100644 --- a/docs/api/html/settings-gsm.html +++ b/docs/api/html/settings-gsm.html @@ -8,7 +8,7 @@ - + @@ -144,6 +144,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-hostname.html b/docs/api/html/settings-hostname.html index f93dd8f9..52e0d5fe 100644 --- a/docs/api/html/settings-hostname.html +++ b/docs/api/html/settings-hostname.html @@ -8,7 +8,7 @@ - + @@ -84,6 +84,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-infiniband.html b/docs/api/html/settings-infiniband.html index b14cc1c7..2d7ffa9a 100644 --- a/docs/api/html/settings-infiniband.html +++ b/docs/api/html/settings-infiniband.html @@ -8,7 +8,7 @@ - + @@ -90,6 +90,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ip-tunnel.html b/docs/api/html/settings-ip-tunnel.html index 4a154d49..859675bc 100644 --- a/docs/api/html/settings-ip-tunnel.html +++ b/docs/api/html/settings-ip-tunnel.html @@ -8,7 +8,7 @@ - + @@ -138,6 +138,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ipv4.html b/docs/api/html/settings-ipv4.html index 20cd3236..f4a9c416 100644 --- a/docs/api/html/settings-ipv4.html +++ b/docs/api/html/settings-ipv4.html @@ -8,7 +8,7 @@ - + @@ -222,6 +222,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ipv6.html b/docs/api/html/settings-ipv6.html index af20a399..e0965661 100644 --- a/docs/api/html/settings-ipv6.html +++ b/docs/api/html/settings-ipv6.html @@ -8,7 +8,7 @@ - + @@ -234,6 +234,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-macsec.html b/docs/api/html/settings-macsec.html index de743ee4..27228aa6 100644 --- a/docs/api/html/settings-macsec.html +++ b/docs/api/html/settings-macsec.html @@ -8,7 +8,7 @@ - + @@ -114,6 +114,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-macvlan.html b/docs/api/html/settings-macvlan.html index b09ca148..554d61d5 100644 --- a/docs/api/html/settings-macvlan.html +++ b/docs/api/html/settings-macvlan.html @@ -8,7 +8,7 @@ - + @@ -84,6 +84,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-match.html b/docs/api/html/settings-match.html index 172d0694..20a077fc 100644 --- a/docs/api/html/settings-match.html +++ b/docs/api/html/settings-match.html @@ -8,7 +8,7 @@ - + @@ -84,6 +84,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ovs-bridge.html b/docs/api/html/settings-ovs-bridge.html index 011e49bc..9754e4bf 100644 --- a/docs/api/html/settings-ovs-bridge.html +++ b/docs/api/html/settings-ovs-bridge.html @@ -8,7 +8,7 @@ - + @@ -90,6 +90,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ovs-dpdk.html b/docs/api/html/settings-ovs-dpdk.html index cd91106d..74445249 100644 --- a/docs/api/html/settings-ovs-dpdk.html +++ b/docs/api/html/settings-ovs-dpdk.html @@ -8,7 +8,7 @@ - + @@ -52,18 +52,26 @@ Default Value Value Description - + +
devargs
string

 Open vSwitch DPDK device arguments.
-
+
+
+
n-rxq
+
uint32
+
0
+Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue. + +


+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ovs-external-ids.html b/docs/api/html/settings-ovs-external-ids.html index 1a196728..d3f0657f 100644 --- a/docs/api/html/settings-ovs-external-ids.html +++ b/docs/api/html/settings-ovs-external-ids.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ovs-interface.html b/docs/api/html/settings-ovs-interface.html index 931527db..41f2c8a3 100644 --- a/docs/api/html/settings-ovs-interface.html +++ b/docs/api/html/settings-ovs-interface.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ovs-patch.html b/docs/api/html/settings-ovs-patch.html index c916043d..2b755089 100644 --- a/docs/api/html/settings-ovs-patch.html +++ b/docs/api/html/settings-ovs-patch.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ovs-port.html b/docs/api/html/settings-ovs-port.html index 2aa91ff7..6ca34831 100644 --- a/docs/api/html/settings-ovs-port.html +++ b/docs/api/html/settings-ovs-port.html @@ -8,7 +8,7 @@ - + @@ -96,6 +96,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-ppp.html b/docs/api/html/settings-ppp.html index 493cf752..fea6add6 100644 --- a/docs/api/html/settings-ppp.html +++ b/docs/api/html/settings-ppp.html @@ -8,7 +8,7 @@ - + @@ -168,6 +168,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-pppoe.html b/docs/api/html/settings-pppoe.html index 277dde3d..f91ed115 100644 --- a/docs/api/html/settings-pppoe.html +++ b/docs/api/html/settings-pppoe.html @@ -8,7 +8,7 @@ - + @@ -90,6 +90,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-proxy.html b/docs/api/html/settings-proxy.html index 8c1104d3..6a173771 100644 --- a/docs/api/html/settings-proxy.html +++ b/docs/api/html/settings-proxy.html @@ -8,7 +8,7 @@ - + @@ -84,6 +84,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-serial.html b/docs/api/html/settings-serial.html index ff473d40..20ddfb5b 100644 --- a/docs/api/html/settings-serial.html +++ b/docs/api/html/settings-serial.html @@ -8,7 +8,7 @@ - + @@ -90,6 +90,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-sriov.html b/docs/api/html/settings-sriov.html index 9f7fded6..a9daf616 100644 --- a/docs/api/html/settings-sriov.html +++ b/docs/api/html/settings-sriov.html @@ -8,7 +8,7 @@ - + @@ -78,6 +78,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-tc.html b/docs/api/html/settings-tc.html index ebcf0f23..9f4d53ee 100644 --- a/docs/api/html/settings-tc.html +++ b/docs/api/html/settings-tc.html @@ -8,7 +8,7 @@ - + @@ -72,6 +72,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-team-port.html b/docs/api/html/settings-team-port.html index 7fe18f0a..dbbe038d 100644 --- a/docs/api/html/settings-team-port.html +++ b/docs/api/html/settings-team-port.html @@ -8,7 +8,7 @@ - + @@ -102,6 +102,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-team.html b/docs/api/html/settings-team.html index 99cd91ee..412c7380 100644 --- a/docs/api/html/settings-team.html +++ b/docs/api/html/settings-team.html @@ -8,7 +8,7 @@ - + @@ -162,6 +162,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-tun.html b/docs/api/html/settings-tun.html index 46e23d62..f860607c 100644 --- a/docs/api/html/settings-tun.html +++ b/docs/api/html/settings-tun.html @@ -8,7 +8,7 @@ - + @@ -96,6 +96,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-user.html b/docs/api/html/settings-user.html index 33e64f03..1c8e4626 100644 --- a/docs/api/html/settings-user.html +++ b/docs/api/html/settings-user.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-veth.html b/docs/api/html/settings-veth.html index d53121c9..ea702cc6 100644 --- a/docs/api/html/settings-veth.html +++ b/docs/api/html/settings-veth.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-vlan.html b/docs/api/html/settings-vlan.html index be1e1d1f..ef3df77d 100644 --- a/docs/api/html/settings-vlan.html +++ b/docs/api/html/settings-vlan.html @@ -8,7 +8,7 @@ - + @@ -96,6 +96,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-vpn.html b/docs/api/html/settings-vpn.html index afd1ac72..9f8d5473 100644 --- a/docs/api/html/settings-vpn.html +++ b/docs/api/html/settings-vpn.html @@ -8,7 +8,7 @@ - + @@ -96,6 +96,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-vrf.html b/docs/api/html/settings-vrf.html index 6c49c512..12ba3b34 100644 --- a/docs/api/html/settings-vrf.html +++ b/docs/api/html/settings-vrf.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-vxlan.html b/docs/api/html/settings-vxlan.html index a0ec0963..b497855d 100644 --- a/docs/api/html/settings-vxlan.html +++ b/docs/api/html/settings-vxlan.html @@ -8,7 +8,7 @@ - + @@ -156,6 +156,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-wifi-p2p.html b/docs/api/html/settings-wifi-p2p.html index 9fe0a90b..8328b1d8 100644 --- a/docs/api/html/settings-wifi-p2p.html +++ b/docs/api/html/settings-wifi-p2p.html @@ -8,7 +8,7 @@ - + @@ -78,6 +78,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-wimax.html b/docs/api/html/settings-wimax.html index d733d7fd..919bfe4e 100644 --- a/docs/api/html/settings-wimax.html +++ b/docs/api/html/settings-wimax.html @@ -8,7 +8,7 @@ - + @@ -72,6 +72,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-wireguard.html b/docs/api/html/settings-wireguard.html index 01157792..850c85ab 100644 --- a/docs/api/html/settings-wireguard.html +++ b/docs/api/html/settings-wireguard.html @@ -8,7 +8,7 @@ - + @@ -114,6 +114,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/settings-wpan.html b/docs/api/html/settings-wpan.html index b0e3b24b..474d1155 100644 --- a/docs/api/html/settings-wpan.html +++ b/docs/api/html/settings-wpan.html @@ -8,7 +8,7 @@ - + @@ -90,6 +90,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/spec.html b/docs/api/html/spec.html index 4138e610..05d19ae4 100644 --- a/docs/api/html/spec.html +++ b/docs/api/html/spec.html @@ -8,7 +8,7 @@ - + @@ -190,6 +190,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/html/vpn-plugins.html b/docs/api/html/vpn-plugins.html index 76cfc099..f38251c5 100644 --- a/docs/api/html/vpn-plugins.html +++ b/docs/api/html/vpn-plugins.html @@ -8,7 +8,7 @@ - + @@ -37,6 +37,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff --git a/docs/api/settings-spec.xml b/docs/api/settings-spec.xml index fed4f093..25be59d9 100644 --- a/docs/api/settings-spec.xml +++ b/docs/api/settings-spec.xml @@ -48,7 +48,7 @@ Properties Key NameValue TypeDefault ValueValue Descriptiondatapath-typedatapath-typestringThe data path type. One of "system", "netdev" or empty.fail-modefail-modestringThe bridge failure mode. One of "secure", "standalone" or empty.mcast-snooping-enablemcast-snooping-enablebooleanFALSEEnable or disable multicast snooping.rstp-enablerstp-enablebooleanFALSEEnable or disable RSTP.stp-enablestp-enablebooleanFALSEEnable or disable STP.
ovs-dpdkOvsDpdk Link Settings Properties - Key NameValue TypeDefault ValueValue DescriptiondevargsdevargsstringOpen vSwitch DPDK device arguments.
ovs-interfaceOpen vSwitch Interface Settings + Key NameValue TypeDefault ValueValue DescriptiondevargsdevargsstringOpen vSwitch DPDK device arguments.n-rxqn-rxquint320Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue.
ovs-interfaceOpen vSwitch Interface Settings Properties Key NameValue TypeDefault ValueValue DescriptiontypetypestringThe interface type. Either "internal", "system", "patch", "dpdk", or empty.
ovs-patchOvsPatch Link Settings Properties diff --git a/docs/api/version.xml b/docs/api/version.xml index 2b17ffd5..dc7c4e31 100644 --- a/docs/api/version.xml +++ b/docs/api/version.xml @@ -1 +1 @@ -1.34.0 +1.35.90 diff --git a/docs/libnm/Makefile.in b/docs/libnm/Makefile.in index 6ec3d399..d6cd6f49 100644 --- a/docs/libnm/Makefile.in +++ b/docs/libnm/Makefile.in @@ -303,6 +303,7 @@ NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT = @NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT@ NM_CONFIG_DEFAULT_MAIN_DHCP = @NM_CONFIG_DEFAULT_MAIN_DHCP@ NM_CONFIG_DEFAULT_MAIN_RC_MANAGER = @NM_CONFIG_DEFAULT_MAIN_RC_MANAGER@ +NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT = @NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT@ NM_DIST_VERSION = @NM_DIST_VERSION@ NM_LOG_COMPILER = @NM_LOG_COMPILER@ NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ @@ -590,6 +591,7 @@ DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ + $(DOC_MODULE).actions \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ diff --git a/docs/libnm/html/NMAccessPoint.html b/docs/libnm/html/NMAccessPoint.html index e587fdf9..824850fa 100644 --- a/docs/libnm/html/NMAccessPoint.html +++ b/docs/libnm/html/NMAccessPoint.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMVpnConnection.html" title="NMVpnConnection"> <link rel="next" href="NMWifiP2PPeer.html" title="NMWifiP2PPeer"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -300,7 +300,7 @@ nm_access_point_get_ssid (<em class="parameter"><code><a class="link" href="NMAc <a name="nm-access-point-get-ssid.returns"></a><h4>Returns</h4> <p>the <a href="https://developer.gnome.org/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> containing the SSID, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the SSID is unknown. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -510,7 +510,7 @@ be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Ar <p>WARNING: the transfer annotation for this function may not work correctly with bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305. You can filter the list yourself with <a class="link" href="NMAccessPoint.html#nm-access-point-connection-valid" title="nm_access_point_connection_valid ()"><code class="function">nm_access_point_connection_valid()</code></a>. </p> -<p><span class="annotation">[<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> NMConnection]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMConnection]</span></p> </div> </div> <hr> @@ -625,6 +625,6 @@ against</p></td> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMActiveConnection.html b/docs/libnm/html/NMActiveConnection.html index 4bbd1472..b385dc60 100644 --- a/docs/libnm/html/NMActiveConnection.html +++ b/docs/libnm/html/NMActiveConnection.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceWpan.html" title="NMDeviceWpan"> <link rel="next" href="NMVpnConnection.html" title="NMVpnConnection"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -278,7 +278,7 @@ nm_active_connection_get_connection (<em class="parameter"><code><a class="link" <a name="nm-active-connection-get-connection.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMRemoteConnection.html" title="NMRemoteConnection"><span class="type">NMRemoteConnection</span></a> which this <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> is an active instance of. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -529,7 +529,7 @@ nm_active_connection_get_master (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-active-connection-get-master.returns"></a><h4>Returns</h4> <p>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>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -584,7 +584,7 @@ nm_active_connection_get_ip4_config (<em class="parameter"><code><a class="link" <a name="nm-active-connection-get-ip4-config.returns"></a><h4>Returns</h4> <p>the IPv4 <a class="link" href="NMIPConfig.html" title="NMIPConfig"><span class="type">NMIPConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the connection is not in the <a class="link" href="libnm-nm-dbus-interface.html#NM-ACTIVE-CONNECTION-STATE-ACTIVATED:CAPS"><code class="literal">NM_ACTIVE_CONNECTION_STATE_ACTIVATED</code></a> state. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -614,7 +614,7 @@ nm_active_connection_get_dhcp4_config (<em class="parameter"><code><a class="lin <p>the IPv4 <a class="link" href="NMDhcpConfig.html" title="NMDhcpConfig"><span class="type">NMDhcpConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the connection does not use DHCP, or is not in the <a class="link" href="libnm-nm-dbus-interface.html#NM-ACTIVE-CONNECTION-STATE-ACTIVATED:CAPS"><code class="literal">NM_ACTIVE_CONNECTION_STATE_ACTIVATED</code></a> state. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -669,7 +669,7 @@ nm_active_connection_get_ip6_config (<em class="parameter"><code><a class="link" <a name="nm-active-connection-get-ip6-config.returns"></a><h4>Returns</h4> <p>the IPv6 <a class="link" href="NMIPConfig.html" title="NMIPConfig"><span class="type">NMIPConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the connection is not in the <a class="link" href="libnm-nm-dbus-interface.html#NM-ACTIVE-CONNECTION-STATE-ACTIVATED:CAPS"><code class="literal">NM_ACTIVE_CONNECTION_STATE_ACTIVATED</code></a> state. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -699,7 +699,7 @@ nm_active_connection_get_dhcp6_config (<em class="parameter"><code><a class="lin <p>the IPv6 <a class="link" href="NMDhcpConfig.html" title="NMDhcpConfig"><span class="type">NMDhcpConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the connection does not use DHCPv6, or is not in the <a class="link" href="libnm-nm-dbus-interface.html#NM-ACTIVE-CONNECTION-STATE-ACTIVATED:CAPS"><code class="literal">NM_ACTIVE_CONNECTION_STATE_ACTIVATED</code></a> state. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -829,6 +829,6 @@ nm_active_connection_get_vpn (<em class="parameter"><code><a class="link" href=" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMCheckpoint.html b/docs/libnm/html/NMCheckpoint.html index c9283c0b..87f2a9c8 100644 --- a/docs/libnm/html/NMCheckpoint.html +++ b/docs/libnm/html/NMCheckpoint.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDhcpConfig.html" title="NMDhcpConfig"> <link rel="next" href="ch05.html" title="Utility API Reference"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -199,6 +199,6 @@ nm_checkpoint_get_rollback_timeout (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMClient.html b/docs/libnm/html/NMClient.html index 302feca4..d8e798a8 100644 --- a/docs/libnm/html/NMClient.html +++ b/docs/libnm/html/NMClient.html @@ -8,7 +8,7 @@ <link rel="up" href="ch02.html" title="Client Object API Reference"> <link rel="prev" href="ch02.html" title="Client Object API Reference"> <link rel="next" href="NMSecretAgentOld.html" title="NMSecretAgentOld"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -1068,7 +1068,7 @@ nm_dns_entry_get_interface (<em class="parameter"><code><a class="link" href="NM <div class="refsect3"> <a name="nm-dns-entry-get-interface.returns"></a><h4>Returns</h4> <p>the interface name. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -1096,7 +1096,7 @@ nm_dns_entry_get_nameservers (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-dns-entry-get-nameservers.returns"></a><h4>Returns</h4> <p>the list of name servers. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -1124,7 +1124,7 @@ nm_dns_entry_get_domains (<em class="parameter"><code><a class="link" href="NMCl <div class="refsect3"> <a name="nm-dns-entry-get-domains.returns"></a><h4>Returns</h4> <p>the list of DNS domains. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -1385,7 +1385,7 @@ automatically initialized during async/sync init.</p> <div class="refsect3"> <a name="nm-client-get-dbus-connection.returns"></a><h4>Returns</h4> <p>the D-Bus connection of the client, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is set. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.22</p> </div> @@ -1420,7 +1420,7 @@ the <a class="link" href="NMClient.html#nm-client-get-context-busy-watcher" titl <div class="refsect3"> <a name="nm-client-get-main-context.returns"></a><h4>Returns</h4> <p>the <a href="https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> of the client. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.22</p> </div> @@ -1470,7 +1470,7 @@ references on this object to not keep it alive longer.</p> you may not need to worry about these "leaks". Also, if you anyway plan to continue iterating the <a href="https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> afterwards, then you don't need to care when exactly NMClient is gone completely. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.22</p> </div> @@ -1497,7 +1497,7 @@ nm_client_get_dbus_name_owner (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-client-get-dbus-name-owner.returns"></a><h4>Returns</h4> <p>the current name owner of the D-Bus service of NetworkManager. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.22</p> </div> @@ -1639,7 +1639,7 @@ nm_client_get_object_by_path (<em class="parameter"><code><a class="link" href=" <p>the <a class="link" href="NMObject.html" title="NMObject"><span class="type">NMObject</span></a> instance that is cached under <em class="parameter"><code>dbus_path</code></em> , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such object exists. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -1732,7 +1732,7 @@ The numeric values correspond to <a class="link" href="libnm-nm-dbus-interface.h The array is terminated by a numeric zero sentinel at position <em class="parameter"><code>length</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -2174,7 +2174,7 @@ connectivity.</p> <div class="refsect3"> <a name="nm-client-connectivity-check-get-uri.returns"></a><h4>Returns</h4> <p>the connectivity URI in use. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.20</p> </div> @@ -2686,7 +2686,7 @@ methods such as <a class="link" href="NMDeviceEthernet.html#nm-device-ethernet-g <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> containing all the <span class="type">NMDevices</span>. The returned array is owned by the <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> object and should not be modified. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMDevice]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMDevice]</span></p> </div> </div> <hr> @@ -2722,7 +2722,7 @@ use device-specific methods such as <a class="link" href="NMDeviceEthernet.html# <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> containing all the <span class="type">NMDevices</span>. The returned array is owned by the <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> object and should not be modified. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMDevice]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMDevice]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2759,7 +2759,7 @@ nm_client_get_device_by_path (<em class="parameter"><code><a class="link" href=" <a name="nm-client-get-device-by-path.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> for the given <em class="parameter"><code>object_path</code></em> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is found. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2795,7 +2795,7 @@ nm_client_get_device_by_iface (<em class="parameter"><code><a class="link" href= <a name="nm-client-get-device-by-iface.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMDevice.html" title="NMDevice"><span class="type">NMDevice</span></a> for the given <em class="parameter"><code>iface</code></em> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is found. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2824,7 +2824,7 @@ nm_client_get_active_connections (<em class="parameter"><code><a class="link" hr <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> containing all the active <span class="type">NMActiveConnections</span>. The returned array is owned by the client and should not be modified. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMActiveConnection]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMActiveConnection]</span></p> </div> </div> <hr> @@ -2860,7 +2860,7 @@ non-NetworkManager-recognized device, this will return <a href="https://develope <a name="nm-client-get-primary-connection.returns"></a><h4>Returns</h4> <p>the appropriate <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a>, if any. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2890,7 +2890,7 @@ currently-activating connection that is expected to become the new <a name="nm-client-get-activating-connection.returns"></a><h4>Returns</h4> <p>the appropriate <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a>, if any. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3018,7 +3018,7 @@ nm_client_activate_connection_finish (<em class="parameter"><code><a class="link <p>the new <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure, in which case <em class="parameter"><code>error</code></em> will be set. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -3146,7 +3146,7 @@ nm_client_add_and_activate_connection_finish <p>the new <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure, in which case <em class="parameter"><code>error</code></em> will be set. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -3291,7 +3291,7 @@ nm_client_add_and_activate_connection2_finish <td class="parameter_description"><p>the output result of type "a{sv}" returned by D-Bus' AddAndActivate2 call. Currently, no output is implemented yet. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -3301,7 +3301,7 @@ output is implemented yet. </p></td> <p>the new <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure, in which case <em class="parameter"><code>error</code></em> will be set. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -3471,7 +3471,7 @@ containing all connections provided by the remote settings service. The returned array is owned by the <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> object and should not be modified.</p> <p>The connections are as received from D-Bus and might not validate according to <a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMRemoteConnection]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMRemoteConnection]</span></p> </div> </div> <hr> @@ -3510,7 +3510,7 @@ nm_client_get_connection_by_id (<em class="parameter"><code><a class="link" href matching object was found.</p> <p>The connection is as received from D-Bus and might not validate according to <a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3549,7 +3549,7 @@ nm_client_get_connection_by_path (<em class="parameter"><code><a class="link" hr not known</p> <p>The connection is as received from D-Bus and might not validate according to <a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3588,7 +3588,7 @@ nm_client_get_connection_by_uuid (<em class="parameter"><code><a class="link" hr not known</p> <p>The connection is as received from D-Bus and might not validate according to <a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3703,7 +3703,7 @@ nm_client_add_connection_finish (<em class="parameter"><code><a class="link" hre <p>the new <a class="link" href="NMRemoteConnection.html" title="NMRemoteConnection"><span class="type">NMRemoteConnection</span></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure, in which case <em class="parameter"><code>error</code></em> will be set. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -3814,7 +3814,7 @@ nm_client_add_connection2_finish (<em class="parameter"><code><a class="link" hr from <code class="function">AddConnection2()</code>. If you care about the output result, then the "ignore_out_result" parameter of <a class="link" href="NMClient.html#nm-client-add-connection2" title="nm_client_add_connection2 ()"><code class="function">nm_client_add_connection2()</code></a> must not be set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> @@ -3828,7 +3828,7 @@ parameter of <a class="link" href="NMClient.html#nm-client-add-connection2" titl <a name="nm-client-add-connection2-finish.returns"></a><h4>Returns</h4> <p>on success, a pointer to the added <a class="link" href="NMRemoteConnection.html" title="NMRemoteConnection"><span class="type">NMRemoteConnection</span></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.20</p> </div> @@ -3880,7 +3880,7 @@ filenames that failed to load.</p> <td class="parameter_name"><p>failures</p></td> <td class="parameter_description"><p>on return, a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of filenames that failed to load. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> @@ -3991,7 +3991,7 @@ nm_client_load_connections_finish (<em class="parameter"><code><a class="link" h <td class="parameter_name"><p>failures</p></td> <td class="parameter_description"><p>on return, a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of filenames that failed to load. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></td> </tr> <tr> <td class="parameter_name"><p>result</p></td> @@ -4227,7 +4227,7 @@ nm_client_get_dns_configuration (<em class="parameter"><code><a class="link" hre containing <a class="link" href="NMClient.html#NMDnsEntry"><span class="type">NMDnsEntry</span></a> elements or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case the value is not available. The returned array is owned by the <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> object and should not be modified. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMDnsEntry]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMDnsEntry]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -4257,7 +4257,7 @@ nm_client_get_checkpoints (<em class="parameter"><code><a class="link" href="NMC <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> containing all the <a class="link" href="NMCheckpoint.html" title="NMCheckpoint"><span class="type">NMCheckpoint</span></a>. The returned array is owned by the <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> object and should not be modified. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMCheckpoint]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMCheckpoint]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -4369,7 +4369,7 @@ nm_client_checkpoint_create_finish (<em class="parameter"><code><a class="link" <p>the new <a class="link" href="NMCheckpoint.html" title="NMCheckpoint"><span class="type">NMCheckpoint</span></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure, in which case <em class="parameter"><code>error</code></em> will be set. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -4556,7 +4556,7 @@ nm_client_checkpoint_rollback_finish (<em class="parameter"><code><a class="link <p>an hash table of devices and results. Devices are represented by their original D-Bus path; each result is a <a class="link" href="libnm-nm-dbus-interface.html#NMRollbackResult" title="enum NMRollbackResult"><span class="type">NMRollbackResult</span></a>. </p> -<p><span class="annotation">[<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></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><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></p> </div> <p class="since">Since: 1.12</p> </div> @@ -4888,7 +4888,7 @@ nm_client_dbus_call_finish (<em class="parameter"><code><a class="link" href="NM <div class="refsect3"> <a name="nm-client-dbus-call-finish.returns"></a><h4>Returns</h4> <p>the result <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -5398,6 +5398,6 @@ operation succeeded, but the object that was allegedly created (eg, </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMConnection.html b/docs/libnm/html/NMConnection.html index 7112ef08..e195ef4c 100644 --- a/docs/libnm/html/NMConnection.html +++ b/docs/libnm/html/NMConnection.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="ch03.html" title="Connection and Setting API Reference"> <link rel="next" href="NMSimpleConnection.html" title="NMSimpleConnection"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -664,7 +664,7 @@ the setting object's reference count.</p> <tr> <td class="parameter_name"><p>setting</p></td> <td class="parameter_description"><p>the <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> to add to the connection object. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -735,7 +735,7 @@ to the <a class="link" href="NMConnection.html" title="NMConnection"><span class <a name="nm-connection-get-setting.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no setting of that type was previously added to the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -772,7 +772,7 @@ the <a class="link" href="NMConnection.html" title="NMConnection"><span class="t <a name="nm-connection-get-setting-by-name.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no setting with that name was previously added to the <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -810,7 +810,7 @@ marshalling over D-Bus or otherwise serializing.</p> <a name="nm-connection-to-dbus.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> describing the connection, its settings, and each setting's properties. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1182,7 +1182,7 @@ return points to an allocated <a href="https://developer.gnome.org/glib/unstable secrets of the <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> which may be required; the caller owns the array and must free the array itself with <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#g-ptr-array-free"><code class="function">g_ptr_array_free()</code></a>, but not free its elements. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -1517,7 +1517,7 @@ nm_connection_get_settings (<em class="parameter"><code><a class="link" href="NM <em class="parameter"><code>connection</code></em> . If the connection has no settings, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_length][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_length][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -1684,7 +1684,7 @@ Eg, "VLAN (eth1.1)".</p> 's device, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>connection</code></em> is not a virtual connection type. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1711,7 +1711,7 @@ nm_connection_get_setting_802_1x (<em class="parameter"><code><a class="link" hr <div class="refsect3"> <a name="nm-connection-get-setting-802-1x.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSetting8021x.html" title="NMSetting8021x"><span class="type">NMSetting8021x</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1738,7 +1738,7 @@ nm_connection_get_setting_bluetooth (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-bluetooth.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth"><span class="type">NMSettingBluetooth</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1765,7 +1765,7 @@ nm_connection_get_setting_bond (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-connection-get-setting-bond.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingBond.html" title="NMSettingBond"><span class="type">NMSettingBond</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1792,7 +1792,7 @@ nm_connection_get_setting_team (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-connection-get-setting-team.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingTeam.html" title="NMSettingTeam"><span class="type">NMSettingTeam</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1819,7 +1819,7 @@ nm_connection_get_setting_team_port (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-team-port.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingTeamPort.html" title="NMSettingTeamPort"><span class="type">NMSettingTeamPort</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1846,7 +1846,7 @@ nm_connection_get_setting_bridge (<em class="parameter"><code><a class="link" hr <div class="refsect3"> <a name="nm-connection-get-setting-bridge.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingBridge.html" title="NMSettingBridge"><span class="type">NMSettingBridge</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1873,7 +1873,7 @@ nm_connection_get_setting_bridge_port (<em class="parameter"><code><a class="lin <div class="refsect3"> <a name="nm-connection-get-setting-bridge-port.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingBridgePort.html" title="NMSettingBridgePort"><span class="type">NMSettingBridgePort</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1900,7 +1900,7 @@ nm_connection_get_setting_cdma (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-connection-get-setting-cdma.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingCdma.html" title="NMSettingCdma"><span class="type">NMSettingCdma</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1927,7 +1927,7 @@ nm_connection_get_setting_connection (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-connection-get-setting-connection.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1954,7 +1954,7 @@ nm_connection_get_setting_dcb (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-connection-get-setting-dcb.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingDcb.html" title="NMSettingDcb"><span class="type">NMSettingDcb</span></a> if the connection contains one, otherwise NULL. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1981,7 +1981,7 @@ nm_connection_get_setting_dummy (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-connection-get-setting-dummy.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingDummy.html" title="NMSettingDummy"><span class="type">NMSettingDummy</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.8</p> </div> @@ -2009,7 +2009,7 @@ nm_connection_get_setting_generic (<em class="parameter"><code><a class="link" h <div class="refsect3"> <a name="nm-connection-get-setting-generic.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingGeneric.html" title="NMSettingGeneric"><span class="type">NMSettingGeneric</span></a> if the connection contains one, otherwise NULL. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2036,7 +2036,7 @@ nm_connection_get_setting_gsm (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-connection-get-setting-gsm.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingGsm.html" title="NMSettingGsm"><span class="type">NMSettingGsm</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2063,7 +2063,7 @@ nm_connection_get_setting_infiniband (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-connection-get-setting-infiniband.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingInfiniband.html" title="NMSettingInfiniband"><span class="type">NMSettingInfiniband</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2090,7 +2090,7 @@ nm_connection_get_setting_ip_tunnel (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-ip-tunnel.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingIPTunnel.html" title="NMSettingIPTunnel"><span class="type">NMSettingIPTunnel</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2122,7 +2122,7 @@ majority of IPv4-setting-related methods are on that type, not <a name="nm-connection-get-setting-ip4-config.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config"><span class="type">NMSettingIP4Config</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> NMSettingIP4Config][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> NMSettingIP4Config][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2153,7 +2153,7 @@ majority of IPv6-setting-related methods are on that type, not <a name="nm-connection-get-setting-ip6-config.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> NMSettingIP6Config][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> NMSettingIP6Config][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2180,7 +2180,7 @@ nm_connection_get_setting_macsec (<em class="parameter"><code><a class="link" hr <div class="refsect3"> <a name="nm-connection-get-setting-macsec.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingMacsec.html" title="NMSettingMacsec"><span class="type">NMSettingMacsec</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -2208,7 +2208,7 @@ nm_connection_get_setting_macvlan (<em class="parameter"><code><a class="link" h <div class="refsect3"> <a name="nm-connection-get-setting-macvlan.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingMacvlan.html" title="NMSettingMacvlan"><span class="type">NMSettingMacvlan</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2236,7 +2236,7 @@ nm_connection_get_setting_olpc_mesh (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-olpc-mesh.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh"><span class="type">NMSettingOlpcMesh</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2263,7 +2263,7 @@ nm_connection_get_setting_ovs_bridge (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-connection-get-setting-ovs-bridge.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingOvsBridge.html" title="NMSettingOvsBridge"><span class="type">NMSettingOvsBridge</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -2292,7 +2292,7 @@ nm_connection_get_setting_ovs_interface <div class="refsect3"> <a name="nm-connection-get-setting-ovs-interface.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingOvsInterface.html" title="NMSettingOvsInterface"><span class="type">NMSettingOvsInterface</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -2320,7 +2320,7 @@ nm_connection_get_setting_ovs_patch (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-ovs-patch.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingOvsPatch.html" title="NMSettingOvsPatch"><span class="type">NMSettingOvsPatch</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -2348,7 +2348,7 @@ nm_connection_get_setting_ovs_port (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-ovs-port.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingOvsPort.html" title="NMSettingOvsPort"><span class="type">NMSettingOvsPort</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -2376,7 +2376,7 @@ nm_connection_get_setting_ppp (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-connection-get-setting-ppp.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingPpp.html" title="NMSettingPpp"><span class="type">NMSettingPpp</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2403,7 +2403,7 @@ nm_connection_get_setting_pppoe (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-connection-get-setting-pppoe.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingPppoe.html" title="NMSettingPppoe"><span class="type">NMSettingPppoe</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2430,7 +2430,7 @@ nm_connection_get_setting_proxy (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-connection-get-setting-proxy.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingProxy.html" title="NMSettingProxy"><span class="type">NMSettingProxy</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -2458,7 +2458,7 @@ nm_connection_get_setting_serial (<em class="parameter"><code><a class="link" hr <div class="refsect3"> <a name="nm-connection-get-setting-serial.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingSerial.html" title="NMSettingSerial"><span class="type">NMSettingSerial</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2485,7 +2485,7 @@ nm_connection_get_setting_tc_config (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-tc-config.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingTCConfig.html" title="NMSettingTCConfig"><span class="type">NMSettingTCConfig</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -2513,7 +2513,7 @@ nm_connection_get_setting_tun (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-connection-get-setting-tun.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingTun.html" title="NMSettingTun"><span class="type">NMSettingTun</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2541,7 +2541,7 @@ nm_connection_get_setting_vpn (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-connection-get-setting-vpn.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingVpn.html" title="NMSettingVpn"><span class="type">NMSettingVpn</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2568,7 +2568,7 @@ nm_connection_get_setting_wimax (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-connection-get-setting-wimax.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingWimax.html" title="NMSettingWimax"><span class="type">NMSettingWimax</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2595,7 +2595,7 @@ nm_connection_get_setting_adsl (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-connection-get-setting-adsl.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingAdsl.html" title="NMSettingAdsl"><span class="type">NMSettingAdsl</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2622,7 +2622,7 @@ nm_connection_get_setting_wired (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-connection-get-setting-wired.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingWired.html" title="NMSettingWired"><span class="type">NMSettingWired</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2649,7 +2649,7 @@ nm_connection_get_setting_wireless (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-connection-get-setting-wireless.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingWireless.html" title="NMSettingWireless"><span class="type">NMSettingWireless</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2677,7 +2677,7 @@ nm_connection_get_setting_wireless_security <div class="refsect3"> <a name="nm-connection-get-setting-wireless-security.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2704,7 +2704,7 @@ nm_connection_get_setting_vlan (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-connection-get-setting-vlan.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingVlan.html" title="NMSettingVlan"><span class="type">NMSettingVlan</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2731,7 +2731,7 @@ nm_connection_get_setting_vxlan (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-connection-get-setting-vxlan.returns"></a><h4>Returns</h4> <p>an <a class="link" href="NMSettingVxlan.html" title="NMSettingVxlan"><span class="type">NMSettingVxlan</span></a> if the connection contains one, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2912,6 +2912,6 @@ are marked as never saved. Since: 1.32.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDevice.html b/docs/libnm/html/NMDevice.html index 655b559c..c990dbe6 100644 --- a/docs/libnm/html/NMDevice.html +++ b/docs/libnm/html/NMDevice.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="next" href="NMDevice6Lowpan.html" title="NMDevice6Lowpan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -1225,7 +1225,7 @@ works with VPN connections.</p> <a name="nm-device-get-ip4-config.returns"></a><h4>Returns</h4> <p>the IPv4 <a class="link" href="NMIPConfig.html" title="NMIPConfig"><span class="type">NMIPConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device is not activated. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1255,7 +1255,7 @@ works with VPN connections.</p> <a name="nm-device-get-dhcp4-config.returns"></a><h4>Returns</h4> <p>the IPv4 <a class="link" href="NMDhcpConfig.html" title="NMDhcpConfig"><span class="type">NMDhcpConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device is not activated or not using DHCP. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1284,7 +1284,7 @@ works with VPN connections.</p> <div class="refsect3"> <a name="nm-device-get-ip6-config.returns"></a><h4>Returns</h4> <p>the IPv6 <a class="link" href="NMIPConfig.html" title="NMIPConfig"><span class="type">NMIPConfig</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device is not activated. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1314,7 +1314,7 @@ works with VPN connections.</p> <a name="nm-device-get-dhcp6-config.returns"></a><h4>Returns</h4> <p>the IPv6 <a class="link" href="NMDhcpConfig.html" title="NMDhcpConfig"><span class="type">NMDhcpConfig</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device is not activated or not using DHCPv6. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1431,7 +1431,7 @@ nm_device_get_active_connection (<em class="parameter"><code><a class="link" hre <a name="nm-device-get-active-connection.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMActiveConnection.html" title="NMActiveConnection"><span class="type">NMActiveConnection</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the device is not part of an active connection. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1718,7 +1718,7 @@ nm_device_get_lldp_neighbors (<em class="parameter"><code><a class="link" href=" containing <a class="link" href="NMDevice.html#NMLldpNeighbor"><span class="type">NMLldpNeighbor</span></a>s. This is the internal copy used by the device and must not be modified. The library never modifies the returned array and thus it is safe for callers to reference and keep using it. </p> -<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMLldpNeighbor][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMLldpNeighbor][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -1784,7 +1784,7 @@ devices in <em class="parameter"><code>devices</code></em> <div class="refsect3"> <a name="nm-device-disambiguate-names.returns"></a><h4>Returns</h4> <p>the device names. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></p> </div> </div> <hr> @@ -2022,7 +2022,7 @@ the applied connection. </p></td> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</p> <p>The connection is as received from D-Bus and might not validate according to <a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2126,7 +2126,7 @@ connection. </p></td> of error.</p> <p>The connection is as received from D-Bus and might not validate according to <a class="link" href="NMConnection.html#nm-connection-verify" title="nm_connection_verify ()"><code class="function">nm_connection_verify()</code></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2440,7 +2440,7 @@ should be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Poi <p>WARNING: the transfer annotation for this function may not work correctly with bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305. You can filter the list yourself with <a class="link" href="NMDevice.html#nm-device-connection-valid" title="nm_device_connection_valid ()"><code class="function">nm_device_connection_valid()</code></a>. </p> -<p><span class="annotation">[<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> NMConnection]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMConnection]</span></p> </div> </div> <hr> @@ -2643,7 +2643,7 @@ nm_lldp_neighbor_get_attr_names (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-lldp-neighbor-get-attr-names.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of attribute names. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2683,7 +2683,7 @@ nm_lldp_neighbor_get_attr_value (<em class="parameter"><code><a class="link" hre <p>the value or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the attribute with <em class="parameter"><code>name</code></em> was not found. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -2702,7 +2702,7 @@ actually modify the (empty) instance.</p> <div class="refsect3"> <a name="nm-lldp-neighbor-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMDevice.html#NMLldpNeighbor"><span class="type">NMLldpNeighbor</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -2739,7 +2739,7 @@ nm_lldp_neighbor_get_attr_string_value <tr> <td class="parameter_name"><p>out_value</p></td> <td class="parameter_description"><p>on return, the attribute value. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -3112,6 +3112,6 @@ all the VLANs.</p></li> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDevice6Lowpan.html b/docs/libnm/html/NMDevice6Lowpan.html index d5d37721..e111db8f 100644 --- a/docs/libnm/html/NMDevice6Lowpan.html +++ b/docs/libnm/html/NMDevice6Lowpan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDevice.html" title="NMDevice"> <link rel="next" href="NMDeviceAdsl.html" title="NMDeviceAdsl"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -104,7 +104,7 @@ nm_device_6lowpan_get_parent (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-device-6lowpan-get-parent.returns"></a><h4>Returns</h4> <p>the device's parent device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -132,6 +132,6 @@ NM_DEPRECATED_IN_1_24_FOR ();</pre> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceAdsl.html b/docs/libnm/html/NMDeviceAdsl.html index 0e8a73ae..b314c32e 100644 --- a/docs/libnm/html/NMDeviceAdsl.html +++ b/docs/libnm/html/NMDeviceAdsl.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDevice6Lowpan.html" title="NMDevice6Lowpan"> <link rel="next" href="NMDeviceBond.html" title="NMDeviceBond"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -102,6 +102,6 @@ nm_device_adsl_get_carrier (<em class="parameter"><code><a class="link" href="NM </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceBond.html b/docs/libnm/html/NMDeviceBond.html index e8e145c0..5113d883 100644 --- a/docs/libnm/html/NMDeviceBond.html +++ b/docs/libnm/html/NMDeviceBond.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceAdsl.html" title="NMDeviceAdsl"> <link rel="next" href="NMDeviceBridge.html" title="NMDeviceBridge"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -207,6 +207,6 @@ copy used by the device, and must not be modified. </p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceBridge.html b/docs/libnm/html/NMDeviceBridge.html index c0832466..50e2a4cb 100644 --- a/docs/libnm/html/NMDeviceBridge.html +++ b/docs/libnm/html/NMDeviceBridge.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceBond.html" title="NMDeviceBond"> <link rel="next" href="NMDeviceBt.html" title="NMDeviceBt"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -207,6 +207,6 @@ copy used by the device, and must not be modified. </p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceBt.html b/docs/libnm/html/NMDeviceBt.html index 576f152c..203f66f0 100644 --- a/docs/libnm/html/NMDeviceBt.html +++ b/docs/libnm/html/NMDeviceBt.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceBridge.html" title="NMDeviceBridge"> <link rel="next" href="NMDeviceDummy.html" title="NMDeviceDummy"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -198,6 +198,6 @@ nm_device_bt_get_capabilities (<em class="parameter"><code><a class="link" href= </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceDummy.html b/docs/libnm/html/NMDeviceDummy.html index 6b20f59d..0ec953c8 100644 --- a/docs/libnm/html/NMDeviceDummy.html +++ b/docs/libnm/html/NMDeviceDummy.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceBt.html" title="NMDeviceBt"> <link rel="next" href="NMDeviceEthernet.html" title="NMDeviceEthernet"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -83,6 +83,6 @@ NM_DEPRECATED_IN_1_24_FOR ();</pre> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceEthernet.html b/docs/libnm/html/NMDeviceEthernet.html index 69c6b370..8d4f2afe 100644 --- a/docs/libnm/html/NMDeviceEthernet.html +++ b/docs/libnm/html/NMDeviceEthernet.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceDummy.html" title="NMDeviceDummy"> <link rel="next" href="NMDeviceGeneric.html" title="NMDeviceGeneric"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -252,7 +252,7 @@ nm_device_ethernet_get_s390_subchannels <a name="nm-device-ethernet-get-s390-subchannels.returns"></a><h4>Returns</h4> <p>array of strings, each specifying one subchannel the s390 device uses to communicate to the host. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -291,6 +291,6 @@ one subchannel the s390 device uses to communicate to the host. </p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceGeneric.html b/docs/libnm/html/NMDeviceGeneric.html index ad57f2be..3adb4419 100644 --- a/docs/libnm/html/NMDeviceGeneric.html +++ b/docs/libnm/html/NMDeviceGeneric.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceEthernet.html" title="NMDeviceEthernet"> <link rel="next" href="NMDeviceInfiniband.html" title="NMDeviceInfiniband"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -119,6 +119,6 @@ device, and must not be modified.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceIPTunnel.html b/docs/libnm/html/NMDeviceIPTunnel.html index b4fa2952..fcc97c2a 100644 --- a/docs/libnm/html/NMDeviceIPTunnel.html +++ b/docs/libnm/html/NMDeviceIPTunnel.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceInfiniband.html" title="NMDeviceInfiniband"> <link rel="next" href="NMDeviceMacsec.html" title="NMDeviceMacsec"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -220,7 +220,7 @@ nm_device_ip_tunnel_get_parent (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-device-ip-tunnel-get-parent.returns"></a><h4>Returns</h4> <p>the device's parent device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -590,6 +590,6 @@ nm_device_ip_tunnel_get_flags (<em class="parameter"><code><a class="link" href= </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceInfiniband.html b/docs/libnm/html/NMDeviceInfiniband.html index 6e035cc3..2be02c05 100644 --- a/docs/libnm/html/NMDeviceInfiniband.html +++ b/docs/libnm/html/NMDeviceInfiniband.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceGeneric.html" title="NMDeviceGeneric"> <link rel="next" href="NMDeviceIPTunnel.html" title="NMDeviceIPTunnel"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -155,6 +155,6 @@ nm_device_infiniband_get_carrier (<em class="parameter"><code><a class="link" hr </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceMacsec.html b/docs/libnm/html/NMDeviceMacsec.html index e8b49b95..b5bc353a 100644 --- a/docs/libnm/html/NMDeviceMacsec.html +++ b/docs/libnm/html/NMDeviceMacsec.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceIPTunnel.html" title="NMDeviceIPTunnel"> <link rel="next" href="NMDeviceMacvlan.html" title="NMDeviceMacvlan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -247,7 +247,7 @@ nm_device_macsec_get_parent (<em class="parameter"><code><a class="link" href="N <div class="refsect3"> <a name="nm-device-macsec-get-parent.returns"></a><h4>Returns</h4> <p>the device's parent device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -676,6 +676,6 @@ nm_device_macsec_get_replay_protect (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceMacvlan.html b/docs/libnm/html/NMDeviceMacvlan.html index 21dd5f5d..70be76fa 100644 --- a/docs/libnm/html/NMDeviceMacvlan.html +++ b/docs/libnm/html/NMDeviceMacvlan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceMacsec.html" title="NMDeviceMacsec"> <link rel="next" href="NMDeviceModem.html" title="NMDeviceModem"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -139,7 +139,7 @@ nm_device_macvlan_get_parent (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-device-macvlan-get-parent.returns"></a><h4>Returns</h4> <p>the device's parent device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -267,6 +267,6 @@ NM_DEPRECATED_IN_1_24_FOR ();</pre> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceModem.html b/docs/libnm/html/NMDeviceModem.html index af31343d..3bc2f5c1 100644 --- a/docs/libnm/html/NMDeviceModem.html +++ b/docs/libnm/html/NMDeviceModem.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceMacvlan.html" title="NMDeviceMacvlan"> <link rel="next" href="NMDeviceOlpcMesh.html" title="NMDeviceOlpcMesh"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -291,6 +291,6 @@ nm_device_modem_get_apn (<em class="parameter"><code><a class="link" href="NMDev </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceOlpcMesh.html b/docs/libnm/html/NMDeviceOlpcMesh.html index d1c9e9e5..e005a5b4 100644 --- a/docs/libnm/html/NMDeviceOlpcMesh.html +++ b/docs/libnm/html/NMDeviceOlpcMesh.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceModem.html" title="NMDeviceModem"> <link rel="next" href="NMDeviceOvsBridge.html" title="NMDeviceOvsBridge"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -148,7 +148,7 @@ nm_device_olpc_mesh_get_companion (<em class="parameter"><code><a class="link" h <div class="refsect3"> <a name="nm-device-olpc-mesh-get-companion.returns"></a><h4>Returns</h4> <p>the companion of the device of <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -201,6 +201,6 @@ nm_device_olpc_mesh_get_active_channel </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceOvsBridge.html b/docs/libnm/html/NMDeviceOvsBridge.html index 00799da2..e88a734d 100644 --- a/docs/libnm/html/NMDeviceOvsBridge.html +++ b/docs/libnm/html/NMDeviceOvsBridge.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceOlpcMesh.html" title="NMDeviceOlpcMesh"> <link rel="next" href="NMDeviceOvsInterface.html" title="NMDeviceOvsInterface"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -111,6 +111,6 @@ copy used by the device, and must not be modified. </p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceOvsInterface.html b/docs/libnm/html/NMDeviceOvsInterface.html index 407048ff..e629de36 100644 --- a/docs/libnm/html/NMDeviceOvsInterface.html +++ b/docs/libnm/html/NMDeviceOvsInterface.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceOvsBridge.html" title="NMDeviceOvsBridge"> <link rel="next" href="NMDeviceOvsPort.html" title="NMDeviceOvsPort"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -40,6 +40,6 @@ </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceOvsPort.html b/docs/libnm/html/NMDeviceOvsPort.html index 965f2099..faa9abfc 100644 --- a/docs/libnm/html/NMDeviceOvsPort.html +++ b/docs/libnm/html/NMDeviceOvsPort.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceOvsInterface.html" title="NMDeviceOvsInterface"> <link rel="next" href="NMDevicePpp.html" title="NMDevicePpp"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -111,6 +111,6 @@ copy used by the device, and must not be modified. </p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDevicePpp.html b/docs/libnm/html/NMDevicePpp.html index 8485b5d4..0dfb0074 100644 --- a/docs/libnm/html/NMDevicePpp.html +++ b/docs/libnm/html/NMDevicePpp.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceOvsPort.html" title="NMDeviceOvsPort"> <link rel="next" href="NMDeviceTeam.html" title="NMDeviceTeam"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -40,6 +40,6 @@ </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceTeam.html b/docs/libnm/html/NMDeviceTeam.html index fb195140..f37b15aa 100644 --- a/docs/libnm/html/NMDeviceTeam.html +++ b/docs/libnm/html/NMDeviceTeam.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDevicePpp.html" title="NMDevicePpp"> <link rel="next" href="NMDeviceTun.html" title="NMDeviceTun"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -252,6 +252,6 @@ device, and must not be modified.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceTun.html b/docs/libnm/html/NMDeviceTun.html index 2cd9edc2..9d41ed96 100644 --- a/docs/libnm/html/NMDeviceTun.html +++ b/docs/libnm/html/NMDeviceTun.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceTeam.html" title="NMDeviceTeam"> <link rel="next" href="NMDeviceVeth.html" title="NMDeviceVeth"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -335,6 +335,6 @@ nm_device_tun_get_multi_queue (<em class="parameter"><code><a class="link" href= </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceVeth.html b/docs/libnm/html/NMDeviceVeth.html index d972fb70..dd03515c 100644 --- a/docs/libnm/html/NMDeviceVeth.html +++ b/docs/libnm/html/NMDeviceVeth.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceTun.html" title="NMDeviceTun"> <link rel="next" href="NMDeviceVlan.html" title="NMDeviceVlan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -88,7 +88,7 @@ nm_device_veth_get_peer (<em class="parameter"><code><a class="link" href="NMDev <div class="refsect3"> <a name="nm-device-veth-get-peer.returns"></a><h4>Returns</h4> <p>the device's peer device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -103,6 +103,6 @@ nm_device_veth_get_peer (<em class="parameter"><code><a class="link" href="NMDev </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceVlan.html b/docs/libnm/html/NMDeviceVlan.html index 301fc988..463b4216 100644 --- a/docs/libnm/html/NMDeviceVlan.html +++ b/docs/libnm/html/NMDeviceVlan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceVeth.html" title="NMDeviceVeth"> <link rel="next" href="NMDeviceVrf.html" title="NMDeviceVrf"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -185,7 +185,7 @@ nm_device_vlan_get_parent (<em class="parameter"><code><a class="link" href="NMD <div class="refsect3"> <a name="nm-device-vlan-get-parent.returns"></a><h4>Returns</h4> <p>the device's parent device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -242,6 +242,6 @@ nm_device_vlan_get_vlan_id (<em class="parameter"><code><a class="link" href="NM </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceVrf.html b/docs/libnm/html/NMDeviceVrf.html index 8681e7f7..8eef1ea5 100644 --- a/docs/libnm/html/NMDeviceVrf.html +++ b/docs/libnm/html/NMDeviceVrf.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceVlan.html" title="NMDeviceVlan"> <link rel="next" href="NMDeviceVxlan.html" title="NMDeviceVxlan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -102,6 +102,6 @@ nm_device_vrf_get_table (<em class="parameter"><code><a class="link" href="NMDev </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceVxlan.html b/docs/libnm/html/NMDeviceVxlan.html index 62c1fba9..745d07a3 100644 --- a/docs/libnm/html/NMDeviceVxlan.html +++ b/docs/libnm/html/NMDeviceVxlan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceVrf.html" title="NMDeviceVrf"> <link rel="next" href="NMDeviceWifiP2P.html" title="NMDeviceWifiP2P"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -328,7 +328,7 @@ nm_device_vxlan_get_parent (<em class="parameter"><code><a class="link" href="NM <div class="refsect3"> <a name="nm-device-vxlan-get-parent.returns"></a><h4>Returns</h4> <p>the device's parent device. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -837,6 +837,6 @@ nm_device_vxlan_get_l3miss (<em class="parameter"><code><a class="link" href="NM </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceWifi.html b/docs/libnm/html/NMDeviceWifi.html index 3d28400e..b479313b 100644 --- a/docs/libnm/html/NMDeviceWifi.html +++ b/docs/libnm/html/NMDeviceWifi.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceWifiP2P.html" title="NMDeviceWifiP2P"> <link rel="next" href="NMDeviceWimax.html" title="NMDeviceWimax"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -361,7 +361,7 @@ nm_device_wifi_get_active_access_point <div class="refsect3"> <a name="nm-device-wifi-get-active-access-point.returns"></a><h4>Returns</h4> <p>the access point or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is active. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -397,7 +397,7 @@ nm_device_wifi_get_access_point_by_path <div class="refsect3"> <a name="nm-device-wifi-get-access-point-by-path.returns"></a><h4>Returns</h4> <p>the access point or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is found. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -775,6 +775,6 @@ set.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceWifiP2P.html b/docs/libnm/html/NMDeviceWifiP2P.html index 3ccd1f7a..e40f0699 100644 --- a/docs/libnm/html/NMDeviceWifiP2P.html +++ b/docs/libnm/html/NMDeviceWifiP2P.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceVxlan.html" title="NMDeviceVxlan"> <link rel="next" href="NMDeviceWifi.html" title="NMDeviceWifi"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -163,7 +163,7 @@ nm_device_wifi_p2p_get_peer_by_path (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-device-wifi-p2p-get-peer-by-path.returns"></a><h4>Returns</h4> <p>the peer or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is found. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -402,6 +402,6 @@ nm_device_wifi_p2p_stop_find_finish (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceWimax.html b/docs/libnm/html/NMDeviceWimax.html index 71044299..dea41ffe 100644 --- a/docs/libnm/html/NMDeviceWimax.html +++ b/docs/libnm/html/NMDeviceWimax.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceWifi.html" title="NMDeviceWifi"> <link rel="next" href="NMDeviceWireGuard.html" title="NMDeviceWireGuard"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -217,7 +217,7 @@ nm_device_wimax_get_active_nsp (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-device-wimax-get-active-nsp.returns"></a><h4>Returns</h4> <p>the access point or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is active. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -256,7 +256,7 @@ nm_device_wimax_get_nsp_by_path (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-device-wimax-get-nsp-by-path.returns"></a><h4>Returns</h4> <p>the access point or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is found. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -504,6 +504,6 @@ nm_device_wimax_get_bsid (<em class="parameter"><code><a class="link" href="NMDe </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceWireGuard.html b/docs/libnm/html/NMDeviceWireGuard.html index 8e87bc77..f31103fb 100644 --- a/docs/libnm/html/NMDeviceWireGuard.html +++ b/docs/libnm/html/NMDeviceWireGuard.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceWimax.html" title="NMDeviceWimax"> <link rel="next" href="NMDeviceWpan.html" title="NMDeviceWpan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -117,7 +117,7 @@ nm_device_wireguard_get_public_key (<em class="parameter"><code><a class="link" <div class="refsect3"> <a name="nm-device-wireguard-get-public-key.returns"></a><h4>Returns</h4> <p>the <a href="https://developer.gnome.org/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> containing the 32-byte public key. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -200,6 +200,6 @@ See: ip-rule(8)</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDeviceWpan.html b/docs/libnm/html/NMDeviceWpan.html index 080a6dd7..5455ddf7 100644 --- a/docs/libnm/html/NMDeviceWpan.html +++ b/docs/libnm/html/NMDeviceWpan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMDeviceWireGuard.html" title="NMDeviceWireGuard"> <link rel="next" href="NMActiveConnection.html" title="NMActiveConnection"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -83,6 +83,6 @@ NM_DEPRECATED_IN_1_24_FOR ();</pre> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMDhcpConfig.html b/docs/libnm/html/NMDhcpConfig.html index f4cc1bd4..d0b57743 100644 --- a/docs/libnm/html/NMDhcpConfig.html +++ b/docs/libnm/html/NMDhcpConfig.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMIPConfig.html" title="NMIPConfig"> <link rel="next" href="NMCheckpoint.html" title="NMCheckpoint"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -141,7 +141,7 @@ nm_dhcp_config_get_options (<em class="parameter"><code><a class="link" href="NM <p>the <a href="https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> containing strings for keys and values. This is the internal copy used by the configuration, and must not be modified. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span></p> </div> </div> <hr> @@ -196,6 +196,6 @@ configuration, and must not be modified.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMIPConfig.html b/docs/libnm/html/NMIPConfig.html index b3d4adbf..2c9c22b6 100644 --- a/docs/libnm/html/NMIPConfig.html +++ b/docs/libnm/html/NMIPConfig.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMWimaxNsp.html" title="NMWimaxNsp"> <link rel="next" href="NMDhcpConfig.html" title="NMDhcpConfig"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -199,7 +199,7 @@ nm_ip_config_get_gateway (<em class="parameter"><code><a class="link" href="NMIP <div class="refsect3"> <a name="nm-ip-config-get-gateway.returns"></a><h4>Returns</h4> <p>the IP address of the gateway. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -229,7 +229,7 @@ nm_ip_config_get_addresses (<em class="parameter"><code><a class="link" href="NM containing <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a>es. This is the internal copy used by the configuration and must not be modified. The library never modifies the returned array and thus it is safe for callers to reference and keep using it. </p> -<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -259,7 +259,7 @@ nm_ip_config_get_routes (<em class="parameter"><code><a class="link" href="NMIPC <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a>s. This is the internal copy used by the configuration, and must not be modified. The library never modifies the returned array and thus it is safe for callers to reference and keep using it. </p> -<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -286,7 +286,7 @@ nm_ip_config_get_nameservers (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-ip-config-get-nameservers.returns"></a><h4>Returns</h4> <p>the array of nameserver IP addresses. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -314,7 +314,7 @@ nm_ip_config_get_domains (<em class="parameter"><code><a class="link" href="NMIP <a name="nm-ip-config-get-domains.returns"></a><h4>Returns</h4> <p>the array of domains. (This is never <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, though it may be 0-length). </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -342,7 +342,7 @@ nm_ip_config_get_searches (<em class="parameter"><code><a class="link" href="NMI <a name="nm-ip-config-get-searches.returns"></a><h4>Returns</h4> <p>the array of DNS search strings. (This is never <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, though it may be 0-length). </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -370,7 +370,7 @@ nm_ip_config_get_wins_servers (<em class="parameter"><code><a class="link" href= <a name="nm-ip-config-get-wins-servers.returns"></a><h4>Returns</h4> <p>the arry of WINS server IP address strings. (This is never <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, though it may be 0-length.). </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> </div> @@ -426,6 +426,6 @@ nm_ip_config_get_wins_servers (<em class="parameter"><code><a class="link" href= </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMObject.html b/docs/libnm/html/NMObject.html index 19e4fd94..12dd2b28 100644 --- a/docs/libnm/html/NMObject.html +++ b/docs/libnm/html/NMObject.html @@ -8,7 +8,7 @@ <link rel="up" href="ch02.html" title="Client Object API Reference"> <link rel="prev" href="NMSecretAgentOld.html" title="NMSecretAgentOld"> <link rel="next" href="libnm-nm-errors.html" title="nm-errors"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -139,7 +139,7 @@ object is still alive.</p> <p>the <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> cache in which the object can be found, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the object is no longer cached. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -160,6 +160,6 @@ cached. </p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMRemoteConnection.html b/docs/libnm/html/NMRemoteConnection.html index 84980e94..f589f9ed 100644 --- a/docs/libnm/html/NMRemoteConnection.html +++ b/docs/libnm/html/NMRemoteConnection.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSimpleConnection.html" title="NMSimpleConnection"> <link rel="next" href="NMSetting.html" title="NMSetting"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -327,7 +327,7 @@ nm_remote_connection_update2_finish (<em class="parameter"><code><a class="link" <a name="nm-remote-connection-update2-finish.returns"></a><h4>Returns</h4> <p>on success, a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type "a{sv}" with the result. On failure, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -793,7 +793,7 @@ not a simple property accessor.</p> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type <code class="literal">NM_VARIANT_TYPE_CONNECTION</code> containing <em class="parameter"><code>connection</code></em> 's secrets, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -887,7 +887,7 @@ nm_remote_connection_get_secrets_finish <p>a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type <code class="literal">NM_VARIANT_TYPE_CONNECTION</code> containing <em class="parameter"><code>connection</code></em> 's secrets, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1044,6 +1044,6 @@ user, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.ht </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSecretAgentOld.html b/docs/libnm/html/NMSecretAgentOld.html index e5405a7a..7ca38400 100644 --- a/docs/libnm/html/NMSecretAgentOld.html +++ b/docs/libnm/html/NMSecretAgentOld.html @@ -8,7 +8,7 @@ <link rel="up" href="ch02.html" title="Client Object API Reference"> <link rel="prev" href="NMClient.html" title="NMClient"> <link rel="next" href="NMObject.html" title="NMObject"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -365,7 +365,7 @@ something like this:</p> note that this object will be unrefed after the callback has returned, use <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>/<a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> if you want to use this object after the callback has returned. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>secrets</p></td> @@ -422,7 +422,7 @@ should be called.</p> note that this object will be unrefed after the callback has returned, use <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>/<a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> if you want to use this object after the callback has returned. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> @@ -469,7 +469,7 @@ should be called.</p> note that this object will be unrefed after the callback has returned, use <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>/<a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> if you want to use this object after the callback has returned. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> @@ -511,7 +511,7 @@ nm_secret_agent_old_get_dbus_connection <p>the <a href="https://developer.gnome.org/gio/unstable/GDBusConnection.html#GDBusConnection-struct"><span class="type">GDBusConnection</span></a> used by the secret agent. You may either set this as construct property <a class="link" href="NMSecretAgentOld.html#NM-SECRET-AGENT-OLD-DBUS-CONNECTION:CAPS" title="NM_SECRET_AGENT_OLD_DBUS_CONNECTION"><code class="literal">NM_SECRET_AGENT_OLD_DBUS_CONNECTION</code></a>, or it will automatically set during initialization. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -540,7 +540,7 @@ nm_secret_agent_old_get_main_context (<em class="parameter"><code><a class="link <p>the <a href="https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> instance associate with the instance. This is the <a href="https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-get-thread-default"><code class="function">g_main_context_get_thread_default()</code></a> at the time when creating the instance. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -579,7 +579,7 @@ that all remains are cleaned up.</p> <p>a <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that you may register a weak pointer to know that the <a href="https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> is still kept busy by <em class="parameter"><code>self</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -1152,6 +1152,6 @@ of 3 characters. An example valid identifier is 'org.gnome.nm-applet' </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSetting.html b/docs/libnm/html/NMSetting.html index d7b87b47..36675132 100644 --- a/docs/libnm/html/NMSetting.html +++ b/docs/libnm/html/NMSetting.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMRemoteConnection.html" title="NMRemoteConnection"> <link rel="next" href="NMSettingConnection.html" title="NMSettingConnection"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -440,7 +440,7 @@ nm_setting_duplicate (<em class="parameter"><code><a class="link" href="NMSettin <a name="nm-setting-duplicate.returns"></a><h4>Returns</h4> <p>a new <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> containing the same properties and values as the source <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -659,7 +659,7 @@ 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 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. </p></td> -<td class="parameter_annotations"><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> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><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> </tr> </tbody> </table></div> @@ -866,7 +866,7 @@ nm_setting_option_get (<em class="parameter"><code><a class="link" href="NMSetti <a name="nm-setting-option-get.returns"></a><h4>Returns</h4> <p>the <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the option is not set. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.26.</p> </div> @@ -1097,7 +1097,7 @@ nm_setting_option_get_all_names (<em class="parameter"><code><a class="link" hre <p>A <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated array of key names. If no names are present, this returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned array and the names are owned by <a class="link" href="NMSetting.html" title="NMSetting"><code class="literal">NMSetting</code></a> and might be invalidated by the next operation. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len zero-terminated=1][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.26</p> </div> @@ -1458,6 +1458,6 @@ if you specify <em class="parameter"><code>NM_SETTING_COMPARE_FLAG_DIFF_RESULT_W </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSetting6Lowpan.html b/docs/libnm/html/NMSetting6Lowpan.html index a00b307f..f179af2b 100644 --- a/docs/libnm/html/NMSetting6Lowpan.html +++ b/docs/libnm/html/NMSetting6Lowpan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingConnection.html" title="NMSettingConnection"> <link rel="next" href="NMSetting8021x.html" title="NMSetting8021x"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -91,7 +91,7 @@ nm_setting_6lowpan_new (<em class="parameter"><code><span class="type">void</spa <div class="refsect3"> <a name="nm-setting-6lowpan-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSetting6Lowpan.html" title="NMSetting6Lowpan"><span class="type">NMSetting6Lowpan</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -138,6 +138,6 @@ nm_setting_6lowpan_get_parent (<em class="parameter"><code><a class="link" href= </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSetting8021x.html b/docs/libnm/html/NMSetting8021x.html index da4624a4..f8759573 100644 --- a/docs/libnm/html/NMSetting8021x.html +++ b/docs/libnm/html/NMSetting8021x.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSetting6Lowpan.html" title="NMSetting6Lowpan"> <link rel="next" href="NMSettingAdsl.html" title="NMSettingAdsl"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -1456,7 +1456,7 @@ of the network cannot be confirmed by the client.</p> <div class="refsect3"> <a name="nm-setting-802-1x-get-ca-cert-blob.returns"></a><h4>Returns</h4> <p>the CA certificate data. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1971,7 +1971,7 @@ authentication method.</p> <div class="refsect3"> <a name="nm-setting-802-1x-get-client-cert-blob.returns"></a><h4>Returns</h4> <p>the client certificate data. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2354,7 +2354,7 @@ of the network cannot be confirmed by the client.</p> <div class="refsect3"> <a name="nm-setting-802-1x-get-phase2-ca-cert-blob.returns"></a><h4>Returns</h4> <p>the "phase 2" CA certificate data. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2877,7 +2877,7 @@ authentication method.</p> <div class="refsect3"> <a name="nm-setting-802-1x-get-phase2-client-cert-blob.returns"></a><h4>Returns</h4> <p>the "phase 2" client certificate data. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3140,7 +3140,7 @@ nm_setting_802_1x_get_password_raw (<em class="parameter"><code><a class="link" <p>the password used by the authentication method as a UTF-8-encoded array of bytes, as specified by the <span class="type">“password-raw”</span> property. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3285,7 +3285,7 @@ keys should always be encrypted with a private key password.</p> <div class="refsect3"> <a name="nm-setting-802-1x-get-private-key-blob.returns"></a><h4>Returns</h4> <p>the private key data. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -3581,7 +3581,7 @@ keys should always be encrypted with a private key password.</p> <div class="refsect3"> <a name="nm-setting-802-1x-get-phase2-private-key-blob.returns"></a><h4>Returns</h4> <p>the "phase 2" private key data. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -4360,6 +4360,6 @@ type.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingAdsl.html b/docs/libnm/html/NMSettingAdsl.html index be71a24a..6ae00ebd 100644 --- a/docs/libnm/html/NMSettingAdsl.html +++ b/docs/libnm/html/NMSettingAdsl.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSetting8021x.html" title="NMSetting8021x"> <link rel="next" href="NMSettingBluetooth.html" title="NMSettingBluetooth"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -440,6 +440,6 @@ nm_setting_adsl_get_password_flags (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingBluetooth.html b/docs/libnm/html/NMSettingBluetooth.html index dc649be1..389812b6 100644 --- a/docs/libnm/html/NMSettingBluetooth.html +++ b/docs/libnm/html/NMSettingBluetooth.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingAdsl.html" title="NMSettingAdsl"> <link rel="next" href="NMSettingBondPort.html" title="NMSettingBondPort"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -116,7 +116,7 @@ nm_setting_bluetooth_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-bluetooth-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingBluetooth.html" title="NMSettingBluetooth"><span class="type">NMSettingBluetooth</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -222,6 +222,6 @@ which accepts PANU clients.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingBond.html b/docs/libnm/html/NMSettingBond.html index 7c23901f..75ffeb87 100644 --- a/docs/libnm/html/NMSettingBond.html +++ b/docs/libnm/html/NMSettingBond.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingBondPort.html" title="NMSettingBondPort"> <link rel="next" href="NMSettingBridgePort.html" title="NMSettingBridgePort"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -264,7 +264,7 @@ nm_setting_bond_new (<em class="parameter"><code><span class="type">void</span>< <div class="refsect3"> <a name="nm-setting-bond-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingBond.html" title="NMSettingBond"><span class="type">NMSettingBond</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -332,14 +332,14 @@ such as during option iteration.</p> <td class="parameter_name"><p>out_name</p></td> <td class="parameter_description"><p>on return, the name of the bonding option; this value is owned by the setting and should not be modified. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_value</p></td> <td class="parameter_description"><p>on return, the value of the name of the bonding option; this value is owned by the setting and should not be modified. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -543,7 +543,7 @@ nm_setting_bond_get_valid_options (<em class="parameter"><code><a class="link" h <div class="refsect3"> <a name="nm-setting-bond-get-valid-options.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings of valid bond options. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -801,6 +801,6 @@ to the connection.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingBondPort.html b/docs/libnm/html/NMSettingBondPort.html index e8f55039..323d19da 100644 --- a/docs/libnm/html/NMSettingBondPort.html +++ b/docs/libnm/html/NMSettingBondPort.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingBluetooth.html" title="NMSettingBluetooth"> <link rel="next" href="NMSettingBond.html" title="NMSettingBond"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -92,7 +92,7 @@ nm_setting_bond_port_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-bond-port-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort"><span class="type">NMSettingBondPort</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.34</p> </div> @@ -139,6 +139,6 @@ nm_setting_bond_port_get_queue_id (<em class="parameter"><code><a class="link" h </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingBridge.html b/docs/libnm/html/NMSettingBridge.html index 645a3387..be894860 100644 --- a/docs/libnm/html/NMSettingBridge.html +++ b/docs/libnm/html/NMSettingBridge.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingBridgePort.html" title="NMSettingBridgePort"> <link rel="next" href="NMSettingCdma.html" title="NMSettingCdma"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -567,7 +567,7 @@ nm_setting_bridge_new (<em class="parameter"><code><span class="type">void</span <div class="refsect3"> <a name="nm-setting-bridge-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingBridge.html" title="NMSettingBridge"><span class="type">NMSettingBridge</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -942,7 +942,7 @@ nm_setting_bridge_get_vlan (<em class="parameter"><code><a class="link" href="NM <a name="nm-setting-bridge-get-vlan.returns"></a><h4>Returns</h4> <p>the VLAN at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -1086,7 +1086,7 @@ and 4094.</p></td> <div class="refsect3"> <a name="nm-bridge-vlan-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingBridge.html#NMBridgeVlan"><span class="type">NMBridgeVlan</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -1167,7 +1167,7 @@ nm_bridge_vlan_new_clone (<em class="parameter"><code>const <a class="link" href <p>a clone of <em class="parameter"><code>vlan</code></em> . This instance is always unsealed. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -2081,6 +2081,6 @@ nm_setting_bridge_get_multicast_startup_query_interval </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingBridgePort.html b/docs/libnm/html/NMSettingBridgePort.html index 9a72cdb8..dfd522e0 100644 --- a/docs/libnm/html/NMSettingBridgePort.html +++ b/docs/libnm/html/NMSettingBridgePort.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingBond.html" title="NMSettingBond"> <link rel="next" href="NMSettingBridge.html" title="NMSettingBridge"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -168,7 +168,7 @@ nm_setting_bridge_port_new (<em class="parameter"><code><span class="type">void< <div class="refsect3"> <a name="nm-setting-bridge-port-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingBridgePort.html" title="NMSettingBridgePort"><span class="type">NMSettingBridgePort</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -337,7 +337,7 @@ nm_setting_bridge_port_get_vlan (<em class="parameter"><code><a class="link" hre <a name="nm-setting-bridge-port-get-vlan.returns"></a><h4>Returns</h4> <p>the VLAN at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -480,6 +480,6 @@ nm_setting_bridge_port_clear_vlans (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingCdma.html b/docs/libnm/html/NMSettingCdma.html index f8f9df3e..4b7fa909 100644 --- a/docs/libnm/html/NMSettingCdma.html +++ b/docs/libnm/html/NMSettingCdma.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingBridge.html" title="NMSettingBridge"> <link rel="next" href="NMSettingDcb.html" title="NMSettingDcb"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -307,6 +307,6 @@ nm_setting_cdma_get_mtu (<em class="parameter"><code><a class="link" href="NMSet </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingConnection.html b/docs/libnm/html/NMSettingConnection.html index 2908451c..432a58f0 100644 --- a/docs/libnm/html/NMSettingConnection.html +++ b/docs/libnm/html/NMSettingConnection.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSetting.html" title="NMSetting"> <link rel="next" href="NMSetting6Lowpan.html" title="NMSetting6Lowpan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -2018,6 +2018,6 @@ master is activated</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingDcb.html b/docs/libnm/html/NMSettingDcb.html index e23ecdb6..4370ce9d 100644 --- a/docs/libnm/html/NMSettingDcb.html +++ b/docs/libnm/html/NMSettingDcb.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingCdma.html" title="NMSettingCdma"> <link rel="next" href="NMSettingDummy.html" title="NMSettingDummy"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -329,7 +329,7 @@ nm_setting_dcb_new (<em class="parameter"><code><span class="type">void</span></ <div class="refsect3"> <a name="nm-setting-dcb-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingDcb.html" title="NMSettingDcb"><span class="type">NMSettingDcb</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1143,6 +1143,6 @@ peer configuration advertisements</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingDummy.html b/docs/libnm/html/NMSettingDummy.html index 40233dfb..fe0d590f 100644 --- a/docs/libnm/html/NMSettingDummy.html +++ b/docs/libnm/html/NMSettingDummy.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingDcb.html" title="NMSettingDcb"> <link rel="next" href="NMSettingEthtool.html" title="NMSettingEthtool"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -76,7 +76,7 @@ nm_setting_dummy_new (<em class="parameter"><code><span class="type">void</span> <div class="refsect3"> <a name="nm-setting-dummy-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingDummy.html" title="NMSettingDummy"><span class="type">NMSettingDummy</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.8</p> </div> @@ -91,6 +91,6 @@ nm_setting_dummy_new (<em class="parameter"><code><span class="type">void</span> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingEthtool.html b/docs/libnm/html/NMSettingEthtool.html index 05cbfff1..48f950c5 100644 --- a/docs/libnm/html/NMSettingEthtool.html +++ b/docs/libnm/html/NMSettingEthtool.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingDummy.html" title="NMSettingDummy"> <link rel="next" href="NMSettingGeneric.html" title="NMSettingGeneric"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -245,7 +245,7 @@ nm_setting_ethtool_new (<em class="parameter"><code><span class="type">void</spa <div class="refsect3"> <a name="nm-setting-ethtool-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingEthtool.html" title="NMSettingEthtool"><span class="type">NMSettingEthtool</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -291,7 +291,7 @@ names or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros <em class="parameter"><code>setting</code></em> and may get invalidated when <em class="parameter"><code>setting</code></em> gets modified. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.20</p> </div> @@ -422,6 +422,6 @@ nm_setting_ethtool_clear_features (<em class="parameter"><code><a class="link" h </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingGeneric.html b/docs/libnm/html/NMSettingGeneric.html index e11413df..4a10561c 100644 --- a/docs/libnm/html/NMSettingGeneric.html +++ b/docs/libnm/html/NMSettingGeneric.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingEthtool.html" title="NMSettingEthtool"> <link rel="next" href="NMSettingGsm.html" title="NMSettingGsm"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -79,7 +79,7 @@ nm_setting_generic_new (<em class="parameter"><code><span class="type">void</spa <div class="refsect3"> <a name="nm-setting-generic-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingGeneric.html" title="NMSettingGeneric"><span class="type">NMSettingGeneric</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> </div> @@ -93,6 +93,6 @@ nm_setting_generic_new (<em class="parameter"><code><span class="type">void</spa </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingGsm.html b/docs/libnm/html/NMSettingGsm.html index 07b24783..b6477e6f 100644 --- a/docs/libnm/html/NMSettingGsm.html +++ b/docs/libnm/html/NMSettingGsm.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingGeneric.html" title="NMSettingGeneric"> <link rel="next" href="NMSettingHostname.html" title="NMSettingHostname"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -696,6 +696,6 @@ nm_setting_gsm_get_password_flags (<em class="parameter"><code><a class="link" h </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingHostname.html b/docs/libnm/html/NMSettingHostname.html index 9a660e96..5ad796ae 100644 --- a/docs/libnm/html/NMSettingHostname.html +++ b/docs/libnm/html/NMSettingHostname.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingGsm.html" title="NMSettingGsm"> <link rel="next" href="NMSettingInfiniband.html" title="NMSettingInfiniband"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -131,7 +131,7 @@ nm_setting_hostname_new (<em class="parameter"><code><span class="type">void</sp <div class="refsect3"> <a name="nm-setting-hostname-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingHostname.html" title="NMSettingHostname"><span class="type">NMSettingHostname</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -284,6 +284,6 @@ property.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingIP4Config.html b/docs/libnm/html/NMSettingIP4Config.html index cfa184e9..f7f4d2f5 100644 --- a/docs/libnm/html/NMSettingIP4Config.html +++ b/docs/libnm/html/NMSettingIP4Config.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingIPTunnel.html" title="NMSettingIPTunnel"> <link rel="next" href="NMSettingIP6Config.html" title="NMSettingIP6Config"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -147,7 +147,7 @@ nm_setting_ip4_config_new (<em class="parameter"><code><span class="type">void</ <div class="refsect3"> <a name="nm-setting-ip4-config-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingIP4Config.html" title="NMSettingIP4Config"><span class="type">NMSettingIP4Config</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -309,6 +309,6 @@ through that interface to the default network.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingIP6Config.html b/docs/libnm/html/NMSettingIP6Config.html index e6283e4a..8fdb6ef7 100644 --- a/docs/libnm/html/NMSettingIP6Config.html +++ b/docs/libnm/html/NMSettingIP6Config.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingIP4Config.html" title="NMSettingIP4Config"> <link rel="next" href="NMSettingMacsec.html" title="NMSettingMacsec"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -195,7 +195,7 @@ nm_setting_ip6_config_new (<em class="parameter"><code><span class="type">void</ <div class="refsect3"> <a name="nm-setting-ip6-config-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingIP6Config.html" title="NMSettingIP6Config"><span class="type">NMSettingIP6Config</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -526,6 +526,6 @@ specified by RFC7217.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingIPConfig.html b/docs/libnm/html/NMSettingIPConfig.html index 6981e33d..02861e14 100644 --- a/docs/libnm/html/NMSettingIPConfig.html +++ b/docs/libnm/html/NMSettingIPConfig.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingInfiniband.html" title="NMSettingInfiniband"> <link rel="next" href="NMSettingIPTunnel.html" title="NMSettingIPTunnel"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -1508,7 +1508,7 @@ nm_ip_address_new (<em class="parameter"><code><span class="type">int</span> fam <div class="refsect3"> <a name="nm-ip-address-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1559,7 +1559,7 @@ correct size for <em class="parameter"><code>family</code></em> <div class="refsect3"> <a name="nm-ip-address-new-binary.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1718,7 +1718,7 @@ nm_ip_address_dup (<em class="parameter"><code><a class="link" href="NMSettingIP <p>This API was part of public headers before 1.32.0 but was erroneously not exported in the ABI. It is thus only usable since 1.32.0. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.32</p> </div> @@ -1959,7 +1959,7 @@ nm_ip_address_get_attribute_names (<em class="parameter"><code><a class="link" h <div class="refsect3"> <a name="nm-ip-address-get-attribute-names.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of attribute names,. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2000,7 +2000,7 @@ on <em class="parameter"><code>address</code></em> , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>address</code></em> has no such attribute. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2034,7 +2034,7 @@ nm_ip_address_set_attribute (<em class="parameter"><code><a class="link" href="N <tr> <td class="parameter_name"><p>value</p></td> <td class="parameter_description"><p>the value. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -2097,7 +2097,7 @@ nm_ip_route_new (<em class="parameter"><code><span class="type">int</span> famil <div class="refsect3"> <a name="nm-ip-route-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2161,7 +2161,7 @@ point to buffers of the correct size for <em class="parameter"><code>family</cod <div class="refsect3"> <a name="nm-ip-route-new-binary.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2319,7 +2319,7 @@ nm_ip_route_dup (<em class="parameter"><code><a class="link" href="NMSettingIPCo <p>This API was part of public headers before 1.32.0 but was erroneously not exported in the ABI. It is thus only usable since 1.32.0. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.32</p> </div> @@ -2755,7 +2755,7 @@ nm_ip_route_get_attribute_names (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-ip-route-get-attribute-names.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of attribute names. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2796,7 +2796,7 @@ on <em class="parameter"><code>route</code></em> , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>route</code></em> has no such attribute. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2830,7 +2830,7 @@ nm_ip_route_set_attribute (<em class="parameter"><code><a class="link" href="NMS <tr> <td class="parameter_name"><p>value</p></td> <td class="parameter_description"><p>the value. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -2927,7 +2927,7 @@ nm_ip_routing_rule_new (<em class="parameter"><code><span class="type">int</span <a name="nm-ip-routing-rule-new.returns"></a><h4>Returns</h4> <p>a newly created rule instance with the provided address family. The instance is unsealed. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -2957,7 +2957,7 @@ nm_ip_routing_rule_new_clone (<em class="parameter"><code>const <a class="link" the same settings as <em class="parameter"><code>rule</code></em> . Note that the instance will always be unsealred. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -2988,7 +2988,7 @@ This is not thread-safe.</p> <p>the <em class="parameter"><code>self</code></em> argument with incremented reference count. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -3644,7 +3644,7 @@ nm_ip_routing_rule_get_from (<em class="parameter"><code>const <a class="link" h <a name="nm-ip-routing-rule-get-from.returns"></a><h4>Returns</h4> <p>the set from/src parameter or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, if no value is set. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -3737,7 +3737,7 @@ nm_ip_routing_rule_get_to (<em class="parameter"><code>const <a class="link" hre <a name="nm-ip-routing-rule-get-to.returns"></a><h4>Returns</h4> <p>the set to/dst parameter or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, if no value is set. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -3805,7 +3805,7 @@ nm_ip_routing_rule_get_iifname (<em class="parameter"><code>const <a class="link <div class="refsect3"> <a name="nm-ip-routing-rule-get-iifname.returns"></a><h4>Returns</h4> <p>the set iifname or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unset. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -3866,7 +3866,7 @@ nm_ip_routing_rule_get_oifname (<em class="parameter"><code>const <a class="link <div class="refsect3"> <a name="nm-ip-routing-rule-get-oifname.returns"></a><h4>Returns</h4> <p>the set oifname or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unset. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -4271,7 +4271,7 @@ conversion. Currently, not extra arguments are supported. </p></td> <div class="refsect3"> <a name="nm-ip-routing-rule-from-string.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingIPConfig.html#NMIPRoutingRule"><span class="type">NMIPRoutingRule</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -4320,7 +4320,7 @@ conversion. Currently, not extra arguments are supported. </p></td> <div class="refsect3"> <a name="nm-ip-routing-rule-to-string.returns"></a><h4>Returns</h4> <p>the string representation or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -5034,7 +5034,7 @@ nm_setting_ip_config_get_address (<em class="parameter"><code><a class="link" hr <a name="nm-setting-ip-config-get-address.returns"></a><h4>Returns</h4> <p>the address at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -5245,7 +5245,7 @@ nm_setting_ip_config_get_route (<em class="parameter"><code><a class="link" href <a name="nm-setting-ip-config-get-route.returns"></a><h4>Returns</h4> <p>the route at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -5495,7 +5495,7 @@ nm_setting_ip_config_get_routing_rule (<em class="parameter"><code><a class="lin <a name="nm-setting-ip-config-get-routing-rule.returns"></a><h4>Returns</h4> <p>the routing rule at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -5938,7 +5938,7 @@ nm_setting_ip_config_get_dhcp_reject_servers <a name="nm-setting-ip-config-get-dhcp-reject-servers.returns"></a><h4>Returns</h4> <p>A <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated array of DHCP reject servers. Even if no reject servers are configured, this always returns a non <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> value. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len zero-terminated=1][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.28</p> </div> @@ -6551,6 +6551,6 @@ incompatible with any other FQDN flag.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingIPTunnel.html b/docs/libnm/html/NMSettingIPTunnel.html index b86c8cf5..88bc354e 100644 --- a/docs/libnm/html/NMSettingIPTunnel.html +++ b/docs/libnm/html/NMSettingIPTunnel.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingIPConfig.html" title="NMSettingIPConfig"> <link rel="next" href="NMSettingIP4Config.html" title="NMSettingIP4Config"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -240,7 +240,7 @@ nm_setting_ip_tunnel_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-ip-tunnel-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingIPTunnel.html" title="NMSettingIPTunnel"><span class="type">NMSettingIPTunnel</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -716,6 +716,6 @@ nm_setting_ip_tunnel_get_flags (<em class="parameter"><code><a class="link" href </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingInfiniband.html b/docs/libnm/html/NMSettingInfiniband.html index 8b981899..185907d0 100644 --- a/docs/libnm/html/NMSettingInfiniband.html +++ b/docs/libnm/html/NMSettingInfiniband.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingHostname.html" title="NMSettingHostname"> <link rel="next" href="NMSettingIPConfig.html" title="NMSettingIPConfig"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -144,7 +144,7 @@ nm_setting_infiniband_new (<em class="parameter"><code><span class="type">void</ <div class="refsect3"> <a name="nm-setting-infiniband-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingInfiniband.html" title="NMSettingInfiniband"><span class="type">NMSettingInfiniband</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -349,6 +349,6 @@ return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.h </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingMacsec.html b/docs/libnm/html/NMSettingMacsec.html index 511276b4..3492a89a 100644 --- a/docs/libnm/html/NMSettingMacsec.html +++ b/docs/libnm/html/NMSettingMacsec.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingIP6Config.html" title="NMSettingIP6Config"> <link rel="next" href="NMSettingMacvlan.html" title="NMSettingMacvlan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -209,7 +209,7 @@ nm_setting_macsec_new (<em class="parameter"><code><span class="type">void</span <div class="refsect3"> <a name="nm-setting-macsec-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingMacsec.html" title="NMSettingMacsec"><span class="type">NMSettingMacsec</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.6</p> </div> @@ -599,6 +599,6 @@ verify frames are dropped</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingMacvlan.html b/docs/libnm/html/NMSettingMacvlan.html index 393773f7..2b084c14 100644 --- a/docs/libnm/html/NMSettingMacvlan.html +++ b/docs/libnm/html/NMSettingMacvlan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingMacsec.html" title="NMSettingMacsec"> <link rel="next" href="NMSettingMatch.html" title="NMSettingMatch"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -138,7 +138,7 @@ nm_setting_macvlan_new (<em class="parameter"><code><span class="type">void</spa <div class="refsect3"> <a name="nm-setting-macvlan-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingMacvlan.html" title="NMSettingMacvlan"><span class="type">NMSettingMacvlan</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -349,6 +349,6 @@ nm_setting_macvlan_get_tap (<em class="parameter"><code><a class="link" href="NM </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingMatch.html b/docs/libnm/html/NMSettingMatch.html index 8a6e33a2..188bd2c3 100644 --- a/docs/libnm/html/NMSettingMatch.html +++ b/docs/libnm/html/NMSettingMatch.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingMacvlan.html" title="NMSettingMacvlan"> <link rel="next" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -319,7 +319,7 @@ nm_setting_match_new (<em class="parameter"><code><span class="type">void</span> But due to a bug the symbol is only exposed and usable since version 1.32. As workaround, use g_object_new(NM_TYPE_SETTING_MATCH) which works with all versions since 1.14. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.32</p> </div> @@ -544,7 +544,7 @@ nm_setting_match_get_interface_names (<em class="parameter"><code><a class="link <p>the NULL terminated list of configured interface names.</p> <p>Before 1.26, the returned array was not <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated and you MUST provide a length. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -770,7 +770,7 @@ nm_setting_match_get_kernel_command_lines <div class="refsect3"> <a name="nm-setting-match-get-kernel-command-lines.returns"></a><h4>Returns</h4> <p>the configured interface names. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> </div> <p class="since">Since: 1.26</p> </div> @@ -990,7 +990,7 @@ nm_setting_match_get_drivers (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-setting-match-get-drivers.returns"></a><h4>Returns</h4> <p>the configured drivers. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> </div> <p class="since">Since: 1.26</p> </div> @@ -1209,7 +1209,7 @@ nm_setting_match_get_paths (<em class="parameter"><code><a class="link" href="NM <div class="refsect3"> <a name="nm-setting-match-get-paths.returns"></a><h4>Returns</h4> <p>the configured paths. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> </div> <p class="since">Since: 1.26</p> </div> @@ -1248,6 +1248,6 @@ nm_setting_match_get_paths (<em class="parameter"><code><a class="link" href="NM </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOlpcMesh.html b/docs/libnm/html/NMSettingOlpcMesh.html index 42365d0f..c20ae085 100644 --- a/docs/libnm/html/NMSettingOlpcMesh.html +++ b/docs/libnm/html/NMSettingOlpcMesh.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingMatch.html" title="NMSettingMatch"> <link rel="next" href="NMSettingOvsBridge.html" title="NMSettingOvsBridge"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -140,7 +140,7 @@ nm_setting_olpc_mesh_get_ssid (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-setting-olpc-mesh-get-ssid.returns"></a><h4>Returns</h4> <p>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -185,6 +185,6 @@ nm_setting_olpc_mesh_get_dhcp_anycast_address </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOvsBridge.html b/docs/libnm/html/NMSettingOvsBridge.html index f4a853c8..9d0a6da9 100644 --- a/docs/libnm/html/NMSettingOvsBridge.html +++ b/docs/libnm/html/NMSettingOvsBridge.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOlpcMesh.html" title="NMSettingOlpcMesh"> <link rel="next" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -138,7 +138,7 @@ nm_setting_ovs_bridge_new (<em class="parameter"><code><span class="type">void</ <div class="refsect3"> <a name="nm-setting-ovs-bridge-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingOvsBridge.html" title="NMSettingOvsBridge"><span class="type">NMSettingOvsBridge</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -315,6 +315,6 @@ nm_setting_ovs_bridge_get_datapath_type </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOvsDpdk.html b/docs/libnm/html/NMSettingOvsDpdk.html index 275ed461..1b138618 100644 --- a/docs/libnm/html/NMSettingOvsDpdk.html +++ b/docs/libnm/html/NMSettingOvsDpdk.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOvsBridge.html" title="NMSettingOvsBridge"> <link rel="next" href="NMSettingOvsExternalIDs.html" title="NMSettingOvsExternalIDs"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -54,6 +54,14 @@ <a class="link" href="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-get-devargs" title="nm_setting_ovs_dpdk_get_devargs ()">nm_setting_ovs_dpdk_get_devargs</a> <span class="c_punctuation">()</span> </td> </tr> +<tr> +<td class="function_type"> +<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> +</td> +<td class="function_name"> +<a class="link" href="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-get-n-rxq" title="nm_setting_ovs_dpdk_get_n_rxq ()">nm_setting_ovs_dpdk_get_n_rxq</a> <span class="c_punctuation">()</span> +</td> +</tr> </tbody> </table></div> </div> @@ -73,6 +81,10 @@ <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-DEVARGS:CAPS" title="NM_SETTING_OVS_DPDK_DEVARGS">NM_SETTING_OVS_DPDK_DEVARGS</a></td> </tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-N-RXQ:CAPS" title="NM_SETTING_OVS_DPDK_N_RXQ">NM_SETTING_OVS_DPDK_N_RXQ</a></td> +</tr> </tbody> </table></div> </div> @@ -91,7 +103,7 @@ nm_setting_ovs_dpdk_new (<em class="parameter"><code><span class="type">void</sp <div class="refsect3"> <a name="nm-setting-ovs-dpdk-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk"><span class="type">NMSettingOvsDpdk</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.20</p> </div> @@ -121,6 +133,32 @@ nm_setting_ovs_dpdk_get_devargs (<em class="parameter"><code><a class="link" hre </div> <p class="since">Since: 1.20</p> </div> +<hr> +<div class="refsect2"> +<a name="nm-setting-ovs-dpdk-get-n-rxq"></a><h3>nm_setting_ovs_dpdk_get_n_rxq ()</h3> +<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> +nm_setting_ovs_dpdk_get_n_rxq (<em class="parameter"><code><a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk"><span class="type">NMSettingOvsDpdk</span></a> *self</code></em>);</pre> +<div class="refsect3"> +<a name="nm-setting-ovs-dpdk-get-n-rxq.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>self</p></td> +<td class="parameter_description"><p>the <a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk"><span class="type">NMSettingOvsDpdk</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="nm-setting-ovs-dpdk-get-n-rxq.returns"></a><h4>Returns</h4> +<p> the <span class="type">“n-rxq”</span> property of the setting</p> +</div> +<p class="since">Since: 1.36</p> +</div> </div> <div class="refsect1"> <a name="NMSettingOvsDpdk.other_details"></a><h2>Types and Values</h2> @@ -135,9 +173,15 @@ nm_setting_ovs_dpdk_get_devargs (<em class="parameter"><code><a class="link" hre <pre class="programlisting">#define NM_SETTING_OVS_DPDK_DEVARGS "devargs" </pre> </div> +<hr> +<div class="refsect2"> +<a name="NM-SETTING-OVS-DPDK-N-RXQ:CAPS"></a><h3>NM_SETTING_OVS_DPDK_N_RXQ</h3> +<pre class="programlisting">#define NM_SETTING_OVS_DPDK_N_RXQ "n-rxq" +</pre> +</div> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOvsExternalIDs.html b/docs/libnm/html/NMSettingOvsExternalIDs.html index 95ac7f5b..639dd644 100644 --- a/docs/libnm/html/NMSettingOvsExternalIDs.html +++ b/docs/libnm/html/NMSettingOvsExternalIDs.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk"> <link rel="next" href="NMSettingOvsInterface.html" title="NMSettingOvsInterface"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -123,7 +123,7 @@ nm_setting_ovs_external_ids_new (<em class="parameter"><code><span class="type"> <a name="nm-setting-ovs-external-ids-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingOvsExternalIDs.html" title="NMSettingOvsExternalIDs"><span class="type">NMSettingOvsExternalIDs</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> NMSettingOvsExternalIDs]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> NMSettingOvsExternalIDs]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -160,7 +160,7 @@ nm_setting_ovs_external_ids_get_data_keys <a name="nm-setting-ovs-external-ids-get-data-keys.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array containing each key from the table. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -196,7 +196,7 @@ nm_setting_ovs_external_ids_get_data (<em class="parameter"><code><a class="link <p>the value associated with <em class="parameter"><code>key</code></em> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such value exists. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -331,6 +331,6 @@ is a valid user data value.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOvsInterface.html b/docs/libnm/html/NMSettingOvsInterface.html index 6d0dacda..acb3fff9 100644 --- a/docs/libnm/html/NMSettingOvsInterface.html +++ b/docs/libnm/html/NMSettingOvsInterface.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOvsExternalIDs.html" title="NMSettingOvsExternalIDs"> <link rel="next" href="NMSettingOvsPatch.html" title="NMSettingOvsPatch"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -91,7 +91,7 @@ nm_setting_ovs_interface_new (<em class="parameter"><code><span class="type">voi <div class="refsect3"> <a name="nm-setting-ovs-interface-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingOvsInterface.html" title="NMSettingOvsInterface"><span class="type">NMSettingOvsInterface</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -139,6 +139,6 @@ nm_setting_ovs_interface_get_interface_type </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOvsPatch.html b/docs/libnm/html/NMSettingOvsPatch.html index 889191cd..41b4d578 100644 --- a/docs/libnm/html/NMSettingOvsPatch.html +++ b/docs/libnm/html/NMSettingOvsPatch.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOvsInterface.html" title="NMSettingOvsInterface"> <link rel="next" href="NMSettingOvsPort.html" title="NMSettingOvsPort"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -91,7 +91,7 @@ nm_setting_ovs_patch_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-ovs-patch-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingOvsPatch.html" title="NMSettingOvsPatch"><span class="type">NMSettingOvsPatch</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -138,6 +138,6 @@ nm_setting_ovs_patch_get_peer (<em class="parameter"><code><a class="link" href= </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingOvsPort.html b/docs/libnm/html/NMSettingOvsPort.html index 18e19aac..d73d5b28 100644 --- a/docs/libnm/html/NMSettingOvsPort.html +++ b/docs/libnm/html/NMSettingOvsPort.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOvsPatch.html" title="NMSettingOvsPatch"> <link rel="next" href="NMSettingPpp.html" title="NMSettingPpp"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -149,7 +149,7 @@ nm_setting_ovs_port_new (<em class="parameter"><code><span class="type">void</sp <div class="refsect3"> <a name="nm-setting-ovs-port-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingOvsPort.html" title="NMSettingOvsPort"><span class="type">NMSettingOvsPort</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.10</p> </div> @@ -357,6 +357,6 @@ nm_setting_ovs_port_get_bond_downdelay </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingPpp.html b/docs/libnm/html/NMSettingPpp.html index 8874fe03..01e0b26e 100644 --- a/docs/libnm/html/NMSettingPpp.html +++ b/docs/libnm/html/NMSettingPpp.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingOvsPort.html" title="NMSettingOvsPort"> <link rel="next" href="NMSettingPppoe.html" title="NMSettingPppoe"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -298,7 +298,7 @@ nm_setting_ppp_new (<em class="parameter"><code><span class="type">void</span></ <div class="refsect3"> <a name="nm-setting-ppp-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingPpp.html" title="NMSettingPpp"><span class="type">NMSettingPpp</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -870,6 +870,6 @@ nm_setting_ppp_get_lcp_echo_interval (<em class="parameter"><code><a class="link </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingPppoe.html b/docs/libnm/html/NMSettingPppoe.html index a122631a..b4758f37 100644 --- a/docs/libnm/html/NMSettingPppoe.html +++ b/docs/libnm/html/NMSettingPppoe.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingPpp.html" title="NMSettingPpp"> <link rel="next" href="NMSettingProxy.html" title="NMSettingProxy"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -137,7 +137,7 @@ nm_setting_pppoe_new (<em class="parameter"><code><span class="type">void</span> <div class="refsect3"> <a name="nm-setting-pppoe-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingPppoe.html" title="NMSettingPppoe"><span class="type">NMSettingPppoe</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -307,6 +307,6 @@ nm_setting_pppoe_get_password_flags (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingProxy.html b/docs/libnm/html/NMSettingProxy.html index bba60204..9292178b 100644 --- a/docs/libnm/html/NMSettingProxy.html +++ b/docs/libnm/html/NMSettingProxy.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingPppoe.html" title="NMSettingPppoe"> <link rel="next" href="NMSettingSerial.html" title="NMSettingSerial"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -320,6 +320,6 @@ nm_setting_proxy_get_pac_script (<em class="parameter"><code><a class="link" hre </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingSerial.html b/docs/libnm/html/NMSettingSerial.html index 07f8d189..b4f5f1f5 100644 --- a/docs/libnm/html/NMSettingSerial.html +++ b/docs/libnm/html/NMSettingSerial.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingProxy.html" title="NMSettingProxy"> <link rel="next" href="NMSettingSriov.html" title="NMSettingSriov"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -153,7 +153,7 @@ nm_setting_serial_new (<em class="parameter"><code><span class="type">void</span <div class="refsect3"> <a name="nm-setting-serial-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingSerial.html" title="NMSettingSerial"><span class="type">NMSettingSerial</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -360,6 +360,6 @@ nm_setting_serial_get_send_delay (<em class="parameter"><code><a class="link" hr </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingSriov.html b/docs/libnm/html/NMSettingSriov.html index 0b331f0a..a1b42911 100644 --- a/docs/libnm/html/NMSettingSriov.html +++ b/docs/libnm/html/NMSettingSriov.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingSerial.html" title="NMSettingSerial"> <link rel="next" href="NMSettingTCConfig.html" title="NMSettingTCConfig"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -326,7 +326,7 @@ nm_setting_sriov_new (<em class="parameter"><code><span class="type">void</span> <div class="refsect3"> <a name="nm-setting-sriov-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingSriov.html" title="NMSettingSriov"><span class="type">NMSettingSriov</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -416,7 +416,7 @@ nm_setting_sriov_get_vf (<em class="parameter"><code><a class="link" href="NMSet <a name="nm-setting-sriov-get-vf.returns"></a><h4>Returns</h4> <p>the VF at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -676,7 +676,7 @@ supports one VLAN per VF.</p> <div class="refsect3"> <a name="nm-sriov-vf-get-vlan-ids.returns"></a><h4>Returns</h4> <p>a list of VLAN ids configured on the VF. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -820,7 +820,7 @@ nm_sriov_vf_new (<em class="parameter"><code><a href="https://developer.gnome.or <div class="refsect3"> <a name="nm-sriov-vf-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingSriov.html#NMSriovVF"><span class="type">NMSriovVF</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -935,7 +935,7 @@ nm_sriov_vf_dup (<em class="parameter"><code>const <a class="link" href="NMSetti <a name="nm-sriov-vf-dup.returns"></a><h4>Returns</h4> <p>a copy of <em class="parameter"><code>vf</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -997,7 +997,7 @@ nm_sriov_vf_set_attribute (<em class="parameter"><code><a class="link" href="NMS <tr> <td class="parameter_name"><p>value</p></td> <td class="parameter_description"><p>the value. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -1029,7 +1029,7 @@ nm_sriov_vf_get_attribute_names (<em class="parameter"><code>const <a class="lin <div class="refsect3"> <a name="nm-sriov-vf-get-attribute-names.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of attribute names. </p> -<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -1071,7 +1071,7 @@ on <em class="parameter"><code>vf</code></em> , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>vf</code></em> has no such attribute. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -1214,6 +1214,6 @@ the value is of the correct type and well-formed.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingTCConfig.html b/docs/libnm/html/NMSettingTCConfig.html index 5e82df0b..50bebca4 100644 --- a/docs/libnm/html/NMSettingTCConfig.html +++ b/docs/libnm/html/NMSettingTCConfig.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingSriov.html" title="NMSettingSriov"> <link rel="next" href="NMSettingTeamPort.html" title="NMSettingTeamPort"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -477,7 +477,7 @@ nm_tc_qdisc_new (<em class="parameter"><code>const <span class="type">char</span <div class="refsect3"> <a name="nm-tc-qdisc-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTCConfig.html#NMTCQdisc"><span class="type">NMTCQdisc</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -591,7 +591,7 @@ nm_tc_qdisc_dup (<em class="parameter"><code><a class="link" href="NMSettingTCCo <a name="nm-tc-qdisc-dup.returns"></a><h4>Returns</h4> <p>a copy of <em class="parameter"><code>qdisc</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -726,7 +726,7 @@ nm_tc_qdisc_get_attribute_names (<em class="parameter"><code><a class="link" hre <a name="nm-tc-qdisc-get-attribute-names.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of attribute names or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no attributes are set. </p> -<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -768,7 +768,7 @@ on <em class="parameter"><code>qdisc</code></em> , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>qdisc</code></em> has no such attribute. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.18</p> </div> @@ -803,7 +803,7 @@ nm_tc_qdisc_set_attribute (<em class="parameter"><code><a class="link" href="NMS <tr> <td class="parameter_name"><p>value</p></td> <td class="parameter_description"><p>the value. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -842,7 +842,7 @@ nm_tc_action_new (<em class="parameter"><code>const <span class="type">char</spa <div class="refsect3"> <a name="nm-tc-action-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTCConfig.html#NMTCAction"><span class="type">NMTCAction</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -956,7 +956,7 @@ nm_tc_action_dup (<em class="parameter"><code><a class="link" href="NMSettingTCC <a name="nm-tc-action-dup.returns"></a><h4>Returns</h4> <p>a copy of <em class="parameter"><code>action</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1007,7 +1007,7 @@ nm_tc_action_get_attribute_names (<em class="parameter"><code><a class="link" hr <div class="refsect3"> <a name="nm-tc-action-get-attribute-names.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of attribute names,. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1049,7 +1049,7 @@ on <em class="parameter"><code>action</code></em> , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>action</code></em> has no such attribute. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1084,7 +1084,7 @@ nm_tc_action_set_attribute (<em class="parameter"><code><a class="link" href="NM <tr> <td class="parameter_name"><p>value</p></td> <td class="parameter_description"><p>the value. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -1129,7 +1129,7 @@ nm_tc_tfilter_new (<em class="parameter"><code>const <span class="type">char</sp <div class="refsect3"> <a name="nm-tc-tfilter-new.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTCConfig.html#NMTCTfilter"><span class="type">NMTCTfilter</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1243,7 +1243,7 @@ nm_tc_tfilter_dup (<em class="parameter"><code><a class="link" href="NMSettingTC <a name="nm-tc-tfilter-dup.returns"></a><h4>Returns</h4> <p>a copy of <em class="parameter"><code>tfilter</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1418,7 +1418,7 @@ nm_setting_tc_config_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-tc-config-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingTCConfig.html" title="NMSettingTCConfig"><span class="type">NMSettingTCConfig</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1480,7 +1480,7 @@ nm_setting_tc_config_get_qdisc (<em class="parameter"><code><a class="link" href <a name="nm-setting-tc-config-get-qdisc.returns"></a><h4>Returns</h4> <p>the qdisc at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1672,7 +1672,7 @@ nm_setting_tc_config_get_tfilter (<em class="parameter"><code><a class="link" hr <a name="nm-setting-tc-config-get-tfilter.returns"></a><h4>Returns</h4> <p>the tfilter at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1829,6 +1829,6 @@ nm_setting_tc_config_clear_tfilters (<em class="parameter"><code><a class="link" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingTeam.html b/docs/libnm/html/NMSettingTeam.html index ab4694c2..431b3923 100644 --- a/docs/libnm/html/NMSettingTeam.html +++ b/docs/libnm/html/NMSettingTeam.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingTeamPort.html" title="NMSettingTeamPort"> <link rel="next" href="NMSettingTun.html" title="NMSettingTun"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -618,7 +618,7 @@ consistency with the link_watcher constructors of other type</p></td> <div class="refsect3"> <a name="nm-team-link-watcher-new-ethtool.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTeam.html#NMTeamLinkWatcher"><span class="type">NMTeamLinkWatcher</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -673,7 +673,7 @@ target address in the NS packet</p></td> <div class="refsect3"> <a name="nm-team-link-watcher-new-nsna-ping.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTeam.html#NMTeamLinkWatcher"><span class="type">NMTeamLinkWatcher</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -741,7 +741,7 @@ address in the arp request</p></td> <div class="refsect3"> <a name="nm-team-link-watcher-new-arp-ping.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTeam.html#NMTeamLinkWatcher"><span class="type">NMTeamLinkWatcher</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -815,7 +815,7 @@ address in the arp request</p></td> <div class="refsect3"> <a name="nm-team-link-watcher-new-arp-ping2.returns"></a><h4>Returns</h4> <p>the new <a class="link" href="NMSettingTeam.html#NMTeamLinkWatcher"><span class="type">NMTeamLinkWatcher</span></a> object, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -929,7 +929,7 @@ nm_team_link_watcher_dup (<em class="parameter"><code>const <a class="link" href <a name="nm-team-link-watcher-dup.returns"></a><h4>Returns</h4> <p>a copy of <em class="parameter"><code>watcher</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -1177,7 +1177,7 @@ nm_setting_team_new (<em class="parameter"><code><span class="type">void</span>< <div class="refsect3"> <a name="nm-setting-team-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingTeam.html" title="NMSettingTeam"><span class="type">NMSettingTeam</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1775,7 +1775,7 @@ nm_setting_team_get_link_watcher (<em class="parameter"><code><a class="link" hr <a name="nm-setting-team-get-link-watcher.returns"></a><h4>Returns</h4> <p>the link watcher at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -2204,6 +2204,6 @@ option 'validate_inactive' is enabled (set to true).</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingTeamPort.html b/docs/libnm/html/NMSettingTeamPort.html index 64b20b67..b2dc9bfa 100644 --- a/docs/libnm/html/NMSettingTeamPort.html +++ b/docs/libnm/html/NMSettingTeamPort.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingTCConfig.html" title="NMSettingTCConfig"> <link rel="next" href="NMSettingTeam.html" title="NMSettingTeam"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -211,7 +211,7 @@ nm_setting_team_port_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-team-port-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingTeamPort.html" title="NMSettingTeamPort"><span class="type">NMSettingTeamPort</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -428,7 +428,7 @@ nm_setting_team_port_get_link_watcher (<em class="parameter"><code><a class="lin <a name="nm-setting-team-port-get-link-watcher.returns"></a><h4>Returns</h4> <p>the link watcher at index <em class="parameter"><code>idx</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -625,6 +625,6 @@ nm_setting_team_port_clear_link_watchers </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingTun.html b/docs/libnm/html/NMSettingTun.html index 061a08ef..0d1a7357 100644 --- a/docs/libnm/html/NMSettingTun.html +++ b/docs/libnm/html/NMSettingTun.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingTeam.html" title="NMSettingTeam"> <link rel="next" href="NMSettingUser.html" title="NMSettingUser"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -161,7 +161,7 @@ nm_setting_tun_new (<em class="parameter"><code><span class="type">void</span></ <div class="refsect3"> <a name="nm-setting-tun-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingTun.html" title="NMSettingTun"><span class="type">NMSettingTun</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -406,6 +406,6 @@ nm_setting_tun_get_multi_queue (<em class="parameter"><code><a class="link" href </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingUser.html b/docs/libnm/html/NMSettingUser.html index 432fbceb..d268e29c 100644 --- a/docs/libnm/html/NMSettingUser.html +++ b/docs/libnm/html/NMSettingUser.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingTun.html" title="NMSettingTun"> <link rel="next" href="NMSettingVeth.html" title="NMSettingVeth"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -156,7 +156,7 @@ nm_setting_user_get_keys (<em class="parameter"><code><a class="link" href="NMSe <a name="nm-setting-user-get-keys.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array containing each key from the table. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_len][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -192,7 +192,7 @@ nm_setting_user_get_data (<em class="parameter"><code><a class="link" href="NMSe <p>the value associated with <em class="parameter"><code>key</code></em> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such value exists. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.8</p> </div> @@ -342,6 +342,6 @@ is a valid user data value.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingVeth.html b/docs/libnm/html/NMSettingVeth.html index 405f5e9e..dee004a3 100644 --- a/docs/libnm/html/NMSettingVeth.html +++ b/docs/libnm/html/NMSettingVeth.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingUser.html" title="NMSettingUser"> <link rel="next" href="NMSettingVlan.html" title="NMSettingVlan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -91,7 +91,7 @@ nm_setting_veth_new (<em class="parameter"><code><span class="type">void</span>< <div class="refsect3"> <a name="nm-setting-veth-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingVeth.html" title="NMSettingVeth"><span class="type">NMSettingVeth</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -138,6 +138,6 @@ nm_setting_veth_get_peer (<em class="parameter"><code><a class="link" href="NMSe </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingVlan.html b/docs/libnm/html/NMSettingVlan.html index 8d7504f3..7b992456 100644 --- a/docs/libnm/html/NMSettingVlan.html +++ b/docs/libnm/html/NMSettingVlan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingVeth.html" title="NMSettingVeth"> <link rel="next" href="NMSettingVpn.html" title="NMSettingVpn"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -208,7 +208,7 @@ nm_setting_vlan_new (<em class="parameter"><code><span class="type">void</span>< <div class="refsect3"> <a name="nm-setting-vlan-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingVlan.html" title="NMSettingVlan"><span class="type">NMSettingVlan</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -780,6 +780,6 @@ itself with its switch</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingVpn.html b/docs/libnm/html/NMSettingVpn.html index 7572d5e5..b7d49ee4 100644 --- a/docs/libnm/html/NMSettingVpn.html +++ b/docs/libnm/html/NMSettingVpn.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingVlan.html" title="NMSettingVlan"> <link rel="next" href="NMSettingVrf.html" title="NMSettingVrf"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -275,7 +275,7 @@ nm_setting_vpn_new (<em class="parameter"><code><span class="type">void</span></ <div class="refsect3"> <a name="nm-setting-vpn-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingVpn.html" title="NMSettingVpn"><span class="type">NMSettingVpn</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -574,7 +574,7 @@ nm_setting_vpn_get_data_keys (<em class="parameter"><code><a class="link" href=" <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array containing each data key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there are no data items. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_length][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_length][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -796,7 +796,7 @@ nm_setting_vpn_get_secret_keys (<em class="parameter"><code><a class="link" href <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array containing each secret key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there are no secrets. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_length][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=out_length][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.12</p> </div> @@ -873,6 +873,6 @@ nm_setting_vpn_get_timeout (<em class="parameter"><code><a class="link" href="NM </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingVrf.html b/docs/libnm/html/NMSettingVrf.html index 835923cc..2a129b78 100644 --- a/docs/libnm/html/NMSettingVrf.html +++ b/docs/libnm/html/NMSettingVrf.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingVpn.html" title="NMSettingVpn"> <link rel="next" href="NMSettingVxlan.html" title="NMSettingVxlan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -92,7 +92,7 @@ nm_setting_vrf_new (<em class="parameter"><code><span class="type">void</span></ <div class="refsect3"> <a name="nm-setting-vrf-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingVrf.html" title="NMSettingVrf"><span class="type">NMSettingVrf</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.24</p> </div> @@ -139,6 +139,6 @@ nm_setting_vrf_get_table (<em class="parameter"><code><a class="link" href="NMSe </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingVxlan.html b/docs/libnm/html/NMSettingVxlan.html index d2fe9165..0b3fe3fe 100644 --- a/docs/libnm/html/NMSettingVxlan.html +++ b/docs/libnm/html/NMSettingVxlan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingVrf.html" title="NMSettingVrf"> <link rel="next" href="NMSettingWifiP2P.html" title="NMSettingWifiP2P"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -269,7 +269,7 @@ nm_setting_vxlan_new (<em class="parameter"><code><span class="type">void</span> <div class="refsect3"> <a name="nm-setting-vxlan-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingVxlan.html" title="NMSettingVxlan"><span class="type">NMSettingVxlan</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -796,6 +796,6 @@ nm_setting_vxlan_get_l3_miss (<em class="parameter"><code><a class="link" href=" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWifiP2P.html b/docs/libnm/html/NMSettingWifiP2P.html index 2a00b2c3..8cd438e5 100644 --- a/docs/libnm/html/NMSettingWifiP2P.html +++ b/docs/libnm/html/NMSettingWifiP2P.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingVxlan.html" title="NMSettingVxlan"> <link rel="next" href="NMSettingWimax.html" title="NMSettingWimax"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -115,7 +115,7 @@ nm_setting_wifi_p2p_new (<em class="parameter"><code><span class="type">void</sp <div class="refsect3"> <a name="nm-setting-wifi-p2p-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingWifiP2P.html" title="NMSettingWifiP2P"><span class="type">NMSettingWifiP2P</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -194,7 +194,7 @@ nm_setting_wifi_p2p_get_wfd_ies (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-setting-wifi-p2p-get-wfd-ies.returns"></a><h4>Returns</h4> <p>the <span class="type">“wfd-ies”</span> property of the setting. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -228,6 +228,6 @@ nm_setting_wifi_p2p_get_wfd_ies (<em class="parameter"><code><a class="link" hre </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWimax.html b/docs/libnm/html/NMSettingWimax.html index 7bff50bc..5346abdf 100644 --- a/docs/libnm/html/NMSettingWimax.html +++ b/docs/libnm/html/NMSettingWimax.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingWifiP2P.html" title="NMSettingWifiP2P"> <link rel="next" href="NMSettingWired.html" title="NMSettingWired"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -196,6 +196,6 @@ to.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWireGuard.html b/docs/libnm/html/NMSettingWireGuard.html index 167bfeb8..34f5415b 100644 --- a/docs/libnm/html/NMSettingWireGuard.html +++ b/docs/libnm/html/NMSettingWireGuard.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingWired.html" title="NMSettingWired"> <link rel="next" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -453,7 +453,7 @@ nm_wireguard_peer_new (<em class="parameter"><code><span class="type">void</span <div class="refsect3"> <a name="nm-wireguard-peer-new.returns"></a><h4>Returns</h4> <p>a new, default, unsealed <a class="link" href="NMSettingWireGuard.html#NMWireGuardPeer"><span class="type">NMWireGuardPeer</span></a> instance. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -491,7 +491,7 @@ as well. Otherwise, they will be removed.</p></td> <p>a clone of <em class="parameter"><code>self</code></em> . This instance is always unsealed. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -626,7 +626,7 @@ nm_wireguard_peer_get_public_key (<em class="parameter"><code>const <a class="li <div class="refsect3"> <a name="nm-wireguard-peer-get-public-key.returns"></a><h4>Returns</h4> <p>the public key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unset. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -658,7 +658,7 @@ will be normalized (which may or may not modify the set value).</p> <td class="parameter_name"><p>public_key</p></td> <td class="parameter_description"><p>the new public key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to clear the public key. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>accept_invalid</p></td> @@ -701,7 +701,7 @@ nm_wireguard_peer_get_preshared_key (<em class="parameter"><code>const <a class= <div class="refsect3"> <a name="nm-wireguard-peer-get-preshared-key.returns"></a><h4>Returns</h4> <p>the preshared key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unset. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -738,7 +738,7 @@ be accepted.</p> <td class="parameter_name"><p>preshared_key</p></td> <td class="parameter_description"><p>the new preshared key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to clear the preshared key. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>accept_invalid</p></td> @@ -903,7 +903,7 @@ nm_wireguard_peer_get_endpoint (<em class="parameter"><code>const <a class="link <div class="refsect3"> <a name="nm-wireguard-peer-get-endpoint.returns"></a><h4>Returns</h4> <p>the endpoint or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none was set. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -1027,7 +1027,7 @@ breaking API for introspection users. </p></td> . If <em class="parameter"><code>idx</code></em> is out of range, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -1253,7 +1253,7 @@ nm_setting_wireguard_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-setting-wireguard-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingWireGuard.html" title="NMSettingWireGuard"><span class="type">NMSettingWireGuard</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -1280,7 +1280,7 @@ nm_setting_wireguard_get_private_key (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-setting-wireguard-get-private-key.returns"></a><h4>Returns</h4> <p>the set private-key or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -1422,7 +1422,7 @@ nm_setting_wireguard_get_peer (<em class="parameter"><code><a class="link" href= <p>the <a class="link" href="NMSettingWireGuard.html#NMWireGuardPeer"><span class="type">NMWireGuardPeer</span></a> entry at index <em class="parameter"><code>idx</code></em> . If the index is out of range, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -1468,7 +1468,7 @@ this is set to the <a class="link" href="NMSettingWireGuard.html#nm-setting-wire <a name="nm-setting-wireguard-get-peer-by-public-key.returns"></a><h4>Returns</h4> <p>the <a class="link" href="NMSettingWireGuard.html#NMWireGuardPeer"><span class="type">NMWireGuardPeer</span></a> instance with a matching public key. If no such peer exists, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -1831,6 +1831,6 @@ nm_setting_wireguard_get_ip6_auto_default_route </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWired.html b/docs/libnm/html/NMSettingWired.html index aa1ef24b..247660e5 100644 --- a/docs/libnm/html/NMSettingWired.html +++ b/docs/libnm/html/NMSettingWired.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingWimax.html" title="NMSettingWimax"> <link rel="next" href="NMSettingWireGuard.html" title="NMSettingWireGuard"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -347,7 +347,7 @@ nm_setting_wired_new (<em class="parameter"><code><span class="type">void</span> <div class="refsect3"> <a name="nm-setting-wired-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingWired.html" title="NMSettingWired"><span class="type">NMSettingWired</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -823,7 +823,7 @@ conjunction with that device.</p> <a name="nm-setting-wired-get-s390-subchannels.returns"></a><h4>Returns</h4> <p>array of strings, each specifying one subchannel the s390 device uses to communicate to the host. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span></p> </div> </div> <hr> @@ -918,14 +918,14 @@ such as during option iteration.</p> <td class="parameter_name"><p>out_key</p></td> <td class="parameter_description"><p>on return, the key name of the s390 specific option; this value is owned by the setting and should not be modified. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_value</p></td> <td class="parameter_description"><p>on return, the value of the key of the s390 specific option; this value is owned by the setting and should not be modified. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -1083,7 +1083,7 @@ and you may pass <a href="https://developer.gnome.org/glib/unstable/glib-Standar <div class="refsect3"> <a name="nm-setting-wired-get-valid-s390-options.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings of valid s390 options. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1344,6 +1344,6 @@ incompatible with other flags</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWireless.html b/docs/libnm/html/NMSettingWireless.html index 60e5ddfd..5c0b26aa 100644 --- a/docs/libnm/html/NMSettingWireless.html +++ b/docs/libnm/html/NMSettingWireless.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"> <link rel="next" href="NMSettingWpan.html" title="NMSettingWpan"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -392,7 +392,7 @@ nm_setting_wireless_new (<em class="parameter"><code><span class="type">void</sp <div class="refsect3"> <a name="nm-setting-wireless-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingWireless.html" title="NMSettingWireless"><span class="type">NMSettingWireless</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -418,7 +418,7 @@ nm_setting_wireless_get_ssid (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-setting-wireless-get-ssid.returns"></a><h4>Returns</h4> <p>the <span class="type">“ssid”</span> property of the setting. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1505,6 +1505,6 @@ for this connection.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWirelessSecurity.html b/docs/libnm/html/NMSettingWirelessSecurity.html index c622764f..951217cb 100644 --- a/docs/libnm/html/NMSettingWirelessSecurity.html +++ b/docs/libnm/html/NMSettingWirelessSecurity.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingWireGuard.html" title="NMSettingWireGuard"> <link rel="next" href="NMSettingWireless.html" title="NMSettingWireless"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -453,7 +453,7 @@ nm_setting_wireless_security_new (<em class="parameter"><code><span class="type" <div class="refsect3"> <a name="nm-setting-wireless-security-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingWirelessSecurity.html" title="NMSettingWirelessSecurity"><span class="type">NMSettingWirelessSecurity</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1772,6 +1772,6 @@ although, with the same numeric values.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSettingWpan.html b/docs/libnm/html/NMSettingWpan.html index 23ebdac3..3c13f380 100644 --- a/docs/libnm/html/NMSettingWpan.html +++ b/docs/libnm/html/NMSettingWpan.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMSettingWireless.html" title="NMSettingWireless"> <link rel="next" href="ch04.html" title="Device and Runtime Configuration API Reference"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -147,7 +147,7 @@ nm_setting_wpan_new (<em class="parameter"><code><span class="type">void</span>< <div class="refsect3"> <a name="nm-setting-wpan-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMSettingWpan.html" title="NMSettingWpan"><span class="type">NMSettingWpan</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -334,6 +334,6 @@ nm_setting_wpan_get_channel (<em class="parameter"><code><a class="link" href="N </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMSimpleConnection.html b/docs/libnm/html/NMSimpleConnection.html index 9f780d8b..d2eb741a 100644 --- a/docs/libnm/html/NMSimpleConnection.html +++ b/docs/libnm/html/NMSimpleConnection.html @@ -8,7 +8,7 @@ <link rel="up" href="ch03.html" title="Connection and Setting API Reference"> <link rel="prev" href="NMConnection.html" title="NMConnection"> <link rel="next" href="NMRemoteConnection.html" title="NMRemoteConnection"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -81,7 +81,7 @@ nm_simple_connection_new (<em class="parameter"><code><span class="type">void</s <div class="refsect3"> <a name="nm-simple-connection-new.returns"></a><h4>Returns</h4> <p>the new empty <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -120,7 +120,7 @@ description of the expected hash table.</p> <p>the new <a class="link" href="NMSimpleConnection.html" title="NMSimpleConnection"><span class="type">NMSimpleConnection</span></a> object, populated with settings created from the values in the hash table, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the connection failed to normalize. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -148,12 +148,12 @@ nm_simple_connection_new_clone (<em class="parameter"><code><a class="link" href <a name="nm-simple-connection-new-clone.returns"></a><h4>Returns</h4> <p>a new <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a> containing the same settings and properties as the source <a class="link" href="NMConnection.html" title="NMConnection"><span class="type">NMConnection</span></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMVpnConnection.html b/docs/libnm/html/NMVpnConnection.html index 7f7a18bd..812ce210 100644 --- a/docs/libnm/html/NMVpnConnection.html +++ b/docs/libnm/html/NMVpnConnection.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMActiveConnection.html" title="NMActiveConnection"> <link rel="next" href="NMAccessPoint.html" title="NMAccessPoint"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -150,6 +150,6 @@ string used by the connection, and must not be modified.</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMVpnEditor.html b/docs/libnm/html/NMVpnEditor.html index e90577b4..d49edda0 100644 --- a/docs/libnm/html/NMVpnEditor.html +++ b/docs/libnm/html/NMVpnEditor.html @@ -8,7 +8,7 @@ <link rel="up" href="ch06.html" title="VPN Plugin API Reference"> <link rel="prev" href="NMVpnPluginInfo.html" title="NMVpnPluginInfo"> <link rel="next" href="NMVpnEditorPlugin.html" title="NMVpnEditorPlugin"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -98,7 +98,7 @@ nm_vpn_editor_get_widget (<em class="parameter"><code><a class="link" href="NMVp <div class="refsect3"> <a name="nm-vpn-editor-get-widget.returns"></a><h4>Returns</h4> <p>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -138,7 +138,7 @@ nm_vpn_editor_update_connection (<em class="parameter"><code><a class="link" hre <tbody> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="NMVpnEditorInterface.get-widget"></a>get_widget</code></em> ()</p></td> -<td class="struct_member_description"><p>return the <span class="type">GtkWidget</span> for the VPN editor's UI</p></td> +<td class="struct_member_description"><p>return the <a href="https://developer.gnome.org/gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a> for the VPN editor's UI</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> @@ -173,6 +173,6 @@ to write values to the connection.</p></td> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMVpnEditorPlugin.html b/docs/libnm/html/NMVpnEditorPlugin.html index a3269b82..cd6e6342 100644 --- a/docs/libnm/html/NMVpnEditorPlugin.html +++ b/docs/libnm/html/NMVpnEditorPlugin.html @@ -8,7 +8,7 @@ <link rel="up" href="ch06.html" title="VPN Plugin API Reference"> <link rel="prev" href="NMVpnEditor.html" title="NMVpnEditor"> <link rel="next" href="NMVpnPluginOld.html" title="NMVpnPluginOld"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -325,7 +325,7 @@ nm_vpn_editor_plugin_get_editor (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-vpn-editor-plugin-get-editor.returns"></a><h4>Returns</h4> <p>a new <a class="link" href="NMVpnEditor.html" title="NMVpnEditor"><span class="type">NMVpnEditor</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -421,7 +421,7 @@ nm_vpn_editor_plugin_import (<em class="parameter"><code><a class="link" href="N , or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error or if the file at <em class="parameter"><code>path</code></em> was not recognized by this plugin. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -515,7 +515,7 @@ loading the shared library. </p></td> <div class="refsect3"> <a name="nm-vpn-editor-plugin-load-from-file.returns"></a><h4>Returns</h4> <p>a new plugin instance or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -567,7 +567,7 @@ the given service.</p></td> <div class="refsect3"> <a name="nm-vpn-editor-plugin-load.returns"></a><h4>Returns</h4> <p>a new plugin instance or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -594,7 +594,7 @@ nm_vpn_editor_plugin_get_plugin_info (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-vpn-editor-plugin-get-plugin-info.returns"></a><h4>Returns</h4> <p>if set, return the <a class="link" href="NMVpnPluginInfo.html" title="NMVpnPluginInfo"><span class="type">NMVpnPluginInfo</span></a> instance. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -710,9 +710,9 @@ reference as the plugin-info might also reference the editor-plugin.</p> NMConnection *(*import_from_file)(NMVpnEditorPlugin *plugin, const char *path, GError **error); gboolean (*export_to_file)(NMVpnEditorPlugin *plugin, - const char * path, - NMConnection * connection, - GError ** error); + const char *path, + NMConnection *connection, + GError **error); char *(*get_suggested_filename)(NMVpnEditorPlugin *plugin, NMConnection *connection); @@ -875,6 +875,6 @@ user_function (<a class="link" href="NMVpnEditor.html" title="NMVpnEditor"><span </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMVpnPluginInfo.html b/docs/libnm/html/NMVpnPluginInfo.html index 65214dac..45880d12 100644 --- a/docs/libnm/html/NMVpnPluginInfo.html +++ b/docs/libnm/html/NMVpnPluginInfo.html @@ -8,7 +8,7 @@ <link rel="up" href="ch06.html" title="VPN Plugin API Reference"> <link rel="prev" href="NMVpnServicePlugin.html" title="NMVpnServicePlugin"> <link rel="next" href="NMVpnEditor.html" title="NMVpnEditor"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -398,7 +398,7 @@ must be present. </p></td> <a name="nm-vpn-plugin-info-new-search-file.returns"></a><h4>Returns</h4> <p>a newly created instance of plugin info or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matching value was found. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -425,7 +425,7 @@ nm_vpn_plugin_info_get_name (<em class="parameter"><code><a class="link" href="N <div class="refsect3"> <a name="nm-vpn-plugin-info-get-name.returns"></a><h4>Returns</h4> <p>the name. Cannot be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -452,7 +452,7 @@ nm_vpn_plugin_info_get_filename (<em class="parameter"><code><a class="link" hre <div class="refsect3"> <a name="nm-vpn-plugin-info-get-filename.returns"></a><h4>Returns</h4> <p>the filename. Can be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -479,7 +479,7 @@ nm_vpn_plugin_info_get_service (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-vpn-plugin-info-get-service.returns"></a><h4>Returns</h4> <p>the service. Cannot be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -506,7 +506,7 @@ nm_vpn_plugin_info_get_plugin (<em class="parameter"><code><a class="link" href= <div class="refsect3"> <a name="nm-vpn-plugin-info-get-plugin.returns"></a><h4>Returns</h4> <p>the plugin. Can be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -533,7 +533,7 @@ nm_vpn_plugin_info_get_program (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-vpn-plugin-info-get-program.returns"></a><h4>Returns</h4> <p>the program. Can be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -638,7 +638,7 @@ nm_vpn_plugin_info_get_aliases (<em class="parameter"><code><a class="link" href <div class="refsect3"> <a name="nm-vpn-plugin-info-get-aliases.returns"></a><h4>Returns</h4> <p>the aliases from the name-file. </p> -<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -680,7 +680,7 @@ nm_vpn_plugin_info_lookup_property (<em class="parameter"><code><a class="link" <a name="nm-vpn-plugin-info-lookup-property.returns"></a><h4>Returns</h4> <p><a class="link" href="NMVpnPluginInfo.html" title="NMVpnPluginInfo"><span class="type">NMVpnPluginInfo</span></a> is internally a <a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a>. Returns the matching property. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -719,7 +719,7 @@ nm_vpn_plugin_info_list_load (<em class="parameter"><code><span class="type">voi <a name="nm-vpn-plugin-info-list-load.returns"></a><h4>Returns</h4> <p>list of plugins loaded from the default directories rejecting duplicates. </p> -<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMVpnPluginInfo][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMVpnPluginInfo][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -836,7 +836,7 @@ nm_vpn_plugin_info_list_find_by_name (<em class="parameter"><code><a href="https <a name="nm-vpn-plugin-info-list-find-by-name.returns"></a><h4>Returns</h4> <p>the first plugin with a matching <em class="parameter"><code>name</code></em> (or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -873,7 +873,7 @@ nm_vpn_plugin_info_list_find_by_filename <a name="nm-vpn-plugin-info-list-find-by-filename.returns"></a><h4>Returns</h4> <p>the first plugin with a matching <em class="parameter"><code>filename</code></em> (or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -911,7 +911,7 @@ or one of the provided aliases.</p></td> <a name="nm-vpn-plugin-info-list-find-by-service.returns"></a><h4>Returns</h4> <p>the first plugin with a matching <em class="parameter"><code>service</code></em> (or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -957,7 +957,7 @@ but it could be retrieved via <a class="link" href="NMVpnPluginInfo.html#nm-vpn- <div class="refsect3"> <a name="nm-vpn-plugin-info-list-find-service-type.returns"></a><h4>Returns</h4> <p>the resolved service-type or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -1005,7 +1005,7 @@ with <a class="link" href="NMVpnPluginInfo.html#nm-vpn-plugin-info-list-find-ser <a name="nm-vpn-plugin-info-list-get-service-types.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated strv list of strings. The list itself and the values must be freed with <a href="https://developer.gnome.org/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.4</p> </div> @@ -1032,7 +1032,7 @@ nm_vpn_plugin_info_get_editor_plugin (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-vpn-plugin-info-get-editor-plugin.returns"></a><h4>Returns</h4> <p>the cached <a class="link" href="NMVpnEditorPlugin.html" title="NMVpnEditorPlugin"><span class="type">NMVpnEditorPlugin</span></a> instance. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -1103,7 +1103,7 @@ and can be later retrieved again via <a class="link" href="NMVpnPluginInfo.html#nm-vpn-plugin-info-get-editor-plugin" title="nm_vpn_plugin_info_get_editor_plugin ()"><code class="function">nm_vpn_plugin_info_get_editor_plugin()</code></a>. You can load the plugin only once, unless you reset the state via <a class="link" href="NMVpnPluginInfo.html#nm-vpn-plugin-info-set-editor-plugin" title="nm_vpn_plugin_info_set_editor_plugin ()"><code class="function">nm_vpn_plugin_info_set_editor_plugin()</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -1148,6 +1148,6 @@ plugin only once, unless you reset the state via </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMVpnPluginOld.html b/docs/libnm/html/NMVpnPluginOld.html index 3b8fed77..07669e28 100644 --- a/docs/libnm/html/NMVpnPluginOld.html +++ b/docs/libnm/html/NMVpnPluginOld.html @@ -8,7 +8,7 @@ <link rel="up" href="ch06.html" title="VPN Plugin API Reference"> <link rel="prev" href="NMVpnEditorPlugin.html" title="NMVpnEditorPlugin"> <link rel="next" href="object-tree.html" title="Object Hierarchy"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -268,7 +268,7 @@ nm_vpn_plugin_old_get_connection (<em class="parameter"><code><a class="link" hr <div class="refsect3"> <a name="nm-vpn-plugin-old-get-connection.returns"></a><h4>Returns</h4> <p>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -433,13 +433,13 @@ an applet when the applet calls the authentication dialog of the VPN plugin.</p> <td class="parameter_name"><p>out_data</p></td> <td class="parameter_description"><p>on successful return, a hash table (mapping char*:char*) containing the key/value pairs of VPN data items. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_secrets</p></td> <td class="parameter_description"><p>on successful return, a hash table (mapping char*:char*) containing the key/value pairsof VPN secrets. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -623,6 +623,6 @@ user_function (<a class="link" href="NMVpnPluginOld.html" title="NMVpnPluginOld" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMVpnServicePlugin.html b/docs/libnm/html/NMVpnServicePlugin.html index a016cd52..965727a3 100644 --- a/docs/libnm/html/NMVpnServicePlugin.html +++ b/docs/libnm/html/NMVpnServicePlugin.html @@ -8,7 +8,7 @@ <link rel="up" href="ch06.html" title="VPN Plugin API Reference"> <link rel="prev" href="ch06.html" title="VPN Plugin API Reference"> <link rel="next" href="NMVpnPluginInfo.html" title="NMVpnPluginInfo"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -265,7 +265,7 @@ nm_vpn_service_plugin_get_connection (<em class="parameter"><code><a class="link <div class="refsect3"> <a name="nm-vpn-service-plugin-get-connection.returns"></a><h4>Returns</h4> <p>. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -411,13 +411,13 @@ an applet when the applet calls the authentication dialog of the VPN plugin.</p> <td class="parameter_name"><p>out_data</p></td> <td class="parameter_description"><p>on successful return, a hash table (mapping char*:char*) containing the key/value pairs of VPN data items. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_secrets</p></td> <td class="parameter_description"><p>on successful return, a hash table (mapping char*:char*) containing the key/value pairsof VPN secrets. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -609,6 +609,6 @@ user_function (<a class="link" href="NMVpnServicePlugin.html" title="NMVpnServic </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMWifiP2PPeer.html b/docs/libnm/html/NMWifiP2PPeer.html index b4ddd6e8..9bc52e5e 100644 --- a/docs/libnm/html/NMWifiP2PPeer.html +++ b/docs/libnm/html/NMWifiP2PPeer.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMAccessPoint.html" title="NMAccessPoint"> <link rel="next" href="NMWimaxNsp.html" title="NMWimaxNsp"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -373,7 +373,7 @@ nm_wifi_p2p_peer_get_wfd_ies (<em class="parameter"><code><a class="link" href=" <div class="refsect3"> <a name="nm-wifi-p2p-peer-get-wfd-ies.returns"></a><h4>Returns</h4> <p>the <a href="https://developer.gnome.org/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> containing the WFD IEs, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -503,7 +503,7 @@ filter. </p></td> <span class="type">NMConnections</span> that could be activated with the given <em class="parameter"><code>peer</code></em> . The array should be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#g-ptr-array-unref"><code class="function">g_ptr_array_unref()</code></a> when it is no longer required. </p> -<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMConnection]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMConnection]</span></p> </div> <p class="since">Since: 1.16</p> </div> @@ -613,6 +613,6 @@ against</p></td> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/NMWimaxNsp.html b/docs/libnm/html/NMWimaxNsp.html index c0556985..267c01ed 100644 --- a/docs/libnm/html/NMWimaxNsp.html +++ b/docs/libnm/html/NMWimaxNsp.html @@ -8,7 +8,7 @@ <link rel="up" href="ch04.html" title="Device and Runtime Configuration API Reference"> <link rel="prev" href="NMWifiP2PPeer.html" title="NMWifiP2PPeer"> <link rel="next" href="NMIPConfig.html" title="NMIPConfig"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -241,7 +241,7 @@ filter. </p></td> <span class="type">NMConnections</span> that could be activated with the given <em class="parameter"><code>nsp</code></em> . The array should be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#g-ptr-array-unref"><code class="function">g_ptr_array_unref()</code></a> when it is no longer required. </p> -<p><span class="annotation">[<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> NMConnection]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMConnection]</span></p> </div> </div> <hr> @@ -311,6 +311,6 @@ against</p></td> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/annotation-glossary.html b/docs/libnm/html/annotation-glossary.html index 9591c45b..3b043d13 100644 --- a/docs/libnm/html/annotation-glossary.html +++ b/docs/libnm/html/annotation-glossary.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="api-index-full.html" title="API Index"> <link rel="next" href="license.html" title="Appendix A. License"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -49,7 +49,7 @@ <dd class="glossdef"><p>Generics and defining elements of containers and arrays.</p></dd> <a name="glsI"></a><h3 class="title">I</h3> <dt><span class="glossterm"><a name="annotation-glossterm-inout"></a>inout</span></dt> -<dd class="glossdef"><p>Parameter for input and for returning results. Default is <acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>.</p></dd> +<dd class="glossdef"><p>Parameter for input and for returning results. Default is <acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>.</p></dd> <a name="glsN"></a><h3 class="title">N</h3> <dt><span class="glossterm"><a name="annotation-glossterm-nullable"></a>nullable</span></dt> <dd class="glossdef"><p>NULL may be passed as the value in, out, in-out; or as a return value.</p></dd> @@ -57,7 +57,7 @@ <dt><span class="glossterm"><a name="annotation-glossterm-optional"></a>optional</span></dt> <dd class="glossdef"><p>NULL may be passed instead of a pointer to a location.</p></dd> <dt><span class="glossterm"><a name="annotation-glossterm-out"></a>out</span></dt> -<dd class="glossdef"><p>Parameter for returning results. Default is <acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>.</p></dd> +<dd class="glossdef"><p>Parameter for returning results. Default is <acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>.</p></dd> <a name="glsS"></a><h3 class="title">S</h3> <dt><span class="glossterm"><a name="annotation-glossterm-scope%20async"></a>scope async</span></dt> <dd class="glossdef"><p>The callback is valid until first called.</p></dd> @@ -67,15 +67,15 @@ <dd class="glossdef"><p>Exposed in C code, not necessarily available in other languages.</p></dd> <a name="glsT"></a><h3 class="title">T</h3> <dt><span class="glossterm"><a name="annotation-glossterm-transfer%20container"></a>transfer container</span></dt> -<dd class="glossdef"><p>Free data container after the code is done.</p></dd> +<dd class="glossdef"><p>The caller owns the data container, but not the data inside it.</p></dd> <dt><span class="glossterm"><a name="annotation-glossterm-transfer%20full"></a>transfer full</span></dt> -<dd class="glossdef"><p>Free data after the code is done.</p></dd> +<dd class="glossdef"><p>The caller owns the data, and is responsible for free it.</p></dd> <dt><span class="glossterm"><a name="annotation-glossterm-transfer%20none"></a>transfer none</span></dt> -<dd class="glossdef"><p>Don't free data after the code is done.</p></dd> +<dd class="glossdef"><p>The data is owned by the callee, which is responsible of freeing it.</p></dd> <dt><span class="glossterm"><a name="annotation-glossterm-type"></a>type</span></dt> <dd class="glossdef"><p>Override the parsed C type with given type.</p></dd> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/api-index-full.html b/docs/libnm/html/api-index-full.html index 08102244..4f8670ed 100644 --- a/docs/libnm/html/api-index-full.html +++ b/docs/libnm/html/api-index-full.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="object-tree.html" title="Object Hierarchy"> <link rel="next" href="annotation-glossary.html" title="Annotation Glossary"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -2777,6 +2777,10 @@ NMSettingOvsDpdk:devargs, object property in NMSettingOvs </dt> <dd></dd> <dt> +NMSettingOvsDpdk:n-rxq, object property in NMSettingOvs +</dt> +<dd></dd> +<dt> NMSettingOvsExternalIDs, struct in NMSettingOvs </dt> <dd></dd> @@ -4273,6 +4277,10 @@ nm_auto_unref_nml_dbusobj, macro in <a class="link" href="NMIPConfig.html" title </dt> <dd></dd> <dt> +<a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-36:CAPS" title="NM_AVAILABLE_IN_1_36">NM_AVAILABLE_IN_1_36</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-4:CAPS" title="NM_AVAILABLE_IN_1_4">NM_AVAILABLE_IN_1_4</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> </dt> <dd></dd> @@ -5693,6 +5701,14 @@ NM_DBUS_VPN_WRONG_STATE, macro in nm-vpn-dbus-interface </dt> <dd></dd> <dt> +<a class="link" href="libnm-nm-version.html#NM-DEPRECATED-IN-1-36:CAPS" title="NM_DEPRECATED_IN_1_36">NM_DEPRECATED_IN_1_36</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> +</dt> +<dd></dd> +<dt> +<a class="link" href="libnm-nm-version.html#NM-DEPRECATED-IN-1-36-FOR:CAPS" title="NM_DEPRECATED_IN_1_36_FOR()">NM_DEPRECATED_IN_1_36_FOR</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libnm-nm-version.html#NM-DEPRECATED-IN-1-4:CAPS" title="NM_DEPRECATED_IN_1_4">NM_DEPRECATED_IN_1_4</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> </dt> <dd></dd> @@ -11285,10 +11301,18 @@ NM_MINOR_VERSION, macro in nm-version-macros </dt> <dd></dd> <dt> +<a class="link" href="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-get-n-rxq" title="nm_setting_ovs_dpdk_get_n_rxq ()">nm_setting_ovs_dpdk_get_n_rxq</a>, function in <a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk">NMSettingOvsDpdk</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-new" title="nm_setting_ovs_dpdk_new ()">nm_setting_ovs_dpdk_new</a>, function in <a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk">NMSettingOvsDpdk</a> </dt> <dd></dd> <dt> +<a class="link" href="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-N-RXQ:CAPS" title="NM_SETTING_OVS_DPDK_N_RXQ">NM_SETTING_OVS_DPDK_N_RXQ</a>, macro in <a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk">NMSettingOvsDpdk</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-SETTING-NAME:CAPS" title="NM_SETTING_OVS_DPDK_SETTING_NAME">NM_SETTING_OVS_DPDK_SETTING_NAME</a>, macro in <a class="link" href="NMSettingOvsDpdk.html" title="NMSettingOvsDpdk">NMSettingOvsDpdk</a> </dt> <dd></dd> @@ -14253,6 +14277,10 @@ NM_VERSION_1_34, macro in nm-version-macros </dt> <dd></dd> <dt> +NM_VERSION_1_36, macro in nm-version-macros +</dt> +<dd></dd> +<dt> NM_VERSION_1_4, macro in nm-version-macros </dt> <dd></dd> @@ -15011,6 +15039,6 @@ NM_VPN_PLUGIN_IP6_CONFIG_ROUTES, macro in nm-vpn-dbus-interface <dd></dd> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/ch02.html b/docs/libnm/html/ch02.html index bd869fe5..47a7dab8 100644 --- a/docs/libnm/html/ch02.html +++ b/docs/libnm/html/ch02.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="usage.html" title="Using libnm"> <link rel="next" href="NMClient.html" title="NMClient"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -41,6 +41,6 @@ </dl></div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/ch03.html b/docs/libnm/html/ch03.html index ae4cdf94..a6d653a4 100644 --- a/docs/libnm/html/ch03.html +++ b/docs/libnm/html/ch03.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="libnm-nm-dbus-interface.html" title="nm-dbus-interface"> <link rel="next" href="NMConnection.html" title="NMConnection"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -201,6 +201,6 @@ use WEP, LEAP, WPA or WPA2/RSN security</span> </dl></div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/ch04.html b/docs/libnm/html/ch04.html index 66672854..bc92ddc7 100644 --- a/docs/libnm/html/ch04.html +++ b/docs/libnm/html/ch04.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="NMSettingWpan.html" title="NMSettingWpan"> <link rel="next" href="NMDevice.html" title="NMDevice"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -140,6 +140,6 @@ </dl></div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/ch05.html b/docs/libnm/html/ch05.html index 68c1a7fa..1fabc6fc 100644 --- a/docs/libnm/html/ch05.html +++ b/docs/libnm/html/ch05.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="NMCheckpoint.html" title="NMCheckpoint"> <link rel="next" href="libnm-nm-keyfile.html" title="nm-keyfile"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -35,6 +35,6 @@ </dl></div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/ch06.html b/docs/libnm/html/ch06.html index 5ba90006..b8bcee8a 100644 --- a/docs/libnm/html/ch06.html +++ b/docs/libnm/html/ch06.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="libnm-nm-version.html" title="nm-version"> <link rel="next" href="NMVpnServicePlugin.html" title="NMVpnServicePlugin"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -41,6 +41,6 @@ </dl></div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/index.html b/docs/libnm/html/index.html index 8ba3ec8e..df267941 100644 --- a/docs/libnm/html/index.html +++ b/docs/libnm/html/index.html @@ -6,7 +6,7 @@ <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> <link rel="home" href="index.html" title="libnm Reference Manual"> <link rel="next" href="ref-overview.html" title="Overview"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libnm Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libnm 1.34.0 + for libnm 1.35.90 The latest version of this documentation can be found on-line at <a class="ulink" href="https://networkmanager.dev/docs/libnm/latest/" target="_top">https://networkmanager.dev/docs/libnm/latest/</a>. @@ -402,6 +402,6 @@ use WEP, LEAP, WPA or WPA2/RSN security</span> </dl></div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/libnm-nm-dbus-interface.html b/docs/libnm/html/libnm-nm-dbus-interface.html index 682b5fa9..864a7f9b 100644 --- a/docs/libnm/html/libnm-nm-dbus-interface.html +++ b/docs/libnm/html/libnm-nm-dbus-interface.html @@ -8,7 +8,7 @@ <link rel="up" href="ch02.html" title="Client Object API Reference"> <link rel="prev" href="libnm-nm-errors.html" title="nm-errors"> <link rel="next" href="ch03.html" title="Connection and Setting API Reference"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -1856,6 +1856,13 @@ GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability</p> </td> <td class="enum_member_annotations"> </td> </tr> +<tr> +<td class="enum_member_name"><p><a name="NM-DEVICE-MODEM-CAPABILITY-5GNR:CAPS"></a>NM_DEVICE_MODEM_CAPABILITY_5GNR</p></td> +<td class="enum_member_description"> +<p>modem has 5GNR data capability (Since: 1.36)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> </tbody> </table></div> </div> @@ -4023,6 +4030,6 @@ denied by system policy</p> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/libnm-nm-errors.html b/docs/libnm/html/libnm-nm-errors.html index c4575070..6b16ef3a 100644 --- a/docs/libnm/html/libnm-nm-errors.html +++ b/docs/libnm/html/libnm-nm-errors.html @@ -8,7 +8,7 @@ <link rel="up" href="ch02.html" title="Client Object API Reference"> <link rel="prev" href="NMObject.html" title="NMObject"> <link rel="next" href="libnm-nm-dbus-interface.html" title="nm-dbus-interface"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -998,6 +998,6 @@ performed as the plugin does not support interactive operations, such as </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/libnm-nm-keyfile.html b/docs/libnm/html/libnm-nm-keyfile.html index 21a6d7d3..ddd85e1c 100644 --- a/docs/libnm/html/libnm-nm-keyfile.html +++ b/docs/libnm/html/libnm-nm-keyfile.html @@ -8,7 +8,7 @@ <link rel="up" href="ch05.html" title="Utility API Reference"> <link rel="prev" href="ch05.html" title="Utility API Reference"> <link rel="next" href="libnm-nm-utils.html" title="nm-utils"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -259,7 +259,7 @@ be an absolute path.</p></td> <div class="refsect3"> <a name="nm-keyfile-read.returns"></a><h4>Returns</h4> <p>on success, returns the created connection. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -384,7 +384,7 @@ to override the default behavior. </p></td> <div class="refsect3"> <a name="nm-keyfile-write.returns"></a><h4>Returns</h4> <p>a new <a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.30</p> </div> @@ -420,7 +420,7 @@ after calling this function on it.</p> <tr> <td class="parameter_name"><p>src</p></td> <td class="parameter_description"><p>error to move into the return location. </p></td> -<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -456,24 +456,24 @@ on all events, but the context information may be unset.</p> <td class="parameter_name"><p>out_kf_group_name</p></td> <td class="parameter_description"><p>if the event is in the context of a keyfile group, the group name. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_kf_key_name</p></td> <td class="parameter_description"><p>if the event is in the context of a keyfile value, the key name. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_cur_setting</p></td> <td class="parameter_description"><p>if the event happens while handling a particular <a class="link" href="NMSetting.html" title="NMSetting"><span class="type">NMSetting</span></a> instance. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_cur_property_name</p></td> <td class="parameter_description"><p>the property name if applicable. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -505,7 +505,7 @@ event.</p></td> <tr> <td class="parameter_name"><p>out_message</p></td> <td class="parameter_description"><p>the warning message. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>out_severity</p></td> @@ -634,6 +634,6 @@ depends on the <a class="link" href="libnm-nm-keyfile.html#NMKeyfileHandlerType" </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/libnm-nm-utils.html b/docs/libnm/html/libnm-nm-utils.html index e67dbdca..daa53c06 100644 --- a/docs/libnm/html/libnm-nm-utils.html +++ b/docs/libnm/html/libnm-nm-utils.html @@ -8,7 +8,7 @@ <link rel="up" href="ch05.html" title="Utility API Reference"> <link rel="prev" href="libnm-nm-keyfile.html" title="nm-keyfile"> <link rel="next" href="libnm-nm-version.html" title="nm-version"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -877,7 +877,7 @@ _only_.</p> <p>an allocated string containing a UTF-8 representation of the SSID, which must be freed by the caller using <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. Returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on errors. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -1124,7 +1124,7 @@ type 'au' representing an array of IPv4 addresses.</p> <a name="nm-utils-ip4-dns-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>dns</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1152,7 +1152,7 @@ IPv4 addresses into an array of IP address strings.</p> <div class="refsect3"> <a name="nm-utils-ip4-dns-from-variant.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of IP address strings. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p> </div> </div> <hr> @@ -1193,7 +1193,7 @@ gateway). The "gateway" field of the first address will get the value of <a name="nm-utils-ip4-addresses-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1225,7 +1225,7 @@ of the other addresses are ignored.</p> <tr> <td class="parameter_name"><p>out_gateway</p></td> <td class="parameter_description"><p>on return, will contain the IP gateway. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -1234,7 +1234,7 @@ of the other addresses are ignored.</p> <a name="nm-utils-ip4-addresses-from-variant.returns"></a><h4>Returns</h4> <p>a newly allocated <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p> -<p><span class="annotation">[<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> NMIPAddress]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p> </div> </div> <hr> @@ -1265,7 +1265,7 @@ metric).</p> <a name="nm-utils-ip4-routes-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1295,7 +1295,7 @@ and metric) into a <a href="https://developer.gnome.org/glib/unstable/glib-Point <a name="nm-utils-ip4-routes-from-variant.returns"></a><h4>Returns</h4> <p>a newly allocated <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p> -<p><span class="annotation">[<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> NMIPRoute]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p> </div> </div> <hr> @@ -1404,7 +1404,7 @@ type 'aay' representing an array of IPv6 addresses.</p> <a name="nm-utils-ip6-dns-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>dns</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1434,7 +1434,7 @@ ignored.</p> <div class="refsect3"> <a name="nm-utils-ip6-dns-from-variant.returns"></a><h4>Returns</h4> <p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of IP address strings. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p> </div> </div> <hr> @@ -1476,7 +1476,7 @@ all 0s.</p> <a name="nm-utils-ip6-addresses-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1508,7 +1508,7 @@ fields of the other addresses are ignored.</p> <tr> <td class="parameter_name"><p>out_gateway</p></td> <td class="parameter_description"><p>on return, will contain the IP gateway. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -1517,7 +1517,7 @@ fields of the other addresses are ignored.</p> <a name="nm-utils-ip6-addresses-from-variant.returns"></a><h4>Returns</h4> <p>a newly allocated <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p> -<p><span class="annotation">[<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> NMIPAddress]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p> </div> </div> <hr> @@ -1548,7 +1548,7 @@ metric).</p> <a name="nm-utils-ip6-routes-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1578,7 +1578,7 @@ hop, and metric) into a <a href="https://developer.gnome.org/glib/unstable/glib- <a name="nm-utils-ip6-routes-from-variant.returns"></a><h4>Returns</h4> <p>a newly allocated <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p> -<p><span class="annotation">[<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> NMIPRoute]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p> </div> </div> <hr> @@ -1610,7 +1610,7 @@ include additional attributes.</p> <a name="nm-utils-ip-addresses-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1649,7 +1649,7 @@ objects.</p> <a name="nm-utils-ip-addresses-from-variant.returns"></a><h4>Returns</h4> <p>a newly allocated <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p> -<p><span class="annotation">[<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> NMIPAddress]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p> </div> </div> <hr> @@ -1680,7 +1680,7 @@ prefix, next hop, metric, and additional attributes).</p> <a name="nm-utils-ip-routes-to-variant.returns"></a><h4>Returns</h4> <p>a new floating <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em> . </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -1719,7 +1719,7 @@ prefix, next hop, metric, and additional attributes) into a <a href="https://dev <a name="nm-utils-ip-routes-from-variant.returns"></a><h4>Returns</h4> <p>a newly allocated <a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p> -<p><span class="annotation">[<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> NMIPRoute]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p> </div> </div> <hr> @@ -1920,7 +1920,7 @@ function. </p></td> <p>the full path to the helper, if found, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found. The returned string is not owned by the caller, but later invocations of the function might overwrite it. </p> -<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> </div> </div> <hr> @@ -2180,7 +2180,7 @@ nm_utils_hwaddr_ntoa (<em class="parameter"><code><a href="https://developer.gno <a name="nm-utils-hwaddr-ntoa.returns"></a><h4>Returns</h4> <p>the textual form of <em class="parameter"><code>addr</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2219,7 +2219,7 @@ nm_utils_hwaddr_atoba (<em class="parameter"><code>const <span class="type">char <p>a new <a href="https://developer.gnome.org/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em> couldn't be parsed. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2350,7 +2350,7 @@ is expected to convert to <p>the canonicalized address if <em class="parameter"><code>asc</code></em> appears to be a valid hardware address of the indicated length, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2480,7 +2480,7 @@ array</p></td> <a name="nm-utils-bin2hexstr.returns"></a><h4>Returns</h4> <p>the textual form of <em class="parameter"><code>bytes</code></em> . </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2513,7 +2513,7 @@ may not start or end with ':'.</p> <div class="refsect3"> <a name="nm-utils-hexstr2bin.returns"></a><h4>Returns</h4> <p>the converted bytes, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> @@ -2951,7 +2951,7 @@ containing the unrecognized token in <em class="parameter"><code>err_token</code <tr> <td class="parameter_name"><p>err_token</p></td> <td class="parameter_description"><p>location to store the first unrecognized token. </p></td> -<td class="parameter_annotations"><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>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> +<td class="parameter_annotations"><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>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> @@ -3001,7 +3001,7 @@ nm_utils_enum_get_values (<em class="parameter"><code><a href="https://developer <a name="nm-utils-enum-get-values.returns"></a><h4>Returns</h4> <p>a NULL-terminated dynamically-allocated array of static strings or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p> -<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> </div> <p class="since">Since: 1.2</p> </div> @@ -3076,7 +3076,7 @@ nm_utils_parse_variant_attributes (<em class="parameter"><code>const <span class attribute names to <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> values. Warning: the variant are still floating references, owned by the hash table. If you take a reference, ensure to sink the one of the hash table first. </p> -<p><span class="annotation">[<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 GVariant]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><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 GVariant]</span></p> </div> <p class="since">Since: 1.8</p> </div> @@ -3377,7 +3377,7 @@ nm_utils_sriov_vf_from_str (<em class="parameter"><code>const <span class="type" <div class="refsect3"> <a name="nm-utils-sriov-vf-from-str.returns"></a><h4>Returns</h4> <p>the virtual function object. </p> -<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: 1.14</p> </div> @@ -3574,6 +3574,6 @@ for both <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="n </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/libnm-nm-version.html b/docs/libnm/html/libnm-nm-version.html index 2c476533..dfb667fe 100644 --- a/docs/libnm/html/libnm-nm-version.html +++ b/docs/libnm/html/libnm-nm-version.html @@ -8,7 +8,7 @@ <link rel="up" href="ch05.html" title="Utility API Reference"> <link rel="prev" href="libnm-nm-utils.html" title="nm-utils"> <link rel="next" href="ch06.html" title="VPN Plugin API Reference"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -155,6 +155,12 @@ <a class="link" href="libnm-nm-version.html#NM-DEPRECATED-IN-1-34-FOR:CAPS" title="NM_DEPRECATED_IN_1_34_FOR()">NM_DEPRECATED_IN_1_34_FOR</a><span class="c_punctuation">()</span> </td> </tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"> +<a class="link" href="libnm-nm-version.html#NM-DEPRECATED-IN-1-36-FOR:CAPS" title="NM_DEPRECATED_IN_1_36_FOR()">NM_DEPRECATED_IN_1_36_FOR</a><span class="c_punctuation">()</span> +</td> +</tr> </tbody> </table></div> </div> @@ -326,6 +332,14 @@ <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-34:CAPS" title="NM_AVAILABLE_IN_1_34">NM_AVAILABLE_IN_1_34</a></td> </tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="libnm-nm-version.html#NM-DEPRECATED-IN-1-36:CAPS" title="NM_DEPRECATED_IN_1_36">NM_DEPRECATED_IN_1_36</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-36:CAPS" title="NM_AVAILABLE_IN_1_36">NM_AVAILABLE_IN_1_36</a></td> +</tr> </tbody> </table></div> </div> @@ -447,6 +461,12 @@ NM_DEPRECATED_IN_1_24_FOR ();</pre> <pre class="programlisting">#define NM_DEPRECATED_IN_1_34_FOR(f) G_DEPRECATED_FOR(f) </pre> </div> +<hr> +<div class="refsect2"> +<a name="NM-DEPRECATED-IN-1-36-FOR:CAPS"></a><h3>NM_DEPRECATED_IN_1_36_FOR()</h3> +<pre class="programlisting">#define NM_DEPRECATED_IN_1_36_FOR(f) G_DEPRECATED_FOR(f) +</pre> +</div> </div> <div class="refsect1"> <a name="libnm-nm-version.other_details"></a><h2>Types and Values</h2> @@ -687,9 +707,21 @@ NM_DEPRECATED_IN_1_24_FOR ();</pre> <pre class="programlisting">#define NM_AVAILABLE_IN_1_34 G_UNAVAILABLE(1, 34) </pre> </div> +<hr> +<div class="refsect2"> +<a name="NM-DEPRECATED-IN-1-36:CAPS"></a><h3>NM_DEPRECATED_IN_1_36</h3> +<pre class="programlisting">#define NM_DEPRECATED_IN_1_36 G_DEPRECATED +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="NM-AVAILABLE-IN-1-36:CAPS"></a><h3>NM_AVAILABLE_IN_1_36</h3> +<pre class="programlisting">#define NM_AVAILABLE_IN_1_36 G_UNAVAILABLE(1, 36) +</pre> +</div> </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/libnm.devhelp2 b/docs/libnm/html/libnm.devhelp2 index 40f15e9b..a6a4a603 100644 --- a/docs/libnm/html/libnm.devhelp2 +++ b/docs/libnm/html/libnm.devhelp2 @@ -1444,8 +1444,10 @@ <keyword type="macro" name="NM_SETTING_OVS_BRIDGE_DATAPATH_TYPE" link="NMSettingOvsBridge.html#NM-SETTING-OVS-BRIDGE-DATAPATH-TYPE:CAPS"/> <keyword type="function" name="nm_setting_ovs_dpdk_new ()" link="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-new" since="1.20"/> <keyword type="function" name="nm_setting_ovs_dpdk_get_devargs ()" link="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-get-devargs" since="1.20"/> + <keyword type="function" name="nm_setting_ovs_dpdk_get_n_rxq ()" link="NMSettingOvsDpdk.html#nm-setting-ovs-dpdk-get-n-rxq" since="1.36"/> <keyword type="macro" name="NM_SETTING_OVS_DPDK_SETTING_NAME" link="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-SETTING-NAME:CAPS"/> <keyword type="macro" name="NM_SETTING_OVS_DPDK_DEVARGS" link="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-DEVARGS:CAPS"/> + <keyword type="macro" name="NM_SETTING_OVS_DPDK_N_RXQ" link="NMSettingOvsDpdk.html#NM-SETTING-OVS-DPDK-N-RXQ:CAPS"/> <keyword type="function" name="nm_setting_ovs_external_ids_new ()" link="NMSettingOvsExternalIDs.html#nm-setting-ovs-external-ids-new" since="1.30"/> <keyword type="function" name="nm_setting_ovs_external_ids_get_data_keys ()" link="NMSettingOvsExternalIDs.html#nm-setting-ovs-external-ids-get-data-keys"/> <keyword type="function" name="nm_setting_ovs_external_ids_get_data ()" link="NMSettingOvsExternalIDs.html#nm-setting-ovs-external-ids-get-data" since="1.30"/> @@ -2672,6 +2674,7 @@ <keyword type="macro" name="NM_DEPRECATED_IN_1_30_FOR()" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-30-FOR:CAPS"/> <keyword type="macro" name="NM_DEPRECATED_IN_1_32_FOR()" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-32-FOR:CAPS"/> <keyword type="macro" name="NM_DEPRECATED_IN_1_34_FOR()" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-34-FOR:CAPS"/> + <keyword type="macro" name="NM_DEPRECATED_IN_1_36_FOR()" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-36-FOR:CAPS"/> <keyword type="macro" name="NM_VERSION_MIN_REQUIRED" link="libnm-nm-version.html#NM-VERSION-MIN-REQUIRED:CAPS"/> <keyword type="macro" name="NM_VERSION_MAX_ALLOWED" link="libnm-nm-version.html#NM-VERSION-MAX-ALLOWED:CAPS"/> <keyword type="macro" name="NM_DEPRECATED_IN_0_9_10" link="libnm-nm-version.html#NM-DEPRECATED-IN-0-9-10:CAPS"/> @@ -2712,6 +2715,8 @@ <keyword type="macro" name="NM_AVAILABLE_IN_1_32" link="libnm-nm-version.html#NM-AVAILABLE-IN-1-32:CAPS"/> <keyword type="macro" name="NM_DEPRECATED_IN_1_34" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-34:CAPS"/> <keyword type="macro" name="NM_AVAILABLE_IN_1_34" link="libnm-nm-version.html#NM-AVAILABLE-IN-1-34:CAPS"/> + <keyword type="macro" name="NM_DEPRECATED_IN_1_36" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-36:CAPS"/> + <keyword type="macro" name="NM_AVAILABLE_IN_1_36" link="libnm-nm-version.html#NM-AVAILABLE-IN-1-36:CAPS"/> <keyword type="function" name="nm_vpn_service_plugin_get_connection ()" link="NMVpnServicePlugin.html#nm-vpn-service-plugin-get-connection" since="1.2"/> <keyword type="function" name="nm_vpn_service_plugin_secrets_required ()" link="NMVpnServicePlugin.html#nm-vpn-service-plugin-secrets-required" since="1.2"/> <keyword type="function" name="nm_vpn_service_plugin_set_login_banner ()" link="NMVpnServicePlugin.html#nm-vpn-service-plugin-set-login-banner"/> @@ -2997,6 +3002,7 @@ <keyword type="constant" name="NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO" link="libnm-nm-dbus-interface.html#NM-DEVICE-MODEM-CAPABILITY-CDMA-EVDO:CAPS"/> <keyword type="constant" name="NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS" link="libnm-nm-dbus-interface.html#NM-DEVICE-MODEM-CAPABILITY-GSM-UMTS:CAPS"/> <keyword type="constant" name="NM_DEVICE_MODEM_CAPABILITY_LTE" link="libnm-nm-dbus-interface.html#NM-DEVICE-MODEM-CAPABILITY-LTE:CAPS"/> + <keyword type="constant" name="NM_DEVICE_MODEM_CAPABILITY_5GNR" link="libnm-nm-dbus-interface.html#NM-DEVICE-MODEM-CAPABILITY-5GNR:CAPS"/> <keyword type="constant" name="NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN" link="libnm-nm-dbus-interface.html#NM-WIMAX-NSP-NETWORK-TYPE-UNKNOWN:CAPS"/> <keyword type="constant" name="NM_WIMAX_NSP_NETWORK_TYPE_HOME" link="libnm-nm-dbus-interface.html#NM-WIMAX-NSP-NETWORK-TYPE-HOME:CAPS"/> <keyword type="constant" name="NM_WIMAX_NSP_NETWORK_TYPE_PARTNER" link="libnm-nm-dbus-interface.html#NM-WIMAX-NSP-NETWORK-TYPE-PARTNER:CAPS"/> diff --git a/docs/libnm/html/license.html b/docs/libnm/html/license.html index 490c9412..207a9d49 100644 --- a/docs/libnm/html/license.html +++ b/docs/libnm/html/license.html @@ -7,7 +7,7 @@ <link rel="home" href="index.html" title="libnm Reference Manual"> <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="annotation-glossary.html" title="Annotation Glossary"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -55,6 +55,6 @@ </p> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/object-tree.html b/docs/libnm/html/object-tree.html index 0c874eae..f37101ca 100644 --- a/docs/libnm/html/object-tree.html +++ b/docs/libnm/html/object-tree.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="NMVpnPluginOld.html" title="NMVpnPluginOld"> <link rel="next" href="api-index-full.html" title="API Index"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -233,6 +233,6 @@ </pre> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/ref-overview.html b/docs/libnm/html/ref-overview.html index b0c7a2ef..25f70fa1 100644 --- a/docs/libnm/html/ref-overview.html +++ b/docs/libnm/html/ref-overview.html @@ -8,7 +8,7 @@ <link rel="up" href="index.html" title="libnm Reference Manual"> <link rel="prev" href="index.html" title="libnm Reference Manual"> <link rel="next" href="usage.html" title="Using libnm"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -62,6 +62,6 @@ </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/html/usage.html b/docs/libnm/html/usage.html index 060222f1..507ca41b 100644 --- a/docs/libnm/html/usage.html +++ b/docs/libnm/html/usage.html @@ -8,7 +8,7 @@ <link rel="up" href="ref-overview.html" title="Overview"> <link rel="prev" href="ref-overview.html" title="Overview"> <link rel="next" href="ch02.html" title="Client Object API Reference"> -<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -96,7 +96,7 @@ </p> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>cc $(pkg-config --libs --cflags libnm) -o hello-nm hello-nm.c</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>./hello-nm</code></strong> - NetworkManager version: 1.34.0 + NetworkManager version: 1.35.90 <code class="prompt">$ </code></pre> <p> @@ -271,6 +271,6 @@ </div> </div> <div class="footer"> -<hr>Generated by GTK-Doc V1.33.0</div> +<hr>Generated by GTK-Doc V1.33.1</div> </body> </html> \ No newline at end of file diff --git a/docs/libnm/libnm-sections.txt b/docs/libnm/libnm-sections.txt index 0225991a..b074456d 100644 --- a/docs/libnm/libnm-sections.txt +++ b/docs/libnm/libnm-sections.txt @@ -3160,8 +3160,10 @@ nm_setting_ovs_bridge_get_type <TITLE>NMSettingOvsDpdk NM_SETTING_OVS_DPDK_SETTING_NAME NM_SETTING_OVS_DPDK_DEVARGS +NM_SETTING_OVS_DPDK_N_RXQ nm_setting_ovs_dpdk_new nm_setting_ovs_dpdk_get_devargs +nm_setting_ovs_dpdk_get_n_rxq NMSettingOvsDpdkClass NM_IS_SETTING_OVS_DPDK @@ -4444,6 +4446,9 @@ NM_AVAILABLE_IN_1_32 NM_DEPRECATED_IN_1_34 NM_DEPRECATED_IN_1_34_FOR NM_AVAILABLE_IN_1_34 +NM_DEPRECATED_IN_1_36 +NM_DEPRECATED_IN_1_36_FOR +NM_AVAILABLE_IN_1_36
@@ -4473,6 +4478,7 @@ NM_VERSION_1_28 NM_VERSION_1_30 NM_VERSION_1_32 NM_VERSION_1_34 +NM_VERSION_1_36 NM_API_VERSION NM_VERSION_CUR_STABLE NM_VERSION_NEXT_STABLE diff --git a/docs/libnm/version.xml b/docs/libnm/version.xml index 2b17ffd5..dc7c4e31 100644 --- a/docs/libnm/version.xml +++ b/docs/libnm/version.xml @@ -1 +1 @@ -1.34.0 +1.35.90 diff --git a/examples/C/glib/add-connection-gdbus.c b/examples/C/glib/add-connection-gdbus.c index 6dc3b8d4..96006689 100644 --- a/examples/C/glib/add-connection-gdbus.c +++ b/examples/C/glib/add-connection-gdbus.c @@ -27,7 +27,7 @@ char * nm_utils_uuid_generate(void) { uuid_t uuid; - char * buf; + char *buf; buf = g_malloc0(37); uuid_generate_random(uuid); @@ -40,10 +40,10 @@ add_connection(GDBusProxy *proxy, const char *con_name) { GVariantBuilder connection_builder; GVariantBuilder setting_builder; - char * uuid; - const char * new_con_path; - GVariant * ret; - GError * error = NULL; + char *uuid; + const char *new_con_path; + GVariant *ret; + GError *error = NULL; /* Initialize connection GVariantBuilder */ g_variant_builder_init(&connection_builder, G_VARIANT_TYPE("a{sa{sv}}")); @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) { GDBusProxy *proxy; - GError * error = NULL; + GError *error = NULL; /* Create a D-Bus proxy; NM_DBUS_* defined in nm-dbus-interface.h */ proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM, diff --git a/examples/C/glib/add-connection-libnm.c b/examples/C/glib/add-connection-libnm.c index 6e4cd6b8..a1b48003 100644 --- a/examples/C/glib/add-connection-libnm.c +++ b/examples/C/glib/add-connection-libnm.c @@ -19,9 +19,9 @@ static void added_cb(GObject *client, GAsyncResult *result, gpointer user_data) { - GMainLoop * loop = user_data; + GMainLoop *loop = user_data; NMRemoteConnection *remote; - GError * error = NULL; + GError *error = NULL; /* NM responded to our request; either handle the resulting error or * print out the object path of the connection we just added. @@ -43,11 +43,11 @@ added_cb(GObject *client, GAsyncResult *result, gpointer user_data) static void add_connection(NMClient *client, GMainLoop *loop, const char *con_name) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingWired * s_wired; - NMSettingIP4Config * s_ip4; - char * uuid; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + char *uuid; /* Create a new connection object */ connection = nm_simple_connection_new(); @@ -88,9 +88,9 @@ add_connection(NMClient *client, GMainLoop *loop, const char *con_name) int main(int argc, char *argv[]) { - NMClient * client; + NMClient *client; GMainLoop *loop; - GError * error = NULL; + GError *error = NULL; loop = g_main_loop_new(NULL, FALSE); diff --git a/examples/C/glib/get-active-connections-gdbus.c b/examples/C/glib/get-active-connections-gdbus.c index c07b0f15..8118d769 100644 --- a/examples/C/glib/get-active-connections-gdbus.c +++ b/examples/C/glib/get-active-connections-gdbus.c @@ -25,9 +25,9 @@ static void print_setting(const char *setting_name, GVariant *setting) { GVariantIter iter; - const char * property_name; - GVariant * value; - char * printed_value; + const char *property_name; + GVariant *value; + char *printed_value; g_print(" %s:\n", setting_name); g_variant_iter_init(&iter, setting); @@ -43,14 +43,14 @@ print_setting(const char *setting_name, GVariant *setting) static void print_connection(const char *path) { - GDBusProxy * proxy; - GError * error = NULL; - GVariant * ret, *connection = NULL, *s_con = NULL; - const char * id, *type; + GDBusProxy *proxy; + GError *error = NULL; + GVariant *ret, *connection = NULL, *s_con = NULL; + const char *id, *type; gboolean found; GVariantIter iter; - const char * setting_name; - GVariant * setting; + const char *setting_name; + GVariant *setting; /* This function asks NetworkManager for the details of the connection */ @@ -125,9 +125,9 @@ static void get_active_connection_details(const char *obj_path) { GDBusProxy *props_proxy; - GVariant * ret = NULL, *path_value = NULL; + GVariant *ret = NULL, *path_value = NULL; const char *path = NULL; - GError * error = NULL; + GError *error = NULL; /* This function gets the backing Connection object that describes the * network configuration that the ActiveConnection object is actually using. @@ -185,9 +185,9 @@ out: static void get_active_connections(GDBusProxy *proxy) { - GError * error = NULL; + GError *error = NULL; GVariant *ret = NULL, *value = NULL; - char ** paths; + char **paths; int i; /* Get the ActiveConnections property from the NM Manager object */ diff --git a/examples/C/glib/get-ap-info-libnm.c b/examples/C/glib/get-ap-info-libnm.c index 247ab8f1..6c0a4343 100644 --- a/examples/C/glib/get-ap-info-libnm.c +++ b/examples/C/glib/get-ap-info-libnm.c @@ -45,6 +45,14 @@ ap_wpa_rsn_flags_to_string(guint32 flags) flags_str[i++] = g_strdup("psk"); if (flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) flags_str[i++] = g_strdup("802.1X"); + if (flags & NM_802_11_AP_SEC_KEY_MGMT_SAE) + flags_str[i++] = g_strdup("sae"); + if (flags & NM_802_11_AP_SEC_KEY_MGMT_OWE) + flags_str[i++] = g_strdup("owe"); + if (flags & NM_802_11_AP_SEC_KEY_MGMT_OWE_TM) + flags_str[i++] = g_strdup("owe_transition_mode"); + if (flags & NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192) + flags_str[i++] = g_strdup("wpa-eap-suite-b-192"); if (i == 0) flags_str[i++] = g_strdup("none"); @@ -65,11 +73,11 @@ show_access_point_info(NMAccessPoint *ap) { guint32 flags, wpa_flags, rsn_flags, freq, bitrate; guint8 strength; - GBytes * ssid; + GBytes *ssid; const char *hwaddr; NM80211Mode mode; - char * freq_str, *ssid_str, *bitrate_str, *strength_str, *wpa_flags_str, *rsn_flags_str; - GString * security_str; + char *freq_str, *ssid_str, *bitrate_str, *strength_str, *wpa_flags_str, *rsn_flags_str; + GString *security_str; /* Get AP properties */ flags = nm_access_point_get_flags(ap); @@ -103,11 +111,21 @@ show_access_point_info(NMAccessPoint *ap) g_string_append(security_str, "WEP "); if (wpa_flags != NM_802_11_AP_SEC_NONE) g_string_append(security_str, "WPA "); - if (rsn_flags != NM_802_11_AP_SEC_NONE) + if ((rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK) + || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) { g_string_append(security_str, "WPA2 "); + } + if (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_SAE) { + g_string_append(security_str, "WPA3 "); + } + if ((rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_OWE) + || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_OWE_TM)) { + g_string_append(security_str, "OWE "); + } if ((wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) - || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) - g_string_append(security_str, "Enterprise "); + || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) { + g_string_append(security_str, "802.1X "); + } if (security_str->len > 0) g_string_truncate(security_str, security_str->len - 1); /* Chop off last space */ @@ -138,13 +156,13 @@ show_access_point_info(NMAccessPoint *ap) static void show_wifi_device_info(NMDevice *device) { - NMAccessPoint * active_ap = NULL; + NMAccessPoint *active_ap = NULL; const GPtrArray *aps; - const char * iface; - const char * driver; + const char *iface; + const char *driver; guint32 speed; - GBytes * active_ssid; - char * active_ssid_str = NULL; + GBytes *active_ssid; + char *active_ssid_str = NULL; int i; /* Get active AP */ @@ -185,10 +203,10 @@ show_wifi_device_info(NMDevice *device) int main(int argc, char *argv[]) { - NMClient * client; + NMClient *client; const GPtrArray *devices; int i; - GError * error = NULL; + GError *error = NULL; /* Get NMClient object */ client = nm_client_new(NULL, &error); diff --git a/examples/C/glib/list-connections-gdbus.c b/examples/C/glib/list-connections-gdbus.c index babf6f14..19c4dbbf 100644 --- a/examples/C/glib/list-connections-gdbus.c +++ b/examples/C/glib/list-connections-gdbus.c @@ -21,9 +21,9 @@ static void list_connections(GDBusProxy *proxy) { int i; - GError * error = NULL; + GError *error = NULL; GVariant *ret; - char ** paths; + char **paths; /* Call ListConnections D-Bus method */ ret = g_dbus_proxy_call_sync(proxy, diff --git a/examples/C/glib/list-connections-libnm.c b/examples/C/glib/list-connections-libnm.c index 0cee2f7b..03c14751 100644 --- a/examples/C/glib/list-connections-libnm.c +++ b/examples/C/glib/list-connections-libnm.c @@ -24,9 +24,9 @@ show_connection(NMConnection *connection) { NMSettingConnection *s_con; guint64 timestamp; - char * timestamp_str; + char *timestamp_str; char timestamp_real_str[64]; - const char * val1, *val2, *val3, *val4, *val5; + const char *val1, *val2, *val3, *val4, *val5; s_con = nm_connection_get_setting_connection(connection); if (s_con) { @@ -55,8 +55,8 @@ show_connection(NMConnection *connection) int main(int argc, char *argv[]) { - NMClient * client; - GError * error = NULL; + NMClient *client; + GError *error = NULL; const GPtrArray *connections; int i; diff --git a/examples/C/glib/monitor-nm-running-gdbus.c b/examples/C/glib/monitor-nm-running-gdbus.c index 11eddce8..f25b2e85 100644 --- a/examples/C/glib/monitor-nm-running-gdbus.c +++ b/examples/C/glib/monitor-nm-running-gdbus.c @@ -18,8 +18,8 @@ static void on_name_appeared(GDBusConnection *connection, - const char * name, - const char * name_owner, + const char *name, + const char *name_owner, gpointer user_data) { g_print("Name '%s' on the system bus is owned by %s => NM is running\n", name, name_owner); @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) { guint watcher_id; - GMainLoop * loop; + GMainLoop *loop; GBusNameWatcherFlags flags; g_print("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n"); diff --git a/examples/C/glib/monitor-nm-state-gdbus.c b/examples/C/glib/monitor-nm-state-gdbus.c index 5e938f2b..927c966c 100644 --- a/examples/C/glib/monitor-nm-state-gdbus.c +++ b/examples/C/glib/monitor-nm-state-gdbus.c @@ -45,9 +45,9 @@ nm_state_to_string(NMState state) static void on_signal(GDBusProxy *proxy, - char * sender_name, - char * signal_name, - GVariant * parameters, + char *sender_name, + char *signal_name, + GVariant *parameters, gpointer user_data) { guint32 new_state; @@ -72,10 +72,10 @@ on_signal(GDBusProxy *proxy, int main(int argc, char *argv[]) { - GMainLoop * loop; - GError * error = NULL; + GMainLoop *loop; + GError *error = NULL; GDBusProxyFlags flags; - GDBusProxy * proxy; + GDBusProxy *proxy; /* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager' interface */ g_print("Monitor NetworkManager's state\n"); diff --git a/examples/C/glib/vpn-import-libnm.c b/examples/C/glib/vpn-import-libnm.c index 55ed5175..61a33a76 100644 --- a/examples/C/glib/vpn-import-libnm.c +++ b/examples/C/glib/vpn-import-libnm.c @@ -17,18 +17,18 @@ static NMConnection * vpn_connection_import(const char *filename) { NMConnection *conn = NULL; - GSList * plugins; - GSList * iter; + GSList *plugins; + GSList *iter; g_print("Try to import file \"%s\"...\n", filename); plugins = nm_vpn_plugin_info_list_load(); for (iter = plugins; iter; iter = iter->next) { - GError * error = NULL; - NMVpnPluginInfo * plugin = iter->data; + GError *error = NULL; + NMVpnPluginInfo *plugin = iter->data; NMVpnEditorPlugin *editor; - const char * plugin_name = nm_vpn_plugin_info_get_name(plugin); + const char *plugin_name = nm_vpn_plugin_info_get_name(plugin); g_print("plugin[%s]: trying import...\n", plugin_name); @@ -72,8 +72,8 @@ vpn_connection_import(const char *filename) /*****************************************************************************/ typedef struct { - GMainLoop * loop; - GError * error; + GMainLoop *loop; + GError *error; NMRemoteConnection *rconn; } RequestData; @@ -89,8 +89,8 @@ add_cb(GObject *source, GAsyncResult *result, gpointer user_data) static NMRemoteConnection * connection_add(NMConnection *conn) { - GError * error = NULL; - NMClient * client; + GError *error = NULL; + NMClient *client; RequestData rdata; g_print("Adding connection \"%s\" (%s)\n", @@ -137,8 +137,8 @@ int main(int argc, char **argv) { NMRemoteConnection *rconn; - NMConnection * conn; - const char * filename; + NMConnection *conn; + const char *filename; gboolean success; if (argc < 2) { diff --git a/gtk-doc.make b/gtk-doc.make index 7d9a27f3..c673175d 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -57,6 +57,7 @@ DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ + $(DOC_MODULE).actions \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ diff --git a/man/NetworkManager-dispatcher.8 b/man/NetworkManager-dispatcher.8 index 651ee938..078fb294 100644 --- a/man/NetworkManager-dispatcher.8 +++ b/man/NetworkManager-dispatcher.8 @@ -2,9 +2,9 @@ .\" Title: NetworkManager-dispatcher .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Network management daemons -.\" Source: NetworkManager-dispatcher 1.34.0 +.\" Source: NetworkManager-dispatcher 1.35.90 .\" Language: English .\" .TH "NETWORKMANAGER\-DISPATCHER" "8" "" "NetworkManager\-dispatcher 1\&" "Network management daemons" diff --git a/man/NetworkManager.8 b/man/NetworkManager.8 index 404240d8..5c095485 100644 --- a/man/NetworkManager.8 +++ b/man/NetworkManager.8 @@ -2,12 +2,12 @@ .\" Title: NetworkManager .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Network management daemons -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NETWORKMANAGER" "8" "" "NetworkManager 1\&.34\&.0" "Network management daemons" +.TH "NETWORKMANAGER" "8" "" "NetworkManager 1\&.35\&.90" "Network management daemons" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5 index 061f3ce3..a1be6369 100644 --- a/man/NetworkManager.conf.5 +++ b/man/NetworkManager.conf.5 @@ -2,12 +2,12 @@ .\" Title: NetworkManager.conf .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Configuration -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NETWORKMANAGER\&.CONF" "5" "" "NetworkManager 1\&.34\&.0" "Configuration" +.TH "NETWORKMANAGER\&.CONF" "5" "" "NetworkManager 1\&.35\&.90" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -209,8 +209,13 @@ for the syntax how to specify a device\&. .PP \fIconfigure\-and\-quit\fR .RS 4 -When set to \*(Aqtrue\*(Aq, NetworkManager quits after performing initial network configuration but spawns small helpers to preserve DHCP leases and IPv6 addresses\&. This is useful in environments where network setup is more or less static or it is desirable to save process time but still handle some dynamic configurations\&. When this option is -true, network configuration for Wi\-Fi, WWAN, Bluetooth, ADSL, and PPPoE interfaces cannot be preserved due to their use of external services, and these devices will be deconfigured when NetworkManager quits even though other interface\*(Aqs configuration may be preserved\&. Also, to preserve DHCP addresses the \*(Aqdhcp\*(Aq option must be set to \*(Aqinternal\*(Aq\&. The default value of the \*(Aqconfigure\-and\-quit\*(Aq option is \*(Aqfalse\*(Aq, meaning that NetworkManager will continue running after initial network configuration and continue responding to system and hardware events, D\-Bus requests, and user commands\&. +This option is no longer useful to configure in NetworkManager\&.conf file\&. It can however also be configured on the command line with the same values, where it has some use\&. +.sp +When set to \*(Aqinitrd\*(Aq, NetworkManager does not connect to D\-Bus and quits after configuring the network\&. This is an implementation detail how the NetworkManager module of dracut can run NetworkManager\&. An alternative to this is having NetworkManager as a systemd service with D\-Bus in initrd\&. +.sp +The value \*(Aqtrue\*(Aq is unsupported since version 1\&.36\&. Previously this was a mode where NetworkManager would quit after configuring the network and run helper processes for DHCP and SLAAC\&. +.sp +Otherwise, NetworkManager runs a system service with D\-Bus and does not quit during normal operation\&. .RE .PP \fIhostname\-mode\fR @@ -1112,7 +1117,7 @@ Specify the Wi\-Fi backend used for the device\&. Currently, supported are wpa_supplicant and iwd -(experimental)\&. +(experimental)\&. If unspecified, the default is "wpa_supplicant"\&. .RE .PP \fIwifi\&.scan\-generate\-mac\-address\-mask\fR diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 617b94bd..c1afaad0 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -254,22 +254,25 @@ no-auto-default=* configure-and-quit - When set to 'true', NetworkManager quits after - performing initial network configuration but spawns small helpers - to preserve DHCP leases and IPv6 addresses. This is useful in - environments where network setup is more or less static or it is - desirable to save process time but still handle some dynamic - configurations. When this option is true, - network configuration for Wi-Fi, WWAN, Bluetooth, ADSL, and PPPoE - interfaces cannot be preserved due to their use of external - services, and these devices will be deconfigured when NetworkManager - quits even though other interface's configuration may be preserved. - Also, to preserve DHCP addresses the 'dhcp' option - must be set to 'internal'. The default value of - the 'configure-and-quit' option is - 'false', meaning that NetworkManager will continue - running after initial network configuration and continue responding - to system and hardware events, D-Bus requests, and user commands. + This option is no longer useful to configure in NetworkManager.conf file. + It can however also be configured on the command line with the same + values, where it has some use. + + + When set to 'initrd', NetworkManager does not connect + to D-Bus and quits after configuring the network. This is an implementation + detail how the NetworkManager module of dracut can run NetworkManager. + An alternative to this is having NetworkManager as a systemd service + with D-Bus in initrd. + + + The value 'true' is unsupported since version 1.36. + Previously this was a mode where NetworkManager would quit after configuring + the network and run helper processes for DHCP and SLAAC. + + + Otherwise, NetworkManager runs a system service with D-Bus and does not + quit during normal operation. @@ -1234,6 +1237,7 @@ managed=1 Specify the Wi-Fi backend used for the device. Currently, supported are wpa_supplicant and iwd (experimental). + If unspecified, the default is "&NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT;". diff --git a/man/common.ent.in b/man/common.ent.in index 9632b4ef..ae792f25 100644 --- a/man/common.ent.in +++ b/man/common.ent.in @@ -8,3 +8,4 @@ + diff --git a/man/nm-cloud-setup.8 b/man/nm-cloud-setup.8 index 8661e162..60987278 100644 --- a/man/nm-cloud-setup.8 +++ b/man/nm-cloud-setup.8 @@ -2,12 +2,12 @@ .\" Title: nm-cloud-setup .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Automatic Network Configuration in Cloud with NetworkManager -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-CLOUD\-SETUP" "8" "" "NetworkManager 1\&.34\&.0" "Automatic Network Configuratio" +.TH "NM\-CLOUD\-SETUP" "8" "" "NetworkManager 1\&.35\&.90" "Automatic Network Configuratio" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-initrd-generator.8 b/man/nm-initrd-generator.8 index 6b790991..07e2304f 100644 --- a/man/nm-initrd-generator.8 +++ b/man/nm-initrd-generator.8 @@ -2,12 +2,12 @@ .\" Title: nm-initrd-generator .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: System Administration -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-INITRD\-GENERATOR" "8" "" "NetworkManager 1\&.34\&.0" "System Administration" +.TH "NM\-INITRD\-GENERATOR" "8" "" "NetworkManager 1\&.35\&.90" "System Administration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,6 +43,11 @@ scans the command line for options relevant to network configuration and creates Output connection directory\&. .RE .PP +\fB\-p\fR | \fB\-\-persistent\-connections\-dir\fR \fIpath\fR +.RS 4 +Persistent connection directory\&. If it exists, rd\&.neednet will not cause a default connection to be generated in absence of other options\&. +.RE +.PP \fB\-i\fR | \fB\-\-initrd\-data\-dir\fR \fIpath\fR .RS 4 Output directory for initrd data (e\&.g\&. hostname)\&. @@ -112,6 +117,9 @@ The options that appear on the kernel command line\&. The following options are \fBrd\&.znet\fR .RE .RS 4 +\fBrd\&.znet_ifnames\fR +.RE +.RS 4 \fBBOOTIF\fR .RE Please consult the diff --git a/man/nm-initrd-generator.xml b/man/nm-initrd-generator.xml index 503700fa..75994928 100644 --- a/man/nm-initrd-generator.xml +++ b/man/nm-initrd-generator.xml @@ -74,6 +74,21 @@ + + + + + + + path + + + + Persistent connection directory. If it exists, rd.neednet will not + cause a default connection to be generated in absence of other options. + + + @@ -151,6 +166,7 @@ + diff --git a/man/nm-online.1 b/man/nm-online.1 index a07305d3..dcdbbc4a 100644 --- a/man/nm-online.1 +++ b/man/nm-online.1 @@ -2,12 +2,12 @@ .\" Title: nm-online .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: General Commands Manual -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-ONLINE" "1" "" "NetworkManager 1\&.34\&.0" "General Commands Manual" +.TH "NM\-ONLINE" "1" "" "NetworkManager 1\&.35\&.90" "General Commands Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-openvswitch.7 b/man/nm-openvswitch.7 index a781aa50..8ab01f24 100644 --- a/man/nm-openvswitch.7 +++ b/man/nm-openvswitch.7 @@ -2,12 +2,12 @@ .\" Title: nm-openvswitch .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Open vSwitch support overview -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-OPENVSWITCH" "7" "" "NetworkManager 1\&.34\&.0" "Open vSwitch support overview" +.TH "NM\-OPENVSWITCH" "7" "" "NetworkManager 1\&.35\&.90" "Open vSwitch support overview" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-settings-dbus.5 b/man/nm-settings-dbus.5 index 24d904e2..ccc632a4 100644 --- a/man/nm-settings-dbus.5 +++ b/man/nm-settings-dbus.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-dbus .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Configuration -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-SETTINGS\-DBUS" "5" "" "NetworkManager 1\&.34\&.0" "Configuration" +.TH "NM\-SETTINGS\-DBUS" "5" "" "NetworkManager 1\&.35\&.90" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -2991,6 +2991,7 @@ T}:T{ Value Description T} .T& +l l l l l l l l. T{ devargs @@ -3001,6 +3002,15 @@ T}:T{ T}:T{ Open vSwitch DPDK device arguments\&. T} +T{ +n\-rxq +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Open vSwitch DPDK number of rx queues\&. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue\&. +T} .TE .sp 1 .SS "ovs\-interface setting" diff --git a/man/nm-settings-dbus.xml b/man/nm-settings-dbus.xml index a7102a1b..5b9b02ee 100644 --- a/man/nm-settings-dbus.xml +++ b/man/nm-settings-dbus.xml @@ -1,6 +1,6 @@ -nm-settings-dbusNetworkManager developersnm-settings-dbus5NetworkManagerConfiguration1.34.0nm-settings-dbusDescription of settings and properties of NetworkManager connection profiles on the D-Bus APIDescription +nm-settings-dbusNetworkManager developersnm-settings-dbus5NetworkManagerConfiguration1.35.90nm-settings-dbusDescription of settings and properties of NetworkManager connection profiles on the D-Bus APIDescription NetworkManager is based on a concept of connection profiles, sometimes referred to as connections only. These connection profiles contain a network configuration. When NetworkManager activates a connection profile on a network device the configuration will @@ -32,7 +32,7 @@ profile type. nmcli connection editor has also a built-in describe command that can display description of particular settings and properties of this page. - connection settingGeneral Connection Profile Settings.Key NameValue TypeDefault ValueValue Descriptionauth-retriesint32-1The number of retries for the authentication. Zero means to try indefinitely; -1 means to use a global default. If the global default is not set, the authentication retries for 3 times before failing the connection. Currently, this only applies to 802-1x authentication.autoconnectbooleanTRUEWhether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection. Autoconnect happens when the circumstances are suitable. That means for example that the device is currently managed and not active. Autoconnect thus never replaces or competes with an already active profile. Note that autoconnect is not implemented for VPN profiles. See "secondaries" as an alternative to automatically connect VPN profiles.autoconnect-priorityint320The autoconnect priority in range -999 to 999. If the connection is set to autoconnect, connections with higher priority will be preferred. The higher number means higher priority. Defaults to 0. Note that this property only matters if there are more than one candidate profile to select for autoconnect. In case of equal priority, the profile used most recently is chosen.autoconnect-retriesint32-1The number of times a connection should be tried when autoactivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden). Setting this to 1 means to try activation only once before blocking autoconnect. Note that after a timeout, NetworkManager will try to autoconnect again.autoconnect-slavesNMSettingConnectionAutoconnectSlaves (int32)Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The properties "autoconnect", "autoconnect-priority" and "autoconnect-retries" are unrelated to this setting. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0.dns-over-tlsint32-1Whether DNSOverTls (dns-over-tls) is enabled for the connection. DNSOverTls is a technology which uses TLS to encrypt dns traffic. The permitted values are: "yes" (2) use DNSOverTls and disabled fallback, "opportunistic" (1) use DNSOverTls but allow fallback to unencrypted resolution, "no" (0) don't ever use DNSOverTls. If unspecified "default" depends on the plugin used. Systemd-resolved uses global setting. This feature requires a plugin which supports DNSOverTls. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.gateway-ping-timeoutuint320If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping.idstringA human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G".interface-namestringThe name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.lldpint32-1Whether LLDP is enabled for the connection.llmnrint32-1Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the connection. LLMNR is a protocol based on the Domain Name System (DNS) packet format that allows both IPv4 and IPv6 hosts to perform name resolution for hosts on the same local link. The permitted values are: "yes" (2) register hostname and resolving for the connection, "no" (0) disable LLMNR for the interface, "resolve" (1) do not register hostname but allow resolving of LLMNR host names If unspecified, "default" ultimately depends on the DNS plugin (which for systemd-resolved currently means "yes"). This feature requires a plugin which supports LLMNR. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.masterstringInterface name of the master device or UUID of the master connection.mdnsint32-1Whether mDNS is enabled for the connection. The permitted values are: "yes" (2) register hostname and resolving for the connection, "no" (0) disable mDNS for the interface, "resolve" (1) do not register hostname but allow resolving of mDNS host names and "default" (-1) to allow lookup of a global default in NetworkManager.conf. If unspecified, "default" ultimately depends on the DNS plugin (which for systemd-resolved currently means "no"). This feature requires a plugin which supports mDNS. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.meteredNMMetered (int32)Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately.mud-urlstringIf configured, set to a Manufacturer Usage Description (MUD) URL that points to manufacturer-recommended network policies for IoT devices. It is transmitted as a DHCPv4 or DHCPv6 option. The value must be a valid URL starting with "https://". The special value "none" is allowed to indicate that no MUD URL is used. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the ultimate default is "none".multi-connectint320Specifies whether the profile can be active multiple times at a particular moment. The value is of type NMConnectionMultiConnect.permissionsarray of stringAn array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form "[type]:[id]:[reserved]"; for example, "user:dcbw:blah". At this time only the "user" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the ":" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.read-onlybooleanFALSEFALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified.secondariesarray of stringList of connection UUIDs that should be activated when the base connection itself is activated. Currently, only VPN connections are supported.slave-typestringSetting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave.stable-idstringThis represents the identity of the connection used for various purposes. It allows to configure multiple profiles to share the identity. Also, the stable-id can contain placeholders that are substituted dynamically and deterministically depending on the context. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. It is also used as DHCP client identifier with ipv4.dhcp-client-id=stable and to derive the DHCP DUID with ipv6.dhcp-duid=stable-[llt,ll,uuid]. Note that depending on the context where it is used, other parameters are also seeded into the generation algorithm. For example, a per-host key is commonly also included, so that different systems end up generating different IDs. Or with ipv6.addr-gen-mode=stable-privacy, also the device's name is included, so that different interfaces yield different addresses. The per-host key is the identity of your machine and stored in /var/lib/NetworkManager/secret-key. The '$' character is treated special to perform dynamic substitutions at runtime. Currently, supported are "${CONNECTION}", "${DEVICE}", "${MAC}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-device, per-boot, or every time. Note that "${DEVICE}" corresponds to the interface name of the device and "${MAC}" is the permanent MAC address of the device. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}-${BOOT}-${DEVICE}" to create a unique id for this connection that changes with every reboot and differs depending on the interface where the profile activates. If the value is unset, a global connection default is consulted. If the value is still unset, the default is similar to "${CONNECTION}" and uses a unique, fixed ID for the connection.timestampuint640The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved).typestringBase type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, "802-3-ethernet" or "802-11-wireless" or "bluetooth", etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, "vpn" or "bridge", etc).uuidstringA universally unique identifier for the connection, for example generated with libuuid. It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, it should not be changed when the "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-").wait-device-timeoutint32-1Timeout in milliseconds to wait for device at startup. During boot, devices may take a while to be detected by the driver. This property will cause to delay NetworkManager-wait-online.service and nm-online to give the device a chance to appear. This works by waiting for the given timeout until a compatible device for the profile is available and managed. The value 0 means no wait time. The default value is -1, which currently has the same meaning as no wait time.zonestringThe 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. When updating this property on a currently activated connection, the change takes effect immediately.6lowpan setting6LoWPAN Settings.Key NameValue TypeDefault ValueValue DescriptionparentstringIf given, specifies the parent interface name or parent connection UUID from which this 6LowPAN interface should be created.802-1x settingIEEE 802.1x Authentication Settings.Key NameValue TypeDefault ValueValue Descriptionaltsubject-matchesarray of stringList of strings to be matched against the altSubjectName of the certificate presented by the authentication server. If the list is empty, no verification of the server certificate's altSubjectName is performed.anonymous-identitystringAnonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS.auth-timeoutint320A timeout for the authentication. Zero means the global default; if the global default is not set, the authentication timeout is 25 seconds.ca-certbyte arrayContains the CA certificate if used by the EAP method specified in the "eap" property. Certificate data is specified using a "scheme"; three are currently supported: blob, path and pkcs#11 URL. When using the blob scheme this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended. Note that enabling NMSetting8021x:system-ca-certs will override this setting to use the built-in path, if the built-in path is not a directory.ca-cert-passwordstringThe password used to access the CA certificate stored in "ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.ca-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "ca-cert-password" property. (see for flag values)ca-pathstringUTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the "ca-cert" property. If NMSetting8021x:system-ca-certs is enabled and the built-in CA path is an existing directory, then this setting is ignored.client-certbyte arrayContains the client certificate if used by the EAP method specified in the "eap" property. Certificate data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte.client-cert-passwordstringThe password used to access the client certificate stored in "client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.client-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "client-cert-password" property. (see for flag values)domain-matchstringConstraint for server domain name. If set, this list of FQDNs is used as a match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using the same comparison. Multiple valid FQDNs can be passed as a ";" delimited list.domain-suffix-matchstringConstraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison. Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited list.eaparray of stringThe allowed EAP method to be used when authenticating to the network with 802.1x. Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd", and "fast". Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations.identitystringIdentity string for EAP authentication methods. Often the user's user or login name.optionalbooleanFALSEWhether the 802.1X authentication is optional. If TRUE, the activation will continue even after a timeout or an authentication failure. Setting the property to TRUE is currently allowed only for Ethernet connections. If set to FALSE, the activation can continue only after a successful authentication.pac-filestringUTF-8 encoded file path containing PAC for EAP-FAST.passwordstringUTF-8 encoded password used for EAP authentication methods. If both the "password" property and the "password-raw" property are specified, "password" is preferred.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)password-rawbyte arrayPassword used for EAP authentication methods, given as a byte array to allow passwords in other encodings than UTF-8 to be used. If both the "password" property and the "password-raw" property are specified, "password" is preferred.password-raw-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password-raw" property. (see for flag values)phase1-auth-flagsuint320Specifies authentication flags to use in "phase 1" outer authentication using NMSetting8021xAuthFlags options. The individual TLS versions can be explicitly disabled. If a certain TLS disable flag is not set, it is up to the supplicant to allow or forbid it. The TLS options map to tls_disable_tlsv1_x settings. See the wpa_supplicant documentation for more details.phase1-fast-provisioningstringEnables or disables in-line provisioning of EAP-FAST credentials when FAST is specified as the EAP method in the "eap" property. Recognized values are "0" (disabled), "1" (allow unauthenticated provisioning), "2" (allow authenticated provisioning), and "3" (allow both authenticated and unauthenticated provisioning). See the wpa_supplicant documentation for more details.phase1-peaplabelstringForces use of the new PEAP label during key derivation. Some RADIUS servers may require forcing the new PEAP label to interoperate with PEAPv1. Set to "1" to force use of the new PEAP label. See the wpa_supplicant documentation for more details.phase1-peapverstringForces which PEAP version is used when PEAP is set as the EAP method in the "eap" property. When unset, the version reported by the server will be used. Sometimes when using older RADIUS servers, it is necessary to force the client to use a particular PEAP version. To do so, this property may be set to "0" or "1" to force that specific PEAP version.phase2-altsubject-matchesarray of stringList of strings to be matched against the altSubjectName of the certificate presented by the authentication server during the inner "phase 2" authentication. If the list is empty, no verification of the server certificate's altSubjectName is performed.phase2-authstringSpecifies the allowed "phase 2" inner authentication method when an EAP method that uses an inner TLS tunnel is specified in the "eap" property. For TTLS this property selects one of the supported non-EAP inner methods: "pap", "chap", "mschap", "mschapv2" while "phase2-autheap" selects an EAP inner method. For PEAP this selects an inner EAP method, one of: "gtc", "otp", "md5" and "tls". Each "phase 2" inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details. Both "phase2-auth" and "phase2-autheap" cannot be specified.phase2-autheapstringSpecifies the allowed "phase 2" inner EAP-based authentication method when TTLS is specified in the "eap" property. Recognized EAP-based "phase 2" methods are "md5", "mschapv2", "otp", "gtc", and "tls". Each "phase 2" inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details.phase2-ca-certbyte arrayContains the "phase 2" CA certificate if used by the EAP method specified in the "phase2-auth" or "phase2-autheap" properties. Certificate data is specified using a "scheme"; three are currently supported: blob, path and pkcs#11 URL. When using the blob scheme this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended. Note that enabling NMSetting8021x:system-ca-certs will override this setting to use the built-in path, if the built-in path is not a directory.phase2-ca-cert-passwordstringThe password used to access the "phase2" CA certificate stored in "phase2-ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.phase2-ca-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "phase2-ca-cert-password" property. (see for flag values)phase2-ca-pathstringUTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the "phase2-ca-cert" property. If NMSetting8021x:system-ca-certs is enabled and the built-in CA path is an existing directory, then this setting is ignored.phase2-client-certbyte arrayContains the "phase 2" client certificate if used by the EAP method specified in the "phase2-auth" or "phase2-autheap" properties. Certificate data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended.phase2-client-cert-passwordstringThe password used to access the "phase2" client certificate stored in "phase2-client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.phase2-client-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "phase2-client-cert-password" property. (see for flag values)phase2-domain-matchstringConstraint for server domain name. If set, this list of FQDNs is used as a match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner "phase 2" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using the same comparison. Multiple valid FQDNs can be passed as a ";" delimited list.phase2-domain-suffix-matchstringConstraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner "phase 2" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison. Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited list.phase2-private-keybyte arrayContains the "phase 2" inner private key when the "phase2-auth" or "phase2-autheap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the "phase2-private-key-password" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte, and as with the blob scheme the "phase2-private-key-password" property must be set to the password used to decode the PKCS#12 private key and certificate.phase2-private-key-passwordstringThe password used to decrypt the "phase 2" private key specified in the "phase2-private-key" property when the private key either uses the path scheme, or is a PKCS#12 format key.phase2-private-key-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "phase2-private-key-password" property. (see for flag values)phase2-subject-matchstringSubstring to be matched against the subject of the certificate presented by the authentication server during the inner "phase 2" authentication. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:phase2-domain-suffix-match.pinstringPIN used for EAP authentication methods.pin-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "pin" property. (see for flag values)private-keybyte arrayContains the private key when the "eap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the "private-key-password" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte, and as with the blob scheme the "private-key-password" property must be set to the password used to decode the PKCS#12 private key and certificate. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data.private-key-passwordstringThe password used to decrypt the private key specified in the "private-key" property when the private key either uses the path scheme, or if the private key is a PKCS#12 format key.private-key-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "private-key-password" property. (see for flag values)subject-matchstringSubstring to be matched against the subject of the certificate presented by the authentication server. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:domain-suffix-match.system-ca-certsbooleanFALSEWhen TRUE, overrides the "ca-path" and "phase2-ca-path" properties using the system CA directory specified at configure time with the --system-ca-path switch. The certificates in this directory are added to the verification chain in addition to any certificates specified by the "ca-cert" and "phase2-ca-cert" properties. If the path provided with --system-ca-path is rather a file name (bundle of trusted CA certificates), it overrides "ca-cert" and "phase2-ca-cert" properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant).adsl settingADSL Settings.Key NameValue TypeDefault ValueValue DescriptionencapsulationstringEncapsulation of ADSL connection. Can be "vcmux" or "llc".passwordstringPassword used to authenticate with the ADSL service.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)protocolstringADSL connection protocol. Can be "pppoa", "pppoe" or "ipoatm".usernamestringUsername used to authenticate with the ADSL service.vciuint320VCI of ADSL connectionvpiuint320VPI of ADSL connectionbluetooth settingBluetooth Settings.Key NameValue TypeDefault ValueValue Descriptionbdaddrbyte arrayThe Bluetooth address of the device.typestringEither "dun" for Dial-Up Networking connections or "panu" for Personal Area Networking connections to devices supporting the NAP profile.bond settingBonding Settings.Key NameValue TypeDefault ValueValue Descriptioninterface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the bond's interface name.optionsdict of string to string{'mode': 'balance-rr'}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]).bridge settingBridging Settings.Key NameValue TypeDefault ValueValue Descriptionageing-timeuint32300The Ethernet MAC address aging time, in seconds.forward-delayuint3215The Spanning Tree Protocol (STP) forwarding delay, in seconds.group-addressbyte arrayIf specified, The MAC address of the multicast group this bridge uses for STP. The address must be a link-local address in standard Ethernet MAC address format, ie an address of the form 01:80:C2:00:00:0X, with X in [0, 4..F]. If not specified the default value is 01:80:C2:00:00:00.group-forward-maskuint320A mask of group addresses to forward. Usually, group addresses in the range from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not forwarded according to standards. This property is a mask of 16 bits, each corresponding to a group address in that range that must be forwarded. The mask can't have bits 0, 1 or 2 set because they are used for STP, MAC pause frames and LACP.hello-timeuint322The Spanning Tree Protocol (STP) hello time, in seconds.interface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the bridge's interface name.mac-addressbyte arrayIf specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the "ethernet.cloned-mac-address" is referred instead to generate the initial MAC address. Note that setting "ethernet.cloned-mac-address" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated. Deprecated: 1max-ageuint3220The Spanning Tree Protocol (STP) maximum message age, in seconds.multicast-hash-maxuint324096Set maximum size of multicast hash table (value must be a power of 2).multicast-last-member-countuint322Set the number of queries the bridge will send before stopping forwarding a multicast group after a "leave" message has been received.multicast-last-member-intervaluint64100Set interval (in deciseconds) between queries to find remaining members of a group, after a "leave" message is received.multicast-membership-intervaluint6426000Set delay (in deciseconds) after which the bridge will leave a group, if no membership reports for this group are received.multicast-querierbooleanFALSEEnable or disable sending of multicast queries by the bridge. If not specified the option is disabled.multicast-querier-intervaluint6425500If no queries are seen after this delay (in deciseconds) has passed, the bridge will start to send its own queries.multicast-query-intervaluint6412500Interval (in deciseconds) between queries sent by the bridge after the end of the startup phase.multicast-query-response-intervaluint641000Set the Max Response Time/Max Response Delay (in deciseconds) for IGMP/MLD queries sent by the bridge.multicast-query-use-ifaddrbooleanFALSEIf enabled the bridge's own IP address is used as the source address for IGMP queries otherwise the default of 0.0.0.0 is used.multicast-routerstringSets bridge's multicast router. Multicast-snooping must be enabled for this option to work. Supported values are: 'auto', 'disabled', 'enabled' to which kernel assigns the numbers 1, 0, and 2, respectively. If not specified the default value is 'auto' (1).multicast-snoopingbooleanTRUEControls whether IGMP snooping is enabled for this bridge. Note that if snooping was automatically disabled due to hash collisions, the system may refuse to enable the feature until the collisions are resolved.multicast-startup-query-countuint322Set the number of IGMP queries to send during startup phase.multicast-startup-query-intervaluint643125Sets the time (in deciseconds) between queries sent out at startup to determine membership information.priorityuint3232768Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are "better"; the lowest priority bridge will be elected the root bridge.stpbooleanTRUEControls whether Spanning Tree Protocol (STP) is enabled for this bridge.vlan-default-pviduint321The default PVID for the ports of the bridge, that is the VLAN id assigned to incoming untagged frames.vlan-filteringbooleanFALSEControl whether VLAN filtering is enabled on the bridge.vlan-protocolstringIf specified, the protocol used for VLAN filtering. Supported values are: '802.1Q', '802.1ad'. If not specified the default value is '802.1Q'.vlan-stats-enabledbooleanFALSEControls whether per-VLAN stats accounting is enabled.vlansarray of vardictArray of bridge VLAN objects. In addition to the VLANs specified here, the bridge will also have the default-pvid VLAN configured by the bridge.vlan-default-pvid property. In nmcli the VLAN list can be specified with the following syntax: $vid [pvid] [untagged] [, $vid [pvid] [untagged]]... where $vid is either a single id between 1 and 4094 or a range, represented as a couple of ids separated by a dash.bridge-port settingBridge Port Settings.Key NameValue TypeDefault ValueValue Descriptionhairpin-modebooleanFALSEEnables or disables "hairpin mode" for the port, which allows frames to be sent back out through the port the frame was received on.path-costuint32100The Spanning Tree Protocol (STP) port cost for destinations via this port.priorityuint3232The Spanning Tree Protocol (STP) priority of this bridge port.vlansarray of vardictArray of bridge VLAN objects. In addition to the VLANs specified here, the port will also have the default-pvid VLAN configured on the bridge by the bridge.vlan-default-pvid property. In nmcli the VLAN list can be specified with the following syntax: $vid [pvid] [untagged] [, $vid [pvid] [untagged]]... where $vid is either a single id between 1 and 4094 or a range, represented as a couple of ids separated by a dash.cdma settingCDMA-based Mobile Broadband Settings.Key NameValue TypeDefault ValueValue Descriptionmtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.numberstringThe number to dial to establish the connection to the CDMA-based mobile broadband network, if any. If not specified, the default number (#777) is used when required.passwordstringThe password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)usernamestringThe username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.dcb settingData Center Bridging Settings.Key NameValue TypeDefault ValueValue Descriptionapp-fcoe-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for the DCB FCoE application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).app-fcoe-modestringThe FCoE controller mode; either "fabric" or "vn2vn". Since 1.34, NULL is the default and means "fabric". Before 1.34, NULL was rejected as invalid and the default was "fabric".app-fcoe-priorityint32-1The highest User Priority (0 - 7) which FCoE frames should use, or -1 for default priority. Only used when the "app-fcoe-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.app-fip-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for the DCB FIP application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).app-fip-priorityint32-1The highest User Priority (0 - 7) which FIP frames should use, or -1 for default priority. Only used when the "app-fip-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.app-iscsi-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for the DCB iSCSI application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).app-iscsi-priorityint32-1The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for default priority. Only used when the "app-iscsi-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.priority-bandwidtharray of uint32An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents.priority-flow-controlarray of uint32An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause.priority-flow-control-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).priority-group-bandwidtharray of uint32An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents.priority-group-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for DCB Priority Groups. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).priority-group-idarray of uint32An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group.priority-strict-bandwidtharray of uint32An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group.priority-traffic-classarray of uint32An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped.dummy settingDummy Link Settings.Key NameValue TypeDefault ValueValue Descriptionethtool settingEthtool Ethernet Settings.Key NameValue TypeDefault ValueValue Descriptiongeneric settingGeneric Link Settings.Key NameValue TypeDefault ValueValue Descriptiongsm settingGSM-based Mobile Broadband Settings.Key NameValue TypeDefault ValueValue DescriptionapnstringThe GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan. The APN may only be composed of the characters a-z, 0-9, ., and - per GSM 03.60 Section 14.9.auto-configbooleanFALSEWhen TRUE, the settings such as APN, username, or password will default to values that match the network the modem will register to in the Mobile Broadband Provider database.device-idstringThe device unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will only apply to the specified device.home-onlybooleanFALSEWhen TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made.mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.network-idstringThe Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible.numberstringLegacy setting that used to help establishing PPP data sessions for GSM-based modems. Deprecated: 1passwordstringThe password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)pinstringIf the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device.pin-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "pin" property. (see for flag values)sim-idstringThe SIM card unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" which contains a SIM card matching the given identifier.sim-operator-idstringA MCC/MNC string like "310260" or "21601" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" and "sim-id" which contains a SIM card provisioned by the given operator.usernamestringThe username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.infiniband settingInfiniband Settings.Key NameValue TypeDefault ValueValue Descriptionmac-addressbyte arrayIf 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).mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.p-keyint32-1The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key.parentstringThe interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address".transport-modestringThe IP-over-InfiniBand transport mode. Either "datagram" or "connected".ipv4 settingIPv4 Settings.Key NameValue TypeDefault ValueValue Descriptionaddress-dataarray of vardictArray of IPv4 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses.addressesarray of array of uint32Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv4 address structures. Each IPv4 address structure is composed of 3 32-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 - 32), and last the IPv4 gateway (network byte order). The gateway may be left as 0 if no gateway exists for that subnet.dad-timeoutint32-1Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4.dhcp-client-idstringA string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0. The special values "mac" and "perm-mac" are supported, which use the current or permanent MAC address of the device to generate a client identifier with type ethernet (01). Currently, these options only work for ethernet type of links. The special value "ipv6-duid" uses the DUID from "ipv6.dhcp-duid" property as an RFC4361-compliant client identifier. As IAID it uses "ipv4.dhcp-iaid" and falls back to "ipv6.dhcp-iaid" if unset. The special value "duid" generates a RFC4361-compliant client identifier based on "ipv4.dhcp-iaid" and uses a DUID generated by hashing /etc/machine-id. The special value "stable" is supported to generate a type 0 client identifier based on the stable-id (see connection.stable-id) and a per-host key. If you set the stable-id, you may want to include the "${DEVICE}" or "${MAC}" specifier to get a per-device key. If unset, a globally configured default is used. If still unset, the default depends on the DHCP plugin.dhcp-fqdnstringIf the "dhcp-send-hostname" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and "dhcp-hostname" are mutually exclusive and cannot be set at the same time.dhcp-hostnamestringIf the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time.dhcp-hostname-flagsuint320Flags for the DHCP hostname and FQDN. Currently, this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default is looked up in NetworkManager configuration. If that value is unset or also NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described above are sent in the DHCP requests.dhcp-iaidstringA string containing the "Identity Association Identifier" (IAID) used by the DHCP client. The property is a 32-bit decimal value or a special value among "mac", "perm-mac", "ifname" and "stable". When set to "mac" (or "perm-mac"), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to "ifname", the IAID is computed by hashing the interface name. The special value "stable" can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be "ifname". Note that at the moment this property is ignored for IPv6 by dhclient, which always derives the IAID from the MAC address.dhcp-reject-serversarray of stringArray of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers. For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. "192.168.122.0/24"). This property is currently not implemented for DHCPv6.dhcp-send-hostnamebooleanTRUEIf TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.dhcp-timeoutint320A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.dhcp-vendor-class-identifierstringThe Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server. Since 1.28dnsarray of uint32Array of IP addresses of DNS servers (as network-byte-order integers)dns-optionsarray of stringArray of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are "attempts", "debug", "edns0", "inet6", "ip6-bytestring", "ip6-dotint", "ndots", "no-check-names", "no-ip6-dotint", "no-reload", "no-tld-query", "rotate", "single-request", "single-request-reopen", "timeout", "trust-ad", "use-vc". The "trust-ad" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have "trust-ad" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then "edns0" and "trust-ad" are automatically added.dns-priorityint320DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the "rotate" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.dns-searcharray of stringArray of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.gatewaystringThe gateway associated with this configuration. This is only meaningful if "addresses" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with "never-default" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.ignore-auto-dnsbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the "dns" and "dns-search" properties, if any, are used.ignore-auto-routesbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used.may-failbooleanTRUEIf TRUE, allow overall network configuration to proceed even if the configuration specified by this property 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 on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.methodstringIP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "disabled", "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration. The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.never-defaultbooleanFALSEIf TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.required-timeoutint32-1The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).route-dataarray of vardictArray of IPv4 routes. Each route dictionary contains at least 'dest' and 'prefix' entries, containing the destination IP address as a string, and the prefix length as a uint32. Most routes will also have a 'next-hop' entry, containing the next hop IP address as a string. If the route has a 'metric' entry (containing a uint32), that will be used as the metric for the route (otherwise NM will pick a default value appropriate to the device). Additional attributes may also exist on some routes.route-metricint64-1The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.route-tableuint320Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.routesarray of array of uint32Deprecated in favor of the 'route-data' property, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'route-data'. Array of IPv4 route structures. Each IPv4 route structure is composed of 4 32-bit values; the first being the destination IPv4 network or address (network byte order), the second the destination network or address prefix (1 - 32), the third being the next-hop (network byte order) if any, and the fourth being the route metric. If the metric is 0, NM will choose an appropriate default metric for the device. (There is no way to explicitly specify an actual metric of 0 with this property.)ipv6 settingIPv6 Settings.Key NameValue TypeDefault ValueValue Descriptionaddr-gen-modeint321Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 (0) or NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1). If the property is set to EUI64, the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of stable-privacy enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling stable-privacy. For keyfile plugin, the absence of the setting on disk means EUI64 so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by "ip6-privacy" property and it does not affect the temporary addresses configured with this option.address-dataarray of vardictArray of IPv6 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses.addressesarray of legacy IPv6 address struct (a(ayuay))Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv6 address structures. Each IPv6 address structure is composed of an IPv6 address, a prefix length (1 - 128), and an IPv6 gateway address. The gateway may be zeroed out if no gateway exists for that subnet.dad-timeoutint32-1Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4.dhcp-duidstringA string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried in the Client Identifier option. If the property is a hex string ('aa:bb:cc') it is interpreted as a binary DUID and filled as an opaque value in the Client Identifier option. The special value "lease" will retrieve the DUID previously used from the lease file belonging to the connection. If no DUID is found and "dhclient" is the configured dhcp client, the DUID is searched in the system-wide dhclient lease file. If still no DUID is found, or another dhcp client is used, a global and permanent DUID-UUID (RFC 6355) will be generated based on the machine-id. The special values "llt" and "ll" will generate a DUID of type LLT or LL (see RFC 3315) based on the current MAC address of the device. In order to try providing a stable DUID-LLT, the time field will contain a constant timestamp that is used globally (for all profiles) and persisted to disk. The special values "stable-llt", "stable-ll" and "stable-uuid" will generate a DUID of the corresponding type, derived from the connection's stable-id and a per-host unique key. You may want to include the "${DEVICE}" or "${MAC}" specifier in the stable-id, in case this profile gets activated on multiple devices. So, the link-layer address of "stable-ll" and "stable-llt" will be a generated address derived from the stable id. The DUID-LLT time value in the "stable-llt" option will be picked among a static timespan of three years (the upper bound of the interval is the same constant timestamp used in "llt"). When the property is unset, the global value provided for "ipv6.dhcp-duid" is used. If no global value is provided, the default "lease" value is assumed.dhcp-hostnamestringIf the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time.dhcp-hostname-flagsuint320Flags for the DHCP hostname and FQDN. Currently, this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default is looked up in NetworkManager configuration. If that value is unset or also NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described above are sent in the DHCP requests.dhcp-iaidstringA string containing the "Identity Association Identifier" (IAID) used by the DHCP client. The property is a 32-bit decimal value or a special value among "mac", "perm-mac", "ifname" and "stable". When set to "mac" (or "perm-mac"), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to "ifname", the IAID is computed by hashing the interface name. The special value "stable" can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be "ifname". Note that at the moment this property is ignored for IPv6 by dhclient, which always derives the IAID from the MAC address.dhcp-reject-serversarray of stringArray of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers. For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. "192.168.122.0/24"). This property is currently not implemented for DHCPv6.dhcp-send-hostnamebooleanTRUEIf TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.dhcp-timeoutint320A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.dnsarray of byte arrayArray of IP addresses of DNS servers (in network byte order)dns-optionsarray of stringArray of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are "attempts", "debug", "edns0", "inet6", "ip6-bytestring", "ip6-dotint", "ndots", "no-check-names", "no-ip6-dotint", "no-reload", "no-tld-query", "rotate", "single-request", "single-request-reopen", "timeout", "trust-ad", "use-vc". The "trust-ad" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have "trust-ad" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then "edns0" and "trust-ad" are automatically added.dns-priorityint320DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the "rotate" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.dns-searcharray of stringArray of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.gatewaystringThe gateway associated with this configuration. This is only meaningful if "addresses" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with "never-default" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.ignore-auto-dnsbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the "dns" and "dns-search" properties, if any, are used.ignore-auto-routesbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used.ip6-privacyNMSettingIP6ConfigPrivacy (int32)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: -1: unknown, 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses). Having a per-connection setting set to "-1" (unknown) means fallback to global configuration "ipv6.ip6-privacy". If also global configuration is unspecified or set to "-1", fallback to read "/proc/sys/net/ipv6/conf/default/use_tempaddr". Note that this setting is distinct from the Stable Privacy addresses that can be enabled with the "addr-gen-mode" property's "stable-privacy" setting as another way of avoiding host tracking with IPv6 addresses.may-failbooleanTRUEIf TRUE, allow overall network configuration to proceed even if the configuration specified by this property 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 on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.methodstringIP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "disabled", "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration. The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.never-defaultbooleanFALSEIf TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.ra-timeoutint320A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity.required-timeoutint32-1The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).route-dataarray of vardictArray of IPv6 routes. Each route dictionary contains at least 'dest' and 'prefix' entries, containing the destination IP address as a string, and the prefix length as a uint32. Most routes will also have a 'next-hop' entry, containing the next hop IP address as a string. If the route has a 'metric' entry (containing a uint32), that will be used as the metric for the route (otherwise NM will pick a default value appropriate to the device). Additional attributes may also exist on some routes.route-metricint64-1The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.route-tableuint320Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.routesarray of legacy IPv6 route struct (a(ayuayu))Deprecated in favor of the 'route-data' property, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'route-data'. Array of IPv6 route structures. Each IPv6 route structure is composed of an IPv6 address, a prefix length (1 - 128), an IPv6 next hop address (which may be zeroed out if there is no next hop), and a metric. If the metric is 0, NM will choose an appropriate default metric for the device.tokenstringConfigure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode.ip-tunnel settingIP Tunneling Settings.Key NameValue TypeDefault ValueValue Descriptionencapsulation-limituint320How many additional levels of encapsulation are permitted to be prepended to packets. This property applies only to IPv6 tunnels.flagsuint320Tunnel flags. Currently, the following values are supported: NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT (0x1), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS (0x2), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL (0x4), NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV (0x8), NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY (0x10), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK (0x20). They are valid only for IPv6 tunnels.flow-labeluint320The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels.input-keystringThe key used for tunnel input packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used.localstringThe local endpoint of the tunnel; the value can be empty, otherwise it must contain an IPv4 or IPv6 address.modeuint320The tunneling mode, for example NM_IP_TUNNEL_MODE_IPIP (1) or NM_IP_TUNNEL_MODE_GRE (2).mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments.output-keystringThe key used for tunnel output packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used.parentstringIf given, specifies the parent interface name or parent connection UUID the new device will be bound to so that tunneled packets will only be routed via that interface.path-mtu-discoverybooleanTRUEWhether to enable Path MTU Discovery on this tunnel.remotestringThe remote endpoint of the tunnel; the value must contain an IPv4 or IPv6 address.tosuint320The type of service (IPv4) or traffic class (IPv6) field to be set on tunneled packets.ttluint320The TTL to assign to tunneled packets. 0 is a special value meaning that packets inherit the TTL value.macsec settingMACSec Settings.Key NameValue TypeDefault ValueValue DescriptionencryptbooleanTRUEWhether the transmitted traffic must be encrypted.mka-cakstringThe pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement.mka-cak-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "mka-cak" property. (see for flag values)mka-cknstringThe pre-shared CKN (Connectivity-association Key Name) for MACsec Key Agreement.modeint320Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key Agreement) is obtained.parentstringIf given, specifies the parent interface name or parent connection UUID from which this MACSEC interface should be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property.portint321The port component of the SCI (Secure Channel Identifier), between 1 and 65534.send-scibooleanTRUESpecifies whether the SCI (Secure Channel Identifier) is included in every packet.validationint322Specifies the validation mode for incoming frames.macvlan settingMAC VLAN Settings.Key NameValue TypeDefault ValueValue Descriptionmodeuint320The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device.parentstringIf given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property.promiscuousbooleanTRUEWhether the interface should be put in promiscuous mode.tapbooleanFALSEWhether the interface should be a MACVTAP.match settingMatch settings.Key NameValue TypeDefault ValueValue Descriptiondriverarray of stringA list of driver names to match. Each element is a shell wildcard pattern. See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\\' are used for optional and mandatory matches and inverting the pattern.interface-namearray of stringA list of interface names to match. Each element is a shell wildcard pattern. An element can be prefixed with a pipe symbol (|) or an ampersand (&). The former means that the element is optional and the latter means that it is mandatory. If there are any optional elements, than the match evaluates to true if at least one of the optional element matches (logical OR). If there are any mandatory elements, then they all must match (logical AND). By default, an element is optional. This means that an element "foo" behaves the same as "|foo". An element can also be inverted with exclamation mark (!) between the pipe symbol (or the ampersand) and before the pattern. Note that "!foo" is a shortcut for the mandatory match "&!foo". Finally, a backslash can be used at the beginning of the element (after the optional special characters) to escape the start of the pattern. For example, "&\\!a" is an mandatory match for literally "!a".kernel-command-linearray of stringA list of kernel command line arguments to match. This may be used to check whether a specific kernel command line option is set (or unset, if prefixed with the exclamation mark). The argument must either be a single word, or an assignment (i.e. two words, joined by "="). In the former case the kernel command line is searched for the word appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is looked for with right and left hand side matching. Wildcard patterns are not supported. See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\\' are used for optional and mandatory matches and inverting the match.patharray of stringA list of paths to match against the ID_PATH udev property of devices. ID_PATH represents the topological persistent path of a device. It typically contains a subsystem string (pci, usb, platform, etc.) and a subsystem-specific identifier. For PCI devices the path has the form "pci-$domain:$bus:$device.$function", where each variable is an hexadecimal value; for example "pci-0000:0a:00.0". The path of a device can be obtained with "udevadm info /sys/class/net/$dev | grep ID_PATH=" or by looking at the "path" property exported by NetworkManager ("nmcli -f general.path device show $dev"). Each element of the list is a shell wildcard pattern. See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\\' are used for optional and mandatory matches and inverting the pattern.802-11-olpc-mesh settingOLPC Wireless Mesh Settings.Key NameValue TypeDefault ValueValue Descriptionchanneluint320Channel on which the mesh network to join is located.dhcp-anycast-addressbyte arrayAnycast DHCP MAC address used when requesting an IP address via DHCP. The specific anycast address used determines which DHCP server class answers the request. This is currently only implemented by dhclient DHCP plugin.ssidbyte arraySSID of the mesh network to join.ovs-bridge settingOvsBridge Link Settings.Key NameValue TypeDefault ValueValue Descriptiondatapath-typestringThe data path type. One of "system", "netdev" or empty.fail-modestringThe bridge failure mode. One of "secure", "standalone" or empty.mcast-snooping-enablebooleanFALSEEnable or disable multicast snooping.rstp-enablebooleanFALSEEnable or disable RSTP.stp-enablebooleanFALSEEnable or disable STP.ovs-dpdk settingOvsDpdk Link Settings.Key NameValue TypeDefault ValueValue DescriptiondevargsstringOpen vSwitch DPDK device arguments.ovs-interface settingOpen vSwitch Interface Settings.Key NameValue TypeDefault ValueValue DescriptiontypestringThe interface type. Either "internal", "system", "patch", "dpdk", or empty.ovs-patch settingOvsPatch Link Settings.Key NameValue TypeDefault ValueValue DescriptionpeerstringSpecifies the name of the interface for the other side of the patch. The patch on the other side must also set this interface as peer.ovs-port settingOvsPort Link Settings.Key NameValue TypeDefault ValueValue Descriptionbond-downdelayuint320The time port must be inactive in order to be considered down.bond-modestringBonding mode. One of "active-backup", "balance-slb", or "balance-tcp".bond-updelayuint320The time port must be active before it starts forwarding traffic.lacpstringLACP mode. One of "active", "off", or "passive".taguint320The VLAN tag in the range 0-4095.vlan-modestringThe VLAN mode. One of "access", "native-tagged", "native-untagged", "trunk" or unset.ppp settingPoint-to-Point Protocol Settings.Key NameValue TypeDefault ValueValue Descriptionbauduint320If non-zero, instruct pppd to set the serial port to the specified baudrate. This value should normally be left as 0 to automatically choose the speed.crtsctsbooleanFALSEIf TRUE, specify that pppd should set the serial port to use hardware flow control with RTS and CTS signals. This value should normally be set to FALSE.lcp-echo-failureuint320If non-zero, instruct pppd to presume the connection to the peer has failed if the specified number of LCP echo-requests go unanswered by the peer. The "lcp-echo-interval" property must also be set to a non-zero value if this property is used.lcp-echo-intervaluint320If non-zero, instruct pppd to send an LCP echo-request frame to the peer every n seconds (where n is the specified value). Note that some PPP peers will respond to echo requests and some will not, and it is not possible to autodetect this.mppe-statefulbooleanFALSEIf TRUE, stateful MPPE is used. See pppd documentation for more information on stateful MPPE.mruuint320If non-zero, instruct pppd to request that the peer send packets no larger than the specified size. If non-zero, the MRU should be between 128 and 16384.mtuuint320If non-zero, instruct pppd to send packets no larger than the specified size.no-vj-compbooleanFALSEIf TRUE, Van Jacobsen TCP header compression will not be requested.noauthbooleanTRUEIf TRUE, do not require the other side (usually the PPP server) to authenticate itself to the client. If FALSE, require authentication from the remote side. In almost all cases, this should be TRUE.nobsdcompbooleanFALSEIf TRUE, BSD compression will not be requested.nodeflatebooleanFALSEIf TRUE, "deflate" compression will not be requested.refuse-chapbooleanFALSEIf TRUE, the CHAP authentication method will not be used.refuse-eapbooleanFALSEIf TRUE, the EAP authentication method will not be used.refuse-mschapbooleanFALSEIf TRUE, the MSCHAP authentication method will not be used.refuse-mschapv2booleanFALSEIf TRUE, the MSCHAPv2 authentication method will not be used.refuse-papbooleanFALSEIf TRUE, the PAP authentication method will not be used.require-mppebooleanFALSEIf TRUE, MPPE (Microsoft Point-to-Point Encryption) will be required for the PPP session. If either 64-bit or 128-bit MPPE is not available the session will fail. Note that MPPE is not used on mobile broadband connections.require-mppe-128booleanFALSEIf TRUE, 128-bit MPPE (Microsoft Point-to-Point Encryption) will be required for the PPP session, and the "require-mppe" property must also be set to TRUE. If 128-bit MPPE is not available the session will fail.pppoe settingPPP-over-Ethernet Settings.Key NameValue TypeDefault ValueValue DescriptionparentstringIf given, specifies the parent interface name on which this PPPoE connection should be created. If this property is not specified, the connection is activated on the interface specified in "interface-name" of NMSettingConnection.passwordstringPassword used to authenticate with the PPPoE service.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)servicestringIf specified, instruct PPPoE to only initiate sessions with access concentrators that provide the specified service. For most providers, this should be left blank. It is only required if there are multiple access concentrators or a specific service is known to be required.usernamestringUsername used to authenticate with the PPPoE service.proxy settingWWW Proxy Settings.Key NameValue TypeDefault ValueValue Descriptionbrowser-onlybooleanFALSEWhether the proxy configuration is for browser only.methodint320Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)pac-scriptstringPAC script for the connection.pac-urlstringPAC URL for obtaining PAC file.serial settingSerial Link Settings.Key NameValue TypeDefault ValueValue Descriptionbauduint3257600Speed to use for communication over the serial port. Note that this value usually has no effect for mobile broadband modems as they generally ignore speed settings and use the highest available speed.bitsuint328Byte-width of the serial communication. The 8 in "8n1" for example.paritybyteThe connection parity: 69 (ASCII 'E') for even parity, 111 (ASCII 'o') for odd, 110 (ASCII 'n') for none.send-delayuint640Time to delay between each byte sent to the modem, in microseconds.stopbitsuint321Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in "8n1" for example.sriov settingSR-IOV settings.Key NameValue TypeDefault ValueValue Descriptionautoprobe-driversNMTernary (int32)Whether to autoprobe virtual functions by a compatible driver. If set to NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver and if this succeeds a new network interface will be instantiated for each VF. If set to NM_TERNARY_FALSE (0), VFs will not be claimed and no network interfaces will be created for them. When set to NM_TERNARY_DEFAULT (-1), the global default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_TRUE (1).total-vfsuint320The total number of virtual functions to create. Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface (also when it is zero) during activation and resets it upon deactivation. To prevent any changes to SR-IOV parameters don't add a sriov setting to the connection.vfsarray of vardictArray of virtual function descriptors. Each VF descriptor is a dictionary mapping attribute names to GVariant values. The 'index' entry is mandatory for each VF. When represented as string a VF is in the form: "INDEX [ATTR=VALUE[ ATTR=VALUE]...]". for example: "2 mac=00:11:22:33:44:55 spoof-check=true". Multiple VFs can be specified using a comma as separator. Currently, the following attributes are supported: mac, spoof-check, trust, min-tx-rate, max-tx-rate, vlans. The "vlans" attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor has the form "ID[.PRIORITY[.PROTO]]". PROTO can be either 'q' for 802.1Q (the default) or 'ad' for 802.1ad.tc settingLinux Traffic Control Settings.Key NameValue TypeDefault ValueValue Descriptionqdiscsarray of vardictArray of TC queueing disciplines. When the "tc" setting is present, qdiscs from this property are applied upon activation. If the property is empty, all qdiscs are removed and the device will only have the default qdisc assigned by kernel according to the "net.core.default_qdisc" sysctl. If the "tc" setting is not present, NetworkManager doesn't touch the qdiscs present on the interface.tfiltersarray of vardictArray of TC traffic filters. When the "tc" setting is present, filters from this property are applied upon activation. If the property is empty, NetworkManager removes all the filters. If the "tc" setting is not present, NetworkManager doesn't touch the filters present on the interface.team settingTeaming Settings.Key NameValue TypeDefault ValueValue DescriptionconfigstringThe JSON configuration for the team network interface. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details.interface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the team's interface name.link-watchersarray of vardictLink watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-inactive', 'send-always'. See teamd.conf man for more details.mcast-rejoin-countint32-1Corresponds to the teamd mcast_rejoin.count.mcast-rejoin-intervalint32-1Corresponds to the teamd mcast_rejoin.interval.notify-peers-countint32-1Corresponds to the teamd notify_peers.count.notify-peers-intervalint32-1Corresponds to the teamd notify_peers.interval.runnerstringCorresponds to the teamd runner.name. Permitted values are: "roundrobin", "broadcast", "activebackup", "loadbalance", "lacp", "random".runner-activebooleanTRUECorresponds to the teamd runner.active.runner-agg-select-policystringCorresponds to the teamd runner.agg_select_policy.runner-fast-ratebooleanFALSECorresponds to the teamd runner.fast_rate.runner-hwaddr-policystringCorresponds to the teamd runner.hwaddr_policy.runner-min-portsint32-1Corresponds to the teamd runner.min_ports.runner-sys-prioint32-1Corresponds to the teamd runner.sys_prio.runner-tx-balancerstringCorresponds to the teamd runner.tx_balancer.name.runner-tx-balancer-intervalint32-1Corresponds to the teamd runner.tx_balancer.interval.runner-tx-hasharray of stringCorresponds to the teamd runner.tx_hash.team-port settingTeam Port Settings.Key NameValue TypeDefault ValueValue DescriptionconfigstringThe JSON configuration for the team port. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details.lacp-keyint32-1Corresponds to the teamd ports.PORTIFNAME.lacp_key.lacp-prioint32-1Corresponds to the teamd ports.PORTIFNAME.lacp_prio.link-watchersarray of vardictLink watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-inactive', 'send-always'. See teamd.conf man for more details.prioint320Corresponds to the teamd ports.PORTIFNAME.prio.queue-idint32-1Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the parameter is skipped from the json config.stickybooleanFALSECorresponds to the teamd ports.PORTIFNAME.sticky.tun settingTunnel Settings.Key NameValue TypeDefault ValueValue DescriptiongroupstringThe group ID which will own the device. If set to NULL everyone will be able to use the device.modeuint321The operating mode of the virtual device. Allowed values are NM_SETTING_TUN_MODE_TUN (1) to create a layer 3 device and NM_SETTING_TUN_MODE_TAP (2) to create an Ethernet-like layer 2 one.multi-queuebooleanFALSEIf the property is set to TRUE, the interface will support multiple file descriptors (queues) to parallelize packet sending or receiving. Otherwise, the interface will only support a single queue.ownerstringThe user ID which will own the device. If set to NULL everyone will be able to use the device.pibooleanFALSEIf TRUE the interface will prepend a 4 byte header describing the physical interface to the packets.vnet-hdrbooleanFALSEIf TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network header.user settingGeneral User Profile Settings.Key NameValue TypeDefault ValueValue Descriptiondatadict of string to string{}A dictionary of key/value pairs with user data. This data is ignored by NetworkManager and can be used at the users discretion. The keys only support a strict ascii format, but the values can be arbitrary UTF8 strings up to a certain length.vlan settingVLAN Settings.Key NameValue TypeDefault ValueValue Descriptionegress-priority-maparray of stringFor 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".flagsNMVlanFlags (uint32)One or more flags which control the behavior and features of the VLAN interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of output packet headers), NM_VLAN_FLAG_GVRP (0x2) (use of the GVRP protocol), and NM_VLAN_FLAG_LOOSE_BINDING (0x4) (loose binding of the interface to its master device's operating state). NM_VLAN_FLAG_MVRP (0x8) (use of the MVRP protocol). The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0.iduint320The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095.ingress-priority-maparray of stringFor 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".interface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the vlan's interface name.parentstringIf 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 an "802-3-ethernet" setting with a "mac-address" property.vpn settingVPN Settings.Key NameValue TypeDefault ValueValue Descriptiondatadict of string to string{}Dictionary of key/value pairs of VPN plugin specific data. Both keys and values must be strings.persistentbooleanFALSEIf the VPN service supports persistence, and this property is TRUE, the VPN will attempt to stay connected across link changes and outages, until explicitly disconnected.secretsdict of string to string{}Dictionary of key/value pairs of VPN plugin specific secrets like passwords or private keys. Both keys and values must be strings.service-typestringD-Bus service name of the VPN plugin that this setting uses to connect to its network. i.e. org.freedesktop.NetworkManager.vpnc for the vpnc plugin.timeoutuint320Timeout for the VPN service to establish the connection. Some services may take quite a long time to connect. Value of 0 means a default timeout, which is 60 seconds (unless overridden by vpn.timeout in configuration file). Values greater than zero mean timeout in seconds.user-namestringIf 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.vrf settingVRF settings.Key NameValue TypeDefault ValueValue Descriptiontableuint320The routing table for this VRF.vxlan settingVXLAN Settings.Key NameValue TypeDefault ValueValue Descriptionageinguint32300Specifies the lifetime in seconds of FDB entries learnt by the kernel.destination-portuint328472Specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.iduint320Specifies the VXLAN Network Identifier (or VXLAN Segment Identifier) to use.l2-missbooleanFALSESpecifies whether netlink LL ADDR miss notifications are generated.l3-missbooleanFALSESpecifies whether netlink IP ADDR miss notifications are generated.learningbooleanTRUESpecifies whether unknown source link layer addresses and IP addresses are entered into the VXLAN device forwarding database.limituint320Specifies the maximum number of FDB entries. A value of zero means that the kernel will store unlimited entries.localstringIf given, specifies the source IP address to use in outgoing packets.parentstringIf given, specifies the parent interface name or parent connection UUID.proxybooleanFALSESpecifies whether ARP proxy is turned on.remotestringSpecifies the unicast destination IP address to use in outgoing packets when the destination link layer address is not known in the VXLAN device forwarding database, or the multicast IP address to join.rscbooleanFALSESpecifies whether route short circuit is turned on.source-port-maxuint320Specifies the maximum UDP source port to communicate to the remote VXLAN tunnel endpoint.source-port-minuint320Specifies the minimum UDP source port to communicate to the remote VXLAN tunnel endpoint.tosuint320Specifies the TOS value to use in outgoing packets.ttluint320Specifies the time-to-live value to use in outgoing packets.wifi-p2p settingWi-Fi P2P Settings.Key NameValue TypeDefault ValueValue DescriptionpeerstringThe P2P device that should be connected to. Currently, this is the only way to create or join a group.wfd-iesbyte arrayThe Wi-Fi Display (WFD) Information Elements (IEs) to set. Wi-Fi Display requires a protocol specific information element to be set in certain Wi-Fi frames. These can be specified here for the purpose of establishing a connection. This setting is only useful when implementing a Wi-Fi Display client.wps-methoduint320Flags indicating which mode of WPS is to be used. There's little point in changing the default setting as NetworkManager will automatically determine the best method to use.wimax settingWiMax Settings.Key NameValue TypeDefault ValueValue Descriptionmac-addressbyte arrayIf specified, this connection will only apply to the WiMAX device whose MAC address matches. This property does not change the MAC address of the device (known as MAC spoofing). Deprecated: 1network-namestringNetwork Service Provider (NSP) name of the WiMAX network this connection should use. Deprecated: 1802-3-ethernet settingWired Ethernet Settings.Key NameValue TypeDefault ValueValue Descriptionaccept-all-mac-addressesNMTernary (int32)When TRUE, setup the interface to accept packets for all MAC addresses. This is enabling the kernel interface flag IFF_PROMISC. When FALSE, the interface will only accept the packets with the interface destination mac address or broadcast.assigned-mac-addressstringThe new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values "preserve", "permanent", "random" or "stable". This field replaces the deprecated "cloned-mac-address" on D-Bus, which can only contain explicit hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".auto-negotiatebooleanFALSEWhen TRUE, enforce auto-negotiation of speed and duplex mode. If "speed" and "duplex" properties are both specified, only that single mode will be advertised and accepted during the link auto-negotiation process: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. When FALSE, "speed" and "duplex" properties should be both set or link configuration will be skipped.cloned-mac-addressbyte arrayThis D-Bus field is deprecated in favor of "assigned-mac-address" which is more flexible and allows specifying special variants like "random". For libnm and nmcli, this field is called "cloned-mac-address".duplexstringWhen a value is set, either "half" or "full", configures the device to use the specified duplex mode. If "auto-negotiate" is "yes" the specified duplex mode will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. If the value is unset (the default), the link configuration will be either skipped (if "auto-negotiate" is "no", the default) or will be auto-negotiated (if "auto-negotiate" is "yes") and the local device will advertise all the supported duplex modes. Must be set together with the "speed" property if specified. Before specifying a duplex mode be sure your device supports it.generate-mac-address-maskstringWith "cloned-mac-address" setting "random" or "stable", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the "random" or "stable" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00" will create a fully scrambled MAC address, randomly locally or globally administered.mac-addressbyte arrayIf specified, this connection will only apply to the Ethernet device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).mac-address-blacklistarray of stringIf specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.portstringSpecific port type to use if the device supports multiple attachment methods. One of "tp" (Twisted Pair), "aui" (Attachment Unit Interface), "bnc" (Thin Ethernet) or "mii" (Media Independent Interface). If the device supports only one port type, this setting is ignored.s390-nettypestrings390 network device type; one of "qeth", "lcs", or "ctc", representing the different types of virtual network devices available on s390 systems.s390-optionsdict of string to string{}Dictionary of key/value pairs of s390-specific device options. Both keys and values must be strings. Allowed keys include "portno", "layer2", "portname", "protocol", among others. Key names must contain only alphanumeric characters (ie, [a-zA-Z0-9]). Currently, NetworkManager itself does nothing with this information. However, s390utils ships a udev rule which parses this information and applies it to the interface.s390-subchannelsarray of stringIdentifies specific subchannels that this network device uses for communication with z/VM or s390 host. Like the "mac-address" property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character.speeduint320When a value greater than 0 is set, configures the device to use the specified speed. If "auto-negotiate" is "yes" the specified speed will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabit speeds, as in this case link negotiation is mandatory. If the value is unset (0, the default), the link configuration will be either skipped (if "auto-negotiate" is "no", the default) or will be auto-negotiated (if "auto-negotiate" is "yes") and the local device will advertise all the supported speeds. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the "duplex" property when non-zero. Before specifying a speed value be sure your device supports it.wake-on-lanuint321The NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST (0x4), NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST (0x8), NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST (0x10), NM_SETTING_WIRED_WAKE_ON_LAN_ARP (0x20), NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC (0x40) or the special values NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager).wake-on-lan-passwordstringIf specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If NULL, no password will be required.wireguard settingWireGuard Settings.Key NameValue TypeDefault ValueValue Descriptionfwmarkuint320The use of fwmark is optional and is by default off. Setting it to 0 disables it. Otherwise, it is a 32-bit fwmark for outgoing packets. Note that "ip4-auto-default-route" or "ip6-auto-default-route" enabled, implies to automatically choose a fwmark.ip4-auto-default-routeNMTernary (int32)Whether to enable special handling of the IPv4 default route. If enabled, the IPv4 default route from wireguard.peer-routes will be placed to a dedicated routing-table and two policy routing rules will be added. The fwmark number is also used as routing-table for the default-route, and if fwmark is zero, an unused fwmark/table is chosen automatically. This corresponds to what wg-quick does with Table=auto and what WireGuard calls "Improved Rule-based Routing". Note that for this automatism to work, you usually don't want to set ipv4.gateway, because that will result in a conflicting default route. Leaving this at the default will enable this option automatically if ipv4.never-default is not set and there are any peers that use a default-route as allowed-ips.ip6-auto-default-routeNMTernary (int32)Like ip4-auto-default-route, but for the IPv6 default route.listen-portuint320The listen-port. If listen-port is not specified, the port will be chosen randomly when the interface comes up.mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments. If zero a default MTU is used. Note that contrary to wg-quick's MTU setting, this does not take into account the current routes at the time of activation.peer-routesbooleanTRUEWhether to automatically add routes for the AllowedIPs ranges of the peers. If TRUE (the default), NetworkManager will automatically add routes in the routing tables according to ipv4.route-table and ipv6.route-table. Usually you want this automatism enabled. If FALSE, no such routes are added automatically. In this case, the user may want to configure static routes in ipv4.routes and ipv6.routes, respectively. Note that if the peer's AllowedIPs is "0.0.0.0/0" or "::/0" and the profile's ipv4.never-default or ipv6.never-default setting is enabled, the peer route for this peer won't be added automatically.peersarray of 'a{sv}'Array of dictionaries for the WireGuard peers.private-keystringThe 256 bit private-key in base64 encoding.private-key-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "private-key" property. (see for flag values)802-11-wireless settingWi-Fi Settings.Key NameValue TypeDefault ValueValue Descriptionap-isolationNMTernary (int32)Configures AP isolation, which prevents communication between wireless devices connected to this AP. This property can be set to a value different from NM_TERNARY_DEFAULT (-1) only when the interface is configured in AP mode. If set to NM_TERNARY_TRUE (1), devices are not able to communicate with each other. This increases security because it protects devices against attacks from other clients in the network. At the same time, it prevents devices to access resources on the same wireless networks as file shares, printers, etc. If set to NM_TERNARY_FALSE (0), devices can talk to each other. When set to NM_TERNARY_DEFAULT (-1), the global default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_FALSE (0).assigned-mac-addressstringThe new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values "preserve", "permanent", "random" or "stable". This field replaces the deprecated "cloned-mac-address" on D-Bus, which can only contain explicit hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".bandstring802.11 frequency band of the network. One of "a" for 5GHz 802.11a or "bg" for 2.4GHz 802.11. This will lock associations to the Wi-Fi network to the specific band, i.e. if "a" is specified, the device will not associate with the same network in the 2.4GHz band even if the network's settings are compatible. This setting depends on specific driver capability and may not work with all drivers.bssidbyte arrayIf specified, directs the device to only associate with the given access point. This capability is highly driver dependent and not supported by all devices. Note: this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future.channeluint320Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the "band" property to be set.cloned-mac-addressbyte arrayThis D-Bus field is deprecated in favor of "assigned-mac-address" which is more flexible and allows specifying special variants like "random". For libnm and nmcli, this field is called "cloned-mac-address".generate-mac-address-maskstringWith "cloned-mac-address" setting "random" or "stable", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the "random" or "stable" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00" will create a fully scrambled MAC address, randomly locally or globally administered.hiddenbooleanFALSEIf TRUE, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode. In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. In AP mode, the created network does not broadcast its SSID. Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air.mac-addressbyte arrayIf specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).mac-address-blacklistarray of stringA list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg "00:11:22:33:44:55").mac-address-randomizationuint320One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1modestringWi-Fi network mode; one of "infrastructure", "mesh", "adhoc" or "ap". If blank, infrastructure is assumed.mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.powersaveuint320One of NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2) (disable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3) (enable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1) (don't touch currently configure setting) or NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0) (use the globally configured value). All other values are reserved.rateuint320If non-zero, directs the device to only use the specified bitrate for communication with the access point. Units are in Kb/s, ie 5500 = 5.5 Mbit/s. This property is highly driver dependent and not all devices support setting a static bitrate.securityThis property is deprecated, but can be set to the value '802-11-wireless-security' when a wireless security setting is also present in the connection dictionary, for compatibility with very old NetworkManager daemons.seen-bssidsarray of stringA list of BSSIDs (each BSSID formatted as a MAC address like "00:11:22:33:44:55") that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved.ssidbyte arraySSID of the Wi-Fi network. Must be specified.tx-poweruint320If non-zero, directs the device to use the specified transmit power. Units are dBm. This property is highly driver dependent and not all devices support setting a static transmit power.wake-on-wlanuint321The NMSettingWirelessWakeOnWLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY (0x2), NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT (0x4), NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC (0x8), NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE (0x10), NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST (0x20), NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE (0x40), NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE (0x80), NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP (0x100) or the special values NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager).802-11-wireless-security settingWi-Fi Security Settings.Key NameValue TypeDefault ValueValue Descriptionauth-algstringWhen WEP is used (ie, key-mgmt = "none" or "ieee8021x") indicate the 802.11 authentication algorithm required by the AP here. One of "open" for Open System, "shared" for Shared Key, or "leap" for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = "ieee8021x" and auth-alg = "leap") the "leap-username" and "leap-password" properties must be specified.filsint320Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_FILS_DISABLE (1) (disable FILS), NM_SETTING_WIRELESS_SECURITY_FILS_OPTIONAL (2) (enable FILS if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_FILS_REQUIRED (3) (enable FILS and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) and no global default is set, FILS will be optionally enabled.grouparray of stringA list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "wep40", "wep104", "tkip", or "ccmp".key-mgmtstringKey management used for the connection. One of "none" (WEP or no password protection), "ieee8021x" (Dynamic WEP), "owe" (Opportunistic Wireless Encryption), "wpa-psk" (WPA2 + WPA3 personal), "sae" (WPA3 personal only), "wpa-eap" (WPA2 + WPA3 enterprise) or "wpa-eap-suite-b-192" (WPA3 enterprise only). This property must be set for any Wi-Fi connection that uses security.leap-passwordstringThe login password for legacy LEAP connections (ie, key-mgmt = "ieee8021x" and auth-alg = "leap").leap-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "leap-password" property. (see for flag values)leap-usernamestringThe login username for legacy LEAP connections (ie, key-mgmt = "ieee8021x" and auth-alg = "leap").pairwisearray of stringA list of pairwise encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "tkip" or "ccmp".pmfint320Indicates whether Protected Management Frames (802.11w) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_PMF_DISABLE (1) (disable PMF), NM_SETTING_WIRELESS_SECURITY_PMF_OPTIONAL (2) (enable PMF if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_PMF_REQUIRED (3) (enable PMF and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT (0) and no global default is set, PMF will be optionally enabled.protoarray of stringList of strings specifying the allowed WPA protocol versions to use. Each element may be one "wpa" (allow WPA) or "rsn" (allow WPA2/RSN). If not specified, both WPA and RSN connections are allowed.pskstringPre-Shared-Key for WPA networks. For WPA-PSK, it's either an ASCII passphrase of 8 to 63 characters that is (as specified in the 802.11i standard) hashed to derive the actual key, or the key in form of 64 hexadecimal character. The WPA3-Personal networks use a passphrase of any length for SAE authentication.psk-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "psk" property. (see for flag values)wep-key-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "wep-key0", "wep-key1", "wep-key2", and "wep-key3" properties. (see for flag values)wep-key-typeNMWepKeyType (uint32)Controls the interpretation of WEP keys. Allowed values are NM_WEP_KEY_TYPE_KEY (1), in which case the key is either a 10- or 26-character hexadecimal string, or a 5- or 13-character ASCII password; or NM_WEP_KEY_TYPE_PASSPHRASE (2), in which case the passphrase is provided as a string and will be hashed using the de-facto MD5 method to derive the actual WEP key.wep-key0stringIndex 0 WEP key. This is the WEP key used in most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-key1stringIndex 1 WEP key. This WEP index is not used by most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-key2stringIndex 2 WEP key. This WEP index is not used by most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-key3stringIndex 3 WEP key. This WEP index is not used by most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-tx-keyidxuint320When static WEP is used (ie, key-mgmt = "none") and a non-default WEP key index is used by the AP, put that WEP key index here. Valid values are 0 (default key) through 3. Note that some consumer access points (like the Linksys WRT54G) number the keys 1 - 4.wps-methoduint320Flags indicating which mode of WPS is to be used if any. There's little point in changing the default setting as NetworkManager will automatically determine whether it's feasible to start WPS enrollment from the Access Point capabilities. WPS can be disabled by setting this property to a value of 1.wpan settingIEEE 802.15.4 (WPAN) MAC Settings.Key NameValue TypeDefault ValueValue Descriptionchannelint32-1IEEE 802.15.4 channel. A positive integer or -1, meaning "do not set, use whatever the device is already set to".mac-addressstringIf specified, this connection will only apply to the IEEE 802.15.4 (WPAN) MAC layer device whose permanent MAC address matches.pageint32-1IEEE 802.15.4 channel page. A positive integer or -1, meaning "do not set, use whatever the device is already set to".pan-iduint3265535IEEE 802.15.4 Personal Area Network (PAN) identifier.short-addressuint3265535Short IEEE 802.15.4 address to be used within a restricted environment.bond-port settingBond Port Settings.Key NameValue TypeDefault ValueValue Descriptionqueue-iduint320The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.hostname settingHostname settings.Key NameValue TypeDefault ValueValue Descriptionfrom-dhcpNMTernary (int32)Whether the system hostname can be determined from DHCP on this connection. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).from-dns-lookupNMTernary (int32)Whether the system hostname can be determined from reverse DNS lookup of addresses on this device. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).only-from-defaultNMTernary (int32)If set to NM_TERNARY_TRUE (1), NetworkManager attempts to get the hostname via DHCPv4/DHCPv6 or reverse DNS lookup on this device only when the device has the default route for the given address family (IPv4/IPv6). If set to NM_TERNARY_FALSE (0), the hostname can be set from this device even if it doesn't have the default route. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_FALSE (0).priorityint320The relative priority of this connection to determine the system hostname. A lower numerical value is better (higher priority). A connection with higher priority is considered before connections with lower priority. If the value is zero, it can be overridden by a global value from NetworkManager configuration. If the property doesn't have a value in the global configuration, the value is assumed to be 100. Negative values have the special effect of excluding other connections with a greater numerical priority value; so in presence of at least one negative priority, only connections with the lowest priority value will be used to determine the hostname.ovs-external-ids settingOVS External IDs Settings.Key NameValue TypeDefault ValueValue Descriptiondatadict of string to string{}A dictionary of key/value pairs with exernal-ids for OVS.veth settingVeth Settings.Key NameValue TypeDefault ValueValue DescriptionpeerstringThis property specifies the peer interface name of the veth. This property is mandatory.Secret flag types: + connection settingGeneral Connection Profile Settings.Key NameValue TypeDefault ValueValue Descriptionauth-retriesint32-1The number of retries for the authentication. Zero means to try indefinitely; -1 means to use a global default. If the global default is not set, the authentication retries for 3 times before failing the connection. Currently, this only applies to 802-1x authentication.autoconnectbooleanTRUEWhether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection. Autoconnect happens when the circumstances are suitable. That means for example that the device is currently managed and not active. Autoconnect thus never replaces or competes with an already active profile. Note that autoconnect is not implemented for VPN profiles. See "secondaries" as an alternative to automatically connect VPN profiles.autoconnect-priorityint320The autoconnect priority in range -999 to 999. If the connection is set to autoconnect, connections with higher priority will be preferred. The higher number means higher priority. Defaults to 0. Note that this property only matters if there are more than one candidate profile to select for autoconnect. In case of equal priority, the profile used most recently is chosen.autoconnect-retriesint32-1The number of times a connection should be tried when autoactivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden). Setting this to 1 means to try activation only once before blocking autoconnect. Note that after a timeout, NetworkManager will try to autoconnect again.autoconnect-slavesNMSettingConnectionAutoconnectSlaves (int32)Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The properties "autoconnect", "autoconnect-priority" and "autoconnect-retries" are unrelated to this setting. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0.dns-over-tlsint32-1Whether DNSOverTls (dns-over-tls) is enabled for the connection. DNSOverTls is a technology which uses TLS to encrypt dns traffic. The permitted values are: "yes" (2) use DNSOverTls and disabled fallback, "opportunistic" (1) use DNSOverTls but allow fallback to unencrypted resolution, "no" (0) don't ever use DNSOverTls. If unspecified "default" depends on the plugin used. Systemd-resolved uses global setting. This feature requires a plugin which supports DNSOverTls. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.gateway-ping-timeoutuint320If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping.idstringA human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G".interface-namestringThe name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.lldpint32-1Whether LLDP is enabled for the connection.llmnrint32-1Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the connection. LLMNR is a protocol based on the Domain Name System (DNS) packet format that allows both IPv4 and IPv6 hosts to perform name resolution for hosts on the same local link. The permitted values are: "yes" (2) register hostname and resolving for the connection, "no" (0) disable LLMNR for the interface, "resolve" (1) do not register hostname but allow resolving of LLMNR host names If unspecified, "default" ultimately depends on the DNS plugin (which for systemd-resolved currently means "yes"). This feature requires a plugin which supports LLMNR. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.masterstringInterface name of the master device or UUID of the master connection.mdnsint32-1Whether mDNS is enabled for the connection. The permitted values are: "yes" (2) register hostname and resolving for the connection, "no" (0) disable mDNS for the interface, "resolve" (1) do not register hostname but allow resolving of mDNS host names and "default" (-1) to allow lookup of a global default in NetworkManager.conf. If unspecified, "default" ultimately depends on the DNS plugin (which for systemd-resolved currently means "no"). This feature requires a plugin which supports mDNS. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.meteredNMMetered (int32)Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately.mud-urlstringIf configured, set to a Manufacturer Usage Description (MUD) URL that points to manufacturer-recommended network policies for IoT devices. It is transmitted as a DHCPv4 or DHCPv6 option. The value must be a valid URL starting with "https://". The special value "none" is allowed to indicate that no MUD URL is used. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the ultimate default is "none".multi-connectint320Specifies whether the profile can be active multiple times at a particular moment. The value is of type NMConnectionMultiConnect.permissionsarray of stringAn array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form "[type]:[id]:[reserved]"; for example, "user:dcbw:blah". At this time only the "user" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the ":" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.read-onlybooleanFALSEFALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified.secondariesarray of stringList of connection UUIDs that should be activated when the base connection itself is activated. Currently, only VPN connections are supported.slave-typestringSetting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave.stable-idstringThis represents the identity of the connection used for various purposes. It allows to configure multiple profiles to share the identity. Also, the stable-id can contain placeholders that are substituted dynamically and deterministically depending on the context. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. It is also used as DHCP client identifier with ipv4.dhcp-client-id=stable and to derive the DHCP DUID with ipv6.dhcp-duid=stable-[llt,ll,uuid]. Note that depending on the context where it is used, other parameters are also seeded into the generation algorithm. For example, a per-host key is commonly also included, so that different systems end up generating different IDs. Or with ipv6.addr-gen-mode=stable-privacy, also the device's name is included, so that different interfaces yield different addresses. The per-host key is the identity of your machine and stored in /var/lib/NetworkManager/secret-key. The '$' character is treated special to perform dynamic substitutions at runtime. Currently, supported are "${CONNECTION}", "${DEVICE}", "${MAC}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-device, per-boot, or every time. Note that "${DEVICE}" corresponds to the interface name of the device and "${MAC}" is the permanent MAC address of the device. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}-${BOOT}-${DEVICE}" to create a unique id for this connection that changes with every reboot and differs depending on the interface where the profile activates. If the value is unset, a global connection default is consulted. If the value is still unset, the default is similar to "${CONNECTION}" and uses a unique, fixed ID for the connection.timestampuint640The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved).typestringBase type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, "802-3-ethernet" or "802-11-wireless" or "bluetooth", etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, "vpn" or "bridge", etc).uuidstringA universally unique identifier for the connection, for example generated with libuuid. It should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, it should not be changed when the "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-").wait-device-timeoutint32-1Timeout in milliseconds to wait for device at startup. During boot, devices may take a while to be detected by the driver. This property will cause to delay NetworkManager-wait-online.service and nm-online to give the device a chance to appear. This works by waiting for the given timeout until a compatible device for the profile is available and managed. The value 0 means no wait time. The default value is -1, which currently has the same meaning as no wait time.zonestringThe 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. When updating this property on a currently activated connection, the change takes effect immediately.6lowpan setting6LoWPAN Settings.Key NameValue TypeDefault ValueValue DescriptionparentstringIf given, specifies the parent interface name or parent connection UUID from which this 6LowPAN interface should be created.802-1x settingIEEE 802.1x Authentication Settings.Key NameValue TypeDefault ValueValue Descriptionaltsubject-matchesarray of stringList of strings to be matched against the altSubjectName of the certificate presented by the authentication server. If the list is empty, no verification of the server certificate's altSubjectName is performed.anonymous-identitystringAnonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS.auth-timeoutint320A timeout for the authentication. Zero means the global default; if the global default is not set, the authentication timeout is 25 seconds.ca-certbyte arrayContains the CA certificate if used by the EAP method specified in the "eap" property. Certificate data is specified using a "scheme"; three are currently supported: blob, path and pkcs#11 URL. When using the blob scheme this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended. Note that enabling NMSetting8021x:system-ca-certs will override this setting to use the built-in path, if the built-in path is not a directory.ca-cert-passwordstringThe password used to access the CA certificate stored in "ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.ca-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "ca-cert-password" property. (see for flag values)ca-pathstringUTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the "ca-cert" property. If NMSetting8021x:system-ca-certs is enabled and the built-in CA path is an existing directory, then this setting is ignored.client-certbyte arrayContains the client certificate if used by the EAP method specified in the "eap" property. Certificate data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte.client-cert-passwordstringThe password used to access the client certificate stored in "client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.client-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "client-cert-password" property. (see for flag values)domain-matchstringConstraint for server domain name. If set, this list of FQDNs is used as a match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using the same comparison. Multiple valid FQDNs can be passed as a ";" delimited list.domain-suffix-matchstringConstraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison. Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited list.eaparray of stringThe allowed EAP method to be used when authenticating to the network with 802.1x. Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd", and "fast". Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations.identitystringIdentity string for EAP authentication methods. Often the user's user or login name.optionalbooleanFALSEWhether the 802.1X authentication is optional. If TRUE, the activation will continue even after a timeout or an authentication failure. Setting the property to TRUE is currently allowed only for Ethernet connections. If set to FALSE, the activation can continue only after a successful authentication.pac-filestringUTF-8 encoded file path containing PAC for EAP-FAST.passwordstringUTF-8 encoded password used for EAP authentication methods. If both the "password" property and the "password-raw" property are specified, "password" is preferred.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)password-rawbyte arrayPassword used for EAP authentication methods, given as a byte array to allow passwords in other encodings than UTF-8 to be used. If both the "password" property and the "password-raw" property are specified, "password" is preferred.password-raw-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password-raw" property. (see for flag values)phase1-auth-flagsuint320Specifies authentication flags to use in "phase 1" outer authentication using NMSetting8021xAuthFlags options. The individual TLS versions can be explicitly disabled. If a certain TLS disable flag is not set, it is up to the supplicant to allow or forbid it. The TLS options map to tls_disable_tlsv1_x settings. See the wpa_supplicant documentation for more details.phase1-fast-provisioningstringEnables or disables in-line provisioning of EAP-FAST credentials when FAST is specified as the EAP method in the "eap" property. Recognized values are "0" (disabled), "1" (allow unauthenticated provisioning), "2" (allow authenticated provisioning), and "3" (allow both authenticated and unauthenticated provisioning). See the wpa_supplicant documentation for more details.phase1-peaplabelstringForces use of the new PEAP label during key derivation. Some RADIUS servers may require forcing the new PEAP label to interoperate with PEAPv1. Set to "1" to force use of the new PEAP label. See the wpa_supplicant documentation for more details.phase1-peapverstringForces which PEAP version is used when PEAP is set as the EAP method in the "eap" property. When unset, the version reported by the server will be used. Sometimes when using older RADIUS servers, it is necessary to force the client to use a particular PEAP version. To do so, this property may be set to "0" or "1" to force that specific PEAP version.phase2-altsubject-matchesarray of stringList of strings to be matched against the altSubjectName of the certificate presented by the authentication server during the inner "phase 2" authentication. If the list is empty, no verification of the server certificate's altSubjectName is performed.phase2-authstringSpecifies the allowed "phase 2" inner authentication method when an EAP method that uses an inner TLS tunnel is specified in the "eap" property. For TTLS this property selects one of the supported non-EAP inner methods: "pap", "chap", "mschap", "mschapv2" while "phase2-autheap" selects an EAP inner method. For PEAP this selects an inner EAP method, one of: "gtc", "otp", "md5" and "tls". Each "phase 2" inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details. Both "phase2-auth" and "phase2-autheap" cannot be specified.phase2-autheapstringSpecifies the allowed "phase 2" inner EAP-based authentication method when TTLS is specified in the "eap" property. Recognized EAP-based "phase 2" methods are "md5", "mschapv2", "otp", "gtc", and "tls". Each "phase 2" inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details.phase2-ca-certbyte arrayContains the "phase 2" CA certificate if used by the EAP method specified in the "phase2-auth" or "phase2-autheap" properties. Certificate data is specified using a "scheme"; three are currently supported: blob, path and pkcs#11 URL. When using the blob scheme this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended. Note that enabling NMSetting8021x:system-ca-certs will override this setting to use the built-in path, if the built-in path is not a directory.phase2-ca-cert-passwordstringThe password used to access the "phase2" CA certificate stored in "phase2-ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.phase2-ca-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "phase2-ca-cert-password" property. (see for flag values)phase2-ca-pathstringUTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the "phase2-ca-cert" property. If NMSetting8021x:system-ca-certs is enabled and the built-in CA path is an existing directory, then this setting is ignored.phase2-client-certbyte arrayContains the "phase 2" client certificate if used by the EAP method specified in the "phase2-auth" or "phase2-autheap" properties. Certificate data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string "file://" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended.phase2-client-cert-passwordstringThe password used to access the "phase2" client certificate stored in "phase2-client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.phase2-client-cert-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "phase2-client-cert-password" property. (see for flag values)phase2-domain-matchstringConstraint for server domain name. If set, this list of FQDNs is used as a match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner "phase 2" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using the same comparison. Multiple valid FQDNs can be passed as a ";" delimited list.phase2-domain-suffix-matchstringConstraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner "phase 2" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison. Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited list.phase2-private-keybyte arrayContains the "phase 2" inner private key when the "phase2-auth" or "phase2-autheap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the "phase2-private-key-password" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte, and as with the blob scheme the "phase2-private-key-password" property must be set to the password used to decode the PKCS#12 private key and certificate.phase2-private-key-passwordstringThe password used to decrypt the "phase 2" private key specified in the "phase2-private-key" property when the private key either uses the path scheme, or is a PKCS#12 format key.phase2-private-key-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "phase2-private-key-password" property. (see for flag values)phase2-subject-matchstringSubstring to be matched against the subject of the certificate presented by the authentication server during the inner "phase 2" authentication. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:phase2-domain-suffix-match.pinstringPIN used for EAP authentication methods.pin-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "pin" property. (see for flag values)private-keybyte arrayContains the private key when the "eap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the "private-key-password" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte, and as with the blob scheme the "private-key-password" property must be set to the password used to decode the PKCS#12 private key and certificate. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data.private-key-passwordstringThe password used to decrypt the private key specified in the "private-key" property when the private key either uses the path scheme, or if the private key is a PKCS#12 format key.private-key-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "private-key-password" property. (see for flag values)subject-matchstringSubstring to be matched against the subject of the certificate presented by the authentication server. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:domain-suffix-match.system-ca-certsbooleanFALSEWhen TRUE, overrides the "ca-path" and "phase2-ca-path" properties using the system CA directory specified at configure time with the --system-ca-path switch. The certificates in this directory are added to the verification chain in addition to any certificates specified by the "ca-cert" and "phase2-ca-cert" properties. If the path provided with --system-ca-path is rather a file name (bundle of trusted CA certificates), it overrides "ca-cert" and "phase2-ca-cert" properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant).adsl settingADSL Settings.Key NameValue TypeDefault ValueValue DescriptionencapsulationstringEncapsulation of ADSL connection. Can be "vcmux" or "llc".passwordstringPassword used to authenticate with the ADSL service.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)protocolstringADSL connection protocol. Can be "pppoa", "pppoe" or "ipoatm".usernamestringUsername used to authenticate with the ADSL service.vciuint320VCI of ADSL connectionvpiuint320VPI of ADSL connectionbluetooth settingBluetooth Settings.Key NameValue TypeDefault ValueValue Descriptionbdaddrbyte arrayThe Bluetooth address of the device.typestringEither "dun" for Dial-Up Networking connections or "panu" for Personal Area Networking connections to devices supporting the NAP profile.bond settingBonding Settings.Key NameValue TypeDefault ValueValue Descriptioninterface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the bond's interface name.optionsdict of string to string{'mode': 'balance-rr'}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]).bridge settingBridging Settings.Key NameValue TypeDefault ValueValue Descriptionageing-timeuint32300The Ethernet MAC address aging time, in seconds.forward-delayuint3215The Spanning Tree Protocol (STP) forwarding delay, in seconds.group-addressbyte arrayIf specified, The MAC address of the multicast group this bridge uses for STP. The address must be a link-local address in standard Ethernet MAC address format, ie an address of the form 01:80:C2:00:00:0X, with X in [0, 4..F]. If not specified the default value is 01:80:C2:00:00:00.group-forward-maskuint320A mask of group addresses to forward. Usually, group addresses in the range from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not forwarded according to standards. This property is a mask of 16 bits, each corresponding to a group address in that range that must be forwarded. The mask can't have bits 0, 1 or 2 set because they are used for STP, MAC pause frames and LACP.hello-timeuint322The Spanning Tree Protocol (STP) hello time, in seconds.interface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the bridge's interface name.mac-addressbyte arrayIf specified, the MAC address of bridge. When creating a new bridge, this MAC address will be set. If this field is left unspecified, the "ethernet.cloned-mac-address" is referred instead to generate the initial MAC address. Note that setting "ethernet.cloned-mac-address" anyway overwrites the MAC address of the bridge later while activating the bridge. Hence, this property is deprecated. Deprecated: 1max-ageuint3220The Spanning Tree Protocol (STP) maximum message age, in seconds.multicast-hash-maxuint324096Set maximum size of multicast hash table (value must be a power of 2).multicast-last-member-countuint322Set the number of queries the bridge will send before stopping forwarding a multicast group after a "leave" message has been received.multicast-last-member-intervaluint64100Set interval (in deciseconds) between queries to find remaining members of a group, after a "leave" message is received.multicast-membership-intervaluint6426000Set delay (in deciseconds) after which the bridge will leave a group, if no membership reports for this group are received.multicast-querierbooleanFALSEEnable or disable sending of multicast queries by the bridge. If not specified the option is disabled.multicast-querier-intervaluint6425500If no queries are seen after this delay (in deciseconds) has passed, the bridge will start to send its own queries.multicast-query-intervaluint6412500Interval (in deciseconds) between queries sent by the bridge after the end of the startup phase.multicast-query-response-intervaluint641000Set the Max Response Time/Max Response Delay (in deciseconds) for IGMP/MLD queries sent by the bridge.multicast-query-use-ifaddrbooleanFALSEIf enabled the bridge's own IP address is used as the source address for IGMP queries otherwise the default of 0.0.0.0 is used.multicast-routerstringSets bridge's multicast router. Multicast-snooping must be enabled for this option to work. Supported values are: 'auto', 'disabled', 'enabled' to which kernel assigns the numbers 1, 0, and 2, respectively. If not specified the default value is 'auto' (1).multicast-snoopingbooleanTRUEControls whether IGMP snooping is enabled for this bridge. Note that if snooping was automatically disabled due to hash collisions, the system may refuse to enable the feature until the collisions are resolved.multicast-startup-query-countuint322Set the number of IGMP queries to send during startup phase.multicast-startup-query-intervaluint643125Sets the time (in deciseconds) between queries sent out at startup to determine membership information.priorityuint3232768Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are "better"; the lowest priority bridge will be elected the root bridge.stpbooleanTRUEControls whether Spanning Tree Protocol (STP) is enabled for this bridge.vlan-default-pviduint321The default PVID for the ports of the bridge, that is the VLAN id assigned to incoming untagged frames.vlan-filteringbooleanFALSEControl whether VLAN filtering is enabled on the bridge.vlan-protocolstringIf specified, the protocol used for VLAN filtering. Supported values are: '802.1Q', '802.1ad'. If not specified the default value is '802.1Q'.vlan-stats-enabledbooleanFALSEControls whether per-VLAN stats accounting is enabled.vlansarray of vardictArray of bridge VLAN objects. In addition to the VLANs specified here, the bridge will also have the default-pvid VLAN configured by the bridge.vlan-default-pvid property. In nmcli the VLAN list can be specified with the following syntax: $vid [pvid] [untagged] [, $vid [pvid] [untagged]]... where $vid is either a single id between 1 and 4094 or a range, represented as a couple of ids separated by a dash.bridge-port settingBridge Port Settings.Key NameValue TypeDefault ValueValue Descriptionhairpin-modebooleanFALSEEnables or disables "hairpin mode" for the port, which allows frames to be sent back out through the port the frame was received on.path-costuint32100The Spanning Tree Protocol (STP) port cost for destinations via this port.priorityuint3232The Spanning Tree Protocol (STP) priority of this bridge port.vlansarray of vardictArray of bridge VLAN objects. In addition to the VLANs specified here, the port will also have the default-pvid VLAN configured on the bridge by the bridge.vlan-default-pvid property. In nmcli the VLAN list can be specified with the following syntax: $vid [pvid] [untagged] [, $vid [pvid] [untagged]]... where $vid is either a single id between 1 and 4094 or a range, represented as a couple of ids separated by a dash.cdma settingCDMA-based Mobile Broadband Settings.Key NameValue TypeDefault ValueValue Descriptionmtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.numberstringThe number to dial to establish the connection to the CDMA-based mobile broadband network, if any. If not specified, the default number (#777) is used when required.passwordstringThe password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)usernamestringThe username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.dcb settingData Center Bridging Settings.Key NameValue TypeDefault ValueValue Descriptionapp-fcoe-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for the DCB FCoE application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).app-fcoe-modestringThe FCoE controller mode; either "fabric" or "vn2vn". Since 1.34, NULL is the default and means "fabric". Before 1.34, NULL was rejected as invalid and the default was "fabric".app-fcoe-priorityint32-1The highest User Priority (0 - 7) which FCoE frames should use, or -1 for default priority. Only used when the "app-fcoe-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.app-fip-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for the DCB FIP application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).app-fip-priorityint32-1The highest User Priority (0 - 7) which FIP frames should use, or -1 for default priority. Only used when the "app-fip-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.app-iscsi-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for the DCB iSCSI application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).app-iscsi-priorityint32-1The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for default priority. Only used when the "app-iscsi-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.priority-bandwidtharray of uint32An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents.priority-flow-controlarray of uint32An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause.priority-flow-control-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).priority-group-bandwidtharray of uint32An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents.priority-group-flagsNMSettingDcbFlags (uint32)Specifies the NMSettingDcbFlags for DCB Priority Groups. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).priority-group-idarray of uint32An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group.priority-strict-bandwidtharray of uint32An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group.priority-traffic-classarray of uint32An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped.dummy settingDummy Link Settings.Key NameValue TypeDefault ValueValue Descriptionethtool settingEthtool Ethernet Settings.Key NameValue TypeDefault ValueValue Descriptiongeneric settingGeneric Link Settings.Key NameValue TypeDefault ValueValue Descriptiongsm settingGSM-based Mobile Broadband Settings.Key NameValue TypeDefault ValueValue DescriptionapnstringThe GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan. The APN may only be composed of the characters a-z, 0-9, ., and - per GSM 03.60 Section 14.9.auto-configbooleanFALSEWhen TRUE, the settings such as APN, username, or password will default to values that match the network the modem will register to in the Mobile Broadband Provider database.device-idstringThe device unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will only apply to the specified device.home-onlybooleanFALSEWhen TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made.mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.network-idstringThe Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible.numberstringLegacy setting that used to help establishing PPP data sessions for GSM-based modems. Deprecated: 1passwordstringThe password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)pinstringIf the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device.pin-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "pin" property. (see for flag values)sim-idstringThe SIM card unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" which contains a SIM card matching the given identifier.sim-operator-idstringA MCC/MNC string like "310260" or "21601" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" and "sim-id" which contains a SIM card provisioned by the given operator.usernamestringThe username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.infiniband settingInfiniband Settings.Key NameValue TypeDefault ValueValue Descriptionmac-addressbyte arrayIf 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).mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.p-keyint32-1The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key.parentstringThe interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address".transport-modestringThe IP-over-InfiniBand transport mode. Either "datagram" or "connected".ipv4 settingIPv4 Settings.Key NameValue TypeDefault ValueValue Descriptionaddress-dataarray of vardictArray of IPv4 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses.addressesarray of array of uint32Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv4 address structures. Each IPv4 address structure is composed of 3 32-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 - 32), and last the IPv4 gateway (network byte order). The gateway may be left as 0 if no gateway exists for that subnet.dad-timeoutint32-1Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4.dhcp-client-idstringA string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0. The special values "mac" and "perm-mac" are supported, which use the current or permanent MAC address of the device to generate a client identifier with type ethernet (01). Currently, these options only work for ethernet type of links. The special value "ipv6-duid" uses the DUID from "ipv6.dhcp-duid" property as an RFC4361-compliant client identifier. As IAID it uses "ipv4.dhcp-iaid" and falls back to "ipv6.dhcp-iaid" if unset. The special value "duid" generates a RFC4361-compliant client identifier based on "ipv4.dhcp-iaid" and uses a DUID generated by hashing /etc/machine-id. The special value "stable" is supported to generate a type 0 client identifier based on the stable-id (see connection.stable-id) and a per-host key. If you set the stable-id, you may want to include the "${DEVICE}" or "${MAC}" specifier to get a per-device key. If unset, a globally configured default is used. If still unset, the default depends on the DHCP plugin.dhcp-fqdnstringIf the "dhcp-send-hostname" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and "dhcp-hostname" are mutually exclusive and cannot be set at the same time.dhcp-hostnamestringIf the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time.dhcp-hostname-flagsuint320Flags for the DHCP hostname and FQDN. Currently, this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default is looked up in NetworkManager configuration. If that value is unset or also NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described above are sent in the DHCP requests.dhcp-iaidstringA string containing the "Identity Association Identifier" (IAID) used by the DHCP client. The property is a 32-bit decimal value or a special value among "mac", "perm-mac", "ifname" and "stable". When set to "mac" (or "perm-mac"), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to "ifname", the IAID is computed by hashing the interface name. The special value "stable" can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be "ifname". Note that at the moment this property is ignored for IPv6 by dhclient, which always derives the IAID from the MAC address.dhcp-reject-serversarray of stringArray of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers. For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. "192.168.122.0/24"). This property is currently not implemented for DHCPv6.dhcp-send-hostnamebooleanTRUEIf TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.dhcp-timeoutint320A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.dhcp-vendor-class-identifierstringThe Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server. Since 1.28dnsarray of uint32Array of IP addresses of DNS servers (as network-byte-order integers)dns-optionsarray of stringArray of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are "attempts", "debug", "edns0", "inet6", "ip6-bytestring", "ip6-dotint", "ndots", "no-check-names", "no-ip6-dotint", "no-reload", "no-tld-query", "rotate", "single-request", "single-request-reopen", "timeout", "trust-ad", "use-vc". The "trust-ad" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have "trust-ad" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then "edns0" and "trust-ad" are automatically added.dns-priorityint320DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the "rotate" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.dns-searcharray of stringArray of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.gatewaystringThe gateway associated with this configuration. This is only meaningful if "addresses" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with "never-default" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.ignore-auto-dnsbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the "dns" and "dns-search" properties, if any, are used.ignore-auto-routesbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used.may-failbooleanTRUEIf TRUE, allow overall network configuration to proceed even if the configuration specified by this property 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 on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.methodstringIP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "disabled", "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration. The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.never-defaultbooleanFALSEIf TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.required-timeoutint32-1The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).route-dataarray of vardictArray of IPv4 routes. Each route dictionary contains at least 'dest' and 'prefix' entries, containing the destination IP address as a string, and the prefix length as a uint32. Most routes will also have a 'next-hop' entry, containing the next hop IP address as a string. If the route has a 'metric' entry (containing a uint32), that will be used as the metric for the route (otherwise NM will pick a default value appropriate to the device). Additional attributes may also exist on some routes.route-metricint64-1The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.route-tableuint320Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.routesarray of array of uint32Deprecated in favor of the 'route-data' property, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'route-data'. Array of IPv4 route structures. Each IPv4 route structure is composed of 4 32-bit values; the first being the destination IPv4 network or address (network byte order), the second the destination network or address prefix (1 - 32), the third being the next-hop (network byte order) if any, and the fourth being the route metric. If the metric is 0, NM will choose an appropriate default metric for the device. (There is no way to explicitly specify an actual metric of 0 with this property.)ipv6 settingIPv6 Settings.Key NameValue TypeDefault ValueValue Descriptionaddr-gen-modeint321Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 (0) or NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1). If the property is set to EUI64, the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of stable-privacy enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling stable-privacy. For keyfile plugin, the absence of the setting on disk means EUI64 so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by "ip6-privacy" property and it does not affect the temporary addresses configured with this option.address-dataarray of vardictArray of IPv6 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses.addressesarray of legacy IPv6 address struct (a(ayuay))Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv6 address structures. Each IPv6 address structure is composed of an IPv6 address, a prefix length (1 - 128), and an IPv6 gateway address. The gateway may be zeroed out if no gateway exists for that subnet.dad-timeoutint32-1Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4.dhcp-duidstringA string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried in the Client Identifier option. If the property is a hex string ('aa:bb:cc') it is interpreted as a binary DUID and filled as an opaque value in the Client Identifier option. The special value "lease" will retrieve the DUID previously used from the lease file belonging to the connection. If no DUID is found and "dhclient" is the configured dhcp client, the DUID is searched in the system-wide dhclient lease file. If still no DUID is found, or another dhcp client is used, a global and permanent DUID-UUID (RFC 6355) will be generated based on the machine-id. The special values "llt" and "ll" will generate a DUID of type LLT or LL (see RFC 3315) based on the current MAC address of the device. In order to try providing a stable DUID-LLT, the time field will contain a constant timestamp that is used globally (for all profiles) and persisted to disk. The special values "stable-llt", "stable-ll" and "stable-uuid" will generate a DUID of the corresponding type, derived from the connection's stable-id and a per-host unique key. You may want to include the "${DEVICE}" or "${MAC}" specifier in the stable-id, in case this profile gets activated on multiple devices. So, the link-layer address of "stable-ll" and "stable-llt" will be a generated address derived from the stable id. The DUID-LLT time value in the "stable-llt" option will be picked among a static timespan of three years (the upper bound of the interval is the same constant timestamp used in "llt"). When the property is unset, the global value provided for "ipv6.dhcp-duid" is used. If no global value is provided, the default "lease" value is assumed.dhcp-hostnamestringIf the "dhcp-send-hostname" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and "dhcp-fqdn" are mutually exclusive and cannot be set at the same time.dhcp-hostname-flagsuint320Flags for the DHCP hostname and FQDN. Currently, this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default is looked up in NetworkManager configuration. If that value is unset or also NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described above are sent in the DHCP requests.dhcp-iaidstringA string containing the "Identity Association Identifier" (IAID) used by the DHCP client. The property is a 32-bit decimal value or a special value among "mac", "perm-mac", "ifname" and "stable". When set to "mac" (or "perm-mac"), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to "ifname", the IAID is computed by hashing the interface name. The special value "stable" can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be "ifname". Note that at the moment this property is ignored for IPv6 by dhclient, which always derives the IAID from the MAC address.dhcp-reject-serversarray of stringArray of servers from which DHCP offers must be rejected. This property is useful to avoid getting a lease from misconfigured or rogue servers. For DHCPv4, each element must be an IPv4 address, optionally followed by a slash and a prefix length (e.g. "192.168.122.0/24"). This property is currently not implemented for DHCPv6.dhcp-send-hostnamebooleanTRUEIf TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the "dhcp-hostname" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.dhcp-timeoutint320A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.dnsarray of byte arrayArray of IP addresses of DNS servers (in network byte order)dns-optionsarray of stringArray of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are "attempts", "debug", "edns0", "inet6", "ip6-bytestring", "ip6-dotint", "ndots", "no-check-names", "no-ip6-dotint", "no-reload", "no-tld-query", "rotate", "single-request", "single-request-reopen", "timeout", "trust-ad", "use-vc". The "trust-ad" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have "trust-ad" enabled. When using a caching DNS plugin (dnsmasq or systemd-resolved in NetworkManager.conf) then "edns0" and "trust-ad" are automatically added.dns-priorityint320DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the "rotate" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.dns-searcharray of stringArray of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.gatewaystringThe gateway associated with this configuration. This is only meaningful if "addresses" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with "never-default" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.ignore-auto-dnsbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the "dns" and "dns-search" properties, if any, are used.ignore-auto-routesbooleanFALSEWhen "method" is set to "auto" and this property to TRUE, automatically configured routes are ignored and only routes specified in the "routes" property, if any, are used.ip6-privacyNMSettingIP6ConfigPrivacy (int32)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: -1: unknown, 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses). Having a per-connection setting set to "-1" (unknown) means fallback to global configuration "ipv6.ip6-privacy". If also global configuration is unspecified or set to "-1", fallback to read "/proc/sys/net/ipv6/conf/default/use_tempaddr". Note that this setting is distinct from the Stable Privacy addresses that can be enabled with the "addr-gen-mode" property's "stable-privacy" setting as another way of avoiding host tracking with IPv6 addresses.may-failbooleanTRUEIf TRUE, allow overall network configuration to proceed even if the configuration specified by this property 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 on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.methodstringIP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "disabled", "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration. The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.never-defaultbooleanFALSEIf TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.ra-timeoutint320A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity.required-timeoutint32-1The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).route-dataarray of vardictArray of IPv6 routes. Each route dictionary contains at least 'dest' and 'prefix' entries, containing the destination IP address as a string, and the prefix length as a uint32. Most routes will also have a 'next-hop' entry, containing the next hop IP address as a string. If the route has a 'metric' entry (containing a uint32), that will be used as the metric for the route (otherwise NM will pick a default value appropriate to the device). Additional attributes may also exist on some routes.route-metricint64-1The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.route-tableuint320Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.routesarray of legacy IPv6 route struct (a(ayuayu))Deprecated in favor of the 'route-data' property, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'route-data'. Array of IPv6 route structures. Each IPv6 route structure is composed of an IPv6 address, a prefix length (1 - 128), an IPv6 next hop address (which may be zeroed out if there is no next hop), and a metric. If the metric is 0, NM will choose an appropriate default metric for the device.tokenstringConfigure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode.ip-tunnel settingIP Tunneling Settings.Key NameValue TypeDefault ValueValue Descriptionencapsulation-limituint320How many additional levels of encapsulation are permitted to be prepended to packets. This property applies only to IPv6 tunnels.flagsuint320Tunnel flags. Currently, the following values are supported: NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT (0x1), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS (0x2), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL (0x4), NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV (0x8), NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY (0x10), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK (0x20). They are valid only for IPv6 tunnels.flow-labeluint320The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels.input-keystringThe key used for tunnel input packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used.localstringThe local endpoint of the tunnel; the value can be empty, otherwise it must contain an IPv4 or IPv6 address.modeuint320The tunneling mode, for example NM_IP_TUNNEL_MODE_IPIP (1) or NM_IP_TUNNEL_MODE_GRE (2).mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments.output-keystringThe key used for tunnel output packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used.parentstringIf given, specifies the parent interface name or parent connection UUID the new device will be bound to so that tunneled packets will only be routed via that interface.path-mtu-discoverybooleanTRUEWhether to enable Path MTU Discovery on this tunnel.remotestringThe remote endpoint of the tunnel; the value must contain an IPv4 or IPv6 address.tosuint320The type of service (IPv4) or traffic class (IPv6) field to be set on tunneled packets.ttluint320The TTL to assign to tunneled packets. 0 is a special value meaning that packets inherit the TTL value.macsec settingMACSec Settings.Key NameValue TypeDefault ValueValue DescriptionencryptbooleanTRUEWhether the transmitted traffic must be encrypted.mka-cakstringThe pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement.mka-cak-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "mka-cak" property. (see for flag values)mka-cknstringThe pre-shared CKN (Connectivity-association Key Name) for MACsec Key Agreement.modeint320Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key Agreement) is obtained.parentstringIf given, specifies the parent interface name or parent connection UUID from which this MACSEC interface should be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property.portint321The port component of the SCI (Secure Channel Identifier), between 1 and 65534.send-scibooleanTRUESpecifies whether the SCI (Secure Channel Identifier) is included in every packet.validationint322Specifies the validation mode for incoming frames.macvlan settingMAC VLAN Settings.Key NameValue TypeDefault ValueValue Descriptionmodeuint320The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device.parentstringIf given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property.promiscuousbooleanTRUEWhether the interface should be put in promiscuous mode.tapbooleanFALSEWhether the interface should be a MACVTAP.match settingMatch settings.Key NameValue TypeDefault ValueValue Descriptiondriverarray of stringA list of driver names to match. Each element is a shell wildcard pattern. See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\\' are used for optional and mandatory matches and inverting the pattern.interface-namearray of stringA list of interface names to match. Each element is a shell wildcard pattern. An element can be prefixed with a pipe symbol (|) or an ampersand (&). The former means that the element is optional and the latter means that it is mandatory. If there are any optional elements, than the match evaluates to true if at least one of the optional element matches (logical OR). If there are any mandatory elements, then they all must match (logical AND). By default, an element is optional. This means that an element "foo" behaves the same as "|foo". An element can also be inverted with exclamation mark (!) between the pipe symbol (or the ampersand) and before the pattern. Note that "!foo" is a shortcut for the mandatory match "&!foo". Finally, a backslash can be used at the beginning of the element (after the optional special characters) to escape the start of the pattern. For example, "&\\!a" is an mandatory match for literally "!a".kernel-command-linearray of stringA list of kernel command line arguments to match. This may be used to check whether a specific kernel command line option is set (or unset, if prefixed with the exclamation mark). The argument must either be a single word, or an assignment (i.e. two words, joined by "="). In the former case the kernel command line is searched for the word appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is looked for with right and left hand side matching. Wildcard patterns are not supported. See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\\' are used for optional and mandatory matches and inverting the match.patharray of stringA list of paths to match against the ID_PATH udev property of devices. ID_PATH represents the topological persistent path of a device. It typically contains a subsystem string (pci, usb, platform, etc.) and a subsystem-specific identifier. For PCI devices the path has the form "pci-$domain:$bus:$device.$function", where each variable is an hexadecimal value; for example "pci-0000:0a:00.0". The path of a device can be obtained with "udevadm info /sys/class/net/$dev | grep ID_PATH=" or by looking at the "path" property exported by NetworkManager ("nmcli -f general.path device show $dev"). Each element of the list is a shell wildcard pattern. See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\\' are used for optional and mandatory matches and inverting the pattern.802-11-olpc-mesh settingOLPC Wireless Mesh Settings.Key NameValue TypeDefault ValueValue Descriptionchanneluint320Channel on which the mesh network to join is located.dhcp-anycast-addressbyte arrayAnycast DHCP MAC address used when requesting an IP address via DHCP. The specific anycast address used determines which DHCP server class answers the request. This is currently only implemented by dhclient DHCP plugin.ssidbyte arraySSID of the mesh network to join.ovs-bridge settingOvsBridge Link Settings.Key NameValue TypeDefault ValueValue Descriptiondatapath-typestringThe data path type. One of "system", "netdev" or empty.fail-modestringThe bridge failure mode. One of "secure", "standalone" or empty.mcast-snooping-enablebooleanFALSEEnable or disable multicast snooping.rstp-enablebooleanFALSEEnable or disable RSTP.stp-enablebooleanFALSEEnable or disable STP.ovs-dpdk settingOvsDpdk Link Settings.Key NameValue TypeDefault ValueValue DescriptiondevargsstringOpen vSwitch DPDK device arguments.n-rxquint320Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue.ovs-interface settingOpen vSwitch Interface Settings.Key NameValue TypeDefault ValueValue DescriptiontypestringThe interface type. Either "internal", "system", "patch", "dpdk", or empty.ovs-patch settingOvsPatch Link Settings.Key NameValue TypeDefault ValueValue DescriptionpeerstringSpecifies the name of the interface for the other side of the patch. The patch on the other side must also set this interface as peer.ovs-port settingOvsPort Link Settings.Key NameValue TypeDefault ValueValue Descriptionbond-downdelayuint320The time port must be inactive in order to be considered down.bond-modestringBonding mode. One of "active-backup", "balance-slb", or "balance-tcp".bond-updelayuint320The time port must be active before it starts forwarding traffic.lacpstringLACP mode. One of "active", "off", or "passive".taguint320The VLAN tag in the range 0-4095.vlan-modestringThe VLAN mode. One of "access", "native-tagged", "native-untagged", "trunk" or unset.ppp settingPoint-to-Point Protocol Settings.Key NameValue TypeDefault ValueValue Descriptionbauduint320If non-zero, instruct pppd to set the serial port to the specified baudrate. This value should normally be left as 0 to automatically choose the speed.crtsctsbooleanFALSEIf TRUE, specify that pppd should set the serial port to use hardware flow control with RTS and CTS signals. This value should normally be set to FALSE.lcp-echo-failureuint320If non-zero, instruct pppd to presume the connection to the peer has failed if the specified number of LCP echo-requests go unanswered by the peer. The "lcp-echo-interval" property must also be set to a non-zero value if this property is used.lcp-echo-intervaluint320If non-zero, instruct pppd to send an LCP echo-request frame to the peer every n seconds (where n is the specified value). Note that some PPP peers will respond to echo requests and some will not, and it is not possible to autodetect this.mppe-statefulbooleanFALSEIf TRUE, stateful MPPE is used. See pppd documentation for more information on stateful MPPE.mruuint320If non-zero, instruct pppd to request that the peer send packets no larger than the specified size. If non-zero, the MRU should be between 128 and 16384.mtuuint320If non-zero, instruct pppd to send packets no larger than the specified size.no-vj-compbooleanFALSEIf TRUE, Van Jacobsen TCP header compression will not be requested.noauthbooleanTRUEIf TRUE, do not require the other side (usually the PPP server) to authenticate itself to the client. If FALSE, require authentication from the remote side. In almost all cases, this should be TRUE.nobsdcompbooleanFALSEIf TRUE, BSD compression will not be requested.nodeflatebooleanFALSEIf TRUE, "deflate" compression will not be requested.refuse-chapbooleanFALSEIf TRUE, the CHAP authentication method will not be used.refuse-eapbooleanFALSEIf TRUE, the EAP authentication method will not be used.refuse-mschapbooleanFALSEIf TRUE, the MSCHAP authentication method will not be used.refuse-mschapv2booleanFALSEIf TRUE, the MSCHAPv2 authentication method will not be used.refuse-papbooleanFALSEIf TRUE, the PAP authentication method will not be used.require-mppebooleanFALSEIf TRUE, MPPE (Microsoft Point-to-Point Encryption) will be required for the PPP session. If either 64-bit or 128-bit MPPE is not available the session will fail. Note that MPPE is not used on mobile broadband connections.require-mppe-128booleanFALSEIf TRUE, 128-bit MPPE (Microsoft Point-to-Point Encryption) will be required for the PPP session, and the "require-mppe" property must also be set to TRUE. If 128-bit MPPE is not available the session will fail.pppoe settingPPP-over-Ethernet Settings.Key NameValue TypeDefault ValueValue DescriptionparentstringIf given, specifies the parent interface name on which this PPPoE connection should be created. If this property is not specified, the connection is activated on the interface specified in "interface-name" of NMSettingConnection.passwordstringPassword used to authenticate with the PPPoE service.password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "password" property. (see for flag values)servicestringIf specified, instruct PPPoE to only initiate sessions with access concentrators that provide the specified service. For most providers, this should be left blank. It is only required if there are multiple access concentrators or a specific service is known to be required.usernamestringUsername used to authenticate with the PPPoE service.proxy settingWWW Proxy Settings.Key NameValue TypeDefault ValueValue Descriptionbrowser-onlybooleanFALSEWhether the proxy configuration is for browser only.methodint320Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)pac-scriptstringPAC script for the connection.pac-urlstringPAC URL for obtaining PAC file.serial settingSerial Link Settings.Key NameValue TypeDefault ValueValue Descriptionbauduint3257600Speed to use for communication over the serial port. Note that this value usually has no effect for mobile broadband modems as they generally ignore speed settings and use the highest available speed.bitsuint328Byte-width of the serial communication. The 8 in "8n1" for example.paritybyteThe connection parity: 69 (ASCII 'E') for even parity, 111 (ASCII 'o') for odd, 110 (ASCII 'n') for none.send-delayuint640Time to delay between each byte sent to the modem, in microseconds.stopbitsuint321Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in "8n1" for example.sriov settingSR-IOV settings.Key NameValue TypeDefault ValueValue Descriptionautoprobe-driversNMTernary (int32)Whether to autoprobe virtual functions by a compatible driver. If set to NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver and if this succeeds a new network interface will be instantiated for each VF. If set to NM_TERNARY_FALSE (0), VFs will not be claimed and no network interfaces will be created for them. When set to NM_TERNARY_DEFAULT (-1), the global default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_TRUE (1).total-vfsuint320The total number of virtual functions to create. Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface (also when it is zero) during activation and resets it upon deactivation. To prevent any changes to SR-IOV parameters don't add a sriov setting to the connection.vfsarray of vardictArray of virtual function descriptors. Each VF descriptor is a dictionary mapping attribute names to GVariant values. The 'index' entry is mandatory for each VF. When represented as string a VF is in the form: "INDEX [ATTR=VALUE[ ATTR=VALUE]...]". for example: "2 mac=00:11:22:33:44:55 spoof-check=true". Multiple VFs can be specified using a comma as separator. Currently, the following attributes are supported: mac, spoof-check, trust, min-tx-rate, max-tx-rate, vlans. The "vlans" attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor has the form "ID[.PRIORITY[.PROTO]]". PROTO can be either 'q' for 802.1Q (the default) or 'ad' for 802.1ad.tc settingLinux Traffic Control Settings.Key NameValue TypeDefault ValueValue Descriptionqdiscsarray of vardictArray of TC queueing disciplines. When the "tc" setting is present, qdiscs from this property are applied upon activation. If the property is empty, all qdiscs are removed and the device will only have the default qdisc assigned by kernel according to the "net.core.default_qdisc" sysctl. If the "tc" setting is not present, NetworkManager doesn't touch the qdiscs present on the interface.tfiltersarray of vardictArray of TC traffic filters. When the "tc" setting is present, filters from this property are applied upon activation. If the property is empty, NetworkManager removes all the filters. If the "tc" setting is not present, NetworkManager doesn't touch the filters present on the interface.team settingTeaming Settings.Key NameValue TypeDefault ValueValue DescriptionconfigstringThe JSON configuration for the team network interface. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details.interface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the team's interface name.link-watchersarray of vardictLink watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-inactive', 'send-always'. See teamd.conf man for more details.mcast-rejoin-countint32-1Corresponds to the teamd mcast_rejoin.count.mcast-rejoin-intervalint32-1Corresponds to the teamd mcast_rejoin.interval.notify-peers-countint32-1Corresponds to the teamd notify_peers.count.notify-peers-intervalint32-1Corresponds to the teamd notify_peers.interval.runnerstringCorresponds to the teamd runner.name. Permitted values are: "roundrobin", "broadcast", "activebackup", "loadbalance", "lacp", "random".runner-activebooleanTRUECorresponds to the teamd runner.active.runner-agg-select-policystringCorresponds to the teamd runner.agg_select_policy.runner-fast-ratebooleanFALSECorresponds to the teamd runner.fast_rate.runner-hwaddr-policystringCorresponds to the teamd runner.hwaddr_policy.runner-min-portsint32-1Corresponds to the teamd runner.min_ports.runner-sys-prioint32-1Corresponds to the teamd runner.sys_prio.runner-tx-balancerstringCorresponds to the teamd runner.tx_balancer.name.runner-tx-balancer-intervalint32-1Corresponds to the teamd runner.tx_balancer.interval.runner-tx-hasharray of stringCorresponds to the teamd runner.tx_hash.team-port settingTeam Port Settings.Key NameValue TypeDefault ValueValue DescriptionconfigstringThe JSON configuration for the team port. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details.lacp-keyint32-1Corresponds to the teamd ports.PORTIFNAME.lacp_key.lacp-prioint32-1Corresponds to the teamd ports.PORTIFNAME.lacp_prio.link-watchersarray of vardictLink watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-inactive', 'send-always'. See teamd.conf man for more details.prioint320Corresponds to the teamd ports.PORTIFNAME.prio.queue-idint32-1Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the parameter is skipped from the json config.stickybooleanFALSECorresponds to the teamd ports.PORTIFNAME.sticky.tun settingTunnel Settings.Key NameValue TypeDefault ValueValue DescriptiongroupstringThe group ID which will own the device. If set to NULL everyone will be able to use the device.modeuint321The operating mode of the virtual device. Allowed values are NM_SETTING_TUN_MODE_TUN (1) to create a layer 3 device and NM_SETTING_TUN_MODE_TAP (2) to create an Ethernet-like layer 2 one.multi-queuebooleanFALSEIf the property is set to TRUE, the interface will support multiple file descriptors (queues) to parallelize packet sending or receiving. Otherwise, the interface will only support a single queue.ownerstringThe user ID which will own the device. If set to NULL everyone will be able to use the device.pibooleanFALSEIf TRUE the interface will prepend a 4 byte header describing the physical interface to the packets.vnet-hdrbooleanFALSEIf TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network header.user settingGeneral User Profile Settings.Key NameValue TypeDefault ValueValue Descriptiondatadict of string to string{}A dictionary of key/value pairs with user data. This data is ignored by NetworkManager and can be used at the users discretion. The keys only support a strict ascii format, but the values can be arbitrary UTF8 strings up to a certain length.vlan settingVLAN Settings.Key NameValue TypeDefault ValueValue Descriptionegress-priority-maparray of stringFor 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".flagsNMVlanFlags (uint32)One or more flags which control the behavior and features of the VLAN interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of output packet headers), NM_VLAN_FLAG_GVRP (0x2) (use of the GVRP protocol), and NM_VLAN_FLAG_LOOSE_BINDING (0x4) (loose binding of the interface to its master device's operating state). NM_VLAN_FLAG_MVRP (0x8) (use of the MVRP protocol). The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0.iduint320The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095.ingress-priority-maparray of stringFor 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".interface-namestringDeprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the vlan's interface name.parentstringIf 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 an "802-3-ethernet" setting with a "mac-address" property.vpn settingVPN Settings.Key NameValue TypeDefault ValueValue Descriptiondatadict of string to string{}Dictionary of key/value pairs of VPN plugin specific data. Both keys and values must be strings.persistentbooleanFALSEIf the VPN service supports persistence, and this property is TRUE, the VPN will attempt to stay connected across link changes and outages, until explicitly disconnected.secretsdict of string to string{}Dictionary of key/value pairs of VPN plugin specific secrets like passwords or private keys. Both keys and values must be strings.service-typestringD-Bus service name of the VPN plugin that this setting uses to connect to its network. i.e. org.freedesktop.NetworkManager.vpnc for the vpnc plugin.timeoutuint320Timeout for the VPN service to establish the connection. Some services may take quite a long time to connect. Value of 0 means a default timeout, which is 60 seconds (unless overridden by vpn.timeout in configuration file). Values greater than zero mean timeout in seconds.user-namestringIf 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.vrf settingVRF settings.Key NameValue TypeDefault ValueValue Descriptiontableuint320The routing table for this VRF.vxlan settingVXLAN Settings.Key NameValue TypeDefault ValueValue Descriptionageinguint32300Specifies the lifetime in seconds of FDB entries learnt by the kernel.destination-portuint328472Specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.iduint320Specifies the VXLAN Network Identifier (or VXLAN Segment Identifier) to use.l2-missbooleanFALSESpecifies whether netlink LL ADDR miss notifications are generated.l3-missbooleanFALSESpecifies whether netlink IP ADDR miss notifications are generated.learningbooleanTRUESpecifies whether unknown source link layer addresses and IP addresses are entered into the VXLAN device forwarding database.limituint320Specifies the maximum number of FDB entries. A value of zero means that the kernel will store unlimited entries.localstringIf given, specifies the source IP address to use in outgoing packets.parentstringIf given, specifies the parent interface name or parent connection UUID.proxybooleanFALSESpecifies whether ARP proxy is turned on.remotestringSpecifies the unicast destination IP address to use in outgoing packets when the destination link layer address is not known in the VXLAN device forwarding database, or the multicast IP address to join.rscbooleanFALSESpecifies whether route short circuit is turned on.source-port-maxuint320Specifies the maximum UDP source port to communicate to the remote VXLAN tunnel endpoint.source-port-minuint320Specifies the minimum UDP source port to communicate to the remote VXLAN tunnel endpoint.tosuint320Specifies the TOS value to use in outgoing packets.ttluint320Specifies the time-to-live value to use in outgoing packets.wifi-p2p settingWi-Fi P2P Settings.Key NameValue TypeDefault ValueValue DescriptionpeerstringThe P2P device that should be connected to. Currently, this is the only way to create or join a group.wfd-iesbyte arrayThe Wi-Fi Display (WFD) Information Elements (IEs) to set. Wi-Fi Display requires a protocol specific information element to be set in certain Wi-Fi frames. These can be specified here for the purpose of establishing a connection. This setting is only useful when implementing a Wi-Fi Display client.wps-methoduint320Flags indicating which mode of WPS is to be used. There's little point in changing the default setting as NetworkManager will automatically determine the best method to use.wimax settingWiMax Settings.Key NameValue TypeDefault ValueValue Descriptionmac-addressbyte arrayIf specified, this connection will only apply to the WiMAX device whose MAC address matches. This property does not change the MAC address of the device (known as MAC spoofing). Deprecated: 1network-namestringNetwork Service Provider (NSP) name of the WiMAX network this connection should use. Deprecated: 1802-3-ethernet settingWired Ethernet Settings.Key NameValue TypeDefault ValueValue Descriptionaccept-all-mac-addressesNMTernary (int32)When TRUE, setup the interface to accept packets for all MAC addresses. This is enabling the kernel interface flag IFF_PROMISC. When FALSE, the interface will only accept the packets with the interface destination mac address or broadcast.assigned-mac-addressstringThe new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values "preserve", "permanent", "random" or "stable". This field replaces the deprecated "cloned-mac-address" on D-Bus, which can only contain explicit hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".auto-negotiatebooleanFALSEWhen TRUE, enforce auto-negotiation of speed and duplex mode. If "speed" and "duplex" properties are both specified, only that single mode will be advertised and accepted during the link auto-negotiation process: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. When FALSE, "speed" and "duplex" properties should be both set or link configuration will be skipped.cloned-mac-addressbyte arrayThis D-Bus field is deprecated in favor of "assigned-mac-address" which is more flexible and allows specifying special variants like "random". For libnm and nmcli, this field is called "cloned-mac-address".duplexstringWhen a value is set, either "half" or "full", configures the device to use the specified duplex mode. If "auto-negotiate" is "yes" the specified duplex mode will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. If the value is unset (the default), the link configuration will be either skipped (if "auto-negotiate" is "no", the default) or will be auto-negotiated (if "auto-negotiate" is "yes") and the local device will advertise all the supported duplex modes. Must be set together with the "speed" property if specified. Before specifying a duplex mode be sure your device supports it.generate-mac-address-maskstringWith "cloned-mac-address" setting "random" or "stable", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the "random" or "stable" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00" will create a fully scrambled MAC address, randomly locally or globally administered.mac-addressbyte arrayIf specified, this connection will only apply to the Ethernet device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).mac-address-blacklistarray of stringIf specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.portstringSpecific port type to use if the device supports multiple attachment methods. One of "tp" (Twisted Pair), "aui" (Attachment Unit Interface), "bnc" (Thin Ethernet) or "mii" (Media Independent Interface). If the device supports only one port type, this setting is ignored.s390-nettypestrings390 network device type; one of "qeth", "lcs", or "ctc", representing the different types of virtual network devices available on s390 systems.s390-optionsdict of string to string{}Dictionary of key/value pairs of s390-specific device options. Both keys and values must be strings. Allowed keys include "portno", "layer2", "portname", "protocol", among others. Key names must contain only alphanumeric characters (ie, [a-zA-Z0-9]). Currently, NetworkManager itself does nothing with this information. However, s390utils ships a udev rule which parses this information and applies it to the interface.s390-subchannelsarray of stringIdentifies specific subchannels that this network device uses for communication with z/VM or s390 host. Like the "mac-address" property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character.speeduint320When a value greater than 0 is set, configures the device to use the specified speed. If "auto-negotiate" is "yes" the specified speed will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabit speeds, as in this case link negotiation is mandatory. If the value is unset (0, the default), the link configuration will be either skipped (if "auto-negotiate" is "no", the default) or will be auto-negotiated (if "auto-negotiate" is "yes") and the local device will advertise all the supported speeds. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the "duplex" property when non-zero. Before specifying a speed value be sure your device supports it.wake-on-lanuint321The NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST (0x4), NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST (0x8), NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST (0x10), NM_SETTING_WIRED_WAKE_ON_LAN_ARP (0x20), NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC (0x40) or the special values NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager).wake-on-lan-passwordstringIf specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If NULL, no password will be required.wireguard settingWireGuard Settings.Key NameValue TypeDefault ValueValue Descriptionfwmarkuint320The use of fwmark is optional and is by default off. Setting it to 0 disables it. Otherwise, it is a 32-bit fwmark for outgoing packets. Note that "ip4-auto-default-route" or "ip6-auto-default-route" enabled, implies to automatically choose a fwmark.ip4-auto-default-routeNMTernary (int32)Whether to enable special handling of the IPv4 default route. If enabled, the IPv4 default route from wireguard.peer-routes will be placed to a dedicated routing-table and two policy routing rules will be added. The fwmark number is also used as routing-table for the default-route, and if fwmark is zero, an unused fwmark/table is chosen automatically. This corresponds to what wg-quick does with Table=auto and what WireGuard calls "Improved Rule-based Routing". Note that for this automatism to work, you usually don't want to set ipv4.gateway, because that will result in a conflicting default route. Leaving this at the default will enable this option automatically if ipv4.never-default is not set and there are any peers that use a default-route as allowed-ips.ip6-auto-default-routeNMTernary (int32)Like ip4-auto-default-route, but for the IPv6 default route.listen-portuint320The listen-port. If listen-port is not specified, the port will be chosen randomly when the interface comes up.mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments. If zero a default MTU is used. Note that contrary to wg-quick's MTU setting, this does not take into account the current routes at the time of activation.peer-routesbooleanTRUEWhether to automatically add routes for the AllowedIPs ranges of the peers. If TRUE (the default), NetworkManager will automatically add routes in the routing tables according to ipv4.route-table and ipv6.route-table. Usually you want this automatism enabled. If FALSE, no such routes are added automatically. In this case, the user may want to configure static routes in ipv4.routes and ipv6.routes, respectively. Note that if the peer's AllowedIPs is "0.0.0.0/0" or "::/0" and the profile's ipv4.never-default or ipv6.never-default setting is enabled, the peer route for this peer won't be added automatically.peersarray of 'a{sv}'Array of dictionaries for the WireGuard peers.private-keystringThe 256 bit private-key in base64 encoding.private-key-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "private-key" property. (see for flag values)802-11-wireless settingWi-Fi Settings.Key NameValue TypeDefault ValueValue Descriptionap-isolationNMTernary (int32)Configures AP isolation, which prevents communication between wireless devices connected to this AP. This property can be set to a value different from NM_TERNARY_DEFAULT (-1) only when the interface is configured in AP mode. If set to NM_TERNARY_TRUE (1), devices are not able to communicate with each other. This increases security because it protects devices against attacks from other clients in the network. At the same time, it prevents devices to access resources on the same wireless networks as file shares, printers, etc. If set to NM_TERNARY_FALSE (0), devices can talk to each other. When set to NM_TERNARY_DEFAULT (-1), the global default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_FALSE (0).assigned-mac-addressstringThe new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values "preserve", "permanent", "random" or "stable". This field replaces the deprecated "cloned-mac-address" on D-Bus, which can only contain explicit hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address".bandstring802.11 frequency band of the network. One of "a" for 5GHz 802.11a or "bg" for 2.4GHz 802.11. This will lock associations to the Wi-Fi network to the specific band, i.e. if "a" is specified, the device will not associate with the same network in the 2.4GHz band even if the network's settings are compatible. This setting depends on specific driver capability and may not work with all drivers.bssidbyte arrayIf specified, directs the device to only associate with the given access point. This capability is highly driver dependent and not supported by all devices. Note: this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future.channeluint320Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the "band" property to be set.cloned-mac-addressbyte arrayThis D-Bus field is deprecated in favor of "assigned-mac-address" which is more flexible and allows specifying special variants like "random". For libnm and nmcli, this field is called "cloned-mac-address".generate-mac-address-maskstringWith "cloned-mac-address" setting "random" or "stable", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the "random" or "stable" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00" will create a fully scrambled MAC address, randomly locally or globally administered.hiddenbooleanFALSEIf TRUE, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode. In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. In AP mode, the created network does not broadcast its SSID. Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air.mac-addressbyte arrayIf specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).mac-address-blacklistarray of stringA list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg "00:11:22:33:44:55").mac-address-randomizationuint320One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1modestringWi-Fi network mode; one of "infrastructure", "mesh", "adhoc" or "ap". If blank, infrastructure is assumed.mtuuint320If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.powersaveuint320One of NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2) (disable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3) (enable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1) (don't touch currently configure setting) or NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0) (use the globally configured value). All other values are reserved.rateuint320If non-zero, directs the device to only use the specified bitrate for communication with the access point. Units are in Kb/s, ie 5500 = 5.5 Mbit/s. This property is highly driver dependent and not all devices support setting a static bitrate.securityThis property is deprecated, but can be set to the value '802-11-wireless-security' when a wireless security setting is also present in the connection dictionary, for compatibility with very old NetworkManager daemons.seen-bssidsarray of stringA list of BSSIDs (each BSSID formatted as a MAC address like "00:11:22:33:44:55") that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved.ssidbyte arraySSID of the Wi-Fi network. Must be specified.tx-poweruint320If non-zero, directs the device to use the specified transmit power. Units are dBm. This property is highly driver dependent and not all devices support setting a static transmit power.wake-on-wlanuint321The NMSettingWirelessWakeOnWLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY (0x2), NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT (0x4), NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC (0x8), NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE (0x10), NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST (0x20), NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE (0x40), NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE (0x80), NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP (0x100) or the special values NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager).802-11-wireless-security settingWi-Fi Security Settings.Key NameValue TypeDefault ValueValue Descriptionauth-algstringWhen WEP is used (ie, key-mgmt = "none" or "ieee8021x") indicate the 802.11 authentication algorithm required by the AP here. One of "open" for Open System, "shared" for Shared Key, or "leap" for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = "ieee8021x" and auth-alg = "leap") the "leap-username" and "leap-password" properties must be specified.filsint320Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_FILS_DISABLE (1) (disable FILS), NM_SETTING_WIRELESS_SECURITY_FILS_OPTIONAL (2) (enable FILS if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_FILS_REQUIRED (3) (enable FILS and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_FILS_DEFAULT (0) and no global default is set, FILS will be optionally enabled.grouparray of stringA list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "wep40", "wep104", "tkip", or "ccmp".key-mgmtstringKey management used for the connection. One of "none" (WEP or no password protection), "ieee8021x" (Dynamic WEP), "owe" (Opportunistic Wireless Encryption), "wpa-psk" (WPA2 + WPA3 personal), "sae" (WPA3 personal only), "wpa-eap" (WPA2 + WPA3 enterprise) or "wpa-eap-suite-b-192" (WPA3 enterprise only). This property must be set for any Wi-Fi connection that uses security.leap-passwordstringThe login password for legacy LEAP connections (ie, key-mgmt = "ieee8021x" and auth-alg = "leap").leap-password-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "leap-password" property. (see for flag values)leap-usernamestringThe login username for legacy LEAP connections (ie, key-mgmt = "ieee8021x" and auth-alg = "leap").pairwisearray of stringA list of pairwise encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "tkip" or "ccmp".pmfint320Indicates whether Protected Management Frames (802.11w) must be enabled for the connection. One of NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT (0) (use global default value), NM_SETTING_WIRELESS_SECURITY_PMF_DISABLE (1) (disable PMF), NM_SETTING_WIRELESS_SECURITY_PMF_OPTIONAL (2) (enable PMF if the supplicant and the access point support it) or NM_SETTING_WIRELESS_SECURITY_PMF_REQUIRED (3) (enable PMF and fail if not supported). When set to NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT (0) and no global default is set, PMF will be optionally enabled.protoarray of stringList of strings specifying the allowed WPA protocol versions to use. Each element may be one "wpa" (allow WPA) or "rsn" (allow WPA2/RSN). If not specified, both WPA and RSN connections are allowed.pskstringPre-Shared-Key for WPA networks. For WPA-PSK, it's either an ASCII passphrase of 8 to 63 characters that is (as specified in the 802.11i standard) hashed to derive the actual key, or the key in form of 64 hexadecimal character. The WPA3-Personal networks use a passphrase of any length for SAE authentication.psk-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "psk" property. (see for flag values)wep-key-flagsNMSettingSecretFlags (uint32)Flags indicating how to handle the "wep-key0", "wep-key1", "wep-key2", and "wep-key3" properties. (see for flag values)wep-key-typeNMWepKeyType (uint32)Controls the interpretation of WEP keys. Allowed values are NM_WEP_KEY_TYPE_KEY (1), in which case the key is either a 10- or 26-character hexadecimal string, or a 5- or 13-character ASCII password; or NM_WEP_KEY_TYPE_PASSPHRASE (2), in which case the passphrase is provided as a string and will be hashed using the de-facto MD5 method to derive the actual WEP key.wep-key0stringIndex 0 WEP key. This is the WEP key used in most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-key1stringIndex 1 WEP key. This WEP index is not used by most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-key2stringIndex 2 WEP key. This WEP index is not used by most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-key3stringIndex 3 WEP key. This WEP index is not used by most networks. See the "wep-key-type" property for a description of how this key is interpreted.wep-tx-keyidxuint320When static WEP is used (ie, key-mgmt = "none") and a non-default WEP key index is used by the AP, put that WEP key index here. Valid values are 0 (default key) through 3. Note that some consumer access points (like the Linksys WRT54G) number the keys 1 - 4.wps-methoduint320Flags indicating which mode of WPS is to be used if any. There's little point in changing the default setting as NetworkManager will automatically determine whether it's feasible to start WPS enrollment from the Access Point capabilities. WPS can be disabled by setting this property to a value of 1.wpan settingIEEE 802.15.4 (WPAN) MAC Settings.Key NameValue TypeDefault ValueValue Descriptionchannelint32-1IEEE 802.15.4 channel. A positive integer or -1, meaning "do not set, use whatever the device is already set to".mac-addressstringIf specified, this connection will only apply to the IEEE 802.15.4 (WPAN) MAC layer device whose permanent MAC address matches.pageint32-1IEEE 802.15.4 channel page. A positive integer or -1, meaning "do not set, use whatever the device is already set to".pan-iduint3265535IEEE 802.15.4 Personal Area Network (PAN) identifier.short-addressuint3265535Short IEEE 802.15.4 address to be used within a restricted environment.bond-port settingBond Port Settings.Key NameValue TypeDefault ValueValue Descriptionqueue-iduint320The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.hostname settingHostname settings.Key NameValue TypeDefault ValueValue Descriptionfrom-dhcpNMTernary (int32)Whether the system hostname can be determined from DHCP on this connection. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).from-dns-lookupNMTernary (int32)Whether the system hostname can be determined from reverse DNS lookup of addresses on this device. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).only-from-defaultNMTernary (int32)If set to NM_TERNARY_TRUE (1), NetworkManager attempts to get the hostname via DHCPv4/DHCPv6 or reverse DNS lookup on this device only when the device has the default route for the given address family (IPv4/IPv6). If set to NM_TERNARY_FALSE (0), the hostname can be set from this device even if it doesn't have the default route. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_FALSE (0).priorityint320The relative priority of this connection to determine the system hostname. A lower numerical value is better (higher priority). A connection with higher priority is considered before connections with lower priority. If the value is zero, it can be overridden by a global value from NetworkManager configuration. If the property doesn't have a value in the global configuration, the value is assumed to be 100. Negative values have the special effect of excluding other connections with a greater numerical priority value; so in presence of at least one negative priority, only connections with the lowest priority value will be used to determine the hostname.ovs-external-ids settingOVS External IDs Settings.Key NameValue TypeDefault ValueValue Descriptiondatadict of string to string{}A dictionary of key/value pairs with exernal-ids for OVS.veth settingVeth Settings.Key NameValue TypeDefault ValueValue DescriptionpeerstringThis property specifies the peer interface name of the veth. This property is mandatory.Secret flag types: Each password or secret property in a setting has an associated flags property that describes how to handle that secret. The flags property is a bitfield that contains zero or more of the following values logically OR-ed together. diff --git a/man/nm-settings-docs-dbus.xml b/man/nm-settings-docs-dbus.xml index dd67f8cc..4a4f3206 100644 --- a/man/nm-settings-docs-dbus.xml +++ b/man/nm-settings-docs-dbus.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/man/nm-settings-docs-nmcli.xml b/man/nm-settings-docs-nmcli.xml index ef77cde5..39e5c064 100644 --- a/man/nm-settings-docs-nmcli.xml +++ b/man/nm-settings-docs-nmcli.xml @@ -1,4 +1,4 @@ - + Array of TC queueing disciplines. qdisc is a basic block in the Linux traffic control subsystem diff --git a/man/nm-settings-ifcfg-rh.5 b/man/nm-settings-ifcfg-rh.5 index bbdf875e..2499c8b4 100644 --- a/man/nm-settings-ifcfg-rh.5 +++ b/man/nm-settings-ifcfg-rh.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-ifcfg-rh .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Configuration -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-SETTINGS\-IFCFG\-RH" "5" "" "NetworkManager 1\&.34\&.0" "Configuration" +.TH "NM\-SETTINGS\-IFCFG\-RH" "5" "" "NetworkManager 1\&.35\&.90" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -3307,7 +3307,7 @@ DEFAULTKEY T}:T{ 1 T}:T{ -Index of active WEP key\&.\fB +Index of active WEP key\&. Note that in ifcfg format the index starts counting at 1, while NetworkManager API otherwise is zero based\&.\fB Allowed values: \fR1, 2, 3, 4 T} diff --git a/man/nm-settings-ifcfg-rh.xml b/man/nm-settings-ifcfg-rh.xml index 730cb103..38fa2260 100644 --- a/man/nm-settings-ifcfg-rh.xml +++ b/man/nm-settings-ifcfg-rh.xml @@ -1,6 +1,6 @@ -nm-settings-ifcfg-rhNetworkManager developersnm-settings-ifcfg-rh5NetworkManagerConfiguration1.34.0nm-settings-ifcfg-rhDescription of ifcfg-rh settings pluginDescription +nm-settings-ifcfg-rhNetworkManager developersnm-settings-ifcfg-rh5NetworkManagerConfiguration1.35.90nm-settings-ifcfg-rhDescription of ifcfg-rh settings pluginDescription NetworkManager is based on the concept of connection profiles that contain network configuration (see nm-settings5 for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing @@ -449,7 +449,7 @@ Allowed values: "qeth", "lcs" or "ctc"ETHTOOL_OPTS="wol gs sopass 00:11:22:33:44:55"accept-all-mac-addressesACCEPT_ALL_MAC_ADDRESSESEnforce the interface to accept all the packets.wireguard settingPropertyIfcfg-rh VariableDefaultDescription
802-11-wireless-security settingPropertyIfcfg-rh VariableDefaultDescriptionkey-mgmtKEY_MGMT(+)Key management method. -Allowed values: none, ieee8021x, owe, wpa-psk, sae, wpa-eap, wpa-eap-suite-b-192wep-tx-keyidxDEFAULTKEY1Index of active WEP key. +Allowed values: none, ieee8021x, owe, wpa-psk, sae, wpa-eap, wpa-eap-suite-b-192wep-tx-keyidxDEFAULTKEY1Index of active WEP key. Note that in ifcfg format the index starts counting at 1, while NetworkManager API otherwise is zero based. Allowed values: 1, 2, 3, 4auth-algSECURITYMODE(+)Authentication algorithm for WEP. diff --git a/man/nm-settings-keyfile.5 b/man/nm-settings-keyfile.5 index e1f94725..17857d72 100644 --- a/man/nm-settings-keyfile.5 +++ b/man/nm-settings-keyfile.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-keyfile .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Configuration -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-SETTINGS\-KEYFILE" "5" "" "NetworkManager 1\&.34\&.0" "Configuration" +.TH "NM\-SETTINGS\-KEYFILE" "5" "" "NetworkManager 1\&.35\&.90" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-settings-keyfile.xml b/man/nm-settings-keyfile.xml index 5df83827..b1c94efd 100644 --- a/man/nm-settings-keyfile.xml +++ b/man/nm-settings-keyfile.xml @@ -1,6 +1,6 @@ -nm-settings-keyfileNetworkManager developersnm-settings-keyfile5NetworkManagerConfiguration1.34.0nm-settings-keyfileDescription of keyfile settings pluginDescription +nm-settings-keyfileNetworkManager developersnm-settings-keyfile5NetworkManagerConfiguration1.35.90nm-settings-keyfileDescription of keyfile settings pluginDescription NetworkManager is based on the concept of connection profiles that contain network configuration (see nm-settings5 for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing diff --git a/man/nm-settings-nmcli.5 b/man/nm-settings-nmcli.5 index b290f8a5..1184a518 100644 --- a/man/nm-settings-nmcli.5 +++ b/man/nm-settings-nmcli.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-nmcli .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Configuration -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NM\-SETTINGS\-NMCLI" "5" "" "NetworkManager 1\&.34\&.0" "Configuration" +.TH "NM\-SETTINGS\-NMCLI" "5" "" "NetworkManager 1\&.35\&.90" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -2372,6 +2372,13 @@ Open vSwitch DPDK device arguments\&. .sp Format: string .RE +.PP +\fBn\-rxq\fR +.RS 4 +Open vSwitch DPDK number of rx queues\&. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue\&. +.sp +Format: uint32 +.RE .SS "ovs\-interface setting" .PP Open vSwitch Interface Settings\&. diff --git a/man/nm-settings-nmcli.xml b/man/nm-settings-nmcli.xml index 12e11822..d2adf5c6 100644 --- a/man/nm-settings-nmcli.xml +++ b/man/nm-settings-nmcli.xml @@ -1,6 +1,6 @@ -nm-settings-nmcliNetworkManager developersnm-settings-nmcli5NetworkManagerConfiguration1.34.0nm-settings-nmcliDescription of settings and properties of NetworkManager connection profiles for nmcliDescription +nm-settings-nmcliNetworkManager developersnm-settings-nmcli5NetworkManagerConfiguration1.35.90nm-settings-nmcliDescription of settings and properties of NetworkManager connection profiles for nmcliDescription NetworkManager is based on a concept of connection profiles, sometimes referred to as connections only. These connection profiles contain a network configuration. When NetworkManager activates a connection profile on a network device the configuration will @@ -402,7 +402,8 @@ Format: booleanovs-dpdk settingOvsDpdk Link Settings. Properties: Open vSwitch DPDK device arguments. - Format: stringovs-interface settingOpen vSwitch Interface Settings. + Format: stringOpen vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue. + Format: uint32ovs-interface settingOpen vSwitch Interface Settings. Properties: The interface type. Either "internal", "system", "patch", "dpdk", or empty. Format: stringovs-patch settingOvsPatch Link Settings. diff --git a/man/nmcli-examples.7 b/man/nmcli-examples.7 index 255d7733..63a36c33 100644 --- a/man/nmcli-examples.7 +++ b/man/nmcli-examples.7 @@ -2,12 +2,12 @@ .\" Title: nmcli-examples .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: Examples -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NMCLI\-EXAMPLES" "7" "" "NetworkManager 1\&.34\&.0" "Examples" +.TH "NMCLI\-EXAMPLES" "7" "" "NetworkManager 1\&.35\&.90" "Examples" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nmcli.1 b/man/nmcli.1 index 31975215..e901c177 100644 --- a/man/nmcli.1 +++ b/man/nmcli.1 @@ -2,12 +2,12 @@ .\" Title: nmcli .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: General Commands Manual -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NMCLI" "1" "" "NetworkManager 1\&.34\&.0" "General Commands Manual" +.TH "NMCLI" "1" "" "NetworkManager 1\&.35\&.90" "General Commands Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nmtui.1 b/man/nmtui.1 index 762eef64..fefca7b1 100644 --- a/man/nmtui.1 +++ b/man/nmtui.1 @@ -2,12 +2,12 @@ .\" Title: nmtui .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 01/13/2022 +.\" Date: 02/04/2022 .\" Manual: General Commands Manual -.\" Source: NetworkManager 1.34.0 +.\" Source: NetworkManager 1.35.90 .\" Language: English .\" -.TH "NMTUI" "1" "" "NetworkManager 1\&.34\&.0" "General Commands Manual" +.TH "NMTUI" "1" "" "NetworkManager 1\&.35\&.90" "General Commands Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/meson.build b/meson.build index a02e43f9..5db26fdc 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( # - add corresponding NM_VERSION_x_y_z macros in # "src/libnm-core-public/nm-version-macros.h.in" # - update number in configure.ac - version: '1.34.0', + version: '1.35.90', license: 'GPL2+', default_options: [ 'buildtype=debugoptimized', @@ -389,6 +389,14 @@ if config_logging_backend_default == 'default' endif config_h.set_quoted('NM_CONFIG_DEFAULT_LOGGING_BACKEND', config_logging_backend_default) +config_wifi_backend_default = get_option('config_wifi_backend_default') +if config_wifi_backend_default == 'default' + config_wifi_backend_default = 'wpa_supplicant' +elif config_wifi_backend_default == 'iwd' + assert(enable_iwd, 'Setting the default Wi-Fi backend to iwd requires iwd support.') +endif +config_h.set_quoted('NM_CONFIG_DEFAULT_WIFI_BACKEND', config_wifi_backend_default) + session_tracking = get_option('session_tracking') session_trackers = [] @@ -890,6 +898,7 @@ data_conf.set('NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT', config_logging_backend_ data_conf.set('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT', config_auth_polkit_default) data_conf.set('NM_CONFIG_DEFAULT_MAIN_DHCP', config_dhcp_default) data_conf.set('NM_CONFIG_DEFAULT_MAIN_RC_MANAGER', config_dns_rc_manager_default) +data_conf.set('NM_CONFIG_DEFAULT_WIFI_BACKEND_TEXT', config_wifi_backend_default) data_conf.set('NM_MAJOR_VERSION', nm_major_version) data_conf.set('NM_MICRO_VERSION', nm_micro_version) data_conf.set('NM_MINOR_VERSION', nm_minor_version) diff --git a/meson_options.txt b/meson_options.txt index 76a131ad..cfebe446 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -21,6 +21,7 @@ option('polkit_agent_helper_1', type: 'string', value: '', description: 'Path na option('selinux', type: 'boolean', value: true, description: 'Build with SELinux') option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging') option('config_logging_backend_default', type: 'combo', choices: ['default', 'syslog', 'journal'], value: 'default', description: 'Default value for logging.backend') +option('config_wifi_backend_default', type: 'combo', choices: ['default', 'wpa_supplicant', 'iwd'], value: 'default', description: 'Default value for wifi.backend') option('hostname_persist', type: 'combo', choices: ['default', 'suse', 'gentoo', 'slackware'], value: 'default', description: 'Hostname persist method') option('libaudit', type: 'combo', choices: ['yes', 'yes-disabled-by-default', 'no'], value: 'yes', description: 'Build with audit daemon support. yes-disabled-by-default enables support, but disables it unless explicitly configured via NetworkManager.conf') diff --git a/po/POTFILES.in b/po/POTFILES.in index 0cd24d99..76d20094 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -33,7 +33,6 @@ src/core/dns/nm-dns-manager.c src/core/main-utils.c src/core/main.c src/core/nm-config.c -src/core/nm-iface-helper.c src/core/nm-manager.c src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c diff --git a/po/ar.po b/po/ar.po index 756da6e8..29b8db55 100644 --- a/po/ar.po +++ b/po/ar.po @@ -9411,7 +9411,7 @@ msgid "Error: 'connection show': %s" msgstr "خطأ أثناء فتح اتصال VPN '%s'" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/as.po b/po/as.po index a23b1d64..b94c2e36 100644 --- a/po/as.po +++ b/po/as.po @@ -9859,7 +9859,7 @@ msgid "Error: 'connection show': %s" msgstr "ত্ৰুটি: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "সক্ৰিয় সংযোগৰ বিৱৰণ" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/be@latin.po b/po/be@latin.po index 65a234ef..c414dabb 100644 --- a/po/be@latin.po +++ b/po/be@latin.po @@ -9323,7 +9323,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/bg.po b/po/bg.po index 242592e7..4eb2f42d 100644 --- a/po/bg.po +++ b/po/bg.po @@ -9571,7 +9571,7 @@ msgstr "Грешка при „con list“ — %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Активни връзки" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/bn_IN.po b/po/bn_IN.po index d1006a04..17316073 100644 --- a/po/bn_IN.po +++ b/po/bn_IN.po @@ -9888,7 +9888,7 @@ msgid "Error: 'connection show': %s" msgstr "ত্রুটি: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "সংযোগের বিবরণ সক্রিয় করুন" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/bs.po b/po/bs.po index 3e7bff26..8f91e1b9 100644 --- a/po/bs.po +++ b/po/bs.po @@ -9384,7 +9384,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ca.po b/po/ca.po index 617c42cc..e676ac53 100644 --- a/po/ca.po +++ b/po/ca.po @@ -10019,7 +10019,7 @@ msgid "Error: 'connection show': %s" msgstr "Error: «connection show»: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Detalls de l'activació de la connexió" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/cs.po b/po/cs.po index fd4db16d..60432bb3 100644 --- a/po/cs.po +++ b/po/cs.po @@ -9512,7 +9512,7 @@ msgstr "Chyba: „con list“: %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktivní připojení" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/da.po b/po/da.po index 7d69b0d9..19aec9b8 100644 --- a/po/da.po +++ b/po/da.po @@ -9865,7 +9865,7 @@ msgid "Error: 'connection show': %s" msgstr "Fejl: “connection show”: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Detaljer for aktiv forbindelse" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/de.po b/po/de.po index 8b8a7aa4..777f563d 100644 --- a/po/de.po +++ b/po/de.po @@ -11468,7 +11468,7 @@ msgid "Error: 'connection show': %s" msgstr "Fehler: »connection show«: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Verbindungsdetails aktivieren" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/dz.po b/po/dz.po index 106eb57f..3b206d2c 100644 --- a/po/dz.po +++ b/po/dz.po @@ -9445,7 +9445,7 @@ msgid "Error: 'connection show': %s" msgstr "ཝི་པི་ཨེན་མཐུད་ལམ་'%s'སླར་འདྲེན་འབདཝ་ད་འཛོལ་བ་" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/el.po b/po/el.po index e97780ea..8ec45794 100644 --- a/po/el.po +++ b/po/el.po @@ -9943,7 +9943,7 @@ msgid "Error: 'connection show': %s" msgstr "Σφάλμα: 'εμφάνιση σύνδεσης': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Ενεργοποίηση λεπτομερειών σύνδεσης" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/en_CA.po b/po/en_CA.po index 6d5f570e..5e8ae0f2 100644 --- a/po/en_CA.po +++ b/po/en_CA.po @@ -9548,7 +9548,7 @@ msgstr "VPN connection to '%s'" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "No active connections!" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/en_GB.po b/po/en_GB.po index 87fb3a2a..cce756bb 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -9558,7 +9558,7 @@ msgstr "Error: 'con list': %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Active connection details" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/eo.po b/po/eo.po index 72e8e41b..d3e3e93c 100644 --- a/po/eo.po +++ b/po/eo.po @@ -9436,7 +9436,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktivigi detalojn de konekto" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/es.po b/po/es.po index a09570f7..cce25b03 100644 --- a/po/es.po +++ b/po/es.po @@ -11374,7 +11374,7 @@ msgstr "Error: «connection show»: %s" # auto translated by TM merge from project: NetworkManager, version: 0.9.8.2, DocId: NetworkManager #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Activar detalles de conexión" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/et.po b/po/et.po index dcad290c..2a7942df 100644 --- a/po/et.po +++ b/po/et.po @@ -9364,7 +9364,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/eu.po b/po/eu.po index 5e6e6dd5..594453f0 100644 --- a/po/eu.po +++ b/po/eu.po @@ -9523,7 +9523,7 @@ msgstr "Errorea: konexio ezezaguna: %s." #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Konexio aktiboak" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/fi.po b/po/fi.po index 477ab68a..4639bbd3 100644 --- a/po/fi.po +++ b/po/fi.po @@ -9509,7 +9509,7 @@ msgstr "Virhe: tuntematon yhteys: %s." #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktiiviset yhteydet" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/fr.po b/po/fr.po index 2c9e973f..73c2fff5 100644 --- a/po/fr.po +++ b/po/fr.po @@ -11642,7 +11642,7 @@ msgid "Error: 'connection show': %s" msgstr "Erreur : « connection show » : %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Informations d'activation de connexion" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/gd.po b/po/gd.po index d1d80cb4..fdf73148 100644 --- a/po/gd.po +++ b/po/gd.po @@ -9579,7 +9579,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/gl.po b/po/gl.po index be150649..88c96ef9 100644 --- a/po/gl.po +++ b/po/gl.po @@ -9619,7 +9619,7 @@ msgid "Error: 'connection show': %s" msgstr "Erro: 'con list': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Activar detalles da conexión" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/gu.po b/po/gu.po index 4aa92207..a5f01d28 100644 --- a/po/gu.po +++ b/po/gu.po @@ -9824,7 +9824,7 @@ msgid "Error: 'connection show': %s" msgstr "ભૂલ: 'જોડાણ બતાવો': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "જોડાણ વિગતો સક્રિય કરો" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/he.po b/po/he.po index 7f064b02..949c51ca 100644 --- a/po/he.po +++ b/po/he.po @@ -9320,7 +9320,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/hi.po b/po/hi.po index 39149dc4..3c548731 100644 --- a/po/hi.po +++ b/po/hi.po @@ -9840,7 +9840,7 @@ msgid "Error: 'connection show': %s" msgstr "त्रुटि: 'कनेक्शन शो': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "सक्रिय कनेक्शन विवरण" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/hr.po b/po/hr.po index 8720f50f..e16267ce 100644 --- a/po/hr.po +++ b/po/hr.po @@ -9529,7 +9529,7 @@ msgstr "Greška: 'con list': %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktivne veze" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/hu.po b/po/hu.po index 8ac1f859..c76800e6 100644 --- a/po/hu.po +++ b/po/hu.po @@ -9599,7 +9599,7 @@ msgstr "Hiba: „device show”: %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktív kapcsolat részletei" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/id.po b/po/id.po index 6cddcd61..59129a29 100644 --- a/po/id.po +++ b/po/id.po @@ -11238,7 +11238,7 @@ msgid "Error: 'connection show': %s" msgstr "Galat: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktifkan rincian koneksi" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/it.po b/po/it.po index 6dfe8cdc..f993fd47 100644 --- a/po/it.po +++ b/po/it.po @@ -11319,7 +11319,7 @@ msgid "Error: 'connection show': %s" msgstr "Errore: «connection show»: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Attiva dettagli connessione" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ja.po b/po/ja.po index 196293ac..39c742da 100644 --- a/po/ja.po +++ b/po/ja.po @@ -11231,7 +11231,7 @@ msgid "Error: 'connection show': %s" msgstr "エラー: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "アクティブな接続の詳細" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ka.po b/po/ka.po index 86e5c96c..880606d2 100644 --- a/po/ka.po +++ b/po/ka.po @@ -9481,7 +9481,7 @@ msgstr "შეერთებულია VPN-ქსელთან '%s'" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "არავითარი აქტიური შეერთება!" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/kn.po b/po/kn.po index 792f8b85..d7a43ad0 100644 --- a/po/kn.po +++ b/po/kn.po @@ -9841,7 +9841,7 @@ msgid "Error: 'connection show': %s" msgstr "ದೋಷ: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "ಸಂಪರ್ಕಗಳ ವಿವರಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸು" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ko.po b/po/ko.po index 73fbfbdb..e5f5c6f8 100644 --- a/po/ko.po +++ b/po/ko.po @@ -11036,7 +11036,7 @@ msgid "Error: 'connection show': %s" msgstr "오류: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "연결 세부 정보 활성화" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ku.po b/po/ku.po index d9c3804d..d5e82305 100644 --- a/po/ku.po +++ b/po/ku.po @@ -9471,7 +9471,7 @@ msgstr "" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Girêdanên çalak tune!" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/lt.po b/po/lt.po index 517ed50e..e6d4a28a 100644 --- a/po/lt.po +++ b/po/lt.po @@ -9661,7 +9661,7 @@ msgstr "Klaida: „connection show“: %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktyvaus ryšio detalės" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/lv.po b/po/lv.po index 158c57bc..54c1a23f 100644 --- a/po/lv.po +++ b/po/lv.po @@ -9479,7 +9479,7 @@ msgstr "VPN pieslēgums pie '%s'" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Nav aktīvu sakaru!" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/mk.po b/po/mk.po index 3882663b..657a70ef 100644 --- a/po/mk.po +++ b/po/mk.po @@ -9327,7 +9327,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ml.po b/po/ml.po index f82ffe25..177ea7cd 100644 --- a/po/ml.po +++ b/po/ml.po @@ -9778,7 +9778,7 @@ msgstr "പിശക്: 'device show': %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "സജീവമായ കണക്ഷന്‍ വിശദാംശങ്ങള്‍" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/mr.po b/po/mr.po index ea2aaffb..99c7f258 100644 --- a/po/mr.po +++ b/po/mr.po @@ -9797,7 +9797,7 @@ msgid "Error: 'connection show': %s" msgstr "त्रुटी: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "जोडणी तपशील सक्रीय करा" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/nb.po b/po/nb.po index d9f9d312..51340dd5 100644 --- a/po/nb.po +++ b/po/nb.po @@ -9339,7 +9339,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ne.po b/po/ne.po index b0fee386..ec284f95 100644 --- a/po/ne.po +++ b/po/ne.po @@ -9406,7 +9406,7 @@ msgid "Error: 'connection show': %s" msgstr "भीपीएन जडान पुन: प्राप्ति गर्दा त्रुटि '%s'" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/nl.po b/po/nl.po index 08d06b75..b103bf60 100644 --- a/po/nl.po +++ b/po/nl.po @@ -9377,7 +9377,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/oc.po b/po/oc.po index e6b86502..521a2ae3 100644 --- a/po/oc.po +++ b/po/oc.po @@ -9620,7 +9620,7 @@ msgid "Error: 'connection show': %s" msgstr "Error : « conneccion show » : %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Informacions d'activacion de connexion" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/or.po b/po/or.po index d1346370..b42101b8 100644 --- a/po/or.po +++ b/po/or.po @@ -9760,7 +9760,7 @@ msgstr "ତ୍ରୁଟି: 'ଉପକରଣ ଦୃଶ୍ୟ': %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "ସକ୍ରିୟ ସଂଯୋଗ ବିବରଣୀ" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/pa.po b/po/pa.po index 07ab8e2b..bad0004e 100644 --- a/po/pa.po +++ b/po/pa.po @@ -9600,7 +9600,7 @@ msgid "Error: 'connection show': %s" msgstr "ਗਲਤੀ: 'device show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "ਸਰਗਰਮ ਕਨੈਕਸ਼ਨ ਵੇਰਵੇ" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/pl.po b/po/pl.po index beb27e3a..1637564f 100644 --- a/po/pl.po +++ b/po/pl.po @@ -10011,7 +10011,7 @@ msgid "Error: 'connection show': %s" msgstr "Błąd: „connection show”: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Szczegóły aktywowania połączenia" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/pt.po b/po/pt.po index 4dce7e61..3c3479cc 100644 --- a/po/pt.po +++ b/po/pt.po @@ -9441,7 +9441,7 @@ msgid "Error: 'connection show': %s" msgstr "Erro ao obter a ligação VPN '%s'" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/pt_BR.po b/po/pt_BR.po index db5c7f9b..987f82af 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -11333,7 +11333,7 @@ msgid "Error: 'connection show': %s" msgstr "Erro: “connection show”: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Ativar detalhes da conexão" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ru.po b/po/ru.po index 4087b269..b38f537f 100644 --- a/po/ru.po +++ b/po/ru.po @@ -11590,7 +11590,7 @@ msgid "Error: 'connection show': %s" msgstr "Ошибка «connection show»: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Сведения об активации соединения" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/rw.po b/po/rw.po index 272d097b..c518e88e 100644 --- a/po/rw.po +++ b/po/rw.po @@ -9490,7 +9490,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/sk.po b/po/sk.po index 4042e5ca..19179bab 100644 --- a/po/sk.po +++ b/po/sk.po @@ -9471,7 +9471,7 @@ msgstr "VPN spojenie s '%s'" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Bez aktívnych sieťových spojení!" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/sl.po b/po/sl.po index c02650bd..fccc508d 100644 --- a/po/sl.po +++ b/po/sl.po @@ -9557,7 +9557,7 @@ msgstr "Napaka: 'con list': %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Podrobnosti dejavne povezave" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/sq.po b/po/sq.po index 279b75d5..9bb4b970 100644 --- a/po/sq.po +++ b/po/sq.po @@ -9380,7 +9380,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/sr.po b/po/sr.po index 81b649bf..599b5d30 100644 --- a/po/sr.po +++ b/po/sr.po @@ -9595,7 +9595,7 @@ msgstr "Грешка: „con list“: %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Активне везе" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/sr@latin.po b/po/sr@latin.po index 2c33b602..6fe4fb71 100644 --- a/po/sr@latin.po +++ b/po/sr@latin.po @@ -9599,7 +9599,7 @@ msgstr "Greška: „con list“: %s" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktivne veze" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/sv.po b/po/sv.po index 922397e9..aa6215ed 100644 --- a/po/sv.po +++ b/po/sv.po @@ -10986,7 +10986,7 @@ msgid "Error: 'connection show': %s" msgstr "Fel: ”connection show”: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Aktivera anslutningsdetaljer" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/ta.po b/po/ta.po index 87407278..f6a919f6 100644 --- a/po/ta.po +++ b/po/ta.po @@ -9858,7 +9858,7 @@ msgid "Error: 'connection show': %s" msgstr "பிழை: 'connection show': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "இணைப்பு விவரங்களை செயல்படுத்து" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/te.po b/po/te.po index 72ee9a34..74653c3a 100644 --- a/po/te.po +++ b/po/te.po @@ -9796,7 +9796,7 @@ msgid "Error: 'connection show': %s" msgstr "దోషం: 'అనుసంధానం చూపు': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "క్రియాశీల అనుసంధానము వివరాలు" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/th.po b/po/th.po index c09ce061..72421777 100644 --- a/po/th.po +++ b/po/th.po @@ -9482,7 +9482,7 @@ msgstr "เชื่อมต่อ VPN ไปยัง '%s'" #: ../src/nmcli/connections.c:1497 #, fuzzy -msgid "Activate connection details" +msgid "Active connection details" msgstr "ไม่มีการเชื่อมต่อที่ใช้งานอยู่!" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/tr.po b/po/tr.po index 293bd8c5..8b4a767f 100644 --- a/po/tr.po +++ b/po/tr.po @@ -9896,7 +9896,7 @@ msgid "Error: 'connection show': %s" msgstr "Hata: 'bağlantıyı göster': %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Bağlantı ayrıntılarını etkinleştir" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/uk.po b/po/uk.po index 4b55b47f..4cdea057 100644 --- a/po/uk.po +++ b/po/uk.po @@ -11643,7 +11643,7 @@ msgid "Error: 'connection show': %s" msgstr "Помилка: «connection show»: %s" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "Активувати параметри з'єднання" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/vi.po b/po/vi.po index fc8470ca..e1fdb660 100644 --- a/po/vi.po +++ b/po/vi.po @@ -9355,7 +9355,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/wa.po b/po/wa.po index e253312b..05764127 100644 --- a/po/wa.po +++ b/po/wa.po @@ -9452,7 +9452,7 @@ msgid "Error: 'connection show': %s" msgstr "" #: ../src/nmcli/connections.c:1497 -msgid "Activate connection details" +msgid "Active connection details" msgstr "" #: ../src/nmcli/connections.c:1626 ../src/nmcli/devices.c:1610 diff --git a/po/zh_CN.po b/po/zh_CN.po index 67873f13..be6a002d 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -11,23 +11,25 @@ # shijing , 2016. # Mingye Wang (Arthur2e5) , 2016. # Mingcong Bai , 2017. -# Dingzhong Chen , 2016, 2017, 2018. # ljanda , 2019. #zanata # tfu , 2019. #zanata -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-06-01 17:17+0200\n" -"PO-Revision-Date: 2019-08-15 12:20+0000\n" -"Last-Translator: tfu \n" -"Language-Team: Chinese (China) \n" -"Language: zh_Hans\n" +# Dingzhong Chen , 2016-2021. +# +msgid "" +msgstr "" +"Project-Id-Version: NetworkManager main\n" +"Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/NetworkManager/" +"NetworkManager/issues\n" +"POT-Creation-Date: 2021-11-07 03:29+0000\n" +"PO-Revision-Date: 2021-11-09 20:06+0800\n" +"Last-Translator: Dingzhong Chen \n" +"Language-Team: Chinese - China \n" +"Language: zh_CN\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-Generator: Zanata 4.6.2\n" +"Plural-Forms: nplurals=1; plural=0\n" +"X-Generator: Gtranslator 40.0\n" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:1 msgid "Enable or disable system networking" @@ -175,18 +177,18 @@ msgstr "系统策略阻止启用或禁用连接性检查" #. * as "Wired Connection" or "VPN Connection". The %d is a number #. * that is combined with the first argument to create a unique #. * connection id. -#: ../src/core/NetworkManagerUtils.c:113 +#: ../src/core/NetworkManagerUtils.c:111 #, c-format msgctxt "connection id fallback" msgid "%s %u" msgstr "%s %u" #: ../src/core/devices/adsl/nm-device-adsl.c:117 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8080 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:7971 msgid "ADSL connection" msgstr "ADSL 连接" -#: ../src/core/devices/bluetooth/nm-bluez-manager.c:1327 +#: ../src/core/devices/bluetooth/nm-bluez-manager.c:1325 #, c-format msgid "%s Network" msgstr "%s 网络" @@ -250,22 +252,22 @@ msgstr "虚拟连接" msgid "Wired connection %d" msgstr "有线连接 %d" -#: ../src/core/devices/nm-device-ethernet.c:1614 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8117 -#, fuzzy +#: ../src/core/devices/nm-device-ethernet.c:1613 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:8008 +#| msgid "VPN connection" msgid "Veth connection" -msgstr "VPN 连接" +msgstr "Veth 连接" -#: ../src/core/devices/nm-device-ethernet.c:1680 +#: ../src/core/devices/nm-device-ethernet.c:1679 msgid "PPPoE connection" msgstr "PPPoE 连接" -#: ../src/core/devices/nm-device-ethernet.c:1680 +#: ../src/core/devices/nm-device-ethernet.c:1679 msgid "Wired connection" msgstr "有线连接" #: ../src/core/devices/nm-device-infiniband.c:161 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8093 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:7984 msgid "InfiniBand connection" msgstr "InfiniBand 连接" @@ -282,17 +284,17 @@ msgid "TUN connection" msgstr "TUN 连接" #: ../src/core/devices/nm-device-vlan.c:401 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8118 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:8009 msgid "VLAN connection" msgstr "VLAN 连接" #: ../src/core/devices/nm-device-vrf.c:181 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8120 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:8011 msgid "VRF connection" msgstr "VRF 连接" #: ../src/core/devices/nm-device-vxlan.c:382 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8121 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:8012 msgid "VXLAN connection" msgstr "VXLAN 连接" @@ -305,159 +307,159 @@ msgid "Team connection" msgstr "组合连接" #: ../src/core/devices/wifi/nm-device-olpc-mesh.c:115 -#: ../src/nmcli/devices.c:1352 +#: ../src/nmcli/devices.c:1338 msgid "Mesh" msgstr "Mesh" -#: ../src/core/devices/wifi/nm-wifi-utils.c:32 +#: ../src/core/devices/wifi/nm-wifi-utils.c:31 #, c-format msgid "%s is incompatible with static WEP keys" msgstr "%s 不兼容静态 WEP 密钥" -#: ../src/core/devices/wifi/nm-wifi-utils.c:67 +#: ../src/core/devices/wifi/nm-wifi-utils.c:66 msgid "LEAP authentication requires a LEAP username" msgstr "LEAP 验证要求 LEAP 用户名" -#: ../src/core/devices/wifi/nm-wifi-utils.c:79 +#: ../src/core/devices/wifi/nm-wifi-utils.c:78 msgid "LEAP username requires 'leap' authentication" msgstr "LEAP 用户名要求 \"leap\" 验证" -#: ../src/core/devices/wifi/nm-wifi-utils.c:94 +#: ../src/core/devices/wifi/nm-wifi-utils.c:93 msgid "LEAP authentication requires IEEE 802.1x key management" msgstr "LEAP 验证要求 IEEE 802.1x 密钥管理" -#: ../src/core/devices/wifi/nm-wifi-utils.c:116 +#: ../src/core/devices/wifi/nm-wifi-utils.c:115 msgid "LEAP authentication is incompatible with Ad-Hoc mode" msgstr "LEAP 验证和 Ad-Hoc 模式不兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:128 +#: ../src/core/devices/wifi/nm-wifi-utils.c:127 msgid "LEAP authentication is incompatible with 802.1x setting" msgstr "LEAP 验证和 802.1x 设置不兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:148 +#: ../src/core/devices/wifi/nm-wifi-utils.c:147 #, c-format msgid "a connection using '%s' authentication cannot use WPA key management" msgstr "使用 \"%s\" 验证的连接无法使用 WPA 密钥管理" -#: ../src/core/devices/wifi/nm-wifi-utils.c:161 +#: ../src/core/devices/wifi/nm-wifi-utils.c:160 #, c-format msgid "a connection using '%s' authentication cannot specify WPA protocols" msgstr "使用 \"%s\" 验证的连接无法指定 WPA 协议" -#: ../src/core/devices/wifi/nm-wifi-utils.c:179 -#: ../src/core/devices/wifi/nm-wifi-utils.c:198 +#: ../src/core/devices/wifi/nm-wifi-utils.c:178 +#: ../src/core/devices/wifi/nm-wifi-utils.c:197 #, c-format msgid "a connection using '%s' authentication cannot specify WPA ciphers" msgstr "使用 \"%s\" 验证的连接无法指定 WPA 密文" -#: ../src/core/devices/wifi/nm-wifi-utils.c:212 +#: ../src/core/devices/wifi/nm-wifi-utils.c:211 #, c-format msgid "a connection using '%s' authentication cannot specify a WPA password" msgstr "使用 \"%s\" 验证的连接无法指定 WPA 密码" -#: ../src/core/devices/wifi/nm-wifi-utils.c:245 +#: ../src/core/devices/wifi/nm-wifi-utils.c:244 msgid "Dynamic WEP requires an 802.1x setting" msgstr "动态 WEP 要求 802.1x 设置" -#: ../src/core/devices/wifi/nm-wifi-utils.c:255 -#: ../src/core/devices/wifi/nm-wifi-utils.c:287 +#: ../src/core/devices/wifi/nm-wifi-utils.c:254 +#: ../src/core/devices/wifi/nm-wifi-utils.c:286 msgid "Dynamic WEP requires 'open' authentication" msgstr "动态 WEP 要求 \"open\" 验证" -#: ../src/core/devices/wifi/nm-wifi-utils.c:272 +#: ../src/core/devices/wifi/nm-wifi-utils.c:271 msgid "Dynamic WEP requires 'ieee8021x' key management" msgstr "动态 WEP 要求 \"ieee8021x\" 密钥管理" -#: ../src/core/devices/wifi/nm-wifi-utils.c:323 +#: ../src/core/devices/wifi/nm-wifi-utils.c:322 msgid "WPA-PSK authentication is incompatible with 802.1x" msgstr "WPA-PSK 验证和 802.1x 兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:333 +#: ../src/core/devices/wifi/nm-wifi-utils.c:332 msgid "WPA-PSK requires 'open' authentication" msgstr "WPA-PSK 要求 \"open\" 验证" -#: ../src/core/devices/wifi/nm-wifi-utils.c:347 +#: ../src/core/devices/wifi/nm-wifi-utils.c:346 msgid "Access point does not support PSK but setting requires it" msgstr "接入点不支持 PSK 但设置要求它" -#: ../src/core/devices/wifi/nm-wifi-utils.c:362 +#: ../src/core/devices/wifi/nm-wifi-utils.c:361 msgid "WPA Ad-Hoc authentication requires 'rsn' protocol" -msgstr "WPA Ad-Hoc 身份验证需要 “rsn” 协议" +msgstr "WPA Ad-Hoc 身份验证需要 \"rsn\" 协议" -#: ../src/core/devices/wifi/nm-wifi-utils.c:375 +#: ../src/core/devices/wifi/nm-wifi-utils.c:374 msgid "WPA Ad-Hoc authentication requires 'ccmp' pairwise cipher" -msgstr "WPA Ad-Hoc 身份验证需要 'ccmp' 成对密码" +msgstr "WPA Ad-Hoc 身份验证需要 \"ccmp\" 成对密码" -#: ../src/core/devices/wifi/nm-wifi-utils.c:388 +#: ../src/core/devices/wifi/nm-wifi-utils.c:387 msgid "WPA Ad-Hoc requires 'ccmp' group cipher" -msgstr "WPA Ad-Hoc 需要 “ccmp” 组密码" +msgstr "WPA Ad-Hoc 需要 \"ccmp\" 组密码" -#: ../src/core/devices/wifi/nm-wifi-utils.c:419 +#: ../src/core/devices/wifi/nm-wifi-utils.c:418 msgid "WPA-EAP authentication requires an 802.1x setting" msgstr "WPA-EAP 验证要求 802.1x 设置" -#: ../src/core/devices/wifi/nm-wifi-utils.c:429 +#: ../src/core/devices/wifi/nm-wifi-utils.c:428 msgid "WPA-EAP requires 'open' authentication" msgstr "WPA-EAP 要求 \"open\" 验证" -#: ../src/core/devices/wifi/nm-wifi-utils.c:442 +#: ../src/core/devices/wifi/nm-wifi-utils.c:441 msgid "802.1x setting requires 'wpa-eap' key management" msgstr "802.1x 设置要求 \"wpa-eap\" 密钥管理" -#: ../src/core/devices/wifi/nm-wifi-utils.c:456 +#: ../src/core/devices/wifi/nm-wifi-utils.c:455 msgid "Access point does not support 802.1x but setting requires it" msgstr "接入点不支持 802.1x 但设置要求它" -#: ../src/core/devices/wifi/nm-wifi-utils.c:486 +#: ../src/core/devices/wifi/nm-wifi-utils.c:485 msgid "Ad-Hoc mode requires 'none' or 'wpa-psk' key management" -msgstr "Ad-Hoc 模式需要 'none' 或 'wpa-psk' 密钥管理" +msgstr "Ad-Hoc 模式需要 \"none\" 或 \"wpa-psk\" 密钥管理" -#: ../src/core/devices/wifi/nm-wifi-utils.c:498 +#: ../src/core/devices/wifi/nm-wifi-utils.c:497 msgid "Ad-Hoc mode is incompatible with 802.1x security" msgstr "Ad-Hoc 模式和 802.1x 安全性不兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:507 +#: ../src/core/devices/wifi/nm-wifi-utils.c:506 msgid "Ad-Hoc mode is incompatible with LEAP security" msgstr "Ad-Hoc 模式和 LEAP 安全性不兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:519 +#: ../src/core/devices/wifi/nm-wifi-utils.c:518 msgid "Ad-Hoc mode requires 'open' authentication" msgstr "Ad-Hoc 模式要求 \"open\" 验证" -#: ../src/core/devices/wifi/nm-wifi-utils.c:563 -#: ../src/core/devices/wifi/nm-wifi-utils.c:598 +#: ../src/core/devices/wifi/nm-wifi-utils.c:562 +#: ../src/core/devices/wifi/nm-wifi-utils.c:597 #, c-format msgid "connection does not match access point" msgstr "连接和接入点不匹配" -#: ../src/core/devices/wifi/nm-wifi-utils.c:652 +#: ../src/core/devices/wifi/nm-wifi-utils.c:651 #, c-format msgid "connection does not match mesh point" msgstr "连接与 mesh 点不匹配" -#: ../src/core/devices/wifi/nm-wifi-utils.c:671 +#: ../src/core/devices/wifi/nm-wifi-utils.c:670 msgid "Access point is unencrypted but setting specifies security" msgstr "接入点未加密但设置指定了安全性" -#: ../src/core/devices/wifi/nm-wifi-utils.c:762 +#: ../src/core/devices/wifi/nm-wifi-utils.c:761 msgid "" "WPA authentication is incompatible with non-EAP (original) LEAP or Dynamic " "WEP" msgstr "WPA 验证和非 EAP(原始的)LEAP 或动态 WEP 不兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:775 +#: ../src/core/devices/wifi/nm-wifi-utils.c:774 msgid "WPA authentication is incompatible with Shared Key authentication" msgstr "WPA 验证和共享密钥(Shared Key)验证不兼容" -#: ../src/core/devices/wifi/nm-wifi-utils.c:866 +#: ../src/core/devices/wifi/nm-wifi-utils.c:857 msgid "Failed to determine AP security information" msgstr "确定 AP 安全信息失败" -#: ../src/core/dhcp/nm-dhcp-dhclient-utils.c:317 +#: ../src/core/dhcp/nm-dhcp-dhclient-utils.c:316 msgid "# Created by NetworkManager\n" msgstr "# 由 NetworkManger 创建\n" -#: ../src/core/dhcp/nm-dhcp-dhclient-utils.c:330 +#: ../src/core/dhcp/nm-dhcp-dhclient-utils.c:329 #, c-format msgid "" "# Merged from %s\n" @@ -496,48 +498,48 @@ msgstr "%s 已在运行中(pid %ld)\n" msgid "You must be root to run %s!\n" msgstr "运行 %s 必须是根用户!\n" -#: ../src/core/main-utils.c:284 ../src/core/main.c:375 +#: ../src/core/main-utils.c:284 ../src/core/main.c:374 #: ../src/core/nm-iface-helper.c:585 #, c-format msgid "%s. Please use --help to see a list of valid options.\n" msgstr "%s。请使用 --help 查看有效选项列表。\n" -#: ../src/core/main.c:164 ../src/core/main.c:385 +#: ../src/core/main.c:163 ../src/core/main.c:384 #, c-format msgid "Failed to read configuration: %s\n" msgstr "读取配置失败:%s\n" -#: ../src/core/main.c:191 ../src/core/nm-iface-helper.c:406 +#: ../src/core/main.c:190 ../src/core/nm-iface-helper.c:406 msgid "Print NetworkManager version and exit" msgstr "输出网络管理器版本并退出" -#: ../src/core/main.c:198 ../src/core/nm-iface-helper.c:413 +#: ../src/core/main.c:197 ../src/core/nm-iface-helper.c:413 msgid "Don't become a daemon" msgstr "不成为守护进程" -#: ../src/core/main.c:205 ../src/core/nm-iface-helper.c:427 +#: ../src/core/main.c:204 ../src/core/nm-iface-helper.c:427 #, c-format msgid "Log level: one of [%s]" msgstr "日志级别:取 [%s] 之一" -#: ../src/core/main.c:212 ../src/core/nm-iface-helper.c:434 +#: ../src/core/main.c:211 ../src/core/nm-iface-helper.c:434 #, c-format msgid "Log domains separated by ',': any combination of [%s]" msgstr "以 \",\" 分开的日志域:可以是 [%s] 的任意组合" -#: ../src/core/main.c:219 ../src/core/nm-iface-helper.c:441 +#: ../src/core/main.c:218 ../src/core/nm-iface-helper.c:441 msgid "Make all warnings fatal" msgstr "视所有警告为致命错误" -#: ../src/core/main.c:226 +#: ../src/core/main.c:225 msgid "Specify the location of a PID file" msgstr "指定一个 PID 文件的位置" -#: ../src/core/main.c:240 +#: ../src/core/main.c:239 msgid "Print NetworkManager configuration and exit" msgstr "输出网络管理器配置并退出" -#: ../src/core/main.c:251 +#: ../src/core/main.c:250 msgid "" "NetworkManager monitors all network connections and automatically\n" "chooses the best connection to use. It also allows the user to\n" @@ -547,15 +549,15 @@ msgstr "" "网络管理器(NetworkManager)监视所有网络连接,并自动选择要使用的最佳连接。\n" "它还允许用户指定计算机无线网卡连接的无线访问点。" -#: ../src/core/main.c:408 ../src/core/nm-iface-helper.c:599 +#: ../src/core/main.c:407 ../src/core/nm-iface-helper.c:599 #, c-format msgid "Could not daemonize: %s [error %u]\n" msgstr "无法设为守护进程:%s [错误 %u]\n" #: ../src/core/nm-config.c:542 #: ../src/libnm-core-impl/nm-setting-ovs-bridge.c:187 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:2157 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:4175 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:2107 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:4103 #, c-format msgid "'%s' is not valid" msgstr "\"%s\" 无效" @@ -563,7 +565,7 @@ msgstr "\"%s\" 无效" #: ../src/core/nm-config.c:561 #, c-format msgid "Bad '%s' option: " -msgstr "错误的 '%s' 选项: " +msgstr "错误的 \"%s\" 选项:" #: ../src/core/nm-config.c:578 msgid "Config file location" @@ -734,44 +736,44 @@ msgstr "(%s):无效的 IID %s\n" msgid "(%s): Invalid DHCP client-id %s\n" msgstr "(%s):无效的 DHCP 客户端 ID %s\n" -#: ../src/core/nm-manager.c:5926 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:8119 +#: ../src/core/nm-manager.c:5867 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:8010 msgid "VPN connection" msgstr "VPN 连接" -#: ../src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5478 +#: ../src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5467 #: ../src/libnm-client-impl/nm-device.c:1683 -#: ../src/libnm-core-impl/nm-connection.c:2707 +#: ../src/libnm-core-impl/nm-connection.c:2696 #: ../src/nmtui/nm-editor-utils.c:180 msgid "Bond" msgstr "绑定" -#: ../src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5549 +#: ../src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5538 #: ../src/libnm-client-impl/nm-device.c:1685 -#: ../src/libnm-core-impl/nm-connection.c:2709 +#: ../src/libnm-core-impl/nm-connection.c:2698 #: ../src/nmtui/nm-editor-utils.c:198 msgid "Team" msgstr "组合" -#: ../src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5886 +#: ../src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5875 #: ../src/libnm-client-impl/nm-device.c:1687 -#: ../src/libnm-core-impl/nm-connection.c:2711 +#: ../src/libnm-core-impl/nm-connection.c:2700 #: ../src/nmtui/nm-editor-utils.c:189 msgid "Bridge" msgstr "网桥" -#: ../src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c:9974 +#: ../src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c:9973 #: ../src/libnm-core-impl/nm-team-utils.c:2396 #, c-format msgid "invalid json" msgstr "无效的 json" -#: ../src/libnm-client-impl/nm-client.c:3782 +#: ../src/libnm-client-impl/nm-client.c:3773 #, c-format msgid "request succeeded with %s but object is in an unsuitable state" msgstr "使用 %s 请求成功,但对象处于不合适的状态" -#: ../src/libnm-client-impl/nm-client.c:3874 +#: ../src/libnm-client-impl/nm-client.c:3865 #, c-format msgid "operation succeeded but object %s does not exist" msgstr "操作成功,但对象 %s 不存在" @@ -934,7 +936,7 @@ msgstr "此连接不是 VRF 连接。" #: ../src/libnm-client-impl/nm-device-vrf.c:74 msgid "The VRF table of the device and the connection didn't match." -msgstr "设备的 VRF 表和连接不匹配" +msgstr "设备的 VRF 表和连接不匹配。" #: ../src/libnm-client-impl/nm-device-vxlan.c:383 msgid "The connection was not a VXLAN connection." @@ -1001,13 +1003,13 @@ msgid "Mobile Broadband" msgstr "移动宽带" #: ../src/libnm-client-impl/nm-device.c:1681 -#: ../src/libnm-core-impl/nm-connection.c:2715 +#: ../src/libnm-core-impl/nm-connection.c:2704 #: ../src/nmtui/nm-editor-utils.c:153 msgid "InfiniBand" msgstr "InfiniBand" #: ../src/libnm-client-impl/nm-device.c:1689 -#: ../src/libnm-core-impl/nm-connection.c:2713 +#: ../src/libnm-core-impl/nm-connection.c:2702 #: ../src/nmtui/nm-editor-utils.c:207 ../src/nmtui/nmt-page-vlan.c:64 msgid "VLAN" msgstr "VLAN" @@ -1071,8 +1073,8 @@ msgstr "VRF" #. TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) #. TRANSLATORS: Unknown reason for a connection state change (NMActiveConnectionStateReason) #: ../src/libnm-client-impl/nm-device.c:1724 -#: ../src/libnmc-base/nm-client-utils.c:352 -#: ../src/libnmc-base/nm-client-utils.c:473 +#: ../src/libnmc-base/nm-client-utils.c:326 +#: ../src/libnmc-base/nm-client-utils.c:447 msgid "Unknown" msgstr "未知" @@ -1108,135 +1110,135 @@ msgstr "连接无效:%s" #: ../src/libnm-client-impl/nm-device.c:2773 #, c-format -msgid "The interface names of the device and the connection didn't match" +msgid "The interface names of the device and the connection didn't match." msgstr "这个设备的接口名和连接不匹配。" #: ../src/libnm-client-impl/nm-secret-agent-old.c:1384 msgid "registration failed" -msgstr "注册失败。" +msgstr "注册失败" -#: ../src/libnm-client-impl/nm-vpn-plugin-old.c:817 -#: ../src/libnm-client-impl/nm-vpn-service-plugin.c:1063 +#: ../src/libnm-client-impl/nm-vpn-plugin-old.c:819 +#: ../src/libnm-client-impl/nm-vpn-service-plugin.c:1014 msgid "No service name specified" msgstr "未指定服务" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:286 #, c-format msgid "'%s' is not valid: properties should be specified as 'key=value'" -msgstr "'%s' 无效:属性需要以 'key=value' 的形式指定" +msgstr "\"%s\" 无效:属性需要以 \"key=value\" 的形式指定" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:300 #, c-format msgid "'%s' is not a valid key" -msgstr "'%s' 不是一个有效的关键字" +msgstr "\"%s\" 不是一个有效的关键字" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:305 #, c-format msgid "duplicate key '%s'" -msgstr "重复的关键字 '%s'" +msgstr "重复的关键字 \"%s\"" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:319 #, c-format msgid "number for '%s' is out of range" -msgstr "'%s' 的值超出了范围" +msgstr "\"%s\" 的值超出了范围" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:324 #, c-format msgid "value for '%s' must be a number" -msgstr "'%s' 的值需要是一个数字" +msgstr "\"%s\" 的值需要是一个数字" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:337 #, c-format msgid "value for '%s' must be a boolean" -msgstr "'%s' 的值需要是一个布尔值" +msgstr "\"%s\" 的值需要是一个布尔值" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:346 msgid "missing 'name' attribute" -msgstr "缺少 'name' 属性" +msgstr "缺少 \"name\" 属性" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:355 #, c-format msgid "invalid 'name' \"%s\"" -msgstr "无效的 'name' \"%s\"" +msgstr "无效的 \"name\" \"%s\"" #: ../src/libnm-core-aux-extern/nm-libnm-core-aux.c:368 #, c-format msgid "attribute '%s' is invalid for \"%s\"" -msgstr "属性 '%s' 无效(对于\"%s\")" +msgstr "属性 \"%s\" 对于 \"%s\" 无效" #: ../src/libnm-core-aux-intern/nm-libnm-core-utils.c:293 -#, fuzzy msgid "property cannot be an empty string" -msgstr "\"%s=%s\" 不允许这个属性为空" +msgstr "属性不能为空的字符串" #: ../src/libnm-core-aux-intern/nm-libnm-core-utils.c:310 -#, fuzzy msgid "property cannot be longer than 255 bytes" -msgstr "DHCP选项不能多于 255 个字符" +msgstr "属性不能多于 255 个字符" #: ../src/libnm-core-aux-intern/nm-libnm-core-utils.c:321 -#, fuzzy msgid "property cannot contain any nul bytes" -msgstr "属性必须只包含数字" +msgstr "属性不能包含任何 nul 字节" -#: ../src/libnm-core-impl/nm-connection.c:300 +#: ../src/libnm-core-impl/nm-connection.c:299 msgid "wrong type; should be a list of strings." msgstr "错误的类型;应为一个字符串列表。" -#: ../src/libnm-core-impl/nm-connection.c:374 +#: ../src/libnm-core-impl/nm-connection.c:373 msgid "unknown setting name" msgstr "未知的设置名称" -#: ../src/libnm-core-impl/nm-connection.c:386 +#: ../src/libnm-core-impl/nm-connection.c:385 msgid "duplicate setting name" msgstr "重复的设置名称" -#: ../src/libnm-core-impl/nm-connection.c:1433 +#: ../src/libnm-core-impl/nm-connection.c:1422 msgid "setting not found" msgstr "未找到设置" -#: ../src/libnm-core-impl/nm-connection.c:1486 -#: ../src/libnm-core-impl/nm-connection.c:1511 -#: ../src/libnm-core-impl/nm-connection.c:1536 +#: ../src/libnm-core-impl/nm-connection.c:1475 +#: ../src/libnm-core-impl/nm-connection.c:1500 +#: ../src/libnm-core-impl/nm-connection.c:1525 msgid "setting is required for non-slave connections" msgstr "对于非从连接,设置是必需的" -#: ../src/libnm-core-impl/nm-connection.c:1499 -#: ../src/libnm-core-impl/nm-connection.c:1524 -#: ../src/libnm-core-impl/nm-connection.c:1549 +#: ../src/libnm-core-impl/nm-connection.c:1488 +#: ../src/libnm-core-impl/nm-connection.c:1513 +#: ../src/libnm-core-impl/nm-connection.c:1538 msgid "setting not allowed in slave connection" msgstr "从连接中不允许设置" -#: ../src/libnm-core-impl/nm-connection.c:1654 +#: ../src/libnm-core-impl/nm-connection.c:1643 msgid "Unexpected failure to normalize the connection" msgstr "正常化连接意外地失败" -#: ../src/libnm-core-impl/nm-connection.c:1715 +#: ../src/libnm-core-impl/nm-connection.c:1704 msgid "Unexpected failure to verify the connection" msgstr "检验连接意外地失败" -#: ../src/libnm-core-impl/nm-connection.c:1752 +#: ../src/libnm-core-impl/nm-connection.c:1741 #, c-format msgid "unexpected uuid %s instead of %s" msgstr "非预期的 uuid %s,而不是 %s" -#: ../src/libnm-core-impl/nm-connection.c:2566 +#: ../src/libnm-core-impl/nm-connection.c:2555 #: ../src/libnm-core-impl/nm-setting-8021x.c:2618 #: ../src/libnm-core-impl/nm-setting-8021x.c:2641 #: ../src/libnm-core-impl/nm-setting-8021x.c:2681 #: ../src/libnm-core-impl/nm-setting-8021x.c:2704 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2754 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2795 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2895 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2755 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2773 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2797 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2815 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2845 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2945 #: ../src/libnm-core-impl/nm-setting-adsl.c:157 #: ../src/libnm-core-impl/nm-setting-bluetooth.c:110 #: ../src/libnm-core-impl/nm-setting-bluetooth.c:174 #: ../src/libnm-core-impl/nm-setting-bluetooth.c:191 #: ../src/libnm-core-impl/nm-setting-cdma.c:127 -#: ../src/libnm-core-impl/nm-setting-connection.c:1075 -#: ../src/libnm-core-impl/nm-setting-connection.c:1113 -#: ../src/libnm-core-impl/nm-setting-connection.c:1385 -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5333 +#: ../src/libnm-core-impl/nm-setting-connection.c:1073 +#: ../src/libnm-core-impl/nm-setting-connection.c:1111 +#: ../src/libnm-core-impl/nm-setting-connection.c:1383 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5332 #: ../src/libnm-core-impl/nm-setting-ip-tunnel.c:371 #: ../src/libnm-core-impl/nm-setting-olpc-mesh.c:83 #: ../src/libnm-core-impl/nm-setting-ovs-patch.c:75 @@ -1249,7 +1251,7 @@ msgstr "非预期的 uuid %s,而不是 %s" msgid "property is missing" msgstr "缺少属性" -#: ../src/libnm-core-impl/nm-connection.c:2719 +#: ../src/libnm-core-impl/nm-connection.c:2708 msgid "IP Tunnel" msgstr "IP 隧道" @@ -1511,7 +1513,7 @@ msgstr "无法找到预期的 TSS 起始标记。" #: ../src/libnm-core-impl/nm-crypto.c:426 #, c-format msgid "Failed to find expected TSS end tag '%s'." -msgstr "无法找到预期的 TSS 结束标记 '%s'。" +msgstr "无法找到预期的 TSS 结束标记 \"%s\"。" #: ../src/libnm-core-impl/nm-crypto.c:481 #, c-format @@ -1562,7 +1564,7 @@ msgstr "整数文件为空" #: ../src/libnm-core-impl/nm-crypto.c:778 #, c-format msgid "Failed to recognize certificate" -msgstr "识别证书失败。" +msgstr "识别证书失败" #: ../src/libnm-core-impl/nm-crypto.c:886 #, c-format @@ -1584,237 +1586,239 @@ msgstr "值不能解释为一个数字列表。" msgid "value is not an integer in range [%lld, %lld]" msgstr "值不是在 [%lld, %lld] 范围内的一个整数" -#: ../src/libnm-core-impl/nm-keyfile.c:270 +#: ../src/libnm-core-impl/nm-keyfile.c:269 msgid "ignoring missing number" msgstr "忽略缺失的数字" -#: ../src/libnm-core-impl/nm-keyfile.c:282 +#: ../src/libnm-core-impl/nm-keyfile.c:281 #, c-format msgid "ignoring invalid number '%s'" msgstr "忽略无效的数字 \"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:311 +#: ../src/libnm-core-impl/nm-keyfile.c:310 #, c-format msgid "ignoring invalid %s address: %s" msgstr "忽略无效的 %s 地址:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:357 +#: ../src/libnm-core-impl/nm-keyfile.c:356 #, c-format msgid "ignoring invalid gateway '%s' for %s route" msgstr "忽略 %s%s 路由的无效网关 \"\"" -#: ../src/libnm-core-impl/nm-keyfile.c:379 +#: ../src/libnm-core-impl/nm-keyfile.c:378 #, c-format msgid "ignoring invalid %s route: %s" msgstr "忽略无效的 %s 路由:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:557 +#: ../src/libnm-core-impl/nm-keyfile.c:556 #, c-format msgid "unexpected character '%c' for address %s: '%s' (position %td)" msgstr "对于地址 %2$s 的意外字符 \"%1$c\":\"%3$s\"(位置 %4$td)" -#: ../src/libnm-core-impl/nm-keyfile.c:573 +#: ../src/libnm-core-impl/nm-keyfile.c:572 #, c-format msgid "unexpected character '%c' for %s: '%s' (position %td)" msgstr "对于 %2$s 的意外字符 \"%1$c\":\"%3$s\"(位置 %4$td)" -#: ../src/libnm-core-impl/nm-keyfile.c:588 +#: ../src/libnm-core-impl/nm-keyfile.c:587 #, c-format msgid "unexpected character '%c' in prefix length for %s: '%s' (position %td)" msgstr "对于 %2$s,前缀长度中有意外字符 \"%1$c\":\"%3$s\"(位置 %4$td)" -#: ../src/libnm-core-impl/nm-keyfile.c:605 +#: ../src/libnm-core-impl/nm-keyfile.c:604 #, c-format msgid "garbage at the end of value %s: '%s'" msgstr "值 %s 的末尾有无用信息:\"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:615 +#: ../src/libnm-core-impl/nm-keyfile.c:614 #, c-format msgid "deprecated semicolon at the end of value %s: '%s'" msgstr "值 %s 的末尾有舍弃的分号:\"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:634 +#: ../src/libnm-core-impl/nm-keyfile.c:633 #, c-format msgid "invalid prefix length for %s '%s', defaulting to %d" msgstr "%s 的前缀长度 \"%s\" 无效,默认为 %d" -#: ../src/libnm-core-impl/nm-keyfile.c:646 +#: ../src/libnm-core-impl/nm-keyfile.c:645 #, c-format msgid "missing prefix length for %s '%s', defaulting to %d" msgstr "缺少 %s 的前缀长度 \"%s\",默认为 %d" -#: ../src/libnm-core-impl/nm-keyfile.c:989 +#: ../src/libnm-core-impl/nm-keyfile.c:988 #: ../src/libnm-core-impl/nm-setting-ovs-external-ids.c:320 #: ../src/libnm-core-impl/nm-setting-user.c:372 #, c-format msgid "invalid value for \"%s\": %s" msgstr "对 \"%s\" 无效的值:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:1067 +#: ../src/libnm-core-impl/nm-keyfile.c:1066 #, c-format msgid "ignoring invalid DNS server IPv%c address '%s'" msgstr "忽略无效的 DNS 服务器 IPv%c 地址 \"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:1104 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1651 +#: ../src/libnm-core-impl/nm-keyfile.c:1103 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1623 #, c-format msgid "invalid option '%s', use one of [%s]" msgstr "无效选项 \"%s\",请使用 [%s] 中的一个。" -#: ../src/libnm-core-impl/nm-keyfile.c:1162 +#: ../src/libnm-core-impl/nm-keyfile.c:1161 msgid "ignoring invalid MAC address" msgstr "忽略无效的 MAC 地址" -#: ../src/libnm-core-impl/nm-keyfile.c:1238 -#, fuzzy, c-format +#: ../src/libnm-core-impl/nm-keyfile.c:1237 +#, c-format +#| msgid "ignoring invalid %s address: %s" msgid "ignoring invalid bond option %s%s%s = %s%s%s: %s" -msgstr "忽略无效的 %s 地址:%s" +msgstr "忽略无效的绑定(bond)选项 %s%s%s = %s%s%s:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:1428 +#: ../src/libnm-core-impl/nm-keyfile.c:1427 msgid "ignoring invalid SSID" msgstr "忽略无效的 SSID" -#: ../src/libnm-core-impl/nm-keyfile.c:1446 +#: ../src/libnm-core-impl/nm-keyfile.c:1445 msgid "ignoring invalid raw password" msgstr "忽略无效的原始密码" -#: ../src/libnm-core-impl/nm-keyfile.c:1587 +#: ../src/libnm-core-impl/nm-keyfile.c:1586 msgid "invalid key/cert value" msgstr "无效的密钥/证书值" -#: ../src/libnm-core-impl/nm-keyfile.c:1602 +#: ../src/libnm-core-impl/nm-keyfile.c:1601 #, c-format msgid "invalid key/cert value path \"%s\"" msgstr "无效的密钥/证书值路径 \"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:1627 -#: ../src/libnm-core-impl/nm-keyfile.c:1724 +#: ../src/libnm-core-impl/nm-keyfile.c:1626 +#: ../src/libnm-core-impl/nm-keyfile.c:1723 #, c-format msgid "certificate or key file '%s' does not exist" msgstr "证书或密钥文件 \"%s\" 不存在" -#: ../src/libnm-core-impl/nm-keyfile.c:1640 +#: ../src/libnm-core-impl/nm-keyfile.c:1639 #, c-format msgid "invalid PKCS#11 URI \"%s\"" msgstr "无效的 PKCS#11 URI \"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:1686 +#: ../src/libnm-core-impl/nm-keyfile.c:1685 msgid "invalid key/cert value data:;base64, is not base64" msgstr "无效的密钥/证书值 data:;base64,不是 base64" -#: ../src/libnm-core-impl/nm-keyfile.c:1699 +#: ../src/libnm-core-impl/nm-keyfile.c:1698 msgid "invalid key/cert value data:;base64,file://" msgstr "无效的密钥/证书值 data:;base64,file://" -#: ../src/libnm-core-impl/nm-keyfile.c:1740 +#: ../src/libnm-core-impl/nm-keyfile.c:1739 msgid "invalid key/cert value is not a valid blob" msgstr "无效的密钥/证书值,不是有效的比特块(blob)" -#: ../src/libnm-core-impl/nm-keyfile.c:1842 +#: ../src/libnm-core-impl/nm-keyfile.c:1841 #, c-format msgid "invalid parity value '%s'" msgstr "无效的奇偶校验值 \"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:1864 -#: ../src/libnm-core-impl/nm-keyfile.c:3337 +#: ../src/libnm-core-impl/nm-keyfile.c:1863 +#: ../src/libnm-core-impl/nm-keyfile.c:3336 #, c-format msgid "invalid setting: %s" msgstr "无效设置:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:1884 +#: ../src/libnm-core-impl/nm-keyfile.c:1883 #, c-format msgid "ignoring invalid team configuration: %s" msgstr "忽略无效的组合(team)配置:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:1967 +#: ../src/libnm-core-impl/nm-keyfile.c:1966 #, c-format msgid "invalid qdisc: %s" msgstr "无效的排队规则(qdisc):%s" -#: ../src/libnm-core-impl/nm-keyfile.c:2017 +#: ../src/libnm-core-impl/nm-keyfile.c:2016 #, c-format msgid "invalid tfilter: %s" msgstr "无效的流量过滤器(tfilter):%s" -#: ../src/libnm-core-impl/nm-keyfile.c:3162 +#: ../src/libnm-core-impl/nm-keyfile.c:3161 #, c-format msgid "error loading setting value: %s" msgstr "加载设置值时出错:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:3193 -#: ../src/libnm-core-impl/nm-keyfile.c:3205 -#: ../src/libnm-core-impl/nm-keyfile.c:3224 -#: ../src/libnm-core-impl/nm-keyfile.c:3236 -#: ../src/libnm-core-impl/nm-keyfile.c:3248 -#: ../src/libnm-core-impl/nm-keyfile.c:3310 -#: ../src/libnm-core-impl/nm-keyfile.c:3322 +#: ../src/libnm-core-impl/nm-keyfile.c:3192 +#: ../src/libnm-core-impl/nm-keyfile.c:3204 +#: ../src/libnm-core-impl/nm-keyfile.c:3223 +#: ../src/libnm-core-impl/nm-keyfile.c:3235 +#: ../src/libnm-core-impl/nm-keyfile.c:3247 +#: ../src/libnm-core-impl/nm-keyfile.c:3309 +#: ../src/libnm-core-impl/nm-keyfile.c:3321 msgid "value cannot be interpreted as integer" msgstr "值无法被解析为整数" -#: ../src/libnm-core-impl/nm-keyfile.c:3278 +#: ../src/libnm-core-impl/nm-keyfile.c:3277 #, c-format msgid "ignoring invalid byte element '%u' (not between 0 and 255 inclusive)" -msgstr "忽略无效的字节元素 '%u'(不在 0 和 255 之间)" +msgstr "忽略无效的字节元素 \"%u\"(不在 0 和 255 之间)" -#: ../src/libnm-core-impl/nm-keyfile.c:3362 +#: ../src/libnm-core-impl/nm-keyfile.c:3361 #, c-format msgid "invalid setting name '%s'" msgstr "无效的设置名称 \"%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:3409 +#: ../src/libnm-core-impl/nm-keyfile.c:3408 #, c-format msgid "invalid key '%s.%s'" msgstr "无效的密钥 \"%s.%s\"" -#: ../src/libnm-core-impl/nm-keyfile.c:3425 +#: ../src/libnm-core-impl/nm-keyfile.c:3424 #, c-format msgid "key '%s.%s' is not boolean" msgstr "密钥 \"%s.%s\" 不是布尔值" -#: ../src/libnm-core-impl/nm-keyfile.c:3442 +#: ../src/libnm-core-impl/nm-keyfile.c:3441 #, c-format msgid "key '%s.%s' is not a uint32" -msgstr "key '%s.%s' 不是一个 uint32" +msgstr "key \"%s.%s\" 不是一个 uint32" -#: ../src/libnm-core-impl/nm-keyfile.c:3499 +#: ../src/libnm-core-impl/nm-keyfile.c:3498 #, c-format msgid "invalid peer public key in section '%s'" -msgstr "'%s' 项中无效的 peer 公钥" +msgstr "\"%s\" 项中存在无效的对等端公钥" -#: ../src/libnm-core-impl/nm-keyfile.c:3514 +#: ../src/libnm-core-impl/nm-keyfile.c:3513 #, c-format msgid "key '%s.%s' is not a valid 256 bit key in base64 encoding" -msgstr "密钥 '%s.%s' 不是一个以 base64 编码的有效的 256 位密钥" +msgstr "密钥 \"%s.%s\" 不是一个以 base64 编码的有效的 256 位密钥" -#: ../src/libnm-core-impl/nm-keyfile.c:3537 +#: ../src/libnm-core-impl/nm-keyfile.c:3536 #, c-format msgid "key '%s.%s' is not a valid secret flag" -msgstr "'%s.%s' 不是一个有效的 secret 标记" +msgstr "\"%s.%s\" 不是一个有效的机密(secret)标记" -#: ../src/libnm-core-impl/nm-keyfile.c:3560 +#: ../src/libnm-core-impl/nm-keyfile.c:3559 #, c-format msgid "key '%s.%s' is not a integer in range 0 to 2^32" -msgstr "'%s.%s' 不是在 0 到 2^32 范围内的一个整数" +msgstr "\"%s.%s\" 不是在 0 到 2^32 范围内的一个整数" -#: ../src/libnm-core-impl/nm-keyfile.c:3576 +#: ../src/libnm-core-impl/nm-keyfile.c:3575 #, c-format msgid "key '%s.%s' is not a valid endpoint" -msgstr "'%s.%s' 不是一个有效的端点" +msgstr "\"%s.%s\" 不是一个有效的端点" -#: ../src/libnm-core-impl/nm-keyfile.c:3602 +#: ../src/libnm-core-impl/nm-keyfile.c:3601 #, c-format msgid "key '%s.%s' has invalid allowed-ips" -msgstr "'%s.%s' 包括无效的 allowed-ips" +msgstr "\"%s.%s\" 包括无效的 allowed-ips" -#: ../src/libnm-core-impl/nm-keyfile.c:3617 +#: ../src/libnm-core-impl/nm-keyfile.c:3616 #, c-format msgid "peer '%s' is invalid: %s" -msgstr "peer '%s' 无效 : %s" +msgstr "对等端 \"%s\" 无效:%s" -#: ../src/libnm-core-impl/nm-keyfile.c:4108 -#, fuzzy, c-format +#: ../src/libnm-core-impl/nm-keyfile.c:4107 +#, c-format +#| msgid "rule is invalid: %s" msgid "the profile is not valid: %s" -msgstr "规则无效:%s" +msgstr "该配置集无效:%s" #: ../src/libnm-core-impl/nm-setting-6lowpan.c:78 #: ../src/libnm-core-impl/nm-setting-veth.c:80 @@ -1887,19 +1891,22 @@ msgstr "当证书不在 PKCS#11 令牌上时不支持密码" #: ../src/libnm-core-impl/nm-setting-8021x.c:2651 #: ../src/libnm-core-impl/nm-setting-8021x.c:2691 #: ../src/libnm-core-impl/nm-setting-8021x.c:2714 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2759 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2805 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2764 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2782 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2806 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2824 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2855 #: ../src/libnm-core-impl/nm-setting-adsl.c:165 #: ../src/libnm-core-impl/nm-setting-cdma.c:134 #: ../src/libnm-core-impl/nm-setting-cdma.c:143 -#: ../src/libnm-core-impl/nm-setting-connection.c:1085 -#: ../src/libnm-core-impl/nm-setting-connection.c:1128 -#: ../src/libnm-core-impl/nm-setting-connection.c:1323 +#: ../src/libnm-core-impl/nm-setting-connection.c:1083 +#: ../src/libnm-core-impl/nm-setting-connection.c:1126 +#: ../src/libnm-core-impl/nm-setting-connection.c:1321 #: ../src/libnm-core-impl/nm-setting-gsm.c:282 #: ../src/libnm-core-impl/nm-setting-gsm.c:337 #: ../src/libnm-core-impl/nm-setting-gsm.c:380 #: ../src/libnm-core-impl/nm-setting-gsm.c:389 -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5342 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5341 #: ../src/libnm-core-impl/nm-setting-ip4-config.c:206 #: ../src/libnm-core-impl/nm-setting-ip4-config.c:218 #: ../src/libnm-core-impl/nm-setting-pppoe.c:136 @@ -1907,8 +1914,8 @@ msgstr "当证书不在 PKCS#11 令牌上时不支持密码" #: ../src/libnm-core-impl/nm-setting-vpn.c:540 #: ../src/libnm-core-impl/nm-setting-vpn.c:550 #: ../src/libnm-core-impl/nm-setting-wimax.c:104 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:955 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:983 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:956 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:984 #: ../src/libnm-core-impl/nm-setting.c:1240 msgid "property is empty" msgstr "属性为空" @@ -1919,15 +1926,11 @@ msgstr "属性为空" msgid "has to match '%s' property for PKCS#12" msgstr "必须匹配 PKCS#12 的 \"%s\" 属性" -#: ../src/libnm-core-impl/nm-setting-8021x.c:2773 -msgid "exactly one property must be set" -msgstr "" - -#: ../src/libnm-core-impl/nm-setting-8021x.c:2883 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2933 msgid "can be enabled only on Ethernet connections" msgstr "只能为以太网连接启用" -#: ../src/libnm-core-impl/nm-setting-8021x.c:2904 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2954 #: ../src/libnm-core-impl/nm-setting-bluetooth.c:92 #: ../src/libnm-core-impl/nm-setting-infiniband.c:163 #: ../src/libnm-core-impl/nm-setting-infiniband.c:175 @@ -1937,38 +1940,38 @@ msgstr "只能为以太网连接启用" #: ../src/libnm-core-impl/nm-setting-olpc-mesh.c:121 #: ../src/libnm-core-impl/nm-setting-wifi-p2p.c:132 #: ../src/libnm-core-impl/nm-setting-wimax.c:116 -#: ../src/libnm-core-impl/nm-setting-wired.c:820 -#: ../src/libnm-core-impl/nm-setting-wired.c:833 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1008 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1020 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1032 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1045 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1058 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1089 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1156 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1205 +#: ../src/libnm-core-impl/nm-setting-wired.c:802 +#: ../src/libnm-core-impl/nm-setting-wired.c:815 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1009 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1021 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1033 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1046 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1059 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1090 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1141 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1190 #: ../src/libnm-core-impl/nm-setting-wireless.c:884 #: ../src/libnm-core-impl/nm-setting-wireless.c:896 #: ../src/libnm-core-impl/nm-setting-wireless.c:909 #: ../src/libnm-core-impl/nm-setting-wpan.c:161 -#: ../src/libnm-core-impl/nm-utils.c:4232 +#: ../src/libnm-core-impl/nm-utils.c:4454 msgid "property is invalid" msgstr "属性无效" -#: ../src/libnm-core-impl/nm-setting-8021x.c:2929 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2942 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2955 -#: ../src/libnm-core-impl/nm-setting-8021x.c:2989 -#: ../src/libnm-core-impl/nm-setting-8021x.c:3002 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2979 +#: ../src/libnm-core-impl/nm-setting-8021x.c:2992 +#: ../src/libnm-core-impl/nm-setting-8021x.c:3005 +#: ../src/libnm-core-impl/nm-setting-8021x.c:3039 +#: ../src/libnm-core-impl/nm-setting-8021x.c:3052 #: ../src/libnm-core-impl/nm-setting-adsl.c:177 #: ../src/libnm-core-impl/nm-setting-adsl.c:190 #: ../src/libnm-core-impl/nm-setting-bluetooth.c:127 -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:911 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:926 #, c-format msgid "'%s' is not a valid value for the property" msgstr "\"%s\" 不是该属性的有效取值" -#: ../src/libnm-core-impl/nm-setting-8021x.c:2968 +#: ../src/libnm-core-impl/nm-setting-8021x.c:3018 msgid "invalid auth flags" msgstr "无效的验证标记" @@ -1993,19 +1996,19 @@ msgid "'%s' is not a valid IPv4 address for '%s' option" msgstr "\"%s\" 不是 \"%s\" 选项的有效 IPv4 地址" #: ../src/libnm-core-impl/nm-setting-bond.c:531 -#, fuzzy, c-format +#, c-format msgid "missing option name" -msgstr "缺少文件名" +msgstr "缺少选项名" #: ../src/libnm-core-impl/nm-setting-bond.c:536 -#, fuzzy, c-format +#, c-format msgid "invalid option '%s'" -msgstr "无效操作: " +msgstr "无效选项 \"%s\"" #: ../src/libnm-core-impl/nm-setting-bond.c:572 -#, fuzzy, c-format +#, c-format msgid "invalid value '%s' for option '%s'" -msgstr "uint32 值 \"%s\" 对属性 \"%s\" 无效" +msgstr "值 \"%s\" 对选项 \"%s\" 无效" #: ../src/libnm-core-impl/nm-setting-bond.c:814 #, c-format @@ -2041,7 +2044,7 @@ msgstr "\"%s=%s\" 不是 \"%s\" 的有效配置" #: ../src/libnm-core-impl/nm-setting-bond.c:905 #, c-format msgid "'%s' option requires '%s' option to be enabled" -msgstr "'%s' 选项需要 '%s' 选项来启用" +msgstr "\"%s\" 选项需要 \"%s\" 选项来启用" #: ../src/libnm-core-impl/nm-setting-bond.c:922 #: ../src/libnm-core-impl/nm-setting-bond.c:933 @@ -2069,7 +2072,7 @@ msgstr "\"%s\" 选项应该为字符串" msgid "'%s' option is not valid with mode '%s'" msgstr "\"%s\" 选项在 \"%s\" 模式里无效" -#: ../src/libnm-core-impl/nm-setting-bridge-port.c:310 +#: ../src/libnm-core-impl/nm-setting-bridge-port.c:302 #: ../src/libnm-core-impl/nm-setting-ovs-bridge.c:151 #: ../src/libnm-core-impl/nm-setting-ovs-interface.c:289 #: ../src/libnm-core-impl/nm-setting-ovs-port.c:170 @@ -2078,7 +2081,7 @@ msgstr "\"%s\" 选项在 \"%s\" 模式里无效" msgid "missing setting" msgstr "缺少设置" -#: ../src/libnm-core-impl/nm-setting-bridge-port.c:320 +#: ../src/libnm-core-impl/nm-setting-bridge-port.c:312 #: ../src/libnm-core-impl/nm-setting-ovs-interface.c:312 #: ../src/libnm-core-impl/nm-setting-ovs-port.c:193 #: ../src/libnm-core-impl/nm-setting-team-port.c:317 @@ -2088,107 +2091,107 @@ msgid "" "Instead it is '%s'" msgstr "具有 \"%s\" 设置的连接必须将 slave-type 设置为 \"%s\"。而它是 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1175 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1165 #, c-format msgid "value '%d' is out of range <%d-%d>" -msgstr "值 '%d' 超出了范围 <%d-%d>" +msgstr "值 \"%d\" 超出了范围 <%d-%d>" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1194 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1184 msgid "is not a valid MAC address" msgstr "不是有效的 MAC 地址" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1238 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1228 msgid "the mask can't contain bits 0 (STP), 1 (MAC) or 2 (LACP)" msgstr "掩码不能包含位 0(STP)、1(MAC)或2(LACP)" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1260 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1250 msgid "is not a valid link local MAC address" msgstr "不是一个有效的链路本地 MAC 地址" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1272 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1262 msgid "is not a valid VLAN filtering protocol" msgstr "不是一个有效的 VLAN 过滤协议" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1284 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1274 msgid "is not a valid option" msgstr "不是一个有效的选项" -#: ../src/libnm-core-impl/nm-setting-bridge.c:1296 +#: ../src/libnm-core-impl/nm-setting-bridge.c:1286 #, c-format msgid "'%s' option must be a power of 2" -msgstr "'%s' 选项需要是 2 个指数" +msgstr "\"%s\" 选项需要是 2 个指数" -#: ../src/libnm-core-impl/nm-setting-connection.c:968 +#: ../src/libnm-core-impl/nm-setting-connection.c:967 #, c-format msgid "setting required for connection of type '%s'" msgstr "类型为 \"%s\" 的连接需要设置" -#: ../src/libnm-core-impl/nm-setting-connection.c:999 +#: ../src/libnm-core-impl/nm-setting-connection.c:998 #, c-format msgid "Unknown slave type '%s'" msgstr "未知的从类型 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-connection.c:1014 +#: ../src/libnm-core-impl/nm-setting-connection.c:1013 #, c-format msgid "Slave connections need a valid '%s' property" msgstr "从连接需要有效的 \"%s\" 属性" -#: ../src/libnm-core-impl/nm-setting-connection.c:1038 +#: ../src/libnm-core-impl/nm-setting-connection.c:1037 #, c-format msgid "Cannot set '%s' without '%s'" msgstr "没有 \"%s\" 无法设置 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-connection.c:1097 +#: ../src/libnm-core-impl/nm-setting-connection.c:1095 #, c-format msgid "'%s' is not a valid UUID" msgstr "\"%s\"不是有效的 UUID" -#: ../src/libnm-core-impl/nm-setting-connection.c:1142 +#: ../src/libnm-core-impl/nm-setting-connection.c:1140 #, c-format msgid "connection type '%s' is not valid" msgstr "连接类型 \"%s\" 无效" -#: ../src/libnm-core-impl/nm-setting-connection.c:1248 +#: ../src/libnm-core-impl/nm-setting-connection.c:1246 #, c-format msgid "'%s' connections must be enslaved to '%s', not '%s'" msgstr "\"%s\" 连接必须从属于 \"%s\",而不是 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-connection.c:1264 +#: ../src/libnm-core-impl/nm-setting-connection.c:1262 #, c-format msgid "metered value %d is not valid" msgstr "计量值 %d 无效" -#: ../src/libnm-core-impl/nm-setting-connection.c:1278 -#: ../src/libnm-core-impl/nm-setting-connection.c:1292 -#: ../src/libnm-core-impl/nm-setting-connection.c:1309 +#: ../src/libnm-core-impl/nm-setting-connection.c:1276 +#: ../src/libnm-core-impl/nm-setting-connection.c:1290 +#: ../src/libnm-core-impl/nm-setting-connection.c:1307 #, c-format msgid "value %d is not valid" msgstr "值 %d 无效" -#: ../src/libnm-core-impl/nm-setting-connection.c:1337 +#: ../src/libnm-core-impl/nm-setting-connection.c:1335 msgid "DHCP option cannot be longer than 255 characters" -msgstr "DHCP选项不能多于 255 个字符" +msgstr "DHCP 选项不能多于 255 个字符" -#: ../src/libnm-core-impl/nm-setting-connection.c:1348 +#: ../src/libnm-core-impl/nm-setting-connection.c:1346 msgid "MUD URL is not a valid URL" msgstr "MUD URL不是一个有效的URL" -#: ../src/libnm-core-impl/nm-setting-connection.c:1368 -#, fuzzy +#: ../src/libnm-core-impl/nm-setting-connection.c:1366 +#| msgid "invalid permission \"%s\"" msgid "invalid permissions not in format \"user:$UNAME[:]\"" -msgstr "无效的权限 \"%s\"" +msgstr "无效的权限,没有以 \"user:$UNAME[:]\" 为格式" -#: ../src/libnm-core-impl/nm-setting-connection.c:1397 +#: ../src/libnm-core-impl/nm-setting-connection.c:1395 #, c-format msgid "property type should be set to '%s'" msgstr "属性类型应该设置为 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-connection.c:1415 +#: ../src/libnm-core-impl/nm-setting-connection.c:1413 #, c-format msgid "slave-type '%s' requires a '%s' setting in the connection" msgstr "slave-type \"%s\" 要求连接中有 \"%s\" 设置" -#: ../src/libnm-core-impl/nm-setting-connection.c:1426 +#: ../src/libnm-core-impl/nm-setting-connection.c:1424 #, c-format msgid "" "Detect a slave connection with '%s' set and a port type '%s'. '%s' should be " @@ -2196,15 +2199,11 @@ msgid "" msgstr "" "检测到设置了 \"%s\" 和端口类型为 \"%s\" 的从连接。\"%s\" 应该设置为 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-connection.c:1452 +#: ../src/libnm-core-impl/nm-setting-connection.c:1450 #, c-format msgid "A slave connection with '%s' set to '%s' cannot have a '%s' setting" msgstr "\"%s\" 设为 \"%s\" 的从连接不能有个 \"%s\" 设置" -#: ../src/libnm-core-impl/nm-setting-connection.c:1469 -msgid "UUID needs normalization" -msgstr "" - #: ../src/libnm-core-impl/nm-setting-dcb.c:483 msgid "flags invalid" msgstr "标志无效" @@ -2235,23 +2234,19 @@ msgstr "属性无效" msgid "property missing" msgstr "缺少属性" -#: ../src/libnm-core-impl/nm-setting-ethtool.c:311 +#: ../src/libnm-core-impl/nm-setting-ethtool.c:291 msgid "unsupported ethtool setting" msgstr "不支持的 ethtool 设置" -#: ../src/libnm-core-impl/nm-setting-ethtool.c:320 +#: ../src/libnm-core-impl/nm-setting-ethtool.c:300 msgid "setting has invalid variant type" msgstr "设置有无效的变量类型" -#: ../src/libnm-core-impl/nm-setting-ethtool.c:332 +#: ../src/libnm-core-impl/nm-setting-ethtool.c:312 msgid "coalesce option must be either 0 or 1" -msgstr "coalesce 选项必须是 0 或 1。" - -#: ../src/libnm-core-impl/nm-setting-ethtool.c:349 -msgid "pause-autoneg cannot be enabled when setting rx/tx options" -msgstr "" +msgstr "coalesce 选项必须是 0 或 1" -#: ../src/libnm-core-impl/nm-setting-ethtool.c:374 +#: ../src/libnm-core-impl/nm-setting-ethtool.c:335 #, c-format msgid "unknown ethtool option '%s'" msgstr "未知的 ethtool 选项 \"%s\"" @@ -2341,7 +2336,7 @@ msgstr "无效 IPv6 地址前缀 \"%u\"" #: ../src/libnm-core-impl/nm-setting-ip-config.c:154 #, c-format msgid "Invalid routing metric '%s'" -msgstr "无效的路由度量 \"%s\"" +msgstr "无效的路由跃点数 \"%s\"" #: ../src/libnm-core-impl/nm-setting-ip-config.c:1318 #: ../src/libnm-core-impl/nm-setting-sriov.c:399 @@ -2400,9 +2395,9 @@ msgid "missing table" msgstr "缺少表" #: ../src/libnm-core-impl/nm-setting-ip-config.c:2654 -#, fuzzy +#| msgid "invalid action: " msgid "invalid action type" -msgstr "无效操作: " +msgstr "无效的操作类型" #: ../src/libnm-core-impl/nm-setting-ip-config.c:2663 msgid "has from/src but the prefix-length is zero" @@ -2473,21 +2468,21 @@ msgstr "重复的 %s" #: ../src/libnm-core-impl/nm-setting-ip-config.c:2941 #, c-format msgid "invalid variant type '%s' for \"%s\"" -msgstr "无效的变体类型 '%s'(对于 \"%s\")" +msgstr "无效的变体类型 \"%s\"(对于 \"%s\")" #: ../src/libnm-core-impl/nm-setting-ip-config.c:2952 -#, fuzzy +#| msgid "missing \"" msgid "missing \"family\"" -msgstr "缺少 \"" +msgstr "缺少 \"family\"" #: ../src/libnm-core-impl/nm-setting-ip-config.c:2960 -#, fuzzy +#| msgid "invalid address family" msgid "invalid \"family\"" -msgstr "无效的 地址家族" +msgstr "无效的 \"family\"" #: ../src/libnm-core-impl/nm-setting-ip-config.c:3017 msgid "\"uid-range-start\" is greater than \"uid-range-end\"" -msgstr "" +msgstr "\"uid-range-start\" 大于 \"uid-range-end\"" #: ../src/libnm-core-impl/nm-setting-ip-config.c:3211 msgid "Unsupported to-string-flags argument" @@ -2497,126 +2492,126 @@ msgstr "不支持的 to-string-flags 参数" msgid "Unsupported extra-argument" msgstr "不支持的 extra-argument" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3524 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3523 #, c-format msgid "unsupported key \"%s\"" msgstr "不支持的 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3531 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3530 #, c-format msgid "duplicate key \"%s\"" msgstr "重复的 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3538 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3537 #, c-format msgid "invalid value for \"%s\"" msgstr "\"%s\" 无效的值" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3550 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3549 msgid "empty text does not describe a rule" msgstr "空文本没有描述一个规则" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3558 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3557 #, c-format msgid "missing argument for \"%s\"" msgstr "\"%s\" 缺少参数" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3572 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3571 msgid "invalid \"from\" part" msgstr "无效的 \"from\" 部分" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3588 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3587 msgid "invalid \"to\" part" msgstr "无效的 \"to\" 部分" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3599 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3598 #, c-format msgid "cannot detect address family for rule" msgstr "无法为规则检测到地址家族" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3666 -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3756 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3665 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3755 #, c-format msgid "rule is invalid: %s" msgstr "规则无效:%s" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:3737 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:3736 msgid "invalid address family" msgstr "无效的 地址家族" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5010 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5009 #, c-format msgid "rule #%u is invalid: %s" msgstr "规则 #%u 无效:%s" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5358 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5357 #, c-format msgid "%d. DNS server address is invalid" msgstr "%d。DNS 服务器地址无效" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5377 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5376 #, c-format msgid "%d. IP address is invalid" msgstr "%d。IP 地址无效" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5392 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5391 #, c-format msgid "%d. IP address has 'label' property with invalid type" msgstr "%d。IP 地址有无效类型的 \"label\" 属性" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5404 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5403 #, c-format msgid "%d. IP address has invalid label '%s'" msgstr "%d。IP 地址有无效标签 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5422 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5421 msgid "gateway cannot be set if there are no addresses configured" msgstr "如果没有配置地址,网关会无法设置" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5434 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5433 msgid "gateway is invalid" msgstr "网关无效" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5452 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5451 #, c-format msgid "%d. route is invalid" msgstr "%d。路由无效" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5465 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5464 #, c-format msgid "invalid attribute: %s" msgstr "无效的属性:%s" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5485 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5484 #, c-format msgid "%u. rule has wrong address-family" msgstr "%u. 规则带有错误的地址家族" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5497 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5496 #, c-format msgid "%u. rule is invalid: %s" msgstr "%u. 规则无效:%s" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5513 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5512 #, c-format msgid "'%s' is not a valid IAID" -msgstr "'%s' 不是一个有效的 IAID" +msgstr "\"%s\" 不是一个有效的 IAID" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5527 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5526 #, c-format msgid "the property cannot be set when '%s' is disabled" -msgstr "当 '%s' 被禁用时不能设置这个属性" +msgstr "当 \"%s\" 被禁用时不能设置这个属性" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5552 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5551 msgid "the property is currently supported only for DHCPv4" -msgstr "" +msgstr "该属性当前只被 DHCPv4 支持" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5569 -#, fuzzy, c-format +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5568 +#, c-format msgid "'%s' is not a valid IP or subnet" -msgstr "\"%s\" 不是有效的 IP 地址" +msgstr "\"%s\" 不是有效的 IP 或子网" -#: ../src/libnm-core-impl/nm-setting-ip-config.c:5585 +#: ../src/libnm-core-impl/nm-setting-ip-config.c:5584 #, c-format msgid "a gateway is incompatible with '%s'" msgstr "网关与 \"%s\" 不兼容" @@ -2806,9 +2801,9 @@ msgid "key contains invalid characters" msgstr "密钥包含无效的字符" #: ../src/libnm-core-impl/nm-setting-ovs-external-ids.c:123 -#, fuzzy +#| msgid "key cannot contain \"..\"" msgid "key cannot start with \"NM.\"" -msgstr "密钥不能包含 \"..\"" +msgstr "密钥不能以 \"NM.\" 开头" #: ../src/libnm-core-impl/nm-setting-ovs-external-ids.c:153 #: ../src/libnm-core-impl/nm-setting-user.c:180 @@ -2842,6 +2837,8 @@ msgid "" "OVS external IDs can only be added to a profile of type OVS bridge/port/" "interface or to OVS system interface" msgstr "" +"OVS 外部 ID 只能添加到 OVS 桥接/端口/接口类型的配置集,或者添加到 OVS 系统接" +"口" #: ../src/libnm-core-impl/nm-setting-ovs-interface.c:93 #, c-format @@ -2866,7 +2863,7 @@ msgstr "\"%s\" 类型的连接不能有 ovs-interface.type \"%s\"" #: ../src/libnm-core-impl/nm-setting-ovs-interface.c:170 #, c-format msgid "A connection can not have both '%s' and '%s' settings at the same time" -msgstr "一个连接不能同时设置 '%s' 和 '%s'" +msgstr "一个连接不能同时设置 \"%s\" 和 \"%s\"" #: ../src/libnm-core-impl/nm-setting-ovs-interface.c:184 #, c-format @@ -2881,7 +2878,7 @@ msgstr "" #, c-format msgid "" "A connection with '%s' setting needs to be of '%s' interface type, not '%s'" -msgstr "一个带有 '%s' 设置的连接需要是 '%s' 接口类型,而不是 '%s'" +msgstr "一个带有 \"%s\" 设置的连接需要是 \"%s\" 接口类型,而不是 \"%s\"" #: ../src/libnm-core-impl/nm-setting-ovs-interface.c:222 #, c-format @@ -2927,7 +2924,7 @@ msgstr "\"%s\" 在 bond_mode 里不允许" #: ../src/libnm-core-impl/nm-setting-ppp.c:335 #, c-format msgid "'%d' is out of valid range <128-16384>" -msgstr "'%d' 超出了有效范围 <128-16384>" +msgstr "\"%d\" 超出了有效范围 <128-16384>" #: ../src/libnm-core-impl/nm-setting-ppp.c:348 #, c-format @@ -2961,13 +2958,13 @@ msgid "the script lacks FindProxyForURL function" msgstr "脚本缺少 FindProxyForURL 功能" #: ../src/libnm-core-impl/nm-setting-sriov.c:424 -#: ../src/libnm-core-impl/nm-setting-wired.c:787 -#: ../src/libnm-core-impl/nm-setting-wired.c:803 -#: ../src/libnm-core-impl/nm-setting-wired.c:877 -#: ../src/libnm-core-impl/nm-setting-wired.c:935 +#: ../src/libnm-core-impl/nm-setting-wired.c:769 +#: ../src/libnm-core-impl/nm-setting-wired.c:785 +#: ../src/libnm-core-impl/nm-setting-wired.c:859 +#: ../src/libnm-core-impl/nm-setting-wired.c:917 #: ../src/libnm-core-impl/nm-setting-wireless.c:944 #: ../src/libnm-core-impl/nm-setting-wireless.c:963 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:4125 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:4053 #, c-format msgid "'%s' is not a valid MAC address" msgstr "\"%s\" 不是有效的 MAC 地址" @@ -3079,9 +3076,10 @@ msgid "maximum number of user data entries reached" msgstr "已达到最大的用户数据输入项" #: ../src/libnm-core-impl/nm-setting-veth.c:89 -#, fuzzy, c-format +#, c-format +#| msgid "'%s' is not a valid interface type" msgid "'%s' is not a valid interface name" -msgstr "\"%s\" 不是有效的接口类型" +msgstr "\"%s\" 不是有效的接口名称" #: ../src/libnm-core-impl/nm-setting-vlan.c:632 #, c-format @@ -3129,48 +3127,51 @@ msgstr "表大小不能为零" #: ../src/libnm-core-impl/nm-setting-vxlan.c:329 #: ../src/libnm-core-impl/nm-setting-vxlan.c:340 -#, fuzzy, c-format +#, c-format +#| msgid "'%s' is not a valid IP%c address" msgid "'%s' is not a valid IP%s address" -msgstr "\"%s\" 不是有效的 IP%c 地址" +msgstr "\"%s\" 不是有效的 IP%s 地址" #: ../src/libnm-core-impl/nm-setting-vxlan.c:363 #, c-format msgid "%d is greater than local port max %d" msgstr "%d 大于本地端口最大值 %d" -#: ../src/libnm-core-impl/nm-setting-wired.c:767 +#: ../src/libnm-core-impl/nm-setting-wired.c:749 #, c-format msgid "'%s' is not a valid Ethernet port value" msgstr "\"%s\" 不是有效的以太网端口值" -#: ../src/libnm-core-impl/nm-setting-wired.c:777 +#: ../src/libnm-core-impl/nm-setting-wired.c:759 #, c-format msgid "'%s' is not a valid duplex value" msgstr "\"%s\"不是有效的双工值" -#: ../src/libnm-core-impl/nm-setting-wired.c:850 -#, fuzzy, c-format +#: ../src/libnm-core-impl/nm-setting-wired.c:832 +#, c-format +#| msgid "invalid key '%s.%s'" msgid "invalid key '%s'" -msgstr "无效的密钥 \"%s.%s\"" +msgstr "无效的密钥 \"%s\"" -#: ../src/libnm-core-impl/nm-setting-wired.c:862 -#, fuzzy, c-format +#: ../src/libnm-core-impl/nm-setting-wired.c:844 +#, c-format +#| msgid "invalid value for \"%s\"" msgid "invalid value for key '%s'" -msgstr "\"%s\" 无效的值" +msgstr "值对于密钥 \"%s\" 无效" -#: ../src/libnm-core-impl/nm-setting-wired.c:911 +#: ../src/libnm-core-impl/nm-setting-wired.c:893 msgid "Wake-on-LAN mode 'default' and 'ignore' are exclusive flags" msgstr "LAN 唤醒模式 \"default\" 和 \"ignore\" 是相互排斥的标记" -#: ../src/libnm-core-impl/nm-setting-wired.c:923 +#: ../src/libnm-core-impl/nm-setting-wired.c:905 msgid "Wake-on-LAN password can only be used with magic packet mode" msgstr "LAN 唤醒密码只能在幻数据包模式使用" -#: ../src/libnm-core-impl/nm-setting-wired.c:954 +#: ../src/libnm-core-impl/nm-setting-wired.c:936 msgid "both speed and duplex should have a valid value or both should be unset" msgstr "速度和双工都应设定有效值或者都保持未设定" -#: ../src/libnm-core-impl/nm-setting-wired.c:955 +#: ../src/libnm-core-impl/nm-setting-wired.c:937 msgid "both speed and duplex are required for static link configuration" msgstr "静态链路配置需要设置速度和双工" @@ -3199,93 +3200,90 @@ msgstr "peer 的 allowed-ip 无效的 IP 地址 \"%s\"" msgid "invalid preshared-key-flags for peer" msgstr "peer 无效的 preshared-key-flags" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1598 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1587 #, c-format msgid "peer #%u has no public-key" msgstr "peer #%u 没有 public-key" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1611 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1600 #, c-format msgid "peer #%u has invalid public-key" msgstr "peer #%u 带有无效的 public-key" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1627 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1616 #, c-format msgid "peer #%u has invalid endpoint" msgstr "peer #%u 带有无效的端点" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1659 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1648 #, c-format msgid "peer #%u has invalid allowed-ips setting" msgstr "peer #%u 带有无效的 allowed-ips 设置" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1673 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1662 #, c-format msgid "peer #%u is invalid: %s" msgstr "peer #%u 无效:%s" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1744 -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1763 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1733 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1752 #, c-format msgid "method \"%s\" is not supported for WireGuard" msgstr "方法 \"%s\" 不支持 WireGuard" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1787 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1776 msgid "key must be 32 bytes base64 encoded" msgstr "密钥需要是基于 base64 编码的 32 个字节" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1918 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1906 msgid "invalid peer secrets" msgstr "无效的 peer secrets" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1944 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1932 #, c-format msgid "peer #%u lacks public-key" msgstr "peer #%u 缺少 public-key" -#: ../src/libnm-core-impl/nm-setting-wireguard.c:1961 +#: ../src/libnm-core-impl/nm-setting-wireguard.c:1949 #, c-format msgid "non-existing peer '%s'" -msgstr "不存在 peer '%s'" +msgstr "不存在 peer \"%s\"" -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:925 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:912 #, c-format msgid "'%s' is not a valid value for '%s' mode connections" msgstr "\"%s\" 不是 \"%s\" 模式连接的有效值" -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:941 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:942 #, c-format msgid "'%s' security requires '%s=%s'" msgstr "\"%s\" 安全需要 \"%s=%s\"" -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:970 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:971 #, c-format msgid "'%s' security requires '%s' setting presence" msgstr "\"%s\" 安全需要 \"%s\" 设置存在" -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:995 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:996 #, c-format msgid "'%d' value is out of range <0-3>" -msgstr "'%d' 值超出了 范围 <0-3>" +msgstr "\"%d\" 值超出了 范围 <0-3>" -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1072 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1073 #, c-format msgid "'%s' can only be used with '%s=%s' (WEP)" msgstr "\"%s\" 只能与 \"%s=%s\"(WEP)共用" -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1109 -#, fuzzy, c-format -msgid "" -"'%s' can only be used with 'owe', 'wpa-psk', 'sae', 'wpa-eap' or 'wpa-eap-" -"suite-b-192' key management" -msgstr "'%s' 只能用于 'wpa-eap'、'wpa-psk' 或 'sae' 密钥管理 " - -#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1127 +#: ../src/libnm-core-impl/nm-setting-wireless-security.c:1111 #, c-format +#| msgid "" +#| "'%s' can only be used with 'wpa-eap', 'wpa-psk' or 'sae' key management " msgid "" -"pmf can only be 'default' or 'required' when using 'owe', 'sae' or 'wpa-eap-" -"suite-b-192' key management" +"'%s' can only be used with 'wpa-eap', 'wpa-eap-suite-b-192', 'wpa-psk' or " +"'sae' key management " msgstr "" +"\"%s\" 只能用于 \"wpa-eap\"、\"wpa-eap-suite-b-192\"、\"wpa-psk\" 或 \"sae\" " +"密钥管理 " #: ../src/libnm-core-impl/nm-setting-wireless.c:813 #, c-format @@ -3305,7 +3303,7 @@ msgstr "\"%s\" 需要设置 \"%s\" 属性" #: ../src/libnm-core-impl/nm-setting-wireless.c:869 #, c-format msgid "'%s' requires '%s' and '%s' property" -msgstr "'%s' 需要 '%s' 和 '%s' 属性" +msgstr "\"%s\" 需要 \"%s\" 和 \"%s\" 属性" #: ../src/libnm-core-impl/nm-setting-wireless.c:981 #: ../src/libnm-core-impl/nm-team-utils.c:2253 @@ -3323,7 +3321,7 @@ msgstr "WLAN 唤醒正在尝试设定未知的标记" #: ../src/libnm-core-impl/nm-setting-wireless.c:1018 msgid "AP isolation can be set only in AP mode" -msgstr "" +msgstr "AP 隔离只能在 AP 模式下设定" #: ../src/libnm-core-impl/nm-setting-wireless.c:1042 #, c-format @@ -3332,7 +3330,7 @@ msgstr "mac-address-randomization 和 cloned-mac-address 的值冲突" #: ../src/libnm-core-impl/nm-setting-wpan.c:171 msgid "page must be defined along with a channel" -msgstr "页需要和一个频道定义" +msgstr "页需要和一个信道定义" #: ../src/libnm-core-impl/nm-setting-wpan.c:180 #, c-format @@ -3342,7 +3340,7 @@ msgstr "页需要在 %d 和 %d 之间" #: ../src/libnm-core-impl/nm-setting-wpan.c:191 #, c-format msgid "channel must not be between %d and %d" -msgstr "频道不能在 %d 和 %d 之间" +msgstr "信道不能在 %d 和 %d 之间" #: ../src/libnm-core-impl/nm-setting.c:795 #, c-format @@ -3446,228 +3444,228 @@ msgstr "无效的 D-Bus 类型 \"%s\"" msgid "invalid link-watchers: %s" msgstr "无效的 link-watcher:%s" -#: ../src/libnm-core-impl/nm-utils.c:2227 +#: ../src/libnm-core-impl/nm-utils.c:2233 #, c-format msgid "'%s' is not a valid handle." msgstr "\"%s\" 不是有效的处理模块。" -#: ../src/libnm-core-impl/nm-utils.c:2375 +#: ../src/libnm-core-impl/nm-utils.c:2381 #, c-format msgid "'%s' unexpected: parent already specified." msgstr "意外的 \"%s\":已指定上级。" -#: ../src/libnm-core-impl/nm-utils.c:2393 +#: ../src/libnm-core-impl/nm-utils.c:2399 #, c-format msgid "invalid handle: '%s'" msgstr "无效的句柄:\"%s\"" -#: ../src/libnm-core-impl/nm-utils.c:2415 +#: ../src/libnm-core-impl/nm-utils.c:2421 msgid "parent not specified." msgstr "未指定上级。" -#: ../src/libnm-core-impl/nm-utils.c:2479 +#: ../src/libnm-core-impl/nm-utils.c:2485 #, c-format msgid "unsupported qdisc option: '%s'." msgstr "不支持的排队规则(qdisc)选项:\"%s\"。" -#: ../src/libnm-core-impl/nm-utils.c:2609 +#: ../src/libnm-core-impl/nm-utils.c:2615 msgid "action name missing." msgstr "操作名缺失。" -#: ../src/libnm-core-impl/nm-utils.c:2634 +#: ../src/libnm-core-impl/nm-utils.c:2641 #, c-format msgid "unsupported action option: '%s'." msgstr "不支持的操作选项:\"%s\"。" -#: ../src/libnm-core-impl/nm-utils.c:2771 +#: ../src/libnm-core-impl/nm-utils.c:2780 msgid "invalid action: " -msgstr "无效操作: " +msgstr "无效操作:" -#: ../src/libnm-core-impl/nm-utils.c:2775 +#: ../src/libnm-core-impl/nm-utils.c:2784 #, c-format msgid "unsupported tfilter option: '%s'." msgstr "不支持的流量过滤器(tfilter)选项:\"%s\"。" -#: ../src/libnm-core-impl/nm-utils.c:3163 +#: ../src/libnm-core-impl/nm-utils.c:3385 #, c-format msgid "failed stat file %s: %s" msgstr "统计文件 %s 失败:%s" -#: ../src/libnm-core-impl/nm-utils.c:3174 +#: ../src/libnm-core-impl/nm-utils.c:3396 #, c-format msgid "not a file (%s)" msgstr "不是一个文件(%s)" -#: ../src/libnm-core-impl/nm-utils.c:3185 +#: ../src/libnm-core-impl/nm-utils.c:3407 #, c-format msgid "invalid file owner %d for %s" msgstr "对 %d%s 无效的文件所有者" -#: ../src/libnm-core-impl/nm-utils.c:3197 +#: ../src/libnm-core-impl/nm-utils.c:3419 #, c-format msgid "file permissions for %s" msgstr "%s 的文件权限" -#: ../src/libnm-core-impl/nm-utils.c:3207 +#: ../src/libnm-core-impl/nm-utils.c:3429 #, c-format msgid "reject %s" msgstr "拒绝 %s" -#: ../src/libnm-core-impl/nm-utils.c:3227 +#: ../src/libnm-core-impl/nm-utils.c:3449 #, c-format msgid "path is not absolute (%s)" msgstr "路径不是绝对路径(%s)" -#: ../src/libnm-core-impl/nm-utils.c:3242 +#: ../src/libnm-core-impl/nm-utils.c:3464 #, c-format msgid "Plugin file does not exist (%s)" msgstr "插件文件不存在(%s)" -#: ../src/libnm-core-impl/nm-utils.c:3251 +#: ../src/libnm-core-impl/nm-utils.c:3473 #, c-format msgid "Plugin is not a valid file (%s)" msgstr "插件不是有效的文件(%s)" -#: ../src/libnm-core-impl/nm-utils.c:3262 +#: ../src/libnm-core-impl/nm-utils.c:3484 #, c-format msgid "libtool archives are not supported (%s)" msgstr "不支持 libtool 归档(%s)" -#: ../src/libnm-core-impl/nm-utils.c:3339 +#: ../src/libnm-core-impl/nm-utils.c:3561 #, c-format msgid "Could not find \"%s\" binary" msgstr "无法找到 \"%s\" 二进制文件" -#: ../src/libnm-core-impl/nm-utils.c:4183 +#: ../src/libnm-core-impl/nm-utils.c:4405 msgid "unknown secret flags" msgstr "未知的 secret 标记" -#: ../src/libnm-core-impl/nm-utils.c:4193 +#: ../src/libnm-core-impl/nm-utils.c:4415 msgid "conflicting secret flags" msgstr "冲突的 secret 标记" -#: ../src/libnm-core-impl/nm-utils.c:4204 +#: ../src/libnm-core-impl/nm-utils.c:4426 msgid "secret flags must not be \"not-required\"" msgstr "secret 标记不能为 \"not-required\"" -#: ../src/libnm-core-impl/nm-utils.c:4212 +#: ../src/libnm-core-impl/nm-utils.c:4434 msgid "unsupported secret flags" msgstr "不支持的 secret 标记" -#: ../src/libnm-core-impl/nm-utils.c:4242 +#: ../src/libnm-core-impl/nm-utils.c:4464 msgid "can't be simultaneously disabled and enabled" msgstr "不能同时启用和禁用" -#: ../src/libnm-core-impl/nm-utils.c:4250 +#: ../src/libnm-core-impl/nm-utils.c:4472 msgid "WPS is required" msgstr "需要 WPS" -#: ../src/libnm-core-impl/nm-utils.c:4318 +#: ../src/libnm-core-impl/nm-utils.c:4540 #, c-format msgid "not a valid ethernet MAC address for mask at position %lld" msgstr "对于 %lld 位置的掩码,该以太网 MAC 地址无效" -#: ../src/libnm-core-impl/nm-utils.c:4337 +#: ../src/libnm-core-impl/nm-utils.c:4559 #, c-format msgid "not a valid ethernet MAC address #%u at position %lld" msgstr "在位置 %u%lld,该以太网 MAC 地址 # 无效" -#: ../src/libnm-core-impl/nm-utils.c:4952 +#: ../src/libnm-core-impl/nm-utils.c:5191 msgid "not valid utf-8" msgstr "不是有效的 utf-8" -#: ../src/libnm-core-impl/nm-utils.c:4973 -#: ../src/libnm-core-impl/nm-utils.c:5026 +#: ../src/libnm-core-impl/nm-utils.c:5212 +#: ../src/libnm-core-impl/nm-utils.c:5265 msgid "is not a JSON object" msgstr "不是 JSON 对象" -#: ../src/libnm-core-impl/nm-utils.c:5002 +#: ../src/libnm-core-impl/nm-utils.c:5241 msgid "value is NULL" msgstr "值为 NULL" -#: ../src/libnm-core-impl/nm-utils.c:5002 +#: ../src/libnm-core-impl/nm-utils.c:5241 msgid "value is empty" msgstr "值为空" -#: ../src/libnm-core-impl/nm-utils.c:5014 +#: ../src/libnm-core-impl/nm-utils.c:5253 #, c-format msgid "invalid JSON at position %d (%s)" msgstr "位置 %d 有无效的 JSON(%s)" -#: ../src/libnm-core-impl/nm-utils.c:5142 -#: ../src/libnm-core-impl/nm-utils.c:5162 +#: ../src/libnm-core-impl/nm-utils.c:5381 +#: ../src/libnm-core-impl/nm-utils.c:5401 msgid "unterminated escape sequence" msgstr "未结束的转义序列" -#: ../src/libnm-core-impl/nm-utils.c:5188 +#: ../src/libnm-core-impl/nm-utils.c:5427 #, c-format msgid "unknown attribute '%s'" msgstr "未知属性 \"%s\"" -#: ../src/libnm-core-impl/nm-utils.c:5206 +#: ../src/libnm-core-impl/nm-utils.c:5445 #, c-format msgid "missing key-value separator '%c' after '%s'" msgstr "在 \"%2$s\" 后缺少键值对分隔符 \"%1$c\"" -#: ../src/libnm-core-impl/nm-utils.c:5226 +#: ../src/libnm-core-impl/nm-utils.c:5465 #, c-format msgid "invalid uint32 value '%s' for attribute '%s'" msgstr "uint32 值 \"%1$s\" 对属性 \"%2$s\" 无效" -#: ../src/libnm-core-impl/nm-utils.c:5240 +#: ../src/libnm-core-impl/nm-utils.c:5479 #, c-format msgid "invalid int32 value '%s' for attribute '%s'" msgstr "uint32 值 \"%s\" 对属性 \"%s\" 无效" -#: ../src/libnm-core-impl/nm-utils.c:5253 +#: ../src/libnm-core-impl/nm-utils.c:5492 #, c-format msgid "invalid uint64 value '%s' for attribute '%s'" msgstr "uint8 值 \"%s\" 对属性 \"%s\" 无效" -#: ../src/libnm-core-impl/nm-utils.c:5266 +#: ../src/libnm-core-impl/nm-utils.c:5505 #, c-format msgid "invalid uint8 value '%s' for attribute '%s'" msgstr "uint8 值 \"%1$s\" 对属性 \"%2$s\" 无效" -#: ../src/libnm-core-impl/nm-utils.c:5280 +#: ../src/libnm-core-impl/nm-utils.c:5519 #, c-format msgid "invalid boolean value '%s' for attribute '%s'" msgstr "布尔值 \"%1$s\" 对属性 \"%2$s\" 无效" -#: ../src/libnm-core-impl/nm-utils.c:5294 +#: ../src/libnm-core-impl/nm-utils.c:5533 #, c-format msgid "unsupported attribute '%s' of type '%s'" msgstr "不支持类型 \"%2$s\" 的属性 \"%1$s\"" -#: ../src/libnm-core-impl/nm-utils.c:5596 +#: ../src/libnm-core-impl/nm-utils.c:5835 #, c-format msgid "Bridge VLANs %d and %d are not sorted by ascending vid" msgstr "网桥 VLANs %d 和 %d 没有根据生序 vid 进行排序" -#: ../src/libnm-core-impl/nm-utils.c:5620 +#: ../src/libnm-core-impl/nm-utils.c:5859 #, c-format msgid "duplicate bridge VLAN vid %u" msgstr "重复的网桥 VLAN vid %u" -#: ../src/libnm-core-impl/nm-utils.c:5632 +#: ../src/libnm-core-impl/nm-utils.c:5871 msgid "only one VLAN can be the PVID" msgstr "只有一个 VLAN 可以是 PVID" -#: ../src/libnm-core-impl/nm-utils.c:5677 +#: ../src/libnm-core-impl/nm-utils.c:5916 #, c-format msgid "unknown flags 0x%x" msgstr "未知标志 0x%x" -#: ../src/libnm-core-impl/nm-utils.c:5689 +#: ../src/libnm-core-impl/nm-utils.c:5928 msgid "" "'fqdn-no-update' and 'fqdn-serv-update' flags cannot be set at the same time" -msgstr "不能同时设置 'fqdn-no-update' 和 'fqdn-serv-update' 标志" +msgstr "不能同时设置 \"fqdn-no-update\" 和 \"fqdn-serv-update\" 标志" -#: ../src/libnm-core-impl/nm-utils.c:5700 +#: ../src/libnm-core-impl/nm-utils.c:5939 msgid "'fqdn-clear-flags' flag is incompatible with other FQDN flags" -msgstr "'fqdn-clear-flags' 标志与其他 FQDN 标志不兼容" +msgstr "\"fqdn-clear-flags\" 标志与其他 FQDN 标志不兼容" -#: ../src/libnm-core-impl/nm-utils.c:5708 +#: ../src/libnm-core-impl/nm-utils.c:5947 msgid "DHCPv6 does not support the E (encoded) FQDN flag" msgstr "DHCPv6 不支持 E(编码)FQDN 标志" @@ -3753,33 +3751,33 @@ msgstr "缺少 VPN 插件信息的名称" msgid "missing service for VPN plugin info" msgstr "缺少 VPN 插件信息的服务" -#: ../src/libnm-glib-aux/nm-shared-utils.c:2453 +#: ../src/libnm-glib-aux/nm-shared-utils.c:2367 #, c-format msgid "object class '%s' has no property named '%s'" msgstr "对象类 \"%s\" 没有名为 \"%s\" 的属性" -#: ../src/libnm-glib-aux/nm-shared-utils.c:2462 +#: ../src/libnm-glib-aux/nm-shared-utils.c:2376 #, c-format msgid "property '%s' of object class '%s' is not writable" msgstr "对象类 \"%2$s\" 的 \"%1$s\" 属性是不可写的" -#: ../src/libnm-glib-aux/nm-shared-utils.c:2471 +#: ../src/libnm-glib-aux/nm-shared-utils.c:2385 #, c-format msgid "" "construct property \"%s\" for object '%s' can't be set after construction" msgstr "对象 \"%2$s\" 的构造属性 \"%1$s\" 在构造后不能被设定" -#: ../src/libnm-glib-aux/nm-shared-utils.c:2482 +#: ../src/libnm-glib-aux/nm-shared-utils.c:2396 #, c-format msgid "'%s::%s' is not a valid property name; '%s' is not a GObject subtype" msgstr "\"%s::%s\" 不是有效的属性名;\"%s\" 不是 GObject 子类型" -#: ../src/libnm-glib-aux/nm-shared-utils.c:2495 +#: ../src/libnm-glib-aux/nm-shared-utils.c:2409 #, c-format msgid "unable to set property '%s' of type '%s' from value of type '%s'" msgstr "无法从类型 \"%3$s\" 的值设定类型为 \"%2$s\" 的属性 \"%1$s\"" -#: ../src/libnm-glib-aux/nm-shared-utils.c:2507 +#: ../src/libnm-glib-aux/nm-shared-utils.c:2421 #, c-format msgid "" "value \"%s\" of type '%s' is invalid or out of range for property '%s' of " @@ -3787,46 +3785,46 @@ msgid "" msgstr "" "类型 \"%2$s\" 的值 \"%1$s\" 无效或超出类型为 \"%4$s\" 的属性 \"%3$s\" 范围" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5405 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5287 msgid "interface name is missing" msgstr "缺少接口名" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5413 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5295 msgid "interface name is too short" msgstr "接口名太短" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5421 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5303 msgid "interface name is reserved" msgstr "接口名被保留" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5434 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5316 msgid "interface name contains an invalid character" msgstr "接口名包含无效字符" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5442 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5324 msgid "interface name is longer than 15 characters" msgstr "接口名长度超过 15 字符" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5467 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5349 #, c-format msgid "'%%' is not allowed in interface names" -msgstr "接口名称中不允许使用 '%%'。" +msgstr "接口名称中不允许使用 \"%%\"" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5479 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5361 #, c-format msgid "'%s' is not allowed as interface name" -msgstr "''%s不允许作为接口名" +msgstr "\"\"%s不允许作为接口名" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5501 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5383 msgid "" "interface name must be alphanumerical with no forward or backward slashes" -msgstr "接口名称必须是字母数字,没有正反斜杠。" +msgstr "接口名称必须是字母数字,没有正反斜杠" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5518 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5400 msgid "interface name must not be empty" msgstr "接口名称不能为空" -#: ../src/libnm-glib-aux/nm-shared-utils.c:5526 +#: ../src/libnm-glib-aux/nm-shared-utils.c:5408 msgid "interface name must be UTF-8 encoded" msgstr "接口名称必须是 UTF-8 编码" @@ -3843,513 +3841,513 @@ msgstr "未知的日志域 \"%s\"" #. TRANSLATORS: the first %s is the partial value entered by #. * the user, the second %s a list of compatible values. #. -#: ../src/libnmc-base/nm-client-utils.c:108 -#: ../src/libnmc-base/nm-client-utils.c:152 +#: ../src/libnmc-base/nm-client-utils.c:106 +#: ../src/libnmc-base/nm-client-utils.c:145 #, c-format msgid "'%s' is ambiguous (%s)" msgstr "\"%s\" 不明确(%s)" -#: ../src/libnmc-base/nm-client-utils.c:123 +#: ../src/libnmc-base/nm-client-utils.c:120 #, c-format msgid "'%s' is not valid; use [%s] or [%s]" msgstr "\"%s\" 无效,请使用 [%s] 或 [%s]" -#: ../src/libnmc-base/nm-client-utils.c:176 +#: ../src/libnmc-base/nm-client-utils.c:161 #, c-format msgid "'%s' is not valid; use [%s], [%s] or [%s]" msgstr "\"%s\" 无效,请使用 [%s]、[%s] 或 [%s]" -#: ../src/libnmc-base/nm-client-utils.c:230 +#: ../src/libnmc-base/nm-client-utils.c:213 #, c-format msgid "'%s' is ambiguous: %s" msgstr "\"%s\" 不明确:%s" -#: ../src/libnmc-base/nm-client-utils.c:243 +#: ../src/libnmc-base/nm-client-utils.c:222 #, c-format msgid "missing name, try one of [%s]" msgstr "缺少名称,请尝试使用 [%s] 之一。" -#: ../src/libnmc-base/nm-client-utils.c:248 ../src/nmcli/connections.c:3543 -#: ../src/nmcli/connections.c:3601 +#: ../src/libnmc-base/nm-client-utils.c:224 ../src/nmcli/connections.c:3542 +#: ../src/nmcli/connections.c:3600 #, c-format msgid "'%s' not among [%s]" msgstr "\"%s\" 不在 [%s] 中" -#: ../src/libnmc-base/nm-client-utils.c:291 -#: ../src/libnmc-base/nm-client-utils.c:305 -#: ../src/libnmc-base/nm-client-utils.c:341 -#: ../src/libnmc-base/nm-client-utils.c:346 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1818 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1849 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:2793 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:2850 ../src/nmcli/common.c:1453 -#: ../src/nmcli/connections.c:73 ../src/nmcli/connections.c:83 -#: ../src/nmcli/devices.c:476 ../src/nmcli/devices.c:583 -#: ../src/nmcli/devices.c:589 ../src/nmcli/general.c:30 -#: ../src/nmcli/general.c:85 ../src/nmcli/general.c:91 +#: ../src/libnmc-base/nm-client-utils.c:265 +#: ../src/libnmc-base/nm-client-utils.c:279 +#: ../src/libnmc-base/nm-client-utils.c:315 +#: ../src/libnmc-base/nm-client-utils.c:320 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1768 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1799 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:2743 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:2800 ../src/nmcli/common.c:1497 +#: ../src/nmcli/connections.c:72 ../src/nmcli/connections.c:82 +#: ../src/nmcli/devices.c:474 ../src/nmcli/devices.c:581 +#: ../src/nmcli/devices.c:587 ../src/nmcli/general.c:29 +#: ../src/nmcli/general.c:84 ../src/nmcli/general.c:90 msgid "unknown" msgstr "未知" -#: ../src/libnmc-base/nm-client-utils.c:292 +#: ../src/libnmc-base/nm-client-utils.c:266 msgid "unmanaged" msgstr "未托管" -#: ../src/libnmc-base/nm-client-utils.c:293 +#: ../src/libnmc-base/nm-client-utils.c:267 msgid "unavailable" msgstr "不可用" -#: ../src/libnmc-base/nm-client-utils.c:294 ../src/nmcli/general.c:39 +#: ../src/libnmc-base/nm-client-utils.c:268 ../src/nmcli/general.c:38 msgid "disconnected" msgstr "已断开" -#: ../src/libnmc-base/nm-client-utils.c:295 +#: ../src/libnmc-base/nm-client-utils.c:269 msgid "connecting (prepare)" msgstr "连接中(准备)" -#: ../src/libnmc-base/nm-client-utils.c:296 +#: ../src/libnmc-base/nm-client-utils.c:270 msgid "connecting (configuring)" msgstr "连接中(正在配置)" -#: ../src/libnmc-base/nm-client-utils.c:297 +#: ../src/libnmc-base/nm-client-utils.c:271 msgid "connecting (need authentication)" msgstr "连接中(需要验证)" -#: ../src/libnmc-base/nm-client-utils.c:298 +#: ../src/libnmc-base/nm-client-utils.c:272 msgid "connecting (getting IP configuration)" msgstr "连接中(正在获取 IP 配置)" -#: ../src/libnmc-base/nm-client-utils.c:299 +#: ../src/libnmc-base/nm-client-utils.c:273 msgid "connecting (checking IP connectivity)" msgstr "连接中(正在检查 IP 连接性)" -#: ../src/libnmc-base/nm-client-utils.c:301 +#: ../src/libnmc-base/nm-client-utils.c:275 msgid "connecting (starting secondary connections)" msgstr "连接中(正在启动次级连接)" -#: ../src/libnmc-base/nm-client-utils.c:302 ../src/nmcli/general.c:37 +#: ../src/libnmc-base/nm-client-utils.c:276 ../src/nmcli/general.c:36 msgid "connected" msgstr "已连接" -#: ../src/libnmc-base/nm-client-utils.c:303 ../src/nmcli/connections.c:76 +#: ../src/libnmc-base/nm-client-utils.c:277 ../src/nmcli/connections.c:75 msgid "deactivating" msgstr "停用中" -#: ../src/libnmc-base/nm-client-utils.c:304 +#: ../src/libnmc-base/nm-client-utils.c:278 msgid "connection failed" msgstr "连接失败" -#: ../src/libnmc-base/nm-client-utils.c:311 -#: ../src/libnmc-base/nm-client-utils.c:312 -#: ../src/libnmc-base/nm-client-utils.c:313 -#: ../src/libnmc-base/nm-client-utils.c:314 -#: ../src/libnmc-base/nm-client-utils.c:315 -#: ../src/libnmc-base/nm-client-utils.c:316 +#: ../src/libnmc-base/nm-client-utils.c:285 +#: ../src/libnmc-base/nm-client-utils.c:286 +#: ../src/libnmc-base/nm-client-utils.c:287 +#: ../src/libnmc-base/nm-client-utils.c:288 +#: ../src/libnmc-base/nm-client-utils.c:289 +#: ../src/libnmc-base/nm-client-utils.c:290 msgid "connecting (externally)" msgstr "连接(外部)" -#: ../src/libnmc-base/nm-client-utils.c:317 +#: ../src/libnmc-base/nm-client-utils.c:291 msgid "connected (externally)" msgstr "连接(外部)" -#: ../src/libnmc-base/nm-client-utils.c:318 -#: ../src/libnmc-base/nm-client-utils.c:319 +#: ../src/libnmc-base/nm-client-utils.c:292 +#: ../src/libnmc-base/nm-client-utils.c:293 msgid "deactivating (externally)" msgstr "取消激活(外部)" -#: ../src/libnmc-base/nm-client-utils.c:342 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:880 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:2785 -#: ../src/nmcli/connections.c:5295 ../src/nmcli/connections.c:7221 -#: ../src/nmcli/connections.c:7222 ../src/nmcli/devices.c:582 -#: ../src/nmcli/devices.c:588 ../src/nmcli/devices.c:1363 -#: ../src/nmcli/general.c:92 ../src/nmcli/utils.h:311 +#: ../src/libnmc-base/nm-client-utils.c:316 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:879 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:2735 +#: ../src/nmcli/connections.c:5291 ../src/nmcli/connections.c:7217 +#: ../src/nmcli/connections.c:7218 ../src/nmcli/devices.c:580 +#: ../src/nmcli/devices.c:586 ../src/nmcli/devices.c:1349 +#: ../src/nmcli/general.c:91 ../src/nmcli/utils.h:311 msgid "yes" msgstr "是" -#: ../src/libnmc-base/nm-client-utils.c:343 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:880 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:2788 -#: ../src/nmcli/connections.c:5294 ../src/nmcli/connections.c:7221 -#: ../src/nmcli/connections.c:7222 ../src/nmcli/devices.c:582 -#: ../src/nmcli/devices.c:588 ../src/nmcli/devices.c:1363 -#: ../src/nmcli/general.c:93 ../src/nmcli/utils.h:311 +#: ../src/libnmc-base/nm-client-utils.c:317 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:879 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:2738 +#: ../src/nmcli/connections.c:5290 ../src/nmcli/connections.c:7217 +#: ../src/nmcli/connections.c:7218 ../src/nmcli/devices.c:580 +#: ../src/nmcli/devices.c:586 ../src/nmcli/devices.c:1349 +#: ../src/nmcli/general.c:92 ../src/nmcli/utils.h:311 msgid "no" msgstr "否" -#: ../src/libnmc-base/nm-client-utils.c:344 +#: ../src/libnmc-base/nm-client-utils.c:318 msgid "yes (guessed)" msgstr "是(猜测)" -#: ../src/libnmc-base/nm-client-utils.c:345 +#: ../src/libnmc-base/nm-client-utils.c:319 msgid "no (guessed)" msgstr "否(猜测)" -#: ../src/libnmc-base/nm-client-utils.c:353 +#: ../src/libnmc-base/nm-client-utils.c:327 msgid "No reason given" msgstr "未给出原因" #. We should not really come here -#: ../src/libnmc-base/nm-client-utils.c:354 ../src/nmcli/connections.c:3563 -#: ../src/nmcli/connections.c:3622 +#: ../src/libnmc-base/nm-client-utils.c:328 ../src/nmcli/connections.c:3562 +#: ../src/nmcli/connections.c:3621 #, c-format msgid "Unknown error" msgstr "未知错误" -#: ../src/libnmc-base/nm-client-utils.c:355 +#: ../src/libnmc-base/nm-client-utils.c:329 msgid "Device is now managed" msgstr "设备现在已托管" -#: ../src/libnmc-base/nm-client-utils.c:356 +#: ../src/libnmc-base/nm-client-utils.c:330 msgid "Device is now unmanaged" msgstr "设备现在未托管" -#: ../src/libnmc-base/nm-client-utils.c:358 +#: ../src/libnmc-base/nm-client-utils.c:332 msgid "The device could not be readied for configuration" msgstr "设备配置未就绪" -#: ../src/libnmc-base/nm-client-utils.c:361 +#: ../src/libnmc-base/nm-client-utils.c:335 msgid "" "IP configuration could not be reserved (no available address, timeout, etc.)" msgstr "IP 配置无法保留(无可用地址、超时等)" -#: ../src/libnmc-base/nm-client-utils.c:363 +#: ../src/libnmc-base/nm-client-utils.c:337 msgid "The IP configuration is no longer valid" msgstr "IP 配置不再有效" -#: ../src/libnmc-base/nm-client-utils.c:365 +#: ../src/libnmc-base/nm-client-utils.c:339 msgid "Secrets were required, but not provided" msgstr "需要密钥,但未提供" -#: ../src/libnmc-base/nm-client-utils.c:367 +#: ../src/libnmc-base/nm-client-utils.c:341 msgid "802.1X supplicant disconnected" msgstr "802.1X 请求方已断开连接" -#: ../src/libnmc-base/nm-client-utils.c:369 +#: ../src/libnmc-base/nm-client-utils.c:343 msgid "802.1X supplicant configuration failed" msgstr "802.1X 请求方配置失败" -#: ../src/libnmc-base/nm-client-utils.c:370 +#: ../src/libnmc-base/nm-client-utils.c:344 msgid "802.1X supplicant failed" msgstr "802.1X 请求方失败" -#: ../src/libnmc-base/nm-client-utils.c:372 +#: ../src/libnmc-base/nm-client-utils.c:346 msgid "802.1X supplicant took too long to authenticate" msgstr "802.1X 请求方验证时间过长" -#: ../src/libnmc-base/nm-client-utils.c:374 +#: ../src/libnmc-base/nm-client-utils.c:348 msgid "PPP service failed to start" msgstr "PPP 服务无法启动" -#: ../src/libnmc-base/nm-client-utils.c:375 +#: ../src/libnmc-base/nm-client-utils.c:349 msgid "PPP service disconnected" msgstr "PPP 服务已断开连接" # auto translated by TM merge from project: control-center, version: 3.8.3, DocId: gnome-control-center-2.0 -#: ../src/libnmc-base/nm-client-utils.c:376 +#: ../src/libnmc-base/nm-client-utils.c:350 msgid "PPP failed" msgstr "PPP 失败" -#: ../src/libnmc-base/nm-client-utils.c:378 +#: ../src/libnmc-base/nm-client-utils.c:352 msgid "DHCP client failed to start" msgstr "DHCP 客户端启动失败" # auto translated by TM merge from project: control-center, version: 3.8.3, DocId: gnome-control-center-2.0 -#: ../src/libnmc-base/nm-client-utils.c:379 +#: ../src/libnmc-base/nm-client-utils.c:353 msgid "DHCP client error" msgstr "DHCP 客户端错误" -#: ../src/libnmc-base/nm-client-utils.c:380 +#: ../src/libnmc-base/nm-client-utils.c:354 msgid "DHCP client failed" msgstr "DHCP 客户端失败" -#: ../src/libnmc-base/nm-client-utils.c:382 +#: ../src/libnmc-base/nm-client-utils.c:356 msgid "Shared connection service failed to start" msgstr "共享连接服务启动失败" -#: ../src/libnmc-base/nm-client-utils.c:384 +#: ../src/libnmc-base/nm-client-utils.c:358 msgid "Shared connection service failed" msgstr "共享连接服务失败" -#: ../src/libnmc-base/nm-client-utils.c:386 +#: ../src/libnmc-base/nm-client-utils.c:360 msgid "AutoIP service failed to start" msgstr "自动 IP(AutoIP)服务无法启动" -#: ../src/libnmc-base/nm-client-utils.c:387 +#: ../src/libnmc-base/nm-client-utils.c:361 msgid "AutoIP service error" msgstr "自动 IP(AutoIP)服务出错" -#: ../src/libnmc-base/nm-client-utils.c:388 +#: ../src/libnmc-base/nm-client-utils.c:362 msgid "AutoIP service failed" msgstr "自动 IP(AutoIP)服务失败" -#: ../src/libnmc-base/nm-client-utils.c:389 +#: ../src/libnmc-base/nm-client-utils.c:363 msgid "The line is busy" msgstr "线路正忙" -#: ../src/libnmc-base/nm-client-utils.c:390 +#: ../src/libnmc-base/nm-client-utils.c:364 msgid "No dial tone" msgstr "无拨号音" -#: ../src/libnmc-base/nm-client-utils.c:392 +#: ../src/libnmc-base/nm-client-utils.c:366 msgid "No carrier could be established" msgstr "无法建立载波" -#: ../src/libnmc-base/nm-client-utils.c:394 +#: ../src/libnmc-base/nm-client-utils.c:368 msgid "The dialing request timed out" msgstr "拨号请求超时" -#: ../src/libnmc-base/nm-client-utils.c:396 +#: ../src/libnmc-base/nm-client-utils.c:370 msgid "The dialing attempt failed" msgstr "拨号尝试失败" -#: ../src/libnmc-base/nm-client-utils.c:398 +#: ../src/libnmc-base/nm-client-utils.c:372 msgid "Modem initialization failed" msgstr "调制解调器初始化失败" -#: ../src/libnmc-base/nm-client-utils.c:400 +#: ../src/libnmc-base/nm-client-utils.c:374 msgid "Failed to select the specified APN" msgstr "无法选择指定的 APN" -#: ../src/libnmc-base/nm-client-utils.c:402 +#: ../src/libnmc-base/nm-client-utils.c:376 msgid "Not searching for networks" msgstr "不搜索网络" -#: ../src/libnmc-base/nm-client-utils.c:404 +#: ../src/libnmc-base/nm-client-utils.c:378 msgid "Network registration denied" msgstr "网络注册遭拒绝" -#: ../src/libnmc-base/nm-client-utils.c:406 +#: ../src/libnmc-base/nm-client-utils.c:380 msgid "Network registration timed out" msgstr "网络注册超时" -#: ../src/libnmc-base/nm-client-utils.c:408 +#: ../src/libnmc-base/nm-client-utils.c:382 msgid "Failed to register with the requested network" msgstr "注册请求的网络失败" -#: ../src/libnmc-base/nm-client-utils.c:409 +#: ../src/libnmc-base/nm-client-utils.c:383 msgid "PIN check failed" msgstr "PIN 检查失败" -#: ../src/libnmc-base/nm-client-utils.c:411 +#: ../src/libnmc-base/nm-client-utils.c:385 msgid "Necessary firmware for the device may be missing" msgstr "该设备所需固件可能缺失" -#: ../src/libnmc-base/nm-client-utils.c:412 +#: ../src/libnmc-base/nm-client-utils.c:386 msgid "The device was removed" msgstr "设备已被移除" -#: ../src/libnmc-base/nm-client-utils.c:413 +#: ../src/libnmc-base/nm-client-utils.c:387 msgid "NetworkManager went to sleep" msgstr "网络管理器已挂起" -#: ../src/libnmc-base/nm-client-utils.c:415 +#: ../src/libnmc-base/nm-client-utils.c:389 msgid "The device's active connection disappeared" msgstr "设备的活动连接已消失" -#: ../src/libnmc-base/nm-client-utils.c:417 +#: ../src/libnmc-base/nm-client-utils.c:391 msgid "Device disconnected by user or client" msgstr "用户或客户端断开了设备连接" -#: ../src/libnmc-base/nm-client-utils.c:418 +#: ../src/libnmc-base/nm-client-utils.c:392 msgid "Carrier/link changed" msgstr "载波/链路已更改" -#: ../src/libnmc-base/nm-client-utils.c:420 +#: ../src/libnmc-base/nm-client-utils.c:394 msgid "The device's existing connection was assumed" msgstr "假定设备已有连接" -#: ../src/libnmc-base/nm-client-utils.c:422 +#: ../src/libnmc-base/nm-client-utils.c:396 msgid "The supplicant is now available" msgstr "客户端目前可用" -#: ../src/libnmc-base/nm-client-utils.c:424 +#: ../src/libnmc-base/nm-client-utils.c:398 msgid "The modem could not be found" msgstr "未找到调制解调器" -#: ../src/libnmc-base/nm-client-utils.c:426 +#: ../src/libnmc-base/nm-client-utils.c:400 msgid "The Bluetooth connection failed or timed out" msgstr "蓝牙连接失败或超时" -#: ../src/libnmc-base/nm-client-utils.c:428 +#: ../src/libnmc-base/nm-client-utils.c:402 msgid "GSM Modem's SIM card not inserted" msgstr "GSM 调制解调器的 SIM 卡未插入" -#: ../src/libnmc-base/nm-client-utils.c:430 +#: ../src/libnmc-base/nm-client-utils.c:404 msgid "GSM Modem's SIM PIN required" msgstr "GSM 调制解调器的 SIM 需要 PIN 码" -#: ../src/libnmc-base/nm-client-utils.c:432 +#: ../src/libnmc-base/nm-client-utils.c:406 msgid "GSM Modem's SIM PUK required" msgstr "GSM 调制解调器的 SIM 需要 PUK 码" -#: ../src/libnmc-base/nm-client-utils.c:433 +#: ../src/libnmc-base/nm-client-utils.c:407 msgid "GSM Modem's SIM wrong" msgstr "GSM 调制解调器的 SIM 错误" -#: ../src/libnmc-base/nm-client-utils.c:435 +#: ../src/libnmc-base/nm-client-utils.c:409 msgid "InfiniBand device does not support connected mode" msgstr "InfiniBand 设备不支持已连接的模式" -#: ../src/libnmc-base/nm-client-utils.c:437 +#: ../src/libnmc-base/nm-client-utils.c:411 msgid "A dependency of the connection failed" msgstr "连接的依赖关系失败" -#: ../src/libnmc-base/nm-client-utils.c:439 +#: ../src/libnmc-base/nm-client-utils.c:413 msgid "A problem with the RFC 2684 Ethernet over ADSL bridge" msgstr "ADSL 网桥上的 RFC 2684 以太网出现问题" -#: ../src/libnmc-base/nm-client-utils.c:441 +#: ../src/libnmc-base/nm-client-utils.c:415 msgid "ModemManager is unavailable" msgstr "ModemManager 不可用" -#: ../src/libnmc-base/nm-client-utils.c:443 +#: ../src/libnmc-base/nm-client-utils.c:417 msgid "The Wi-Fi network could not be found" msgstr "未找到 Wi-Fi 网络" -#: ../src/libnmc-base/nm-client-utils.c:445 +#: ../src/libnmc-base/nm-client-utils.c:419 msgid "A secondary connection of the base connection failed" msgstr "基础连接的次级连接失败" -#: ../src/libnmc-base/nm-client-utils.c:446 +#: ../src/libnmc-base/nm-client-utils.c:420 msgid "DCB or FCoE setup failed" msgstr "DCB 或 FCoE 设置失败" -#: ../src/libnmc-base/nm-client-utils.c:447 +#: ../src/libnmc-base/nm-client-utils.c:421 msgid "teamd control failed" msgstr "teamd 控制失败" # auto translated by TM merge from project: NetworkManager, version: 0.9.8.2, DocId: NetworkManager -#: ../src/libnmc-base/nm-client-utils.c:449 +#: ../src/libnmc-base/nm-client-utils.c:423 msgid "Modem failed or no longer available" msgstr "调制解调器出现故障或不再可用" # auto translated by TM merge from project: NetworkManager, version: 0.9.8.2, DocId: NetworkManager -#: ../src/libnmc-base/nm-client-utils.c:451 +#: ../src/libnmc-base/nm-client-utils.c:425 msgid "Modem now ready and available" msgstr "调制解调器现已就绪且可用" -#: ../src/libnmc-base/nm-client-utils.c:452 +#: ../src/libnmc-base/nm-client-utils.c:426 msgid "SIM PIN was incorrect" msgstr "SIM PIN 不正确" -#: ../src/libnmc-base/nm-client-utils.c:454 +#: ../src/libnmc-base/nm-client-utils.c:428 msgid "New connection activation was enqueued" msgstr "新连接激活已排队" -#: ../src/libnmc-base/nm-client-utils.c:455 +#: ../src/libnmc-base/nm-client-utils.c:429 msgid "The device's parent changed" msgstr "设备的上级已更改" -#: ../src/libnmc-base/nm-client-utils.c:457 +#: ../src/libnmc-base/nm-client-utils.c:431 msgid "The device parent's management changed" msgstr "设备的上级管理已更改" -#: ../src/libnmc-base/nm-client-utils.c:459 +#: ../src/libnmc-base/nm-client-utils.c:433 msgid "Open vSwitch database connection failed" msgstr "Open vSwitch 数据库连接失败" -#: ../src/libnmc-base/nm-client-utils.c:461 +#: ../src/libnmc-base/nm-client-utils.c:435 msgid "A duplicate IP address was detected" msgstr "检测到重复的 IP 地址" -#: ../src/libnmc-base/nm-client-utils.c:463 +#: ../src/libnmc-base/nm-client-utils.c:437 msgid "The selected IP method is not supported" msgstr "选中的 IP 方法未支持" -#: ../src/libnmc-base/nm-client-utils.c:465 +#: ../src/libnmc-base/nm-client-utils.c:439 msgid "Failed to configure SR-IOV parameters" msgstr "配置 SR-IOV 参数失败" -#: ../src/libnmc-base/nm-client-utils.c:467 +#: ../src/libnmc-base/nm-client-utils.c:441 msgid "The Wi-Fi P2P peer could not be found" msgstr "无法找到 Wi-Fi P2P peer" -#: ../src/libnmc-base/nm-client-utils.c:474 +#: ../src/libnmc-base/nm-client-utils.c:448 msgid "Unknown reason" msgstr "未知原因" -#: ../src/libnmc-base/nm-client-utils.c:476 +#: ../src/libnmc-base/nm-client-utils.c:450 msgid "The connection was disconnected" msgstr "连接已断开" -#: ../src/libnmc-base/nm-client-utils.c:478 +#: ../src/libnmc-base/nm-client-utils.c:452 msgid "Disconnected by user" msgstr "已被用户断开连接" -#: ../src/libnmc-base/nm-client-utils.c:480 +#: ../src/libnmc-base/nm-client-utils.c:454 msgid "The base network connection was interrupted" msgstr "基础网络连接已中断" -#: ../src/libnmc-base/nm-client-utils.c:482 +#: ../src/libnmc-base/nm-client-utils.c:456 msgid "The VPN service stopped unexpectedly" msgstr "VPN 服务意外停止" -#: ../src/libnmc-base/nm-client-utils.c:484 +#: ../src/libnmc-base/nm-client-utils.c:458 msgid "The VPN service returned invalid configuration" msgstr "VPN 服务返回了无效配置" -#: ../src/libnmc-base/nm-client-utils.c:486 +#: ../src/libnmc-base/nm-client-utils.c:460 msgid "The connection attempt timed out" msgstr "连接尝试超时" -#: ../src/libnmc-base/nm-client-utils.c:488 +#: ../src/libnmc-base/nm-client-utils.c:462 msgid "The VPN service did not start in time" msgstr "VPN 连接没有及时启动" -#: ../src/libnmc-base/nm-client-utils.c:490 +#: ../src/libnmc-base/nm-client-utils.c:464 msgid "The VPN service failed to start" msgstr "VPN 服务启动失败" -#: ../src/libnmc-base/nm-client-utils.c:491 +#: ../src/libnmc-base/nm-client-utils.c:465 msgid "No valid secrets" msgstr "没有有效的密钥" -#: ../src/libnmc-base/nm-client-utils.c:492 +#: ../src/libnmc-base/nm-client-utils.c:466 msgid "Invalid secrets" msgstr "无效的密钥" -#: ../src/libnmc-base/nm-client-utils.c:494 +#: ../src/libnmc-base/nm-client-utils.c:468 msgid "The connection was removed" msgstr "连接已被移除" -#: ../src/libnmc-base/nm-client-utils.c:496 +#: ../src/libnmc-base/nm-client-utils.c:470 msgid "Master connection failed" msgstr "主连接失败" -#: ../src/libnmc-base/nm-client-utils.c:498 +#: ../src/libnmc-base/nm-client-utils.c:472 msgid "Could not create a software link" -msgstr "无法创建软件链路:" +msgstr "无法创建软件链路" -#: ../src/libnmc-base/nm-client-utils.c:500 +#: ../src/libnmc-base/nm-client-utils.c:474 msgid "The device disappeared" msgstr "设备已消失" -#: ../src/libnmc-base/nm-client-utils.c:823 +#: ../src/libnmc-base/nm-client-utils.c:797 msgid "missing colon for \".:\" format" -msgstr "缺少 \".:\" 格式中的冒号" +msgstr "缺少 \"<设置>.<属性>:<机密>\" 格式中的冒号" -#: ../src/libnmc-base/nm-client-utils.c:840 +#: ../src/libnmc-base/nm-client-utils.c:814 msgid "missing dot for \".:\" format" -msgstr "缺少 \".:\" 格式中的点" +msgstr "缺少 \"<设置>.<属性>:<机密>\" 格式中的点" -#: ../src/libnmc-base/nm-client-utils.c:846 +#: ../src/libnmc-base/nm-client-utils.c:820 msgid "missing setting for \".:\" format" -msgstr "缺少 \".:\" 格式的设置" +msgstr "缺少 \"<设置>.<属性>:<机密>\" 格式的设置" -#: ../src/libnmc-base/nm-client-utils.c:857 +#: ../src/libnmc-base/nm-client-utils.c:831 msgid "missing property for \".:\" format" -msgstr "缺少 \".:\" 格式的属性" +msgstr "缺少 \"<设置>.<属性>:<机密>\" 格式的属性" -#: ../src/libnmc-base/nm-client-utils.c:867 +#: ../src/libnmc-base/nm-client-utils.c:841 msgid "invalid setting name" msgstr "无效的设置名称" -#: ../src/libnmc-base/nm-client-utils.c:881 +#: ../src/libnmc-base/nm-client-utils.c:855 msgid "property name is not UTF-8" msgstr "属性名不是UTF-8" -#: ../src/libnmc-base/nm-client-utils.c:898 -#: ../src/libnmc-base/nm-client-utils.c:904 +#: ../src/libnmc-base/nm-client-utils.c:872 +#: ../src/libnmc-base/nm-client-utils.c:878 msgid "secret is not UTF-8" msgstr "secret 不是 UTF-8" @@ -4370,7 +4368,7 @@ msgstr "%s 的预共享密钥" #: ../src/libnmc-base/nm-secret-agent-simple.c:270 #: ../src/libnmc-base/nm-secret-agent-simple.c:357 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:4954 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:4879 #: ../src/nmtui/nmt-page-dsl.c:49 ../src/nmtui/nmt-page-wifi.c:334 msgid "Username" msgstr "用户名" @@ -4379,13 +4377,13 @@ msgstr "用户名" #: ../src/libnmc-base/nm-secret-agent-simple.c:312 #: ../src/libnmc-base/nm-secret-agent-simple.c:335 #: ../src/libnmc-base/nm-secret-agent-simple.c:367 -#: ../src/libnmc-base/nm-secret-agent-simple.c:918 -#: ../src/libnmc-base/nm-secret-agent-simple.c:953 -#: ../src/libnmc-base/nm-secret-agent-simple.c:980 +#: ../src/libnmc-base/nm-secret-agent-simple.c:915 +#: ../src/libnmc-base/nm-secret-agent-simple.c:950 +#: ../src/libnmc-base/nm-secret-agent-simple.c:977 #: ../src/libnmc-base/nm-vpn-helpers.c:143 #: ../src/libnmc-base/nm-vpn-helpers.c:147 #: ../src/libnmc-base/nm-vpn-helpers.c:153 -#: ../src/libnmc-base/nm-vpn-helpers.c:158 ../src/nmcli/devices.c:4641 +#: ../src/libnmc-base/nm-vpn-helpers.c:158 ../src/nmcli/devices.c:4635 #: ../src/nmtui/nmt-page-dsl.c:62 ../src/nmtui/nmt-page-wifi.c:274 #: ../src/nmtui/nmt-page-wifi.c:308 ../src/nmtui/nmt-page-wifi.c:347 msgid "Password" @@ -4416,87 +4414,87 @@ msgstr "WireGuard 私钥" #: ../src/libnmc-base/nm-secret-agent-simple.c:512 #, c-format msgid "Secrets are required to connect WireGuard VPN '%s'" -msgstr "连接到 WireGuard VPN '%s' 所需要的 secret" +msgstr "连接到 WireGuard VPN \"%s\" 所需要的 secret" #: ../src/libnmc-base/nm-secret-agent-simple.c:620 -#: ../src/libnmc-base/nm-secret-agent-simple.c:914 -#: ../src/libnmc-base/nm-secret-agent-simple.c:949 -#: ../src/libnmc-base/nm-secret-agent-simple.c:976 -#: ../src/libnmc-base/nm-secret-agent-simple.c:995 +#: ../src/libnmc-base/nm-secret-agent-simple.c:911 +#: ../src/libnmc-base/nm-secret-agent-simple.c:946 +#: ../src/libnmc-base/nm-secret-agent-simple.c:973 +#: ../src/libnmc-base/nm-secret-agent-simple.c:992 #, c-format msgid "A password is required to connect to '%s'." msgstr "需要密码来连接到 \"%s\"。" -#: ../src/libnmc-base/nm-secret-agent-simple.c:879 +#: ../src/libnmc-base/nm-secret-agent-simple.c:876 msgid "Authentication required by wireless network" msgstr "无线网络要求身份验证" -#: ../src/libnmc-base/nm-secret-agent-simple.c:881 +#: ../src/libnmc-base/nm-secret-agent-simple.c:878 #, c-format msgid "" "Passwords or encryption keys are required to access the wireless network " "'%s'." msgstr "需要密码或密钥来访问无线网络 \"%s\"。" -#: ../src/libnmc-base/nm-secret-agent-simple.c:887 +#: ../src/libnmc-base/nm-secret-agent-simple.c:884 msgid "Wired 802.1X authentication" msgstr "有线 802.1X 身份验证" -#: ../src/libnmc-base/nm-secret-agent-simple.c:888 +#: ../src/libnmc-base/nm-secret-agent-simple.c:885 #, c-format msgid "Secrets are required to access the wired network '%s'" msgstr "需要密钥来访问有线网络 \"%s\"。" -#: ../src/libnmc-base/nm-secret-agent-simple.c:894 +#: ../src/libnmc-base/nm-secret-agent-simple.c:891 msgid "DSL authentication" msgstr "DSL 身份验证" -#: ../src/libnmc-base/nm-secret-agent-simple.c:895 +#: ../src/libnmc-base/nm-secret-agent-simple.c:892 #, c-format msgid "Secrets are required for the DSL connection '%s'" msgstr "DSL 连接 \"%s\" 需要密钥。" -#: ../src/libnmc-base/nm-secret-agent-simple.c:904 +#: ../src/libnmc-base/nm-secret-agent-simple.c:901 msgid "PIN code required" msgstr "需要 PIN 码" -#: ../src/libnmc-base/nm-secret-agent-simple.c:905 +#: ../src/libnmc-base/nm-secret-agent-simple.c:902 msgid "PIN code is needed for the mobile broadband device" msgstr "移动宽带设备需要 PIN 码" -#: ../src/libnmc-base/nm-secret-agent-simple.c:908 +#: ../src/libnmc-base/nm-secret-agent-simple.c:905 msgid "PIN" msgstr "PIN" -#: ../src/libnmc-base/nm-secret-agent-simple.c:913 -#: ../src/libnmc-base/nm-secret-agent-simple.c:948 -#: ../src/libnmc-base/nm-secret-agent-simple.c:975 +#: ../src/libnmc-base/nm-secret-agent-simple.c:910 +#: ../src/libnmc-base/nm-secret-agent-simple.c:945 +#: ../src/libnmc-base/nm-secret-agent-simple.c:972 msgid "Mobile broadband network password" msgstr "移动宽带网络密码" -#: ../src/libnmc-base/nm-secret-agent-simple.c:926 +#: ../src/libnmc-base/nm-secret-agent-simple.c:923 #, c-format msgid "Secrets are required to access the MACsec network '%s'" msgstr "需要密钥来访问 MACsec 网络 \"%s\"。" -#: ../src/libnmc-base/nm-secret-agent-simple.c:930 +#: ../src/libnmc-base/nm-secret-agent-simple.c:927 msgid "MACsec PSK authentication" msgstr "MACsec PSK 身份验证" -#: ../src/libnmc-base/nm-secret-agent-simple.c:932 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:6382 +#: ../src/libnmc-base/nm-secret-agent-simple.c:929 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:6276 msgid "MKA CAK" msgstr "MKA CAK" -#: ../src/libnmc-base/nm-secret-agent-simple.c:937 +#: ../src/libnmc-base/nm-secret-agent-simple.c:934 msgid "MACsec EAP authentication" msgstr "MACsec EAP 身份验证" -#: ../src/libnmc-base/nm-secret-agent-simple.c:942 +#: ../src/libnmc-base/nm-secret-agent-simple.c:939 msgid "WireGuard VPN secret" msgstr "WireGuard VPN secret" -#: ../src/libnmc-base/nm-secret-agent-simple.c:985 +#: ../src/libnmc-base/nm-secret-agent-simple.c:982 msgid "VPN password required" msgstr "需要 VPN 密码" @@ -4550,7 +4548,7 @@ msgstr "网关证书散列" #: ../src/libnmc-base/nm-vpn-helpers.c:267 #, c-format msgid "Invalid peer starting at %s:%zu: %s" -msgstr "于 %s:%zu: %s 启动的无效 peer" +msgstr "在 %s:%zu 正启动无效的对等端:%s" #: ../src/libnmc-base/nm-vpn-helpers.c:388 msgid "" @@ -4566,17 +4564,17 @@ msgstr "无法识别的行 %s:%zu" #: ../src/libnmc-base/nm-vpn-helpers.c:678 #, c-format msgid "invalid value for '%s' at %s:%zu" -msgstr "无效的值 '%s' 于 %s:%zu" +msgstr "%2$s:%3$zu 有无效的值 \"%1$s\"" #: ../src/libnmc-base/nm-vpn-helpers.c:686 #, c-format msgid "invalid secret '%s' at %s:%zu" -msgstr "无效的 secret '%s' 于 %s:%zu" +msgstr "%2$s:%3$zu 有无效的机密(secret)\"%1$s\"" #: ../src/libnmc-base/nm-vpn-helpers.c:815 #, c-format msgid "Failed to create WireGuard connection: %s" -msgstr "创建 WireGuard 连接失败 : %s" +msgstr "创建 WireGuard 连接失败:%s" #: ../src/libnmc-setting/nm-meta-setting-access.c:501 #, c-format @@ -4588,18 +4586,18 @@ msgstr "字段 \"%s\" 必须是单独的" msgid "invalid field '%s%s%s%s%s'; %s%s%s" msgstr "无效字段 \"%s%s%s%s%s\";%s%s%s" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:263 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:329 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:262 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:328 #, c-format msgid "invalid prefix '%s'; <1-%d> allowed" -msgstr "无效的前缀 '%s'; 只允许 <1-%d>" +msgstr "无效的前缀 \"%s\";只允许 <1-%d>" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:275 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:274 #, c-format msgid "invalid IP address: %s" msgstr "无效的 IP 地址:%s" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:300 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:299 msgid "" "The valid syntax is: 'ip[/prefix] [next-hop] [metric] [attribute=val]... [," "ip[/prefix] ...]'" @@ -4607,183 +4605,183 @@ msgstr "" "有效语法为:\"ip[/prefix] [next-hop] [metric] [attribute=val]... [,ip[/" "prefix] ...]\"" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:341 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:340 #, c-format msgid "the next hop ('%s') must be first" msgstr "下一跳(\"%s\")必须在首位" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:351 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:350 #, c-format msgid "the metric ('%s') must be before attributes" msgstr "跃点数(\"%s\")必需在属性前" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:402 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:401 #, c-format msgid "invalid route: %s. %s" msgstr "无效路由:%s。%s" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:470 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:469 #, c-format msgid "cannot read pac-script from file '%s'" msgstr "无法从文件 \"%s\" 读取 PAC 脚本" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:479 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:478 #, c-format msgid "file '%s' contains non-valid utf-8" msgstr "文件 \"%s\" 包含无效的 utf-8" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:493 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:492 #, c-format msgid "'%s' does not contain a valid PAC Script" msgstr "\"%s\" 没有包含有效的 PAC 脚本" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:499 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:498 #, c-format msgid "Not a valid PAC Script" msgstr "不是有效的 PAC 脚本" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:552 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:551 #, c-format msgid "cannot read team config from file '%s'" msgstr "无法从文件 \"%s\" 读取组合(team)配置" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:561 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:560 #, c-format msgid "team config file '%s' contains non-valid utf-8" msgstr "组合(team)配置文件 \"%s\" 包含无效的 utf-8" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1052 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1051 msgid "auto" msgstr "自动" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1214 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1213 #, c-format msgid "%s (%s)" msgstr "%s(%s)" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1403 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1411 -#: ../src/libnmc-setting/nm-meta-setting-desc.c:4301 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1375 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1383 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:4230 msgid "'%s' is out of range [%" -msgstr "'%s' 超出范围 [%" +msgstr "\"%s\" 超出范围 [%" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1420 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1392 #, c-format msgid "'%s' is not a valid number" msgstr "\"%s\" 不是有效的数字" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1476 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1448 #, c-format msgid "'%s' is out of range [0, %u]" msgstr "\"%s\" 超出范围 [0, %u]" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1520 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1492 #, c-format msgid "'%s' is not a valid Ethernet MAC" msgstr "\"%s\" 不是有效的以太网 MAC" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1644 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1616 #, c-format msgid "invalid option '%s', use a combination of [%s]" msgstr "无效选项 \"%s\",请使用 [%s] 的组合" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1785 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1735 #, c-format msgid "%d (key)" msgstr "%d(密钥)" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1787 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1737 #, c-format msgid "%d (passphrase)" msgstr "%d(密码)" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1790 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1740 #, c-format msgid "%d (unknown)" msgstr "%d(未知)" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1803 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1753 msgid "0 (NONE)" msgstr "0(无)" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1809 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1759 msgid "REORDER_HEADERS, " msgstr "记录头、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1811 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1761 msgid "GVRP, " msgstr "GVRP、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1813 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1763 msgid "LOOSE_BINDING, " msgstr "松散绑定、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1815 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1765 msgid "MVRP, " msgstr "MVRP、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1836 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1786 msgid "0 (none)" msgstr "0(无)" -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1842 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1792 msgid "agent-owned, " msgstr "为代理拥有、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1844 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1794 msgid "not saved, " msgstr "未保存、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:1846 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1796 msgid "not required, " msgstr "不必需、 " -#: ../src/libnmc-setting/nm-meta-setting-desc.c:2048 +#: ../src/libnmc-setting/nm-meta-setting-desc.c:1998 #, c-format msgid "'%s' is not valid; use + + NM_DEVICE_MODEM_CAPABILITY_5GNR + = 0x00000040 + modem has 5GNR data capability (Since: 1.36) + diff --git a/src/libnm-core-public/nm-keyfile.h b/src/libnm-core-public/nm-keyfile.h index e298aae8..8f8b1f1b 100644 --- a/src/libnm-core-public/nm-keyfile.h +++ b/src/libnm-core-public/nm-keyfile.h @@ -71,19 +71,19 @@ typedef struct _NMKeyfileHandlerData NMKeyfileHandlerData; * * Since: 1.30 */ -typedef gboolean (*NMKeyfileReadHandler)(GKeyFile * keyfile, - NMConnection * connection, +typedef gboolean (*NMKeyfileReadHandler)(GKeyFile *keyfile, + NMConnection *connection, NMKeyfileHandlerType handler_type, NMKeyfileHandlerData *handler_data, - void * user_data); + void *user_data); NM_AVAILABLE_IN_1_30 -NMConnection *nm_keyfile_read(GKeyFile * keyfile, - const char * base_dir, +NMConnection *nm_keyfile_read(GKeyFile *keyfile, + const char *base_dir, NMKeyfileHandlerFlags handler_flags, NMKeyfileReadHandler handler, - void * user_data, - GError ** error); + void *user_data, + GError **error); /** * NMKeyfileWriteHandler: @@ -112,18 +112,18 @@ NMConnection *nm_keyfile_read(GKeyFile * keyfile, * * Since: 1.30 */ -typedef gboolean (*NMKeyfileWriteHandler)(NMConnection * connection, - GKeyFile * keyfile, +typedef gboolean (*NMKeyfileWriteHandler)(NMConnection *connection, + GKeyFile *keyfile, NMKeyfileHandlerType handler_type, NMKeyfileHandlerData *handler_data, - void * user_data); + void *user_data); NM_AVAILABLE_IN_1_30 -GKeyFile *nm_keyfile_write(NMConnection * connection, +GKeyFile *nm_keyfile_write(NMConnection *connection, NMKeyfileHandlerFlags handler_flags, NMKeyfileWriteHandler handler, - void * user_data, - GError ** error); + void *user_data, + GError **error); /*****************************************************************************/ @@ -132,10 +132,10 @@ void nm_keyfile_handler_data_fail_with_error(NMKeyfileHandlerData *handler_data, NM_AVAILABLE_IN_1_30 void nm_keyfile_handler_data_get_context(const NMKeyfileHandlerData *handler_data, - const char ** out_kf_group_name, - const char ** out_kf_key_name, - NMSetting ** out_cur_setting, - const char ** out_cur_property_name); + const char **out_kf_group_name, + const char **out_kf_key_name, + NMSetting **out_cur_setting, + const char **out_cur_property_name); /** * NMKeyfileWarnSeverity: @@ -157,8 +157,8 @@ typedef enum { NM_AVAILABLE_IN_1_30 void nm_keyfile_handler_data_warn_get(const NMKeyfileHandlerData *handler_data, - const char ** out_message, - NMKeyfileWarnSeverity * out_severity); + const char **out_message, + NMKeyfileWarnSeverity *out_severity); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-8021x.h b/src/libnm-core-public/nm-setting-8021x.h index f9ebdd1c..2bd089da 100644 --- a/src/libnm-core-public/nm-setting-8021x.h +++ b/src/libnm-core-public/nm-setting-8021x.h @@ -192,15 +192,15 @@ const char *nm_setting_802_1x_get_ca_path(NMSetting8021x *setting); const char *nm_setting_802_1x_get_phase2_ca_path(NMSetting8021x *setting); NMSetting8021xCKScheme nm_setting_802_1x_get_ca_cert_scheme(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_ca_cert_blob(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_ca_cert_path(NMSetting8021x *setting); +GBytes *nm_setting_802_1x_get_ca_cert_blob(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_ca_cert_path(NMSetting8021x *setting); NM_AVAILABLE_IN_1_6 const char *nm_setting_802_1x_get_ca_cert_uri(NMSetting8021x *setting); -gboolean nm_setting_802_1x_set_ca_cert(NMSetting8021x * setting, - const char * value, +gboolean nm_setting_802_1x_set_ca_cert(NMSetting8021x *setting, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_8 const char *nm_setting_802_1x_get_ca_cert_password(NMSetting8021x *setting); @@ -212,10 +212,10 @@ const char *nm_setting_802_1x_get_subject_match(NMSetting8021x *setting); guint32 nm_setting_802_1x_get_num_altsubject_matches(NMSetting8021x *setting); const char *nm_setting_802_1x_get_altsubject_match(NMSetting8021x *setting, guint32 i); gboolean nm_setting_802_1x_add_altsubject_match(NMSetting8021x *setting, - const char * altsubject_match); + const char *altsubject_match); void nm_setting_802_1x_remove_altsubject_match(NMSetting8021x *setting, guint32 i); gboolean nm_setting_802_1x_remove_altsubject_match_by_value(NMSetting8021x *setting, - const char * altsubject_match); + const char *altsubject_match); void nm_setting_802_1x_clear_altsubject_matches(NMSetting8021x *setting); NM_AVAILABLE_IN_1_2 const char *nm_setting_802_1x_get_domain_suffix_match(NMSetting8021x *setting); @@ -224,15 +224,15 @@ NM_AVAILABLE_IN_1_24 const char *nm_setting_802_1x_get_domain_match(NMSetting8021x *setting); NMSetting8021xCKScheme nm_setting_802_1x_get_client_cert_scheme(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_client_cert_blob(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_client_cert_path(NMSetting8021x *setting); +GBytes *nm_setting_802_1x_get_client_cert_blob(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_client_cert_path(NMSetting8021x *setting); NM_AVAILABLE_IN_1_6 const char *nm_setting_802_1x_get_client_cert_uri(NMSetting8021x *setting); -gboolean nm_setting_802_1x_set_client_cert(NMSetting8021x * setting, - const char * value, +gboolean nm_setting_802_1x_set_client_cert(NMSetting8021x *setting, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_8 const char *nm_setting_802_1x_get_client_cert_password(NMSetting8021x *setting); @@ -250,15 +250,15 @@ const char *nm_setting_802_1x_get_phase2_auth(NMSetting8021x *setting); const char *nm_setting_802_1x_get_phase2_autheap(NMSetting8021x *setting); NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_ca_cert_scheme(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_phase2_ca_cert_blob(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_phase2_ca_cert_path(NMSetting8021x *setting); +GBytes *nm_setting_802_1x_get_phase2_ca_cert_blob(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_phase2_ca_cert_path(NMSetting8021x *setting); NM_AVAILABLE_IN_1_6 const char *nm_setting_802_1x_get_phase2_ca_cert_uri(NMSetting8021x *setting); -gboolean nm_setting_802_1x_set_phase2_ca_cert(NMSetting8021x * setting, - const char * value, +gboolean nm_setting_802_1x_set_phase2_ca_cert(NMSetting8021x *setting, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_8 const char *nm_setting_802_1x_get_phase2_ca_cert_password(NMSetting8021x *setting); @@ -270,11 +270,11 @@ const char *nm_setting_802_1x_get_phase2_subject_match(NMSetting8021x *setting); guint32 nm_setting_802_1x_get_num_phase2_altsubject_matches(NMSetting8021x *setting); const char *nm_setting_802_1x_get_phase2_altsubject_match(NMSetting8021x *setting, guint32 i); gboolean nm_setting_802_1x_add_phase2_altsubject_match(NMSetting8021x *setting, - const char * phase2_altsubject_match); + const char *phase2_altsubject_match); void nm_setting_802_1x_remove_phase2_altsubject_match(NMSetting8021x *setting, guint32 i); gboolean nm_setting_802_1x_remove_phase2_altsubject_match_by_value(NMSetting8021x *setting, - const char * phase2_altsubject_match); + const char *phase2_altsubject_match); void nm_setting_802_1x_clear_phase2_altsubject_matches(NMSetting8021x *setting); NM_AVAILABLE_IN_1_2 const char *nm_setting_802_1x_get_phase2_domain_suffix_match(NMSetting8021x *setting); @@ -283,15 +283,15 @@ NM_AVAILABLE_IN_1_24 const char *nm_setting_802_1x_get_phase2_domain_match(NMSetting8021x *setting); NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_client_cert_scheme(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_phase2_client_cert_blob(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_phase2_client_cert_path(NMSetting8021x *setting); +GBytes *nm_setting_802_1x_get_phase2_client_cert_blob(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_phase2_client_cert_path(NMSetting8021x *setting); NM_AVAILABLE_IN_1_6 const char *nm_setting_802_1x_get_phase2_client_cert_uri(NMSetting8021x *setting); -gboolean nm_setting_802_1x_set_phase2_client_cert(NMSetting8021x * setting, - const char * value, +gboolean nm_setting_802_1x_set_phase2_client_cert(NMSetting8021x *setting, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_8 const char *nm_setting_802_1x_get_phase2_client_cert_password(NMSetting8021x *setting); @@ -299,41 +299,41 @@ NM_AVAILABLE_IN_1_8 NMSettingSecretFlags nm_setting_802_1x_get_phase2_client_cert_password_flags(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_password(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_password(NMSetting8021x *setting); NMSettingSecretFlags nm_setting_802_1x_get_password_flags(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_password_raw(NMSetting8021x *setting); +GBytes *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); +const char *nm_setting_802_1x_get_pin(NMSetting8021x *setting); NMSettingSecretFlags nm_setting_802_1x_get_pin_flags(NMSetting8021x *setting); NMSetting8021xCKScheme nm_setting_802_1x_get_private_key_scheme(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_private_key_blob(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_private_key_path(NMSetting8021x *setting); +GBytes *nm_setting_802_1x_get_private_key_blob(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_private_key_path(NMSetting8021x *setting); NM_AVAILABLE_IN_1_6 -const char * nm_setting_802_1x_get_private_key_uri(NMSetting8021x *setting); -gboolean nm_setting_802_1x_set_private_key(NMSetting8021x * setting, - const char * value, - const char * password, +const char *nm_setting_802_1x_get_private_key_uri(NMSetting8021x *setting); +gboolean nm_setting_802_1x_set_private_key(NMSetting8021x *setting, + const char *value, + const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); -const char * nm_setting_802_1x_get_private_key_password(NMSetting8021x *setting); + GError **error); +const char *nm_setting_802_1x_get_private_key_password(NMSetting8021x *setting); NMSettingSecretFlags nm_setting_802_1x_get_private_key_password_flags(NMSetting8021x *setting); NMSetting8021xCKFormat nm_setting_802_1x_get_private_key_format(NMSetting8021x *setting); NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_private_key_scheme(NMSetting8021x *setting); -GBytes * nm_setting_802_1x_get_phase2_private_key_blob(NMSetting8021x *setting); -const char * nm_setting_802_1x_get_phase2_private_key_path(NMSetting8021x *setting); +GBytes *nm_setting_802_1x_get_phase2_private_key_blob(NMSetting8021x *setting); +const char *nm_setting_802_1x_get_phase2_private_key_path(NMSetting8021x *setting); NM_AVAILABLE_IN_1_6 const char *nm_setting_802_1x_get_phase2_private_key_uri(NMSetting8021x *setting); -gboolean nm_setting_802_1x_set_phase2_private_key(NMSetting8021x * setting, - const char * value, - const char * password, +gboolean nm_setting_802_1x_set_phase2_private_key(NMSetting8021x *setting, + const char *value, + const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); + GError **error); const char *nm_setting_802_1x_get_phase2_private_key_password(NMSetting8021x *setting); NMSettingSecretFlags nm_setting_802_1x_get_phase2_private_key_password_flags(NMSetting8021x *setting); diff --git a/src/libnm-core-public/nm-setting-adsl.h b/src/libnm-core-public/nm-setting-adsl.h index 8c584fed..1c8c56a5 100644 --- a/src/libnm-core-public/nm-setting-adsl.h +++ b/src/libnm-core-public/nm-setting-adsl.h @@ -45,11 +45,11 @@ typedef struct _NMSettingAdslClass NMSettingAdslClass; GType nm_setting_adsl_get_type(void); -NMSetting * nm_setting_adsl_new(void); -const char * nm_setting_adsl_get_username(NMSettingAdsl *setting); -const char * nm_setting_adsl_get_password(NMSettingAdsl *setting); -const char * nm_setting_adsl_get_protocol(NMSettingAdsl *setting); -const char * nm_setting_adsl_get_encapsulation(NMSettingAdsl *setting); +NMSetting *nm_setting_adsl_new(void); +const char *nm_setting_adsl_get_username(NMSettingAdsl *setting); +const char *nm_setting_adsl_get_password(NMSettingAdsl *setting); +const char *nm_setting_adsl_get_protocol(NMSettingAdsl *setting); +const char *nm_setting_adsl_get_encapsulation(NMSettingAdsl *setting); guint32 nm_setting_adsl_get_vpi(NMSettingAdsl *setting); guint32 nm_setting_adsl_get_vci(NMSettingAdsl *setting); NMSettingSecretFlags nm_setting_adsl_get_password_flags(NMSettingAdsl *setting); diff --git a/src/libnm-core-public/nm-setting-bluetooth.h b/src/libnm-core-public/nm-setting-bluetooth.h index 6388430a..613005c9 100644 --- a/src/libnm-core-public/nm-setting-bluetooth.h +++ b/src/libnm-core-public/nm-setting-bluetooth.h @@ -59,7 +59,7 @@ typedef struct _NMSettingBluetoothClass NMSettingBluetoothClass; GType nm_setting_bluetooth_get_type(void); -NMSetting * nm_setting_bluetooth_new(void); +NMSetting *nm_setting_bluetooth_new(void); const char *nm_setting_bluetooth_get_bdaddr(NMSettingBluetooth *setting); const char *nm_setting_bluetooth_get_connection_type(NMSettingBluetooth *setting); diff --git a/src/libnm-core-public/nm-setting-bond.h b/src/libnm-core-public/nm-setting-bond.h index e819b4e1..ed44abbf 100644 --- a/src/libnm-core-public/nm-setting-bond.h +++ b/src/libnm-core-public/nm-setting-bond.h @@ -62,12 +62,12 @@ typedef struct _NMSettingBondClass NMSettingBondClass; GType nm_setting_bond_get_type(void); -NMSetting * nm_setting_bond_new(void); +NMSetting *nm_setting_bond_new(void); 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 **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); diff --git a/src/libnm-core-public/nm-setting-cdma.h b/src/libnm-core-public/nm-setting-cdma.h index 1378f170..9b2e5ed7 100644 --- a/src/libnm-core-public/nm-setting-cdma.h +++ b/src/libnm-core-public/nm-setting-cdma.h @@ -37,10 +37,10 @@ typedef struct _NMSettingCdmaClass NMSettingCdmaClass; GType nm_setting_cdma_get_type(void); -NMSetting * nm_setting_cdma_new(void); -const char * nm_setting_cdma_get_number(NMSettingCdma *setting); -const char * nm_setting_cdma_get_username(NMSettingCdma *setting); -const char * nm_setting_cdma_get_password(NMSettingCdma *setting); +NMSetting *nm_setting_cdma_new(void); +const char *nm_setting_cdma_get_number(NMSettingCdma *setting); +const char *nm_setting_cdma_get_username(NMSettingCdma *setting); +const char *nm_setting_cdma_get_password(NMSettingCdma *setting); NMSettingSecretFlags nm_setting_cdma_get_password_flags(NMSettingCdma *setting); NM_AVAILABLE_IN_1_8 diff --git a/src/libnm-core-public/nm-setting-connection.h b/src/libnm-core-public/nm-setting-connection.h index 54fc7929..83b5fd34 100644 --- a/src/libnm-core-public/nm-setting-connection.h +++ b/src/libnm-core-public/nm-setting-connection.h @@ -150,7 +150,7 @@ typedef struct _NMSettingConnectionClass NMSettingConnectionClass; GType nm_setting_connection_get_type(void); -NMSetting * nm_setting_connection_new(void); +NMSetting *nm_setting_connection_new(void); const char *nm_setting_connection_get_id(NMSettingConnection *setting); const char *nm_setting_connection_get_uuid(NMSettingConnection *setting); NM_AVAILABLE_IN_1_4 @@ -169,21 +169,21 @@ gboolean nm_setting_connection_get_read_only(NMSettingConnection guint32 nm_setting_connection_get_num_permissions(NMSettingConnection *setting); gboolean nm_setting_connection_get_permission(NMSettingConnection *setting, guint32 idx, - const char ** out_ptype, - const char ** out_pitem, - const char ** out_detail); + 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); + const char *uname); gboolean nm_setting_connection_add_permission(NMSettingConnection *setting, - const char * ptype, - const char * pitem, - const char * detail); + const char *ptype, + const char *pitem, + const char *detail); void nm_setting_connection_remove_permission(NMSettingConnection *setting, guint32 idx); gboolean nm_setting_connection_remove_permission_by_value(NMSettingConnection *setting, - const char * ptype, - const char * pitem, - const char * detail); + const char *ptype, + const char *pitem, + const char *detail); const char *nm_setting_connection_get_master(NMSettingConnection *setting); gboolean nm_setting_connection_is_slave_type(NMSettingConnection *setting, const char *type); @@ -197,7 +197,7 @@ const char *nm_setting_connection_get_secondary(NMSettingConnection *setting, gu gboolean nm_setting_connection_add_secondary(NMSettingConnection *setting, const char *sec_uuid); void nm_setting_connection_remove_secondary(NMSettingConnection *setting, guint32 idx); gboolean nm_setting_connection_remove_secondary_by_value(NMSettingConnection *setting, - const char * sec_uuid); + const char *sec_uuid); guint32 nm_setting_connection_get_gateway_ping_timeout(NMSettingConnection *setting); NM_AVAILABLE_IN_1_2 diff --git a/src/libnm-core-public/nm-setting-dcb.h b/src/libnm-core-public/nm-setting-dcb.h index 53786213..ba702bd7 100644 --- a/src/libnm-core-public/nm-setting-dcb.h +++ b/src/libnm-core-public/nm-setting-dcb.h @@ -85,7 +85,7 @@ NMSetting *nm_setting_dcb_new(void); NMSettingDcbFlags nm_setting_dcb_get_app_fcoe_flags(NMSettingDcb *setting); int nm_setting_dcb_get_app_fcoe_priority(NMSettingDcb *setting); -const char * nm_setting_dcb_get_app_fcoe_mode(NMSettingDcb *setting); +const char *nm_setting_dcb_get_app_fcoe_mode(NMSettingDcb *setting); NMSettingDcbFlags nm_setting_dcb_get_app_iscsi_flags(NMSettingDcb *setting); int nm_setting_dcb_get_app_iscsi_priority(NMSettingDcb *setting); diff --git a/src/libnm-core-public/nm-setting-infiniband.h b/src/libnm-core-public/nm-setting-infiniband.h index 44f30839..313b2087 100644 --- a/src/libnm-core-public/nm-setting-infiniband.h +++ b/src/libnm-core-public/nm-setting-infiniband.h @@ -38,7 +38,7 @@ typedef struct _NMSettingInfinibandClass NMSettingInfinibandClass; GType nm_setting_infiniband_get_type(void); -NMSetting * nm_setting_infiniband_new(void); +NMSetting *nm_setting_infiniband_new(void); const char *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); diff --git a/src/libnm-core-public/nm-setting-ip-config.h b/src/libnm-core-public/nm-setting-ip-config.h index 126c4c11..6a19bdb3 100644 --- a/src/libnm-core-public/nm-setting-ip-config.h +++ b/src/libnm-core-public/nm-setting-ip-config.h @@ -61,7 +61,7 @@ void nm_ip_address_set_address_binary(NMIPAddress *address, gconstpointer guint nm_ip_address_get_prefix(NMIPAddress *address); void nm_ip_address_set_prefix(NMIPAddress *address, guint prefix); -char ** nm_ip_address_get_attribute_names(NMIPAddress *address); +char **nm_ip_address_get_attribute_names(NMIPAddress *address); GVariant *nm_ip_address_get_attribute(NMIPAddress *address, const char *name); void nm_ip_address_set_attribute(NMIPAddress *address, const char *name, GVariant *value); @@ -74,13 +74,13 @@ NMIPRoute *nm_ip_route_new(int family, guint prefix, const char *next_hop, gint64 metric, - GError ** error); + GError **error); NMIPRoute *nm_ip_route_new_binary(int family, gconstpointer dest, guint prefix, gconstpointer next_hop, gint64 metric, - GError ** error); + GError **error); void nm_ip_route_ref(NMIPRoute *route); void nm_ip_route_unref(NMIPRoute *route); @@ -111,17 +111,17 @@ void nm_ip_route_set_next_hop_binary(NMIPRoute *route, gconstpointer next gint64 nm_ip_route_get_metric(NMIPRoute *route); void nm_ip_route_set_metric(NMIPRoute *route, gint64 metric); -char ** nm_ip_route_get_attribute_names(NMIPRoute *route); +char **nm_ip_route_get_attribute_names(NMIPRoute *route); GVariant *nm_ip_route_get_attribute(NMIPRoute *route, const char *name); void nm_ip_route_set_attribute(NMIPRoute *route, const char *name, GVariant *value); NM_AVAILABLE_IN_1_8 const NMVariantAttributeSpec *const *nm_ip_route_get_variant_attribute_spec(void); NM_AVAILABLE_IN_1_8 gboolean nm_ip_route_attribute_validate(const char *name, - GVariant * value, + GVariant *value, int family, - gboolean * known, - GError ** error); + gboolean *known, + GError **error); #define NM_IP_ROUTE_ATTRIBUTE_CWND "cwnd" #define NM_IP_ROUTE_ATTRIBUTE_FROM "from" @@ -250,8 +250,8 @@ void nm_ip_routing_rule_set_suppress_prefixlength(NMIPRoutingRule *self, NM_AVAILABLE_IN_1_34 gboolean nm_ip_routing_rule_get_uid_range(const NMIPRoutingRule *self, - guint32 * out_range_start, - guint32 * out_range_end); + guint32 *out_range_start, + guint32 *out_range_end); NM_AVAILABLE_IN_1_34 void nm_ip_routing_rule_set_uid_range(NMIPRoutingRule *self, guint32 uid_range_start, @@ -286,16 +286,16 @@ typedef enum { /*< flags >*/ } NMIPRoutingRuleAsStringFlags; NM_AVAILABLE_IN_1_18 -NMIPRoutingRule *nm_ip_routing_rule_from_string(const char * str, +NMIPRoutingRule *nm_ip_routing_rule_from_string(const char *str, NMIPRoutingRuleAsStringFlags to_string_flags, - GHashTable * extra_args, - GError ** error); + GHashTable *extra_args, + GError **error); NM_AVAILABLE_IN_1_18 -char *nm_ip_routing_rule_to_string(const NMIPRoutingRule * self, +char *nm_ip_routing_rule_to_string(const NMIPRoutingRule *self, NMIPRoutingRuleAsStringFlags to_string_flags, - GHashTable * extra_args, - GError ** error); + GHashTable *extra_args, + GError **error); /*****************************************************************************/ @@ -413,7 +413,7 @@ const char *nm_setting_ip_config_get_dns_search(NMSettingIPConfig *setting, int gboolean nm_setting_ip_config_add_dns_search(NMSettingIPConfig *setting, const char *dns_search); void nm_setting_ip_config_remove_dns_search(NMSettingIPConfig *setting, int idx); gboolean nm_setting_ip_config_remove_dns_search_by_value(NMSettingIPConfig *setting, - const char * dns_search); + const char *dns_search); void nm_setting_ip_config_clear_dns_searches(NMSettingIPConfig *setting); guint nm_setting_ip_config_get_num_dns_options(NMSettingIPConfig *setting); @@ -422,7 +422,7 @@ const char *nm_setting_ip_config_get_dns_option(NMSettingIPConfig *setting, guin gboolean nm_setting_ip_config_add_dns_option(NMSettingIPConfig *setting, const char *dns_option); void nm_setting_ip_config_remove_dns_option(NMSettingIPConfig *setting, int idx); gboolean nm_setting_ip_config_remove_dns_option_by_value(NMSettingIPConfig *setting, - const char * dns_option); + const char *dns_option); void nm_setting_ip_config_clear_dns_options(NMSettingIPConfig *setting, gboolean is_set); NM_AVAILABLE_IN_1_4 @@ -433,7 +433,7 @@ NMIPAddress *nm_setting_ip_config_get_address(NMSettingIPConfig *setting, int id gboolean nm_setting_ip_config_add_address(NMSettingIPConfig *setting, NMIPAddress *address); void nm_setting_ip_config_remove_address(NMSettingIPConfig *setting, int idx); gboolean nm_setting_ip_config_remove_address_by_value(NMSettingIPConfig *setting, - NMIPAddress * address); + NMIPAddress *address); void nm_setting_ip_config_clear_addresses(NMSettingIPConfig *setting); const char *nm_setting_ip_config_get_gateway(NMSettingIPConfig *setting); @@ -456,7 +456,7 @@ NM_AVAILABLE_IN_1_18 NMIPRoutingRule *nm_setting_ip_config_get_routing_rule(NMSettingIPConfig *setting, guint idx); NM_AVAILABLE_IN_1_18 void nm_setting_ip_config_add_routing_rule(NMSettingIPConfig *setting, - NMIPRoutingRule * routing_rule); + NMIPRoutingRule *routing_rule); NM_AVAILABLE_IN_1_18 void nm_setting_ip_config_remove_routing_rule(NMSettingIPConfig *setting, guint idx); NM_AVAILABLE_IN_1_18 @@ -484,7 +484,7 @@ NMDhcpHostnameFlags nm_setting_ip_config_get_dhcp_hostname_flags(NMSettingIPConf NM_AVAILABLE_IN_1_28 const char *const *nm_setting_ip_config_get_dhcp_reject_servers(NMSettingIPConfig *setting, - guint * out_len); + guint *out_len); NM_AVAILABLE_IN_1_28 void nm_setting_ip_config_add_dhcp_reject_server(NMSettingIPConfig *setting, const char *server); NM_AVAILABLE_IN_1_28 diff --git a/src/libnm-core-public/nm-setting-match.h b/src/libnm-core-public/nm-setting-match.h index a4e283e2..6f3666b5 100644 --- a/src/libnm-core-public/nm-setting-match.h +++ b/src/libnm-core-public/nm-setting-match.h @@ -46,7 +46,7 @@ NM_AVAILABLE_IN_1_14 void nm_setting_match_remove_interface_name(NMSettingMatch *setting, int idx); NM_AVAILABLE_IN_1_14 gboolean nm_setting_match_remove_interface_name_by_value(NMSettingMatch *setting, - const char * interface_name); + const char *interface_name); NM_AVAILABLE_IN_1_14 void nm_setting_match_add_interface_name(NMSettingMatch *setting, const char *interface_name); NM_AVAILABLE_IN_1_14 @@ -62,15 +62,15 @@ NM_AVAILABLE_IN_1_26 void nm_setting_match_remove_kernel_command_line(NMSettingMatch *setting, guint idx); NM_AVAILABLE_IN_1_26 gboolean nm_setting_match_remove_kernel_command_line_by_value(NMSettingMatch *setting, - const char * kernel_command_line); + const char *kernel_command_line); NM_AVAILABLE_IN_1_26 void nm_setting_match_add_kernel_command_line(NMSettingMatch *setting, - const char * kernel_command_line); + const char *kernel_command_line); NM_AVAILABLE_IN_1_26 void nm_setting_match_clear_kernel_command_lines(NMSettingMatch *setting); NM_AVAILABLE_IN_1_26 const char *const *nm_setting_match_get_kernel_command_lines(NMSettingMatch *setting, - guint * length); + guint *length); NM_AVAILABLE_IN_1_26 guint nm_setting_match_get_num_drivers(NMSettingMatch *setting); diff --git a/src/libnm-core-public/nm-setting-olpc-mesh.h b/src/libnm-core-public/nm-setting-olpc-mesh.h index c9903f75..b055adbb 100644 --- a/src/libnm-core-public/nm-setting-olpc-mesh.h +++ b/src/libnm-core-public/nm-setting-olpc-mesh.h @@ -37,8 +37,8 @@ typedef struct _NMSettingOlpcMeshClass NMSettingOlpcMeshClass; GType nm_setting_olpc_mesh_get_type(void); -NMSetting * nm_setting_olpc_mesh_new(void); -GBytes * nm_setting_olpc_mesh_get_ssid(NMSettingOlpcMesh *setting); +NMSetting *nm_setting_olpc_mesh_new(void); +GBytes *nm_setting_olpc_mesh_get_ssid(NMSettingOlpcMesh *setting); guint32 nm_setting_olpc_mesh_get_channel(NMSettingOlpcMesh *setting); const char *nm_setting_olpc_mesh_get_dhcp_anycast_address(NMSettingOlpcMesh *setting); diff --git a/src/libnm-core-public/nm-setting-ovs-dpdk.h b/src/libnm-core-public/nm-setting-ovs-dpdk.h index 5d96aef4..2e2d11b9 100644 --- a/src/libnm-core-public/nm-setting-ovs-dpdk.h +++ b/src/libnm-core-public/nm-setting-ovs-dpdk.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS #define NM_SETTING_OVS_DPDK_SETTING_NAME "ovs-dpdk" #define NM_SETTING_OVS_DPDK_DEVARGS "devargs" +#define NM_SETTING_OVS_DPDK_N_RXQ "n-rxq" typedef struct _NMSettingOvsDpdkClass NMSettingOvsDpdkClass; @@ -38,6 +39,8 @@ NMSetting *nm_setting_ovs_dpdk_new(void); NM_AVAILABLE_IN_1_20 const char *nm_setting_ovs_dpdk_get_devargs(NMSettingOvsDpdk *self); +NM_AVAILABLE_IN_1_36 +guint32 nm_setting_ovs_dpdk_get_n_rxq(NMSettingOvsDpdk *self); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-ovs-external-ids.h b/src/libnm-core-public/nm-setting-ovs-external-ids.h index 3ae991a1..03cb299e 100644 --- a/src/libnm-core-public/nm-setting-ovs-external-ids.h +++ b/src/libnm-core-public/nm-setting-ovs-external-ids.h @@ -46,15 +46,15 @@ NMSetting *nm_setting_ovs_external_ids_new(void); NM_AVAILABLE_IN_1_30 const char *const *nm_setting_ovs_external_ids_get_data_keys(NMSettingOvsExternalIDs *setting, - guint * out_len); + guint *out_len); NM_AVAILABLE_IN_1_30 const char *nm_setting_ovs_external_ids_get_data(NMSettingOvsExternalIDs *setting, const char *key); NM_AVAILABLE_IN_1_30 void nm_setting_ovs_external_ids_set_data(NMSettingOvsExternalIDs *setting, - const char * key, - const char * val); + const char *key, + const char *val); /*****************************************************************************/ diff --git a/src/libnm-core-public/nm-setting-pppoe.h b/src/libnm-core-public/nm-setting-pppoe.h index 5abf9c9f..b94046d4 100644 --- a/src/libnm-core-public/nm-setting-pppoe.h +++ b/src/libnm-core-public/nm-setting-pppoe.h @@ -39,10 +39,10 @@ GType nm_setting_pppoe_get_type(void); NMSetting *nm_setting_pppoe_new(void); NM_AVAILABLE_IN_1_10 -const char * nm_setting_pppoe_get_parent(NMSettingPppoe *setting); -const char * nm_setting_pppoe_get_service(NMSettingPppoe *setting); -const char * nm_setting_pppoe_get_username(NMSettingPppoe *setting); -const char * nm_setting_pppoe_get_password(NMSettingPppoe *setting); +const char *nm_setting_pppoe_get_parent(NMSettingPppoe *setting); +const char *nm_setting_pppoe_get_service(NMSettingPppoe *setting); +const char *nm_setting_pppoe_get_username(NMSettingPppoe *setting); +const char *nm_setting_pppoe_get_password(NMSettingPppoe *setting); NMSettingSecretFlags nm_setting_pppoe_get_password_flags(NMSettingPppoe *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-serial.h b/src/libnm-core-public/nm-setting-serial.h index 4f8ead82..82a97cb4 100644 --- a/src/libnm-core-public/nm-setting-serial.h +++ b/src/libnm-core-public/nm-setting-serial.h @@ -51,7 +51,7 @@ typedef struct _NMSettingSerialClass NMSettingSerialClass; GType nm_setting_serial_get_type(void); -NMSetting * nm_setting_serial_new(void); +NMSetting *nm_setting_serial_new(void); guint nm_setting_serial_get_baud(NMSettingSerial *setting); guint nm_setting_serial_get_bits(NMSettingSerial *setting); NMSettingSerialParity nm_setting_serial_get_parity(NMSettingSerial *setting); diff --git a/src/libnm-core-public/nm-setting-tc-config.h b/src/libnm-core-public/nm-setting-tc-config.h index 7e8a44b5..abd61683 100644 --- a/src/libnm-core-public/nm-setting-tc-config.h +++ b/src/libnm-core-public/nm-setting-tc-config.h @@ -153,7 +153,7 @@ NM_AVAILABLE_IN_1_12 void nm_setting_tc_config_remove_tfilter(NMSettingTCConfig *setting, guint idx); NM_AVAILABLE_IN_1_12 gboolean nm_setting_tc_config_remove_tfilter_by_value(NMSettingTCConfig *setting, - NMTCTfilter * tfilter); + NMTCTfilter *tfilter); NM_AVAILABLE_IN_1_12 void nm_setting_tc_config_clear_tfilters(NMSettingTCConfig *setting); diff --git a/src/libnm-core-public/nm-setting-team.h b/src/libnm-core-public/nm-setting-team.h index 82174152..339830d3 100644 --- a/src/libnm-core-public/nm-setting-team.h +++ b/src/libnm-core-public/nm-setting-team.h @@ -48,24 +48,24 @@ NMTeamLinkWatcher *nm_team_link_watcher_new_nsna_ping(int init_wait, int interval, int missed_max, const char *target_host, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_12 NMTeamLinkWatcher *nm_team_link_watcher_new_arp_ping(int init_wait, int interval, int missed_max, - const char * target_host, - const char * source_host, + const char *target_host, + const char *source_host, NMTeamLinkWatcherArpPingFlags flags, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_16 NMTeamLinkWatcher *nm_team_link_watcher_new_arp_ping2(int init_wait, int interval, int missed_max, int vlanid, - const char * target_host, - const char * source_host, + const char *target_host, + const char *source_host, NMTeamLinkWatcherArpPingFlags flags, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_12 void nm_team_link_watcher_ref(NMTeamLinkWatcher *watcher); NM_AVAILABLE_IN_1_12 @@ -203,7 +203,7 @@ gboolean nm_setting_team_add_link_watcher(NMSettingTeam *setting, NMTeamLinkWatc NM_AVAILABLE_IN_1_12 void nm_setting_team_remove_link_watcher(NMSettingTeam *setting, guint idx); NM_AVAILABLE_IN_1_12 -gboolean nm_setting_team_remove_link_watcher_by_value(NMSettingTeam * setting, +gboolean nm_setting_team_remove_link_watcher_by_value(NMSettingTeam *setting, NMTeamLinkWatcher *link_watcher); NM_AVAILABLE_IN_1_12 void nm_setting_team_clear_link_watchers(NMSettingTeam *setting); diff --git a/src/libnm-core-public/nm-setting-vlan.h b/src/libnm-core-public/nm-setting-vlan.h index 09a407db..10a95da0 100644 --- a/src/libnm-core-public/nm-setting-vlan.h +++ b/src/libnm-core-public/nm-setting-vlan.h @@ -89,27 +89,27 @@ 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, +gboolean nm_setting_vlan_get_priority(NMSettingVlan *setting, NMVlanPriorityMap map, guint32 idx, - guint32 * out_from, - guint32 * out_to); + guint32 *out_from, + guint32 *out_to); -gboolean nm_setting_vlan_add_priority(NMSettingVlan * setting, +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); -gboolean nm_setting_vlan_remove_priority_by_value(NMSettingVlan * setting, +gboolean nm_setting_vlan_remove_priority_by_value(NMSettingVlan *setting, NMVlanPriorityMap map, guint32 from, guint32 to); -gboolean nm_setting_vlan_remove_priority_str_by_value(NMSettingVlan * setting, +gboolean nm_setting_vlan_remove_priority_str_by_value(NMSettingVlan *setting, NMVlanPriorityMap map, - const char * str); + const char *str); void nm_setting_vlan_clear_priorities(NMSettingVlan *setting, NMVlanPriorityMap map); diff --git a/src/libnm-core-public/nm-setting-vpn.h b/src/libnm-core-public/nm-setting-vpn.h index 9fbb791b..151a293a 100644 --- a/src/libnm-core-public/nm-setting-vpn.h +++ b/src/libnm-core-public/nm-setting-vpn.h @@ -46,7 +46,7 @@ typedef void (*NMVpnIterFunc)(const char *key, const char *value, gpointer user_ GType nm_setting_vpn_get_type(void); -NMSetting * nm_setting_vpn_new(void); +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); gboolean nm_setting_vpn_get_persistent(NMSettingVpn *setting); diff --git a/src/libnm-core-public/nm-setting-wired.h b/src/libnm-core-public/nm-setting-wired.h index 54c8f9c0..ebe0d00a 100644 --- a/src/libnm-core-public/nm-setting-wired.h +++ b/src/libnm-core-public/nm-setting-wired.h @@ -85,7 +85,7 @@ typedef struct _NMSettingWiredClass NMSettingWiredClass; GType nm_setting_wired_get_type(void); -NMSetting * nm_setting_wired_new(void); +NMSetting *nm_setting_wired_new(void); const char *nm_setting_wired_get_port(NMSettingWired *setting); guint32 nm_setting_wired_get_speed(NMSettingWired *setting); const char *nm_setting_wired_get_duplex(NMSettingWired *setting); @@ -101,23 +101,23 @@ const char *nm_setting_wired_get_generate_mac_address_mask(NMSettingWired *setti const char *const *nm_setting_wired_get_mac_address_blacklist(NMSettingWired *setting); guint32 nm_setting_wired_get_num_mac_blacklist_items(NMSettingWired *setting); -const char * nm_setting_wired_get_mac_blacklist_item(NMSettingWired *setting, guint32 idx); +const char *nm_setting_wired_get_mac_blacklist_item(NMSettingWired *setting, guint32 idx); gboolean nm_setting_wired_add_mac_blacklist_item(NMSettingWired *setting, const char *mac); void nm_setting_wired_remove_mac_blacklist_item(NMSettingWired *setting, guint32 idx); gboolean nm_setting_wired_remove_mac_blacklist_item_by_value(NMSettingWired *setting, - const char * mac); + const char *mac); void nm_setting_wired_clear_mac_blacklist_items(NMSettingWired *setting); guint32 nm_setting_wired_get_mtu(NMSettingWired *setting); const char *const *nm_setting_wired_get_s390_subchannels(NMSettingWired *setting); -const char * nm_setting_wired_get_s390_nettype(NMSettingWired *setting); +const char *nm_setting_wired_get_s390_nettype(NMSettingWired *setting); guint32 nm_setting_wired_get_num_s390_options(NMSettingWired *setting); gboolean nm_setting_wired_get_s390_option(NMSettingWired *setting, guint32 idx, - const char ** out_key, - const char ** out_value); + const char **out_key, + const char **out_value); const char *nm_setting_wired_get_s390_option_by_key(NMSettingWired *setting, const char *key); gboolean nm_setting_wired_add_s390_option(NMSettingWired *setting, const char *key, const char *value); @@ -125,7 +125,7 @@ gboolean nm_setting_wired_remove_s390_option(NMSettingWired *setting, const const char **nm_setting_wired_get_valid_s390_options(NMSettingWired *setting); NMSettingWiredWakeOnLan nm_setting_wired_get_wake_on_lan(NMSettingWired *setting); -const char * nm_setting_wired_get_wake_on_lan_password(NMSettingWired *setting); +const char *nm_setting_wired_get_wake_on_lan_password(NMSettingWired *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-wireguard.h b/src/libnm-core-public/nm-setting-wireguard.h index cb475d27..7e62e2ed 100644 --- a/src/libnm-core-public/nm-setting-wireguard.h +++ b/src/libnm-core-public/nm-setting-wireguard.h @@ -47,20 +47,20 @@ NM_AVAILABLE_IN_1_16 const char *nm_wireguard_peer_get_public_key(const NMWireGuardPeer *self); NM_AVAILABLE_IN_1_16 gboolean nm_wireguard_peer_set_public_key(NMWireGuardPeer *self, - const char * public_key, + const char *public_key, gboolean accept_invalid); NM_AVAILABLE_IN_1_16 const char *nm_wireguard_peer_get_preshared_key(const NMWireGuardPeer *self); NM_AVAILABLE_IN_1_16 gboolean nm_wireguard_peer_set_preshared_key(NMWireGuardPeer *self, - const char * preshared_key, + const char *preshared_key, gboolean accept_invalid); NM_AVAILABLE_IN_1_16 NMSettingSecretFlags nm_wireguard_peer_get_preshared_key_flags(const NMWireGuardPeer *self); NM_AVAILABLE_IN_1_16 -void nm_wireguard_peer_set_preshared_key_flags(NMWireGuardPeer * self, +void nm_wireguard_peer_set_preshared_key_flags(NMWireGuardPeer *self, NMSettingSecretFlags preshared_key_flags); NM_AVAILABLE_IN_1_16 @@ -84,7 +84,7 @@ NM_AVAILABLE_IN_1_16 void nm_wireguard_peer_clear_allowed_ips(NMWireGuardPeer *self); NM_AVAILABLE_IN_1_16 gboolean nm_wireguard_peer_append_allowed_ip(NMWireGuardPeer *self, - const char * allowed_ip, + const char *allowed_ip, gboolean accept_invalid); NM_AVAILABLE_IN_1_16 gboolean nm_wireguard_peer_remove_allowed_ip(NMWireGuardPeer *self, guint idx); @@ -93,7 +93,7 @@ NM_AVAILABLE_IN_1_16 gboolean nm_wireguard_peer_is_valid(const NMWireGuardPeer *self, gboolean check_non_secrets, gboolean check_secrets, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_16 int nm_wireguard_peer_cmp(const NMWireGuardPeer *a, @@ -168,8 +168,8 @@ NMWireGuardPeer *nm_setting_wireguard_get_peer(NMSettingWireGuard *self, guint i NM_AVAILABLE_IN_1_16 NMWireGuardPeer *nm_setting_wireguard_get_peer_by_public_key(NMSettingWireGuard *self, - const char * public_key, - guint * out_idx); + const char *public_key, + guint *out_idx); NM_AVAILABLE_IN_1_16 void nm_setting_wireguard_set_peer(NMSettingWireGuard *self, NMWireGuardPeer *peer, guint idx); diff --git a/src/libnm-core-public/nm-setting-wireless-security.h b/src/libnm-core-public/nm-setting-wireless-security.h index 9686e7d5..c9aec27d 100644 --- a/src/libnm-core-public/nm-setting-wireless-security.h +++ b/src/libnm-core-public/nm-setting-wireless-security.h @@ -163,36 +163,36 @@ const char *nm_setting_wireless_security_get_key_mgmt(NMSettingWirelessSecurity guint32 nm_setting_wireless_security_get_num_protos(NMSettingWirelessSecurity *setting); const char *nm_setting_wireless_security_get_proto(NMSettingWirelessSecurity *setting, guint32 i); gboolean nm_setting_wireless_security_add_proto(NMSettingWirelessSecurity *setting, - const char * proto); + const char *proto); void nm_setting_wireless_security_remove_proto(NMSettingWirelessSecurity *setting, guint32 i); gboolean nm_setting_wireless_security_remove_proto_by_value(NMSettingWirelessSecurity *setting, - const char * proto); + const char *proto); void nm_setting_wireless_security_clear_protos(NMSettingWirelessSecurity *setting); guint32 nm_setting_wireless_security_get_num_pairwise(NMSettingWirelessSecurity *setting); const char *nm_setting_wireless_security_get_pairwise(NMSettingWirelessSecurity *setting, guint32 i); gboolean nm_setting_wireless_security_add_pairwise(NMSettingWirelessSecurity *setting, - const char * pairwise); + const char *pairwise); void nm_setting_wireless_security_remove_pairwise(NMSettingWirelessSecurity *setting, guint32 i); gboolean nm_setting_wireless_security_remove_pairwise_by_value(NMSettingWirelessSecurity *setting, - const char * pairwise); + const char *pairwise); void nm_setting_wireless_security_clear_pairwise(NMSettingWirelessSecurity *setting); guint32 nm_setting_wireless_security_get_num_groups(NMSettingWirelessSecurity *setting); const char *nm_setting_wireless_security_get_group(NMSettingWirelessSecurity *setting, guint32 i); gboolean nm_setting_wireless_security_add_group(NMSettingWirelessSecurity *setting, - const char * group); + const char *group); void nm_setting_wireless_security_remove_group(NMSettingWirelessSecurity *setting, guint32 i); gboolean nm_setting_wireless_security_remove_group_by_value(NMSettingWirelessSecurity *setting, - const char * group); + const char *group); void nm_setting_wireless_security_clear_groups(NMSettingWirelessSecurity *setting); NM_AVAILABLE_IN_1_10 NMSettingWirelessSecurityPmf nm_setting_wireless_security_get_pmf(NMSettingWirelessSecurity *setting); -const char * nm_setting_wireless_security_get_psk(NMSettingWirelessSecurity *setting); +const char *nm_setting_wireless_security_get_psk(NMSettingWirelessSecurity *setting); NMSettingSecretFlags nm_setting_wireless_security_get_psk_flags(NMSettingWirelessSecurity *setting); const char *nm_setting_wireless_security_get_leap_username(NMSettingWirelessSecurity *setting); @@ -204,7 +204,7 @@ const char *nm_setting_wireless_security_get_wep_key(NMSettingWirelessSecurity * guint32 idx); void nm_setting_wireless_security_set_wep_key(NMSettingWirelessSecurity *setting, guint32 idx, - const char * key); + const char *key); guint32 nm_setting_wireless_security_get_wep_tx_keyidx(NMSettingWirelessSecurity *setting); const char *nm_setting_wireless_security_get_auth_alg(NMSettingWirelessSecurity *setting); diff --git a/src/libnm-core-public/nm-setting-wireless.h b/src/libnm-core-public/nm-setting-wireless.h index 4451785f..0d4872fb 100644 --- a/src/libnm-core-public/nm-setting-wireless.h +++ b/src/libnm-core-public/nm-setting-wireless.h @@ -148,7 +148,7 @@ GType nm_setting_wireless_get_type(void); NMSetting *nm_setting_wireless_new(void); -GBytes * nm_setting_wireless_get_ssid(NMSettingWireless *setting); +GBytes *nm_setting_wireless_get_ssid(NMSettingWireless *setting); const char *nm_setting_wireless_get_mode(NMSettingWireless *setting); const char *nm_setting_wireless_get_band(NMSettingWireless *setting); guint32 nm_setting_wireless_get_channel(NMSettingWireless *setting); @@ -167,7 +167,7 @@ const char *nm_setting_wireless_get_mac_blacklist_item(NMSettingWireless *settin gboolean nm_setting_wireless_add_mac_blacklist_item(NMSettingWireless *setting, const char *mac); void nm_setting_wireless_remove_mac_blacklist_item(NMSettingWireless *setting, guint32 idx); gboolean nm_setting_wireless_remove_mac_blacklist_item_by_value(NMSettingWireless *setting, - const char * mac); + const char *mac); void nm_setting_wireless_clear_mac_blacklist_items(NMSettingWireless *setting); guint32 nm_setting_wireless_get_mtu(NMSettingWireless *setting); @@ -184,7 +184,7 @@ gboolean nm_setting_wireless_add_seen_bssid(NMSettingWireless *setting, const ch guint32 nm_setting_wireless_get_num_seen_bssids(NMSettingWireless *setting); const char *nm_setting_wireless_get_seen_bssid(NMSettingWireless *setting, guint32 i); -gboolean nm_setting_wireless_ap_security_compatible(NMSettingWireless * s_wireless, +gboolean nm_setting_wireless_ap_security_compatible(NMSettingWireless *s_wireless, NMSettingWirelessSecurity *s_wireless_sec, NM80211ApFlags ap_flags, NM80211ApSecurityFlags ap_wpa, diff --git a/src/libnm-core-public/nm-setting.h b/src/libnm-core-public/nm-setting.h index ea2525dc..ddf648bc 100644 --- a/src/libnm-core-public/nm-setting.h +++ b/src/libnm-core-public/nm-setting.h @@ -138,8 +138,8 @@ typedef enum { * * Returns: %TRUE to clear the secret, %FALSE to not clear the secret */ -typedef gboolean (*NMSettingClearSecretsWithFlagsFn)(NMSetting * setting, - const char * secret, +typedef gboolean (*NMSettingClearSecretsWithFlagsFn)(NMSetting *setting, + const char *secret, NMSettingSecretFlags flags, gpointer user_data); @@ -156,8 +156,8 @@ struct _NMSettInfoProperty; * @flags: The property's flags, like %NM_SETTING_PARAM_SECRET * @user_data: User data passed to nm_setting_enumerate_values() */ -typedef void (*NMSettingValueIterFn)(NMSetting * setting, - const char * key, +typedef void (*NMSettingValueIterFn)(NMSetting *setting, + const char *key, const GValue *value, GParamFlags flags, gpointer user_data); @@ -202,11 +202,11 @@ typedef enum { NM_SETTING_DIFF_RESULT_IN_B_DEFAULT = 0x00000008, } NMSettingDiffResult; -gboolean nm_setting_diff(NMSetting * a, - NMSetting * b, +gboolean nm_setting_diff(NMSetting *a, + NMSetting *b, NMSettingCompareFlags flags, gboolean invert_results, - GHashTable ** results); + GHashTable **results); void nm_setting_enumerate_values(NMSetting *setting, NMSettingValueIterFn func, gpointer user_data); @@ -214,15 +214,15 @@ char *nm_setting_to_string(NMSetting *setting); /*****************************************************************************/ -gboolean nm_setting_get_secret_flags(NMSetting * setting, - const char * secret_name, +gboolean nm_setting_get_secret_flags(NMSetting *setting, + const char *secret_name, NMSettingSecretFlags *out_flags, - GError ** error); + GError **error); -gboolean nm_setting_set_secret_flags(NMSetting * setting, - const char * secret_name, +gboolean nm_setting_set_secret_flags(NMSetting *setting, + const char *secret_name, NMSettingSecretFlags flags, - GError ** error); + GError **error); /*****************************************************************************/ @@ -253,7 +253,7 @@ void nm_setting_option_clear_by_name(NMSetting *setting, NMUtilsPredicateStr pre /*****************************************************************************/ -const GVariantType *nm_setting_get_dbus_property_type(NMSetting * setting, +const GVariantType *nm_setting_get_dbus_property_type(NMSetting *setting, const char *property_name); /*****************************************************************************/ diff --git a/src/libnm-core-public/nm-utils.h b/src/libnm-core-public/nm-utils.h index 5100b678..0a7c7a81 100644 --- a/src/libnm-core-public/nm-utils.h +++ b/src/libnm-core-public/nm-utils.h @@ -31,7 +31,7 @@ gboolean nm_utils_same_ssid(const guint8 *ssid1, const guint8 *ssid2, gsize len2, gboolean ignore_trailing_null); -char * nm_utils_ssid_to_utf8(const guint8 *ssid, gsize len); +char *nm_utils_ssid_to_utf8(const guint8 *ssid, gsize len); /** * NMUtilsSecurityType: @@ -86,27 +86,27 @@ gboolean nm_utils_wpa_psk_valid(const char *psk); NM_AVAILABLE_IN_1_6 gboolean nm_utils_is_json_object(const char *str, GError **error); -GVariant * nm_utils_ip4_dns_to_variant(char **dns); -char ** nm_utils_ip4_dns_from_variant(GVariant *value); -GVariant * nm_utils_ip4_addresses_to_variant(GPtrArray *addresses, const char *gateway); +GVariant *nm_utils_ip4_dns_to_variant(char **dns); +char **nm_utils_ip4_dns_from_variant(GVariant *value); +GVariant *nm_utils_ip4_addresses_to_variant(GPtrArray *addresses, const char *gateway); GPtrArray *nm_utils_ip4_addresses_from_variant(GVariant *value, char **out_gateway); -GVariant * nm_utils_ip4_routes_to_variant(GPtrArray *routes); +GVariant *nm_utils_ip4_routes_to_variant(GPtrArray *routes); GPtrArray *nm_utils_ip4_routes_from_variant(GVariant *value); guint32 nm_utils_ip4_netmask_to_prefix(guint32 netmask); guint32 nm_utils_ip4_prefix_to_netmask(guint32 prefix); guint32 nm_utils_ip4_get_default_prefix(guint32 ip); -GVariant * nm_utils_ip6_dns_to_variant(char **dns); -char ** nm_utils_ip6_dns_from_variant(GVariant *value); -GVariant * nm_utils_ip6_addresses_to_variant(GPtrArray *addresses, const char *gateway); +GVariant *nm_utils_ip6_dns_to_variant(char **dns); +char **nm_utils_ip6_dns_from_variant(GVariant *value); +GVariant *nm_utils_ip6_addresses_to_variant(GPtrArray *addresses, const char *gateway); GPtrArray *nm_utils_ip6_addresses_from_variant(GVariant *value, char **out_gateway); -GVariant * nm_utils_ip6_routes_to_variant(GPtrArray *routes); +GVariant *nm_utils_ip6_routes_to_variant(GPtrArray *routes); GPtrArray *nm_utils_ip6_routes_from_variant(GVariant *value); -GVariant * nm_utils_ip_addresses_to_variant(GPtrArray *addresses); +GVariant *nm_utils_ip_addresses_to_variant(GPtrArray *addresses); GPtrArray *nm_utils_ip_addresses_from_variant(GVariant *value, int family); -GVariant * nm_utils_ip_routes_to_variant(GPtrArray *routes); +GVariant *nm_utils_ip_routes_to_variant(GPtrArray *routes); GPtrArray *nm_utils_ip_routes_from_variant(GVariant *value, int family); char *nm_utils_uuid_generate(void); @@ -119,18 +119,18 @@ typedef gboolean (*NMUtilsFileSearchInPathsPredicate)(const char *filename, gpoi struct stat; -typedef gboolean (*NMUtilsCheckFilePredicate)(const char * filename, +typedef gboolean (*NMUtilsCheckFilePredicate)(const char *filename, const struct stat *stat, gpointer user_data, - GError ** error); + GError **error); -const char *nm_utils_file_search_in_paths(const char * progname, - const char * try_first, - const char *const * paths, +const char *nm_utils_file_search_in_paths(const char *progname, + const char *try_first, + const char *const *paths, GFileTest file_test_flags, NMUtilsFileSearchInPathsPredicate predicate, gpointer user_data, - GError ** error); + GError **error); guint32 nm_utils_wifi_freq_to_channel(guint32 freq); guint32 nm_utils_wifi_channel_to_freq(guint32 channel, const char *band); @@ -153,18 +153,18 @@ const char *nm_utils_wifi_strength_bars(guint8 strength); gsize nm_utils_hwaddr_len(int type) G_GNUC_PURE; -char * nm_utils_hwaddr_ntoa(gconstpointer addr, gsize length); +char *nm_utils_hwaddr_ntoa(gconstpointer addr, gsize length); GByteArray *nm_utils_hwaddr_atoba(const char *asc, gsize length); -guint8 * nm_utils_hwaddr_aton(const char *asc, gpointer buffer, gsize length); +guint8 *nm_utils_hwaddr_aton(const char *asc, gpointer buffer, gsize length); gboolean nm_utils_hwaddr_valid(const char *asc, gssize length); -char * nm_utils_hwaddr_canonical(const char *asc, gssize length); +char *nm_utils_hwaddr_canonical(const char *asc, gssize length); gboolean nm_utils_hwaddr_matches(gconstpointer hwaddr1, gssize hwaddr1_len, gconstpointer hwaddr2, gssize hwaddr2_len); -char * nm_utils_bin2hexstr(gconstpointer src, gsize len, int final_len); +char *nm_utils_bin2hexstr(gconstpointer src, gsize len, int final_len); GBytes *nm_utils_hexstr2bin(const char *hex); NM_DEPRECATED_IN_1_6_FOR(nm_utils_is_valid_iface_name) @@ -214,7 +214,7 @@ GHashTable *nm_utils_parse_variant_attributes(const char *string, char key_value_separator, gboolean ignore_unknown, const NMVariantAttributeSpec *const *spec, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_8 char *nm_utils_format_variant_attributes(GHashTable *attributes, diff --git a/src/libnm-core-public/nm-version-macros.h b/src/libnm-core-public/nm-version-macros.h index 3063f2f4..4921a021 100644 --- a/src/libnm-core-public/nm-version-macros.h +++ b/src/libnm-core-public/nm-version-macros.h @@ -22,7 +22,7 @@ * Evaluates to the minor version number of NetworkManager which this source * is compiled against. */ -#define NM_MINOR_VERSION (34) +#define NM_MINOR_VERSION (35) /** * NM_MICRO_VERSION: @@ -30,7 +30,7 @@ * Evaluates to the micro version number of NetworkManager which this source * compiled against. */ -#define NM_MICRO_VERSION (0) +#define NM_MICRO_VERSION (90) /** * NM_CHECK_VERSION: @@ -69,13 +69,14 @@ #define NM_VERSION_1_30 (NM_ENCODE_VERSION (1, 30, 0)) #define NM_VERSION_1_32 (NM_ENCODE_VERSION (1, 32, 0)) #define NM_VERSION_1_34 (NM_ENCODE_VERSION (1, 34, 0)) +#define NM_VERSION_1_36 (NM_ENCODE_VERSION (1, 36, 0)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * * For development builds, NM_API_VERSION is the next * stable API after NM_VERSION. When you run a development * version, you are already using the future API, even if - * it is not yet release. Hence, the currently used API + * it is not yet released. Hence, the currently used API * version is the future one. */ #define NM_API_VERSION \ (((NM_MINOR_VERSION % 2) == 1) \ diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index 8ec83436..76dd4240 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -69,13 +69,14 @@ #define NM_VERSION_1_30 (NM_ENCODE_VERSION (1, 30, 0)) #define NM_VERSION_1_32 (NM_ENCODE_VERSION (1, 32, 0)) #define NM_VERSION_1_34 (NM_ENCODE_VERSION (1, 34, 0)) +#define NM_VERSION_1_36 (NM_ENCODE_VERSION (1, 36, 0)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * * For development builds, NM_API_VERSION is the next * stable API after NM_VERSION. When you run a development * version, you are already using the future API, even if - * it is not yet release. Hence, the currently used API + * it is not yet released. Hence, the currently used API * version is the future one. */ #define NM_API_VERSION \ (((NM_MINOR_VERSION % 2) == 1) \ diff --git a/src/libnm-core-public/nm-version.h b/src/libnm-core-public/nm-version.h index f0f09fa8..d6f58924 100644 --- a/src/libnm-core-public/nm-version.h +++ b/src/libnm-core-public/nm-version.h @@ -299,6 +299,20 @@ #define NM_AVAILABLE_IN_1_34 #endif +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_36 +#define NM_DEPRECATED_IN_1_36 G_DEPRECATED +#define NM_DEPRECATED_IN_1_36_FOR(f) G_DEPRECATED_FOR(f) +#else +#define NM_DEPRECATED_IN_1_36 +#define NM_DEPRECATED_IN_1_36_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_36 +#define NM_AVAILABLE_IN_1_36 G_UNAVAILABLE(1, 36) +#else +#define NM_AVAILABLE_IN_1_36 +#endif + /* * Synchronous API for calling D-Bus in libnm is deprecated. See * https://developer.gnome.org/libnm/stable/usage.html#sync-api diff --git a/src/libnm-core-public/nm-vpn-editor-plugin.h b/src/libnm-core-public/nm-vpn-editor-plugin.h index e25c358e..4e632244 100644 --- a/src/libnm-core-public/nm-vpn-editor-plugin.h +++ b/src/libnm-core-public/nm-vpn-editor-plugin.h @@ -103,9 +103,9 @@ typedef struct { NMConnection *(*import_from_file)(NMVpnEditorPlugin *plugin, const char *path, GError **error); gboolean (*export_to_file)(NMVpnEditorPlugin *plugin, - const char * path, - NMConnection * connection, - GError ** error); + const char *path, + NMConnection *connection, + GError **error); char *(*get_suggested_filename)(NMVpnEditorPlugin *plugin, NMConnection *connection); @@ -117,8 +117,8 @@ typedef struct { GType nm_vpn_editor_plugin_get_type(void); NMVpnEditor *nm_vpn_editor_plugin_get_editor(NMVpnEditorPlugin *plugin, - NMConnection * connection, - GError ** error); + NMConnection *connection, + GError **error); NMVpnEditorPluginCapability nm_vpn_editor_plugin_get_capabilities(NMVpnEditorPlugin *plugin); @@ -126,22 +126,22 @@ NM_AVAILABLE_IN_1_4 gsize nm_vpn_editor_plugin_get_vt(NMVpnEditorPlugin *plugin, NMVpnEditorPluginVT *vt, gsize vt_size); -NMConnection * - nm_vpn_editor_plugin_import(NMVpnEditorPlugin *plugin, const char *path, GError **error); +NMConnection * +nm_vpn_editor_plugin_import(NMVpnEditorPlugin *plugin, const char *path, GError **error); gboolean nm_vpn_editor_plugin_export(NMVpnEditorPlugin *plugin, - const char * path, - NMConnection * connection, - GError ** error); -char * nm_vpn_editor_plugin_get_suggested_filename(NMVpnEditorPlugin *plugin, - NMConnection * connection); + const char *path, + NMConnection *connection, + GError **error); +char *nm_vpn_editor_plugin_get_suggested_filename(NMVpnEditorPlugin *plugin, + NMConnection *connection); NM_AVAILABLE_IN_1_2 -NMVpnEditorPlugin *nm_vpn_editor_plugin_load_from_file(const char * plugin_name, - const char * check_service, +NMVpnEditorPlugin *nm_vpn_editor_plugin_load_from_file(const char *plugin_name, + const char *check_service, int check_owner, NMUtilsCheckFilePredicate check_file, gpointer user_data, - GError ** error); + GError **error); NM_AVAILABLE_IN_1_4 NMVpnEditorPlugin * diff --git a/src/libnm-core-public/nm-vpn-plugin-info.h b/src/libnm-core-public/nm-vpn-plugin-info.h index 1e9870c8..aa319a57 100644 --- a/src/libnm-core-public/nm-vpn-plugin-info.h +++ b/src/libnm-core-public/nm-vpn-plugin-info.h @@ -89,7 +89,7 @@ NMVpnPluginInfo *nm_vpn_plugin_info_list_find_by_service(GSList *list, const cha NM_AVAILABLE_IN_1_4 char *nm_vpn_plugin_info_list_find_service_type(GSList *list, const char *name); NM_AVAILABLE_IN_1_4 -char **nm_vpn_plugin_info_list_get_service_types(GSList * list, +char **nm_vpn_plugin_info_list_get_service_types(GSList *list, gboolean only_existing, gboolean with_abbreviations); diff --git a/src/libnm-glib-aux/nm-c-list.h b/src/libnm-glib-aux/nm-c-list.h index 6dd3ac72..d89a9223 100644 --- a/src/libnm-glib-aux/nm-c-list.h +++ b/src/libnm-glib-aux/nm-c-list.h @@ -169,7 +169,7 @@ nm_c_list_move_after(CList *lst, CList *elem) G_STMT_START \ { \ CList *const _lst = (lst); \ - type * _elem; \ + type *_elem; \ \ while ((_elem = c_list_first_entry(_lst, type, member))) { \ destroy_fcn(_elem); \ diff --git a/src/libnm-glib-aux/nm-dbus-aux.c b/src/libnm-glib-aux/nm-dbus-aux.c index 454bd2d8..0f43ba8e 100644 --- a/src/libnm-glib-aux/nm-dbus-aux.c +++ b/src/libnm-glib-aux/nm-dbus-aux.c @@ -12,9 +12,9 @@ static void _nm_dbus_connection_call_get_name_owner_cb(GObject *source, GAsyncResult *res, gpointer user_data) { - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError * error = NULL; - const char * owner = NULL; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; + const char *owner = NULL; gpointer orig_user_data; NMDBusConnectionCallGetNameOwnerCb callback; @@ -28,10 +28,10 @@ _nm_dbus_connection_call_get_name_owner_cb(GObject *source, GAsyncResult *res, g } void -nm_dbus_connection_call_get_name_owner(GDBusConnection * dbus_connection, - const char * service_name, +nm_dbus_connection_call_get_name_owner(GDBusConnection *dbus_connection, + const char *service_name, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallGetNameOwnerCb callback, gpointer user_data) { @@ -56,8 +56,8 @@ nm_dbus_connection_call_get_name_owner(GDBusConnection * dbus_c static void _nm_dbus_connection_call_default_cb(GObject *source, GAsyncResult *res, gpointer user_data) { - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError * error = NULL; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; gpointer orig_user_data; NMDBusConnectionCallDefaultCb callback; @@ -71,12 +71,12 @@ _nm_dbus_connection_call_default_cb(GObject *source, GAsyncResult *res, gpointer } void -nm_dbus_connection_call_get_all(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, - const char * interface_name, +nm_dbus_connection_call_get_all(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, + const char *interface_name, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallDefaultCb callback, gpointer user_data) { @@ -97,14 +97,14 @@ nm_dbus_connection_call_get_all(GDBusConnection * dbus_connection, } void -nm_dbus_connection_call_set(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, - const char * interface_name, - const char * property_name, - GVariant * value, +nm_dbus_connection_call_set(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, + const char *interface_name, + const char *property_name, + GVariant *value, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallDefaultCb callback, gpointer user_data) { @@ -125,13 +125,13 @@ nm_dbus_connection_call_set(GDBusConnection * dbus_connection, /*****************************************************************************/ static void -_nm_dbus_connection_call_get_managed_objects_cb(GObject * source, +_nm_dbus_connection_call_get_managed_objects_cb(GObject *source, GAsyncResult *res, gpointer user_data) { - gs_unref_variant GVariant *ret = NULL; - gs_unref_variant GVariant *arg = NULL; - gs_free_error GError * error = NULL; + gs_unref_variant GVariant *ret = NULL; + gs_unref_variant GVariant *arg = NULL; + gs_free_error GError *error = NULL; gpointer orig_user_data; NMDBusConnectionCallDefaultCb callback; @@ -150,12 +150,12 @@ _nm_dbus_connection_call_get_managed_objects_cb(GObject * source, } void -nm_dbus_connection_call_get_managed_objects(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, +nm_dbus_connection_call_get_managed_objects(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, GDBusCallFlags flags, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallDefaultCb callback, gpointer user_data) { @@ -178,15 +178,15 @@ nm_dbus_connection_call_get_managed_objects(GDBusConnection * dbus_c /*****************************************************************************/ static void -_call_finish_cb(GObject * source, +_call_finish_cb(GObject *source, GAsyncResult *result, gpointer user_data, gboolean return_void, gboolean strip_dbus_error) { - gs_unref_object GTask *task = user_data; + gs_unref_object GTask *task = user_data; gs_unref_variant GVariant *ret = NULL; - GError * error = NULL; + GError *error = NULL; nm_assert(G_IS_DBUS_CONNECTION(source)); nm_assert(G_IS_TASK(user_data)); @@ -230,7 +230,7 @@ nm_dbus_connection_call_finish_void_cb(GObject *source, GAsyncResult *result, gp * is that on error this will first call g_dbus_error_strip_remote_error() on the error. */ void -nm_dbus_connection_call_finish_void_strip_dbus_error_cb(GObject * source, +nm_dbus_connection_call_finish_void_strip_dbus_error_cb(GObject *source, GAsyncResult *result, gpointer user_data) { @@ -259,7 +259,7 @@ nm_dbus_connection_call_finish_variant_cb(GObject *source, GAsyncResult *result, * is that on error this will first call g_dbus_error_strip_remote_error() on the error. */ void -nm_dbus_connection_call_finish_variant_strip_dbus_error_cb(GObject * source, +nm_dbus_connection_call_finish_variant_strip_dbus_error_cb(GObject *source, GAsyncResult *result, gpointer user_data) { @@ -269,12 +269,12 @@ nm_dbus_connection_call_finish_variant_strip_dbus_error_cb(GObject * source, /*****************************************************************************/ typedef struct { - char * bus_name; - char * object_path; - char * interface_name; - char * method_name; - GVariant * parameters; - GDBusConnection * connection; + char *bus_name; + char *object_path; + char *interface_name; + char *method_name; + GVariant *parameters; + GDBusConnection *connection; const GVariantType *reply_type; int timeout_msec; } CallAsyncInfo; @@ -295,8 +295,8 @@ static void call_cb(GObject *source, GAsyncResult *result, gpointer user_data) { gs_unref_object GTask *task = user_data; - GError * error = NULL; - GVariant * ret; + GError *error = NULL; + GVariant *ret; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error); if (!ret) { @@ -311,9 +311,9 @@ static void call_bus_get_cb(GObject *source, GAsyncResult *result, gpointer user_data) { gs_unref_object GTask *task = user_data; - GCancellable * cancellable; - CallAsyncInfo * info; - GError * error = NULL; + GCancellable *cancellable; + CallAsyncInfo *info; + GError *error = NULL; info = g_task_get_task_data(task); info->connection = g_bus_get_finish(result, &error); @@ -340,18 +340,18 @@ call_bus_get_cb(GObject *source, GAsyncResult *result, gpointer user_data) void nm_dbus_call(GBusType bus_type, - const char * bus_name, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, + const char *bus_name, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, - GCancellable * cancellable, + GCancellable *cancellable, int timeout_msec, GAsyncReadyCallback callback, gpointer user_data) { - GTask * task; + GTask *task; CallAsyncInfo *info; info = g_new(CallAsyncInfo, 1); @@ -385,7 +385,7 @@ gboolean _nm_dbus_error_is(GError *error, ...) { gs_free char *dbus_error = NULL; - const char * name; + const char *name; va_list ap; dbus_error = g_dbus_error_get_remote_error(error); @@ -408,7 +408,7 @@ _nm_dbus_error_is(GError *error, ...) typedef struct { GDBusConnection **p_dbus_connection; - GError ** p_error; + GError **p_error; } BusGetData; static void @@ -433,12 +433,12 @@ _bus_get_cb(GObject *source, GAsyncResult *result, gpointer user_data) GDBusConnection * nm_g_bus_get_blocking(GCancellable *cancellable, GError **error) { - gs_free_error GError *local_error = NULL; + gs_free_error GError *local_error = NULL; gs_unref_object GDBusConnection *dbus_connection = NULL; - GMainContext * main_context = g_main_context_get_thread_default(); + GMainContext *main_context = g_main_context_get_thread_default(); BusGetData data = { - .p_dbus_connection = &dbus_connection, - .p_error = &local_error, + .p_dbus_connection = &dbus_connection, + .p_error = &local_error, }; g_bus_get(G_BUS_TYPE_SYSTEM, cancellable, _bus_get_cb, &data); @@ -471,9 +471,9 @@ nm_dbus_connection_call_blocking_callback(GObject *source, GAsyncResult *res, gp GVariant * nm_dbus_connection_call_blocking(NMDBusConnectionCallBlockingData *data, GError **error) { - GMainContext *main_context = g_main_context_get_thread_default(); - gs_free_error GError *local_error = NULL; - gs_unref_variant GVariant *result = NULL; + GMainContext *main_context = g_main_context_get_thread_default(); + gs_free_error GError *local_error = NULL; + gs_unref_variant GVariant *result = NULL; nm_assert(data); diff --git a/src/libnm-glib-aux/nm-dbus-aux.h b/src/libnm-glib-aux/nm-dbus-aux.h index 420a0c55..dfba61b0 100644 --- a/src/libnm-glib-aux/nm-dbus-aux.h +++ b/src/libnm-glib-aux/nm-dbus-aux.h @@ -30,10 +30,10 @@ typedef void (*NMDBusConnectionCallDefaultCb)(GVariant *result, GError *error, g /*****************************************************************************/ static inline void -nm_dbus_connection_call_start_service_by_name(GDBusConnection * dbus_connection, - const char * name, +nm_dbus_connection_call_start_service_by_name(GDBusConnection *dbus_connection, + const char *name, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -54,8 +54,8 @@ nm_dbus_connection_call_start_service_by_name(GDBusConnection * dbus_connectio /*****************************************************************************/ static inline guint -nm_dbus_connection_signal_subscribe_name_owner_changed(GDBusConnection * dbus_connection, - const char * service_name, +nm_dbus_connection_signal_subscribe_name_owner_changed(GDBusConnection *dbus_connection, + const char *service_name, GDBusSignalCallback callback, gpointer user_data, GDestroyNotify user_data_free_func) @@ -74,22 +74,22 @@ nm_dbus_connection_signal_subscribe_name_owner_changed(GDBusConnection * dbus_ } typedef void (*NMDBusConnectionCallGetNameOwnerCb)(const char *name_owner, - GError * error, + GError *error, gpointer user_data); -void nm_dbus_connection_call_get_name_owner(GDBusConnection * dbus_connection, - const char * service_name, +void nm_dbus_connection_call_get_name_owner(GDBusConnection *dbus_connection, + const char *service_name, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallGetNameOwnerCb callback, gpointer user_data); static inline void -nm_dbus_connection_call_request_name(GDBusConnection * dbus_connection, - const char * name, +nm_dbus_connection_call_request_name(GDBusConnection *dbus_connection, + const char *name, guint32 flags, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -108,10 +108,10 @@ nm_dbus_connection_call_request_name(GDBusConnection * dbus_connection, } static inline guint -nm_dbus_connection_signal_subscribe_properties_changed(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, - const char * interface_name, +nm_dbus_connection_signal_subscribe_properties_changed(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, + const char *interface_name, GDBusSignalCallback callback, gpointer user_data, GDestroyNotify user_data_free_func) @@ -138,33 +138,33 @@ nm_dbus_connection_signal_subscribe_properties_changed(GDBusConnection * dbus_ user_data_free_func); } -void nm_dbus_connection_call_get_all(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, - const char * interface_name, +void nm_dbus_connection_call_get_all(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, + const char *interface_name, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallDefaultCb callback, gpointer user_data); -void nm_dbus_connection_call_set(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, - const char * interface_name, - const char * property_name, - GVariant * value, +void nm_dbus_connection_call_set(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, + const char *interface_name, + const char *property_name, + GVariant *value, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallDefaultCb callback, gpointer user_data); /*****************************************************************************/ static inline guint -nm_dbus_connection_signal_subscribe_object_manager(GDBusConnection * dbus_connection, - const char * service_name, - const char * object_path, - const char * signal_name, +nm_dbus_connection_signal_subscribe_object_manager(GDBusConnection *dbus_connection, + const char *service_name, + const char *object_path, + const char *signal_name, GDBusSignalCallback callback, gpointer user_data, GDestroyNotify user_data_free_func) @@ -181,12 +181,12 @@ nm_dbus_connection_signal_subscribe_object_manager(GDBusConnection * dbus_conn user_data_free_func); } -void nm_dbus_connection_call_get_managed_objects(GDBusConnection * dbus_connection, - const char * bus_name, - const char * object_path, +void nm_dbus_connection_call_get_managed_objects(GDBusConnection *dbus_connection, + const char *bus_name, + const char *object_path, GDBusCallFlags flags, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMDBusConnectionCallDefaultCb callback, gpointer user_data); @@ -195,28 +195,28 @@ void nm_dbus_connection_call_get_managed_objects(GDBusConnection * d void nm_dbus_connection_call_finish_void_cb(GObject *source, GAsyncResult *result, gpointer user_data); -void nm_dbus_connection_call_finish_void_strip_dbus_error_cb(GObject * source, +void nm_dbus_connection_call_finish_void_strip_dbus_error_cb(GObject *source, GAsyncResult *result, gpointer user_data); -void nm_dbus_connection_call_finish_variant_cb(GObject * source, +void nm_dbus_connection_call_finish_variant_cb(GObject *source, GAsyncResult *result, gpointer user_data); -void nm_dbus_connection_call_finish_variant_strip_dbus_error_cb(GObject * source, +void nm_dbus_connection_call_finish_variant_strip_dbus_error_cb(GObject *source, GAsyncResult *result, gpointer user_data); /*****************************************************************************/ void nm_dbus_call(GBusType bus_type, - const char * bus_name, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, + const char *bus_name, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, - GCancellable * cancellable, + GCancellable *cancellable, int timeout_msec, GAsyncReadyCallback callback, gpointer user_data); @@ -244,7 +244,7 @@ GDBusConnection *nm_g_bus_get_blocking(GCancellable *cancellable, GError **error typedef struct { GVariant *result; - GError * error; + GError *error; } NMDBusConnectionCallBlockingData; void diff --git a/src/libnm-glib-aux/nm-dedup-multi.c b/src/libnm-glib-aux/nm-dedup-multi.c index f77bb3cd..7d451d0d 100644 --- a/src/libnm-glib-aux/nm-dedup-multi.c +++ b/src/libnm-glib-aux/nm-dedup-multi.c @@ -21,7 +21,7 @@ typedef struct { * always non-NULL. * */ CList lst_entries_sentinel; - const NMDedupMultiObj * obj; + const NMDedupMultiObj *obj; const NMDedupMultiIdxType *idx_type; bool lookup_head; } LookupEntry; @@ -65,9 +65,9 @@ nm_dedup_multi_idx_type_init(NMDedupMultiIdxType *idx_type, const NMDedupMultiId /*****************************************************************************/ static NMDedupMultiEntry * -_entry_lookup_obj(const NMDedupMultiIndex * self, +_entry_lookup_obj(const NMDedupMultiIndex *self, const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj) + const NMDedupMultiObj *obj) { const LookupEntry stack_entry = { .obj = obj, @@ -80,15 +80,15 @@ _entry_lookup_obj(const NMDedupMultiIndex * self, } static NMDedupMultiHeadEntry * -_entry_lookup_head(const NMDedupMultiIndex * self, +_entry_lookup_head(const NMDedupMultiIndex *self, const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj) + const NMDedupMultiObj *obj) { NMDedupMultiHeadEntry *head_entry; const LookupEntry stack_entry = { - .obj = obj, - .idx_type = idx_type, - .lookup_head = TRUE, + .obj = obj, + .idx_type = idx_type, + .lookup_head = TRUE, }; ASSERT_idx_type(idx_type); @@ -108,13 +108,13 @@ _entry_lookup_head(const NMDedupMultiIndex * self, } static void -_entry_unpack(const NMDedupMultiEntry * entry, +_entry_unpack(const NMDedupMultiEntry *entry, const NMDedupMultiIdxType **out_idx_type, - const NMDedupMultiObj ** out_obj, - gboolean * out_lookup_head) + const NMDedupMultiObj **out_obj, + gboolean *out_lookup_head) { const NMDedupMultiHeadEntry *head_entry; - const LookupEntry * lookup_entry; + const LookupEntry *lookup_entry; nm_assert(entry); @@ -162,7 +162,7 @@ static guint _dict_idx_entries_hash(const NMDedupMultiEntry *entry) { const NMDedupMultiIdxType *idx_type; - const NMDedupMultiObj * obj; + const NMDedupMultiObj *obj; gboolean lookup_head; NMHashState h; @@ -185,7 +185,7 @@ static gboolean _dict_idx_entries_equal(const NMDedupMultiEntry *entry_a, const NMDedupMultiEntry *entry_b) { const NMDedupMultiIdxType *idx_type_a, *idx_type_b; - const NMDedupMultiObj * obj_a, *obj_b; + const NMDedupMultiObj *obj_a, *obj_b; gboolean lookup_head_a, lookup_head_b; _entry_unpack(entry_a, &idx_type_a, &obj_a, &lookup_head_a); @@ -203,15 +203,15 @@ _dict_idx_entries_equal(const NMDedupMultiEntry *entry_a, const NMDedupMultiEntr /*****************************************************************************/ static gboolean -_add(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, - const NMDedupMultiObj * obj, - NMDedupMultiEntry * entry, +_add(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, + const NMDedupMultiObj *obj, + NMDedupMultiEntry *entry, NMDedupMultiIdxMode mode, - const NMDedupMultiEntry * entry_order, - NMDedupMultiHeadEntry * head_existing, + const NMDedupMultiEntry *entry_order, + NMDedupMultiHeadEntry *head_existing, const NMDedupMultiEntry **out_entry, - const NMDedupMultiObj ** out_obj_old) + const NMDedupMultiObj **out_obj_old) { NMDedupMultiHeadEntry *head_entry; const NMDedupMultiObj *obj_new, *obj_old; @@ -365,11 +365,11 @@ _add(NMDedupMultiIndex * self, } gboolean -nm_dedup_multi_index_add(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_add(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj, NMDedupMultiIdxMode mode, - const NMDedupMultiEntry ** out_entry, + const NMDedupMultiEntry **out_entry, /* const NMDedupMultiObj ** */ gpointer out_obj_old) { NMDedupMultiEntry *entry; @@ -423,14 +423,14 @@ nm_dedup_multi_index_add(NMDedupMultiIndex * self, * Return: %TRUE if anything changed, %FALSE if nothing changed. */ gboolean -nm_dedup_multi_index_add_full(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_add_full(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj, NMDedupMultiIdxMode mode, - const NMDedupMultiEntry * entry_order, - const NMDedupMultiEntry * entry_existing, - const NMDedupMultiHeadEntry * head_existing, - const NMDedupMultiEntry ** out_entry, + const NMDedupMultiEntry *entry_order, + const NMDedupMultiEntry *entry_existing, + const NMDedupMultiHeadEntry *head_existing, + const NMDedupMultiEntry **out_entry, /* const NMDedupMultiObj ** */ gpointer out_obj_old) { NMDedupMultiEntry *entry; @@ -472,7 +472,7 @@ _remove_entry(NMDedupMultiIndex *self, NMDedupMultiEntry *entry, gboolean *out_h { const NMDedupMultiObj *obj; NMDedupMultiHeadEntry *head_entry; - NMDedupMultiIdxType * idx_type; + NMDedupMultiIdxType *idx_type; nm_assert(self); nm_assert(entry); @@ -519,14 +519,14 @@ _remove_entry(NMDedupMultiIndex *self, NMDedupMultiEntry *entry, gboolean *out_h } static guint -_remove_head(NMDedupMultiIndex * self, +_remove_head(NMDedupMultiIndex *self, NMDedupMultiHeadEntry *head_entry, gboolean remove_all /* otherwise just dirty ones */, gboolean mark_survivors_dirty) { guint n; gboolean head_entry_removed; - CList * iter_entry, *iter_entry_safe; + CList *iter_entry, *iter_entry_safe; nm_assert(self); nm_assert(head_entry); @@ -552,7 +552,7 @@ _remove_head(NMDedupMultiIndex * self, } static guint -_remove_idx_entry(NMDedupMultiIndex * self, +_remove_idx_entry(NMDedupMultiIndex *self, NMDedupMultiIdxType *idx_type, gboolean remove_all /* otherwise just dirty ones */, gboolean mark_survivors_dirty) @@ -588,8 +588,8 @@ nm_dedup_multi_index_remove_entry(NMDedupMultiIndex *self, gconstpointer entry) } guint -nm_dedup_multi_index_remove_obj(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_remove_obj(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj, /*const NMDedupMultiObj ** */ gconstpointer *out_obj) { @@ -611,8 +611,8 @@ nm_dedup_multi_index_remove_obj(NMDedupMultiIndex * sel } guint -nm_dedup_multi_index_remove_head(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_remove_head(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj) { const NMDedupMultiHeadEntry *entry; @@ -643,8 +643,8 @@ nm_dedup_multi_index_remove_idx(NMDedupMultiIndex *self, NMDedupMultiIdxType *id * Returns: the cache entry or %NULL if the entry wasn't found. */ const NMDedupMultiEntry * -nm_dedup_multi_index_lookup_obj(const NMDedupMultiIndex * self, - const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_lookup_obj(const NMDedupMultiIndex *self, + const NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj) { g_return_val_if_fail(self, FALSE); @@ -669,8 +669,8 @@ nm_dedup_multi_index_lookup_obj(const NMDedupMultiIndex * self, * Returns: the cache entry or %NULL if the entry wasn't found. */ const NMDedupMultiHeadEntry * -nm_dedup_multi_index_lookup_head(const NMDedupMultiIndex * self, - const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_lookup_head(const NMDedupMultiIndex *self, + const NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj) { g_return_val_if_fail(self, FALSE); @@ -682,12 +682,12 @@ nm_dedup_multi_index_lookup_head(const NMDedupMultiIndex * self /*****************************************************************************/ void -nm_dedup_multi_index_dirty_set_head(NMDedupMultiIndex * self, - const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_dirty_set_head(NMDedupMultiIndex *self, + const NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj) { NMDedupMultiHeadEntry *head_entry; - CList * iter_entry; + CList *iter_entry; g_return_if_fail(self); g_return_if_fail(idx_type); @@ -740,7 +740,7 @@ nm_dedup_multi_index_dirty_set_idx(NMDedupMultiIndex *self, const NMDedupMultiId * Returns: number of deleted entries. */ guint -nm_dedup_multi_index_dirty_remove_idx(NMDedupMultiIndex * self, +nm_dedup_multi_index_dirty_remove_idx(NMDedupMultiIndex *self, NMDedupMultiIdxType *idx_type, gboolean mark_survivors_dirty) { @@ -770,7 +770,7 @@ _dict_idx_objs_equal(const NMDedupMultiObj *obj_a, const NMDedupMultiObj *obj_b) } void -nm_dedup_multi_index_obj_release(NMDedupMultiIndex * self, +nm_dedup_multi_index_obj_release(NMDedupMultiIndex *self, /* const NMDedupMultiObj * */ gconstpointer obj) { nm_assert(self); @@ -784,7 +784,7 @@ nm_dedup_multi_index_obj_release(NMDedupMultiIndex * sel } gconstpointer -nm_dedup_multi_index_obj_find(NMDedupMultiIndex * self, +nm_dedup_multi_index_obj_find(NMDedupMultiIndex *self, /* const NMDedupMultiObj * */ gconstpointer obj) { g_return_val_if_fail(self, NULL); @@ -794,7 +794,7 @@ nm_dedup_multi_index_obj_find(NMDedupMultiIndex * self, } gconstpointer -nm_dedup_multi_index_obj_intern(NMDedupMultiIndex * self, +nm_dedup_multi_index_obj_intern(NMDedupMultiIndex *self, /* const NMDedupMultiObj * */ gconstpointer obj) { const NMDedupMultiObj *obj_new = obj; @@ -885,13 +885,13 @@ nm_dedup_multi_obj_clone(const NMDedupMultiObj *obj) } gconstpointer * -nm_dedup_multi_objs_to_array_head(const NMDedupMultiHeadEntry * head_entry, +nm_dedup_multi_objs_to_array_head(const NMDedupMultiHeadEntry *head_entry, NMDedupMultiFcnSelectPredicate predicate, gpointer user_data, - guint * out_len) + guint *out_len) { gconstpointer *result; - CList * iter; + CList *iter; guint i; if (!head_entry) { @@ -923,12 +923,12 @@ nm_dedup_multi_objs_to_array_head(const NMDedupMultiHeadEntry * head_entry, } GPtrArray * -nm_dedup_multi_objs_to_ptr_array_head(const NMDedupMultiHeadEntry * head_entry, +nm_dedup_multi_objs_to_ptr_array_head(const NMDedupMultiHeadEntry *head_entry, NMDedupMultiFcnSelectPredicate predicate, gpointer user_data) { GPtrArray *result; - CList * iter; + CList *iter; if (!head_entry) return NULL; @@ -1028,8 +1028,8 @@ nm_dedup_multi_index_unref(NMDedupMultiIndex *self) { GHashTableIter iter; const NMDedupMultiIdxType *idx_type; - NMDedupMultiEntry * entry; - const NMDedupMultiObj * obj; + NMDedupMultiEntry *entry; + const NMDedupMultiObj *obj; g_return_val_if_fail(self, NULL); g_return_val_if_fail(self->ref_count > 0, NULL); diff --git a/src/libnm-glib-aux/nm-dedup-multi.h b/src/libnm-glib-aux/nm-dedup-multi.h index fb1cb863..0fa47422 100644 --- a/src/libnm-glib-aux/nm-dedup-multi.h +++ b/src/libnm-glib-aux/nm-dedup-multi.h @@ -83,14 +83,14 @@ void nm_dedup_multi_obj_unref(const NMDedupMultiObj *obj); const NMDedupMultiObj *nm_dedup_multi_obj_clone(const NMDedupMultiObj *obj); gboolean nm_dedup_multi_obj_needs_clone(const NMDedupMultiObj *obj); -gconstpointer nm_dedup_multi_index_obj_intern(NMDedupMultiIndex * self, +gconstpointer nm_dedup_multi_index_obj_intern(NMDedupMultiIndex *self, /* const NMDedupMultiObj * */ gconstpointer obj); -void nm_dedup_multi_index_obj_release(NMDedupMultiIndex * self, +void nm_dedup_multi_index_obj_release(NMDedupMultiIndex *self, /* const NMDedupMultiObj * */ gconstpointer obj); /* const NMDedupMultiObj * */ gconstpointer -nm_dedup_multi_index_obj_find(NMDedupMultiIndex * self, +nm_dedup_multi_index_obj_find(NMDedupMultiIndex *self, /* const NMDedupMultiObj * */ gconstpointer obj); /*****************************************************************************/ @@ -132,18 +132,18 @@ struct _NMDedupMultiIdxType { guint len; }; -void nm_dedup_multi_idx_type_init(NMDedupMultiIdxType * idx_type, +void nm_dedup_multi_idx_type_init(NMDedupMultiIdxType *idx_type, const NMDedupMultiIdxTypeClass *klass); struct _NMDedupMultiIdxTypeClass { NMObjBaseClass parent; void (*idx_obj_id_hash_update)(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj, - struct _NMHashState * h); + const NMDedupMultiObj *obj, + struct _NMHashState *h); gboolean (*idx_obj_id_equal)(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj_a, - const NMDedupMultiObj * obj_b); + const NMDedupMultiObj *obj_a, + const NMDedupMultiObj *obj_b); /* an NMDedupMultiIdxTypeClass which implements partitioning of the * tracked objects, must implement the idx_obj_partition*() functions. @@ -153,17 +153,17 @@ struct _NMDedupMultiIdxTypeClass { * routes that don't have a valid ifindex. If the idx-type says that the * object is not partitionable, it is never added to the NMDedupMultiIndex. */ gboolean (*idx_obj_partitionable)(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj); + const NMDedupMultiObj *obj); void (*idx_obj_partition_hash_update)(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj, - struct _NMHashState * h); + const NMDedupMultiObj *obj, + struct _NMHashState *h); gboolean (*idx_obj_partition_equal)(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj_a, - const NMDedupMultiObj * obj_b); + const NMDedupMultiObj *obj_a, + const NMDedupMultiObj *obj_b); }; static inline gboolean -nm_dedup_multi_idx_type_id_equal(const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_idx_type_id_equal(const NMDedupMultiIdxType *idx_type, /* const NMDedupMultiObj * */ gconstpointer obj_a, /* const NMDedupMultiObj * */ gconstpointer obj_b) { @@ -172,7 +172,7 @@ nm_dedup_multi_idx_type_id_equal(const NMDedupMultiIdxType * idx } static inline gboolean -nm_dedup_multi_idx_type_partition_equal(const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_idx_type_partition_equal(const NMDedupMultiIdxType *idx_type, /* const NMDedupMultiObj * */ gconstpointer obj_a, /* const NMDedupMultiObj * */ gconstpointer obj_b) { @@ -255,54 +255,54 @@ _nm_auto_unref_dedup_multi_index(NMDedupMultiIndex **v) #define NM_DEDUP_MULTI_ENTRY_MISSING ((const NMDedupMultiEntry *) GUINT_TO_POINTER(1)) #define NM_DEDUP_MULTI_HEAD_ENTRY_MISSING ((const NMDedupMultiHeadEntry *) GUINT_TO_POINTER(1)) -gboolean nm_dedup_multi_index_add_full(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +gboolean nm_dedup_multi_index_add_full(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj, NMDedupMultiIdxMode mode, - const NMDedupMultiEntry * entry_order, - const NMDedupMultiEntry * entry_existing, - const NMDedupMultiHeadEntry * head_existing, - const NMDedupMultiEntry ** out_entry, + const NMDedupMultiEntry *entry_order, + const NMDedupMultiEntry *entry_existing, + const NMDedupMultiHeadEntry *head_existing, + const NMDedupMultiEntry **out_entry, /* const NMDedupMultiObj ** */ gpointer out_obj_old); -gboolean nm_dedup_multi_index_add(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +gboolean nm_dedup_multi_index_add(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj, NMDedupMultiIdxMode mode, - const NMDedupMultiEntry ** out_entry, + const NMDedupMultiEntry **out_entry, /* const NMDedupMultiObj ** */ gpointer out_obj_old); const NMDedupMultiEntry * -nm_dedup_multi_index_lookup_obj(const NMDedupMultiIndex * self, - const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_lookup_obj(const NMDedupMultiIndex *self, + const NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj); const NMDedupMultiHeadEntry * -nm_dedup_multi_index_lookup_head(const NMDedupMultiIndex * self, - const NMDedupMultiIdxType * idx_type, +nm_dedup_multi_index_lookup_head(const NMDedupMultiIndex *self, + const NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj); guint nm_dedup_multi_index_remove_entry(NMDedupMultiIndex *self, gconstpointer entry); -guint nm_dedup_multi_index_remove_obj(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +guint nm_dedup_multi_index_remove_obj(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj, /*const NMDedupMultiObj ** */ gconstpointer *out_obj); -guint nm_dedup_multi_index_remove_head(NMDedupMultiIndex * self, - NMDedupMultiIdxType * idx_type, +guint nm_dedup_multi_index_remove_head(NMDedupMultiIndex *self, + NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj); guint nm_dedup_multi_index_remove_idx(NMDedupMultiIndex *self, NMDedupMultiIdxType *idx_type); -void nm_dedup_multi_index_dirty_set_head(NMDedupMultiIndex * self, - const NMDedupMultiIdxType * idx_type, +void nm_dedup_multi_index_dirty_set_head(NMDedupMultiIndex *self, + const NMDedupMultiIdxType *idx_type, /*const NMDedupMultiObj * */ gconstpointer obj); -void nm_dedup_multi_index_dirty_set_idx(NMDedupMultiIndex * self, +void nm_dedup_multi_index_dirty_set_idx(NMDedupMultiIndex *self, const NMDedupMultiIdxType *idx_type); -guint nm_dedup_multi_index_dirty_remove_idx(NMDedupMultiIndex * self, +guint nm_dedup_multi_index_dirty_remove_idx(NMDedupMultiIndex *self, NMDedupMultiIdxType *idx_type, gboolean mark_survivors_dirty); @@ -395,11 +395,11 @@ nm_dedup_multi_iter_prev(NMDedupMultiIter *iter) typedef gboolean (*NMDedupMultiFcnSelectPredicate)(/* const NMDedupMultiObj * */ gconstpointer obj, gpointer user_data); -gconstpointer *nm_dedup_multi_objs_to_array_head(const NMDedupMultiHeadEntry * head_entry, +gconstpointer *nm_dedup_multi_objs_to_array_head(const NMDedupMultiHeadEntry *head_entry, NMDedupMultiFcnSelectPredicate predicate, gpointer user_data, - guint * out_len); -GPtrArray * nm_dedup_multi_objs_to_ptr_array_head(const NMDedupMultiHeadEntry * head_entry, + guint *out_len); +GPtrArray *nm_dedup_multi_objs_to_ptr_array_head(const NMDedupMultiHeadEntry *head_entry, NMDedupMultiFcnSelectPredicate predicate, gpointer user_data); diff --git a/src/libnm-glib-aux/nm-enum-utils.c b/src/libnm-glib-aux/nm-enum-utils.c index f97cdfcb..3b9b7e8d 100644 --- a/src/libnm-glib-aux/nm-enum-utils.c +++ b/src/libnm-glib-aux/nm-enum-utils.c @@ -17,7 +17,7 @@ _ASSERT_enum_values_info(GType type, const NMUtilsEnumValueInfo *value_infos) { #if NM_MORE_ASSERTS > 5 nm_auto_unref_gtypeclass GTypeClass *klass = NULL; - gs_unref_hashtable GHashTable *ht = NULL; + gs_unref_hashtable GHashTable *ht = NULL; klass = g_type_class_ref(type); @@ -109,7 +109,7 @@ _enum_is_valid_flags_nick(const char *str) char * _nm_utils_enum_to_str_full(GType type, int value, - const char * flags_separator, + const char *flags_separator, const NMUtilsEnumValueInfo *value_infos) { nm_auto_unref_gtypeclass GTypeClass *klass = NULL; @@ -199,18 +199,18 @@ _find_value_info(const NMUtilsEnumValueInfo *value_infos, const char *needle) gboolean _nm_utils_enum_from_str_full(GType type, - const char * str, - int * out_value, - char ** err_token, + const char *str, + int *out_value, + char **err_token, const NMUtilsEnumValueInfo *value_infos) { nm_auto_unref_gtypeclass GTypeClass *klass = NULL; gboolean ret = FALSE; int value = 0; - gs_free char * str_clone = NULL; - char * s; + gs_free char *str_clone = NULL; + char *s; gint64 v64; - const NMUtilsEnumValueInfo * nick; + const NMUtilsEnumValueInfo *nick; g_return_val_if_fail(str, FALSE); @@ -317,7 +317,7 @@ const char ** _nm_utils_enum_get_values(GType type, int from, int to) { GTypeClass *klass; - GPtrArray * array; + GPtrArray *array; int i; char sbuf[64]; diff --git a/src/libnm-glib-aux/nm-enum-utils.h b/src/libnm-glib-aux/nm-enum-utils.h index 89be54e7..6478cadf 100644 --- a/src/libnm-glib-aux/nm-enum-utils.h +++ b/src/libnm-glib-aux/nm-enum-utils.h @@ -15,14 +15,14 @@ typedef struct _NMUtilsEnumValueInfo { int value; } NMUtilsEnumValueInfo; -char * _nm_utils_enum_to_str_full(GType type, +char *_nm_utils_enum_to_str_full(GType type, int value, - const char * sep, + const char *sep, const NMUtilsEnumValueInfo *value_infos); gboolean _nm_utils_enum_from_str_full(GType type, - const char * str, - int * out_value, - char ** err_token, + const char *str, + int *out_value, + char **err_token, const NMUtilsEnumValueInfo *value_infos); const char **_nm_utils_enum_get_values(GType type, int from, int to); diff --git a/src/libnm-glib-aux/nm-errno.c b/src/libnm-glib-aux/nm-errno.c index 0426a21d..14d93d64 100644 --- a/src/libnm-glib-aux/nm-errno.c +++ b/src/libnm-glib-aux/nm-errno.c @@ -156,7 +156,7 @@ const char * nm_strerror_native(int errsv) { static _nm_thread_local char *buf_static = NULL; - char * buf; + char *buf; buf = buf_static; if (G_UNLIKELY(!buf)) { diff --git a/src/libnm-glib-aux/nm-glib.h b/src/libnm-glib-aux/nm-glib.h index 49470d92..4ab9cbbd 100644 --- a/src/libnm-glib-aux/nm-glib.h +++ b/src/libnm-glib-aux/nm-glib.h @@ -195,7 +195,7 @@ __nmtst_g_test_skip(const char *msg) /* g_test_add_data_func_full() is only available since glib 2.34. Add a compatibility wrapper. */ static inline void -__g_test_add_data_func_full(const char * testpath, +__g_test_add_data_func_full(const char *testpath, gpointer test_data, GTestDataFunc test_func, GDestroyNotify data_free_func) @@ -311,7 +311,7 @@ _nm_g_ptr_array_insert(GPtrArray *array, int index_, gpointer data) static inline gboolean _g_key_file_save_to_file(GKeyFile *key_file, const char *filename, GError **error) { - char * contents; + char *contents; gboolean success; gsize length; @@ -484,7 +484,7 @@ _nm_g_variant_new_take_string(char *string) #if !GLIB_CHECK_VERSION(2, 38, 0) _nm_printf(1, 2) static inline GVariant *_nm_g_variant_new_printf(const char *format_string, ...) { - char * string; + char *string; va_list ap; g_return_val_if_fail(format_string, NULL); @@ -650,10 +650,10 @@ _g_atomic_pointer_compare_and_exchange(void **atomic, void *oldval, void *newval #if !GLIB_CHECK_VERSION(2, 58, 0) static inline gboolean -g_hash_table_steal_extended(GHashTable * hash_table, +g_hash_table_steal_extended(GHashTable *hash_table, gconstpointer lookup_key, - gpointer * stolen_key, - gpointer * stolen_value) + gpointer *stolen_key, + gpointer *stolen_value) { g_assert(stolen_key); g_assert(stolen_value); diff --git a/src/libnm-glib-aux/nm-hash-utils.c b/src/libnm-glib-aux/nm-hash-utils.c index a6949ebd..68b33998 100644 --- a/src/libnm-glib-aux/nm-hash-utils.c +++ b/src/libnm-glib-aux/nm-hash-utils.c @@ -138,12 +138,6 @@ nm_hash_str(const char *str) return nm_hash_complete(&h); } -guint -nm_str_hash(gconstpointer str) -{ - return nm_hash_str(str); -} - guint nm_hash_ptr(gconstpointer ptr) { @@ -156,12 +150,6 @@ nm_hash_ptr(gconstpointer ptr) return nm_hash_complete(&h); } -guint -nm_direct_hash(gconstpointer ptr) -{ - return nm_hash_ptr(ptr); -} - /*****************************************************************************/ guint @@ -257,7 +245,7 @@ nm_ppdirect_equal(gconstpointer a, gconstpointer b) guint nm_g_bytes_hash(gconstpointer p) { - GBytes * ptr = (GBytes *) p; + GBytes *ptr = (GBytes *) p; gconstpointer arr; gsize len; @@ -284,3 +272,31 @@ nm_pg_bytes_equal(gconstpointer a, gconstpointer b) return g_bytes_equal(*ptr_a, *ptr_b); } + +/*****************************************************************************/ + +guint64 +nm_hash_obfuscate_ptr(guint static_seed, gconstpointer val) +{ + NMHashState h; + + if (NM_MORE_ASSERTS > 0) { + static int obfuscate_static = -1; + int obfuscate; + +again: + obfuscate = g_atomic_int_get(&obfuscate_static); + if (G_UNLIKELY(obfuscate == -1)) { + obfuscate = _nm_utils_ascii_str_to_int64(g_getenv("NM_OBFUSCATE_PTR"), 10, 0, 1, 1); + if (!g_atomic_int_compare_and_exchange(&obfuscate_static, -1, obfuscate)) + goto again; + } + + if (!obfuscate) + return (uintptr_t) val; + } + + nm_hash_init(&h, static_seed); + nm_hash_update_val(&h, val); + return nm_hash_complete_u64(&h); +} diff --git a/src/libnm-glib-aux/nm-hash-utils.h b/src/libnm-glib-aux/nm-hash-utils.h index d7de2de4..b7ee4dd1 100644 --- a/src/libnm-glib-aux/nm-hash-utils.h +++ b/src/libnm-glib-aux/nm-hash-utils.h @@ -201,10 +201,10 @@ nm_hash_update_str(NMHashState *state, const char *str) #endif guint nm_hash_ptr(gconstpointer ptr); -guint nm_direct_hash(gconstpointer str); +#define nm_direct_hash nm_hash_ptr guint nm_hash_str(const char *str); -guint nm_str_hash(gconstpointer str); +#define nm_str_hash ((guint(*)(gconstpointer str)) nm_hash_str) #define nm_hash_val(static_seed, val) \ ({ \ @@ -284,15 +284,7 @@ gboolean nm_pg_bytes_equal(gconstpointer a, gconstpointer b); * * Note that there is a chance that two different pointer values hash to the same obfuscated * value. So beware of that when reviewing logs. However, such a collision is very unlikely. */ -static inline guint64 -nm_hash_obfuscate_ptr(guint static_seed, gconstpointer val) -{ - NMHashState h; - - nm_hash_init(&h, static_seed); - nm_hash_update_val(&h, val); - return nm_hash_complete_u64(&h); -} +guint64 nm_hash_obfuscate_ptr(guint static_seed, gconstpointer val); /* if you want to log obfuscated pointer for a certain context (like, NMPRuleManager * logging user-tags), then you are advised to use nm_hash_obfuscate_ptr() with your diff --git a/src/libnm-glib-aux/nm-io-utils.c b/src/libnm-glib-aux/nm-io-utils.c index 85a81f69..503f044f 100644 --- a/src/libnm-glib-aux/nm-io-utils.c +++ b/src/libnm-glib-aux/nm-io-utils.c @@ -20,9 +20,9 @@ /*****************************************************************************/ -_nm_printf(4, 5) static int _get_contents_error(GError ** error, +_nm_printf(4, 5) static int _get_contents_error(GError **error, int errsv, - int * out_errsv, + int *out_errsv, const char *format, ...) { @@ -94,14 +94,14 @@ nm_utils_fd_get_contents(int fd, gboolean close_fd, gsize max_length, NMUtilsFileGetContentsFlags flags, - char ** contents, - gsize * length, - int * out_errsv, - GError ** error) + char **contents, + gsize *length, + int *out_errsv, + GError **error) { nm_auto_close int fd_keeper = close_fd ? fd : -1; struct stat stat_buf; - gs_free char * str = NULL; + gs_free char *str = NULL; const bool do_bzero_mem = NM_FLAGS_HAS(flags, NM_UTILS_FILE_GET_CONTENTS_FLAG_SECRET); int errsv; @@ -288,13 +288,13 @@ nm_utils_fd_get_contents(int fd, */ gboolean nm_utils_file_get_contents(int dirfd, - const char * filename, + const char *filename, gsize max_length, NMUtilsFileGetContentsFlags flags, - char ** contents, - gsize * length, - int * out_errsv, - GError ** error) + char **contents, + gsize *length, + int *out_errsv, + GError **error) { int fd; @@ -338,13 +338,13 @@ nm_utils_file_get_contents(int dirfd, * and last modification times. */ gboolean -nm_utils_file_set_contents(const char * filename, - const char * contents, +nm_utils_file_set_contents(const char *filename, + const char *contents, gssize length, mode_t mode, const struct timespec *times, - int * out_errsv, - GError ** error) + int *out_errsv, + GError **error) { gs_free char *tmp_name = NULL; struct stat statbuf; @@ -498,7 +498,7 @@ nm_utils_fd_read(int fd, NMStrBuf *out_string) typedef struct { GSubprocess *subprocess; - GSource * timeout_source; + GSource *timeout_source; } SubprocessTerminateData; static void @@ -527,7 +527,7 @@ void nm_g_subprocess_terminate_in_background(GSubprocess *subprocess, int timeout_msec_before_kill) { SubprocessTerminateData *term_data; - GMainContext * main_context; + GMainContext *main_context; nm_assert(timeout_msec_before_kill > 0); @@ -573,9 +573,9 @@ char ** nm_utils_find_mkstemp_files(const char *dirname, const char *filename) { static const char letters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - DIR * dir; - struct dirent * entry; - GPtrArray * arr = NULL; + DIR *dir; + struct dirent *entry; + GPtrArray *arr = NULL; gsize l; /* We write files with g_file_set_contents() and nm_utils_file_set_contents(). @@ -685,12 +685,12 @@ nm_sd_notify(const char *state) struct sockaddr_un sockaddr; struct iovec iovec; struct msghdr msghdr = { - .msg_iov = &iovec, - .msg_iovlen = 1, - .msg_name = &sockaddr, + .msg_iov = &iovec, + .msg_iovlen = 1, + .msg_name = &sockaddr, }; nm_auto_close int fd = -1; - const char * e; + const char *e; int r; if (!state) diff --git a/src/libnm-glib-aux/nm-io-utils.h b/src/libnm-glib-aux/nm-io-utils.h index 479d0e51..a8503986 100644 --- a/src/libnm-glib-aux/nm-io-utils.h +++ b/src/libnm-glib-aux/nm-io-utils.h @@ -26,27 +26,27 @@ gboolean nm_utils_fd_get_contents(int fd, gboolean close_fd, gsize max_length, NMUtilsFileGetContentsFlags flags, - char ** contents, - gsize * length, - int * out_errsv, - GError ** error); + char **contents, + gsize *length, + int *out_errsv, + GError **error); gboolean nm_utils_file_get_contents(int dirfd, - const char * filename, + const char *filename, gsize max_length, NMUtilsFileGetContentsFlags flags, - char ** contents, - gsize * length, - int * out_errsv, - GError ** error); + char **contents, + gsize *length, + int *out_errsv, + GError **error); -gboolean nm_utils_file_set_contents(const char * filename, - const char * contents, +gboolean nm_utils_file_set_contents(const char *filename, + const char *contents, gssize length, mode_t mode, const struct timespec *times, - int * out_errsv, - GError ** error); + int *out_errsv, + GError **error); struct _NMStrBuf; diff --git a/src/libnm-glib-aux/nm-json-aux.c b/src/libnm-glib-aux/nm-json-aux.c index 0a3b25f8..6216d93c 100644 --- a/src/libnm-glib-aux/nm-json-aux.c +++ b/src/libnm-glib-aux/nm-json-aux.c @@ -155,15 +155,15 @@ nm_json_gstr_append_obj_name(GString *gstr, const char *key, char start_containe typedef struct { NMJsonVt vt; - void * dl_handle; + void *dl_handle; } NMJsonVtInternal; static NMJsonVtInternal * _nm_json_vt_internal_load(void) { NMJsonVtInternal *v; - const char * soname; - void * handle; + const char *soname; + void *handle; v = g_new0(NMJsonVtInternal, 1); diff --git a/src/libnm-glib-aux/nm-json-aux.h b/src/libnm-glib-aux/nm-json-aux.h index 088d67a9..275ed770 100644 --- a/src/libnm-glib-aux/nm-json-aux.h +++ b/src/libnm-glib-aux/nm-json-aux.h @@ -399,7 +399,7 @@ nm_value_type_to_json(NMValueType value_type, GString *gstr, gconstpointer p_fie } static inline gboolean -nm_value_type_from_json(const NMJsonVt * vt, +nm_value_type_from_json(const NMJsonVt *vt, NMValueType value_type, const nm_json_t *elem, gpointer out_val) diff --git a/src/libnm-glib-aux/nm-keyfile-aux.c b/src/libnm-glib-aux/nm-keyfile-aux.c index 9cda1cf7..1cae28b4 100644 --- a/src/libnm-glib-aux/nm-keyfile-aux.c +++ b/src/libnm-glib-aux/nm-keyfile-aux.c @@ -19,8 +19,8 @@ struct _NMKeyFileDB { NMKeyFileDBLogFcn log_fcn; NMKeyFileDBGotDirtyFcn got_dirty_fcn; gpointer user_data; - const char * group_name; - GKeyFile * kf; + const char *group_name; + GKeyFile *kf; guint ref_count; bool is_started : 1; @@ -77,8 +77,8 @@ _key_file_new(void) /*****************************************************************************/ NMKeyFileDB * -nm_key_file_db_new(const char * filename, - const char * group_name, +nm_key_file_db_new(const char *filename, + const char *group_name, NMKeyFileDBLogFcn log_fcn, NMKeyFileDBGotDirtyFcn got_dirty_fcn, gpointer user_data) @@ -175,8 +175,8 @@ nm_key_file_db_destroy(NMKeyFileDB *self) void nm_key_file_db_start(NMKeyFileDB *self) { - gs_free char *contents = NULL; - gsize contents_len; + gs_free char *contents = NULL; + gsize contents_len; gs_free_error GError *error = NULL; g_return_if_fail(_IS_KEY_FILE_DB(self, FALSE, FALSE)); @@ -309,7 +309,7 @@ nm_key_file_db_set_value(NMKeyFileDB *self, const char *key, const char *value) if (!self->dirty && !got_dirty) { gs_free_error GError *error = NULL; - gs_free char * new_value = NULL; + gs_free char *new_value = NULL; new_value = g_key_file_get_value(self->kf, self->group_name, key, &error); if (error || !new_value || !nm_streq0(old_value, new_value)) @@ -321,8 +321,8 @@ nm_key_file_db_set_value(NMKeyFileDB *self, const char *key, const char *value) } void -nm_key_file_db_set_string_list(NMKeyFileDB * self, - const char * key, +nm_key_file_db_set_string_list(NMKeyFileDB *self, + const char *key, const char *const *value, gssize len) { @@ -352,7 +352,7 @@ nm_key_file_db_set_string_list(NMKeyFileDB * self, if (!self->dirty && !got_dirty) { gs_free_error GError *error = NULL; - gs_free char * new_value = NULL; + gs_free char *new_value = NULL; new_value = g_key_file_get_value(self->kf, self->group_name, key, &error); if (error || !new_value || !nm_streq0(old_value, new_value)) @@ -388,8 +388,8 @@ nm_key_file_db_to_file(NMKeyFileDB *self, gboolean force) void nm_key_file_db_prune_tmp_files(NMKeyFileDB *self) { - gs_free char * n_file = NULL; - gs_free char * n_dir = NULL; + gs_free char *n_file = NULL; + gs_free char *n_dir = NULL; gs_strfreev char **tmpfiles = NULL; gsize i; @@ -401,7 +401,7 @@ nm_key_file_db_prune_tmp_files(NMKeyFileDB *self) return; for (i = 0; tmpfiles[i]; i++) { - const char * tmpfile = tmpfiles[i]; + const char *tmpfile = tmpfiles[i]; gs_free char *full_file = NULL; int r; @@ -430,10 +430,10 @@ nm_key_file_db_prune(NMKeyFileDB *self, gboolean (*predicate)(const char *key, gpointer user_data), gpointer user_data) { - gs_strfreev char ** keys = NULL; + gs_strfreev char **keys = NULL; nm_auto_unref_keyfile GKeyFile *kf_to_free = NULL; - GKeyFile * kf_src = NULL; - GKeyFile * kf_dst = NULL; + GKeyFile *kf_src = NULL; + GKeyFile *kf_dst = NULL; guint k; g_return_if_fail(_IS_KEY_FILE_DB(self, TRUE, FALSE)); diff --git a/src/libnm-glib-aux/nm-keyfile-aux.h b/src/libnm-glib-aux/nm-keyfile-aux.h index e756c57a..7ada4029 100644 --- a/src/libnm-glib-aux/nm-keyfile-aux.h +++ b/src/libnm-glib-aux/nm-keyfile-aux.h @@ -13,13 +13,13 @@ typedef struct _NMKeyFileDB NMKeyFileDB; typedef void (*NMKeyFileDBLogFcn)(NMKeyFileDB *self, int syslog_level, gpointer user_data, - const char * fmt, + const char *fmt, ...) G_GNUC_PRINTF(4, 5); typedef void (*NMKeyFileDBGotDirtyFcn)(NMKeyFileDB *self, gpointer user_data); -NMKeyFileDB *nm_key_file_db_new(const char * filename, - const char * group, +NMKeyFileDB *nm_key_file_db_new(const char *filename, + const char *group, NMKeyFileDBLogFcn log_fcn, NMKeyFileDBGotDirtyFcn got_dirty_fcn, gpointer user_data); @@ -43,8 +43,8 @@ void nm_key_file_db_remove_key(NMKeyFileDB *self, const char *key); void nm_key_file_db_set_value(NMKeyFileDB *self, const char *key, const char *value); -void nm_key_file_db_set_string_list(NMKeyFileDB * self, - const char * key, +void nm_key_file_db_set_string_list(NMKeyFileDB *self, + const char *key, const char *const *value, gssize len); diff --git a/src/libnm-glib-aux/nm-logging-base.c b/src/libnm-glib-aux/nm-logging-base.c index cc19ef15..5195cbb7 100644 --- a/src/libnm-glib-aux/nm-logging-base.c +++ b/src/libnm-glib-aux/nm-logging-base.c @@ -104,8 +104,8 @@ _nm_log_simple_printf(NMLogLevel level, const char *fmt, ...) { gs_free char *msg_heap = NULL; char msg_stack[700]; - const char * msg; - const char * level_str; + const char *msg; + const char *level_str; gint64 ts; ts = nm_utils_clock_gettime_nsec(CLOCK_BOOTTIME); diff --git a/src/libnm-glib-aux/nm-macros-internal.h b/src/libnm-glib-aux/nm-macros-internal.h index e7ee7f38..14c16020 100644 --- a/src/libnm-glib-aux/nm-macros-internal.h +++ b/src/libnm-glib-aux/nm-macros-internal.h @@ -137,7 +137,7 @@ static inline void _nm_auto_freev(gpointer ptr) { gpointer **p = ptr; - gpointer * _ptr; + gpointer *_ptr; if (*p) { for (_ptr = *p; *_ptr; _ptr++) @@ -552,12 +552,12 @@ nm_str_realloc(char *str) #define NM_GOBJECT_PROPERTIES_DEFINE_NOTIFY(suffix, obj_type) \ static inline void _nm_gobject_notify_together_impl##suffix( \ - obj_type * obj, \ + obj_type *obj, \ guint n, \ const _PropertyEnums##suffix *props) \ { \ GObject *const gobj = (GObject *) obj; \ - GParamSpec * pspec_first = NULL; \ + GParamSpec *pspec_first = NULL; \ gboolean frozen = FALSE; \ \ nm_assert(G_IS_OBJECT(obj)); \ @@ -565,7 +565,7 @@ nm_str_realloc(char *str) \ while (n-- > 0) { \ const _PropertyEnums##suffix prop = *props++; \ - GParamSpec * pspec; \ + GParamSpec *pspec; \ \ if (prop == PROP_0##suffix) \ continue; \ @@ -1040,7 +1040,7 @@ nm_g_variant_equal(GVariant *a, GVariant *b) #define nm_str_skip_leading_spaces(str) \ ({ \ - typeof(*(str)) * _str_sls = (str); \ + typeof(*(str)) *_str_sls = (str); \ _nm_unused const char *const _str_type_check = _str_sls; \ \ if (_str_sls) { \ @@ -1057,6 +1057,27 @@ nm_strstrip(char *str) return str ? g_strstrip(str) : NULL; } +static inline char * +nm_strstrip_dup(const char *str) +{ + gsize l; + char *s; + + if (!str) + return NULL; + + str = nm_str_skip_leading_spaces(str); + l = strlen(str); + + while (l > 0 && g_ascii_isspace(str[l - 1])) + l--; + + s = g_new(char, l + 1); + memcpy(s, str, l); + s[l] = '\0'; + return s; +} + static inline const char * nm_strstrip_avoid_copy(const char *str, char **str_free) { @@ -1085,7 +1106,7 @@ nm_strstrip_avoid_copy(const char *str, char **str_free) #define nm_strstrip_avoid_copy_a(alloca_maxlen, str, out_str_free) \ ({ \ const char *_str_ssac = (str); \ - char ** _out_str_free_ssac = (out_str_free); \ + char **_out_str_free_ssac = (out_str_free); \ \ G_STATIC_ASSERT_EXPR((alloca_maxlen) > 0); \ \ @@ -1315,7 +1336,7 @@ _nm_strndup_a_step(char *s, const char *str, gsize len) const char *const _str_snd = (str); \ const gsize _len_snd = (len); \ char **const _out_str_free_snd = (out_str_free); \ - char * _s_snd; \ + char *_s_snd; \ \ G_STATIC_ASSERT_EXPR((alloca_maxlen) <= 300); \ \ @@ -1423,7 +1444,7 @@ nm_decode_version(guint version, guint *major, guint *minor, guint *micro) (_str ? ({ \ const gsize _trunc_at = (trunc_at); \ const gsize _strlen_trunc = NM_MIN(strlen(_str), _trunc_at); \ - char * _buf; \ + char *_buf; \ \ G_STATIC_ASSERT_EXPR((trunc_at) <= 300); \ \ @@ -1456,7 +1477,7 @@ nm_decode_version(guint version, guint *major, guint *minor, guint *micro) char *const _sbuf_stack = (sbuf_stack); \ char **const _out_sbuf_heap = (out_sbuf_heap); \ gsize *const _out_len = (out_len); \ - const char * _msg; \ + const char *_msg; \ va_list _va_args; \ int _l; \ \ @@ -1470,7 +1491,7 @@ nm_decode_version(guint version, guint *major, guint *minor, guint *micro) \ if ((gsize) _l >= sizeof(sbuf_stack)) { \ const gsize _l2 = ((gsize) _l) + 1u; \ - char * _sbuf_heap; \ + char *_sbuf_heap; \ \ /* Don't use g_strdup_vprintf() here either, because that also needs * to first determine the length (which is commonly does by printing @@ -1503,7 +1524,7 @@ nm_decode_version(guint version, guint *major, guint *minor, guint *micro) * must not be larger than 300 bytes, as this gets stack allocated. */ #define nm_sprintf_buf_unsafe_a(bufsize, format, ...) \ ({ \ - char * _buf; \ + char *_buf; \ int _buf_len; \ typeof(bufsize) _bufsize = (bufsize); \ \ @@ -1531,7 +1552,7 @@ nm_decode_version(guint version, guint *major, guint *minor, guint *micro) const char *const _name = (name); \ char **const _p_val_to_free = (p_val_to_free); \ const gsize _name_len = strlen(_name); \ - char * _buf2; \ + char *_buf2; \ \ nm_assert(_p_val_to_free && !*_p_val_to_free); \ if (NM_STRLEN(format) <= 290 && _name_len < (gsize) (290 - NM_STRLEN(format))) \ diff --git a/src/libnm-glib-aux/nm-random-utils.c b/src/libnm-glib-aux/nm-random-utils.c index 2f42f3f6..3a8ba64f 100644 --- a/src/libnm-glib-aux/nm-random-utils.c +++ b/src/libnm-glib-aux/nm-random-utils.c @@ -80,7 +80,7 @@ _bad_random_init_seed(BadRandSeed *seed) { const guint8 *p_at_random; int seed_idx; - GRand * rand; + GRand *rand; /* g_rand_new() reads /dev/urandom, but we already noticed that * /dev/urandom fails to give us good randomness (which is why @@ -148,7 +148,7 @@ _bad_random_bytes(guint8 *buf, gsize n) { static BadRandState gl_state; - static GRand * gl_rand; + static GRand *gl_rand; static GMutex gl_mutex; NM_G_MUTEX_LOCKED(&gl_mutex); @@ -224,7 +224,7 @@ nm_utils_random_bytes(void *p, size_t n) int fd; int r; gboolean has_high_quality = TRUE; - guint8 * buf = p; + guint8 *buf = p; g_return_val_if_fail(p, FALSE); g_return_val_if_fail(n > 0, FALSE); diff --git a/src/libnm-glib-aux/nm-ref-string.c b/src/libnm-glib-aux/nm-ref-string.c index 93e97c79..fec5d60e 100644 --- a/src/libnm-glib-aux/nm-ref-string.c +++ b/src/libnm-glib-aux/nm-ref-string.c @@ -172,6 +172,48 @@ nm_ref_string_new_len(const char *cstr, gsize len) return rstr; } +/** + * nmtst_ref_string_find_len: + * @cstr: the string to find. + * @len: length of @cstr. + * + * Returns: (transfer none): %NULL, if the string is currently + * not interned. Otherwise a reference to the interned string. + * Beware: this does not return ownership of the reference, + * it is thus not thread safe. Only use this from unit tests + * when you know that your thread holds a reference to the string + * to keep it alive. Otherwise, this might be a dangling pointer. + */ +NMRefString * +nmtst_ref_string_find_len(const char *cstr, gsize len) +{ + NMRefString *rstr = NULL; + + /* @len cannot be close to G_MAXSIZE. For one, that would mean our call + * to malloc() below overflows. Also, we use G_MAXSIZE as special length + * to indicate using _priv_lookup. */ + nm_assert(len < G_MAXSIZE - G_STRUCT_OFFSET(NMRefString, str) - 1u); + + G_LOCK(gl_lock); + + if (G_LIKELY(gl_hash)) { + NMRefString rr_lookup = { + .len = G_MAXSIZE, + ._priv_lookup = + { + .l_len = len, + .l_str = cstr, + }, + }; + + rstr = g_hash_table_lookup(gl_hash, &rr_lookup); + } + + G_UNLOCK(gl_lock); + + return rstr; +} + void _nm_ref_string_unref_slow_path(NMRefString *rstr) { diff --git a/src/libnm-glib-aux/nm-ref-string.h b/src/libnm-glib-aux/nm-ref-string.h index 6950d1b9..3363bce0 100644 --- a/src/libnm-glib-aux/nm-ref-string.h +++ b/src/libnm-glib-aux/nm-ref-string.h @@ -46,6 +46,19 @@ nm_ref_string_new(const char *cstr) /*****************************************************************************/ +NMRefString *nmtst_ref_string_find_len(const char *cstr, gsize len); + +static inline NMRefString * +nmtst_ref_string_find(const char *cstr) +{ + /* WARNING: only use for testing. See nmtst_ref_string_find_len() why. */ + if (!cstr) + return FALSE; + return nmtst_ref_string_find_len(cstr, strlen(cstr)); +} + +/*****************************************************************************/ + static inline NMRefString * nm_ref_string_ref(NMRefString *rstr) { @@ -118,11 +131,14 @@ static inline gboolean nm_ref_string_equal_str(NMRefString *rstr, const char *str) { if (!str) - return (!!rstr); + return !rstr; if (!rstr) return FALSE; + /* We don't use streq() here, because an NMRefString might have embedded NUL characters + * (as the length is tracked separately). The NUL terminated C string @str must not + * compare equal to such a @rstr, thus we first explicitly check strlen(). */ return rstr->len == strlen(str) && (rstr->str == str || memcmp(rstr->str, str, rstr->len) == 0); } @@ -164,24 +180,63 @@ nm_ref_string_unref_upcast(const char *str) nm_ref_string_unref(NM_REF_STRING_UPCAST(str)); } +/** + * nm_ref_string_reset_str_upcast: + * @ptr: the destination pointer that gets updated. + * @str: the new string to be set. + * + * @ptr is a location (destination pointer) of an "upcast" NMRefString. + * That is, it holds either %NULL or some ((NMRefString *) rstr)->str. + * In other words, @ptr holds an NMRefString which you could get via + * NM_REF_STRING_UPCAST(*ptr). + * This function resets @ptr to point to a NMRefString equal to @str. + * + * Returns: %TRUE if the pointer changed and %FALSE if the value was + * already set to a string equal to @str. + */ +static inline gboolean +nm_ref_string_reset_str_upcast(const char **ptr, const char *str) +{ + NMRefString *rstr; + gsize l; + + nm_assert(ptr); + + if (!str) + return nm_clear_pointer(ptr, nm_ref_string_unref_upcast); + + rstr = NM_REF_STRING_UPCAST(*ptr); + + l = strlen(str); + + if (rstr && rstr->len == l && (rstr->str == str || memcmp(rstr->str, str, l) == 0)) + return FALSE; + + *ptr = nm_ref_string_new_len(str, l)->str; + nm_ref_string_unref(rstr); + return TRUE; +} + static inline gboolean nm_ref_string_reset_str(NMRefString **ptr, const char *str) { - nm_auto_ref_string NMRefString *rstr = NULL; - gsize l; + NMRefString *rstr; + gsize l; nm_assert(ptr); if (!str) return nm_clear_pointer(ptr, nm_ref_string_unref); + rstr = *ptr; + l = strlen(str); - if ((*ptr) && (*ptr)->len == l && ((*ptr)->str == str || memcmp((*ptr)->str, str, l) == 0)) + if (rstr && rstr->len == l && (rstr->str == str || memcmp(rstr->str, str, l) == 0)) return FALSE; - rstr = *ptr; *ptr = nm_ref_string_new_len(str, l); + nm_ref_string_unref(rstr); return TRUE; } diff --git a/src/libnm-glib-aux/nm-secret-utils.h b/src/libnm-glib-aux/nm-secret-utils.h index ac279635..513dbca5 100644 --- a/src/libnm-glib-aux/nm-secret-utils.h +++ b/src/libnm-glib-aux/nm-secret-utils.h @@ -20,6 +20,22 @@ char *nm_secret_strchomp(char *secret); void nm_free_secret(char *secret); +static inline gboolean +nm_strdup_reset_secret(char **dst, const char *src) +{ + char *old; + + nm_assert(dst); + + if (nm_streq0(*dst, src)) + return FALSE; + old = *dst; + *dst = src ? g_strdup(src) : NULL; + if (old) + nm_free_secret(old); + return TRUE; +} + NM_AUTO_DEFINE_FCN0(char *, _nm_auto_free_secret, nm_free_secret); /** * nm_auto_free_secret: @@ -46,8 +62,8 @@ typedef struct { /* the data pointer. This pointer must be allocated with malloc (at least * when used with nm_secret_ptr_clear()). */ union { - char * str; - void * ptr; + char *str; + void *ptr; guint8 *bin; }; } NMSecretPtr; diff --git a/src/libnm-glib-aux/nm-shared-utils.c b/src/libnm-glib-aux/nm-shared-utils.c index 9d1a1bf1..6e6fed12 100644 --- a/src/libnm-glib-aux/nm-shared-utils.c +++ b/src/libnm-glib-aux/nm-shared-utils.c @@ -54,7 +54,7 @@ nm_ip_addr_set_from_untrusted(int addr_family, gpointer dst, gconstpointer src, gsize src_len, - int * out_addr_family) + int *out_addr_family) { nm_assert(dst); @@ -177,7 +177,7 @@ nm_utils_ipv6_addr_set_interface_identifier(struct in6_addr *addr, const NMUtils * the interface identifier. */ void -nm_utils_ipv6_interface_identifier_get_from_addr(NMUtilsIPv6IfaceId * iid, +nm_utils_ipv6_interface_identifier_get_from_addr(NMUtilsIPv6IfaceId *iid, const struct in6_addr *addr) { memcpy(iid, addr->s6_addr + 8, 8); @@ -245,40 +245,58 @@ nm_utils_gettid(void) * The main-thread is determined by remembering the thread-id * of when the function was called the first time. * - * When forking, the thread-id is again reset upon first call. */ + * When forking, the thread-id is again reset upon first call. + * + * Note that this is only used for asserting, to check that we don't + * call the function on the wrong thread. As it's difficult to correctly + * cache the tid/pid, we might get this wrong during fork. That is not + * a problem, because we err on the side of pretending all is good. */ gboolean _nm_assert_on_main_thread(void) { - G_LOCK_DEFINE_STATIC(lock); - static pid_t seen_tid; - static pid_t seen_pid; - pid_t tid; - pid_t pid; - gboolean success = FALSE; + static GMutex lock; + static int seen_tid; + pid_t tid; + int t; + gboolean success = FALSE; tid = nm_utils_gettid(); nm_assert(tid != 0); + nm_assert(({ + const int tt = tid; - G_LOCK(lock); + tt == tid; + })); - if (G_LIKELY(tid == seen_tid)) { + t = g_atomic_int_get(&seen_tid); + if (G_LIKELY(t == tid)) { /* we don't care about false positives (when the process forked, and the thread-id * is accidentally re-used) . It's for assertions only. */ + return TRUE; + } + + g_mutex_lock(&lock); + + t = g_atomic_int_get(&seen_tid); + if (G_UNLIKELY(t == tid)) success = TRUE; - } else { + else { + static pid_t seen_pid; + pid_t pid; + pid = getpid(); nm_assert(pid != 0); - if (seen_tid == 0 || seen_pid != pid) { + if (t == 0 || seen_pid != pid) { /* either this is the first time we call the function, or the process - * forked. In both cases, remember the thread-id. */ - seen_tid = tid; + * forked. In both cases, update the thread-id. */ + g_atomic_int_set(&seen_tid, tid); seen_pid = pid; success = TRUE; } } - G_UNLOCK(lock); + g_mutex_unlock(&lock); return success; } @@ -377,7 +395,7 @@ nm_strbuf_append_str(char **buf, gsize *len, const char *str) void nm_strbuf_append(char **buf, gsize *len, const char *format, ...) { - char * p = *buf; + char *p = *buf; va_list args; int retval; @@ -480,7 +498,7 @@ GBytes * nm_g_bytes_get_empty(void) { static GBytes *bytes = NULL; - GBytes * b; + GBytes *b; again: b = g_atomic_pointer_get(&bytes); @@ -566,7 +584,7 @@ nm_g_bytes_to_variant_ay(const GBytes *bytes) #define _variant_singleton_get(create_variant) \ ({ \ static GVariant *_singleton = NULL; \ - GVariant * _v; \ + GVariant *_v; \ \ while (TRUE) { \ _v = g_atomic_pointer_get(&_singleton); \ @@ -629,7 +647,7 @@ _variant_singleton_get_array_init(GVariant **p_singleton, const char *variant_ty #define _variant_singleton_get_array(variant_type) \ ({ \ static GVariant *_singleton = NULL; \ - GVariant * _v; \ + GVariant *_v; \ \ _v = g_atomic_pointer_get(&_singleton); \ if (G_UNLIKELY(!_v)) { \ @@ -708,10 +726,10 @@ nm_g_variant_maybe_singleton_i(gint32 value) GHashTable * nm_strdict_clone(GHashTable *src) { - GHashTable * dst; + GHashTable *dst; GHashTableIter iter; - const char * key; - const char * val; + const char *key; + const char *val; if (!src) return NULL; @@ -732,7 +750,7 @@ nm_strdict_to_variant_ass(GHashTable *strdict) { gs_free NMUtilsNamedValue *values_free = NULL; NMUtilsNamedValue values_prepared[20]; - const NMUtilsNamedValue * values; + const NMUtilsNamedValue *values; GVariantBuilder builder; guint i; guint n; @@ -753,7 +771,7 @@ nm_strdict_to_variant_asv(GHashTable *strdict) { gs_free NMUtilsNamedValue *values_free = NULL; NMUtilsNamedValue values_prepared[20]; - const NMUtilsNamedValue * values; + const NMUtilsNamedValue *values; GVariantBuilder builder; guint i; guint n; @@ -873,7 +891,7 @@ const char * nm_utils_flags2str(const NMUtilsFlags2StrDesc *descs, gsize n_descs, unsigned flags, - char * buf, + char *buf, gsize len) { gsize i; @@ -986,10 +1004,10 @@ nm_utils_ip_is_site_local(int addr_family, const void *address) static gboolean _parse_legacy_addr4(const char *text, in_addr_t *out_addr, GError **error) { - gs_free char * s_free = NULL; + gs_free char *s_free = NULL; struct in_addr a1; guint8 bin[sizeof(a1)]; - char * s; + char *s; int i; if (inet_aton(text, &a1) != 1) { @@ -1024,7 +1042,7 @@ _parse_legacy_addr4(const char *text, in_addr_t *out_addr, GError **error) s = nm_memdup_maybe_a(300, text, strlen(text) + 1, &s_free); for (i = 0; i < G_N_ELEMENTS(bin); i++) { - char * current_token = s; + char *current_token = s; gint32 v; s = strchr(s, '.'); @@ -1088,7 +1106,7 @@ gboolean nm_utils_parse_inaddr_bin_full(int addr_family, gboolean accept_legacy, const char *text, - int * out_addr_family, + int *out_addr_family, gpointer out_addr) { NMIPAddr addrbin; @@ -1160,14 +1178,14 @@ nm_utils_parse_inaddr(int addr_family, const char *text, char **out_addr) gboolean nm_utils_parse_inaddr_prefix_bin(int addr_family, const char *text, - int * out_addr_family, + int *out_addr_family, gpointer out_addr, - int * out_prefix) + int *out_prefix) { gs_free char *addrstr_free = NULL; int prefix = -1; - const char * slash; - const char * addrstr; + const char *slash; + const char *addrstr; NMIPAddr addrbin; g_return_val_if_fail(text, FALSE); @@ -1218,9 +1236,9 @@ nm_utils_parse_inaddr_prefix(int addr_family, const char *text, char **out_addr, gboolean nm_utils_parse_next_line(const char **inout_ptr, - gsize * inout_len, + gsize *inout_len, const char **out_line, - gsize * out_line_len) + gsize *out_line_len) { gboolean eol_is_carriage_return; const char *line_start; @@ -1843,12 +1861,12 @@ _char_lookup_has_all(const CharLookupTable *lookup, const char *candidates) const char ** nm_strsplit_set_full(const char *str, const char *delimiters, NMUtilsStrsplitSetFlags flags) { - const char ** ptr; + const char **ptr; gsize num_tokens; gsize i_token; gsize str_len_p1; - const char * c_str; - char * s; + const char *c_str; + char *s; CharLookupTable ch_lookup; const gboolean f_escaped = NM_FLAGS_HAS(flags, NM_STRSPLIT_SET_FLAGS_ESCAPED); const gboolean f_allow_escaping = @@ -1884,7 +1902,7 @@ nm_strsplit_set_full(const char *str, const char *delimiters, NMUtilsStrsplitSet ({ \ const char *const _str_start = (str_start); \ const char *const _str_cur = (str_cur); \ - const char * _str_i = (_str_cur); \ + const char *_str_i = (_str_cur); \ \ while (_str_i > _str_start && _str_i[-1] == '\\') \ _str_i--; \ @@ -2030,16 +2048,16 @@ done2: /*****************************************************************************/ const char * -nm_utils_escaped_tokens_escape_full(const char * str, - const char * delimiters, - const char * delimiters_as_needed, +nm_utils_escaped_tokens_escape_full(const char *str, + const char *delimiters, + const char *delimiters_as_needed, NMUtilsEscapedTokensEscapeFlags flags, - char ** out_to_free) + char **out_to_free) { CharLookupTable ch_lookup; CharLookupTable ch_lookup_as_needed; gboolean has_ch_lookup_as_needed = FALSE; - char * ret; + char *ret; gsize str_len; gsize alloc_len; gsize n_escapes; @@ -2268,7 +2286,7 @@ char ** nm_utils_strsplit_quoted(const char *str) { gs_unref_ptrarray GPtrArray *arr = NULL; - gs_free char * str_out = NULL; + gs_free char *str_out = NULL; CharLookupTable ch_lookup; nm_assert(str); @@ -2520,7 +2538,7 @@ nm_strv_cleanup(char **strv, gboolean strip_whitespace, gboolean skip_empty, gbo /*****************************************************************************/ GPtrArray * -_nm_g_ptr_array_copy(GPtrArray * array, +_nm_g_ptr_array_copy(GPtrArray *array, GCopyFunc func, gpointer user_data, GDestroyNotify element_free_func) @@ -2624,14 +2642,14 @@ nm_utils_error_is_notfound(GError *error) * Returns: whether the value was successfully set. */ gboolean -nm_g_object_set_property(GObject * object, - const char * property_name, +nm_g_object_set_property(GObject *object, + const char *property_name, const GValue *value, - GError ** error) + GError **error) { - GParamSpec * pspec; + GParamSpec *pspec; nm_auto_unset_gvalue GValue tmp_value = G_VALUE_INIT; - GObjectClass * klass; + GObjectClass *klass; g_return_val_if_fail(G_IS_OBJECT(object), FALSE); g_return_val_if_fail(property_name != NULL, FALSE); @@ -2725,46 +2743,46 @@ nm_g_object_set_property(GObject * object, G_STMT_END gboolean -nm_g_object_set_property_string(GObject * object, +nm_g_object_set_property_string(GObject *object, const char *property_name, const char *value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_STRING, g_value_set_string, value, error); } gboolean -nm_g_object_set_property_string_static(GObject * object, +nm_g_object_set_property_string_static(GObject *object, const char *property_name, const char *value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_STRING, g_value_set_static_string, value, error); } gboolean -nm_g_object_set_property_string_take(GObject * object, +nm_g_object_set_property_string_take(GObject *object, const char *property_name, - char * value, - GError ** error) + char *value, + GError **error) { _set_property(object, property_name, G_TYPE_STRING, g_value_take_string, value, error); } gboolean -nm_g_object_set_property_boolean(GObject * object, +nm_g_object_set_property_boolean(GObject *object, const char *property_name, gboolean value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_BOOLEAN, g_value_set_boolean, !!value, error); } gboolean -nm_g_object_set_property_char(GObject * object, +nm_g_object_set_property_char(GObject *object, const char *property_name, gint8 value, - GError ** error) + GError **error) { /* glib says about G_TYPE_CHAR: * @@ -2775,10 +2793,10 @@ nm_g_object_set_property_char(GObject * object, } gboolean -nm_g_object_set_property_uchar(GObject * object, +nm_g_object_set_property_uchar(GObject *object, const char *property_name, guint8 value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_UCHAR, g_value_set_uchar, value, error); } @@ -2790,38 +2808,38 @@ nm_g_object_set_property_int(GObject *object, const char *property_name, int val } gboolean -nm_g_object_set_property_int64(GObject * object, +nm_g_object_set_property_int64(GObject *object, const char *property_name, gint64 value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_INT64, g_value_set_int64, value, error); } gboolean -nm_g_object_set_property_uint(GObject * object, +nm_g_object_set_property_uint(GObject *object, const char *property_name, guint value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_UINT, g_value_set_uint, value, error); } gboolean -nm_g_object_set_property_uint64(GObject * object, +nm_g_object_set_property_uint64(GObject *object, const char *property_name, guint64 value, - GError ** error) + GError **error) { _set_property(object, property_name, G_TYPE_UINT64, g_value_set_uint64, value, error); } gboolean -nm_g_object_set_property_flags(GObject * object, +nm_g_object_set_property_flags(GObject *object, const char *property_name, GType gtype, guint value, - GError ** error) + GError **error) { nm_assert(({ nm_auto_unref_gtypeclass GTypeClass *gtypeclass = g_type_class_ref(gtype); @@ -2831,11 +2849,11 @@ nm_g_object_set_property_flags(GObject * object, } gboolean -nm_g_object_set_property_enum(GObject * object, +nm_g_object_set_property_enum(GObject *object, const char *property_name, GType gtype, int value, - GError ** error) + GError **error) { nm_assert(({ nm_auto_unref_gtypeclass GTypeClass *gtypeclass = g_type_class_ref(gtype); @@ -2873,7 +2891,7 @@ GType nm_g_type_find_implementing_class_for_property(GType gtype, const char *pname) { nm_auto_unref_gtypeclass GObjectClass *klass = NULL; - GParamSpec * pspec; + GParamSpec *pspec; g_return_val_if_fail(pname, G_TYPE_INVALID); @@ -2949,10 +2967,10 @@ _str_buf_append_c_escape_octal(NMStrBuf *strbuf, char ch) * containing the unescaped string and returned. */ gconstpointer -nm_utils_buf_utf8safe_unescape(const char * str, +nm_utils_buf_utf8safe_unescape(const char *str, NMUtilsStrUtf8SafeFlags flags, - gsize * out_len, - gpointer * to_free) + gsize *out_len, + gpointer *to_free) { gboolean strip_spaces = NM_FLAGS_HAS(flags, NM_UTILS_STR_UTF8_SAFE_UNESCAPE_STRIP_SPACES); NMStrBuf strbuf; @@ -3114,11 +3132,11 @@ const char * nm_utils_buf_utf8safe_escape(gconstpointer buf, gssize buflen, NMUtilsStrUtf8SafeFlags flags, - char ** to_free) + char **to_free) { const char *const str = buf; - const char * p = NULL; - const char * s; + const char *p = NULL; + const char *s; gboolean nul_terminated = FALSE; NMStrBuf strbuf; @@ -3209,7 +3227,7 @@ char * nm_utils_buf_utf8safe_escape_cp(gconstpointer buf, gssize buflen, NMUtilsStrUtf8SafeFlags flags) { const char *s_const; - char * s; + char *s; s_const = nm_utils_buf_utf8safe_escape(buf, buflen, flags, &s); nm_assert(!s || s == s_const); @@ -3419,11 +3437,11 @@ nm_utils_named_value_clear_with_g_free(NMUtilsNamedValue *val) G_STATIC_ASSERT(G_STRUCT_OFFSET(NMUtilsNamedValue, name) == 0); NMUtilsNamedValue * -nm_utils_named_values_from_strdict_full(GHashTable * hash, - guint * out_len, +nm_utils_named_values_from_strdict_full(GHashTable *hash, + guint *out_len, GCompareDataFunc compare_func, gpointer user_data, - NMUtilsNamedValue * provided_buffer, + NMUtilsNamedValue *provided_buffer, guint provided_buffer_len, NMUtilsNamedValue **out_allocated_buffer) { @@ -3466,7 +3484,7 @@ nm_utils_named_values_from_strdict_full(GHashTable * hash, gssize nm_utils_named_value_list_find(const NMUtilsNamedValue *arr, gsize len, - const char * name, + const char *name, gboolean sorted) { gsize i; @@ -3556,10 +3574,10 @@ nm_utils_named_value_list_sort(NMUtilsNamedValue *arr, /*****************************************************************************/ gpointer * -nm_utils_hash_keys_to_array(GHashTable * hash, +nm_utils_hash_keys_to_array(GHashTable *hash, GCompareDataFunc compare_func, gpointer user_data, - guint * out_len) + guint *out_len) { guint len; gpointer *keys; @@ -3580,14 +3598,14 @@ nm_utils_hash_keys_to_array(GHashTable * hash, } gpointer * -nm_utils_hash_values_to_array(GHashTable * hash, +nm_utils_hash_values_to_array(GHashTable *hash, GCompareDataFunc compare_func, gpointer user_data, - guint * out_len) + guint *out_len) { GHashTableIter iter; gpointer value; - gpointer * arr; + gpointer *arr; guint i, len; if (!hash || (len = g_hash_table_size(hash)) == 0u) { @@ -3669,8 +3687,8 @@ nm_utils_hashtable_equal(const GHashTable *a, } static gboolean -_utils_hashtable_equal(GHashTable * hash_a, - GHashTable * hash_b, +_utils_hashtable_equal(GHashTable *hash_a, + GHashTable *hash_b, GCompareDataFunc cmp_values, gpointer user_data) { @@ -3768,8 +3786,8 @@ static int _hashtable_cmp_func(gconstpointer a, gconstpointer b, gpointer user_data) { const HashTableUserData *d = user_data; - const HashTableCmpData * d_a = *((const HashTableCmpData *const *) a); - const HashTableCmpData * d_b = *((const HashTableCmpData *const *) b); + const HashTableCmpData *d_a = *((const HashTableCmpData *const *) a); + const HashTableCmpData *d_b = *((const HashTableCmpData *const *) b); NM_CMP_RETURN(d->cmp_keys(d_a, d_b, d->user_data)); return 0; @@ -3805,11 +3823,11 @@ nm_utils_hashtable_cmp(const GHashTable *a, GCompareDataFunc cmp_values, gpointer user_data) { - GHashTable *hash_a = (GHashTable *) a; - GHashTable *hash_b = (GHashTable *) b; + GHashTable *hash_a = (GHashTable *) a; + GHashTable *hash_b = (GHashTable *) b; gs_free HashTableCmpData *cmp_array_free = NULL; - HashTableCmpData * cmp_array_a; - HashTableCmpData * cmp_array_b; + HashTableCmpData *cmp_array_a; + HashTableCmpData *cmp_array_b; GHashTableIter h; gpointer i_key; gpointer i_val; @@ -4011,12 +4029,12 @@ _nm_strv_dup_packed(const char *const *strv, gssize len) { gs_free gsize *str_len_free = NULL; - gsize * str_len; - const char ** result; + gsize *str_len; + const char **result; gsize mem_len; gsize pre_len; gsize len2; - char * sbuf; + char *sbuf; gsize i; nm_assert(len >= -1); @@ -4113,7 +4131,7 @@ nm_utils_ptrarray_find_first(gconstpointer *list, gssize len, gconstpointer need /*****************************************************************************/ gboolean -nm_utils_ptrarray_is_sorted(gconstpointer * list, +nm_utils_ptrarray_is_sorted(gconstpointer *list, gsize len, gboolean require_strict, GCompareDataFunc cmpfcn, @@ -4135,7 +4153,7 @@ nm_utils_ptrarray_is_sorted(gconstpointer * list, } gssize -nm_utils_ptrarray_find_binary_search(gconstpointer * list, +nm_utils_ptrarray_find_binary_search(gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, @@ -4172,13 +4190,13 @@ nm_utils_ptrarray_find_binary_search(gconstpointer * list, } gssize -nm_utils_ptrarray_find_binary_search_range(gconstpointer * list, +nm_utils_ptrarray_find_binary_search_range(gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data, - gssize * out_idx_first, - gssize * out_idx_last) + gssize *out_idx_first, + gssize *out_idx_last) { gssize imin, imax, imid, i2min, i2max, i2mid; int cmp; @@ -4336,10 +4354,10 @@ nm_utils_get_start_time_for_pid(pid_t pid, char *out_state, pid_t *out_ppid) { guint64 start_time; char filename[256]; - gs_free char * contents = NULL; + gs_free char *contents = NULL; size_t length; gs_free const char **tokens = NULL; - char * p; + char *p; char state = ' '; gint64 ppid = 0; @@ -4593,8 +4611,8 @@ _nm_utils_user_data_unpack(NMUtilsUserData *user_data, int nargs, ...) typedef struct { gpointer callback_user_data; - GCancellable * cancellable; - GSource * source; + GCancellable *cancellable; + GSource *source; NMUtilsInvokeOnIdleCallback callback; gulong cancelled_id; } InvokeOnIdleData; @@ -4639,12 +4657,12 @@ _nm_utils_invoke_on_idle_cb_cancelled(GCancellable *cancellable, InvokeOnIdleDat static void _nm_utils_invoke_on_idle_start(gboolean use_timeout, guint timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMUtilsInvokeOnIdleCallback callback, gpointer callback_user_data) { InvokeOnIdleData *data; - GSource * source; + GSource *source; g_return_if_fail(callback); @@ -4688,7 +4706,7 @@ _nm_utils_invoke_on_idle_start(gboolean use_timeout, } void -nm_utils_invoke_on_idle(GCancellable * cancellable, +nm_utils_invoke_on_idle(GCancellable *cancellable, NMUtilsInvokeOnIdleCallback callback, gpointer callback_user_data) { @@ -4697,7 +4715,7 @@ nm_utils_invoke_on_idle(GCancellable * cancellable, void nm_utils_invoke_on_timeout(guint timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMUtilsInvokeOnIdleCallback callback, gpointer callback_user_data) { @@ -4787,11 +4805,11 @@ nm_utils_bin2hexstr_full(gconstpointer addr, gsize length, char delimiter, gboolean upper_case, - char * out) + char *out) { const guint8 *in = addr; - const char * LOOKUP = upper_case ? "0123456789ABCDEF" : "0123456789abcdef"; - char * out0; + const char *LOOKUP = upper_case ? "0123456789ABCDEF" : "0123456789abcdef"; + char *out0; if (out) out0 = out; @@ -4829,12 +4847,12 @@ nm_utils_hexstr2bin_full(const char *hexstr, gboolean hexdigit_pairs_required, const char *delimiter_candidates, gsize required_len, - guint8 * buffer, + guint8 *buffer, gsize buffer_len, - gsize * out_len) + gsize *out_len) { const char *in = hexstr; - guint8 * out = buffer; + guint8 *out = buffer; gboolean delimiter_has = TRUE; guint8 delimiter = '\0'; gsize len; @@ -4918,7 +4936,7 @@ nm_utils_hexstr2bin_alloc(const char *hexstr, gboolean delimiter_required, const char *delimiter_candidates, gsize required_len, - gsize * out_len) + gsize *out_len) { guint8 *buffer; gsize buffer_len, len; @@ -4968,16 +4986,16 @@ fail: GVariant * nm_utils_gvariant_vardict_filter(GVariant *src, gboolean (*filter_fcn)(const char *key, - GVariant * val, - char ** out_key, - GVariant ** out_val, + GVariant *val, + char **out_key, + GVariant **out_val, gpointer user_data), gpointer user_data) { GVariantIter iter; GVariantBuilder builder; - const char * key; - GVariant * val; + const char *key; + GVariant *val; g_return_val_if_fail(src && g_variant_is_of_type(src, G_VARIANT_TYPE_VARDICT), NULL); g_return_val_if_fail(filter_fcn, NULL); @@ -4987,8 +5005,8 @@ nm_utils_gvariant_vardict_filter(GVariant *src, g_variant_iter_init(&iter, src); while (g_variant_iter_next(&iter, "{&sv}", &key, &val)) { _nm_unused gs_unref_variant GVariant *val_free = val; - gs_free char * key2 = NULL; - gs_unref_variant GVariant *val2 = NULL; + gs_free char *key2 = NULL; + gs_unref_variant GVariant *val2 = NULL; if (filter_fcn(key, val, &key2, &val2, user_data)) { g_variant_builder_add(&builder, "{sv}", key2 ?: key, val2 ?: val); @@ -5000,9 +5018,9 @@ nm_utils_gvariant_vardict_filter(GVariant *src, static gboolean _gvariant_vardict_filter_drop_one(const char *key, - GVariant * val, - char ** out_key, - GVariant ** out_val, + GVariant *val, + char **out_key, + GVariant **out_val, gpointer user_data) { return !nm_streq(key, user_data); @@ -5231,8 +5249,8 @@ typedef struct { typedef struct { GSource source; GMainContext *context; - GHashTable * fds; - GPollFD * fds_arr; + GHashTable *fds; + GPollFD *fds_arr; guint fds_len; int max_priority; bool acquired : 1; @@ -5272,16 +5290,16 @@ _ctx_integ_source_reacquire(CtxIntegSource *ctx_src) static gboolean _ctx_integ_source_prepare(GSource *source, int *out_timeout) { - CtxIntegSource *ctx_src = ((CtxIntegSource *) source); - int max_priority; - int timeout = -1; - gboolean any_ready; - GHashTableIter h_iter; - PollData * poll_data; - gboolean fds_changed; - GPollFD new_fds_stack[300u / sizeof(GPollFD)]; + CtxIntegSource *ctx_src = ((CtxIntegSource *) source); + int max_priority; + int timeout = -1; + gboolean any_ready; + GHashTableIter h_iter; + PollData *poll_data; + gboolean fds_changed; + GPollFD new_fds_stack[300u / sizeof(GPollFD)]; gs_free GPollFD *new_fds_heap = NULL; - GPollFD * new_fds; + GPollFD *new_fds; guint new_fds_len; guint new_fds_alloc; guint i; @@ -5455,7 +5473,7 @@ _ctx_integ_source_check(GSource *source) CtxIntegSource *ctx_src = ((CtxIntegSource *) source); GHashTableIter h_iter; gboolean some_ready; - PollData * poll_data; + PollData *poll_data; nm_assert(ctx_src->context); @@ -5511,7 +5529,7 @@ _ctx_integ_source_finalize(GSource *source) { CtxIntegSource *ctx_src = ((CtxIntegSource *) source); GHashTableIter h_iter; - PollData * poll_data; + PollData *poll_data; g_return_if_fail(ctx_src->context); @@ -5890,17 +5908,17 @@ attribute_escape(const char *src, char c1, char c2) } void -_nm_utils_format_variant_attributes_full(GString * str, - const NMUtilsNamedValue * values, +_nm_utils_format_variant_attributes_full(GString *str, + const NMUtilsNamedValue *values, guint num_values, const NMVariantAttributeSpec *const *spec, char attr_separator, char key_value_separator) { const NMVariantAttributeSpec *const *s; - const char * name, *value; - GVariant * variant; - char * escaped; + const char *name, *value; + GVariant *variant; + char *escaped; char buf[64]; char sep = 0; guint i; @@ -5960,15 +5978,15 @@ _nm_utils_format_variant_attributes_full(GString * st } char * -_nm_utils_format_variant_attributes(GHashTable * attributes, +_nm_utils_format_variant_attributes(GHashTable *attributes, const NMVariantAttributeSpec *const *spec, char attr_separator, char key_value_separator) { gs_free NMUtilsNamedValue *values_free = NULL; NMUtilsNamedValue values_prepared[20]; - const NMUtilsNamedValue * values; - GString * str = NULL; + const NMUtilsNamedValue *values; + GString *str = NULL; guint len; g_return_val_if_fail(attr_separator, NULL); @@ -6078,7 +6096,7 @@ nm_utils_uid_to_name(uid_t uid) gs_free char *buf_heap = NULL; char buf_stack[4096]; gsize bufsize; - char * buf; + char *buf; bufsize = sizeof(buf_stack); buf = buf_stack; @@ -6112,7 +6130,7 @@ nm_utils_name_to_uid(const char *name, uid_t *out_uid) gs_free char *buf_heap = NULL; char buf_stack[4096]; gsize bufsize; - char * buf; + char *buf; if (!name) return nm_assert_unreachable_val(FALSE); @@ -6210,7 +6228,7 @@ char * _nm_utils_ssid_to_string_arr(const guint8 *ssid, gsize len) { gs_free char *s_copy = NULL; - const char * s_cnst; + const char *s_cnst; if (len == 0) return g_strdup("(empty)"); @@ -6286,7 +6304,7 @@ nm_utils_ip4_address_clear_host_address(in_addr_t addr, guint8 plen) * @dst and @src to the same destination or set @src NULL. */ const struct in6_addr * -nm_utils_ip6_address_clear_host_address(struct in6_addr * dst, +nm_utils_ip6_address_clear_host_address(struct in6_addr *dst, const struct in6_addr *src, guint8 plen) { @@ -6475,10 +6493,10 @@ nm_crypto_md5_hash(const guint8 *salt, gsize salt_len, const guint8 *password, gsize password_len, - guint8 * buffer, + guint8 *buffer, gsize buflen) { - nm_auto_free_checksum GChecksum * ctx = NULL; + nm_auto_free_checksum GChecksum *ctx = NULL; nm_auto_clear_static_secret_ptr const NMSecretPtr digest = NM_SECRET_PTR_STATIC(NM_UTILS_CHECKSUM_LENGTH_MD5); gsize bufidx = 0; @@ -6569,7 +6587,7 @@ static pthread_key_t _tls_reg_key; static void _tls_reg_destroy(gpointer data) { - CList * lst_head = data; + CList *lst_head = data; TlsRegData *entry; if (!lst_head) @@ -6612,8 +6630,8 @@ nm_utils_thread_local_register_destroy(gpointer tls_data, GDestroyNotify destroy { NM_AUTO_PROTECT_ERRNO(errsv); static pthread_once_t key_once = PTHREAD_ONCE_INIT; - CList * lst_head; - TlsRegData * entry; + CList *lst_head; + TlsRegData *entry; nm_assert(destroy_notify); diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h index 8dd53dcf..5a0518f8 100644 --- a/src/libnm-glib-aux/nm-shared-utils.h +++ b/src/libnm-glib-aux/nm-shared-utils.h @@ -36,12 +36,7 @@ pid_t nm_utils_gettid(void); gboolean _nm_assert_on_main_thread(void); #if NM_MORE_ASSERTS > 5 -#define NM_ASSERT_ON_MAIN_THREAD() \ - G_STMT_START \ - { \ - nm_assert(_nm_assert_on_main_thread()); \ - } \ - G_STMT_END +#define NM_ASSERT_ON_MAIN_THREAD() nm_assert(_nm_assert_on_main_thread()) #else #define NM_ASSERT_ON_MAIN_THREAD() \ G_STMT_START \ @@ -90,7 +85,7 @@ G_STATIC_ASSERT(sizeof(int) == sizeof(gint32)); #define _NM_INT_LE_MAXINT32(value) \ ({ \ _nm_unused typeof(value) _value = (value); \ - _nm_unused const int * _p_value = &_value; \ + _nm_unused const int *_p_value = &_value; \ \ TRUE; \ }) @@ -248,10 +243,9 @@ extern const NMIPAddr nm_ip_addr_zero; static inline int nm_ip_addr_cmp(int addr_family, gconstpointer a, gconstpointer b) { - nm_assert(a); - nm_assert(b); - - return memcmp(a, b, nm_utils_addr_family_to_size(addr_family)); + NM_CMP_SELF(a, b); + NM_CMP_DIRECT_MEMCMP(a, b, nm_utils_addr_family_to_size(addr_family)); + return 0; } static inline gboolean @@ -313,7 +307,7 @@ gboolean nm_ip_addr_set_from_untrusted(int addr_family, gpointer dst, gconstpointer src, gsize src_len, - int * out_addr_family); + int *out_addr_family); gboolean nm_ip_addr_set_from_variant(int addr_family, gpointer dst, GVariant *variant, int *out_addr_family); @@ -375,20 +369,20 @@ typedef struct _NMUtilsIPv6IfaceId { } \ } -void nm_utils_ipv6_addr_set_interface_identifier(struct in6_addr * addr, +void nm_utils_ipv6_addr_set_interface_identifier(struct in6_addr *addr, const NMUtilsIPv6IfaceId *iid); -void nm_utils_ipv6_interface_identifier_get_from_addr(NMUtilsIPv6IfaceId * iid, +void nm_utils_ipv6_interface_identifier_get_from_addr(NMUtilsIPv6IfaceId *iid, const struct in6_addr *addr); gboolean nm_utils_ipv6_interface_identifier_get_from_token(NMUtilsIPv6IfaceId *iid, - const char * token); + const char *token); const char *nm_utils_inet6_interface_identifier_to_token(const NMUtilsIPv6IfaceId *iid, char buf[static INET6_ADDRSTRLEN]); gboolean nm_utils_get_ipv6_interface_identifier(NMLinkType link_type, - const guint8 * hwaddr, + const guint8 *hwaddr, guint len, guint dev_id, NMUtilsIPv6IfaceId *out_iid); @@ -398,7 +392,7 @@ gboolean nm_utils_get_ipv6_interface_identifier(NMLinkType link_type, gconstpointer nm_utils_ipx_address_clear_host_address(int family, gpointer dst, gconstpointer src, guint8 plen); in_addr_t nm_utils_ip4_address_clear_host_address(in_addr_t addr, guint8 plen); -const struct in6_addr *nm_utils_ip6_address_clear_host_address(struct in6_addr * dst, +const struct in6_addr *nm_utils_ip6_address_clear_host_address(struct in6_addr *dst, const struct in6_addr *src, guint8 plen); @@ -623,9 +617,9 @@ GVariant *nm_strdict_to_variant_asv(GHashTable *strdict); GVariant *nm_utils_gvariant_vardict_filter(GVariant *src, gboolean (*filter_fcn)(const char *key, - GVariant * val, - char ** out_key, - GVariant ** out_val, + GVariant *val, + char **out_key, + GVariant **out_val, gpointer user_data), gpointer user_data); @@ -751,7 +745,7 @@ gboolean nm_strv_has_duplicate(const char *const *list, gssize len, gboolean is_ const char **nm_strv_cleanup_const(const char **strv, gboolean skip_empty, gboolean skip_repeated); -char **nm_strv_cleanup(char ** strv, +char **nm_strv_cleanup(char **strv, gboolean strip_whitespace, gboolean skip_empty, gboolean skip_repeated); @@ -824,7 +818,7 @@ const char *nm_utils_escaped_tokens_escape_full(const char *str, const char *delimiters, const char *delimiters_as_needed, NMUtilsEscapedTokensEscapeFlags flags, - char ** out_to_free); + char **out_to_free); static inline const char * nm_utils_escaped_tokens_escape(const char *str, const char *delimiters, char **out_to_free) @@ -859,7 +853,7 @@ nm_utils_escaped_tokens_escape_unnecessary(const char *str, const char *delimite { gs_free char *str_to_free = NULL; - const char * str0; + const char *str0; str0 = nm_utils_escaped_tokens_escape(str, delimiters, &str_to_free); nm_assert(str0 == str); @@ -873,7 +867,7 @@ nm_utils_escaped_tokens_escape_unnecessary(const char *str, const char *delimite static inline void nm_utils_escaped_tokens_escape_gstr_assert(const char *str, const char *delimiters, - GString * gstring) + GString *gstring) { g_string_append(gstring, nm_utils_escaped_tokens_escape_unnecessary(str, delimiters)); } @@ -987,7 +981,7 @@ guint32 _nm_utils_ip4_get_default_prefix(in_addr_t ip); gconstpointer nm_utils_ipx_address_clear_host_address(int family, gpointer dst, gconstpointer src, guint8 plen); in_addr_t nm_utils_ip4_address_clear_host_address(in_addr_t addr, guint8 plen); -const struct in6_addr *nm_utils_ip6_address_clear_host_address(struct in6_addr * dst, +const struct in6_addr *nm_utils_ip6_address_clear_host_address(struct in6_addr *dst, const struct in6_addr *src, guint8 plen); int nm_utils_ip6_address_same_prefix_cmp(const struct in6_addr *addr_a, @@ -1001,12 +995,12 @@ gboolean nm_utils_ip_is_site_local(int addr_family, const void *address); gboolean nm_utils_parse_inaddr_bin_full(int addr_family, gboolean accept_legacy, const char *text, - int * out_addr_family, + int *out_addr_family, gpointer out_addr); static inline gboolean nm_utils_parse_inaddr_bin(int addr_family, const char *text, - int * out_addr_family, + int *out_addr_family, gpointer out_addr) { return nm_utils_parse_inaddr_bin_full(addr_family, FALSE, text, out_addr_family, out_addr); @@ -1016,17 +1010,17 @@ gboolean nm_utils_parse_inaddr(int addr_family, const char *text, char **out_add gboolean nm_utils_parse_inaddr_prefix_bin(int addr_family, const char *text, - int * out_addr_family, + int *out_addr_family, gpointer out_addr, - int * out_prefix); + int *out_prefix); gboolean nm_utils_parse_inaddr_prefix(int addr_family, const char *text, char **out_addr, int *out_prefix); gboolean nm_utils_parse_next_line(const char **inout_ptr, - gsize * inout_len, + gsize *inout_len, const char **out_line, - gsize * out_line_len); + gsize *out_line_len); gint64 nm_g_ascii_strtoll(const char *nptr, char **endptr, guint base); @@ -1083,7 +1077,7 @@ typedef struct { const char *nm_utils_flags2str(const NMUtilsFlags2StrDesc *descs, gsize n_descs, unsigned flags, - char * buf, + char *buf, gsize len); /*****************************************************************************/ @@ -1373,70 +1367,70 @@ nm_utils_error_set_literal(GError **error, int error_code, const char *literal) /*****************************************************************************/ -gboolean nm_g_object_set_property(GObject * object, - const char * property_name, +gboolean nm_g_object_set_property(GObject *object, + const char *property_name, const GValue *value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_string(GObject * object, +gboolean nm_g_object_set_property_string(GObject *object, const char *property_name, const char *value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_string_static(GObject * object, +gboolean nm_g_object_set_property_string_static(GObject *object, const char *property_name, const char *value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_string_take(GObject * object, +gboolean nm_g_object_set_property_string_take(GObject *object, const char *property_name, - char * value, - GError ** error); + char *value, + GError **error); -gboolean nm_g_object_set_property_boolean(GObject * object, +gboolean nm_g_object_set_property_boolean(GObject *object, const char *property_name, gboolean value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_char(GObject * object, +gboolean nm_g_object_set_property_char(GObject *object, const char *property_name, gint8 value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_uchar(GObject * object, +gboolean nm_g_object_set_property_uchar(GObject *object, const char *property_name, guint8 value, - GError ** error); + GError **error); gboolean nm_g_object_set_property_int(GObject *object, const char *property_name, int value, GError **error); -gboolean nm_g_object_set_property_int64(GObject * object, +gboolean nm_g_object_set_property_int64(GObject *object, const char *property_name, gint64 value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_uint(GObject * object, +gboolean nm_g_object_set_property_uint(GObject *object, const char *property_name, guint value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_uint64(GObject * object, +gboolean nm_g_object_set_property_uint64(GObject *object, const char *property_name, guint64 value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_flags(GObject * object, +gboolean nm_g_object_set_property_flags(GObject *object, const char *property_name, GType gtype, guint value, - GError ** error); + GError **error); -gboolean nm_g_object_set_property_enum(GObject * object, +gboolean nm_g_object_set_property_enum(GObject *object, const char *property_name, GType gtype, int value, - GError ** error); + GError **error); GParamSpec *nm_g_object_class_find_property_from_gtype(GType gtype, const char *property_name); @@ -1464,6 +1458,8 @@ GParamSpec *nm_g_object_class_find_property_from_gtype(GType gtype, const char * _NM_G_PARAM_SPEC_CAST(param_spec, G_TYPE_INT, GParamSpecInt) #define NM_G_PARAM_SPEC_CAST_UINT(param_spec) \ _NM_G_PARAM_SPEC_CAST(param_spec, G_TYPE_UINT, GParamSpecUInt) +#define NM_G_PARAM_SPEC_CAST_INT64(param_spec) \ + _NM_G_PARAM_SPEC_CAST(param_spec, G_TYPE_INT64, GParamSpecInt64) #define NM_G_PARAM_SPEC_CAST_UINT64(param_spec) \ _NM_G_PARAM_SPEC_CAST(param_spec, G_TYPE_UINT64, GParamSpecUInt64) #define NM_G_PARAM_SPEC_CAST_ENUM(param_spec) \ @@ -1479,6 +1475,8 @@ GParamSpec *nm_g_object_class_find_property_from_gtype(GType gtype, const char * (NM_G_PARAM_SPEC_CAST_INT(NM_ENSURE_NOT_NULL(param_spec))->default_value) #define NM_G_PARAM_SPEC_GET_DEFAULT_UINT(param_spec) \ (NM_G_PARAM_SPEC_CAST_UINT(NM_ENSURE_NOT_NULL(param_spec))->default_value) +#define NM_G_PARAM_SPEC_GET_DEFAULT_INT64(param_spec) \ + (NM_G_PARAM_SPEC_CAST_INT64(NM_ENSURE_NOT_NULL(param_spec))->default_value) #define NM_G_PARAM_SPEC_GET_DEFAULT_UINT64(param_spec) \ (NM_G_PARAM_SPEC_CAST_UINT64(NM_ENSURE_NOT_NULL(param_spec))->default_value) #define NM_G_PARAM_SPEC_GET_DEFAULT_ENUM(param_spec) \ @@ -1526,15 +1524,15 @@ typedef enum { const char *nm_utils_buf_utf8safe_escape(gconstpointer buf, gssize buflen, NMUtilsStrUtf8SafeFlags flags, - char ** to_free); + char **to_free); char * nm_utils_buf_utf8safe_escape_cp(gconstpointer buf, gssize buflen, NMUtilsStrUtf8SafeFlags flags); const char * nm_utils_buf_utf8safe_escape_bytes(GBytes *bytes, NMUtilsStrUtf8SafeFlags flags, char **to_free); -gconstpointer nm_utils_buf_utf8safe_unescape(const char * str, +gconstpointer nm_utils_buf_utf8safe_unescape(const char *str, NMUtilsStrUtf8SafeFlags flags, - gsize * out_len, - gpointer * to_free); + gsize *out_len, + gpointer *to_free); const char * nm_utils_str_utf8safe_escape(const char *str, NMUtilsStrUtf8SafeFlags flags, char **to_free); @@ -1634,8 +1632,8 @@ nm_g_variant_builder_add_sv(GVariantBuilder *builder, const char *key, GVariant static inline void nm_g_variant_builder_add_sv_bytearray(GVariantBuilder *builder, - const char * key, - const guint8 * arr, + const char *key, + const guint8 *arr, gsize len) { g_variant_builder_add(builder, "{sv}", key, nm_g_variant_new_ay(arr, len)); @@ -1660,15 +1658,16 @@ nm_g_source_destroy_and_unref(GSource *source) * will destroy the user-data of the callback right away (and not only * during the last g_source_unref()). * - * It also means, that if the user data itself has the reference to the - * source, then this will lead to crash: + * This means for example, if the user data itself has the reference to the + * source, then the following would lead to a crash: * * g_source_destroy(user_data->my_source); * // ups, user_data was destroyed (if source was attached). * g_source_unref(user_data->my_source); * - * nm_g_source_destroy_and_unref() and nm_clear_g_source_inst() does not - * suffer from this problem. */ + * nm_g_source_destroy_and_unref(user_data->my_source) and nm_clear_g_source_inst(&user_data->my_source) + * does not have this problem (of course, afterwards, user_data would be a dangling + * pointer). */ g_source_destroy(source); g_source_unref(source); } @@ -1960,12 +1959,12 @@ typedef struct { typedef struct { union { NMUtilsNamedEntry named_entry; - const char * name; - char * name_mutable; + const char *name; + char *name_mutable; }; union { const char *value_str; - char * value_str_mutable; + char *value_str_mutable; gpointer value_ptr; }; } NMUtilsNamedValue; @@ -1976,11 +1975,11 @@ typedef struct { } NMUtilsNamedValue * -nm_utils_named_values_from_strdict_full(GHashTable * hash, - guint * out_len, +nm_utils_named_values_from_strdict_full(GHashTable *hash, + guint *out_len, GCompareDataFunc compare_func, gpointer user_data, - NMUtilsNamedValue * provided_buffer, + NMUtilsNamedValue *provided_buffer, guint provided_buffer_len, NMUtilsNamedValue **out_allocated_buffer); @@ -1995,7 +1994,7 @@ nm_utils_named_values_from_strdict_full(GHashTable * hash, gssize nm_utils_named_value_list_find(const NMUtilsNamedValue *arr, gsize len, - const char * name, + const char *name, gboolean sorted); gboolean nm_utils_named_value_list_is_sorted(const NMUtilsNamedValue *arr, @@ -2013,15 +2012,15 @@ void nm_utils_named_value_clear_with_g_free(NMUtilsNamedValue *val); /*****************************************************************************/ -gpointer *nm_utils_hash_keys_to_array(GHashTable * hash, +gpointer *nm_utils_hash_keys_to_array(GHashTable *hash, GCompareDataFunc compare_func, gpointer user_data, - guint * out_len); + guint *out_len); -gpointer *nm_utils_hash_values_to_array(GHashTable * hash, +gpointer *nm_utils_hash_values_to_array(GHashTable *hash, GCompareDataFunc compare_func, gpointer user_data, - guint * out_len); + guint *out_len); static inline const char ** nm_strdict_get_keys(const GHashTable *hash, gboolean sorted, guint *out_length) @@ -2078,7 +2077,7 @@ const char **_nm_strv_dup_packed(const char *const *strv, gssize len); ({ \ const char *const *const _strv = NM_CAST_STRV_CC(strv); \ const gssize _len = (len); \ - const char ** _result = NULL; \ + const char **_result = NULL; \ const char ***const _to_free = (to_free); \ \ G_STATIC_ASSERT_EXPR((alloca_maxlen) <= 500u / sizeof(const char *)); \ @@ -2177,7 +2176,7 @@ nm_g_ptr_array_unref(GPtrArray *arr) #define nm_g_ptr_array_set(pdst, val) \ ({ \ GPtrArray **_pdst = (pdst); \ - GPtrArray * _val = (val); \ + GPtrArray *_val = (val); \ gboolean _changed = FALSE; \ \ nm_assert(_pdst); \ @@ -2194,7 +2193,7 @@ nm_g_ptr_array_unref(GPtrArray *arr) #define nm_g_ptr_array_set_take(pdst, val) \ ({ \ GPtrArray **_pdst = (pdst); \ - GPtrArray * _val = (val); \ + GPtrArray *_val = (val); \ gboolean _changed = FALSE; \ \ nm_assert(_pdst); \ @@ -2222,7 +2221,7 @@ nm_g_ptr_array_pdata(const GPtrArray *arr) return arr ? arr->pdata : NULL; } -GPtrArray *_nm_g_ptr_array_copy(GPtrArray * array, +GPtrArray *_nm_g_ptr_array_copy(GPtrArray *array, GCopyFunc func, gpointer user_data, GDestroyNotify element_free_func); @@ -2298,25 +2297,25 @@ nm_g_hash_table_remove(GHashTable *hash, gconstpointer key) /*****************************************************************************/ -gboolean nm_utils_ptrarray_is_sorted(gconstpointer * list, +gboolean nm_utils_ptrarray_is_sorted(gconstpointer *list, gsize len, gboolean require_strict, GCompareDataFunc cmpfcn, gpointer user_data); -gssize nm_utils_ptrarray_find_binary_search(gconstpointer * list, +gssize nm_utils_ptrarray_find_binary_search(gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data); -gssize nm_utils_ptrarray_find_binary_search_range(gconstpointer * list, +gssize nm_utils_ptrarray_find_binary_search_range(gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data, - gssize * out_idx_first, - gssize * out_idx_last); + gssize *out_idx_first, + gssize *out_idx_last); #define nm_strv_find_binary_search(strv, len, needle) \ ({ \ @@ -2546,12 +2545,12 @@ void _nm_utils_user_data_unpack(NMUtilsUserData *user_data, int nargs, ...); typedef void (*NMUtilsInvokeOnIdleCallback)(gpointer user_data, GCancellable *cancellable); -void nm_utils_invoke_on_idle(GCancellable * cancellable, +void nm_utils_invoke_on_idle(GCancellable *cancellable, NMUtilsInvokeOnIdleCallback callback, gpointer callback_user_data); void nm_utils_invoke_on_timeout(guint timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, NMUtilsInvokeOnIdleCallback callback, gpointer callback_user_data); @@ -2707,15 +2706,15 @@ char *nm_utils_bin2hexstr_full(gconstpointer addr, gsize length, char delimiter, gboolean upper_case, - char * out); + char *out); #define nm_utils_bin2hexstr_a(addr, length, delimiter, upper_case, str_to_free) \ ({ \ gconstpointer _addr = (addr); \ gsize _length = (length); \ char _delimiter = (delimiter); \ - char ** _str_to_free = (str_to_free); \ - char * _s; \ + char **_str_to_free = (str_to_free); \ + char *_s; \ gsize _s_len; \ \ nm_assert(_str_to_free); \ @@ -2748,9 +2747,9 @@ guint8 *nm_utils_hexstr2bin_full(const char *hexstr, gboolean hexdigit_pairs_required, const char *delimiter_candidates, gsize required_len, - guint8 * buffer, + guint8 *buffer, gsize buffer_len, - gsize * out_len); + gsize *out_len); #define nm_utils_hexstr2bin_buf(hexstr, \ allow_0x_prefix, \ @@ -2772,7 +2771,7 @@ guint8 *nm_utils_hexstr2bin_alloc(const char *hexstr, gboolean delimiter_required, const char *delimiter_candidates, gsize required_len, - gsize * out_len); + gsize *out_len); /** * _nm_utils_hwaddr_aton: @@ -2834,7 +2833,7 @@ static inline const char * _nm_utils_hwaddr_ntoa(gconstpointer addr, gsize addr_len, gboolean upper_case, - char * buf, + char *buf, gsize buf_len) { g_return_val_if_fail(addr, NULL); @@ -2952,7 +2951,7 @@ _nm_utils_hwaddr_ntoa(gconstpointer addr, static inline GTask * nm_g_task_new(gpointer source_object, - GCancellable * cancellable, + GCancellable *cancellable, gpointer source_tag, GAsyncReadyCallback callback, gpointer callback_data) @@ -3143,7 +3142,7 @@ nm_strvarray_remove_first(GArray *strv, const char *needle) /*****************************************************************************/ struct _NMVariantAttributeSpec { - char * name; + char *name; const GVariantType *type; bool v4 : 1; bool v6 : 1; @@ -3154,14 +3153,14 @@ struct _NMVariantAttributeSpec { typedef struct _NMVariantAttributeSpec NMVariantAttributeSpec; -void _nm_utils_format_variant_attributes_full(GString * str, - const NMUtilsNamedValue * values, +void _nm_utils_format_variant_attributes_full(GString *str, + const NMUtilsNamedValue *values, guint num_values, const NMVariantAttributeSpec *const *spec, char attr_separator, char key_value_separator); -char *_nm_utils_format_variant_attributes(GHashTable * attributes, +char *_nm_utils_format_variant_attributes(GHashTable *attributes, const NMVariantAttributeSpec *const *spec, char attr_separator, char key_value_separator); @@ -3172,7 +3171,7 @@ gboolean nm_utils_is_localhost(const char *name); gboolean nm_utils_is_specific_hostname(const char *name); -char * nm_utils_uid_to_name(uid_t uid); +char *nm_utils_uid_to_name(uid_t uid); gboolean nm_utils_name_to_uid(const char *name, uid_t *out_uid); /*****************************************************************************/ @@ -3183,8 +3182,8 @@ double nm_utils_exp10(gint16 e); gboolean _nm_utils_is_empty_ssid_arr(const guint8 *ssid, gsize len); gboolean _nm_utils_is_empty_ssid_gbytes(GBytes *ssid); -char * _nm_utils_ssid_to_string_arr(const guint8 *ssid, gsize len); -char * _nm_utils_ssid_to_string_gbytes(GBytes *ssid); +char *_nm_utils_ssid_to_string_arr(const guint8 *ssid, gsize len); +char *_nm_utils_ssid_to_string_gbytes(GBytes *ssid); /*****************************************************************************/ @@ -3207,7 +3206,7 @@ void nm_crypto_md5_hash(const guint8 *salt, gsize salt_len, const guint8 *password, gsize password_len, - guint8 * buffer, + guint8 *buffer, gsize buflen); /*****************************************************************************/ diff --git a/src/libnm-glib-aux/nm-str-buf.h b/src/libnm-glib-aux/nm-str-buf.h index 7a7f580c..47d1f055 100644 --- a/src/libnm-glib-aux/nm-str-buf.h +++ b/src/libnm-glib-aux/nm-str-buf.h @@ -348,7 +348,7 @@ nm_utils_escaped_tokens_escape_strbuf(const char *str, const char *delimiters, N static inline void nm_utils_escaped_tokens_escape_strbuf_assert(const char *str, const char *delimiters, - NMStrBuf * strbuf) + NMStrBuf *strbuf) { nm_str_buf_append(strbuf, nm_utils_escaped_tokens_escape_unnecessary(str, delimiters)); } diff --git a/src/libnm-glib-aux/nm-test-utils.h b/src/libnm-glib-aux/nm-test-utils.h index 253aaf0e..caf43d5f 100644 --- a/src/libnm-glib-aux/nm-test-utils.h +++ b/src/libnm-glib-aux/nm-test-utils.h @@ -104,7 +104,7 @@ #define nmtst_assert_error(error, expect_error_domain, expect_error_code, expect_error_pattern) \ G_STMT_START \ { \ - GError * _error = (error); \ + GError *_error = (error); \ GQuark _expect_error_domain = (expect_error_domain); \ const char *_expect_error_pattern = (expect_error_pattern); \ \ @@ -182,6 +182,23 @@ } \ G_STMT_END +#define nmtst_assert_strv(strv, ...) \ + G_STMT_START \ + { \ + const char *const *const _strv = (strv); \ + const char *const _exp[] = {__VA_ARGS__, NULL}; \ + const gsize _n = G_N_ELEMENTS(_exp) - 1; \ + gsize _i; \ + \ + g_assert(_n == NM_NARG(__VA_ARGS__)); \ + g_assert(_strv); \ + for (_i = 0; _i < _n; _i++) { \ + g_assert(_exp[_i]); \ + g_assert_cmpstr(_strv[_i], ==, _exp[_i]); \ + } \ + } \ + G_STMT_END + /*****************************************************************************/ /* Our nm-error error numbers use negative values to signal failure. @@ -204,16 +221,16 @@ /*****************************************************************************/ struct __nmtst_internal { - GRand * rand0; + GRand *rand0; guint32 rand_seed; - GRand * rand; + GRand *rand; gboolean is_debug; gboolean assert_logging; gboolean no_expect_message; gboolean test_quick; gboolean test_tap_log; - char * sudo_cmd; - char ** orig_argv; + char *sudo_cmd; + char **orig_argv; }; extern struct __nmtst_internal __nmtst_internal; @@ -255,7 +272,7 @@ static inline char ** nmtst_str_split(char *str, const char *delimiters) { const char *d; - GArray * result = g_array_sized_new(TRUE, FALSE, sizeof(char *), 3); + GArray *result = g_array_sized_new(TRUE, FALSE, sizeof(char *), 3); g_assert(str); g_assert(delimiters && !strchr(delimiters, '\\')); @@ -312,35 +329,35 @@ nmtst_free(void) } static inline void -_nmtst_log_handler(const char * log_domain, +_nmtst_log_handler(const char *log_domain, GLogLevelFlags log_level, - const char * message, + const char *message, gpointer user_data) { g_print("%s\n", message); } static inline void -__nmtst_init(int * argc, - char *** argv, +__nmtst_init(int *argc, + char ***argv, gboolean assert_logging, const char *log_level, const char *log_domains, - gboolean * out_set_logging) -{ - const char * nmtst_debug; - gboolean is_debug = FALSE; - char * c_log_level = NULL, *c_log_domains = NULL; - char * sudo_cmd = NULL; - GArray * debug_messages = g_array_new(TRUE, FALSE, sizeof(char *)); - int i; - gboolean no_expect_message = FALSE; - gboolean _out_set_logging; - gboolean test_quick = FALSE; - gboolean test_quick_set = FALSE; - gboolean test_quick_argv = FALSE; - gs_unref_ptrarray GPtrArray *p_tests = NULL; - gs_unref_ptrarray GPtrArray *s_tests = NULL; + gboolean *out_set_logging) +{ + const char *nmtst_debug; + gboolean is_debug = FALSE; + char *c_log_level = NULL, *c_log_domains = NULL; + char *sudo_cmd = NULL; + GArray *debug_messages = g_array_new(TRUE, FALSE, sizeof(char *)); + int i; + gboolean no_expect_message = FALSE; + gboolean _out_set_logging; + gboolean test_quick = FALSE; + gboolean test_quick_set = FALSE; + gboolean test_quick_argv = FALSE; + gs_unref_ptrarray GPtrArray *p_tests = NULL; + gs_unref_ptrarray GPtrArray *s_tests = NULL; if (!out_set_logging) out_set_logging = &_out_set_logging; @@ -471,10 +488,10 @@ __nmtst_init(int * argc, /* g_test_init() sets g_log_set_always_fatal() for G_LOG_LEVEL_WARNING * and G_LOG_LEVEL_CRITICAL. So, beware that the test will fail if you * have any WARN or ERR log messages -- unless you g_test_expect_message(). */ - GPtrArray * arg_array = g_ptr_array_new(); + GPtrArray *arg_array = g_ptr_array_new(); gs_free char **arg_array_c = NULL; int arg_array_n, j; - static char ** s_tests_x, **p_tests_x; + static char **s_tests_x, **p_tests_x; if (*argc) { for (i = 0; i < *argc; i++) @@ -628,7 +645,7 @@ __nmtst_init(int * argc, * add "/bin" and "/sbin" to $PATH for all tests. */ { static char *path_new; - const char * path_old; + const char *path_old; g_assert(!path_new); @@ -692,6 +709,17 @@ nmtst_test_quick(void) return __nmtst_internal.test_quick; } +static inline gboolean +nmtst_test_skip_slow(void) +{ + if (!nmtst_test_quick()) + return FALSE; + + g_print("Skipping test: don't run long running test %s (NMTST_DEBUG=slow)\n", g_get_prgname()); + g_test_skip("Skip long running test"); + return TRUE; +} + #if GLIB_CHECK_VERSION(2, 34, 0) #undef g_test_expect_message #define g_test_expect_message(...) \ @@ -747,10 +775,10 @@ typedef void (*NmtstTestHandler)(const NmtstTestData *test_data); struct _NmtstTestData { union { const char *testpath; - char * _testpath; + char *_testpath; }; gsize n_args; - gpointer * args; + gpointer *args; NmtstTestHandler _func_setup; GTestDataFunc _func_test; NmtstTestHandler _func_teardown; @@ -804,7 +832,7 @@ _nmtst_test_run(gconstpointer data) } static inline void -_nmtst_add_test_func_full(const char * testpath, +_nmtst_add_test_func_full(const char *testpath, GTestDataFunc func_test, NmtstTestHandler func_setup, NmtstTestHandler func_teardown, @@ -874,7 +902,7 @@ nmtst_get_rand(void) g_rand_set_seed(__nmtst_internal.rand, seed); } else { /* NMTST_SEED_RAND is set. Use it as a seed. */ - char * s; + char *s; gint64 i; i = g_ascii_strtoll(str, &s, 0); @@ -1067,7 +1095,7 @@ nmtst_stable_rand(guint64 seed, gpointer buf, gsize len) { const guint64 C = 1442695040888963407llu; const guint64 A = 6364136223846793005llu; - guint8 * b; + guint8 *b; union { guint8 a[sizeof(guint64)]; guint64 n; @@ -1203,7 +1231,7 @@ static inline gboolean nmtst_main_loop_run(GMainLoop *loop, guint timeout_msec) { nm_auto_unref_gsource GSource *source = NULL; - GMainLoop * loopx = loop; + GMainLoop *loopx = loop; if (timeout_msec > 0) { source = g_timeout_source_new(timeout_msec); @@ -1244,7 +1272,7 @@ _nmtst_main_loop_quit_on_notify(GObject *object, GParamSpec *pspec, gpointer use ({ \ nm_auto_destroy_and_unref_gsource GSource *_source_timeout = NULL; \ nm_auto_destroy_and_unref_gsource GSource *_source_poll = NULL; \ - GMainContext * _context = (context); \ + GMainContext *_context = (context); \ gboolean _had_timeout = FALSE; \ typeof(timeout_msec) _timeout_msec0 = (timeout_msec); \ typeof(poll_msec) _poll_msec0 = (poll_msec); \ @@ -1319,7 +1347,7 @@ nmtst_main_context_assert_no_dispatch(GMainContext *context, guint timeout_msec) typedef struct { GMainLoop *_main_loop; union { - GSList * _list; + GSList *_list; const void *const is_waiting; }; } NMTstContextBusyWatcherData; @@ -1328,7 +1356,7 @@ static inline void _nmtst_context_busy_watcher_add_cb(gpointer data, GObject *where_the_object_was) { NMTstContextBusyWatcherData *watcher_data = data; - GSList * l; + GSList *l; g_assert(watcher_data); @@ -1389,7 +1417,7 @@ nmtst_get_sudo_cmd(void) static inline void nmtst_reexec_sudo(void) { - char * str; + char *str; char **argv; int i; int errsv; @@ -1426,7 +1454,7 @@ nmtst_find_all_indexes(gpointer *elements, gsize n_needles, gboolean (*equal_fcn)(gpointer element, gpointer needle, gpointer user_data), gpointer user_data, - gssize * out_idx) + gssize *out_idx) { gsize i, j, k; gsize found = 0; @@ -1489,13 +1517,13 @@ __define_nmtst_static(01, 1024) __define_nmtst_static(02, 1024) __define_nmtst_s #if defined(__NM_UTILS_H__) || defined(NM_UTILS_H) #define NMTST_UUID_INIT(uuid) \ - gs_free char * _nmtst_hidden_##uuid = nm_utils_uuid_generate(); \ + gs_free char *_nmtst_hidden_##uuid = nm_utils_uuid_generate(); \ const char *const uuid = _nmtst_hidden_##uuid static inline const char *nmtst_uuid_generate(void) { static _nm_thread_local char u[37]; - gs_free char * m = NULL; + gs_free char *m = NULL; m = nm_utils_uuid_generate(); g_assert(m && strlen(m) == sizeof(u) - 1); @@ -1609,10 +1637,10 @@ _nmtst_assert_ip4_address(const char *file, int line, in_addr_t addr, const char _nmtst_assert_ip4_address(__FILE__, __LINE__, addr, str_expected) static inline void -_nmtst_assert_ip6_address(const char * file, +_nmtst_assert_ip6_address(const char *file, int line, const struct in6_addr *addr, - const char * str_expected) + const char *str_expected) { struct in6_addr any = in6addr_any; @@ -1650,20 +1678,20 @@ _nmtst_assert_ip6_address(const char * file, ##__VA_ARGS__, \ NULL) static inline int __nmtst_spawn_sync(const char *working_directory, - char ** standard_out, - char ** standard_err, + char **standard_out, + char **standard_err, int assert_exit_status, ...) G_GNUC_NULL_TERMINATED; static inline int __nmtst_spawn_sync(const char *working_directory, - char ** standard_out, - char ** standard_err, + char **standard_out, + char **standard_err, int assert_exit_status, ...) { int exit_status = 0; - GError * error = NULL; - char * arg; + GError *error = NULL; + char *arg; va_list va_args; GPtrArray *argv = g_ptr_array_new(); gboolean success; @@ -1724,9 +1752,9 @@ nmtst_file_resolve_relative_path(const char *rel, const char *cwd) static inline char * nmtst_file_get_contents(const char *filename) { - GError * error = NULL; + GError *error = NULL; gboolean success; - char * contents = NULL; + char *contents = NULL; gsize len; success = g_file_get_contents(filename, &contents, &len, &error); @@ -1738,7 +1766,7 @@ nmtst_file_get_contents(const char *filename) #define nmtst_file_set_contents_size(filename, content, size) \ G_STMT_START \ { \ - GError * _error = NULL; \ + GError *_error = NULL; \ gboolean _success; \ const char *_content = (content); \ gssize _size = (size); \ @@ -1924,9 +1952,9 @@ nmtst_setting_ip_config_add_address(NMSettingIPConfig *s_ip, const char *address static inline void nmtst_setting_ip_config_add_route(NMSettingIPConfig *s_ip, - const char * dest, + const char *dest, guint prefix, - const char * next_hop, + const char *next_hop, gint64 metric) { NMIPRoute *route; @@ -2030,15 +2058,15 @@ nmtst_clone_connection(NMConnection *connection) } static inline NMConnection * -nmtst_create_minimal_connection(const char * id, - const char * uuid, - const char * type, +nmtst_create_minimal_connection(const char *id, + const char *uuid, + const char *type, NMSettingConnection **out_s_con) { - NMConnection * con; - NMSetting * s_base = NULL; + NMConnection *con; + NMSetting *s_base = NULL; NMSettingConnection *s_con; - gs_free char * uuid_free = NULL; + gs_free char *uuid_free = NULL; g_assert(id); @@ -2095,7 +2123,7 @@ nmtst_create_minimal_connection(const char * id, static inline gboolean _nmtst_connection_normalize_v(NMConnection *connection, va_list args) { - GError * error = NULL; + GError *error = NULL; gboolean success; gboolean was_modified = FALSE; GHashTable *parameters = NULL; @@ -2156,10 +2184,10 @@ nmtst_assert_connection_equals(NMConnection *a, NMConnection *b, gboolean normalize_b) { - gboolean compare; + gboolean compare; gs_unref_object NMConnection *a2 = NULL; gs_unref_object NMConnection *b2 = NULL; - GHashTable * out_settings = NULL; + GHashTable *out_settings = NULL; g_assert(NM_IS_CONNECTION(a)); g_assert(NM_IS_CONNECTION(b)); @@ -2171,8 +2199,8 @@ nmtst_assert_connection_equals(NMConnection *a, compare = nm_connection_diff(a, b, NM_SETTING_COMPARE_FLAG_EXACT, &out_settings); if (!compare || out_settings) { - const char * name, *pname; - GHashTable * setting; + const char *name, *pname; + GHashTable *setting; GHashTableIter iter, iter2; __NMTST_LOG(g_message, ">>> ASSERTION nmtst_assert_connection_equals() fails"); @@ -2190,7 +2218,7 @@ nmtst_assert_connection_equals(NMConnection *a, #ifdef __NM_KEYFILE_INTERNAL_H__ { nm_auto_unref_keyfile GKeyFile *kf_a = NULL, *kf_b = NULL; - gs_free char * str_a = NULL, *str_b = NULL; + gs_free char *str_a = NULL, *str_b = NULL; kf_a = nm_keyfile_write(a, NM_KEYFILE_HANDLER_FLAGS_NONE, NULL, NULL, NULL); kf_b = nm_keyfile_write(b, NM_KEYFILE_HANDLER_FLAGS_NONE, NULL, NULL, NULL); @@ -2222,7 +2250,7 @@ static inline void nmtst_assert_connection_verifies(NMConnection *con) { /* assert that the connection does verify, it might be normaliziable or not */ - GError * error = NULL; + GError *error = NULL; gboolean success; g_assert(NM_IS_CONNECTION(con)); @@ -2236,10 +2264,10 @@ static inline void nmtst_assert_connection_verifies_without_normalization(NMConnection *con) { /* assert that the connection verifies and does not need any normalization */ - GError * error = NULL; - gboolean success; - gboolean was_modified = FALSE; - gs_unref_object NMConnection *clone = NULL; + GError *error = NULL; + gboolean success; + gboolean was_modified = FALSE; + gs_unref_object NMConnection *clone = NULL; clone = nmtst_clone_connection(con); @@ -2256,10 +2284,10 @@ static inline void nmtst_assert_connection_verifies_and_normalizable(NMConnection *con) { /* assert that the connection does verify, but normalization still modifies it */ - GError * error = NULL; - gboolean success; - gboolean was_modified = FALSE; - gs_unref_object NMConnection *clone = NULL; + GError *error = NULL; + gboolean success; + gboolean was_modified = FALSE; + gs_unref_object NMConnection *clone = NULL; clone = nmtst_clone_connection(con); @@ -2280,10 +2308,10 @@ nmtst_assert_connection_verifies_after_normalization(NMConnection *con, int expect_error_code) { /* assert that the connection does not verify, but normalization does fix it */ - GError * error = NULL; - gboolean success; - gboolean was_modified = FALSE; - gs_unref_object NMConnection *clone = NULL; + GError *error = NULL; + gboolean success; + gboolean was_modified = FALSE; + gs_unref_object NMConnection *clone = NULL; clone = nmtst_clone_connection(con); @@ -2308,10 +2336,10 @@ nmtst_assert_connection_unnormalizable(NMConnection *con, { /* assert that the connection does not verify, and it cannot be fixed by normalization */ - GError * error = NULL; - gboolean success; - gboolean was_modified = FALSE; - gs_unref_object NMConnection *clone = NULL; + GError *error = NULL; + gboolean success; + gboolean was_modified = FALSE; + gs_unref_object NMConnection *clone = NULL; clone = nmtst_clone_connection(con); @@ -2333,7 +2361,7 @@ nmtst_assert_setting_verifies(NMSetting *setting) { /* assert that the setting verifies without an error */ - GError * error = NULL; + GError *error = NULL; gboolean success; g_assert(NM_IS_SETTING(setting)); @@ -2351,12 +2379,12 @@ _nmtst_assert_connection_has_settings(NMConnection *connection, gboolean has_at_most, ...) { - gs_unref_hashtable GHashTable *names = NULL; - gs_free NMSetting **settings = NULL; - va_list ap; - const char * name; - guint i, len; - gs_unref_ptrarray GPtrArray *names_arr = NULL; + gs_unref_hashtable GHashTable *names = NULL; + gs_free NMSetting **settings = NULL; + va_list ap; + const char *name; + guint i, len; + gs_unref_ptrarray GPtrArray *names_arr = NULL; g_assert(NM_IS_CONNECTION(connection)); @@ -2382,9 +2410,9 @@ _nmtst_assert_connection_has_settings(NMConnection *connection, } } if (g_hash_table_size(names) > 0 && has_at_least) { - gs_free char * expected_str = g_strjoinv(" ", (char **) names_arr->pdata); + gs_free char *expected_str = g_strjoinv(" ", (char **) names_arr->pdata); gs_free const char **settings_names = NULL; - gs_free char * has_str = NULL; + gs_free char *has_str = NULL; settings_names = g_new0(const char *, len + 1); for (i = 0; i < len; i++) @@ -2413,7 +2441,7 @@ nmtst_assert_setting_verify_fails(NMSetting *setting, { /* assert that the setting verification fails */ - GError * error = NULL; + GError *error = NULL; gboolean success; g_assert(NM_IS_SETTING(setting)); @@ -2452,7 +2480,7 @@ nmtst_assert_setting_is_equal(gconstpointer /* const NMSetting * */ a, static inline NMSetting * nmtst_assert_setting_dbus_new(GType gtype, GVariant *variant) { - NMSetting * setting; + NMSetting *setting; gs_free_error GError *error = NULL; g_assert(g_type_is_a(gtype, NM_TYPE_SETTING)); @@ -2484,8 +2512,8 @@ nmtst_assert_setting_dbus_roundtrip(gconstpointer /* const NMSetting * */ settin static inline void nmtst_assert_hwaddr_equals(gconstpointer hwaddr1, gssize hwaddr1_len, - const char * expected, - const char * file, + const char *expected, + const char *file, int line) { guint8 buf2[NM_UTILS_HWADDR_LEN_MAX]; @@ -2531,11 +2559,11 @@ static inline NMConnection * nmtst_create_connection_from_keyfile(const char *keyfile_str, const char *full_filename) { nm_auto_unref_keyfile GKeyFile *keyfile = NULL; - gs_free_error GError *error = NULL; - gboolean success; - NMConnection * con; - gs_free char * filename = g_path_get_basename(full_filename); - gs_free char * base_dir = g_path_get_dirname(full_filename); + gs_free_error GError *error = NULL; + gboolean success; + NMConnection *con; + gs_free char *filename = g_path_get_basename(full_filename); + gs_free char *base_dir = g_path_get_dirname(full_filename); g_assert(keyfile_str); g_assert(full_filename && full_filename[0] == '/'); @@ -2568,8 +2596,8 @@ _nmtst_variant_new_vardict(int dummy, ...) { GVariantBuilder builder; va_list ap; - const char * name; - GVariant * variant; + const char *name; + GVariant *variant; g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); @@ -2608,7 +2636,7 @@ _nmtst_variant_new_vardict(int dummy, ...) G_STMT_START \ { \ gsize _l; \ - GVariant * _variant = (variant); \ + GVariant *_variant = (variant); \ const char *_str = (str); \ \ nmtst_assert_variant_is_of_type(_variant, G_VARIANT_TYPE_STRING); \ @@ -2625,8 +2653,8 @@ _nmtst_variant_new_vardict(int dummy, ...) if (memcmp(_ptr2, _ptr, _len) != 0) { \ gs_free char *_x1 = NULL; \ gs_free char *_x2 = NULL; \ - const char * _xx1; \ - const char * _xx2; \ + const char *_xx1; \ + const char *_xx2; \ \ _xx1 = nm_utils_buf_utf8safe_escape(_ptr, \ _len, \ @@ -2650,7 +2678,7 @@ _nmtst_variant_new_vardict(int dummy, ...) #define nmtst_assert_variant_bytestring(variant, ptr, len) \ G_STMT_START \ { \ - GVariant * _variant = (variant); \ + GVariant *_variant = (variant); \ gconstpointer _ptr = (ptr); \ gconstpointer _ptr2; \ gsize _len = (len); \ @@ -2677,8 +2705,8 @@ typedef enum { { \ GVariantIter __connection_iter, *__setting_iter; \ GVariantBuilder __connection_builder, __setting_builder; \ - const char * __cur_setting_name, *__cur_property_name; \ - GVariant * __property_val; \ + const char *__cur_setting_name, *__cur_property_name; \ + GVariant *__property_val; \ NmtstVariantEditorPhase __phase; \ \ g_variant_builder_init(&__connection_builder, NM_VARIANT_TYPE_CONNECTION); \ @@ -2790,7 +2818,7 @@ static inline GVariant * nmtst_variant_from_string(const GVariantType *variant_type, const char *variant_str) { GVariant *variant; - GError * error = NULL; + GError *error = NULL; g_assert(variant_type); g_assert(variant_str); @@ -2805,13 +2833,13 @@ nmtst_variant_from_string(const GVariantType *variant_type, const char *variant_ static inline void nmtst_keyfile_assert_data(GKeyFile *kf, const char *data, gssize data_len) { - nm_auto_unref_keyfile GKeyFile *kf2 = NULL; - gs_free_error GError *error = NULL; - gs_free char * d1 = NULL; - gs_free char * d2 = NULL; - gboolean success; - gsize d1_len; - gsize d2_len; + nm_auto_unref_keyfile GKeyFile *kf2 = NULL; + gs_free_error GError *error = NULL; + gs_free char *d1 = NULL; + gs_free char *d2 = NULL; + gboolean success; + gsize d1_len; + gsize d2_len; g_assert(kf); g_assert(data || data_len == 0); @@ -2843,7 +2871,7 @@ nmtst_keyfile_assert_data(GKeyFile *kf, const char *data, gssize data_len) static inline gssize nmtst_keyfile_get_num_keys(GKeyFile *keyfile, const char *group_name) { - gs_strfreev char **keys = NULL; + gs_strfreev char **keys = NULL; gs_free_error GError *error = NULL; gsize l = 0; @@ -2871,7 +2899,7 @@ nmtst_ip_address_new(int addr_family, const char *str) { NMIPAddr addr; int plen; - GError * error = NULL; + GError *error = NULL; NMIPAddress *a; if (!nm_utils_parse_inaddr_prefix_bin(addr_family, str, &addr_family, &addr, &plen)) diff --git a/src/libnm-glib-aux/nm-uuid.c b/src/libnm-glib-aux/nm-uuid.c index e7f67c70..19b09667 100644 --- a/src/libnm-glib-aux/nm-uuid.c +++ b/src/libnm-glib-aux/nm-uuid.c @@ -45,7 +45,7 @@ gboolean nm_uuid_parse_full(const char *str, NMUuid *out_uuid, gboolean *out_is_normalized) { NMUuid uuid; - guint8 * p; + guint8 *p; int i; gboolean is_normalized = TRUE; @@ -194,8 +194,8 @@ nm_uuid_is_valid_nmlegacy(const char *str) gboolean nm_uuid_is_valid_nm(const char *str, - gboolean * out_normalized, - char * out_normalized_str /* [static 37] */) + gboolean *out_normalized, + char *out_normalized_str /* [static 37] */) { NMUuid uuid; gboolean is_normalized; @@ -310,8 +310,8 @@ nm_uuid_generate_random_str(char buf[static 37]) * Returns: the input @uuid. This function cannot fail. **/ NMUuid * -nm_uuid_generate_from_string(NMUuid * uuid, - const char * s, +nm_uuid_generate_from_string(NMUuid *uuid, + const char *s, gssize slen, NMUuidType uuid_type, const NMUuid *type_args) @@ -382,14 +382,20 @@ nm_uuid_generate_from_string(NMUuid * uuid, * object's #NMSettingConnection:id: property **/ char * -nm_uuid_generate_from_string_str(const char * s, +nm_uuid_generate_from_string_str(const char *s, gssize slen, NMUuidType uuid_type, const NMUuid *type_args) { - NMUuid uuid; + NMUuid uuid; + const NMUuid *u; + + u = nm_uuid_generate_from_string(&uuid, s, slen, uuid_type, type_args); + + if (G_UNLIKELY(!u)) + return nm_assert_unreachable_val(NULL); + nm_assert(u == &uuid); - nm_uuid_generate_from_string(&uuid, s, slen, uuid_type, type_args); return nm_uuid_unparse(&uuid, g_new(char, 37)); } @@ -415,7 +421,7 @@ nm_uuid_generate_from_strings(const char *string1, ...) { nm_auto_str_buf NMStrBuf str = NM_STR_BUF_INIT(NM_UTILS_GET_NEXT_REALLOC_SIZE_104, FALSE); va_list args; - const char * s; + const char *s; nm_str_buf_append_len(&str, string1, strlen(string1) + 1u); diff --git a/src/libnm-glib-aux/nm-uuid.h b/src/libnm-glib-aux/nm-uuid.h index 504ec789..15b03a2d 100644 --- a/src/libnm-glib-aux/nm-uuid.h +++ b/src/libnm-glib-aux/nm-uuid.h @@ -76,8 +76,8 @@ nm_uuid_is_normalized(const char *str) gboolean nm_uuid_is_valid_nmlegacy(const char *str); gboolean nm_uuid_is_valid_nm(const char *str, - gboolean * out_normalized, - char * out_normalized_str /* [static 37] */); + gboolean *out_normalized, + char *out_normalized_str /* [static 37] */); /*****************************************************************************/ @@ -109,13 +109,13 @@ typedef enum { NM_UUID_TYPE_VERSION5 = 5, } NMUuidType; -NMUuid *nm_uuid_generate_from_string(NMUuid * uuid, - const char * s, +NMUuid *nm_uuid_generate_from_string(NMUuid *uuid, + const char *s, gssize slen, NMUuidType uuid_type, const NMUuid *type_args); -char *nm_uuid_generate_from_string_str(const char * s, +char *nm_uuid_generate_from_string_str(const char *s, gssize slen, NMUuidType uuid_type, const NMUuid *type_args); diff --git a/src/libnm-glib-aux/nm-value-type.h b/src/libnm-glib-aux/nm-value-type.h index 0addeec6..d774e120 100644 --- a/src/libnm-glib-aux/nm-value-type.h +++ b/src/libnm-glib-aux/nm-value-type.h @@ -44,7 +44,7 @@ typedef union { /* for convenience, also let the union contain other pointer types. These are * for NM_VALUE_TYPE_UNSPEC. */ - gconstpointer * v_ptr; + gconstpointer *v_ptr; const GPtrArray *v_ptrarray; } NMValueTypUnion; @@ -181,7 +181,7 @@ nm_value_type_copy(NMValueType value_type, gpointer dst, gconstpointer src) static inline void nm_value_type_get_from_variant(NMValueType value_type, gpointer dst, - GVariant * variant, + GVariant *variant, gboolean clone) { switch (value_type) { @@ -230,7 +230,7 @@ nm_value_type_get_from_variant(NMValueType value_type, static inline GVariant * nm_value_type_to_variant(NMValueType value_type, gconstpointer src) { - const char * v_string; + const char *v_string; const GBytes *v_bytes; switch (value_type) { diff --git a/src/libnm-glib-aux/tests/test-json-aux.c b/src/libnm-glib-aux/tests/test-json-aux.c index 5f33f4fe..32462a29 100644 --- a/src/libnm-glib-aux/tests/test-json-aux.c +++ b/src/libnm-glib-aux/tests/test-json-aux.c @@ -13,7 +13,7 @@ static void test_jansson(void) { - const NMJsonVt * vt; + const NMJsonVt *vt; nm_auto_decref_json nm_json_t *js1 = NULL; nm_auto_decref_json nm_json_t *js2 = NULL; diff --git a/src/libnm-glib-aux/tests/test-shared-general.c b/src/libnm-glib-aux/tests/test-shared-general.c index 9674f228..ecba02e0 100644 --- a/src/libnm-glib-aux/tests/test-shared-general.c +++ b/src/libnm-glib-aux/tests/test-shared-general.c @@ -35,7 +35,7 @@ test_nm_static_assert(void) { int v1[NM_STATIC_ASSERT_EXPR_1(1)]; typeof(NM_STATIC_ASSERT_EXPR_1(1)) v_int; - int * p_int; + int *p_int; G_STATIC_ASSERT(sizeof(v1) == sizeof(int)); G_STATIC_ASSERT(NM_STATIC_ASSERT_EXPR_1(1) == 1); @@ -218,7 +218,7 @@ test_nm_strndup_a(void) { gs_free char *dup_free = NULL; - const char * dup; + const char *dup; l = strlen(input) + 1; dup = nm_strndup_a(10, input, l - 1, &dup_free); @@ -231,7 +231,7 @@ test_nm_strndup_a(void) { gs_free char *dup_free = NULL; - const char * dup; + const char *dup; l = nmtst_get_rand_uint32() % 23; dup = nm_strndup_a(10, input, l, &dup_free); @@ -321,10 +321,10 @@ test_unaligned(void) /*****************************************************************************/ static void -_strv_cmp_fuzz_input(const char *const * in, +_strv_cmp_fuzz_input(const char *const *in, gssize l, - const char *** out_strv_free_shallow, - char *** out_strv_free_deep, + const char ***out_strv_free_shallow, + char ***out_strv_free_deep, const char *const **out_s1, const char *const **out_s2) { @@ -402,12 +402,12 @@ test_strv_cmp(void) { \ gssize _l1 = (l1); \ gssize _l2 = (l2); \ - const char *const * _a1; \ - const char *const * _a2; \ - const char *const * _a1x; \ - const char *const * _a2x; \ - char ** _a1_free_deep = NULL; \ - char ** _a2_free_deep = NULL; \ + const char *const *_a1; \ + const char *const *_a2; \ + const char *const *_a1x; \ + const char *const *_a2x; \ + char **_a1_free_deep = NULL; \ + char **_a2_free_deep = NULL; \ gs_free const char **_a1_free_shallow = NULL; \ gs_free const char **_a2_free_shallow = NULL; \ int _c1, _c2; \ @@ -468,8 +468,8 @@ _do_strstrip_avoid_copy(const char *str) gs_free char *str2 = g_strdup(str); gs_free char *str3 = NULL; gs_free char *str4 = NULL; - const char * s3; - const char * s4; + const char *s3; + const char *s4; if (str1) g_strstrip(str1); @@ -528,11 +528,11 @@ test_nm_utils_bin2hexstr(void) gboolean upper_case = nmtst_get_rand_bool(); gboolean hexdigit_pairs_mangled; gsize expected_strlen; - char * str_hex; + char *str_hex; gsize required_len; gboolean outlen_set; gsize outlen; - guint8 * bin2; + guint8 *bin2; guint i, j; nmtst_rand_buf(NULL, buf, len); @@ -647,15 +647,22 @@ static void test_nm_ref_string(void) { nm_auto_ref_string NMRefString *s1 = NULL; - NMRefString * s2; + NMRefString *s2; g_assert(NULL == NM_REF_STRING_UPCAST(NULL)); + g_assert(nm_ref_string_equal_str(NULL, NULL)); + g_assert(!nm_ref_string_equal_str(NULL, "")); + g_assert(!nm_ref_string_equal_str(NULL, "a")); s1 = nm_ref_string_new("hallo"); g_assert(s1); g_assert_cmpstr(s1->str, ==, "hallo"); g_assert_cmpint(s1->len, ==, strlen("hallo")); g_assert(s1 == NM_REF_STRING_UPCAST(s1->str)); + g_assert(nm_ref_string_equal_str(s1, "hallo")); + g_assert(!nm_ref_string_equal_str(s1, "hallox")); + g_assert(!nm_ref_string_equal_str(s1, "hall")); + g_assert(!nm_ref_string_equal_str(s1, NULL)); s2 = nm_ref_string_new("hallo"); g_assert(s2 == s1); @@ -672,6 +679,7 @@ test_nm_ref_string(void) g_assert_cmpint(s2->len, ==, NM_STRLEN(STR_WITH_NUL)); g_assert_cmpint(s2->len, >, strlen(s2->str)); g_assert_cmpmem(s2->str, s2->len, STR_WITH_NUL, NM_STRLEN(STR_WITH_NUL)); + g_assert(!nm_ref_string_equal_str(s2, "hallo")); g_assert(s2->str[s2->len] == '\0'); nm_ref_string_unref(s2); } @@ -909,8 +917,8 @@ test_nm_str_buf(void) guint i_run; for (i_run = 0; TRUE; i_run++) { - nm_auto_str_buf NMStrBuf strbuf = {}; - nm_auto_free_gstring GString *gstr = NULL; + nm_auto_str_buf NMStrBuf strbuf = {}; + nm_auto_free_gstring GString *gstr = NULL; int i, j, k; int c; @@ -1102,7 +1110,7 @@ test_strv_dup_packed(void) for (i_run = 0; i_run < 500; i_run++) { const int strv_len = nmtst_get_rand_word_length(NULL); gs_free const char **strv_cpy = NULL; - const char *const * strv_src; + const char *const *strv_src; int i, j; g_ptr_array_set_size(src, 0); diff --git a/src/libnm-log-core/nm-logging.c b/src/libnm-log-core/nm-logging.c index 6d2c085e..f464ef29 100644 --- a/src/libnm-log-core/nm-logging.c +++ b/src/libnm-log-core/nm-logging.c @@ -257,7 +257,7 @@ match_log_level(const char *level, NMLogLevel *out_level, GError **error) gboolean nm_logging_setup(const char *level, const char *domains, char **bad_domains, GError **error) { - GString * unrecognized = NULL; + GString *unrecognized = NULL; NMLogDomain cur_log_state[_LOGL_N_REAL]; NMLogDomain new_log_state[_LOGL_N_REAL]; NMLogLevel cur_log_level; @@ -266,7 +266,7 @@ nm_logging_setup(const char *level, const char *domains, char **bad_domains, GEr gsize i_d; int i; gboolean had_platform_debug; - gs_free char * domains_free = NULL; + gs_free char *domains_free = NULL; NM_ASSERT_ON_MAIN_THREAD(); @@ -298,8 +298,8 @@ nm_logging_setup(const char *level, const char *domains, char **bad_domains, GEr domains_v = nm_strsplit_set(domains, ", "); for (i_d = 0; domains_v && domains_v[i_d]; i_d++) { - const char * s = domains_v[i_d]; - const char * p; + const char *s = domains_v[i_d]; + const char *p; const LogDesc *diter; NMLogLevel domain_log_level; NMLogDomain bits; @@ -517,7 +517,7 @@ again: static gsize once = 0; const LogDesc *diter; gsize buf_l; - char * buf_p; + char *buf_p; if (!g_once_init_enter(&once)) goto again; @@ -603,12 +603,12 @@ _iovec_set_string(struct iovec *iov, const char *str) #define _iovec_set_string_literal(iov, str) _iovec_set((iov), "" str "", NM_STRLEN(str)) _nm_printf(3, 4) static void _iovec_set_format(struct iovec *iov, - char ** iov_free, - const char * format, + char **iov_free, + const char *format, ...) { va_list ap; - char * str; + char *str; va_start(ap, format); str = g_strdup_vprintf(format, ap); @@ -663,14 +663,14 @@ _nm_log_impl(const char *file, ...) { char msg_stack[400]; - gs_free char * msg_heap = NULL; - const char * msg; + gs_free char *msg_heap = NULL; + const char *msg; GTimeVal tv; int errsv; const NMLogDomain *cur_log_state; NMLogDomain cur_log_state_copy[_LOGL_N_REAL]; Global g_copy; - const Global * g; + const Global *g; if (G_UNLIKELY(mt_require_locking)) { G_LOCK(log); @@ -722,9 +722,9 @@ _nm_log_impl(const char *file, { gint64 now, boottime; struct iovec iov_data[15]; - struct iovec * iov = iov_data; - char * iov_free_data[5]; - char ** iov_free = iov_free_data; + struct iovec *iov = iov_data; + char *iov_free_data[5]; + char **iov_free = iov_free_data; const LogDesc *diter; NMLogDomain dom_all; char s_log_domains_buf[NM_STRLEN("NM_LOG_DOMAINS=") + sizeof(_all_logging_domains_to_str)]; diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index 78df53e7..83f2207d 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -402,11 +402,11 @@ typedef struct { guint32 seq_number; WaitForNlResponseResult seq_result; DelayedActionWaitForNlResponseType response_type; - gint64 timeout_abs_ns; - WaitForNlResponseResult * out_seq_result; - char ** out_errmsg; + gint64 timeout_abs_nsec; + WaitForNlResponseResult *out_seq_result; + char **out_errmsg; union { - int * out_refresh_all_in_progress; + int *out_refresh_all_in_progress; NMPObject **out_route_get; gpointer out_data; } response; @@ -446,11 +446,22 @@ typedef struct { GPtrArray *list_master_connected; GPtrArray *list_refresh_link; - GArray * list_wait_for_nl_response; + GArray *list_wait_for_nl_response; int is_handling; } delayed_action; + /* This is the receive buffer for netlink messages. This buffer should be large + * enough for any rtnetlink message. When too small, nl_recv() would notice the + * truncation and lose the message. In that case, we reallocate a larger buffer. + * + * We keep the receive buffer around for the entire lifetime of the platform instance. + * Usually we only have one platform instance per netns, so we don't waste too much. */ + struct { + unsigned char *buf; + gsize len; + } netlink_recv_buf; + } NMLinuxPlatformPrivate; struct _NMLinuxPlatform { @@ -493,7 +504,7 @@ NM_LINUX_PLATFORM_FROM_PRIVATE(NMLinuxPlatformPrivate *priv) G_STMT_START \ { \ char __prefix[32]; \ - const char * __p_prefix = _NMLOG_PREFIX_NAME; \ + const char *__p_prefix = _NMLOG_PREFIX_NAME; \ NMPlatform *const __self = (self); \ \ if (__self && nm_platform_get_log_with_ptr(__self)) { \ @@ -554,7 +565,7 @@ delayed_action_schedule(NMPlatform *platform, DelayedActionType action_type, gpo static gboolean delayed_action_handle_all(NMPlatform *platform, gboolean read_netlink); static void do_request_link_no_delayed_actions(NMPlatform *platform, int ifindex, const char *name); static void do_request_all_no_delayed_actions(NMPlatform *platform, DelayedActionType action_type); -static void cache_on_change(NMPlatform * platform, +static void cache_on_change(NMPlatform *platform, NMPCacheOpsType cache_op, const NMPObject *obj_old, const NMPObject *obj_new); @@ -576,8 +587,8 @@ wait_for_nl_response_to_nmerr(WaitForNlResponseResult seq_result) static const char * wait_for_nl_response_to_string(WaitForNlResponseResult seq_result, - const char * errmsg, - char * buf, + const char *errmsg, + char *buf, gsize buf_size) { char *buf0 = buf; @@ -993,9 +1004,9 @@ _addrtime_get_lifetimes(guint32 timestamp, /*****************************************************************************/ static const NMPObject * -_lookup_cached_link(const NMPCache * cache, +_lookup_cached_link(const NMPCache *cache, int ifindex, - gboolean * completed_from_cache, + gboolean *completed_from_cache, const NMPObject **link_cached) { const NMPObject *obj; @@ -1019,7 +1030,7 @@ static char * _linktype_read_devtype(int dirfd) { gs_free char *contents = NULL; - char * cont, *end; + char *cont, *end; nm_assert(dirfd >= 0); @@ -1046,16 +1057,16 @@ _linktype_read_devtype(int dirfd) } static NMLinkType -_linktype_get_type(NMPlatform * platform, - const NMPCache * cache, - const char * kind, +_linktype_get_type(NMPlatform *platform, + const NMPCache *cache, + const char *kind, int ifindex, - const char * ifname, + const char *ifname, unsigned flags, unsigned arptype, - gboolean * completed_from_cache, + gboolean *completed_from_cache, const NMPObject **link_cached, - const char ** out_kind) + const char **out_kind) { NMLinkType link_type; @@ -1138,7 +1149,7 @@ _linktype_get_type(NMPlatform * platform, { nm_auto_close int dirfd = -1; - gs_free char * devtype = NULL; + gs_free char *devtype = NULL; char ifname_verified[IFNAMSIZ]; dirfd = nmp_utils_sysctl_open_netdir(ifindex, ifname, ifname_verified); @@ -1242,12 +1253,12 @@ _nl_addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, int al /* Copied and heavily modified from libnl3's inet6_parse_protinfo(). */ static gboolean -_parse_af_inet6(NMPlatform * platform, - struct nlattr * attr, +_parse_af_inet6(NMPlatform *platform, + struct nlattr *attr, NMUtilsIPv6IfaceId *out_token, - gboolean * out_token_valid, - guint8 * out_addr_gen_mode_inv, - gboolean * out_addr_gen_mode_valid) + gboolean *out_token_valid, + guint8 *out_addr_gen_mode_inv, + gboolean *out_addr_gen_mode_valid) { static const struct nla_policy policy[] = { [IFLA_INET6_FLAGS] = {.type = NLA_U32}, @@ -1258,7 +1269,7 @@ _parse_af_inet6(NMPlatform * platform, [IFLA_INET6_TOKEN] = {.minlen = sizeof(struct in6_addr)}, [IFLA_INET6_ADDR_GEN_MODE] = {.type = NLA_U8}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; + struct nlattr *tb[G_N_ELEMENTS(policy)]; struct in6_addr i6_token; gboolean token_valid = FALSE; gboolean addr_gen_mode_valid = FALSE; @@ -1331,8 +1342,8 @@ _parse_lnk_bridge(const char *kind, struct nlattr *info_data) [IFLA_BR_MCAST_STARTUP_QUERY_INTVL] = {.type = NLA_U64}, }; NMPlatformLnkBridge *props; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; if (!info_data || !nm_streq0(kind, "bridge")) return NULL; @@ -1420,8 +1431,8 @@ _parse_lnk_gre(const char *kind, struct nlattr *info_data) [IFLA_GRE_TOS] = {.type = NLA_U8}, [IFLA_GRE_PMTUDISC] = {.type = NLA_U8}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkGre *props; gboolean is_tap; @@ -1480,10 +1491,10 @@ _parse_lnk_infiniband(const char *kind, struct nlattr *info_data) [IFLA_IPOIB_MODE] = {.type = NLA_U16}, [IFLA_IPOIB_UMCAST] = {.type = NLA_U16}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; + struct nlattr *tb[G_N_ELEMENTS(policy)]; NMPlatformLnkInfiniband *info; - NMPObject * obj; - const char * mode; + NMPObject *obj; + const char *mode; if (!info_data || !nm_streq0(kind, "ipoib")) return NULL; @@ -1529,8 +1540,8 @@ _parse_lnk_ip6tnl(const char *kind, struct nlattr *info_data) [IFLA_IPTUN_PROTO] = {.type = NLA_U8}, [IFLA_IPTUN_FLAGS] = {.type = NLA_U32}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkIp6Tnl *props; guint32 flowinfo; @@ -1582,8 +1593,8 @@ _parse_lnk_ip6gre(const char *kind, struct nlattr *info_data) [IFLA_GRE_FLOWINFO] = {.type = NLA_U32}, [IFLA_GRE_FLAGS] = {.type = NLA_U32}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkIp6Tnl *props; guint32 flowinfo; gboolean is_tap; @@ -1648,8 +1659,8 @@ _parse_lnk_ipip(const char *kind, struct nlattr *info_data) [IFLA_IPTUN_TOS] = {.type = NLA_U8}, [IFLA_IPTUN_PMTUDISC] = {.type = NLA_U8}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkIpIp *props; if (!info_data || !nm_streq0(kind, "ipip")) @@ -1681,8 +1692,8 @@ _parse_lnk_macvlan(const char *kind, struct nlattr *info_data) [IFLA_MACVLAN_FLAGS] = {.type = NLA_U16}, }; NMPlatformLnkMacvlan *props; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; gboolean tap; if (!info_data || !kind) @@ -1732,8 +1743,8 @@ _parse_lnk_macsec(const char *kind, struct nlattr *info_data) [IFLA_MACSEC_REPLAY_PROTECT] = {.type = NLA_U8}, [IFLA_MACSEC_VALIDATION] = {.type = NLA_U8}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkMacsec *props; if (!info_data || !nm_streq0(kind, "macsec")) @@ -1800,8 +1811,8 @@ _parse_lnk_sit(const char *kind, struct nlattr *info_data) [IFLA_IPTUN_FLAGS] = {.type = NLA_U16}, [IFLA_IPTUN_PROTO] = {.type = NLA_U8}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkSit *props; if (!info_data || !nm_streq0(kind, "sit")) @@ -1841,8 +1852,8 @@ _parse_lnk_tun(const char *kind, struct nlattr *info_data) [IFLA_TUN_NUM_QUEUES] = {.type = NLA_U32}, [IFLA_TUN_NUM_DISABLED_QUEUES] = {.type = NLA_U32}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; NMPlatformLnkTun *props; if (!info_data || !nm_streq0(kind, "tun")) @@ -1878,12 +1889,12 @@ _parse_lnk_tun(const char *kind, struct nlattr *info_data) /*****************************************************************************/ static gboolean -_vlan_qos_mapping_from_nla(struct nlattr * nlattr, +_vlan_qos_mapping_from_nla(struct nlattr *nlattr, const NMVlanQosMapping **out_map, - guint * out_n_map) + guint *out_n_map) { - struct nlattr * nla; - int remaining; + struct nlattr *nla; + int remaining; gs_unref_ptrarray GPtrArray *array = NULL; G_STATIC_ASSERT(sizeof(NMVlanQosMapping) == sizeof(struct ifla_vlan_qos_mapping)); @@ -1950,9 +1961,9 @@ _parse_lnk_vlan(const char *kind, struct nlattr *info_data) [IFLA_VLAN_EGRESS_QOS] = {.type = NLA_NESTED}, [IFLA_VLAN_PROTOCOL] = {.type = NLA_U16}, }; - struct nlattr *tb[G_N_ELEMENTS(policy)]; + struct nlattr *tb[G_N_ELEMENTS(policy)]; nm_auto_nmpobj NMPObject *obj = NULL; - NMPObject * obj_result; + NMPObject *obj_result; if (!info_data || !nm_streq0(kind, "vlan")) return NULL; @@ -2050,8 +2061,8 @@ _parse_lnk_vxlan(const char *kind, struct nlattr *info_data) [IFLA_VXLAN_PORT] = {.type = NLA_U16}, }; NMPlatformLnkVxlan *props; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; if (!info_data || !nm_streq0(kind, "vxlan")) return NULL; @@ -2117,8 +2128,8 @@ _parse_lnk_vrf(const char *kind, struct nlattr *info_data) [IFLA_VRF_TABLE] = {.type = NLA_U32}, }; NMPlatformLnkVrf *props; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj; if (!info_data || !nm_streq0(kind, "vrf")) return NULL; @@ -2199,7 +2210,7 @@ _wireguard_update_from_peers_nla(CList *peers, GArray **p_allowed_ips, struct nl [WGPEER_A_TX_BYTES] = {.type = NLA_U64}, [WGPEER_A_ALLOWEDIPS] = {.type = NLA_NESTED}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; + struct nlattr *tb[G_N_ELEMENTS(policy)]; WireGuardPeerConstruct *peer_c; if (nla_parse_nested_arr(tb, peer_attr, policy) < 0) @@ -2259,7 +2270,7 @@ _wireguard_update_from_peers_nla(CList *peers, GArray **p_allowed_ips, struct nl if (tb[WGPEER_A_ALLOWEDIPS]) { struct nlattr *attr; int rem; - GArray * allowed_ips = *p_allowed_ips; + GArray *allowed_ips = *p_allowed_ips; nla_for_each_nested (attr, tb[WGPEER_A_ALLOWEDIPS], rem) { if (!allowed_ips) { @@ -2290,7 +2301,7 @@ typedef struct { const int ifindex; NMPObject *obj; CList peers; - GArray * allowed_ips; + GArray *allowed_ips; } WireGuardParseData; static int @@ -2306,7 +2317,7 @@ _wireguard_get_device_cb(struct nl_msg *msg, void *arg) [WGDEVICE_A_FWMARK] = {.type = NLA_U32}, [WGDEVICE_A_PEERS] = {.type = NLA_NESTED}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; + struct nlattr *tb[G_N_ELEMENTS(policy)]; WireGuardParseData *parse_data = arg; if (genlmsg_parse_arr(nlmsg_hdr(msg), 0, tb, policy) < 0) @@ -2327,7 +2338,7 @@ _wireguard_get_device_cb(struct nl_msg *msg, void *arg) /* we already have an object instance. This means the netlink message * is a continuation, only providing more WGDEVICE_A_PEERS data below. */ } else { - NMPObject * obj; + NMPObject *obj; NMPlatformLnkWireGuard *props; obj = nmp_object_new(NMP_OBJECT_TYPE_LNK_WIREGUARD, NULL); @@ -2370,18 +2381,18 @@ _wireguard_get_device_cb(struct nl_msg *msg, void *arg) } static const NMPObject * -_wireguard_read_info(NMPlatform * platform /* used only as logging context */, +_wireguard_read_info(NMPlatform *platform /* used only as logging context */, struct nl_sock *genl, int wireguard_family_id, int ifindex) { nm_auto_nlmsg struct nl_msg *msg = NULL; - NMPObject * obj = NULL; - WireGuardPeerConstruct * peer_c; - WireGuardPeerConstruct * peer_c_safe; - gs_unref_array GArray *allowed_ips = NULL; - WireGuardParseData parse_data = { - .ifindex = ifindex, + NMPObject *obj = NULL; + WireGuardPeerConstruct *peer_c; + WireGuardPeerConstruct *peer_c_safe; + gs_unref_array GArray *allowed_ips = NULL; + WireGuardParseData parse_data = { + .ifindex = ifindex, }; guint i; @@ -2522,13 +2533,13 @@ _wireguard_get_family_id(NMPlatform *platform, int ifindex_try) static const NMPObject * _wireguard_refresh_link(NMPlatform *platform, int wireguard_family_id, int ifindex) { - NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); nm_auto_nmpobj const NMPObject *obj_old = NULL; nm_auto_nmpobj const NMPObject *obj_new = NULL; nm_auto_nmpobj const NMPObject *lnk_new = NULL; NMPCacheOpsType cache_op; - const NMPObject * plink = NULL; - nm_auto_nmpobj NMPObject *obj = NULL; + const NMPObject *plink = NULL; + nm_auto_nmpobj NMPObject *obj = NULL; nm_assert(wireguard_family_id >= 0); nm_assert(ifindex > 0); @@ -2587,25 +2598,25 @@ _wireguard_refresh_link(NMPlatform *platform, int wireguard_family_id, int ifind } static int -_wireguard_create_change_nlmsgs(NMPlatform * platform, +_wireguard_create_change_nlmsgs(NMPlatform *platform, int ifindex, int wireguard_family_id, - const NMPlatformLnkWireGuard * lnk_wireguard, - const NMPWireGuardPeer * peers, + const NMPlatformLnkWireGuard *lnk_wireguard, + const NMPWireGuardPeer *peers, const NMPlatformWireGuardChangePeerFlags *peer_flags, guint peers_len, NMPlatformWireGuardChangeFlags change_flags, - GPtrArray ** out_msgs) + GPtrArray **out_msgs) { - gs_unref_ptrarray GPtrArray * msgs = NULL; - nm_auto_nlmsg struct nl_msg * msg = NULL; + gs_unref_ptrarray GPtrArray *msgs = NULL; + nm_auto_nlmsg struct nl_msg *msg = NULL; const guint IDX_NIL = G_MAXUINT; guint idx_peer_curr; guint idx_allowed_ips_curr; - struct nlattr * nest_peers; - struct nlattr * nest_curr_peer; - struct nlattr * nest_allowed_ips; - struct nlattr * nest_curr_allowed_ip; + struct nlattr *nest_peers; + struct nlattr *nest_curr_peer; + struct nlattr *nest_allowed_ips; + struct nlattr *nest_curr_allowed_ip; NMPlatformWireGuardChangePeerFlags p_flags = NM_PLATFORM_WIREGUARD_CHANGE_PEER_FLAG_DEFAULT; #define _nla_nest_end(msg, nest_start) \ @@ -2821,15 +2832,15 @@ nla_put_failure: } static int -link_wireguard_change(NMPlatform * platform, +link_wireguard_change(NMPlatform *platform, int ifindex, - const NMPlatformLnkWireGuard * lnk_wireguard, - const NMPWireGuardPeer * peers, + const NMPlatformLnkWireGuard *lnk_wireguard, + const NMPWireGuardPeer *peers, const NMPlatformWireGuardChangePeerFlags *peer_flags, guint peers_len, NMPlatformWireGuardChangeFlags change_flags) { - NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); gs_unref_ptrarray GPtrArray *msgs = NULL; int wireguard_family_id; guint i; @@ -2897,8 +2908,8 @@ _nmp_link_address_set(NMPLinkAddress *dst, const struct nlattr *nla) /* Copied and heavily modified from libnl3's link_msg_parser(). */ static NMPObject * -_new_from_nl_link(NMPlatform * platform, - const NMPCache * cache, +_new_from_nl_link(NMPlatform *platform, + const NMPCache *cache, struct nlmsghdr *nlh, gboolean id_only) { @@ -2930,15 +2941,15 @@ _new_from_nl_link(NMPlatform * platform, [IFLA_LINK_NETNSID] = {}, [IFLA_PERM_ADDRESS] = {.type = NLA_UNSPEC}, }; - const struct ifinfomsg *ifi; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - struct nlattr * nl_info_data = NULL; - const char * nl_info_kind = NULL; + const struct ifinfomsg *ifi; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + struct nlattr *nl_info_data = NULL; + const char *nl_info_kind = NULL; nm_auto_nmpobj NMPObject *obj = NULL; gboolean completed_from_cache_val = FALSE; - gboolean * completed_from_cache = cache ? &completed_from_cache_val : NULL; - const NMPObject * link_cached = NULL; - const NMPObject * lnk_data = NULL; + gboolean *completed_from_cache = cache ? &completed_from_cache_val : NULL; + const NMPObject *link_cached = NULL; + const NMPObject *lnk_data = NULL; gboolean address_complete_from_cache = TRUE; gboolean perm_address_complete_from_cache = TRUE; gboolean broadcast_complete_from_cache = TRUE; @@ -3210,7 +3221,7 @@ _new_from_nl_link(NMPlatform * platform, if (obj->link.type == NM_LINK_TYPE_WIREGUARD) { const NMPObject *lnk_data_new = NULL; - struct nl_sock * genl = NM_LINUX_PLATFORM_GET_PRIVATE(platform)->genl; + struct nl_sock *genl = NM_LINUX_PLATFORM_GET_PRIVATE(platform)->genl; /* The WireGuard kernel module does not yet send link update * notifications, so we don't actually update the cache. For @@ -3255,9 +3266,9 @@ _new_from_nl_addr(struct nlmsghdr *nlh, gboolean id_only) [IFA_CACHEINFO] = {.minlen = nm_offsetofend(struct ifa_cacheinfo, tstamp)}, [IFA_FLAGS] = {}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - const struct ifaddrmsg *ifa; - gboolean is_v4; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + const struct ifaddrmsg *ifa; + gboolean is_v4; nm_auto_nmpobj NMPObject *obj = NULL; int addr_len; guint32 lifetime, preferred, timestamp; @@ -3374,9 +3385,9 @@ _new_from_nl_route(struct nlmsghdr *nlh, gboolean id_only) [RTA_METRICS] = {.type = NLA_NESTED}, [RTA_MULTIPATH] = {.type = NLA_NESTED}, }; - const struct rtmsg *rtm; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - gboolean is_v4; + const struct rtmsg *rtm; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + gboolean is_v4; nm_auto_nmpobj NMPObject *obj = NULL; int addr_len; struct { @@ -3530,7 +3541,6 @@ rta_multipath_done:; obj = nmp_object_new(is_v4 ? NMP_OBJECT_TYPE_IP4_ROUTE : NMP_OBJECT_TYPE_IP6_ROUTE, NULL); - obj->ip_route.is_external = TRUE; obj->ip_route.type_coerced = nm_platform_route_type_coerce(rtm->rtm_type); obj->ip_route.table_coerced = nm_platform_route_table_coerce( tb[RTA_TABLE] ? nla_get_u32(tb[RTA_TABLE]) : (guint32) rtm->rtm_table); @@ -3682,12 +3692,12 @@ _new_from_nl_routing_rule(struct nlmsghdr *nlh, gboolean id_only) .maxlen = sizeof(NMFibRulePortRange), }, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; + struct nlattr *tb[G_N_ELEMENTS(policy)]; const struct fib_rule_hdr *frh; - NMPlatformRoutingRule * props; - nm_auto_nmpobj NMPObject *obj = NULL; - int addr_family; - guint8 addr_size; + NMPlatformRoutingRule *props; + nm_auto_nmpobj NMPObject *obj = NULL; + int addr_family; + guint8 addr_size; if (nlmsg_parse_arr(nlh, sizeof(*frh), tb, policy) < 0) return NULL; @@ -3876,8 +3886,8 @@ _new_from_nl_qdisc(NMPlatform *platform, struct nlmsghdr *nlh, gboolean id_only) [TCA_KIND] = {.type = NLA_STRING}, [TCA_OPTIONS] = {.type = NLA_NESTED}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - const struct tcmsg *tcm; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + const struct tcmsg *tcm; nm_auto_nmpobj NMPObject *obj = NULL; if (!nm_platform_get_cache_tc(platform)) @@ -3926,7 +3936,7 @@ _new_from_nl_qdisc(NMPlatform *platform, struct nlmsghdr *nlh, gboolean id_only) [TCA_TBF_PARMS] = {.minlen = sizeof(struct tc_tbf_qopt)}, [TCA_TBF_RATE64] = {.type = NLA_U64}, }; - struct nlattr * tbf_tb[G_N_ELEMENTS(tbf_policy)]; + struct nlattr *tbf_tb[G_N_ELEMENTS(tbf_policy)]; struct tc_tbf_qopt opt; if (nla_parse_nested_arr(tbf_tb, tb[TCA_OPTIONS], tbf_policy) < 0) @@ -3988,8 +3998,8 @@ _new_from_nl_tfilter(NMPlatform *platform, struct nlmsghdr *nlh, gboolean id_onl static const struct nla_policy policy[] = { [TCA_KIND] = {.type = NLA_STRING}, }; - struct nlattr * tb[G_N_ELEMENTS(policy)]; - NMPObject * obj = NULL; + struct nlattr *tb[G_N_ELEMENTS(policy)]; + NMPObject *obj = NULL; const struct tcmsg *tcm; if (!nm_platform_get_cache_tc(platform)) @@ -4028,9 +4038,9 @@ _new_from_nl_tfilter(NMPlatform *platform, struct nlmsghdr *nlh, gboolean id_onl * Returns: %NULL or a newly created NMPObject instance. **/ static NMPObject * -nmp_object_new_from_nl(NMPlatform * platform, +nmp_object_new_from_nl(NMPlatform *platform, const NMPCache *cache, - struct nl_msg * msg, + struct nl_msg *msg, gboolean id_only) { struct nlmsghdr *msghdr; @@ -4113,7 +4123,7 @@ _nl_msg_new_link_set_linkinfo(struct nl_msg *msg, NMLinkType link_type, gconstpo { struct nlattr *info; struct nlattr *data = NULL; - const char * kind; + const char *kind; nm_assert(msg); @@ -4242,9 +4252,9 @@ _nl_msg_new_link_set_linkinfo(struct nl_msg *msg, NMLinkType link_type, gconstpo } case NM_LINK_TYPE_VETH: { - const char * veth_peer = extra_data; + const char *veth_peer = extra_data; const struct ifinfomsg ifi = {}; - struct nlattr * info_peer; + struct nlattr *info_peer; nm_assert(veth_peer); @@ -4438,7 +4448,7 @@ nla_put_failure: } static gboolean -_nl_msg_new_link_set_linkinfo_vlan(struct nl_msg * msg, +_nl_msg_new_link_set_linkinfo_vlan(struct nl_msg *msg, int vlan_id, guint32 flags_mask, guint32 flags_set, @@ -4559,10 +4569,10 @@ _nl_msg_new_link_full(int nlmsg_type, { nm_auto_nlmsg struct nl_msg *msg = NULL; const struct ifinfomsg ifi = { - .ifi_family = family, - .ifi_change = flags_mask, - .ifi_flags = flags_set, - .ifi_index = ifindex, + .ifi_family = family, + .ifi_change = flags_mask, + .ifi_flags = flags_set, + .ifi_index = ifindex, }; nm_assert(NM_IN_SET(nlmsg_type, RTM_DELLINK, RTM_NEWLINK, RTM_GETLINK, RTM_SETLINK)); @@ -4601,14 +4611,14 @@ _nl_msg_new_address(int nlmsg_type, guint32 lifetime, guint32 preferred, in_addr_t ip4_broadcast_address, - const char * label) + const char *label) { nm_auto_nlmsg struct nl_msg *msg = NULL; struct ifaddrmsg am = { - .ifa_family = family, - .ifa_index = ifindex, - .ifa_prefixlen = plen, - .ifa_flags = flags, + .ifa_family = family, + .ifa_index = ifindex, + .ifa_prefixlen = plen, + .ifa_flags = flags, }; gsize addr_len; @@ -4680,12 +4690,33 @@ ip_route_get_lock_flag(const NMPlatformIPRoute *route) | (((guint32) route->lock_mtu) << RTAX_MTU); } +static gboolean +ip_route_ignored_protocol(const NMPlatformIPRoute *route) +{ + guint8 prot; + + nm_assert(route); + nm_assert(route->rt_source >= NM_IP_CONFIG_SOURCE_RTPROT_UNSPEC + && route->rt_source <= _NM_IP_CONFIG_SOURCE_RTPROT_LAST); + + prot = route->rt_source - 1; + + nm_assert(nmp_utils_ip_config_source_from_rtprot(prot) == route->rt_source); + + /* We ignore all routes outside a certain subest of rtm_protocol. NetworkManager + * itself wouldn't configure those, so they are always configured by somebody + * external. We thus ignore them to avoid the overhead that processing them brings. + * For example, the BGP daemon "bird" might configure a huge number of RTPROT_BIRD routes. */ + + return prot > RTPROT_STATIC && !NM_IN_SET(prot, RTPROT_DHCP, RTPROT_RA); +} + /* Copied and modified from libnl3's build_route_msg() and rtnl_route_build_msg(). */ static struct nl_msg * _nl_msg_new_route(int nlmsg_type, guint16 nlmsgflags, const NMPObject *obj) { nm_auto_nlmsg struct nl_msg *msg = NULL; - const NMPClass * klass = NMP_OBJECT_GET_CLASS(obj); + const NMPClass *klass = NMP_OBJECT_GET_CLASS(obj); gboolean is_v4 = klass->addr_family == AF_INET; const guint32 lock = ip_route_get_lock_flag(NMP_OBJECT_CAST_IP_ROUTE(obj)); const guint32 table = @@ -4904,13 +4935,13 @@ static struct nl_msg * _nl_msg_new_qdisc(int nlmsg_type, int nlmsg_flags, const NMPlatformQdisc *qdisc) { nm_auto_nlmsg struct nl_msg *msg = NULL; - struct nlattr * tc_options; + struct nlattr *tc_options; const struct tcmsg tcm = { - .tcm_family = qdisc->addr_family, - .tcm_ifindex = qdisc->ifindex, - .tcm_handle = qdisc->handle, - .tcm_parent = qdisc->parent, - .tcm_info = qdisc->info, + .tcm_family = qdisc->addr_family, + .tcm_ifindex = qdisc->ifindex, + .tcm_handle = qdisc->handle, + .tcm_parent = qdisc->parent, + .tcm_info = qdisc->info, }; msg = nlmsg_alloc_simple(nlmsg_type, nlmsg_flags | NMP_NLM_FLAG_F_ECHO); @@ -4991,14 +5022,14 @@ static struct nl_msg * _nl_msg_new_tfilter(int nlmsg_type, int nlmsg_flags, const NMPlatformTfilter *tfilter) { nm_auto_nlmsg struct nl_msg *msg = NULL; - struct nlattr * tc_options; - struct nlattr * act_tab; + struct nlattr *tc_options; + struct nlattr *act_tab; const struct tcmsg tcm = { - .tcm_family = tfilter->addr_family, - .tcm_ifindex = tfilter->ifindex, - .tcm_handle = tfilter->handle, - .tcm_parent = tfilter->parent, - .tcm_info = tfilter->info, + .tcm_family = tfilter->addr_family, + .tcm_ifindex = tfilter->ifindex, + .tcm_handle = tfilter->handle, + .tcm_parent = tfilter->parent, + .tcm_info = tfilter->info, }; msg = nlmsg_alloc_simple(nlmsg_type, nlmsg_flags | NMP_NLM_FLAG_F_ECHO); @@ -5016,8 +5047,8 @@ _nl_msg_new_tfilter(int nlmsg_type, int nlmsg_flags, const NMPlatformTfilter *tf if (tfilter->action.kind) { const NMPlatformAction *action = &tfilter->action; - struct nlattr * prio; - struct nlattr * act_options; + struct nlattr *prio; + struct nlattr *act_options; if (!(prio = nla_nest_start(msg, 1 /* priority */))) goto nla_put_failure; @@ -5121,7 +5152,7 @@ _log_dbg_sysctl_set_impl(NMPlatform *platform, const char *path, const char *value) { - GError * error = NULL; + GError *error = NULL; gs_free char *contents = NULL; gs_free char *value_escaped = g_strescape(value, NULL); @@ -5175,7 +5206,7 @@ sysctl_set_internal(NMPlatform *platform, int fd, tries; gssize nwrote; gssize len; - char * actual; + char *actual; gs_free char *actual_free = NULL; int errsv; @@ -5314,12 +5345,12 @@ sysctl_set(NMPlatform *platform, const char *pathid, int dirfd, const char *path } typedef struct { - NMPlatform * platform; - char * pathid; + NMPlatform *platform; + char *pathid; int dirfd; - char * path; - char ** values; - GCancellable * cancellable; + char *path; + char **values; + GCancellable *cancellable; NMPlatformAsyncCallback callback; gpointer callback_data; } SysctlAsyncInfo; @@ -5340,11 +5371,11 @@ sysctl_async_info_free(SysctlAsyncInfo *info) static void sysctl_async_cb(GObject *object, GAsyncResult *res, gpointer user_data) { - NMPlatform * platform; - GTask * task = G_TASK(res); - SysctlAsyncInfo *info; + NMPlatform *platform; + GTask *task = G_TASK(res); + SysctlAsyncInfo *info; gs_free_error GError *error = NULL; - gs_free char * values_str = NULL; + gs_free char *values_str = NULL; info = g_task_get_task_data(task); @@ -5360,15 +5391,15 @@ sysctl_async_cb(GObject *object, GAsyncResult *res, gpointer user_data) } static void -sysctl_async_thread_fn(GTask * task, +sysctl_async_thread_fn(GTask *task, gpointer source_object, gpointer task_data, GCancellable *cancellable) { nm_auto_pop_netns NMPNetns *netns = NULL; - SysctlAsyncInfo * info = task_data; - GError * error = NULL; - char ** value; + SysctlAsyncInfo *info = task_data; + GError *error = NULL; + char **value; if (g_task_return_error_if_cancelled(task)) return; @@ -5403,11 +5434,11 @@ sysctl_async_thread_fn(GTask * task, static void sysctl_set_async_return_idle(gpointer user_data, GCancellable *cancellable) { - gs_unref_object NMPlatform *platform = NULL; - gs_free_error GError *cancelled_error = NULL; - gs_free_error GError * error = NULL; - NMPlatformAsyncCallback callback; - gpointer callback_data; + gs_unref_object NMPlatform *platform = NULL; + gs_free_error GError *cancelled_error = NULL; + gs_free_error GError *error = NULL; + NMPlatformAsyncCallback callback; + gpointer callback_data; nm_utils_user_data_unpack(user_data, &platform, &callback, &callback_data, &error); g_cancellable_set_error_if_cancelled(cancellable, &cancelled_error); @@ -5415,20 +5446,20 @@ sysctl_set_async_return_idle(gpointer user_data, GCancellable *cancellable) } static void -sysctl_set_async(NMPlatform * platform, - const char * pathid, +sysctl_set_async(NMPlatform *platform, + const char *pathid, int dirfd, - const char * path, - const char *const * values, + const char *path, + const char *const *values, NMPlatformAsyncCallback callback, gpointer data, - GCancellable * cancellable) + GCancellable *cancellable) { SysctlAsyncInfo *info; - GTask * task; + GTask *task; int dirfd_dup, errsv; gpointer packed; - GError * error = NULL; + GError *error = NULL; g_return_if_fail(platform); g_return_if_fail(path); @@ -5501,7 +5532,7 @@ _nm_logging_clear_platform_logging_cache(void) typedef struct { const char *path; CList lst; - char * value; + char *value; char path_data[]; } SysctlCacheEntry; @@ -5539,7 +5570,7 @@ _log_dbg_sysctl_get_impl(NMPlatform *platform, const char *pathid, const char *c **/ NM_G_MUTEX_LOCKED(&sysctl_clear_cache_lock); NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); - SysctlCacheEntry * entry = NULL; + SysctlCacheEntry *entry = NULL; if (!priv->sysctl_get_prev_values) { c_list_link_tail(&sysctl_clear_cache_lst_head, &priv->sysctl_clear_cache_lst); @@ -5567,7 +5598,7 @@ _log_dbg_sysctl_get_impl(NMPlatform *platform, const char *pathid, const char *c nm_c_list_move_front(&priv->sysctl_list, &entry->lst); } else { - gs_free char * contents_escaped = g_strescape(contents, NULL); + gs_free char *contents_escaped = g_strescape(contents, NULL); SysctlCacheEntry *old; size_t len; @@ -5602,8 +5633,8 @@ static char * sysctl_get(NMPlatform *platform, const char *pathid, int dirfd, const char *path) { nm_auto_pop_netns NMPNetns *netns = NULL; - GError * error = NULL; - gs_free char * contents = NULL; + GError *error = NULL; + gs_free char *contents = NULL; ASSERT_SYSCTL_ARGS(pathid, dirfd, path); @@ -5813,10 +5844,10 @@ static NM_UTILS_LOOKUP_STR_DEFINE( static const char * delayed_action_to_string_full(DelayedActionType action_type, gpointer user_data, - char * buf, + char *buf, gsize buf_size) { - char * buf0 = buf; + char *buf0 = buf; const DelayedActionWaitForNlResponseData *data; nm_strbuf_append_str(&buf, &buf_size, delayed_action_to_string(action_type)); @@ -5831,7 +5862,7 @@ delayed_action_to_string_full(DelayedActionType action_type, data = user_data; if (data) { - gint64 timeout = data->timeout_abs_ns - nm_utils_get_monotonic_timestamp_nsec(); + gint64 timeout = data->timeout_abs_nsec - nm_utils_get_monotonic_timestamp_nsec(); char b[255]; nm_strbuf_append( @@ -5889,11 +5920,11 @@ delayed_action_refresh_all_in_progress(NMPlatform *platform, DelayedActionType a } static void -delayed_action_wait_for_nl_response_complete(NMPlatform * platform, +delayed_action_wait_for_nl_response_complete(NMPlatform *platform, guint idx, WaitForNlResponseResult seq_result) { - NMLinuxPlatformPrivate * priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); DelayedActionWaitForNlResponseData *data; nm_assert(NM_FLAGS_HAS(priv->delayed_action.flags, DELAYED_ACTION_TYPE_WAIT_FOR_NL_RESPONSE)); @@ -5932,17 +5963,17 @@ delayed_action_wait_for_nl_response_complete(NMPlatform * platform, } static void -delayed_action_wait_for_nl_response_complete_check(NMPlatform * platform, +delayed_action_wait_for_nl_response_complete_check(NMPlatform *platform, WaitForNlResponseResult force_result, - guint32 * out_next_seq_number, - gint64 * out_next_timeout_abs_ns, - gint64 * p_now_ns) + guint32 *out_next_seq_number, + gint64 *out_next_timeout_abs_ns, + gint64 *p_now_nsec) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); guint i; guint32 next_seq_number = 0; gint64 next_timeout_abs_ns = 0; - gint64 now_ns = 0; + gint64 now_nsec = 0; for (i = 0; i < priv->delayed_action.list_wait_for_nl_response->len;) { const DelayedActionWaitForNlResponseData *data = @@ -5952,10 +5983,10 @@ delayed_action_wait_for_nl_response_complete_check(NMPlatform * platf if (data->seq_result) delayed_action_wait_for_nl_response_complete(platform, i, data->seq_result); - else if (p_now_ns - && ((now_ns ?: (now_ns = nm_utils_get_monotonic_timestamp_nsec())) - >= data->timeout_abs_ns)) { - /* the caller can optionally check for timeout by providing a p_now_ns argument. */ + else if (p_now_nsec + && ((now_nsec ?: (now_nsec = nm_utils_get_monotonic_timestamp_nsec())) + >= data->timeout_abs_nsec)) { + /* the caller can optionally check for timeout by providing a p_now_nsec argument. */ delayed_action_wait_for_nl_response_complete( platform, i, @@ -5963,9 +5994,9 @@ delayed_action_wait_for_nl_response_complete_check(NMPlatform * platf } else if (force_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN) delayed_action_wait_for_nl_response_complete(platform, i, force_result); else { - if (next_seq_number == 0 || next_timeout_abs_ns > data->timeout_abs_ns) { + if (next_seq_number == 0 || next_timeout_abs_ns > data->timeout_abs_nsec) { next_seq_number = data->seq_number; - next_timeout_abs_ns = data->timeout_abs_ns; + next_timeout_abs_ns = data->timeout_abs_nsec; } i++; } @@ -5979,11 +6010,11 @@ delayed_action_wait_for_nl_response_complete_check(NMPlatform * platf NM_SET_OUT(out_next_seq_number, next_seq_number); NM_SET_OUT(out_next_timeout_abs_ns, next_timeout_abs_ns); - NM_SET_OUT(p_now_ns, now_ns); + NM_SET_OUT(p_now_nsec, now_nsec); } static void -delayed_action_wait_for_nl_response_complete_all(NMPlatform * platform, +delayed_action_wait_for_nl_response_complete_all(NMPlatform *platform, WaitForNlResponseResult fallback_result) { delayed_action_wait_for_nl_response_complete_check(platform, fallback_result, NULL, NULL, NULL); @@ -6080,8 +6111,8 @@ delayed_action_handle_one(NMPlatform *platform) priv->delayed_action.flags &= ~DELAYED_ACTION_TYPE_REFRESH_ALL; if (_LOGt_ENABLED()) { - FOR_EACH_DELAYED_ACTION(iflags, flags) - _LOGt_delayed_action(iflags, NULL, "handle"); + FOR_EACH_DELAYED_ACTION (iflags, flags) + _LOGt_delayed_action(iflags, NULL, "handle"); } delayed_action_handle_REFRESH_ALL(platform, flags); @@ -6177,22 +6208,22 @@ delayed_action_schedule(NMPlatform *platform, DelayedActionType action_type, gpo priv->delayed_action.flags |= action_type; if (_LOGt_ENABLED()) { - FOR_EACH_DELAYED_ACTION(iflags, action_type) - _LOGt_delayed_action(iflags, user_data, "schedule"); + FOR_EACH_DELAYED_ACTION (iflags, action_type) + _LOGt_delayed_action(iflags, user_data, "schedule"); } } static void -delayed_action_schedule_WAIT_FOR_NL_RESPONSE(NMPlatform * platform, +delayed_action_schedule_WAIT_FOR_NL_RESPONSE(NMPlatform *platform, guint32 seq_number, - WaitForNlResponseResult * out_seq_result, - char ** out_errmsg, + WaitForNlResponseResult *out_seq_result, + char **out_errmsg, DelayedActionWaitForNlResponseType response_type, gpointer response_out_data) { DelayedActionWaitForNlResponseData data = { .seq_number = seq_number, - .timeout_abs_ns = + .timeout_abs_nsec = nm_utils_get_monotonic_timestamp_nsec() + (200 * (NM_UTILS_NSEC_PER_SEC / 1000)), .out_seq_result = out_seq_result, .out_errmsg = out_errmsg, @@ -6211,7 +6242,7 @@ cache_prune_one_type(NMPlatform *platform, const NMPLookup *lookup) NMDedupMultiIter iter; const NMPObject *obj; NMPCacheOpsType cache_op; - NMPCache * cache = nm_platform_get_cache(platform); + NMPCache *cache = nm_platform_get_cache(platform); nm_dedup_multi_iter_init(&iter, nmp_cache_lookup(cache, lookup)); while (nm_dedup_multi_iter_next(&iter)) { @@ -6260,7 +6291,7 @@ cache_prune_all(NMPlatform *platform) } static void -cache_on_change(NMPlatform * platform, +cache_on_change(NMPlatform *platform, NMPCacheOpsType cache_op, const NMPObject *obj_old, const NMPObject *obj_new) @@ -6268,7 +6299,7 @@ cache_on_change(NMPlatform * platform, const NMPClass *klass; char str_buf[sizeof(_nm_utils_to_string_buffer)]; char str_buf2[sizeof(_nm_utils_to_string_buffer)]; - NMPCache * cache = nm_platform_get_cache(platform); + NMPCache *cache = nm_platform_get_cache(platform); ASSERT_nmp_cache_ops(cache, cache_op, obj_old, obj_new); nm_assert(cache_op != NMP_CACHE_OPS_UNCHANGED); @@ -6531,10 +6562,10 @@ _nlh_seq_next_get(NMLinuxPlatformPrivate *priv) * Returns: 0 on success or a negative errno. */ static int -_nl_send_nlmsghdr(NMPlatform * platform, - struct nlmsghdr * nlhdr, - WaitForNlResponseResult * out_seq_result, - char ** out_errmsg, +_nl_send_nlmsghdr(NMPlatform *platform, + struct nlmsghdr *nlhdr, + WaitForNlResponseResult *out_seq_result, + char **out_errmsg, DelayedActionWaitForNlResponseType response_type, gpointer response_out_data) { @@ -6598,15 +6629,15 @@ again: * Returns: 0 on success, or a negative libnl3 error code (beware, it's not an errno). */ static int -_nl_send_nlmsg(NMPlatform * platform, - struct nl_msg * nlmsg, - WaitForNlResponseResult * out_seq_result, - char ** out_errmsg, +_nl_send_nlmsg(NMPlatform *platform, + struct nl_msg *nlmsg, + WaitForNlResponseResult *out_seq_result, + char **out_errmsg, DelayedActionWaitForNlResponseType response_type, gpointer response_out_data) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); - struct nlmsghdr * nlhdr; + struct nlmsghdr *nlhdr; guint32 seq; int nle; @@ -6632,7 +6663,7 @@ _nl_send_nlmsg(NMPlatform * platform, static void do_request_link_no_delayed_actions(NMPlatform *platform, int ifindex, const char *name) { - NMLinuxPlatformPrivate * priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); nm_auto_nlmsg struct nl_msg *nlmsg = NULL; int nle; @@ -6680,7 +6711,7 @@ static struct nl_msg * _nl_msg_new_dump(NMPObjectType obj_type, int preferred_addr_family) { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; - const NMPClass * klass; + const NMPClass *klass; klass = nmp_class_from_type(obj_type); @@ -6753,8 +6784,7 @@ do_request_all_no_delayed_actions(NMPlatform *platform, DelayedActionType action action_type_prune &= ~DELAYED_ACTION_TYPE_REFRESH_ALL_ROUTING_RULES_ALL; } - FOR_EACH_DELAYED_ACTION(iflags, action_type_prune) - { + FOR_EACH_DELAYED_ACTION (iflags, action_type_prune) { RefreshAllType refresh_all_type = delayed_action_type_to_refresh_all_type(iflags); NMPLookup lookup; @@ -6763,12 +6793,11 @@ do_request_all_no_delayed_actions(NMPlatform *platform, DelayedActionType action nmp_cache_dirty_set_all_main(nm_platform_get_cache(platform), &lookup); } - FOR_EACH_DELAYED_ACTION(iflags, action_type) - { + FOR_EACH_DELAYED_ACTION (iflags, action_type) { RefreshAllType refresh_all_type = delayed_action_type_to_refresh_all_type(iflags); const RefreshAllInfo *refresh_all_info = refresh_all_type_get_info(refresh_all_type); nm_auto_nlmsg struct nl_msg *nlmsg = NULL; - int * out_refresh_all_in_progress; + int *out_refresh_all_in_progress; out_refresh_all_in_progress = &priv->delayed_action.refresh_all_in_progress[refresh_all_type]; @@ -6826,7 +6855,7 @@ do_request_one_type_by_needle_object(NMPlatform *platform, const NMPObject *obj_ static void event_seq_check_refresh_all(NMPlatform *platform, guint32 seq_number) { - NMLinuxPlatformPrivate * priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); DelayedActionWaitForNlResponseData *data; guint i; @@ -6855,12 +6884,12 @@ event_seq_check_refresh_all(NMPlatform *platform, guint32 seq_number) } static void -event_seq_check(NMPlatform * platform, +event_seq_check(NMPlatform *platform, guint32 seq_number, WaitForNlResponseResult seq_result, - const char * msg) + const char *msg) { - NMLinuxPlatformPrivate * priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); DelayedActionWaitForNlResponseData *data; guint i; @@ -6901,14 +6930,14 @@ event_seq_check(NMPlatform * platform, static void event_valid_msg(NMPlatform *platform, struct nl_msg *msg, gboolean handle_events) { - NMLinuxPlatformPrivate *priv; + NMLinuxPlatformPrivate *priv; nm_auto_nmpobj NMPObject *obj = NULL; NMPCacheOpsType cache_op; - struct nlmsghdr * msghdr; + struct nlmsghdr *msghdr; char buf_nlmsghdr[400]; gboolean is_del = FALSE; gboolean is_dump = FALSE; - NMPCache * cache = nm_platform_get_cache(platform); + NMPCache *cache = nm_platform_get_cache(platform); msghdr = nlmsg_hdr(msg); @@ -7010,6 +7039,17 @@ event_valid_msg(NMPlatform *platform, struct nl_msg *msg, gboolean handle_events } } + if (ip_route_ignored_protocol(NMP_OBJECT_CAST_IP_ROUTE(obj))) { + /* We ignore certain rtm_protocol, because NetworkManager would only ever + * configure certain protocols. Other routes were not added by NetworkManager + * and we don't need to track them in the platform cache. + * + * This is to help with the performance overhead of a huge number of + * routes, for example with the bird BGP software, that adds routes + * with RTPROT_BIRD protocol. */ + return; + } + cache_op = nmp_cache_update_netlink_route(cache, obj, is_dump, @@ -7085,18 +7125,18 @@ event_valid_msg(NMPlatform *platform, struct nl_msg *msg, gboolean handle_events /*****************************************************************************/ static int -do_add_link_with_lookup(NMPlatform * platform, +do_add_link_with_lookup(NMPlatform *platform, NMLinkType link_type, - const char * name, - struct nl_msg * nlmsg, + const char *name, + struct nl_msg *nlmsg, const NMPlatformLink **out_link) { - const NMPObject * obj = NULL; + const NMPObject *obj = NULL; WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; int nle; char s_buf[256]; - NMPCache * cache = nm_platform_get_cache(platform); + NMPCache *cache = nm_platform_get_cache(platform); event_handler_read_netlink(platform, FALSE); @@ -7135,13 +7175,13 @@ do_add_link_with_lookup(NMPlatform * platform, } static int -do_add_addrroute(NMPlatform * platform, +do_add_addrroute(NMPlatform *platform, const NMPObject *obj_id, - struct nl_msg * nlmsg, + struct nl_msg *nlmsg, gboolean suppress_netlink_failure) { WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; int nle; char s_buf[256]; @@ -7200,11 +7240,11 @@ static gboolean do_delete_object(NMPlatform *platform, const NMPObject *obj_id, struct nl_msg *nlmsg) { WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; int nle; char s_buf[256]; gboolean success; - const char * log_detail = ""; + const char *log_detail = ""; event_handler_read_netlink(platform, FALSE); @@ -7270,23 +7310,23 @@ do_delete_object(NMPlatform *platform, const NMPObject *obj_id, struct nl_msg *n } static int -do_change_link(NMPlatform * platform, +do_change_link(NMPlatform *platform, ChangeLinkType change_link_type, int ifindex, - struct nl_msg * nlmsg, + struct nl_msg *nlmsg, const ChangeLinkData *data) { nm_auto_pop_netns NMPNetns *netns = NULL; int nle; WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; char s_buf[256]; int result = 0; NMLogLevel log_level = LOGL_DEBUG; - const char * log_result = "failure"; - const char * log_detail = ""; - gs_free char * log_detail_free = NULL; - const NMPObject * obj_cache; + const char *log_result = "failure"; + const char *log_detail = ""; + gs_free char *log_detail_free = NULL; + const NMPObject *obj_cache; if (!nm_platform_netns_push(platform, &netns)) { log_level = LOGL_ERR; @@ -7368,11 +7408,11 @@ out: } static int -link_add(NMPlatform * platform, +link_add(NMPlatform *platform, NMLinkType type, - const char * name, + const char *name, int parent, - const void * address, + const void *address, size_t address_len, guint32 mtu, gconstpointer extra_data, @@ -7418,7 +7458,7 @@ link_delete(NMPlatform *platform, int ifindex) { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; NMPObject obj_id; - const NMPObject * obj; + const NMPObject *obj; obj = nmp_cache_lookup_link(nm_platform_get_cache(platform), ifindex); if (!obj || !obj->_link.netlink.is_in_netlink) @@ -7527,7 +7567,7 @@ static gboolean link_supports_vlans(NMPlatform *platform, int ifindex) { nm_auto_pop_netns NMPNetns *netns = NULL; - const NMPObject * obj; + const NMPObject *obj; obj = nm_platform_link_get_obj(platform, ifindex, TRUE); @@ -7569,10 +7609,10 @@ link_set_address(NMPlatform *platform, int ifindex, gconstpointer address, size_ { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; const ChangeLinkData d = { - .set_address = + .set_address = { - .address = address, - .length = length, + .address = address, + .length = length, }, }; @@ -7643,11 +7683,11 @@ nla_put_failure: static void sriov_idle_cb(gpointer user_data, GCancellable *cancellable) { - gs_unref_object NMPlatform *platform = NULL; - gs_free_error GError *cancelled_error = NULL; - gs_free_error GError * error = NULL; - NMPlatformAsyncCallback callback; - gpointer callback_data; + gs_unref_object NMPlatform *platform = NULL; + gs_free_error GError *cancelled_error = NULL; + gs_free_error GError *error = NULL; + NMPlatformAsyncCallback callback; + gpointer callback_data; g_cancellable_set_error_if_cancelled(cancellable, &cancelled_error); nm_utils_user_data_unpack(user_data, &platform, &error, &callback, &callback_data); @@ -7655,24 +7695,24 @@ sriov_idle_cb(gpointer user_data, GCancellable *cancellable) } static void -link_set_sriov_params_async(NMPlatform * platform, +link_set_sriov_params_async(NMPlatform *platform, int ifindex, guint num_vfs, NMOptionBool autoprobe, NMPlatformAsyncCallback callback, gpointer data, - GCancellable * cancellable) + GCancellable *cancellable) { nm_auto_pop_netns NMPNetns *netns = NULL; - gs_free_error GError *error = NULL; - nm_auto_close int dirfd = -1; - int current_autoprobe; - guint i, total; - gint64 current_num; - char ifname[IFNAMSIZ]; - gpointer packed; - const char * values[3]; - char buf[64]; + gs_free_error GError *error = NULL; + nm_auto_close int dirfd = -1; + int current_autoprobe; + guint i, total; + gint64 current_num; + char ifname[IFNAMSIZ]; + gpointer packed; + const char *values[3]; + char buf[64]; g_return_if_fail(callback || !data); g_return_if_fail(cancellable); @@ -7781,7 +7821,7 @@ static gboolean link_set_sriov_vfs(NMPlatform *platform, int ifindex, const NMPlatformVF *const *vfs) { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; - struct nlattr * list, *info, *vlan_list; + struct nlattr *list, *info, *vlan_list; guint i; nlmsg = _nl_msg_new_link(RTM_NEWLINK, 0, ifindex, NULL); @@ -7868,13 +7908,13 @@ nla_put_failure: } static gboolean -link_set_bridge_vlans(NMPlatform * platform, +link_set_bridge_vlans(NMPlatform *platform, int ifindex, gboolean on_master, const NMPlatformBridgeVlan *const *vlans) { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; - struct nlattr * list; + struct nlattr *list; struct bridge_vlan_info vinfo = {}; guint i; @@ -7959,13 +7999,13 @@ link_get_dev_id(NMPlatform *platform, int ifindex) } static gboolean -link_tun_add(NMPlatform * platform, - const char * name, +link_tun_add(NMPlatform *platform, + const char *name, const NMPlatformLnkTun *props, - const NMPlatformLink ** out_link, - int * out_fd) + const NMPlatformLink **out_link, + int *out_fd) { - const NMPObject * obj; + const NMPObject *obj; struct ifreq ifr = {}; nm_auto_close int fd = -1; @@ -8023,8 +8063,8 @@ _vlan_change_vlan_qos_mapping_create(gboolean is_ingress_map, guint current_n_map, const NMVlanQosMapping *set_map, guint set_n_map, - NMVlanQosMapping ** out_map, - guint * out_n_map) + NMVlanQosMapping **out_map, + guint *out_n_map) { NMVlanQosMapping *map; guint i, j, len; @@ -8087,7 +8127,7 @@ _vlan_change_vlan_qos_mapping_create(gboolean is_ingress_map, } static gboolean -link_vlan_change(NMPlatform * platform, +link_vlan_change(NMPlatform *platform, int ifindex, _NMVlanFlags flags_mask, _NMVlanFlags flags_set, @@ -8098,13 +8138,13 @@ link_vlan_change(NMPlatform * platform, const NMVlanQosMapping *egress_map, gsize n_egress_map) { - const NMPObject * obj_cache; + const NMPObject *obj_cache; nm_auto_nlmsg struct nl_msg *nlmsg = NULL; - const NMPObjectLnkVlan * lnk; + const NMPObjectLnkVlan *lnk; guint new_n_ingress_map = 0; guint new_n_egress_map = 0; - gs_free NMVlanQosMapping *new_ingress_map = NULL; - gs_free NMVlanQosMapping *new_egress_map = NULL; + gs_free NMVlanQosMapping *new_ingress_map = NULL; + gs_free NMVlanQosMapping *new_egress_map = NULL; obj_cache = nmp_cache_lookup_link(nm_platform_get_cache(platform), ifindex); if (!obj_cache || !obj_cache->_link.netlink.is_in_netlink) { @@ -8175,7 +8215,7 @@ link_release(NMPlatform *platform, int master, int slave) /*****************************************************************************/ static gboolean -_infiniband_partition_action(NMPlatform * platform, +_infiniband_partition_action(NMPlatform *platform, InfinibandAction action, int parent, int p_key, @@ -8183,7 +8223,7 @@ _infiniband_partition_action(NMPlatform * platform, { nm_auto_close int dirfd = -1; char ifname_parent[IFNAMSIZ]; - const NMPObject * obj; + const NMPObject *obj; char id[20]; char name[IFNAMSIZ]; gboolean success; @@ -8234,7 +8274,7 @@ _infiniband_partition_action(NMPlatform * platform, } static gboolean -infiniband_partition_add(NMPlatform * platform, +infiniband_partition_add(NMPlatform *platform, int parent, int p_key, const NMPlatformLink **out_link) @@ -8274,7 +8314,7 @@ get_ext_data(NMPlatform *platform, int ifindex) #define WIFI_GET_WIFI_DATA_NETNS(wifi_data, platform, ifindex, retval) \ nm_auto_pop_netns NMPNetns *netns = NULL; \ - NMWifiUtils * wifi_data; \ + NMWifiUtils *wifi_data; \ if (!nm_platform_netns_push(platform, &netns)) \ return retval; \ wifi_data = NM_WIFI_UTILS(get_ext_data(platform, ifindex)); \ @@ -8298,11 +8338,11 @@ wifi_get_frequency(NMPlatform *platform, int ifindex) } static gboolean -wifi_get_station(NMPlatform * platform, +wifi_get_station(NMPlatform *platform, int ifindex, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate) + int *out_quality, + guint32 *out_rate) { WIFI_GET_WIFI_DATA_NETNS(wifi_data, platform, ifindex, FALSE); return nm_wifi_utils_get_station(wifi_data, out_bssid, out_quality, out_rate); @@ -8365,7 +8405,7 @@ link_can_assume(NMPlatform *platform, int ifindex) NMPLookup lookup; const NMPObject *link, *o; NMDedupMultiIter iter; - NMPCache * cache = nm_platform_get_cache(platform); + NMPCache *cache = nm_platform_get_cache(platform); if (ifindex <= 0) return FALSE; @@ -8488,9 +8528,9 @@ link_get_wake_on_lan(NMPlatform *platform, int ifindex) static gboolean link_get_driver_info(NMPlatform *platform, int ifindex, - char ** out_driver_name, - char ** out_driver_version, - char ** out_fw_version) + char **out_driver_name, + char **out_driver_version, + char **out_fw_version) { nm_auto_pop_netns NMPNetns *netns = NULL; NMPUtilsEthtoolDriverInfo driver_info; @@ -8543,7 +8583,7 @@ ip4_address_add(NMPlatform *platform, } static gboolean -ip6_address_add(NMPlatform * platform, +ip6_address_add(NMPlatform *platform, int ifindex, struct in6_addr addr, guint8 plen, @@ -8632,7 +8672,7 @@ ip6_address_delete(NMPlatform *platform, int ifindex, struct in6_addr addr, guin /*****************************************************************************/ static int -ip_route_add(NMPlatform * platform, +ip_route_add(NMPlatform *platform, NMPNlmFlags flags, int addr_family, const NMPlatformIPRoute *route) @@ -8659,7 +8699,7 @@ static gboolean object_delete(NMPlatform *platform, const NMPObject *obj) { nm_auto_nmpobj const NMPObject *obj_keep_alive = NULL; - nm_auto_nlmsg struct nl_msg * nlmsg = NULL; + nm_auto_nlmsg struct nl_msg *nlmsg = NULL; if (!NMP_OBJECT_IS_STACKINIT(obj)) obj_keep_alive = nmp_object_ref(obj); @@ -8690,17 +8730,17 @@ object_delete(NMPlatform *platform, const NMPObject *obj) /*****************************************************************************/ static int -ip_route_get(NMPlatform * platform, +ip_route_get(NMPlatform *platform, int addr_family, gconstpointer address, int oif_ifindex, - NMPObject ** out_route) + NMPObject **out_route) { - const gboolean is_v4 = (addr_family == AF_INET); - const int addr_len = is_v4 ? 4 : 16; - int try_count = 0; - WaitForNlResponseResult seq_result; - int nle; + const gboolean is_v4 = (addr_family == AF_INET); + const int addr_len = is_v4 ? 4 : 16; + int try_count = 0; + WaitForNlResponseResult seq_result; + int nle; nm_auto_nmpobj NMPObject *route = NULL; nm_assert(NM_IS_LINUX_PLATFORM(platform)); @@ -8778,7 +8818,7 @@ routing_rule_add(NMPlatform *platform, NMPNlmFlags flags, const NMPlatformRoutin { WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; nm_auto_nlmsg struct nl_msg *msg = NULL; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; char s_buf[256]; int nle; @@ -8818,7 +8858,7 @@ static int qdisc_add(NMPlatform *platform, NMPNlmFlags flags, const NMPlatformQdisc *qdisc) { WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; int nle; char s_buf[256]; nm_auto_nlmsg struct nl_msg *msg = NULL; @@ -8860,14 +8900,14 @@ static int tc_delete(NMPlatform *platform, int nlmsgtype, int ifindex, guint32 parent, gboolean log_error) { WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; int nle; char s_buf[256]; - const char * log_tag; + const char *log_tag; nm_auto_nlmsg struct nl_msg *msg = NULL; const struct tcmsg tcm = { - .tcm_ifindex = ifindex, - .tcm_parent = parent, + .tcm_ifindex = ifindex, + .tcm_parent = parent, }; switch (nlmsgtype) { @@ -8934,7 +8974,7 @@ static int tfilter_add(NMPlatform *platform, NMPNlmFlags flags, const NMPlatformTfilter *tfilter) { WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - gs_free char * errmsg = NULL; + gs_free char *errmsg = NULL; int nle; char s_buf[256]; nm_auto_nlmsg struct nl_msg *msg = NULL; @@ -8992,39 +9032,44 @@ event_handler(int fd, GIOCondition io_condition, gpointer user_data) static int event_handler_recvmsgs(NMPlatform *platform, gboolean handle_events) { - NMLinuxPlatformPrivate * priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); - struct nl_sock * sk = priv->nlh; - int n; - int err = 0; - gboolean multipart = 0; - gboolean interrupted = FALSE; - struct nlmsghdr * hdr; - WaitForNlResponseResult seq_result; - struct sockaddr_nl nla = {0}; - struct ucred creds; - gboolean creds_has; - nm_auto_free unsigned char *buf = NULL; + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + struct nl_sock *sk = priv->nlh; + int n; + int err = 0; + gboolean multipart = 0; + gboolean interrupted = FALSE; + struct nlmsghdr *hdr; + WaitForNlResponseResult seq_result; + struct sockaddr_nl nla; + struct ucred creds; + gboolean creds_has; + unsigned char *buf; continue_reading: - nm_clear_pointer(&buf, free); - n = nl_recv(sk, &nla, &buf, &creds, &creds_has); + buf = NULL; + + n = nl_recv(sk, + priv->netlink_recv_buf.buf, + priv->netlink_recv_buf.len, + &nla, + &buf, + &creds, + &creds_has); + + nm_assert((n <= 0 && !buf) + || (n > 0 && n <= priv->netlink_recv_buf.len && buf == priv->netlink_recv_buf.buf)); if (n <= 0) { if (n == -NME_NL_MSG_TRUNC) { - int buf_size; - /* the message receive buffer was too small. We lost one message, which * is unfortunate. Try to double the buffer size for the next time. */ - buf_size = nl_socket_get_msg_buf_size(sk); - if (buf_size < 512 * 1024) { - buf_size *= 2; - _LOGT("netlink: recvmsg: increase message buffer size for recvmsg() to %d bytes", - buf_size); - if (nl_socket_set_msg_buf_size(sk, buf_size) < 0) - nm_assert_not_reached(); - if (!handle_events) - goto continue_reading; - } + priv->netlink_recv_buf.len *= 2; + priv->netlink_recv_buf.buf = + g_realloc(priv->netlink_recv_buf.buf, priv->netlink_recv_buf.len); + _LOGT("netlink: recvmsg: increase message buffer size for recvmsg() to %zu bytes", + priv->netlink_recv_buf.len); + if (!handle_events) + goto continue_reading; } return n; @@ -9037,7 +9082,7 @@ continue_reading: gboolean process_valid_msg = FALSE; guint32 seq_number; char buf_nlmsghdr[400]; - const char * extack_msg = NULL; + const char *extack_msg = NULL; msg = nlmsg_alloc_convert(hdr); @@ -9195,15 +9240,15 @@ static gboolean event_handler_read_netlink(NMPlatform *platform, gboolean wait_for_acks) { nm_auto_pop_netns NMPNetns *netns = NULL; - NMLinuxPlatformPrivate * priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); + NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); int r; struct pollfd pfd; gboolean any = FALSE; int timeout_msec; struct { guint32 seq_number; - gint64 timeout_abs_ns; - gint64 now_ns; + gint64 timeout_abs_nsec; + gint64 now_nsec; } next; if (!nm_platform_netns_push(platform, &netns)) { @@ -9275,25 +9320,33 @@ after_read: delayed_action_wait_for_nl_response_complete_check(platform, WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN, &next.seq_number, - &next.timeout_abs_ns, - &next.now_ns); + &next.timeout_abs_nsec, + &next.now_nsec); if (!wait_for_acks || !NM_FLAGS_HAS(priv->delayed_action.flags, DELAYED_ACTION_TYPE_WAIT_FOR_NL_RESPONSE)) return any; nm_assert(next.seq_number); - nm_assert(next.now_ns > 0); - nm_assert(next.timeout_abs_ns > next.now_ns); + nm_assert(next.now_nsec > 0); + nm_assert(next.timeout_abs_nsec > next.now_nsec); + nm_assert(next.timeout_abs_nsec - next.now_nsec <= 200 * (NM_UTILS_NSEC_PER_SEC / 1000)); - _LOGT("netlink: read: wait for ACK for sequence number %u...", next.seq_number); + timeout_msec = + NM_CLAMP((next.timeout_abs_nsec - next.now_nsec) / (NM_UTILS_NSEC_PER_SEC / 1000), + 1, + 1000); - timeout_msec = (next.timeout_abs_ns - next.now_ns) / (NM_UTILS_NSEC_PER_SEC / 1000); + _LOGT("netlink: read: wait for ACK for sequence number %u... (%d msec)", + next.seq_number, + timeout_msec); memset(&pfd, 0, sizeof(pfd)); pfd.fd = nl_socket_get_fd(priv->nlh); pfd.events = POLLIN; - r = poll(&pfd, 1, MAX(1, timeout_msec)); + r = poll(&pfd, 1, timeout_msec); + + _LOGT("netlink: read: poll done (r=%d)", r); if (r == 0) { /* timeout and there is nothing to read. */ @@ -9412,11 +9465,11 @@ static void handle_udev_event(NMUdevClient *udev_client, struct udev_device *udevice, gpointer user_data) { nm_auto_pop_netns NMPNetns *netns = NULL; - NMPlatform * platform = NM_PLATFORM(user_data); - const char * subsys; - const char * ifindex; + NMPlatform *platform = NM_PLATFORM(user_data); + const char *subsys; + const char *ifindex; guint64 seqnum; - const char * action; + const char *action; action = udev_device_get_action(udevice); g_return_if_fail(action); @@ -9449,6 +9502,9 @@ nm_linux_platform_init(NMLinuxPlatform *self) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(self); + priv->netlink_recv_buf.len = 32 * 1024; + priv->netlink_recv_buf.buf = g_malloc(priv->netlink_recv_buf.len); + c_list_init(&priv->sysctl_clear_cache_lst); c_list_init(&priv->sysctl_list); @@ -9461,7 +9517,7 @@ nm_linux_platform_init(NMLinuxPlatform *self) static void constructed(GObject *_object) { - NMPlatform * platform = NM_PLATFORM(_object); + NMPlatform *platform = NM_PLATFORM(_object); NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); int nle; int fd; @@ -9517,10 +9573,10 @@ constructed(GObject *_object) _LOGD("could not enable extended acks on netlink socket"); /* explicitly set the msg buffer size and disable MSG_PEEK. - * If we later encounter NME_NL_MSG_TRUNC, we will adjust the buffer size. */ + * We use our own receive buffer priv->netlink_recv_buf. + * If we encounter NME_NL_MSG_TRUNC, we will increase the buffer + * and resync (as we would have lost the message without NL_MSG_PEEK). */ nl_socket_disable_msg_peek(priv->nlh); - nle = nl_socket_set_msg_buf_size(priv->nlh, 32 * 1024); - g_assert(!nle); nle = nl_socket_add_memberships(priv->nlh, RTNLGRP_IPV4_IFADDR, @@ -9571,7 +9627,7 @@ constructed(GObject *_object) /* Set up udev monitoring */ if (priv->udev_client) { - struct udev_enumerate * enumerator; + struct udev_enumerate *enumerator; struct udev_list_entry *devices, *l; /* And read initial device list */ @@ -9643,7 +9699,7 @@ nm_linux_platform_new(gboolean log_with_ptr, gboolean netns_support, gboolean ca static void dispose(GObject *object) { - NMPlatform * platform = NM_PLATFORM(object); + NMPlatform *platform = NM_PLATFORM(object); NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE(platform); _LOGD("dispose"); @@ -9688,12 +9744,14 @@ finalize(GObject *object) priv->udev_client = nm_udev_client_destroy(priv->udev_client); G_OBJECT_CLASS(nm_linux_platform_parent_class)->finalize(object); + + g_free(priv->netlink_recv_buf.buf); } static void nm_linux_platform_class_init(NMLinuxPlatformClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMPlatformClass *platform_class = NM_PLATFORM_CLASS(klass); object_class->constructed = constructed; diff --git a/src/libnm-platform/nm-netlink.c b/src/libnm-platform/nm-netlink.c index 56cde50c..697ae591 100644 --- a/src/libnm-platform/nm-netlink.c +++ b/src/libnm-platform/nm-netlink.c @@ -32,7 +32,7 @@ struct nl_msg { struct sockaddr_nl nm_src; struct sockaddr_nl nm_dst; struct ucred nm_creds; - struct nlmsghdr * nm_nlh; + struct nlmsghdr *nm_nlh; size_t nm_size; bool nm_creds_has : 1; }; @@ -245,7 +245,7 @@ nlmsg_hdr(struct nl_msg *n) void * nlmsg_reserve(struct nl_msg *n, size_t len, int pad) { - char * buf = (char *) n->nm_nlh; + char *buf = (char *) n->nm_nlh; size_t nlmsg_len = n->nm_nlh->nlmsg_len; size_t tlen; @@ -386,9 +386,9 @@ nlmsg_append(struct nl_msg *n, const void *data, size_t len, int pad) /*****************************************************************************/ int -nlmsg_parse(struct nlmsghdr * nlh, +nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, - struct nlattr * tb[], + struct nlattr *tb[], int maxtype, const struct nla_policy *policy) { @@ -639,9 +639,9 @@ validate_nla(const struct nlattr *nla, int maxtype, const struct nla_policy *pol } int -nla_parse(struct nlattr * tb[], +nla_parse(struct nlattr *tb[], int maxtype, - struct nlattr * head, + struct nlattr *head, int len, const struct nla_policy *policy) { @@ -718,7 +718,7 @@ genlmsg_put(struct nl_msg *msg, uint8_t cmd, uint8_t version) { - struct nlmsghdr * nlh; + struct nlmsghdr *nlh; struct genlmsghdr hdr = { .cmd = cmd, .version = version, @@ -794,9 +794,9 @@ genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen) } int -genlmsg_parse(struct nlmsghdr * nlh, +genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, - struct nlattr * tb[], + struct nlattr *tb[], int maxtype, const struct nla_policy *policy) { @@ -825,9 +825,9 @@ _genl_parse_getfamily(struct nl_msg *msg, void *arg) [CTRL_ATTR_OPS] = {.type = NLA_NESTED}, [CTRL_ATTR_MCAST_GROUPS] = {.type = NLA_NESTED}, }; - struct nlattr * tb[G_N_ELEMENTS(ctrl_policy)]; + struct nlattr *tb[G_N_ELEMENTS(ctrl_policy)]; struct nlmsghdr *nlh = nlmsg_hdr(msg); - gint32 * response_data = arg; + gint32 *response_data = arg; if (genlmsg_parse_arr(nlh, 0, tb, ctrl_policy) < 0) return NL_SKIP; @@ -845,8 +845,8 @@ genl_ctrl_resolve(struct nl_sock *sk, const char *name) int nmerr; gint32 response_data = -1; const struct nl_cb cb = { - .valid_cb = _genl_parse_getfamily, - .valid_arg = &response_data, + .valid_cb = _genl_parse_getfamily, + .valid_arg = &response_data, }; msg = nlmsg_alloc(); @@ -1170,13 +1170,13 @@ nl_recvmsgs(struct nl_sock *sk, const struct nl_cb *cb) { int n, nmerr = 0, multipart = 0, interrupted = 0, nrecv = 0; gs_free unsigned char *buf = NULL; - struct nlmsghdr * hdr; - struct sockaddr_nl nla = {0}; + struct nlmsghdr *hdr; + struct sockaddr_nl nla; struct ucred creds; gboolean creds_has; continue_reading: - n = nl_recv(sk, &nla, &buf, &creds, &creds_has); + n = nl_recv(sk, NULL, 0, &nla, &buf, &creds, &creds_has); if (n <= 0) return n; @@ -1327,12 +1327,12 @@ int nl_send_iovec(struct nl_sock *sk, struct nl_msg *msg, struct iovec *iov, unsigned iovlen) { struct sockaddr_nl *dst; - struct ucred * creds; + struct ucred *creds; struct msghdr hdr = { - .msg_name = (void *) &sk->s_peer, - .msg_namelen = sizeof(struct sockaddr_nl), - .msg_iov = iov, - .msg_iovlen = iovlen, + .msg_name = (void *) &sk->s_peer, + .msg_namelen = sizeof(struct sockaddr_nl), + .msg_iov = iov, + .msg_iovlen = iovlen, }; char buf[CMSG_SPACE(sizeof(struct ucred))]; @@ -1401,12 +1401,41 @@ nl_send_auto(struct nl_sock *sk, struct nl_msg *msg) return nl_send(sk, msg); } +/** + * nl_recv(): + * @sk: the netlink socket + * @buf0: NULL or a receive buffer of length @buf0_len + * @buf0_len: the length of the optional receive buffer. + * @nla: (out): the source address on success. + * @buf: (out): pointer to the result buffer on success. This is + * either @buf0 or an allocated buffer that gets returned. + * @out_creds: (out) (allow-none): optional out buffer for the credentials + * on success. + * @out_creds_has: (out) (allow-none): result indicating whether + * @out_creds was filled. + * + * If @buf0_len is zero, the function will g_malloc() a new receive buffer of size + * nl_socket_get_msg_buf_size(). If @buf0_len is larger than zero, then @buf0 + * is used as receive buffer. That is also the buffer returned by @buf. + * + * If NL_MSG_PEEK is not enabled and the receive buffer is too small, then + * the message was lost and -NME_NL_MSG_TRUNC gets returned. + * If NL_MSG_PEEK is enabled, then we first peek. If the buffer is too small, + * we g_malloc() a new buffer. In any case, we proceed to receive the buffer. + * NL_MSG_PEEK is great because it means no messages are lost. But it's bad, + * because we always need two syscalls on every receive. + * + * Returns: a negative error code or the length of the received message in + * @buf. + */ int -nl_recv(struct nl_sock * sk, +nl_recv(struct nl_sock *sk, + unsigned char *buf0, + size_t buf0_len, struct sockaddr_nl *nla, - unsigned char ** buf, - struct ucred * out_creds, - gboolean * out_creds_has) + unsigned char **buf, + struct ucred *out_creds, + gboolean *out_creds_has) { /* We really expect msg_contol_buf to be large enough and MSG_CTRUNC not * happening. We nm_assert() against that. However, in release builds @@ -1443,8 +1472,13 @@ nl_recv(struct nl_sock * sk, || (!(sk->s_flags & NL_MSG_PEEK_EXPLICIT) && sk->s_bufsize == 0)) flags |= MSG_PEEK | MSG_TRUNC; - iov.iov_len = sk->s_bufsize ?: (((size_t) nm_utils_getpagesize()) * 4u); - iov.iov_base = g_malloc(iov.iov_len); + if (buf0_len > 0) { + iov.iov_len = buf0_len; + iov.iov_base = buf0; + } else { + iov.iov_len = sk->s_bufsize ?: (((size_t) nm_utils_getpagesize()) * 4u); + iov.iov_base = g_malloc(iov.iov_len); + } if (out_creds && (sk->s_flags & NL_SOCK_PASSCRED)) { msg.msg_controllen = sizeof(msg_contol_buf); @@ -1482,7 +1516,7 @@ retry: /* Provided buffer is not long enough, enlarge it * to size of n (which should be total length of the message) * and try again. */ - iov.iov_base = g_realloc(iov.iov_base, n); + iov.iov_base = g_realloc(iov.iov_base != buf0 ? iov.iov_base : NULL, n); iov.iov_len = n; flags = 0; goto retry; @@ -1517,7 +1551,8 @@ retry: abort: if (retval <= 0) { - g_free(iov.iov_base); + if (iov.iov_base != buf0) + g_free(iov.iov_base); return retval; } diff --git a/src/libnm-platform/nm-netlink.h b/src/libnm-platform/nm-netlink.h index 00d817cd..bb1e41ee 100644 --- a/src/libnm-platform/nm-netlink.h +++ b/src/libnm-platform/nm-netlink.h @@ -328,9 +328,9 @@ void nla_nest_cancel(struct nl_msg *msg, const struct nlattr *attr); struct nlattr *nla_nest_start(struct nl_msg *msg, int attrtype); int nla_nest_end(struct nl_msg *msg, struct nlattr *start); -int nla_parse(struct nlattr * tb[], +int nla_parse(struct nlattr *tb[], int maxtype, - struct nlattr * head, + struct nlattr *head, int len, const struct nla_policy *policy); @@ -342,9 +342,9 @@ int nla_parse(struct nlattr * tb[], }) static inline int -nla_parse_nested(struct nlattr * tb[], +nla_parse_nested(struct nlattr *tb[], int maxtype, - struct nlattr * nla, + struct nlattr *nla, const struct nla_policy *policy) { return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); @@ -468,9 +468,9 @@ nlmsg_find_attr(struct nlmsghdr *nlh, int hdrlen, int attrtype) return nla_find(nlmsg_attrdata(nlh, hdrlen), nlmsg_attrlen(nlh, hdrlen), attrtype); } -int nlmsg_parse(struct nlmsghdr * nlh, +int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, - struct nlattr * tb[], + struct nlattr *tb[], int maxtype, const struct nla_policy *policy); @@ -517,11 +517,13 @@ int nl_socket_add_memberships(struct nl_sock *sk, int group, ...); int nl_connect(struct nl_sock *sk, int protocol); -int nl_recv(struct nl_sock * sk, +int nl_recv(struct nl_sock *sk, + unsigned char *buf0, + size_t buf0_len, struct sockaddr_nl *nla, - unsigned char ** buf, - struct ucred * out_creds, - gboolean * out_creds_has); + unsigned char **buf, + struct ucred *out_creds, + gboolean *out_creds_has); int nl_send(struct nl_sock *sk, struct nl_msg *msg); @@ -544,16 +546,16 @@ typedef int (*nl_recvmsg_err_cb_t)(struct sockaddr_nl *nla, struct nlmsgerr *nle struct nl_cb { nl_recvmsg_msg_cb_t valid_cb; - void * valid_arg; + void *valid_arg; nl_recvmsg_msg_cb_t finish_cb; - void * finish_arg; + void *finish_arg; nl_recvmsg_msg_cb_t ack_cb; - void * ack_arg; + void *ack_arg; nl_recvmsg_err_cb_t err_cb; - void * err_arg; + void *err_arg; }; int nl_sendmsg(struct nl_sock *sk, struct nl_msg *msg, struct msghdr *hdr); @@ -570,7 +572,7 @@ int nl_socket_set_ext_ack(struct nl_sock *sk, gboolean enable); /*****************************************************************************/ -void * genlmsg_put(struct nl_msg *msg, +void *genlmsg_put(struct nl_msg *msg, uint32_t port, uint32_t seq, int family, @@ -578,18 +580,18 @@ void * genlmsg_put(struct nl_msg *msg, int flags, uint8_t cmd, uint8_t version); -void * genlmsg_data(const struct genlmsghdr *gnlh); -void * genlmsg_user_hdr(const struct genlmsghdr *gnlh); +void *genlmsg_data(const struct genlmsghdr *gnlh); +void *genlmsg_user_hdr(const struct genlmsghdr *gnlh); struct genlmsghdr *genlmsg_hdr(struct nlmsghdr *nlh); -void * genlmsg_user_data(const struct genlmsghdr *gnlh, const int hdrlen); -struct nlattr * genlmsg_attrdata(const struct genlmsghdr *gnlh, int hdrlen); +void *genlmsg_user_data(const struct genlmsghdr *gnlh, const int hdrlen); +struct nlattr *genlmsg_attrdata(const struct genlmsghdr *gnlh, int hdrlen); int genlmsg_len(const struct genlmsghdr *gnlh); int genlmsg_attrlen(const struct genlmsghdr *gnlh, int hdrlen); int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen); -int genlmsg_parse(struct nlmsghdr * nlh, +int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, - struct nlattr * tb[], + struct nlattr *tb[], int maxtype, const struct nla_policy *policy); diff --git a/src/libnm-platform/nm-platform-private.h b/src/libnm-platform/nm-platform-private.h index cf805689..7537bb0b 100644 --- a/src/libnm-platform/nm-platform-private.h +++ b/src/libnm-platform/nm-platform-private.h @@ -21,7 +21,7 @@ NMPCache *nm_platform_get_cache(NMPlatform *self); } \ G_STMT_END -void nm_platform_cache_update_emit_signal(NMPlatform * platform, +void nm_platform_cache_update_emit_signal(NMPlatform *platform, NMPCacheOpsType cache_op, const NMPObject *obj_old, const NMPObject *obj_new); diff --git a/src/libnm-platform/nm-platform-utils.c b/src/libnm-platform/nm-platform-utils.c index f0522736..9ad030df 100644 --- a/src/libnm-platform/nm-platform-utils.c +++ b/src/libnm-platform/nm-platform-utils.c @@ -91,16 +91,16 @@ typedef enum { } IoctlCallDataType; static int -_ioctl_call(const char * log_ioctl_type, - const char * log_subtype, +_ioctl_call(const char *log_ioctl_type, + const char *log_subtype, unsigned long int ioctl_request, int ifindex, - int * inout_fd, - char * inout_ifname, + int *inout_fd, + char *inout_ifname, IoctlCallDataType edata_type, gpointer edata, gsize edata_size, - struct ifreq * out_ifreq) + struct ifreq *out_ifreq) { nm_auto_close int fd_close = -1; int fd; @@ -109,7 +109,7 @@ _ioctl_call(const char * log_ioctl_type, gs_free gpointer edata_backup_free = NULL; guint try_count; char known_ifnames[2][IFNAMSIZ]; - const char * failure_reason = NULL; + const char *failure_reason = NULL; struct ifreq ifr; nm_assert(ifindex > 0); @@ -365,7 +365,7 @@ ethtool_get_stringset(SocketHandle *shandle, int stringset_id) .info.reserved = 0, .info.sset_mask = (1ULL << stringset_id), }; - const guint32 * pdata; + const guint32 *pdata; gs_free struct ethtool_gstrings *gstrings = NULL; gsize gstrings_len; guint32 i, len; @@ -574,7 +574,7 @@ _ASSERT_ethtool_feature_infos(void) static NMEthtoolFeatureStates * ethtool_get_features(SocketHandle *shandle) { - gs_free NMEthtoolFeatureStates * states = NULL; + gs_free NMEthtoolFeatureStates *states = NULL; gs_free struct ethtool_gstrings *ss_features = NULL; _ASSERT_ethtool_feature_infos(); @@ -584,11 +584,11 @@ ethtool_get_features(SocketHandle *shandle) return NULL; if (ss_features->len > 0) { - gs_free struct ethtool_gfeatures * gfeatures_free = NULL; - struct ethtool_gfeatures * gfeatures; + gs_free struct ethtool_gfeatures *gfeatures_free = NULL; + struct ethtool_gfeatures *gfeatures; gsize gfeatures_len; guint idx; - const NMEthtoolFeatureState * states_list0 = NULL; + const NMEthtoolFeatureState *states_list0 = NULL; const NMEthtoolFeatureState *const *states_plist0 = NULL; guint states_plist_n = 0; @@ -606,7 +606,7 @@ ethtool_get_features(SocketHandle *shandle) for (idx_kernel_name = 0; idx_kernel_name < info->n_kernel_names; idx_kernel_name++) { NMEthtoolFeatureState *kstate; - const char * kernel_name = info->kernel_names[idx_kernel_name]; + const char *kernel_name = info->kernel_names[idx_kernel_name]; int i_feature; guint i_block; guint32 i_flag; @@ -667,7 +667,7 @@ NMEthtoolFeatureStates * nmp_utils_ethtool_get_features(int ifindex) { nm_auto_socket_handle SocketHandle shandle = SOCKET_HANDLE_INIT(ifindex); - NMEthtoolFeatureStates * features; + NMEthtoolFeatureStates *features; g_return_val_if_fail(ifindex > 0, 0); @@ -689,10 +689,10 @@ nmp_utils_ethtool_get_features(int ifindex) } static const char * -_ethtool_feature_state_to_string(char * buf, +_ethtool_feature_state_to_string(char *buf, gsize buf_size, const NMEthtoolFeatureState *s, - const char * prefix) + const char *prefix) { int l; @@ -718,8 +718,8 @@ nmp_utils_ethtool_set_features( gboolean do_set /* or reset */) { nm_auto_socket_handle SocketHandle shandle = SOCKET_HANDLE_INIT(ifindex); - gs_free struct ethtool_sfeatures * sfeatures_free = NULL; - struct ethtool_sfeatures * sfeatures; + gs_free struct ethtool_sfeatures *sfeatures_free = NULL; + struct ethtool_sfeatures *sfeatures; gsize sfeatures_len; int r; guint i, j; @@ -1215,8 +1215,8 @@ gboolean nmp_utils_ethtool_supports_vlans(int ifindex) { nm_auto_socket_handle SocketHandle shandle = SOCKET_HANDLE_INIT(ifindex); - gs_free struct ethtool_gfeatures * features_free = NULL; - struct ethtool_gfeatures * features; + gs_free struct ethtool_gfeatures *features_free = NULL; + struct ethtool_gfeatures *features; gsize features_len; int idx, block, bit, size; @@ -1250,8 +1250,8 @@ nmp_utils_ethtool_get_peer_ifindex(int ifindex) { nm_auto_socket_handle SocketHandle shandle = SOCKET_HANDLE_INIT(ifindex); gsize stats_len; - gs_free struct ethtool_stats * stats_free = NULL; - struct ethtool_stats * stats; + gs_free struct ethtool_stats *stats_free = NULL; + struct ethtool_stats *stats; int peer_ifindex_stat; g_return_val_if_fail(ifindex > 0, 0); @@ -1289,8 +1289,8 @@ nmp_utils_ethtool_get_wake_on_lan(int ifindex) gboolean nmp_utils_ethtool_get_link_settings(int ifindex, - gboolean * out_autoneg, - guint32 * out_speed, + gboolean *out_autoneg, + guint32 *out_speed, NMPlatformLinkDuplexType *out_duplex) { struct ethtool_cmd edata = { @@ -1474,7 +1474,7 @@ const guint32 _nmp_link_mode_all_advertised_modes[] = { }; static NMOptionBool -set_link_settings_new(SocketHandle * shandle, +set_link_settings_new(SocketHandle *shandle, gboolean autoneg, guint32 speed, NMPlatformLinkDuplexType duplex) @@ -1512,8 +1512,8 @@ set_link_settings_new(SocketHandle * shandle, { const guint32 *v_map_supported = &edata->link_mode_masks[0]; - guint32 * v_map_advertising = &edata->link_mode_masks[nwords]; - guint32 * v_map_lp_advertising = &edata->link_mode_masks[2 * nwords]; + guint32 *v_map_advertising = &edata->link_mode_masks[nwords]; + guint32 *v_map_lp_advertising = &edata->link_mode_masks[2 * nwords]; memcpy(v_map_advertising, v_map_supported, sizeof(guint32) * nwords); (void) v_map_lp_advertising; @@ -1574,7 +1574,7 @@ nmp_utils_ethtool_set_link_settings(int ifindex, { nm_auto_socket_handle SocketHandle shandle = SOCKET_HANDLE_INIT(ifindex); struct ethtool_cmd edata = { - .cmd = ETHTOOL_GSET, + .cmd = ETHTOOL_GSET, }; NMOptionBool ret; @@ -1651,7 +1651,7 @@ set_autoneg: gboolean nmp_utils_ethtool_set_wake_on_lan(int ifindex, _NMSettingWiredWakeOnLan wol, - const char * wol_password) + const char *wol_password) { struct ethtool_wolinfo wol_info = { .cmd = ETHTOOL_SWOL, @@ -1706,7 +1706,7 @@ nmp_utils_mii_supports_carrier_detect(int ifindex) nm_auto_socket_handle SocketHandle shandle = SOCKET_HANDLE_INIT(ifindex); int r; struct ifreq ifr; - struct mii_ioctl_data * mii; + struct mii_ioctl_data *mii; g_return_val_if_fail(ifindex > 0, FALSE); @@ -1757,7 +1757,7 @@ const char * nmp_utils_udev_get_driver(struct udev_device *udevice) { struct udev_device *parent = NULL, *grandparent = NULL; - const char * driver, *subsys; + const char *driver, *subsys; driver = udev_device_get_driver(udevice); if (driver) @@ -2194,10 +2194,10 @@ nmp_utils_modprobe(GError **error, gboolean suppress_error_logging, const char * { gs_unref_ptrarray GPtrArray *argv = NULL; int exit_status; - gs_free char * _log_str = NULL; + gs_free char *_log_str = NULL; #define ARGV_TO_STR(argv) \ (_log_str ? _log_str : (_log_str = g_strjoinv(" ", (char **) argv->pdata))) - GError * local = NULL; + GError *local = NULL; va_list ap; NMLogLevel llevel = suppress_error_logging ? LOGL_DEBUG : LOGL_ERR; gs_free char *std_out = NULL, *std_err = NULL; diff --git a/src/libnm-platform/nm-platform-utils.h b/src/libnm-platform/nm-platform-utils.h index 5511e8af..a9ccebb3 100644 --- a/src/libnm-platform/nm-platform-utils.h +++ b/src/libnm-platform/nm-platform-utils.h @@ -18,7 +18,7 @@ int nmp_utils_ethtool_get_peer_ifindex(int ifindex); gboolean nmp_utils_ethtool_get_wake_on_lan(int ifindex); gboolean nmp_utils_ethtool_set_wake_on_lan(int ifindex, _NMSettingWiredWakeOnLan wol, - const char * wol_password); + const char *wol_password); const char *nm_platform_link_duplex_type_to_string(NMPlatformLinkDuplexType duplex); @@ -26,8 +26,8 @@ extern const guint8 _nmp_link_mode_all_advertised_modes_bits[79]; extern const guint32 _nmp_link_mode_all_advertised_modes[3]; gboolean nmp_utils_ethtool_get_link_settings(int ifindex, - gboolean * out_autoneg, - guint32 * out_speed, + gboolean *out_autoneg, + guint32 *out_speed, NMPlatformLinkDuplexType *out_duplex); gboolean nmp_utils_ethtool_set_link_settings(int ifindex, gboolean autoneg, @@ -77,7 +77,7 @@ int nmp_utils_if_nametoindex(const char *ifname); int nmp_utils_sysctl_open_netdir(int ifindex, const char *ifname_guess, char *out_ifname); -char * nmp_utils_new_vlan_name(const char *parent_iface, guint32 vlan_id); +char *nmp_utils_new_vlan_name(const char *parent_iface, guint32 vlan_id); const char *nmp_utils_new_infiniband_name(char *name, const char *parent_name, int p_key); guint32 diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index 5d4ec037..a4863c0d 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -115,9 +115,9 @@ nmp_link_address_get_as_bytes(const NMPLinkAddress *addr) #define NMLOG_COMMON(level, name, ...) \ char __prefix[32]; \ - const char * __p_prefix = _NMLOG_PREFIX_NAME; \ + const char *__p_prefix = _NMLOG_PREFIX_NAME; \ const NMPlatform *const __self = (self); \ - const char * __name = name; \ + const char *__name = name; \ \ if (__self && NM_PLATFORM_GET_PRIVATE(__self)->log_with_ptr) { \ g_snprintf(__prefix, sizeof(__prefix), "%s[%p]", _NMLOG_PREFIX_NAME, __self); \ @@ -187,9 +187,9 @@ typedef struct _NMPlatformPrivate { guint ip4_dev_route_blacklist_check_id; guint ip4_dev_route_blacklist_gc_timeout_id; - GHashTable * ip4_dev_route_blacklist_hash; + GHashTable *ip4_dev_route_blacklist_hash; NMDedupMultiIndex *multi_idx; - NMPCache * cache; + NMPCache *cache; } NMPlatformPrivate; G_DEFINE_TYPE(NMPlatform, nm_platform, G_TYPE_OBJECT) @@ -255,7 +255,7 @@ _nm_platform_signal_id_get(NMPlatformSignalIdType signal_type) #define _CHECK_SELF_NETNS(self, klass, netns, err_val) \ nm_auto_pop_netns NMPNetns *netns = NULL; \ - NMPlatformClass * klass; \ + NMPlatformClass *klass; \ do { \ g_return_val_if_fail(NM_IS_PLATFORM(self), err_val); \ klass = NM_PLATFORM_GET_CLASS(self); \ @@ -531,14 +531,14 @@ nm_platform_sysctl_set(NMPlatform *self, * independently of how /proc/sys/kernel/sysctl_writes_strict is configured. */ void -nm_platform_sysctl_set_async(NMPlatform * self, - const char * pathid, +nm_platform_sysctl_set_async(NMPlatform *self, + const char *pathid, int dirfd, - const char * path, - const char *const * values, + const char *path, + const char *const *values, NMPlatformAsyncCallback callback, gpointer data, - GCancellable * cancellable) + GCancellable *cancellable) { _CHECK_SELF_VOID(self, klass); @@ -717,7 +717,7 @@ nm_platform_sysctl_get_int_checked(NMPlatform *self, gint64 max, gint64 fallback) { - char * value = NULL; + char *value = NULL; gint32 ret; int errsv; @@ -821,7 +821,7 @@ int nm_platform_sysctl_ip_conf_get_rp_filter_ipv4(NMPlatform *self, const char *ifname, gboolean consider_all, - gboolean * out_due_to_all) + gboolean *out_due_to_all) { int val, val_all; @@ -899,11 +899,11 @@ _link_get_all_presort(gconstpointer p_a, gconstpointer p_b, gpointer sort_by_nam GPtrArray * nm_platform_link_get_all(NMPlatform *self, gboolean sort_by_name) { - gs_unref_ptrarray GPtrArray *links = NULL; - GPtrArray * result; - guint i, nresult; + gs_unref_ptrarray GPtrArray *links = NULL; + GPtrArray *result; + guint i, nresult; gs_unref_hashtable GHashTable *unseen = NULL; - const NMPlatformLink * item; + const NMPlatformLink *item; NMPLookup lookup; _CHECK_SELF(self, klass, NULL); @@ -1077,7 +1077,7 @@ struct _nm_platform_link_get_by_address_data { }; static gboolean -_nm_platform_link_get_by_address_match_link(const NMPObject * obj, +_nm_platform_link_get_by_address_match_link(const NMPObject *obj, struct _nm_platform_link_get_by_address_data *d) { return obj->link.l_address.len == d->len && !memcmp(obj->link.l_address.data, d->data, d->len); @@ -1093,12 +1093,12 @@ _nm_platform_link_get_by_address_match_link(const NMPObject * * address. **/ const NMPlatformLink * -nm_platform_link_get_by_address(NMPlatform * self, +nm_platform_link_get_by_address(NMPlatform *self, NMLinkType link_type, gconstpointer address, size_t length) { - const NMPObject * obj; + const NMPObject *obj; struct _nm_platform_link_get_by_address_data d = { .data = address, .len = length, @@ -1125,8 +1125,8 @@ nm_platform_link_get_by_address(NMPlatform * self, } static int -_link_add_check_existing(NMPlatform * self, - const char * name, +_link_add_check_existing(NMPlatform *self, + const char *name, NMLinkType type, const NMPlatformLink **out_link) { @@ -1174,11 +1174,11 @@ _link_add_check_existing(NMPlatform * self, * Returns: the negative nm-error on failure. */ int -nm_platform_link_add(NMPlatform * self, +nm_platform_link_add(NMPlatform *self, NMLinkType type, - const char * name, + const char *name, int parent, - const void * address, + const void *address, size_t address_len, guint32 mtu, gconstpointer extra_data, @@ -1439,13 +1439,13 @@ nm_platform_link_get_type_name(NMPlatform *self, int ifindex) } gboolean -nm_platform_link_get_udev_property(NMPlatform * self, +nm_platform_link_get_udev_property(NMPlatform *self, int ifindex, - const char * name, + const char *name, const char **out_value) { struct udev_device *udevice = NULL; - const char * uproperty; + const char *uproperty; udevice = nm_platform_link_get_udev_device(self, ifindex); if (!udevice) @@ -1717,7 +1717,7 @@ nm_platform_link_get_address(NMPlatform *self, int ifindex, size_t *length) * address. */ gboolean -nm_platform_link_get_permanent_address_ethtool(NMPlatform * self, +nm_platform_link_get_permanent_address_ethtool(NMPlatform *self, int ifindex, NMPLinkAddress *out_address) { @@ -1735,9 +1735,9 @@ nm_platform_link_get_permanent_address_ethtool(NMPlatform * self, } gboolean -nm_platform_link_get_permanent_address(NMPlatform * self, +nm_platform_link_get_permanent_address(NMPlatform *self, const NMPlatformLink *plink, - NMPLinkAddress * out_address) + NMPLinkAddress *out_address) { _CHECK_SELF(self, klass, FALSE); nm_assert(out_address); @@ -1804,13 +1804,13 @@ nm_platform_link_supports_sriov(NMPlatform *self, int ifindex) * always invoked, and asynchronously. */ void -nm_platform_link_set_sriov_params_async(NMPlatform * self, +nm_platform_link_set_sriov_params_async(NMPlatform *self, int ifindex, guint num_vfs, NMOptionBool autoprobe, NMPlatformAsyncCallback callback, gpointer callback_data, - GCancellable * cancellable) + GCancellable *cancellable) { _CHECK_SELF_VOID(self, klass); @@ -1845,7 +1845,7 @@ nm_platform_link_set_sriov_vfs(NMPlatform *self, int ifindex, const NMPlatformVF } gboolean -nm_platform_link_set_bridge_vlans(NMPlatform * self, +nm_platform_link_set_bridge_vlans(NMPlatform *self, int ifindex, gboolean on_master, const NMPlatformBridgeVlan *const *vlans) @@ -2038,9 +2038,9 @@ nm_platform_link_get_wake_on_lan(NMPlatform *self, int ifindex) gboolean nm_platform_link_get_driver_info(NMPlatform *self, int ifindex, - char ** out_driver_name, - char ** out_driver_version, - char ** out_fw_version) + char **out_driver_name, + char **out_driver_version, + char **out_fw_version) { _CHECK_SELF(self, klass, FALSE); @@ -2149,7 +2149,7 @@ nm_platform_link_can_assume(NMPlatform *self, int ifindex) * (but don't modify it). */ const NMPObject * -nm_platform_link_get_lnk(NMPlatform * self, +nm_platform_link_get_lnk(NMPlatform *self, int ifindex, NMLinkType link_type, const NMPlatformLink **out_link) @@ -2308,10 +2308,10 @@ static NM_UTILS_FLAGS2STR_DEFINE( NM_UTILS_FLAGS2STR(NM_PLATFORM_WIREGUARD_CHANGE_PEER_FLAG_REPLACE_ALLOWEDIPS, "remove-aips"), ); int -nm_platform_link_wireguard_change(NMPlatform * self, +nm_platform_link_wireguard_change(NMPlatform *self, int ifindex, - const NMPlatformLnkWireGuard * lnk_wireguard, - const NMPWireGuardPeer * peers, + const NMPlatformLnkWireGuard *lnk_wireguard, + const NMPWireGuardPeer *peers, const NMPlatformWireGuardChangePeerFlags *peer_flags, guint peers_len, NMPlatformWireGuardChangeFlags change_flags) @@ -2391,11 +2391,11 @@ nm_platform_link_wireguard_change(NMPlatform * self * Create a TUN or TAP interface. */ int -nm_platform_link_tun_add(NMPlatform * self, - const char * name, +nm_platform_link_tun_add(NMPlatform *self, + const char *name, const NMPlatformLnkTun *props, - const NMPlatformLink ** out_link, - int * out_fd) + const NMPlatformLink **out_link, + int *out_fd) { char b[255]; int r; @@ -2466,7 +2466,7 @@ link_set_option(NMPlatform *self, { nm_auto_close int dirfd = -1; char ifname_verified[IFNAMSIZ]; - const char * path; + const char *path; if (!category || !option) return FALSE; @@ -2487,7 +2487,7 @@ link_get_option(NMPlatform *self, int ifindex, const char *category, const char { nm_auto_close int dirfd = -1; char ifname_verified[IFNAMSIZ]; - const char * path; + const char *path; if (!category || !option) return NULL; @@ -2588,7 +2588,7 @@ nm_platform_sysctl_slave_get_option(NMPlatform *self, int ifindex, const char *o /*****************************************************************************/ gboolean -nm_platform_link_vlan_change(NMPlatform * self, +nm_platform_link_vlan_change(NMPlatform *self, int ifindex, _NMVlanFlags flags_mask, _NMVlanFlags flags_set, @@ -2680,7 +2680,7 @@ nm_platform_link_vlan_set_egress_map(NMPlatform *self, int ifindex, int from, in } static int -_infiniband_add_add_or_delete(NMPlatform * self, +_infiniband_add_add_or_delete(NMPlatform *self, int ifindex, int p_key, gboolean add, @@ -2727,7 +2727,7 @@ _infiniband_add_add_or_delete(NMPlatform * self, } int -nm_platform_link_infiniband_add(NMPlatform * self, +nm_platform_link_infiniband_add(NMPlatform *self, int parent, int p_key, const NMPlatformLink **out_link) @@ -2742,18 +2742,18 @@ nm_platform_link_infiniband_delete(NMPlatform *self, int parent, int p_key) } gboolean -nm_platform_link_infiniband_get_properties(NMPlatform * self, +nm_platform_link_infiniband_get_properties(NMPlatform *self, int ifindex, - int * out_parent, - int * out_p_key, + int *out_parent, + int *out_p_key, const char **out_mode) { nm_auto_close int dirfd = -1; char ifname_verified[IFNAMSIZ]; const NMPlatformLnkInfiniband *plnk; - const NMPlatformLink * plink; - char * contents; - const char * mode; + const NMPlatformLink *plink; + char *contents; + const char *mode; int p_key = 0; _CHECK_SELF(self, klass, FALSE); @@ -2968,11 +2968,11 @@ nm_platform_wifi_get_frequency(NMPlatform *self, int ifindex) } gboolean -nm_platform_wifi_get_station(NMPlatform * self, +nm_platform_wifi_get_station(NMPlatform *self, int ifindex, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate) + int *out_quality, + guint32 *out_rate) { _CHECK_SELF(self, klass, FALSE); @@ -3147,7 +3147,7 @@ _to_string_dev(NMPlatform *self, int ifindex, char *buf, size_t size) if (ifindex) { const char *name = ifindex > 0 && self ? nm_platform_link_get_name(self, ifindex) : NULL; - char * buf2; + char *buf2; strcpy(buf, " dev "); buf2 = buf + 5; @@ -3188,10 +3188,10 @@ _to_string_ifa_flags(guint32 ifa_flags, char *buf, gsize size) /*****************************************************************************/ gboolean -nm_platform_ethtool_set_wake_on_lan(NMPlatform * self, +nm_platform_ethtool_set_wake_on_lan(NMPlatform *self, int ifindex, _NMSettingWiredWakeOnLan wol, - const char * wol_password) + const char *wol_password) { _CHECK_SELF_NETNS(self, klass, netns, FALSE); @@ -3201,7 +3201,7 @@ nm_platform_ethtool_set_wake_on_lan(NMPlatform * self, } gboolean -nm_platform_ethtool_set_link_settings(NMPlatform * self, +nm_platform_ethtool_set_link_settings(NMPlatform *self, int ifindex, gboolean autoneg, guint32 speed, @@ -3215,10 +3215,10 @@ nm_platform_ethtool_set_link_settings(NMPlatform * self, } gboolean -nm_platform_ethtool_get_link_settings(NMPlatform * self, +nm_platform_ethtool_get_link_settings(NMPlatform *self, int ifindex, - gboolean * out_autoneg, - guint32 * out_speed, + gboolean *out_autoneg, + guint32 *out_speed, NMPlatformLinkDuplexType *out_duplex) { _CHECK_SELF_NETNS(self, klass, netns, FALSE); @@ -3242,7 +3242,7 @@ nm_platform_ethtool_get_link_features(NMPlatform *self, int ifindex) gboolean nm_platform_ethtool_set_features( - NMPlatform * self, + NMPlatform *self, int ifindex, const NMEthtoolFeatureStates *features, const NMOptionBool *requested /* indexed by NMEthtoolID - _NM_ETHTOOL_ID_FEATURE_FIRST */, @@ -3256,7 +3256,7 @@ nm_platform_ethtool_set_features( } gboolean -nm_platform_ethtool_get_link_coalesce(NMPlatform * self, +nm_platform_ethtool_get_link_coalesce(NMPlatform *self, int ifindex, NMEthtoolCoalesceState *coalesce) { @@ -3269,7 +3269,7 @@ nm_platform_ethtool_get_link_coalesce(NMPlatform * self, } gboolean -nm_platform_ethtool_set_coalesce(NMPlatform * self, +nm_platform_ethtool_set_coalesce(NMPlatform *self, int ifindex, const NMEthtoolCoalesceState *coalesce) { @@ -3380,8 +3380,8 @@ nm_platform_lookup_predicate_routes_main_skip_rtprot_kernel(const NMPObject *obj * Returns: the result of the lookup. */ GPtrArray * -nm_platform_lookup_clone(NMPlatform * self, - const NMPLookup * lookup, +nm_platform_lookup_clone(NMPlatform *self, + const NMPLookup *lookup, NMPObjectPredicateFunc predicate, gpointer user_data) { @@ -3511,7 +3511,7 @@ nm_platform_ip4_address_add(NMPlatform *self, } gboolean -nm_platform_ip6_address_add(NMPlatform * self, +nm_platform_ip6_address_add(NMPlatform *self, int ifindex, struct in6_addr address, guint8 plen, @@ -3630,7 +3630,7 @@ nm_platform_ip6_address_get(NMPlatform *self, int ifindex, const struct in6_addr static gboolean _addr_array_clean_expired(int addr_family, int ifindex, - GPtrArray * array, + GPtrArray *array, guint32 now, GHashTable **idx) { @@ -3748,7 +3748,7 @@ ip4_addr_subnets_build_index(const GPtrArray *addresses, for (i = 0; i < addresses->len; i++) { const NMPlatformIP4Address *address; gpointer p_address; - GPtrArray * addr_list; + GPtrArray *addr_list; guint32 net; int position; gpointer p; @@ -3805,16 +3805,16 @@ ip4_addr_subnets_build_index(const GPtrArray *addresses, * Returns: %TRUE if the address is secondary, %FALSE otherwise */ static gboolean -ip4_addr_subnets_is_secondary(const NMPObject * address, - GHashTable * subnets, - const GPtrArray * addresses, +ip4_addr_subnets_is_secondary(const NMPObject *address, + GHashTable *subnets, + const GPtrArray *addresses, const GPtrArray **out_addr_list) { const NMPlatformIP4Address *a; - const GPtrArray * addr_list; + const GPtrArray *addr_list; gconstpointer p; guint32 net; - const NMPObject ** o; + const NMPObject **o; a = NMP_OBJECT_CAST_IP4_ADDRESS(address); @@ -3902,14 +3902,14 @@ gboolean nm_platform_ip_address_sync(NMPlatform *self, int addr_family, int ifindex, - GPtrArray * known_addresses, - GPtrArray * addresses_prune) + GPtrArray *known_addresses, + GPtrArray *addresses_prune) { - const gint32 now = nm_utils_get_monotonic_timestamp_sec(); - const int IS_IPv4 = NM_IS_IPv4(addr_family); + const gint32 now = nm_utils_get_monotonic_timestamp_sec(); + const int IS_IPv4 = NM_IS_IPv4(addr_family); gs_unref_hashtable GHashTable *known_addresses_idx = NULL; - GPtrArray * plat_addresses; - GHashTable * known_subnets = NULL; + GPtrArray *plat_addresses; + GHashTable *known_subnets = NULL; guint i_plat; guint i_know; guint i; @@ -3947,9 +3947,9 @@ nm_platform_ip_address_sync(NMPlatform *self, plat_subnets = ip4_addr_subnets_build_index(plat_addresses, TRUE, TRUE); for (i = 0; i < plat_addresses->len; i++) { - const NMPObject * plat_obj; + const NMPObject *plat_obj; const NMPlatformIP4Address *plat_address; - const GPtrArray * addr_list; + const GPtrArray *addr_list; plat_obj = plat_addresses->pdata[i]; if (!plat_obj) { @@ -4044,8 +4044,8 @@ nm_platform_ip_address_sync(NMPlatform *self, * * Note that we mark handled addresses by setting it to %NULL in @plat_addresses array. */ for (i_plat = 0; i_plat < plat_addresses->len; i_plat++) { - const NMPObject * plat_obj = plat_addresses->pdata[i_plat]; - const NMPObject * know_obj; + const NMPObject *plat_obj = plat_addresses->pdata[i_plat]; + const NMPObject *know_obj; const NMPlatformIP6Address *plat_addr = NMP_OBJECT_CAST_IP6_ADDRESS(plat_obj); if (known_addresses_idx) { @@ -4141,7 +4141,7 @@ next_plat:; */ for (i_know = 0; i_know < known_addresses->len; i_know++) { const NMPlatformIPXAddress *known_address; - const NMPObject * o; + const NMPObject *o; guint32 lifetime; guint32 preferred; @@ -4211,7 +4211,7 @@ nm_platform_ip_address_flush(NMPlatform *self, int addr_family, int ifindex) static gboolean _err_inval_due_to_ipv6_tentative_pref_src(NMPlatform *self, const NMPObject *obj) { - const NMPlatformIP6Route * r; + const NMPlatformIP6Route *r; const NMPlatformIP6Address *a; nm_assert(NM_IS_PLATFORM(self)); @@ -4253,8 +4253,8 @@ nm_platform_ip_address_get_prune_list(NMPlatform *self, const int IS_IPv4 = NM_IS_IPv4(addr_family); const NMDedupMultiHeadEntry *head_entry; NMPLookup lookup; - GPtrArray * result; - CList * iter; + GPtrArray *result; + CList *iter; nmp_lookup_init_object(&lookup, NMP_OBJECT_TYPE_IP_ADDRESS(NM_IS_IPv4(addr_family)), ifindex); @@ -4285,20 +4285,20 @@ nm_platform_ip_address_get_prune_list(NMPlatform *self, } GPtrArray * -nm_platform_ip_route_get_prune_list(NMPlatform * self, +nm_platform_ip_route_get_prune_list(NMPlatform *self, int addr_family, int ifindex, NMIPRouteTableSyncMode route_table_sync) { NMPLookup lookup; - GPtrArray * routes_prune; + GPtrArray *routes_prune; const NMDedupMultiHeadEntry *head_entry; - CList * iter; + CList *iter; NMPlatformIP4Route rt_local4; NMPlatformIP6Route rt_local6; NMPlatformIP6Route rt_mcast6; - const NMPlatformLink * pllink; - const NMPlatformLnkVrf * lnk_vrf; + const NMPlatformLink *pllink; + const NMPlatformLnkVrf *lnk_vrf; guint32 local_table; nm_assert(NM_IS_PLATFORM(self)); @@ -4326,7 +4326,7 @@ nm_platform_ip_route_get_prune_list(NMPlatform * self, routes_prune = g_ptr_array_new_full(head_entry->len, (GDestroyNotify) nm_dedup_multi_obj_unref); c_list_for_each (iter, &head_entry->lst_entries_head) { - const NMPObject * obj = c_list_entry(iter, NMDedupMultiEntry, lst_entries)->obj; + const NMPObject *obj = c_list_entry(iter, NMDedupMultiEntry, lst_entries)->obj; const NMPlatformIPXRoute *rt = NMP_OBJECT_CAST_IPX_ROUTE(obj); switch (route_table_sync) { @@ -4493,15 +4493,15 @@ gboolean nm_platform_ip_route_sync(NMPlatform *self, int addr_family, int ifindex, - GPtrArray * routes, - GPtrArray * routes_prune, + GPtrArray *routes, + GPtrArray *routes_prune, GPtrArray **out_temporary_not_available) { - const int IS_IPv4 = NM_IS_IPv4(addr_family); - const NMPlatformVTableRoute *vt; + const int IS_IPv4 = NM_IS_IPv4(addr_family); + const NMPlatformVTableRoute *vt; gs_unref_hashtable GHashTable *routes_idx = NULL; - const NMPObject * conf_o; - const NMDedupMultiEntry * plat_entry; + const NMPObject *conf_o; + const NMDedupMultiEntry *plat_entry; guint i; int i_type; gboolean success = TRUE; @@ -4520,12 +4520,6 @@ nm_platform_ip_route_sync(NMPlatform *self, conf_o = routes->pdata[i]; - if (NMP_OBJECT_CAST_IP_ROUTE(conf_o)->is_external) { - /* This route is added externally. We don't have our own agenda to - * add it, so skip. */ - continue; - } - /* User space cannot add IPv6 routes with metric 0. However, kernel can, and we might track such * routes in @route as they are present external. As we already skipped external routes above, * we don't expect a user's choice to add such a route (it won't work anyway). */ @@ -4721,24 +4715,6 @@ sync_route_add: } if (routes_prune) { - if (routes) { - for (i = 0; i < routes->len; i++) { - conf_o = routes->pdata[i]; - - if (NMP_OBJECT_CAST_IP_ROUTE(conf_o)->is_external) { - /* this is only to catch the case where an external route is - * both in @routes and @routes_prune list. In that case, - * @routes should win and we should not remove the address. */ - if (!routes_idx) { - routes_idx = g_hash_table_new((GHashFunc) nmp_object_id_hash, - (GEqualFunc) nmp_object_id_equal); - } - g_hash_table_add(routes_idx, (gpointer) conf_o); - continue; - } - } - } - for (i = 0; i < routes_prune->len; i++) { const NMPObject *prune_o; @@ -4958,11 +4934,11 @@ nm_platform_object_delete(NMPlatform *self, const NMPObject *obj) /*****************************************************************************/ int -nm_platform_ip_route_get(NMPlatform * self, +nm_platform_ip_route_get(NMPlatform *self, int addr_family, gconstpointer address /* in_addr_t or struct in6_addr */, int oif_ifindex, - NMPObject ** out_route) + NMPObject **out_route) { nm_auto_nmpobj NMPObject *route = NULL; int result; @@ -5027,11 +5003,11 @@ _ip4_dev_route_blacklist_timeout_ms_marked(gint64 timeout_msec) static gboolean _ip4_dev_route_blacklist_check_cb(gpointer user_data) { - NMPlatform * self = user_data; + NMPlatform *self = user_data; NMPlatformPrivate *priv = NM_PLATFORM_GET_PRIVATE(self); GHashTableIter iter; - const NMPObject * p_obj; - gint64 * p_timeout_ms; + const NMPObject *p_obj; + gint64 *p_timeout_ms; gint64 now_ms; priv->ip4_dev_route_blacklist_check_id = 0; @@ -5081,8 +5057,8 @@ static void _ip4_dev_route_blacklist_notify_route(NMPlatform *self, const NMPObject *obj) { NMPlatformPrivate *priv; - const NMPObject * p_obj; - gint64 * p_timeout_ms; + const NMPObject *p_obj; + gint64 *p_timeout_ms; gint64 now_ms; nm_assert(NM_IS_PLATFORM(self)); @@ -5120,11 +5096,11 @@ _ip4_dev_route_blacklist_notify_route(NMPlatform *self, const NMPObject *obj) static gboolean _ip4_dev_route_blacklist_gc_timeout_handle(gpointer user_data) { - NMPlatform * self = user_data; + NMPlatform *self = user_data; NMPlatformPrivate *priv = NM_PLATFORM_GET_PRIVATE(self); GHashTableIter iter; - const NMPObject * p_obj; - gint64 * p_timeout_ms; + const NMPObject *p_obj; + gint64 *p_timeout_ms; gint64 now_ms; nm_assert(priv->ip4_dev_route_blacklist_gc_timeout_id); @@ -5193,15 +5169,15 @@ _ip4_dev_route_blacklist_schedule(NMPlatform *self) void nm_platform_ip4_dev_route_blacklist_set(NMPlatform *self, int ifindex, - GPtrArray * ip4_dev_route_blacklist) + GPtrArray *ip4_dev_route_blacklist) { NMPlatformPrivate *priv; GHashTableIter iter; - const NMPObject * p_obj; + const NMPObject *p_obj; guint i; gint64 timeout_msec; gint64 timeout_msec_val; - gint64 * p_timeout_ms; + gint64 *p_timeout_ms; gboolean needs_check = FALSE; nm_assert(NM_IS_PLATFORM(self)); @@ -5275,7 +5251,7 @@ nm_platform_ip4_dev_route_blacklist_set(NMPlatform *self, /*****************************************************************************/ int -nm_platform_routing_rule_add(NMPlatform * self, +nm_platform_routing_rule_add(NMPlatform *self, NMPNlmFlags flags, const NMPlatformRoutingRule *routing_rule) { @@ -5355,8 +5331,8 @@ nm_platform_tfilter_delete(NMPlatform *self, int ifindex, guint32 parent, gboole gboolean nm_platform_tc_sync(NMPlatform *self, int ifindex, - GPtrArray * known_qdiscs, - GPtrArray * known_tfilters) + GPtrArray *known_qdiscs, + GPtrArray *known_tfilters) { guint i; gboolean success = TRUE; @@ -5397,10 +5373,10 @@ nm_platform_tc_sync(NMPlatform *self, /*****************************************************************************/ const char * -nm_platform_vlan_qos_mapping_to_string(const char * name, +nm_platform_vlan_qos_mapping_to_string(const char *name, const NMVlanQosMapping *map, gsize n_map, - char * buf, + char *buf, gsize len) { gsize i; @@ -5448,7 +5424,7 @@ _lifetime_summary_to_string(gint32 now, guint32 timestamp, guint32 preferred, guint32 lifetime, - char * buf, + char *buf, size_t buf_size) { g_snprintf(buf, @@ -5478,7 +5454,7 @@ nm_platform_link_to_string(const NMPlatformLink *link, char *buf, gsize len) char parent[20]; char str_flags[1 + NM_PLATFORM_LINK_FLAGS2STR_MAX_LEN + 1]; char str_highlighted_flags[50]; - char * s; + char *s; gsize l; char str_addrmode[30]; char str_address[_NM_UTILS_HWADDR_LEN_MAX * 3]; @@ -6109,7 +6085,7 @@ nm_platform_lnk_vxlan_to_string(const NMPlatformLnkVxlan *lnk, char *buf, gsize const char * nm_platform_wireguard_peer_to_string(const NMPWireGuardPeer *peer, char *buf, gsize len) { - char * buf0 = buf; + char *buf0 = buf; gs_free char *public_key_b64 = NULL; char s_sockaddr[NM_UTILS_INET_ADDRSTRLEN + 100]; char s_endpoint[20 + sizeof(s_sockaddr)]; @@ -6214,7 +6190,7 @@ nm_platform_ip4_address_to_string(const NMPlatformIP4Address *address, char *buf char str_dev[TO_STRING_DEV_BUF_SIZE]; char str_label[32]; char str_lft[30], str_pref[30], str_time[50], s_source[50]; - char * str_peer = NULL; + char *str_peer = NULL; const char *str_lft_p, *str_pref_p, *str_time_p; gint32 now = nm_utils_get_monotonic_timestamp_sec(); in_addr_t broadcast_address; @@ -6273,9 +6249,9 @@ nm_platform_ip4_address_to_string(const NMPlatformIP4Address *address, char *buf "%s" /* flags */ "%s" /* label */ " src %s" - "%s" /* external */ "%s" /* a_acd_not_ready */ "%s" /* a_assume_config_once */ + "%s" /* a_force_commit */ "", s_address, address->plen, @@ -6293,9 +6269,9 @@ nm_platform_ip4_address_to_string(const NMPlatformIP4Address *address, char *buf _to_string_ifa_flags(address->n_ifa_flags, s_flags, sizeof(s_flags)), str_label, nmp_utils_ip_config_source_to_string(address->addr_source, s_source, sizeof(s_source)), - address->external ? " ext" : "", address->a_acd_not_ready ? " ip4acd-not-ready" : "", - address->a_assume_config_once ? " assume-config-once" : ""); + address->a_assume_config_once ? " assume-config-once" : "", + address->a_force_commit ? " force-commit" : ""); g_free(str_peer); return buf; } @@ -6374,7 +6350,7 @@ nm_platform_ip6_address_to_string(const NMPlatformIP6Address *address, char *buf char s_peer[INET6_ADDRSTRLEN]; char str_lft[30], str_pref[30], str_time[50], s_source[50]; char str_dev[TO_STRING_DEV_BUF_SIZE]; - char * str_peer = NULL; + char *str_peer = NULL; const char *str_lft_p, *str_pref_p, *str_time_p; gint32 now = nm_utils_get_monotonic_timestamp_sec(); @@ -6415,8 +6391,8 @@ nm_platform_ip6_address_to_string(const NMPlatformIP6Address *address, char *buf buf, len, "%s/%d lft %s pref %s%s%s%s%s src %s" - "%s" /* external */ "%s" /* a_assume_config_once */ + "%s" /* a_force_commit */ "", s_address, address->plen, @@ -6427,8 +6403,8 @@ nm_platform_ip6_address_to_string(const NMPlatformIP6Address *address, char *buf str_dev, _to_string_ifa_flags(address->n_ifa_flags, s_flags, sizeof(s_flags)), nmp_utils_ip_config_source_to_string(address->addr_source, s_source, sizeof(s_source)), - address->external ? " external" : "", - address->a_assume_config_once ? " assume-config-once" : ""); + address->a_assume_config_once ? " assume-config-once" : "", + address->a_force_commit ? " force-commit" : ""); g_free(str_peer); return buf; } @@ -6519,8 +6495,8 @@ nm_platform_ip4_route_to_string(const NMPlatformIP4Route *route, char *buf, gsiz "%s" /* initcwnd */ "%s" /* initrwnd */ "%s" /* mtu */ - "%s" /* is_external */ "%s" /* r_assume_config_once */ + "%s" /* r_force_commit */ "", nm_net_aux_rtnl_rtntype_n2a_maybe_buf(nm_platform_route_type_uncoerce(route->type_coerced), str_type), @@ -6577,8 +6553,8 @@ nm_platform_ip4_route_to_string(const NMPlatformIP4Route *route, char *buf, gsiz route->lock_mtu ? "lock " : "", route->mtu) : "", - route->is_external ? " is-external" : "", - route->r_assume_config_once ? " assume-config-once" : ""); + route->r_assume_config_once ? " assume-config-once" : "", + route->r_force_commit ? " force-commit" : ""); return buf; } @@ -6648,8 +6624,8 @@ nm_platform_ip6_route_to_string(const NMPlatformIP6Route *route, char *buf, gsiz "%s" /* initrwnd */ "%s" /* mtu */ "%s" /* pref */ - "%s" /* is_external */ "%s" /* r_assume_config_once */ + "%s" /* r_force_commit */ "", nm_net_aux_rtnl_rtntype_n2a_maybe_buf(nm_platform_route_type_uncoerce(route->type_coerced), str_type), @@ -6710,15 +6686,15 @@ nm_platform_ip6_route_to_string(const NMPlatformIP6Route *route, char *buf, gsiz " pref %s", nm_icmpv6_router_pref_to_string(route->rt_pref, str_pref2, sizeof(str_pref2))) : "", - route->is_external ? " is-external" : "", - route->r_assume_config_once ? " assume-config-once" : ""); + route->r_assume_config_once ? " assume-config-once" : "", + route->r_force_commit ? " force-commit" : ""); return buf; } static void -_routing_rule_addr_to_string(char ** buf, - gsize * len, +_routing_rule_addr_to_string(char **buf, + gsize *len, int addr_family, const NMIPAddr *addr, guint8 plen, @@ -6752,10 +6728,10 @@ _routing_rule_addr_to_string(char ** buf, } static void -_routing_rule_port_range_to_string(char ** buf, - gsize * len, +_routing_rule_port_range_to_string(char **buf, + gsize *len, const NMFibRulePortRange *port_range, - const char * name) + const char *name) { if (port_range->start == 0 && port_range->end == 0) nm_strbuf_append_str(buf, len, ""); @@ -7179,11 +7155,11 @@ nm_platform_tfilter_cmp(const NMPlatformTfilter *a, const NMPlatformTfilter *b) const char * nm_platform_vf_to_string(const NMPlatformVF *vf, char *buf, gsize len) { - char str_mac[128], mac[128]; - char str_spoof_check[64]; - char str_trust[64]; - char str_min_tx_rate[64]; - char str_max_tx_rate[64]; + char str_mac[128], mac[128]; + char str_spoof_check[64]; + char str_trust[64]; + char str_min_tx_rate[64]; + char str_max_tx_rate[64]; nm_auto_free_gstring GString *gstr_vlans = NULL; guint i; @@ -7845,10 +7821,10 @@ nm_platform_ip4_address_hash_update(const NMPlatformIP4Address *obj, NMHashState obj->address, obj->peer_address, NM_HASH_COMBINE_BOOLS(guint8, - obj->external, obj->use_ip4_broadcast_address, obj->a_acd_not_ready, - obj->a_assume_config_once)); + obj->a_assume_config_once, + obj->a_force_commit)); nm_hash_update_strarr(h, obj->label); } @@ -7869,26 +7845,27 @@ nm_platform_ip4_address_cmp(const NMPlatformIP4Address *a, const NMPlatformIP4Ad NM_CMP_FIELD(a, b, preferred); NM_CMP_FIELD(a, b, n_ifa_flags); NM_CMP_FIELD_STR(a, b, label); - NM_CMP_FIELD_UNSAFE(a, b, external); NM_CMP_FIELD_UNSAFE(a, b, a_acd_not_ready); NM_CMP_FIELD_UNSAFE(a, b, a_assume_config_once); + NM_CMP_FIELD_UNSAFE(a, b, a_force_commit); return 0; } void nm_platform_ip6_address_hash_update(const NMPlatformIP6Address *obj, NMHashState *h) { - nm_hash_update_vals(h, - obj->ifindex, - obj->addr_source, - obj->timestamp, - obj->lifetime, - obj->preferred, - obj->n_ifa_flags, - obj->plen, - obj->address, - obj->peer_address, - NM_HASH_COMBINE_BOOLS(guint8, obj->external, obj->a_assume_config_once)); + nm_hash_update_vals( + h, + obj->ifindex, + obj->addr_source, + obj->timestamp, + obj->lifetime, + obj->preferred, + obj->n_ifa_flags, + obj->plen, + obj->address, + obj->peer_address, + NM_HASH_COMBINE_BOOLS(guint8, obj->a_assume_config_once, obj->a_force_commit)); } int @@ -7908,15 +7885,15 @@ nm_platform_ip6_address_cmp(const NMPlatformIP6Address *a, const NMPlatformIP6Ad NM_CMP_FIELD(a, b, lifetime); NM_CMP_FIELD(a, b, preferred); NM_CMP_FIELD(a, b, n_ifa_flags); - NM_CMP_FIELD_UNSAFE(a, b, external); NM_CMP_FIELD_UNSAFE(a, b, a_assume_config_once); + NM_CMP_FIELD_UNSAFE(a, b, a_force_commit); return 0; } void nm_platform_ip4_route_hash_update(const NMPlatformIP4Route *obj, NMPlatformIPRouteCmpType cmp_type, - NMHashState * h) + NMHashState *h) { switch (cmp_type) { case NM_PLATFORM_IP_ROUTE_CMP_TYPE_WEAK_ID: @@ -8018,8 +7995,8 @@ nm_platform_ip4_route_hash_update(const NMPlatformIP4Route *obj, obj->lock_initcwnd, obj->lock_initrwnd, obj->lock_mtu, - obj->is_external, - obj->r_assume_config_once)); + obj->r_assume_config_once, + obj->r_force_commit)); break; } } @@ -8110,8 +8087,8 @@ nm_platform_ip4_route_cmp(const NMPlatformIP4Route *a, NM_CMP_FIELD(a, b, initrwnd); NM_CMP_FIELD(a, b, mtu); if (cmp_type == NM_PLATFORM_IP_ROUTE_CMP_TYPE_FULL) { - NM_CMP_FIELD_UNSAFE(a, b, is_external); NM_CMP_FIELD_UNSAFE(a, b, r_assume_config_once); + NM_CMP_FIELD_UNSAFE(a, b, r_force_commit); } break; } @@ -8121,7 +8098,7 @@ nm_platform_ip4_route_cmp(const NMPlatformIP4Route *a, void nm_platform_ip6_route_hash_update(const NMPlatformIP6Route *obj, NMPlatformIPRouteCmpType cmp_type, - NMHashState * h) + NMHashState *h) { struct in6_addr a1, a2; @@ -8205,8 +8182,8 @@ nm_platform_ip6_route_hash_update(const NMPlatformIP6Route *obj, obj->lock_initcwnd, obj->lock_initrwnd, obj->lock_mtu, - obj->is_external, - obj->r_assume_config_once), + obj->r_assume_config_once, + obj->r_force_commit), obj->window, obj->cwnd, obj->initcwnd, @@ -8290,8 +8267,8 @@ nm_platform_ip6_route_cmp(const NMPlatformIP6Route *a, else NM_CMP_FIELD(a, b, rt_pref); if (cmp_type == NM_PLATFORM_IP_ROUTE_CMP_TYPE_FULL) { - NM_CMP_FIELD_UNSAFE(a, b, is_external); NM_CMP_FIELD_UNSAFE(a, b, r_assume_config_once); + NM_CMP_FIELD_UNSAFE(a, b, r_force_commit); } break; } @@ -8308,7 +8285,7 @@ nm_platform_ip6_route_cmp(const NMPlatformIP6Route *a, void nm_platform_routing_rule_hash_update(const NMPlatformRoutingRule *obj, NMPlatformRoutingRuleCmpType cmp_type, - NMHashState * h) + NMHashState *h) { gboolean cmp_full = TRUE; gsize addr_size; @@ -8551,9 +8528,9 @@ nm_platform_ip4_address_addr_to_hash(NMPlatform *self, int ifindex) { const NMDedupMultiHeadEntry *head_entry; NMDedupMultiIter iter; - const NMPObject * obj; + const NMPObject *obj; NMPLookup lookup; - GHashTable * hash; + GHashTable *hash; g_return_val_if_fail(NM_IS_PLATFORM(self), NULL); g_return_val_if_fail(ifindex > 0, NULL); @@ -8583,7 +8560,8 @@ nm_platform_ip4_address_generate_device_route(const NMPlatformIP4Address *addr, int ifindex, guint32 route_table, guint32 route_metric, - NMPlatformIP4Route * dst) + gboolean force_commit, + NMPlatformIP4Route *dst) { in_addr_t network_4; @@ -8614,14 +8592,15 @@ nm_platform_ip4_address_generate_device_route(const NMPlatformIP4Address *addr, } *dst = (NMPlatformIP4Route){ - .ifindex = ifindex, - .rt_source = NM_IP_CONFIG_SOURCE_KERNEL, - .network = network_4, - .plen = addr->plen, - .pref_src = addr->address, - .table_coerced = nm_platform_route_table_coerce(route_table), - .metric = route_metric, - .scope_inv = nm_platform_route_scope_inv(NM_RT_SCOPE_LINK), + .ifindex = ifindex, + .rt_source = NM_IP_CONFIG_SOURCE_KERNEL, + .network = network_4, + .plen = addr->plen, + .pref_src = addr->address, + .table_coerced = nm_platform_route_table_coerce(route_table), + .metric = route_metric, + .scope_inv = nm_platform_route_scope_inv(NM_RT_SCOPE_LINK), + .r_force_commit = force_commit, }; nm_platform_ip_route_normalize(AF_INET, (NMPlatformIPRoute *) dst); @@ -8645,10 +8624,10 @@ nm_platform_signal_change_type_to_string(NMPlatformSignalChangeType change_type) } static void -log_link(NMPlatform * self, +log_link(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformLink * device, + NMPlatformLink *device, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8658,10 +8637,10 @@ log_link(NMPlatform * self, } static void -log_ip4_address(NMPlatform * self, +log_ip4_address(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformIP4Address * address, + NMPlatformIP4Address *address, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8671,10 +8650,10 @@ log_ip4_address(NMPlatform * self, } static void -log_ip6_address(NMPlatform * self, +log_ip6_address(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformIP6Address * address, + NMPlatformIP6Address *address, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8684,10 +8663,10 @@ log_ip6_address(NMPlatform * self, } static void -log_ip4_route(NMPlatform * self, +log_ip4_route(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformIP4Route * route, + NMPlatformIP4Route *route, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8697,10 +8676,10 @@ log_ip4_route(NMPlatform * self, } static void -log_ip6_route(NMPlatform * self, +log_ip6_route(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformIP6Route * route, + NMPlatformIP6Route *route, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8710,10 +8689,10 @@ log_ip6_route(NMPlatform * self, } static void -log_routing_rule(NMPlatform * self, +log_routing_rule(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformRoutingRule * routing_rule, + NMPlatformRoutingRule *routing_rule, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8724,10 +8703,10 @@ log_routing_rule(NMPlatform * self, } static void -log_qdisc(NMPlatform * self, +log_qdisc(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformQdisc * qdisc, + NMPlatformQdisc *qdisc, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8737,10 +8716,10 @@ log_qdisc(NMPlatform * self, } static void -log_tfilter(NMPlatform * self, +log_tfilter(NMPlatform *self, NMPObjectType obj_type, int ifindex, - NMPlatformTfilter * tfilter, + NMPlatformTfilter *tfilter, NMPlatformSignalChangeType change_type, gpointer user_data) { @@ -8752,7 +8731,7 @@ log_tfilter(NMPlatform * self, /*****************************************************************************/ void -nm_platform_cache_update_emit_signal(NMPlatform * self, +nm_platform_cache_update_emit_signal(NMPlatform *self, NMPCacheOpsType cache_op, const NMPObject *obj_old, const NMPObject *obj_new) @@ -8760,7 +8739,7 @@ nm_platform_cache_update_emit_signal(NMPlatform * self, gboolean visible_new; gboolean visible_old; const NMPObject *o; - const NMPClass * klass; + const NMPClass *klass; int ifindex; nm_assert(NM_IN_SET((NMPlatformSignalChangeType) cache_op, @@ -8875,7 +8854,7 @@ const _NMPlatformVTableRouteUnion nm_platform_vtable_route = { const NMPlatformIPXRoute *b, NMPlatformIPRouteCmpType cmp_type)) nm_platform_ip4_route_cmp, .route_to_string = (const char *(*) (const NMPlatformIPXRoute *route, - char * buf, + char *buf, gsize len)) nm_platform_ip4_route_to_string, }, .v6 = @@ -8888,7 +8867,7 @@ const _NMPlatformVTableRouteUnion nm_platform_vtable_route = { const NMPlatformIPXRoute *b, NMPlatformIPRouteCmpType cmp_type)) nm_platform_ip6_route_cmp, .route_to_string = (const char *(*) (const NMPlatformIPXRoute *route, - char * buf, + char *buf, gsize len)) nm_platform_ip6_route_to_string, }, }; @@ -8898,7 +8877,7 @@ const _NMPlatformVTableRouteUnion nm_platform_vtable_route = { static void set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMPlatform * self = NM_PLATFORM(object); + NMPlatform *self = NM_PLATFORM(object); NMPlatformPrivate *priv = NM_PLATFORM_GET_PRIVATE(self); switch (prop_id) { @@ -8939,8 +8918,8 @@ nm_platform_init(NMPlatform *self) static GObject * constructor(GType type, guint n_construct_params, GObjectConstructParam *construct_params) { - GObject * object; - NMPlatform * self; + GObject *object; + NMPlatform *self; NMPlatformPrivate *priv; object = G_OBJECT_CLASS(nm_platform_parent_class) @@ -8958,7 +8937,7 @@ constructor(GType type, guint n_construct_params, GObjectConstructParam *constru static void finalize(GObject *object) { - NMPlatform * self = NM_PLATFORM(object); + NMPlatform *self = NM_PLATFORM(object); NMPlatformPrivate *priv = NM_PLATFORM_GET_PRIVATE(self); nm_clear_g_source(&priv->ip4_dev_route_blacklist_check_id); diff --git a/src/libnm-platform/nm-platform.h b/src/libnm-platform/nm-platform.h index 7101b48c..c305a1db 100644 --- a/src/libnm-platform/nm-platform.h +++ b/src/libnm-platform/nm-platform.h @@ -155,7 +155,7 @@ G_STATIC_ASSERT(_nm_alignof(NMEtherAddr) == 1); G_STATIC_ASSERT(_nm_alignof(NMPLinkAddress) == 1); gconstpointer nmp_link_address_get(const NMPLinkAddress *addr, size_t *length); -GBytes * nmp_link_address_get_as_bytes(const NMPLinkAddress *addr); +GBytes *nmp_link_address_get_as_bytes(const NMPLinkAddress *addr); typedef enum { @@ -318,16 +318,14 @@ typedef enum { * IFA_FLAGS attribute. */ \ guint32 n_ifa_flags; \ \ - /* FIXME(l3cfg): the external marker won't be necessary anymore, because we only - * merge addresses we care about, and ignore (don't remove) external addresses. */ \ - bool external : 1; \ - \ bool use_ip4_broadcast_address : 1; \ \ - /* Whether the address is should be configured once during assume. This is a meta flag - * that is not honored by NMPlatform (netlink code). Instead, it can be used by the upper - * layers which use NMPlatformIPAddress to track addresses that should be configured. */ \ + /* Meta flags not honored by NMPlatform (netlink code). Instead, they can be + * used by the upper layers which use NMPlatformIPRoute to track addresses that + * should be configured. */ \ + /* Whether the address is should be configured once during assume. */ \ bool a_assume_config_once : 1; \ + bool a_force_commit : 1; \ \ guint8 plen; \ ; @@ -471,18 +469,13 @@ typedef union { * the "table_coerced" field is ignored (unlike for the metric). */ \ bool table_any : 1; \ \ - /* This route is tracked as external route, that is not a route that NetworkManager - * actively wants to add, but a route that was added externally. In some cases, such - * a route should be ignored. - * - * Note that unlike most other fields here, this flag only exists inside NetworkManager - * and is not reflected on netlink. */ \ - bool is_external : 1; \ - \ - /* Whether the route is should be configured once during assume. This is a meta flag - * that is not honored by NMPlatform (netlink code). Instead, it can be used by the upper - * layers which use NMPlatformIPRoute to track routes that should be configured. */ \ + /* Meta flags not honored by NMPlatform (netlink code). Instead, they can be + * used by the upper layers which use NMPlatformIPRoute to track routes that + * should be configured. */ \ + /* Whether the route is should be configured once during assume. */ \ bool r_assume_config_once : 1; \ + /* Whether the route should be committed even if it was removed externally. */ \ + bool r_force_commit : 1; \ \ /* rtnh_flags * @@ -1078,7 +1071,7 @@ struct _NMPlatformPrivate; struct _NMPlatform { GObject parent; - NMPNetns * _netns; + NMPNetns *_netns; struct _NMPlatformPrivate *_priv; }; @@ -1090,24 +1083,24 @@ typedef struct { int dirfd, const char *path, const char *value); - void (*sysctl_set_async)(NMPlatform * self, - const char * pathid, + void (*sysctl_set_async)(NMPlatform *self, + const char *pathid, int dirfd, - const char * path, - const char *const * values, + const char *path, + const char *const *values, NMPlatformAsyncCallback callback, gpointer data, - GCancellable * cancellable); + GCancellable *cancellable); char *(*sysctl_get)(NMPlatform *self, const char *pathid, int dirfd, const char *path); void (*refresh_all)(NMPlatform *self, NMPObjectType obj_type); void (*process_events)(NMPlatform *self); - int (*link_add)(NMPlatform * self, + int (*link_add)(NMPlatform *self, NMLinkType type, - const char * name, + const char *name, int parent, - const void * address, + const void *address, size_t address_len, guint32 mtu, gconstpointer extra_data, @@ -1123,21 +1116,21 @@ typedef struct { int (*link_set_inet6_addr_gen_mode)(NMPlatform *self, int ifindex, guint8 enabled); gboolean (*link_set_token)(NMPlatform *self, int ifindex, const NMUtilsIPv6IfaceId *iid); - gboolean (*link_get_permanent_address_ethtool)(NMPlatform * self, + gboolean (*link_get_permanent_address_ethtool)(NMPlatform *self, int ifindex, NMPLinkAddress *out_address); int (*link_set_address)(NMPlatform *self, int ifindex, gconstpointer address, size_t length); int (*link_set_mtu)(NMPlatform *self, int ifindex, guint32 mtu); gboolean (*link_set_name)(NMPlatform *self, int ifindex, const char *name); - void (*link_set_sriov_params_async)(NMPlatform * self, + void (*link_set_sriov_params_async)(NMPlatform *self, int ifindex, guint num_vfs, NMOptionBool autoprobe, NMPlatformAsyncCallback callback, gpointer callback_data, - GCancellable * cancellable); + GCancellable *cancellable); gboolean (*link_set_sriov_vfs)(NMPlatform *self, int ifindex, const NMPlatformVF *const *vfs); - gboolean (*link_set_bridge_vlans)(NMPlatform * self, + gboolean (*link_set_bridge_vlans)(NMPlatform *self, int ifindex, gboolean on_master, const NMPlatformBridgeVlan *const *vlans); @@ -1147,9 +1140,9 @@ typedef struct { gboolean (*link_get_wake_on_lan)(NMPlatform *self, int ifindex); gboolean (*link_get_driver_info)(NMPlatform *self, int ifindex, - char ** out_driver_name, - char ** out_driver_version, - char ** out_fw_version); + char **out_driver_name, + char **out_driver_version, + char **out_fw_version); gboolean (*link_supports_carrier_detect)(NMPlatform *self, int ifindex); gboolean (*link_supports_vlans)(NMPlatform *self, int ifindex); @@ -1160,15 +1153,15 @@ typedef struct { gboolean (*link_can_assume)(NMPlatform *self, int ifindex); - int (*link_wireguard_change)(NMPlatform * self, + int (*link_wireguard_change)(NMPlatform *self, int ifindex, - const NMPlatformLnkWireGuard * lnk_wireguard, - const struct _NMPWireGuardPeer * peers, + const NMPlatformLnkWireGuard *lnk_wireguard, + const struct _NMPWireGuardPeer *peers, const NMPlatformWireGuardChangePeerFlags *peer_flags, guint peers_len, NMPlatformWireGuardChangeFlags change_flags); - gboolean (*link_vlan_change)(NMPlatform * self, + gboolean (*link_vlan_change)(NMPlatform *self, int ifindex, _NMVlanFlags flags_mask, _NMVlanFlags flags_set, @@ -1178,26 +1171,26 @@ typedef struct { gboolean egress_reset_all, const NMVlanQosMapping *egress_map, gsize n_egress_map); - gboolean (*link_tun_add)(NMPlatform * self, - const char * name, + gboolean (*link_tun_add)(NMPlatform *self, + const char *name, const NMPlatformLnkTun *props, - const NMPlatformLink ** out_link, - int * out_fd); + const NMPlatformLink **out_link, + int *out_fd); - gboolean (*infiniband_partition_add)(NMPlatform * self, + gboolean (*infiniband_partition_add)(NMPlatform *self, int parent, int p_key, const NMPlatformLink **out_link); gboolean (*infiniband_partition_delete)(NMPlatform *self, int parent, int p_key); - gboolean (*wifi_get_capabilities)(NMPlatform * self, + gboolean (*wifi_get_capabilities)(NMPlatform *self, int ifindex, _NMDeviceWifiCapabilities *caps); - gboolean (*wifi_get_station)(NMPlatform * self, + gboolean (*wifi_get_station)(NMPlatform *self, int ifindex, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate); + int *out_quality, + guint32 *out_rate); gboolean (*wifi_get_bssid)(NMPlatform *self, int ifindex, guint8 *bssid); guint32 (*wifi_get_frequency)(NMPlatform *self, int ifindex); int (*wifi_get_quality)(NMPlatform *self, int ifindex); @@ -1208,7 +1201,7 @@ typedef struct { guint32 (*wifi_find_frequency)(NMPlatform *self, int ifindex, const guint32 *freqs); void (*wifi_indicate_addressing_running)(NMPlatform *self, int ifindex, gboolean running); _NMSettingWirelessWakeOnWLan (*wifi_get_wake_on_wlan)(NMPlatform *self, int ifindex); - gboolean (*wifi_set_wake_on_wlan)(NMPlatform * self, + gboolean (*wifi_set_wake_on_wlan)(NMPlatform *self, int ifindex, _NMSettingWirelessWakeOnWLan wowl); @@ -1234,7 +1227,7 @@ typedef struct { guint32 preferred_lft, guint32 flags, const char *label); - gboolean (*ip6_address_add)(NMPlatform * self, + gboolean (*ip6_address_add)(NMPlatform *self, int ifindex, struct in6_addr address, guint8 plen, @@ -1247,22 +1240,22 @@ typedef struct { in_addr_t address, guint8 plen, in_addr_t peer_address); - gboolean (*ip6_address_delete)(NMPlatform * self, + gboolean (*ip6_address_delete)(NMPlatform *self, int ifindex, struct in6_addr address, guint8 plen); - int (*ip_route_add)(NMPlatform * self, + int (*ip_route_add)(NMPlatform *self, NMPNlmFlags flags, int addr_family, const NMPlatformIPRoute *route); - int (*ip_route_get)(NMPlatform * self, + int (*ip_route_get)(NMPlatform *self, int addr_family, gconstpointer address, int oif_ifindex, - NMPObject ** out_route); + NMPObject **out_route); - int (*routing_rule_add)(NMPlatform * self, + int (*routing_rule_add)(NMPlatform *self, NMPNlmFlags flags, const NMPlatformRoutingRule *routing_rule); @@ -1484,15 +1477,15 @@ gboolean nm_platform_sysctl_set(NMPlatform *self, int dirfd, const char *path, const char *value); -void nm_platform_sysctl_set_async(NMPlatform * self, - const char * pathid, +void nm_platform_sysctl_set_async(NMPlatform *self, + const char *pathid, int dirfd, - const char * path, - const char *const * values, + const char *path, + const char *const *values, NMPlatformAsyncCallback callback, gpointer data, - GCancellable * cancellable); -char * nm_platform_sysctl_get(NMPlatform *self, const char *pathid, int dirfd, const char *path); + GCancellable *cancellable); +char *nm_platform_sysctl_get(NMPlatform *self, const char *pathid, int dirfd, const char *path); gint32 nm_platform_sysctl_get_int32(NMPlatform *self, const char *pathid, int dirfd, @@ -1544,7 +1537,7 @@ gboolean nm_platform_sysctl_ip_neigh_set_ipv6_retrans_time(NMPlatform *self, int nm_platform_sysctl_ip_conf_get_rp_filter_ipv4(NMPlatform *platform, const char *iface, gboolean consider_all, - gboolean * out_due_to_all); + gboolean *out_due_to_all); const char *nm_platform_if_indextoname(NMPlatform *self, int ifindex, @@ -1554,27 +1547,27 @@ int nm_platform_if_nametoindex(NMPlatform *self, const char *ifname); const NMPObject *nm_platform_link_get_obj(NMPlatform *self, int ifindex, gboolean visible_only); const NMPlatformLink *nm_platform_link_get(NMPlatform *self, int ifindex); const NMPlatformLink *nm_platform_link_get_by_ifname(NMPlatform *self, const char *ifname); -const NMPlatformLink *nm_platform_link_get_by_address(NMPlatform * self, +const NMPlatformLink *nm_platform_link_get_by_address(NMPlatform *self, NMLinkType link_type, gconstpointer address, size_t length); GPtrArray *nm_platform_link_get_all(NMPlatform *self, gboolean sort_by_name); -int nm_platform_link_add(NMPlatform * self, +int nm_platform_link_add(NMPlatform *self, NMLinkType type, - const char * name, + const char *name, int parent, - const void * address, + const void *address, size_t address_len, guint32 mtu, gconstpointer extra_data, const NMPlatformLink **out_link); static inline int -nm_platform_link_veth_add(NMPlatform * self, - const char * name, - const char * peer, +nm_platform_link_veth_add(NMPlatform *self, + const char *name, + const char *peer, const NMPlatformLink **out_link) { return nm_platform_link_add(self, NM_LINK_TYPE_VETH, name, 0, NULL, 0, 0, peer, out_link); @@ -1587,13 +1580,13 @@ nm_platform_link_dummy_add(NMPlatform *self, const char *name, const NMPlatformL } static inline int -nm_platform_link_bridge_add(NMPlatform * self, - const char * name, - const void * address, +nm_platform_link_bridge_add(NMPlatform *self, + const char *name, + const void *address, size_t address_len, guint32 mtu, const NMPlatformLnkBridge *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { return nm_platform_link_add(self, NM_LINK_TYPE_BRIDGE, @@ -1625,12 +1618,12 @@ nm_platform_link_wireguard_add(NMPlatform *self, const char *name, const NMPlatf } static inline int -nm_platform_link_gre_add(NMPlatform * self, - const char * name, - const void * address, +nm_platform_link_gre_add(NMPlatform *self, + const char *name, + const void *address, size_t address_len, const NMPlatformLnkGre *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { g_return_val_if_fail(props, -NME_BUG); @@ -1646,17 +1639,17 @@ nm_platform_link_gre_add(NMPlatform * self, } static inline int -nm_platform_link_sit_add(NMPlatform * self, - const char * name, +nm_platform_link_sit_add(NMPlatform *self, + const char *name, const NMPlatformLnkSit *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { return nm_platform_link_add(self, NM_LINK_TYPE_SIT, name, 0, NULL, 0, 0, props, out_link); } static inline int -nm_platform_link_vlan_add(NMPlatform * self, - const char * name, +nm_platform_link_vlan_add(NMPlatform *self, + const char *name, int parent, int vlanid, guint32 vlanflags, @@ -1680,26 +1673,26 @@ nm_platform_link_vlan_add(NMPlatform * self, } static inline int -nm_platform_link_vrf_add(NMPlatform * self, - const char * name, +nm_platform_link_vrf_add(NMPlatform *self, + const char *name, const NMPlatformLnkVrf *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { return nm_platform_link_add(self, NM_LINK_TYPE_VRF, name, 0, NULL, 0, 0, props, out_link); } static inline int -nm_platform_link_vxlan_add(NMPlatform * self, - const char * name, +nm_platform_link_vxlan_add(NMPlatform *self, + const char *name, const NMPlatformLnkVxlan *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { return nm_platform_link_add(self, NM_LINK_TYPE_VXLAN, name, 0, NULL, 0, 0, props, out_link); } static inline int -nm_platform_link_6lowpan_add(NMPlatform * self, - const char * name, +nm_platform_link_6lowpan_add(NMPlatform *self, + const char *name, int parent, const NMPlatformLink **out_link) { @@ -1715,10 +1708,10 @@ nm_platform_link_6lowpan_add(NMPlatform * self, } static inline int -nm_platform_link_ip6tnl_add(NMPlatform * self, - const char * name, +nm_platform_link_ip6tnl_add(NMPlatform *self, + const char *name, const NMPlatformLnkIp6Tnl *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { g_return_val_if_fail(props, -NME_BUG); g_return_val_if_fail(!props->is_gre, -NME_BUG); @@ -1727,12 +1720,12 @@ nm_platform_link_ip6tnl_add(NMPlatform * self, } static inline int -nm_platform_link_ip6gre_add(NMPlatform * self, - const char * name, - const void * address, +nm_platform_link_ip6gre_add(NMPlatform *self, + const char *name, + const void *address, size_t address_len, const NMPlatformLnkIp6Tnl *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { g_return_val_if_fail(props, -NME_BUG); g_return_val_if_fail(props->is_gre, -NME_BUG); @@ -1749,10 +1742,10 @@ nm_platform_link_ip6gre_add(NMPlatform * self, } static inline int -nm_platform_link_ipip_add(NMPlatform * self, - const char * name, +nm_platform_link_ipip_add(NMPlatform *self, + const char *name, const NMPlatformLnkIpIp *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { g_return_val_if_fail(props, -NME_BUG); @@ -1760,11 +1753,11 @@ nm_platform_link_ipip_add(NMPlatform * self, } static inline int -nm_platform_link_macsec_add(NMPlatform * self, - const char * name, +nm_platform_link_macsec_add(NMPlatform *self, + const char *name, int parent, const NMPlatformLnkMacsec *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { g_return_val_if_fail(props, -NME_BUG); g_return_val_if_fail(parent > 0, -NME_BUG); @@ -1781,11 +1774,11 @@ nm_platform_link_macsec_add(NMPlatform * self, } static inline int -nm_platform_link_macvlan_add(NMPlatform * self, - const char * name, +nm_platform_link_macvlan_add(NMPlatform *self, + const char *name, int parent, const NMPlatformLnkMacvlan *props, - const NMPlatformLink ** out_link) + const NMPlatformLink **out_link) { g_return_val_if_fail(props, -NME_BUG); g_return_val_if_fail(parent > 0, -NME_BUG); @@ -1807,7 +1800,7 @@ gboolean nm_platform_link_set_netns(NMPlatform *self, int ifindex, int netns_fd) struct _NMDedupMultiHeadEntry; struct _NMPLookup; -const struct _NMDedupMultiHeadEntry *nm_platform_lookup(NMPlatform * self, +const struct _NMDedupMultiHeadEntry *nm_platform_lookup(NMPlatform *self, const struct _NMPLookup *lookup); #define nm_platform_iter_obj_for_each(iter, self, lookup, obj) \ @@ -1818,7 +1811,7 @@ gboolean nm_platform_lookup_predicate_routes_main(const NMPObject *obj, gpointer gboolean nm_platform_lookup_predicate_routes_main_skip_rtprot_kernel(const NMPObject *obj, gpointer user_data); -GPtrArray *nm_platform_lookup_clone(NMPlatform * self, +GPtrArray *nm_platform_lookup_clone(NMPlatform *self, const struct _NMPLookup *lookup, NMPObjectPredicateFunc predicate, gpointer user_data); @@ -1874,9 +1867,9 @@ nm_platform_link_change_flags(NMPlatform *self, int ifindex, unsigned value, gbo return nm_platform_link_change_flags_full(self, ifindex, value, set ? value : 0u); } -gboolean nm_platform_link_get_udev_property(NMPlatform * self, +gboolean nm_platform_link_get_udev_property(NMPlatform *self, int ifindex, - const char * name, + const char *name, const char **out_value); const char *nm_platform_link_get_udi(NMPlatform *self, int ifindex); const char *nm_platform_link_get_path(NMPlatform *self, int ifindex); @@ -1887,39 +1880,39 @@ int nm_platform_link_set_inet6_addr_gen_mode(NMPlatform *self, int ifindex, guin gboolean nm_platform_link_set_ipv6_token(NMPlatform *self, int ifindex, const NMUtilsIPv6IfaceId *iid); -gboolean nm_platform_link_get_permanent_address_ethtool(NMPlatform * self, +gboolean nm_platform_link_get_permanent_address_ethtool(NMPlatform *self, int ifindex, NMPLinkAddress *out_address); -gboolean nm_platform_link_get_permanent_address(NMPlatform * self, +gboolean nm_platform_link_get_permanent_address(NMPlatform *self, const NMPlatformLink *plink, - NMPLinkAddress * out_address); + NMPLinkAddress *out_address); int nm_platform_link_set_address(NMPlatform *self, int ifindex, const void *address, size_t length); int nm_platform_link_set_mtu(NMPlatform *self, int ifindex, guint32 mtu); gboolean nm_platform_link_set_name(NMPlatform *self, int ifindex, const char *name); -void nm_platform_link_set_sriov_params_async(NMPlatform * self, +void nm_platform_link_set_sriov_params_async(NMPlatform *self, int ifindex, guint num_vfs, NMOptionBool autoprobe, NMPlatformAsyncCallback callback, gpointer callback_data, - GCancellable * cancellable); + GCancellable *cancellable); gboolean nm_platform_link_set_sriov_vfs(NMPlatform *self, int ifindex, const NMPlatformVF *const *vfs); -gboolean nm_platform_link_set_bridge_vlans(NMPlatform * self, +gboolean nm_platform_link_set_bridge_vlans(NMPlatform *self, int ifindex, gboolean on_master, const NMPlatformBridgeVlan *const *vlans); -char * nm_platform_link_get_physical_port_id(NMPlatform *self, int ifindex); +char *nm_platform_link_get_physical_port_id(NMPlatform *self, int ifindex); guint nm_platform_link_get_dev_id(NMPlatform *self, int ifindex); gboolean nm_platform_link_get_wake_on_lan(NMPlatform *self, int ifindex); gboolean nm_platform_link_get_driver_info(NMPlatform *self, int ifindex, - char ** out_driver_name, - char ** out_driver_version, - char ** out_fw_version); + char **out_driver_name, + char **out_driver_version, + char **out_fw_version); gboolean nm_platform_link_supports_carrier_detect(NMPlatform *self, int ifindex); gboolean nm_platform_link_supports_vlans(NMPlatform *self, int ifindex); @@ -1932,14 +1925,14 @@ gboolean nm_platform_sysctl_master_set_option(NMPlatform *self, int ifindex, const char *option, const char *value); -char * nm_platform_sysctl_master_get_option(NMPlatform *self, int ifindex, const char *option); +char *nm_platform_sysctl_master_get_option(NMPlatform *self, int ifindex, const char *option); gboolean nm_platform_sysctl_slave_set_option(NMPlatform *self, int ifindex, const char *option, const char *value); -char * nm_platform_sysctl_slave_get_option(NMPlatform *self, int ifindex, const char *option); +char *nm_platform_sysctl_slave_get_option(NMPlatform *self, int ifindex, const char *option); -const NMPObject *nm_platform_link_get_lnk(NMPlatform * self, +const NMPObject *nm_platform_link_get_lnk(NMPlatform *self, int ifindex, NMLinkType link_type, const NMPlatformLink **out_link); @@ -1982,7 +1975,7 @@ nm_platform_link_get_lnk_wireguard(NMPlatform *self, int ifindex, const NMPlatfo gboolean nm_platform_link_vlan_set_ingress_map(NMPlatform *self, int ifindex, int from, int to); gboolean nm_platform_link_vlan_set_egress_map(NMPlatform *self, int ifindex, int from, int to); -gboolean nm_platform_link_vlan_change(NMPlatform * self, +gboolean nm_platform_link_vlan_change(NMPlatform *self, int ifindex, _NMVlanFlags flags_mask, _NMVlanFlags flags_set, @@ -1993,30 +1986,30 @@ gboolean nm_platform_link_vlan_change(NMPlatform * self, const NMVlanQosMapping *egress_map, gsize n_egress_map); -int nm_platform_link_infiniband_add(NMPlatform * self, +int nm_platform_link_infiniband_add(NMPlatform *self, int parent, int p_key, const NMPlatformLink **out_link); int nm_platform_link_infiniband_delete(NMPlatform *self, int parent, int p_key); -gboolean nm_platform_link_infiniband_get_properties(NMPlatform * self, +gboolean nm_platform_link_infiniband_get_properties(NMPlatform *self, int ifindex, - int * parent, - int * p_key, + int *parent, + int *p_key, const char **mode); gboolean nm_platform_link_veth_get_properties(NMPlatform *self, int ifindex, int *out_peer_ifindex); -gboolean nm_platform_link_tun_get_properties(NMPlatform * self, +gboolean nm_platform_link_tun_get_properties(NMPlatform *self, int ifindex, NMPlatformLnkTun *out_properties); gboolean nm_platform_wifi_get_capabilities(NMPlatform *self, int ifindex, _NMDeviceWifiCapabilities *caps); guint32 nm_platform_wifi_get_frequency(NMPlatform *self, int ifindex); -gboolean nm_platform_wifi_get_station(NMPlatform * self, +gboolean nm_platform_wifi_get_station(NMPlatform *self, int ifindex, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate); + int *out_quality, + guint32 *out_rate); _NM80211Mode nm_platform_wifi_get_mode(NMPlatform *self, int ifindex); void nm_platform_wifi_set_mode(NMPlatform *self, int ifindex, _NM80211Mode mode); void nm_platform_wifi_set_powersave(NMPlatform *self, int ifindex, guint32 powersave); @@ -2045,24 +2038,24 @@ const NMPlatformIP4Address *nm_platform_ip4_address_get(NMPlatform *self, guint8 plen, in_addr_t peer_address); -int nm_platform_link_sit_add(NMPlatform * self, - const char * name, +int nm_platform_link_sit_add(NMPlatform *self, + const char *name, const NMPlatformLnkSit *props, - const NMPlatformLink ** out_link); -int nm_platform_link_tun_add(NMPlatform * self, - const char * name, + const NMPlatformLink **out_link); +int nm_platform_link_tun_add(NMPlatform *self, + const char *name, const NMPlatformLnkTun *props, - const NMPlatformLink ** out_link, - int * out_fd); + const NMPlatformLink **out_link, + int *out_fd); gboolean nm_platform_link_6lowpan_get_properties(NMPlatform *self, int ifindex, int *out_parent); int nm_platform_link_wireguard_add(NMPlatform *self, const char *name, const NMPlatformLink **out_link); -int nm_platform_link_wireguard_change(NMPlatform * self, +int nm_platform_link_wireguard_change(NMPlatform *self, int ifindex, - const NMPlatformLnkWireGuard * lnk_wireguard, - const struct _NMPWireGuardPeer * peers, + const NMPlatformLnkWireGuard *lnk_wireguard, + const struct _NMPWireGuardPeer *peers, const NMPlatformWireGuardChangePeerFlags *peer_flags, guint peers_len, NMPlatformWireGuardChangeFlags change_flags); @@ -2082,7 +2075,7 @@ gboolean nm_platform_ip4_address_add(NMPlatform *self, guint32 preferred_lft, guint32 flags, const char *label); -gboolean nm_platform_ip6_address_add(NMPlatform * self, +gboolean nm_platform_ip6_address_add(NMPlatform *self, int ifindex, struct in6_addr address, guint8 plen, @@ -2101,8 +2094,8 @@ nm_platform_ip6_address_delete(NMPlatform *self, int ifindex, struct in6_addr ad gboolean nm_platform_ip_address_sync(NMPlatform *self, int addr_family, int ifindex, - GPtrArray * known_addresses, - GPtrArray * addresses_prune); + GPtrArray *known_addresses, + GPtrArray *addresses_prune); GPtrArray *nm_platform_ip_address_get_prune_list(NMPlatform *self, int addr_family, @@ -2113,7 +2106,7 @@ static inline gboolean _nm_platform_ip_address_sync(NMPlatform *self, int addr_family, int ifindex, - GPtrArray * known_addresses, + GPtrArray *known_addresses, gboolean full_sync) { gs_unref_ptrarray GPtrArray *addresses_prune = NULL; @@ -2135,7 +2128,7 @@ nm_platform_ip4_address_sync(NMPlatform *self, int ifindex, GPtrArray *known_add static inline gboolean nm_platform_ip6_address_sync(NMPlatform *self, int ifindex, - GPtrArray * known_addresses, + GPtrArray *known_addresses, gboolean full_sync) { return _nm_platform_ip_address_sync(self, AF_INET6, ifindex, known_addresses, full_sync); @@ -2188,7 +2181,9 @@ static inline gconstpointer nm_platform_ip_route_get_gateway(int addr_family, const NMPlatformIPRoute *route) { nm_assert_addr_family(addr_family); - nm_assert(route); + + if (!route) + return NULL; if (NM_IS_IPv4(addr_family)) return &((NMPlatformIP4Route *) route)->gateway; @@ -2199,7 +2194,7 @@ int nm_platform_ip_route_add(NMPlatform *self, NMPNlmFlags flags, const NMPObjec int nm_platform_ip4_route_add(NMPlatform *self, NMPNlmFlags flags, const NMPlatformIP4Route *route); int nm_platform_ip6_route_add(NMPlatform *self, NMPNlmFlags flags, const NMPlatformIP6Route *route); -GPtrArray *nm_platform_ip_route_get_prune_list(NMPlatform * self, +GPtrArray *nm_platform_ip_route_get_prune_list(NMPlatform *self, int addr_family, int ifindex, NMIPRouteTableSyncMode route_table_sync); @@ -2207,19 +2202,19 @@ GPtrArray *nm_platform_ip_route_get_prune_list(NMPlatform * self, gboolean nm_platform_ip_route_sync(NMPlatform *self, int addr_family, int ifindex, - GPtrArray * routes, - GPtrArray * routes_prune, + GPtrArray *routes, + GPtrArray *routes_prune, GPtrArray **out_temporary_not_available); gboolean nm_platform_ip_route_flush(NMPlatform *self, int addr_family, int ifindex); -int nm_platform_ip_route_get(NMPlatform * self, +int nm_platform_ip_route_get(NMPlatform *self, int addr_family, gconstpointer address, int oif_ifindex, - NMPObject ** out_route); + NMPObject **out_route); -int nm_platform_routing_rule_add(NMPlatform * self, +int nm_platform_routing_rule_add(NMPlatform *self, NMPNlmFlags flags, const NMPlatformRoutingRule *routing_rule); @@ -2229,8 +2224,8 @@ int nm_platform_tfilter_add(NMPlatform *self, NMPNlmFlags flags, const NMPlatfor int nm_platform_tfilter_delete(NMPlatform *self, int ifindex, guint32 parent, gboolean log_error); gboolean nm_platform_tc_sync(NMPlatform *self, int ifindex, - GPtrArray * known_qdiscs, - GPtrArray * known_tfilters); + GPtrArray *known_qdiscs, + GPtrArray *known_tfilters); const char *nm_platform_link_to_string(const NMPlatformLink *link, char *buf, gsize len); const char *nm_platform_lnk_bridge_to_string(const NMPlatformLnkBridge *lnk, char *buf, gsize len); @@ -2263,10 +2258,10 @@ const char *nm_platform_vf_to_string(const NMPlatformVF *vf, char *buf, gsize le const char * nm_platform_bridge_vlan_to_string(const NMPlatformBridgeVlan *vlan, char *buf, gsize len); -const char *nm_platform_vlan_qos_mapping_to_string(const char * name, +const char *nm_platform_vlan_qos_mapping_to_string(const char *name, const NMVlanQosMapping *map, gsize n_map, - char * buf, + char *buf, gsize len); const char * @@ -2339,13 +2334,13 @@ void nm_platform_ip4_address_hash_update(const NMPlatformIP4Address *obj, NMHash void nm_platform_ip6_address_hash_update(const NMPlatformIP6Address *obj, NMHashState *h); void nm_platform_ip4_route_hash_update(const NMPlatformIP4Route *obj, NMPlatformIPRouteCmpType cmp_type, - NMHashState * h); + NMHashState *h); void nm_platform_ip6_route_hash_update(const NMPlatformIP6Route *obj, NMPlatformIPRouteCmpType cmp_type, - NMHashState * h); + NMHashState *h); void nm_platform_routing_rule_hash_update(const NMPlatformRoutingRule *obj, NMPlatformRoutingRuleCmpType cmp_type, - NMHashState * h); + NMHashState *h); void nm_platform_lnk_bridge_hash_update(const NMPlatformLnkBridge *obj, NMHashState *h); void nm_platform_lnk_gre_hash_update(const NMPlatformLnkGre *obj, NMHashState *h); void nm_platform_lnk_infiniband_hash_update(const NMPlatformLnkInfiniband *obj, NMHashState *h); @@ -2372,34 +2367,34 @@ const char *nm_platform_route_scope2str(int scope, char *buf, gsize len); int nm_platform_ip_address_cmp_expiry(const NMPlatformIPAddress *a, const NMPlatformIPAddress *b); -gboolean nm_platform_ethtool_set_wake_on_lan(NMPlatform * self, +gboolean nm_platform_ethtool_set_wake_on_lan(NMPlatform *self, int ifindex, _NMSettingWiredWakeOnLan wol, - const char * wol_password); -gboolean nm_platform_ethtool_set_link_settings(NMPlatform * self, + const char *wol_password); +gboolean nm_platform_ethtool_set_link_settings(NMPlatform *self, int ifindex, gboolean autoneg, guint32 speed, NMPlatformLinkDuplexType duplex); -gboolean nm_platform_ethtool_get_link_settings(NMPlatform * self, +gboolean nm_platform_ethtool_get_link_settings(NMPlatform *self, int ifindex, - gboolean * out_autoneg, - guint32 * out_speed, + gboolean *out_autoneg, + guint32 *out_speed, NMPlatformLinkDuplexType *out_duplex); NMEthtoolFeatureStates *nm_platform_ethtool_get_link_features(NMPlatform *self, int ifindex); gboolean nm_platform_ethtool_set_features( - NMPlatform * self, + NMPlatform *self, int ifindex, const NMEthtoolFeatureStates *features, const NMOptionBool *requested /* indexed by NMEthtoolID - _NM_ETHTOOL_ID_FEATURE_FIRST */, gboolean do_set /* or reset */); -gboolean nm_platform_ethtool_get_link_coalesce(NMPlatform * self, +gboolean nm_platform_ethtool_get_link_coalesce(NMPlatform *self, int ifindex, NMEthtoolCoalesceState *coalesce); -gboolean nm_platform_ethtool_set_coalesce(NMPlatform * self, +gboolean nm_platform_ethtool_set_coalesce(NMPlatform *self, int ifindex, const NMEthtoolCoalesceState *coalesce); @@ -2416,7 +2411,7 @@ nm_platform_ethtool_set_pause(NMPlatform *self, int ifindex, const NMEthtoolPaus void nm_platform_ip4_dev_route_blacklist_set(NMPlatform *self, int ifindex, - GPtrArray * ip4_dev_route_blacklist); + GPtrArray *ip4_dev_route_blacklist); struct _NMDedupMultiIndex *nm_platform_get_multi_idx(NMPlatform *self); @@ -2426,6 +2421,7 @@ NMPlatformIP4Route *nm_platform_ip4_address_generate_device_route(const NMPlatfo int ifindex, guint32 route_table, guint32 route_metric, + gboolean force_commit, NMPlatformIP4Route *dst); /*****************************************************************************/ diff --git a/src/libnm-platform/nmp-netns.c b/src/libnm-platform/nmp-netns.c index d06c3e11..2563e8f6 100644 --- a/src/libnm-platform/nmp-netns.c +++ b/src/libnm-platform/nmp-netns.c @@ -147,8 +147,8 @@ static GArray * _netns_stack_get_impl(void) { gs_unref_object NMPNetns *netns = NULL; - gs_free_error GError *error = NULL; - GArray * s; + gs_free_error GError *error = NULL; + GArray *s; s = g_array_new(FALSE, FALSE, sizeof(NetnsInfo)); g_array_set_clear_func(s, _netns_stack_clear_cb); @@ -444,7 +444,7 @@ nmp_netns_get_fd_mnt(NMPNetns *self) static gboolean _nmp_netns_push_type(NMPNetns *self, int ns_types) { - GArray * netns_stack = _netns_stack_get(); + GArray *netns_stack = _netns_stack_get(); NetnsInfo *info; char sbuf[100]; @@ -493,10 +493,10 @@ nmp_netns_push_type(NMPNetns *self, int ns_types) NMPNetns * nmp_netns_new(void) { - GArray * netns_stack = _netns_stack_get(); - NMPNetns * self; + GArray *netns_stack = _netns_stack_get(); + NMPNetns *self; int errsv; - GError * error = NULL; + GError *error = NULL; unsigned long mountflags = 0; if (!_stack_peek(netns_stack)) { @@ -553,7 +553,7 @@ err_out: gboolean nmp_netns_pop(NMPNetns *self) { - GArray * netns_stack = _netns_stack_get(); + GArray *netns_stack = _netns_stack_get(); NetnsInfo *info; int ns_types; @@ -608,9 +608,9 @@ nmp_netns_is_initial(void) gboolean nmp_netns_bind_to_path(NMPNetns *self, const char *filename, int *out_fd) { - gs_free char * dirname = NULL; - int errsv; - int fd; + gs_free char *dirname = NULL; + int errsv; + int fd; nm_auto_pop_netns NMPNetns *netns_pop = NULL; g_return_val_if_fail(NMP_IS_NETNS(self), FALSE); @@ -690,7 +690,7 @@ nmp_netns_bind_to_path_destroy(NMPNetns *self, const char *filename) static void set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMPNetns * self = NMP_NETNS(object); + NMPNetns *self = NMP_NETNS(object); NMPNetnsPrivate *priv = NMP_NETNS_GET_PRIVATE(self); switch (prop_id) { @@ -717,7 +717,7 @@ nmp_netns_init(NMPNetns *self) static void dispose(GObject *object) { - NMPNetns * self = NMP_NETNS(object); + NMPNetns *self = NMP_NETNS(object); NMPNetnsPrivate *priv = NMP_NETNS_GET_PRIVATE(self); nm_close(priv->fd_net); diff --git a/src/libnm-platform/nmp-object.c b/src/libnm-platform/nmp-object.c index 559fd8d6..ef94942e 100644 --- a/src/libnm-platform/nmp-object.c +++ b/src/libnm-platform/nmp-object.c @@ -279,8 +279,8 @@ static const NMDedupMultiIdxTypeClass _dedup_multi_idx_type_class; static void _idx_obj_id_hash_update(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj, - NMHashState * h) + const NMDedupMultiObj *obj, + NMHashState *h) { const NMPObject *o = (NMPObject *) obj; @@ -292,8 +292,8 @@ _idx_obj_id_hash_update(const NMDedupMultiIdxType *idx_type, static gboolean _idx_obj_id_equal(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj_a, - const NMDedupMultiObj * obj_b) + const NMDedupMultiObj *obj_a, + const NMDedupMultiObj *obj_b) { const NMPObject *o_a = (NMPObject *) obj_a; const NMPObject *o_b = (NMPObject *) obj_b; @@ -307,9 +307,9 @@ _idx_obj_id_equal(const NMDedupMultiIdxType *idx_type, static guint _idx_obj_part(const DedupMultiIdxType *idx_type, - const NMPObject * obj_a, - const NMPObject * obj_b, - NMHashState * h) + const NMPObject *obj_a, + const NMPObject *obj_b, + NMHashState *h) { NMPObjectType obj_type; @@ -466,16 +466,16 @@ _idx_obj_partitionable(const NMDedupMultiIdxType *idx_type, const NMDedupMultiOb static void _idx_obj_partition_hash_update(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj, - NMHashState * h) + const NMDedupMultiObj *obj, + NMHashState *h) { _idx_obj_part((DedupMultiIdxType *) idx_type, (NMPObject *) obj, NULL, h); } static gboolean _idx_obj_partition_equal(const NMDedupMultiIdxType *idx_type, - const NMDedupMultiObj * obj_a, - const NMDedupMultiObj * obj_b) + const NMDedupMultiObj *obj_a, + const NMDedupMultiObj *obj_b) { return _idx_obj_part((DedupMultiIdxType *) idx_type, (NMPObject *) obj_a, @@ -528,8 +528,8 @@ _vlan_xgress_qos_mappings_cmp(guint n_map, } static void -_vlan_xgress_qos_mappings_cpy(guint * dst_n_map, - NMVlanQosMapping ** dst_map, +_vlan_xgress_qos_mappings_cpy(guint *dst_n_map, + NMVlanQosMapping **dst_map, guint src_n_map, const NMVlanQosMapping *src_map) { @@ -655,7 +655,7 @@ _nmp_object_fixup_link_udev_fields(NMPObject **obj_new, NMPObject *obj_orig, gbo { const char *driver = NULL; gboolean initialized = FALSE; - NMPObject * obj; + NMPObject *obj; nm_assert(obj_orig || *obj_new); nm_assert(obj_new); @@ -695,8 +695,8 @@ _nmp_object_fixup_link_udev_fields(NMPObject **obj_new, NMPObject *obj_orig, gbo } static void -_nmp_object_fixup_link_master_connected(NMPObject ** obj_new, - NMPObject * obj_orig, +_nmp_object_fixup_link_master_connected(NMPObject **obj_new, + NMPObject *obj_orig, const NMPCache *cache) { NMPObject *obj; @@ -775,7 +775,7 @@ NMPObject * nmp_object_new(NMPObjectType obj_type, gconstpointer plobj) { const NMPClass *klass = nmp_class_from_type(obj_type); - NMPObject * obj; + NMPObject *obj; obj = _nmp_object_new_from_class(klass); if (plobj) @@ -891,9 +891,9 @@ nmp_object_stackinit_id_ip6_address(NMPObject *obj, int ifindex, const struct in /*****************************************************************************/ const char * -nmp_object_to_string(const NMPObject * obj, +nmp_object_to_string(const NMPObject *obj, NMPObjectToStringMode to_string_mode, - char * buf, + char *buf, gsize buf_size) { const NMPClass *klass; @@ -937,13 +937,13 @@ nmp_object_to_string(const NMPObject * obj, } static const char * -_vt_cmd_obj_to_string_link(const NMPObject * obj, +_vt_cmd_obj_to_string_link(const NMPObject *obj, NMPObjectToStringMode to_string_mode, - char * buf, + char *buf, gsize buf_size) { const NMPClass *klass = NMP_OBJECT_GET_CLASS(obj); - char * b = buf; + char *b = buf; switch (to_string_mode) { case NMP_OBJECT_TO_STRING_ID: @@ -982,14 +982,14 @@ _vt_cmd_obj_to_string_link(const NMPObject * obj, } static const char * -_vt_cmd_obj_to_string_lnk_vlan(const NMPObject * obj, +_vt_cmd_obj_to_string_lnk_vlan(const NMPObject *obj, NMPObjectToStringMode to_string_mode, - char * buf, + char *buf, gsize buf_size) { const NMPClass *klass; char buf2[sizeof(_nm_utils_to_string_buffer)]; - char * b; + char *b; gsize l; klass = NMP_OBJECT_GET_CLASS(obj); @@ -1046,14 +1046,14 @@ _vt_cmd_obj_to_string_lnk_vlan(const NMPObject * obj, } static const char * -_vt_cmd_obj_to_string_lnk_wireguard(const NMPObject * obj, +_vt_cmd_obj_to_string_lnk_wireguard(const NMPObject *obj, NMPObjectToStringMode to_string_mode, - char * buf, + char *buf, gsize buf_size) { const NMPClass *klass; char buf2[sizeof(_nm_utils_to_string_buffer)]; - char * b; + char *b; guint i; klass = NMP_OBJECT_GET_CLASS(obj); @@ -1100,7 +1100,7 @@ _vt_cmd_obj_to_string_lnk_wireguard(const NMPObject * obj, #define _vt_cmd_plobj_to_string_id(type, plat_type, ...) \ static const char *_vt_cmd_plobj_to_string_id_##type(const NMPlatformObject *_obj, \ - char * buf, \ + char *buf, \ gsize buf_len) \ { \ plat_type *const obj = (plat_type *) _obj; \ @@ -1825,7 +1825,7 @@ static const guint8 _supported_cache_ids_routing_rules[] = { static void _vt_dedup_obj_destroy(NMDedupMultiObj *obj) { - NMPObject * o = (NMPObject *) obj; + NMPObject *o = (NMPObject *) obj; const NMPClass *klass; nm_assert(o->parent._ref_count == 0); @@ -1907,7 +1907,7 @@ nmp_cache_link_connected_for_slave(int ifindex_master, const NMPObject *slave) * Returns: %TRUE, if @master->link.connected should be flipped/toggled. **/ gboolean -nmp_cache_link_connected_needs_toggle(const NMPCache * cache, +nmp_cache_link_connected_needs_toggle(const NMPCache *cache, const NMPObject *master, const NMPObject *potential_slave, const NMPObject *ignore_slave) @@ -1972,7 +1972,7 @@ nmp_cache_link_connected_needs_toggle(const NMPCache * cache, * The connected flag of that master should be toggled. */ const NMPObject * -nmp_cache_link_connected_needs_toggle_by_ifindex(const NMPCache * cache, +nmp_cache_link_connected_needs_toggle_by_ifindex(const NMPCache *cache, int master_ifindex, const NMPObject *potential_slave, const NMPObject *ignore_slave) @@ -1990,7 +1990,7 @@ nmp_cache_link_connected_needs_toggle_by_ifindex(const NMPCache * cache, /*****************************************************************************/ static const NMDedupMultiEntry * -_lookup_entry_with_idx_type(const NMPCache * cache, +_lookup_entry_with_idx_type(const NMPCache *cache, NMPCacheIdType cache_id_type, const NMPObject *obj) { @@ -2014,7 +2014,7 @@ _lookup_entry(const NMPCache *cache, const NMPObject *obj) } const NMDedupMultiEntry * -nmp_cache_lookup_entry_with_idx_type(const NMPCache * cache, +nmp_cache_lookup_entry_with_idx_type(const NMPCache *cache, NMPCacheIdType cache_id_type, const NMPObject *obj) { @@ -2063,7 +2063,7 @@ nmp_cache_lookup_link(const NMPCache *cache, int ifindex) /*****************************************************************************/ const NMDedupMultiHeadEntry * -nmp_cache_lookup_all(const NMPCache * cache, +nmp_cache_lookup_all(const NMPCache *cache, NMPCacheIdType cache_id_type, const NMPObject *select_obj) { @@ -2220,7 +2220,7 @@ nmp_lookup_init_ip4_route_by_weak_id(NMPLookup *lookup, } const NMPLookup * -nmp_lookup_init_ip6_route_by_weak_id(NMPLookup * lookup, +nmp_lookup_init_ip6_route_by_weak_id(NMPLookup *lookup, const struct in6_addr *network, guint plen, guint32 metric, @@ -2269,10 +2269,10 @@ nmp_cache_lookup_to_array(const NMDedupMultiHeadEntry *head_entry, NMPObjectType obj_type, gboolean visible_only) { - const NMPClass * klass = nmp_class_from_type(obj_type); + const NMPClass *klass = nmp_class_from_type(obj_type); NMDedupMultiIter iter; const NMPObject *o; - GArray * array; + GArray *array; g_return_val_if_fail(klass, NULL); @@ -2289,19 +2289,19 @@ nmp_cache_lookup_to_array(const NMDedupMultiHeadEntry *head_entry, /*****************************************************************************/ const NMPObject * -nmp_cache_lookup_link_full(const NMPCache * cache, +nmp_cache_lookup_link_full(const NMPCache *cache, int ifindex, - const char * ifname, + const char *ifname, gboolean visible_only, NMLinkType link_type, NMPObjectMatchFn match_fn, gpointer user_data) { NMPObject obj_needle; - const NMPObject * obj; + const NMPObject *obj; NMDedupMultiIter iter; const NMDedupMultiHeadEntry *head_entry; - const NMPlatformLink * link = NULL; + const NMPlatformLink *link = NULL; NMPLookup lookup; if (ifindex > 0) { @@ -2369,8 +2369,8 @@ _obj_get_add_mode(const NMPObject *obj) static void _idxcache_update_order_for_dump(NMPCache *cache, const NMDedupMultiEntry *entry) { - const NMPClass * klass; - const guint8 * i_idx_type; + const NMPClass *klass; + const guint8 *i_idx_type; const NMDedupMultiEntry *entry2; nm_dedup_multi_entry_reorder(entry, NULL, TRUE); @@ -2396,7 +2396,7 @@ _idxcache_update_order_for_dump(NMPCache *cache, const NMDedupMultiEntry *entry) } static void -_idxcache_update_other_cache_ids(NMPCache * cache, +_idxcache_update_other_cache_ids(NMPCache *cache, NMPCacheIdType cache_id_type, const NMPObject *obj_old, const NMPObject *obj_new, @@ -2405,7 +2405,7 @@ _idxcache_update_other_cache_ids(NMPCache * cache, const NMDedupMultiEntry *entry_new; const NMDedupMultiEntry *entry_old; const NMDedupMultiEntry *entry_order; - NMDedupMultiIdxType * idx_type; + NMDedupMultiIdxType *idx_type; nm_assert(obj_new || obj_old); nm_assert(!obj_new || NMP_OBJECT_GET_TYPE(obj_new) != NMP_OBJECT_TYPE_UNKNOWN); @@ -2474,15 +2474,15 @@ _idxcache_update_other_cache_ids(NMPCache * cache, } static void -_idxcache_update(NMPCache * cache, - const NMDedupMultiEntry * entry_old, - NMPObject * obj_new, +_idxcache_update(NMPCache *cache, + const NMDedupMultiEntry *entry_old, + NMPObject *obj_new, gboolean is_dump, const NMDedupMultiEntry **out_entry_new) { - const NMPClass * klass; - const guint8 * i_idx_type; - NMDedupMultiIdxType * idx_type_o = _idx_type_get(cache, NMP_CACHE_ID_TYPE_OBJECT_TYPE); + const NMPClass *klass; + const guint8 *i_idx_type; + NMDedupMultiIdxType *idx_type_o = _idx_type_get(cache, NMP_CACHE_ID_TYPE_OBJECT_TYPE); const NMDedupMultiEntry *entry_new = NULL; nm_auto_nmpobj const NMPObject *obj_old = NULL; @@ -2559,14 +2559,14 @@ _idxcache_update(NMPCache * cache, } NMPCacheOpsType -nmp_cache_remove(NMPCache * cache, - const NMPObject * obj_needle, +nmp_cache_remove(NMPCache *cache, + const NMPObject *obj_needle, gboolean equals_by_ptr, gboolean only_dirty, const NMPObject **out_obj_old) { const NMDedupMultiEntry *entry_old; - const NMPObject * obj_old; + const NMPObject *obj_old; entry_old = _lookup_entry(cache, obj_needle); @@ -2593,14 +2593,14 @@ nmp_cache_remove(NMPCache * cache, } NMPCacheOpsType -nmp_cache_remove_netlink(NMPCache * cache, - const NMPObject * obj_needle, +nmp_cache_remove_netlink(NMPCache *cache, + const NMPObject *obj_needle, const NMPObject **out_obj_old, const NMPObject **out_obj_new) { - const NMDedupMultiEntry *entry_old; - const NMDedupMultiEntry *entry_new = NULL; - const NMPObject * obj_old; + const NMDedupMultiEntry *entry_old; + const NMDedupMultiEntry *entry_new = NULL; + const NMPObject *obj_old; nm_auto_nmpobj NMPObject *obj_new = NULL; entry_old = _lookup_entry(cache, obj_needle); @@ -2679,15 +2679,15 @@ nmp_cache_remove_netlink(NMPCache * cache, * and @out_obj_new will be set accordingly. **/ NMPCacheOpsType -nmp_cache_update_netlink(NMPCache * cache, - NMPObject * obj_hand_over, +nmp_cache_update_netlink(NMPCache *cache, + NMPObject *obj_hand_over, gboolean is_dump, const NMPObject **out_obj_old, const NMPObject **out_obj_new) { const NMDedupMultiEntry *entry_old; const NMDedupMultiEntry *entry_new; - const NMPObject * obj_old; + const NMPObject *obj_old; gboolean is_alive; nm_assert(cache); @@ -2789,20 +2789,20 @@ nmp_cache_update_netlink(NMPCache * cache, } NMPCacheOpsType -nmp_cache_update_netlink_route(NMPCache * cache, - NMPObject * obj_hand_over, +nmp_cache_update_netlink_route(NMPCache *cache, + NMPObject *obj_hand_over, gboolean is_dump, guint16 nlmsgflags, const NMPObject **out_obj_old, const NMPObject **out_obj_new, const NMPObject **out_obj_replace, - gboolean * out_resync_required) + gboolean *out_resync_required) { NMDedupMultiIter iter; - const NMDedupMultiEntry * entry_old; - const NMDedupMultiEntry * entry_new; - const NMDedupMultiEntry * entry_cur; - const NMDedupMultiEntry * entry_replace; + const NMDedupMultiEntry *entry_old; + const NMDedupMultiEntry *entry_new; + const NMDedupMultiEntry *entry_cur; + const NMDedupMultiEntry *entry_replace; const NMDedupMultiHeadEntry *head_entry; gboolean is_alive; NMPCacheOpsType ops_type = NMP_CACHE_OPS_UNCHANGED; @@ -2937,16 +2937,16 @@ out: } NMPCacheOpsType -nmp_cache_update_link_udev(NMPCache * cache, +nmp_cache_update_link_udev(NMPCache *cache, int ifindex, struct udev_device *udevice, - const NMPObject ** out_obj_old, - const NMPObject ** out_obj_new) + const NMPObject **out_obj_old, + const NMPObject **out_obj_new) { - const NMPObject *obj_old; + const NMPObject *obj_old; nm_auto_nmpobj NMPObject *obj_new = NULL; - const NMDedupMultiEntry * entry_old; - const NMDedupMultiEntry * entry_new; + const NMDedupMultiEntry *entry_old; + const NMDedupMultiEntry *entry_new; entry_old = nmp_cache_lookup_entry_link(cache, ifindex); @@ -2997,14 +2997,14 @@ nmp_cache_update_link_udev(NMPCache * cache, } NMPCacheOpsType -nmp_cache_update_link_master_connected(NMPCache * cache, +nmp_cache_update_link_master_connected(NMPCache *cache, int ifindex, const NMPObject **out_obj_old, const NMPObject **out_obj_new) { - const NMDedupMultiEntry *entry_old; - const NMDedupMultiEntry *entry_new = NULL; - const NMPObject * obj_old; + const NMDedupMultiEntry *entry_old; + const NMDedupMultiEntry *entry_new = NULL; + const NMPObject *obj_old; nm_auto_nmpobj NMPObject *obj_new = NULL; entry_old = nmp_cache_lookup_entry_link(cache, ifindex); diff --git a/src/libnm-platform/nmp-object.h b/src/libnm-platform/nmp-object.h index bf140d78..784dcc2d 100644 --- a/src/libnm-platform/nmp-object.h +++ b/src/libnm-platform/nmp-object.h @@ -170,9 +170,9 @@ typedef enum { typedef struct { NMDedupMultiObjClass parent; - const char * obj_type_name; - const char * signal_type; - const guint8 * supported_cache_ids; + const char *obj_type_name; + const char *signal_type; + const guint8 *supported_cache_ids; int sizeof_data; int sizeof_public; int addr_family; @@ -189,9 +189,9 @@ typedef struct { void (*cmd_obj_dispose)(NMPObject *obj); gboolean (*cmd_obj_is_alive)(const NMPObject *obj); gboolean (*cmd_obj_is_visible)(const NMPObject *obj); - const char *(*cmd_obj_to_string)(const NMPObject * obj, + const char *(*cmd_obj_to_string)(const NMPObject *obj, NMPObjectToStringMode to_string_mode, - char * buf, + char *buf, gsize buf_size); /* functions that operate on NMPlatformObject */ @@ -302,7 +302,7 @@ typedef struct { typedef struct { NMPlatformLnkWireGuard _public; - const NMPWireGuardPeer * peers; + const NMPWireGuardPeer *peers; const NMPWireGuardAllowedIP *_allowed_ips_buf; guint peers_len; guint _allowed_ips_buf_len; @@ -662,7 +662,7 @@ nmp_object_ref_set_up_cast(gpointer pp, gconstpointer obj) { gboolean _changed = FALSE; const NMPObject *p; - gconstpointer * pp2 = pp; + gconstpointer *pp2 = pp; nm_assert(!pp2 || !*pp2 || NMP_OBJECT_IS_VALID(NMP_OBJECT_UP_CAST(*pp2))); nm_assert(!obj || NMP_OBJECT_IS_VALID(NMP_OBJECT_UP_CAST(obj))); @@ -699,9 +699,9 @@ const NMPObject *nmp_object_stackinit_id_ip4_address(NMPObject *obj, const NMPObject * nmp_object_stackinit_id_ip6_address(NMPObject *obj, int ifindex, const struct in6_addr *address); -const char *nmp_object_to_string(const NMPObject * obj, +const char *nmp_object_to_string(const NMPObject *obj, NMPObjectToStringMode to_string_mode, - char * buf, + char *buf, gsize buf_size); void nmp_object_hash_update(const NMPObject *obj, NMHashState *h); @@ -758,7 +758,7 @@ _nm_auto_nmpobj_cleanup(gpointer p) typedef struct _NMPCache NMPCache; -typedef void (*NMPCachePreHook)(NMPCache * cache, +typedef void (*NMPCachePreHook)(NMPCache *cache, const NMPObject *old, const NMPObject *new, NMPCacheOpsType ops_type, @@ -766,12 +766,12 @@ typedef void (*NMPCachePreHook)(NMPCache * cache, typedef gboolean (*NMPObjectMatchFn)(const NMPObject *obj, gpointer user_data); const NMDedupMultiEntry *nmp_cache_lookup_entry(const NMPCache *cache, const NMPObject *obj); -const NMDedupMultiEntry *nmp_cache_lookup_entry_with_idx_type(const NMPCache * cache, +const NMDedupMultiEntry *nmp_cache_lookup_entry_with_idx_type(const NMPCache *cache, NMPCacheIdType cache_id_type, const NMPObject *obj); const NMDedupMultiEntry *nmp_cache_lookup_entry_link(const NMPCache *cache, int ifindex); -const NMPObject * nmp_cache_lookup_obj(const NMPCache *cache, const NMPObject *obj); -const NMPObject * nmp_cache_lookup_link(const NMPCache *cache, int ifindex); +const NMPObject *nmp_cache_lookup_obj(const NMPCache *cache, const NMPObject *obj); +const NMPObject *nmp_cache_lookup_link(const NMPCache *cache, int ifindex); typedef struct _NMPLookup NMPLookup; @@ -780,7 +780,7 @@ struct _NMPLookup { NMPObject selector_obj; }; -const NMDedupMultiHeadEntry *nmp_cache_lookup_all(const NMPCache * cache, +const NMDedupMultiHeadEntry *nmp_cache_lookup_all(const NMPCache *cache, NMPCacheIdType cache_id_type, const NMPObject *select_obj); @@ -800,7 +800,7 @@ const NMPLookup *nmp_lookup_init_ip4_route_by_weak_id(NMPLookup *lookup, guint plen, guint32 metric, guint8 tos); -const NMPLookup *nmp_lookup_init_ip6_route_by_weak_id(NMPLookup * lookup, +const NMPLookup *nmp_lookup_init_ip6_route_by_weak_id(NMPLookup *lookup, const struct in6_addr *network, guint plen, guint32 metric, @@ -858,20 +858,20 @@ nmp_cache_iter_next_link(NMDedupMultiIter *iter, const NMPlatformLink **out_obj) #define nmp_cache_iter_for_each_link(iter, head, obj) \ for (nm_dedup_multi_iter_init((iter), (head)); nmp_cache_iter_next_link((iter), (obj));) -const NMPObject *nmp_cache_lookup_link_full(const NMPCache * cache, +const NMPObject *nmp_cache_lookup_link_full(const NMPCache *cache, int ifindex, - const char * ifname, + const char *ifname, gboolean visible_only, NMLinkType link_type, NMPObjectMatchFn match_fn, gpointer user_data); gboolean nmp_cache_link_connected_for_slave(int ifindex_master, const NMPObject *slave); -gboolean nmp_cache_link_connected_needs_toggle(const NMPCache * cache, +gboolean nmp_cache_link_connected_needs_toggle(const NMPCache *cache, const NMPObject *master, const NMPObject *potential_slave, const NMPObject *ignore_slave); -const NMPObject *nmp_cache_link_connected_needs_toggle_by_ifindex(const NMPCache * cache, +const NMPObject *nmp_cache_link_connected_needs_toggle_by_ifindex(const NMPCache *cache, int master_ifindex, const NMPObject *potential_slave, const NMPObject *ignore_slave); @@ -880,42 +880,42 @@ gboolean nmp_cache_use_udev_get(const NMPCache *cache); void nmtst_assert_nmp_cache_is_consistent(const NMPCache *cache); -NMPCacheOpsType nmp_cache_remove(NMPCache * cache, - const NMPObject * obj_needle, +NMPCacheOpsType nmp_cache_remove(NMPCache *cache, + const NMPObject *obj_needle, gboolean equals_by_ptr, gboolean only_dirty, const NMPObject **out_obj_old); -NMPCacheOpsType nmp_cache_remove_netlink(NMPCache * cache, - const NMPObject * obj_needle, +NMPCacheOpsType nmp_cache_remove_netlink(NMPCache *cache, + const NMPObject *obj_needle, const NMPObject **out_obj_old, const NMPObject **out_obj_new); -NMPCacheOpsType nmp_cache_update_netlink(NMPCache * cache, - NMPObject * obj_hand_over, +NMPCacheOpsType nmp_cache_update_netlink(NMPCache *cache, + NMPObject *obj_hand_over, gboolean is_dump, const NMPObject **out_obj_old, const NMPObject **out_obj_new); -NMPCacheOpsType nmp_cache_update_netlink_route(NMPCache * cache, - NMPObject * obj_hand_over, +NMPCacheOpsType nmp_cache_update_netlink_route(NMPCache *cache, + NMPObject *obj_hand_over, gboolean is_dump, guint16 nlmsgflags, const NMPObject **out_obj_old, const NMPObject **out_obj_new, const NMPObject **out_obj_replace, - gboolean * out_resync_required); -NMPCacheOpsType nmp_cache_update_link_udev(NMPCache * cache, + gboolean *out_resync_required); +NMPCacheOpsType nmp_cache_update_link_udev(NMPCache *cache, int ifindex, struct udev_device *udevice, - const NMPObject ** out_obj_old, - const NMPObject ** out_obj_new); -NMPCacheOpsType nmp_cache_update_link_master_connected(NMPCache * cache, + const NMPObject **out_obj_old, + const NMPObject **out_obj_new); +NMPCacheOpsType nmp_cache_update_link_master_connected(NMPCache *cache, int ifindex, const NMPObject **out_obj_old, const NMPObject **out_obj_new); static inline const NMDedupMultiEntry * -nmp_cache_reresolve_main_entry(NMPCache * cache, +nmp_cache_reresolve_main_entry(NMPCache *cache, const NMDedupMultiEntry *entry, - const NMPLookup * lookup) + const NMPLookup *lookup) { const NMDedupMultiEntry *main_entry; @@ -944,7 +944,7 @@ NMPCache *nmp_cache_new(NMDedupMultiIndex *multi_idx, gboolean use_udev); void nmp_cache_free(NMPCache *cache); static inline void -ASSERT_nmp_cache_ops(const NMPCache * cache, +ASSERT_nmp_cache_ops(const NMPCache *cache, NMPCacheOpsType ops_type, const NMPObject *obj_old, const NMPObject *obj_new) @@ -1024,7 +1024,7 @@ nm_platform_lookup_object(NMPlatform *platform, NMPObjectType obj_type, int ifin } static inline GPtrArray * -nm_platform_lookup_object_clone(NMPlatform * platform, +nm_platform_lookup_object_clone(NMPlatform *platform, NMPObjectType obj_type, int ifindex, NMPObjectPredicateFunc predicate, @@ -1046,7 +1046,7 @@ nm_platform_lookup_route_default(NMPlatform *platform, NMPObjectType obj_type) } static inline GPtrArray * -nm_platform_lookup_route_default_clone(NMPlatform * platform, +nm_platform_lookup_route_default_clone(NMPlatform *platform, NMPObjectType obj_type, NMPObjectPredicateFunc predicate, gpointer user_data) @@ -1071,7 +1071,7 @@ nm_platform_lookup_ip4_route_by_weak_id(NMPlatform *platform, } static inline const NMDedupMultiHeadEntry * -nm_platform_lookup_ip6_route_by_weak_id(NMPlatform * platform, +nm_platform_lookup_ip6_route_by_weak_id(NMPlatform *platform, const struct in6_addr *network, guint plen, guint32 metric, @@ -1085,7 +1085,7 @@ nm_platform_lookup_ip6_route_by_weak_id(NMPlatform * platform, } static inline const NMDedupMultiHeadEntry * -nm_platform_lookup_object_by_addr_family(NMPlatform * platform, +nm_platform_lookup_object_by_addr_family(NMPlatform *platform, NMPObjectType obj_type, int addr_family) { @@ -1112,6 +1112,21 @@ nmp_object_get_assume_config_once(const NMPObject *obj) } } +static inline gboolean +nmp_object_get_force_commit(const NMPObject *obj) +{ + switch (NMP_OBJECT_GET_TYPE(obj)) { + case NMP_OBJECT_TYPE_IP4_ADDRESS: + case NMP_OBJECT_TYPE_IP6_ADDRESS: + return NMP_OBJECT_CAST_IP_ADDRESS(obj)->a_force_commit; + case NMP_OBJECT_TYPE_IP4_ROUTE: + case NMP_OBJECT_TYPE_IP6_ROUTE: + return NMP_OBJECT_CAST_IP_ROUTE(obj)->r_force_commit; + default: + return nm_assert_unreachable_val(FALSE); + } +} + static inline const char * nmp_object_link_get_ifname(const NMPObject *obj) { diff --git a/src/libnm-platform/nmp-rules-manager.c b/src/libnm-platform/nmp-rules-manager.c index 636c90b2..746d1eaa 100644 --- a/src/libnm-platform/nmp-rules-manager.c +++ b/src/libnm-platform/nmp-rules-manager.c @@ -127,7 +127,7 @@ typedef struct { /*****************************************************************************/ static void _rules_data_untrack(NMPRulesManager *self, - RulesData * rules_data, + RulesData *rules_data, gboolean remove_user_tag_data, gboolean make_owned_by_us); @@ -192,7 +192,7 @@ _rules_data_destroy(gpointer data) static const RulesData * _rules_obj_get_best_data(RulesObjData *obj_data) { - RulesData * rules_data; + RulesData *rules_data; const RulesData *rd_best = NULL; c_list_for_each_entry (rules_data, &obj_data->obj_lst_head, obj_lst) { @@ -308,16 +308,16 @@ _rules_data_lookup(GHashTable *by_data, const NMPObject *obj, gconstpointer user * The purpose here is to set this to %NMP_RULES_MANAGER_EXTERN_WEAKLY_TRACKED_USER_TAG. */ void -nmp_rules_manager_track(NMPRulesManager * self, +nmp_rules_manager_track(NMPRulesManager *self, const NMPlatformRoutingRule *routing_rule, gint32 track_priority, gconstpointer user_tag, gconstpointer user_tag_untrack) { NMPObject obj_stack; - const NMPObject * p_obj_stack; - RulesData * rules_data; - RulesObjData * obj_data; + const NMPObject *p_obj_stack; + RulesData *rules_data; + RulesObjData *obj_data; RulesUserTagData *user_tag_data; gboolean changed = FALSE; guint32 track_priority_val; @@ -415,7 +415,7 @@ nmp_rules_manager_track(NMPRulesManager * self, static void _rules_data_untrack(NMPRulesManager *self, - RulesData * rules_data, + RulesData *rules_data, gboolean remove_user_tag_data, gboolean make_owned_by_us) { @@ -465,13 +465,13 @@ _rules_data_untrack(NMPRulesManager *self, } void -nmp_rules_manager_untrack(NMPRulesManager * self, +nmp_rules_manager_untrack(NMPRulesManager *self, const NMPlatformRoutingRule *routing_rule, gconstpointer user_tag) { NMPObject obj_stack; const NMPObject *p_obj_stack; - RulesData * rules_data; + RulesData *rules_data; g_return_if_fail(NMP_IS_RULES_MANAGER(self)); g_return_if_fail(routing_rule); @@ -491,7 +491,7 @@ nmp_rules_manager_untrack(NMPRulesManager * self, void nmp_rules_manager_set_dirty(NMPRulesManager *self, gconstpointer user_tag) { - RulesData * rules_data; + RulesData *rules_data; RulesUserTagData *user_tag_data; g_return_if_fail(NMP_IS_RULES_MANAGER(self)); @@ -513,8 +513,8 @@ nmp_rules_manager_untrack_all(NMPRulesManager *self, gconstpointer user_tag, gboolean all /* or only dirty */) { - RulesData * rules_data; - RulesData * rules_data_safe; + RulesData *rules_data; + RulesData *rules_data_safe; RulesUserTagData *user_tag_data; g_return_if_fail(NMP_IS_RULES_MANAGER(self)); @@ -543,12 +543,12 @@ nmp_rules_manager_sync(NMPRulesManager *self, gboolean keep_deleted_rules) { const NMDedupMultiHeadEntry *pl_head_entry; NMDedupMultiIter pl_iter; - const NMPObject * plobj; + const NMPObject *plobj; gs_unref_ptrarray GPtrArray *rules_to_delete = NULL; - RulesObjData * obj_data; + RulesObjData *obj_data; GHashTableIter h_iter; guint i; - const RulesData * rd_best; + const RulesData *rd_best; g_return_if_fail(NMP_IS_RULES_MANAGER(self)); @@ -644,7 +644,7 @@ nmp_rules_manager_sync(NMPRulesManager *self, gboolean keep_deleted_rules) void nmp_rules_manager_track_from_platform(NMPRulesManager *self, - NMPlatform * platform, + NMPlatform *platform, int addr_family, gint32 tracking_priority, gconstpointer user_tag) @@ -652,7 +652,7 @@ nmp_rules_manager_track_from_platform(NMPRulesManager *self, NMPLookup lookup; const NMDedupMultiHeadEntry *head_entry; NMDedupMultiIter iter; - const NMPObject * o; + const NMPObject *o; g_return_if_fail(NMP_IS_RULES_MANAGER(self)); diff --git a/src/libnm-platform/nmp-rules-manager.h b/src/libnm-platform/nmp-rules-manager.h index 69cf9075..65e8ddb2 100644 --- a/src/libnm-platform/nmp-rules-manager.h +++ b/src/libnm-platform/nmp-rules-manager.h @@ -19,7 +19,7 @@ void nmp_rules_manager_unref(NMPRulesManager *self); #define nm_auto_unref_rules_manager nm_auto(_nmp_rules_manager_unref) NM_AUTO_DEFINE_FCN0(NMPRulesManager *, _nmp_rules_manager_unref, nmp_rules_manager_unref); -void nmp_rules_manager_track(NMPRulesManager * self, +void nmp_rules_manager_track(NMPRulesManager *self, const NMPlatformRoutingRule *routing_rule, gint32 track_priority, gconstpointer user_tag, @@ -31,12 +31,12 @@ void nmp_rules_manager_track_default(NMPRulesManager *self, gconstpointer user_tag); void nmp_rules_manager_track_from_platform(NMPRulesManager *self, - NMPlatform * platform, + NMPlatform *platform, int addr_family, gint32 tracking_priority, gconstpointer user_tag); -void nmp_rules_manager_untrack(NMPRulesManager * self, +void nmp_rules_manager_untrack(NMPRulesManager *self, const NMPlatformRoutingRule *routing_rule, gconstpointer user_tag); diff --git a/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c b/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c index 148657ea..2fa46e38 100644 --- a/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c +++ b/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c @@ -43,7 +43,7 @@ typedef struct { NMWifiUtils parent; struct nl_sock *nl_sock; - guint32 * freqs; + guint32 *freqs; int id; int num_freqs; int phy; @@ -104,21 +104,21 @@ nl80211_alloc_msg(NMWifiUtilsNl80211 *self, guint32 cmd, guint32 flags) static int nl80211_send_and_recv(NMWifiUtilsNl80211 *self, - struct nl_msg * msg, + struct nl_msg *msg, int (*valid_handler)(struct nl_msg *, void *), void *valid_data) { int err; int done = 0; const struct nl_cb cb = { - .err_cb = error_handler, - .err_arg = &done, - .finish_cb = finish_handler, - .finish_arg = &done, - .ack_cb = ack_handler, - .ack_arg = &done, - .valid_cb = valid_handler, - .valid_arg = valid_data, + .err_cb = error_handler, + .err_arg = &done, + .finish_cb = finish_handler, + .finish_arg = &done, + .ack_cb = ack_handler, + .ack_arg = &done, + .valid_cb = valid_handler, + .valid_arg = valid_data, }; g_return_val_if_fail(msg != NULL, -ENOMEM); @@ -169,8 +169,8 @@ 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]; + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct nlattr *tb[NL80211_ATTR_MAX + 1]; if (nla_parse_arr(tb, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL) < 0) return NL_SKIP; @@ -202,7 +202,7 @@ nl80211_iface_info_handler(struct nl_msg *msg, void *arg) static _NM80211Mode wifi_nl80211_get_mode(NMWifiUtils *data) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; struct nl80211_iface_info iface_info = { .mode = _NM_802_11_MODE_UNKNOWN, }; @@ -219,7 +219,7 @@ wifi_nl80211_get_mode(NMWifiUtils *data) static gboolean wifi_nl80211_set_mode(NMWifiUtils *data, const _NM80211Mode mode) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; int err; @@ -252,7 +252,7 @@ nla_put_failure: static gboolean wifi_nl80211_set_powersave(NMWifiUtils *data, guint32 powersave) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; int err; @@ -271,9 +271,9 @@ static int nl80211_get_wake_on_wlan_handler(struct nl_msg *msg, void *arg) { _NMSettingWirelessWakeOnWLan *wowl = arg; - struct nlattr * attrs[NL80211_ATTR_MAX + 1]; - struct nlattr * trig[NUM_NL80211_WOWLAN_TRIG]; - struct genlmsghdr * gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct nlattr *attrs[NL80211_ATTR_MAX + 1]; + struct nlattr *trig[NUM_NL80211_WOWLAN_TRIG]; + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); nla_parse_arr(attrs, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); @@ -309,7 +309,7 @@ nl80211_get_wake_on_wlan_handler(struct nl_msg *msg, void *arg) static _NMSettingWirelessWakeOnWLan wifi_nl80211_get_wake_on_wlan(NMWifiUtils *data) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; _NMSettingWirelessWakeOnWLan wowl = _NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE; nm_auto_nlmsg struct nl_msg *msg = NULL; @@ -323,9 +323,9 @@ wifi_nl80211_get_wake_on_wlan(NMWifiUtils *data) static gboolean wifi_nl80211_set_wake_on_wlan(NMWifiUtils *data, _NMSettingWirelessWakeOnWLan wowl) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; - struct nlattr * triggers; + struct nlattr *triggers; int err; if (wowl == _NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE) @@ -365,7 +365,7 @@ nla_put_failure: static guint32 wifi_nl80211_get_freq(NMWifiUtils *data) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; struct nl80211_iface_info iface_info = {}; nm_auto_nlmsg struct nl_msg *msg = NULL; @@ -441,11 +441,11 @@ nl80211_station_dump_handler(struct nl_msg *msg, void *arg) [NL80211_RATE_INFO_40_MHZ_WIDTH] = {.type = NLA_FLAG}, [NL80211_RATE_INFO_SHORT_GI] = {.type = NLA_FLAG}, }; - struct nlattr * rinfo[G_N_ELEMENTS(rate_policy)]; - struct nlattr * sinfo[G_N_ELEMENTS(stats_policy)]; + struct nlattr *rinfo[G_N_ELEMENTS(rate_policy)]; + struct nlattr *sinfo[G_N_ELEMENTS(stats_policy)]; struct nl80211_station_info *info = arg; - struct nlattr * tb[NL80211_ATTR_MAX + 1]; - struct genlmsghdr * gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct nlattr *tb[NL80211_ATTR_MAX + 1]; + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); if (nla_parse_arr(tb, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL) < 0) return NL_SKIP; @@ -495,10 +495,10 @@ nl80211_station_dump_handler(struct nl_msg *msg, void *arg) static gboolean wifi_nl80211_get_station(NMWifiUtils *data, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate) + int *out_quality, + guint32 *out_rate) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; struct nl80211_station_info sta_info = {}; @@ -525,7 +525,7 @@ wifi_nl80211_get_station(NMWifiUtils *data, static gboolean wifi_nl80211_indicate_addressing_running(NMWifiUtils *data, gboolean running) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; int err; @@ -552,7 +552,7 @@ nla_put_failure: struct nl80211_device_info { NMWifiUtilsNl80211 *self; int phy; - guint32 * freqs; + guint32 *freqs; int num_freqs; guint32 freq; guint32 caps; @@ -587,14 +587,14 @@ nl80211_wiphy_info_handler(struct nl_msg *msg, void *arg) [NL80211_FREQUENCY_ATTR_RADAR] = {.type = NLA_FLAG}, [NL80211_FREQUENCY_ATTR_MAX_TX_POWER] = {.type = NLA_U32}, }; - struct nlattr * tb[NL80211_ATTR_MAX + 1]; - struct genlmsghdr * gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct nlattr *tb[NL80211_ATTR_MAX + 1]; + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct nl80211_device_info *info = arg; - NMWifiUtilsNl80211 * self = info->self; - struct nlattr * tb_band[NL80211_BAND_ATTR_MAX + 1]; - struct nlattr * tb_freq[G_N_ELEMENTS(freq_policy)]; - struct nlattr * nl_band; - struct nlattr * nl_freq; + NMWifiUtilsNl80211 *self = info->self; + struct nlattr *tb_band[NL80211_BAND_ATTR_MAX + 1]; + struct nlattr *tb_freq[G_N_ELEMENTS(freq_policy)]; + struct nlattr *nl_band; + struct nlattr *nl_freq; int rem_freq; int rem_band; int freq_idx; @@ -761,7 +761,7 @@ nl80211_wiphy_info_handler(struct nl_msg *msg, void *arg) static guint32 wifi_nl80211_get_mesh_channel(NMWifiUtils *data) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; struct nl80211_device_info device_info = {.self = self}; int i; @@ -783,7 +783,7 @@ wifi_nl80211_get_mesh_channel(NMWifiUtils *data) static gboolean wifi_nl80211_set_mesh_channel(NMWifiUtils *data, guint32 channel) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; int err; @@ -802,7 +802,7 @@ nla_put_failure: static gboolean wifi_nl80211_set_mesh_ssid(NMWifiUtils *data, const guint8 *ssid, gsize len) { - NMWifiUtilsNl80211 * self = (NMWifiUtilsNl80211 *) data; + NMWifiUtilsNl80211 *self = (NMWifiUtilsNl80211 *) data; nm_auto_nlmsg struct nl_msg *msg = NULL; int err; @@ -822,7 +822,7 @@ nm_wifi_utils_nl80211_init(NMWifiUtilsNl80211 *self) static void nm_wifi_utils_nl80211_class_init(NMWifiUtilsNl80211Class *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMWifiUtilsClass *wifi_utils_class = NM_WIFI_UTILS_CLASS(klass); object_class->dispose = dispose; @@ -845,7 +845,7 @@ NMWifiUtils * nm_wifi_utils_nl80211_new(int ifindex, struct nl_sock *genl) { gs_unref_object NMWifiUtilsNl80211 *self = NULL; - nm_auto_nlmsg struct nl_msg * msg = NULL; + nm_auto_nlmsg struct nl_msg *msg = NULL; struct nl80211_device_info device_info = {}; if (!genl) diff --git a/src/libnm-platform/wifi/nm-wifi-utils-private.h b/src/libnm-platform/wifi/nm-wifi-utils-private.h index bc1e75ec..7461b65e 100644 --- a/src/libnm-platform/wifi/nm-wifi-utils-private.h +++ b/src/libnm-platform/wifi/nm-wifi-utils-private.h @@ -39,8 +39,8 @@ typedef struct { */ gboolean (*get_station)(NMWifiUtils *data, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate); + int *out_quality, + guint32 *out_rate); /* OLPC Mesh-only functions */ diff --git a/src/libnm-platform/wifi/nm-wifi-utils-wext.c b/src/libnm-platform/wifi/nm-wifi-utils-wext.c index 6fb37c49..2d4112bc 100644 --- a/src/libnm-platform/wifi/nm-wifi-utils-wext.c +++ b/src/libnm-platform/wifi/nm-wifi-utils-wext.c @@ -427,7 +427,7 @@ wext_qual_to_percent(const struct iw_quality *qual, const struct iw_quality *max static int wifi_wext_get_qual(NMWifiUtils *data) { - NMWifiUtilsWext * wext = (NMWifiUtilsWext *) data; + NMWifiUtilsWext *wext = (NMWifiUtilsWext *) data; struct iwreq wrq; struct iw_statistics stats; char ifname[IFNAMSIZ]; @@ -455,8 +455,8 @@ wifi_wext_get_qual(NMWifiUtils *data) static gboolean wifi_wext_get_station(NMWifiUtils *data, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate) + int *out_quality, + guint32 *out_rate) { NMEtherAddr local_addr; @@ -588,9 +588,9 @@ wext_can_scan_ifname(NMWifiUtilsWext *wext, const char *ifname) static gboolean wext_get_range_ifname(NMWifiUtilsWext *wext, - const char * ifname, + const char *ifname, struct iw_range *range, - guint32 * response_len) + guint32 *response_len) { int i = 26; gboolean success = FALSE; @@ -698,7 +698,7 @@ nm_wifi_utils_wext_init(NMWifiUtilsWext *self) static void nm_wifi_utils_wext_class_init(NMWifiUtilsWextClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMWifiUtilsClass *wifi_utils_class = NM_WIFI_UTILS_CLASS(klass); object_class->dispose = dispose; @@ -717,7 +717,7 @@ nm_wifi_utils_wext_class_init(NMWifiUtilsWextClass *klass) NMWifiUtils * nm_wifi_utils_wext_new(int ifindex, gboolean check_scan) { - NMWifiUtilsWext * wext; + NMWifiUtilsWext *wext; struct iw_range range; guint32 response_len = 0; struct iw_range_with_scan_capa *scan_capa_range; diff --git a/src/libnm-platform/wifi/nm-wifi-utils.c b/src/libnm-platform/wifi/nm-wifi-utils.c index 0b5f8d71..8bdd65c2 100644 --- a/src/libnm-platform/wifi/nm-wifi-utils.c +++ b/src/libnm-platform/wifi/nm-wifi-utils.c @@ -132,8 +132,8 @@ nm_wifi_utils_find_freq(NMWifiUtils *data, const guint32 *freqs) gboolean nm_wifi_utils_get_station(NMWifiUtils *data, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate) + int *out_quality, + guint32 *out_rate) { g_return_val_if_fail(data != NULL, FALSE); diff --git a/src/libnm-platform/wifi/nm-wifi-utils.h b/src/libnm-platform/wifi/nm-wifi-utils.h index 157522ee..be33b90c 100644 --- a/src/libnm-platform/wifi/nm-wifi-utils.h +++ b/src/libnm-platform/wifi/nm-wifi-utils.h @@ -51,8 +51,8 @@ guint32 nm_wifi_utils_find_freq(NMWifiUtils *data, const guint32 *freqs); */ gboolean nm_wifi_utils_get_station(NMWifiUtils *data, NMEtherAddr *out_bssid, - int * out_quality, - guint32 * out_rate); + int *out_quality, + guint32 *out_rate); /* Tells the driver DHCP or SLAAC is running */ gboolean nm_wifi_utils_indicate_addressing_running(NMWifiUtils *data, gboolean running); diff --git a/src/libnm-platform/wpan/nm-wpan-utils.c b/src/libnm-platform/wpan/nm-wpan-utils.c index 082cc3e7..d9bbd0f0 100644 --- a/src/libnm-platform/wpan/nm-wpan-utils.c +++ b/src/libnm-platform/wpan/nm-wpan-utils.c @@ -95,7 +95,7 @@ nl802154_alloc_msg(NMWpanUtils *self, guint32 cmd, guint32 flags) } static int -nl802154_send_and_recv(NMWpanUtils * self, +nl802154_send_and_recv(NMWpanUtils *self, struct nl_msg *msg, int (*valid_handler)(struct nl_msg *, void *), void *valid_data) @@ -103,14 +103,14 @@ nl802154_send_and_recv(NMWpanUtils * self, int err; int done = 0; const struct nl_cb cb = { - .err_cb = error_handler, - .err_arg = &done, - .finish_cb = finish_handler, - .finish_arg = &done, - .ack_cb = ack_handler, - .ack_arg = &done, - .valid_cb = valid_handler, - .valid_arg = valid_data, + .err_cb = error_handler, + .err_arg = &done, + .finish_cb = finish_handler, + .finish_arg = &done, + .ack_cb = ack_handler, + .ack_arg = &done, + .valid_cb = valid_handler, + .valid_arg = valid_data, }; g_return_val_if_fail(msg != NULL, -ENOMEM); @@ -149,9 +149,9 @@ nl802154_get_interface_handler(struct nl_msg *msg, void *arg) [NL802154_ATTR_PAN_ID] = {.type = NLA_U16}, [NL802154_ATTR_SHORT_ADDR] = {.type = NLA_U16}, }; - struct nlattr * tb[G_N_ELEMENTS(nl802154_policy)]; + struct nlattr *tb[G_N_ELEMENTS(nl802154_policy)]; struct nl802154_interface *info = arg; - struct genlmsghdr * gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); if (nla_parse_arr(tb, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), nl802154_policy) < 0) return NL_SKIP; diff --git a/src/libnm-std-aux/c-list-util.h b/src/libnm-std-aux/c-list-util.h index 9d86d663..dbfef0f8 100644 --- a/src/libnm-std-aux/c-list-util.h +++ b/src/libnm-std-aux/c-list-util.h @@ -31,7 +31,7 @@ static inline int c_list_length_is(const CList *list, unsigned long check_len) { unsigned long n = 0; - const CList * iter; + const CList *iter; c_list_for_each (iter, list) { ++n; diff --git a/src/libnm-systemd-core/meson.build b/src/libnm-systemd-core/meson.build index fb472a76..1fa94486 100644 --- a/src/libnm-systemd-core/meson.build +++ b/src/libnm-systemd-core/meson.build @@ -18,8 +18,6 @@ libnm_systemd_core = static_library( 'src/libsystemd-network/sd-dhcp-lease.c', 'src/libsystemd-network/sd-dhcp6-client.c', 'src/libsystemd-network/sd-dhcp6-lease.c', - 'src/libsystemd-network/sd-ipv4acd.c', - 'src/libsystemd-network/sd-ipv4ll.c', 'src/libsystemd-network/sd-lldp-rx.c', 'src/libsystemd/sd-event/event-util.c', 'src/libsystemd/sd-event/sd-event.c', diff --git a/src/libnm-systemd-core/nm-sd-utils-dhcp.h b/src/libnm-systemd-core/nm-sd-utils-dhcp.h index 5d126d5b..6487a90d 100644 --- a/src/libnm-systemd-core/nm-sd-utils-dhcp.h +++ b/src/libnm-systemd-core/nm-sd-utils-dhcp.h @@ -11,7 +11,7 @@ typedef struct { uint8_t code; uint8_t data_len; - void * data; + void *data; } nm_sd_dhcp_option; int nm_sd_dhcp_lease_get_private_options(sd_dhcp_lease *lease, nm_sd_dhcp_option **out_options); diff --git a/src/libnm-systemd-core/nm-sd.h b/src/libnm-systemd-core/nm-sd.h index 0ec2f16e..421f5372 100644 --- a/src/libnm-systemd-core/nm-sd.h +++ b/src/libnm-systemd-core/nm-sd.h @@ -8,9 +8,7 @@ #include "src/systemd/sd-dhcp-client.h" #include "src/systemd/sd-dhcp6-client.h" -#include "src/systemd/sd-ipv4ll.h" #include "src/systemd/sd-lldp-rx.h" -#include "src/systemd/sd-lldp.h" /*****************************************************************************/ diff --git a/src/libnm-systemd-core/src/libsystemd-network/arp-util.c b/src/libnm-systemd-core/src/libsystemd-network/arp-util.c index 46c4a8cb..c8a73111 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/arp-util.c +++ b/src/libnm-systemd-core/src/libsystemd-network/arp-util.c @@ -16,7 +16,7 @@ #include "unaligned.h" #include "util.h" -int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *eth_mac) { +int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *mac) { struct sock_filter filter[] = { BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0), /* A <- packet length */ BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ether_arp), 1, 0), /* packet >= arp packet ? */ @@ -38,30 +38,21 @@ int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr * BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 0), /* protocol == reply ? */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ /* Sender Hardware Address must be different from our own */ - BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_be32(ð_mac->ether_addr_octet[0])),/* A <- 4 bytes of client's MAC */ - BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ + BPF_STMT(BPF_LDX + BPF_IMM, unaligned_read_be32(&mac->ether_addr_octet[0])), /* X <- 4 bytes of client's MAC */ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_sha)), /* A <- 4 bytes of SHA */ - BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 6), /* A == 0 ? */ - BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_be16(ð_mac->ether_addr_octet[4])),/* A <- remainder of client's MAC */ - BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 0, 4), /* A == X ? */ + BPF_STMT(BPF_LDX + BPF_IMM, unaligned_read_be16(&mac->ether_addr_octet[4])), /* X <- remainder of client's MAC */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, arp_sha) + 4), /* A <- remainder of SHA */ - BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 1), /* A == 0 ? */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 0, 1), /* A == X ? */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ /* Sender Protocol Address or Target Protocol Address must be equal to the one we care about */ - BPF_STMT(BPF_LD + BPF_IMM, htobe32(a->s_addr)), /* A <- clients IP */ - BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ + BPF_STMT(BPF_LDX + BPF_IMM, htobe32(a->s_addr)), /* X <- clients IP */ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_spa)), /* A <- SPA */ - BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* X xor A */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 1), /* A == 0 ? */ - BPF_STMT(BPF_RET + BPF_K, 65535), /* return all */ - BPF_STMT(BPF_LD + BPF_IMM, htobe32(a->s_addr)), /* A <- clients IP */ - BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 0, 1), /* A == X ? */ + BPF_STMT(BPF_RET + BPF_K, UINT32_MAX), /* accept */ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_tpa)), /* A <- TPA */ - BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* X xor A */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 1), /* A == 0 ? */ - BPF_STMT(BPF_RET + BPF_K, 65535), /* return all */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 0, 1), /* A == 0 ? */ + BPF_STMT(BPF_RET + BPF_K, UINT32_MAX), /* accept */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ }; struct sock_fprog fprog = { @@ -77,7 +68,7 @@ int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr * return 0; } -int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *eth_mac) { +int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *mac) { union sockaddr_union link = { .ll.sll_family = AF_PACKET, .ll.sll_protocol = htobe16(ETH_P_ARP), @@ -89,12 +80,13 @@ int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const stru int r; assert(ifindex > 0); + assert(mac); s = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); if (s < 0) return -errno; - r = arp_update_filter(s, a, eth_mac); + r = arp_update_filter(s, a, mac); if (r < 0) return r; diff --git a/src/libnm-systemd-core/src/libsystemd-network/arp-util.h b/src/libnm-systemd-core/src/libsystemd-network/arp-util.h index e8615a15..b66a81bf 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/arp-util.h +++ b/src/libnm-systemd-core/src/libsystemd-network/arp-util.h @@ -11,8 +11,8 @@ #include "socket-util.h" #include "sparse-endian.h" -int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *eth_mac); -int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *eth_mac); +int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *mac); +int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *mac); int arp_send_packet( int fd, diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp-identifier.c b/src/libnm-systemd-core/src/libsystemd-network/dhcp-identifier.c index bd47ff41..74aa19de 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp-identifier.c +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp-identifier.c @@ -11,7 +11,7 @@ #include "dhcp-identifier.h" #include "dhcp6-protocol.h" -#include "network-util.h" +#include "netif-util.h" #include "siphash24.h" #include "sparse-endian.h" #include "stat-util.h" @@ -200,7 +200,7 @@ int dhcp_identifier_set_iaid( /* device is under renaming */ return -EBUSY; - name = net_get_name_persistent(device); + name = net_get_persistent_name(device); } if (name) @@ -214,7 +214,7 @@ int dhcp_identifier_set_iaid( if (legacy_unstable_byteorder) /* for historical reasons (a bug), the bits were swapped and thus * the result was endianness dependent. Preserve that behavior. */ - id32 = __bswap_32(id32); + id32 = bswap_32(id32); else /* the fixed behavior returns a stable byte order. Since LE is expected * to be more common, swap the bytes on LE to give the same as legacy diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp-internal.h b/src/libnm-systemd-core/src/libsystemd-network/dhcp-internal.h index 6538f05b..466d8e4b 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp-internal.h +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp-internal.h @@ -53,8 +53,8 @@ typedef int (*dhcp_option_callback_t)(uint8_t code, uint8_t len, int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t cb, void *userdata, char **error_message); int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid, - uint8_t type, uint16_t arp_type, size_t optlen, - size_t *optoffset); + uint8_t type, uint16_t arp_type, uint8_t hlen, const uint8_t *chaddr, + size_t optlen, size_t *optoffset); uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len); diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp-lease-internal.h b/src/libnm-systemd-core/src/libsystemd-network/dhcp-lease-internal.h index 35a74dd7..992ac9f3 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp-lease-internal.h +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp-lease-internal.h @@ -70,6 +70,12 @@ struct sd_dhcp_lease { char *timezone; + uint8_t sixrd_ipv4masklen; + uint8_t sixrd_prefixlen; + struct in6_addr sixrd_prefix; + struct in_addr *sixrd_br_addresses; + size_t sixrd_n_br_addresses; + LIST_HEAD(struct sd_dhcp_raw_option, private_options); }; diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp-network.c b/src/libnm-systemd-core/src/libsystemd-network/dhcp-network.c index bbfdeb0f..1c5f3427 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp-network.c +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp-network.c @@ -60,24 +60,20 @@ static int _bind_raw_socket(int ifindex, union sockaddr_union *link, /* We only support MAC address length to be either 0 or 6 (ETH_ALEN). Optionally * compare chaddr for ETH_ALEN bytes. */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETH_ALEN, 0, 12), /* A (the MAC address length) == ETH_ALEN ? */ - BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_be32(ð_mac->ether_addr_octet[0])), /* A <- 4 bytes of client's MAC */ - BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETH_ALEN, 0, 8), /* A (the MAC address length) == ETH_ALEN ? */ + BPF_STMT(BPF_LDX + BPF_IMM, unaligned_read_be32(ð_mac->ether_addr_octet[0])), /* X <- 4 bytes of client's MAC */ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.chaddr)), /* A <- 4 bytes of MAC from dhcp.chaddr */ - BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0), /* A == 0 ? */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 1, 0), /* A == X ? */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ - BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_be16(ð_mac->ether_addr_octet[4])), /* A <- remainder of client's MAC */ - BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ + BPF_STMT(BPF_LDX + BPF_IMM, unaligned_read_be16(ð_mac->ether_addr_octet[4])), /* X <- remainder of client's MAC */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, dhcp.chaddr) + 4), /* A <- remainder of MAC from dhcp.chaddr */ - BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0), /* A == 0 ? */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 1, 0), /* A == X ? */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.magic)), /* A <- DHCP magic cookie */ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, DHCP_MAGIC_COOKIE, 1, 0), /* cookie == DHCP magic cookie ? */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ - BPF_STMT(BPF_RET + BPF_K, 65535), /* return all */ + BPF_STMT(BPF_RET + BPF_K, UINT32_MAX), /* accept */ }; struct sock_fprog fprog = { .len = ELEMENTSOF(filter), @@ -117,10 +113,17 @@ static int _bind_raw_socket(int ifindex, union sockaddr_union *link, return TAKE_FD(s); } -int dhcp_network_bind_raw_socket(int ifindex, union sockaddr_union *link, uint32_t xid, - const uint8_t *mac_addr, size_t mac_addr_len, - const uint8_t *bcast_addr, size_t bcast_addr_len, - uint16_t arp_type, uint16_t port) { +int dhcp_network_bind_raw_socket( + int ifindex, + union sockaddr_union *link, + uint32_t xid, + const uint8_t *mac_addr, + size_t mac_addr_len, + const uint8_t *bcast_addr, + size_t bcast_addr_len, + uint16_t arp_type, + uint16_t port) { + static const uint8_t eth_bcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; /* Default broadcast address for IPoIB */ static const uint8_t ib_bcast[] = { @@ -174,7 +177,6 @@ int dhcp_network_bind_udp_socket(int ifindex, be32_t address, uint16_t port, int r = setsockopt_int(s, IPPROTO_IP, IP_TOS, ip_service_type); else r = setsockopt_int(s, IPPROTO_IP, IP_TOS, IPTOS_CLASS_CS6); - if (r < 0) return r; @@ -206,43 +208,49 @@ int dhcp_network_bind_udp_socket(int ifindex, be32_t address, uint16_t port, int return r; } - r = bind(s, &src.sa, sizeof(src.in)); - if (r < 0) + if (bind(s, &src.sa, sizeof(src.in)) < 0) return -errno; return TAKE_FD(s); } -int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, - const void *packet, size_t len) { - int r; +int dhcp_network_send_raw_socket( + int s, + const union sockaddr_union *link, + const void *packet, + size_t len) { + + /* Do not add assert(s >= 0) here, as this is called in fuzz-dhcp-server, and in that case this + * function should fail with negative errno. */ assert(link); assert(packet); - assert(len); + assert(len > 0); - r = sendto(s, packet, len, 0, &link->sa, SOCKADDR_LL_LEN(link->ll)); - if (r < 0) + if (sendto(s, packet, len, 0, &link->sa, SOCKADDR_LL_LEN(link->ll)) < 0) return -errno; return 0; } -int dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port, - const void *packet, size_t len) { +int dhcp_network_send_udp_socket( + int s, + be32_t address, + uint16_t port, + const void *packet, + size_t len) { + union sockaddr_union dest = { .in.sin_family = AF_INET, .in.sin_port = htobe16(port), .in.sin_addr.s_addr = address, }; - int r; assert(s >= 0); assert(packet); - assert(len); + assert(len > 0); - r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in)); - if (r < 0) + if (sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in)) < 0) return -errno; return 0; diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp-packet.c b/src/libnm-systemd-core/src/libsystemd-network/dhcp-packet.c index eeadd562..25a69a61 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp-packet.c +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp-packet.c @@ -12,21 +12,44 @@ #include "dhcp-internal.h" #include "dhcp-protocol.h" +#include "memory-util.h" #define DHCP_CLIENT_MIN_OPTIONS_SIZE 312 -int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid, - uint8_t type, uint16_t arp_type, size_t optlen, - size_t *optoffset) { +int dhcp_message_init( + DHCPMessage *message, + uint8_t op, + uint32_t xid, + uint8_t type, + uint16_t arp_type, + uint8_t hlen, + const uint8_t *chaddr, + size_t optlen, + size_t *optoffset) { + size_t offset = 0; int r; assert(IN_SET(op, BOOTREQUEST, BOOTREPLY)); - assert(IN_SET(arp_type, ARPHRD_ETHER, ARPHRD_INFINIBAND)); + assert(chaddr || hlen == 0); message->op = op; message->htype = arp_type; - message->hlen = (arp_type == ARPHRD_ETHER) ? ETHER_ADDR_LEN : 0; + + /* RFC2131 section 4.1.1: + The client MUST include its hardware address in the ’chaddr’ field, if + necessary for delivery of DHCP reply messages. + + RFC 4390 section 2.1: + A DHCP client, when working over an IPoIB interface, MUST follow the + following rules: + "htype" (hardware address type) MUST be 32 [ARPPARAM]. + "hlen" (hardware address length) MUST be 0. + "chaddr" (client hardware address) field MUST be zeroed. + */ + message->hlen = (arp_type == ARPHRD_INFINIBAND) ? 0 : hlen; + memcpy_safe(message->chaddr, chaddr, message->hlen); + message->xid = htobe32(xid); message->magic = htobe32(DHCP_MAGIC_COOKIE); diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-internal.h b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-internal.h index 4eb56aa8..f9434098 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-internal.h +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-internal.h @@ -11,6 +11,7 @@ #include "sd-event.h" #include "sd-dhcp6-client.h" +#include "dhcp6-protocol.h" #include "hashmap.h" #include "list.h" #include "macro.h" @@ -93,6 +94,7 @@ typedef struct DHCP6IA { typedef struct sd_dhcp6_client sd_dhcp6_client; +bool dhcp6_option_can_request(uint16_t option); int dhcp6_option_append(uint8_t **buf, size_t *buflen, uint16_t code, size_t optlen, const void *optval); int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, const DHCP6IA *ia); @@ -129,6 +131,12 @@ int dhcp6_network_bind_udp_socket(int ifindex, struct in6_addr *address); int dhcp6_network_send_udp_socket(int s, struct in6_addr *address, const void *packet, size_t len); +int client_parse_message( + sd_dhcp6_client *client, + DHCP6Message *message, + size_t len, + sd_dhcp6_lease *lease); + const char *dhcp6_message_type_to_string(int s) _const_; int dhcp6_message_type_from_string(const char *s) _pure_; const char *dhcp6_message_status_to_string(int s) _const_; diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-lease-internal.h b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-lease-internal.h index 8801497b..8ae2ecd6 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-lease-internal.h +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-lease-internal.h @@ -14,10 +14,14 @@ struct sd_dhcp6_lease { unsigned n_ref; + uint8_t *clientid; + size_t clientid_len; uint8_t *serverid; size_t serverid_len; uint8_t preference; bool rapid_commit; + triple_timestamp timestamp; + struct in6_addr server_address; DHCP6IA ia; DHCP6IA pd; @@ -39,21 +43,19 @@ struct sd_dhcp6_lease { int dhcp6_lease_ia_rebind_expire(const DHCP6IA *ia, uint32_t *expire); DHCP6IA *dhcp6_lease_free_ia(DHCP6IA *ia); -int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, - size_t len); -int dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **id, size_t *len); +int dhcp6_lease_set_clientid(sd_dhcp6_lease *lease, const uint8_t *id, size_t len); +int dhcp6_lease_get_clientid(sd_dhcp6_lease *lease, uint8_t **ret_id, size_t *ret_len); +int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, size_t len); +int dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **ret_id, size_t *ret_len); int dhcp6_lease_set_preference(sd_dhcp6_lease *lease, uint8_t preference); int dhcp6_lease_get_preference(sd_dhcp6_lease *lease, uint8_t *preference); int dhcp6_lease_set_rapid_commit(sd_dhcp6_lease *lease); int dhcp6_lease_get_rapid_commit(sd_dhcp6_lease *lease, bool *rapid_commit); -int dhcp6_lease_get_iaid(sd_dhcp6_lease *lease, be32_t *iaid); -int dhcp6_lease_get_pd_iaid(sd_dhcp6_lease *lease, be32_t *iaid); - int dhcp6_lease_add_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen); int dhcp6_lease_add_domains(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen); int dhcp6_lease_add_ntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen); -int dhcp6_lease_add_sntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) ; +int dhcp6_lease_add_sntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen); int dhcp6_lease_set_fqdn(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen); int dhcp6_lease_new(sd_dhcp6_lease **ret); diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-network.c b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-network.c index b6816de4..beace4c7 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-network.c +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-network.c @@ -49,6 +49,10 @@ int dhcp6_network_bind_udp_socket(int ifindex, struct in6_addr *local_address) { if (r < 0) return r; + r = setsockopt_int(s, SOL_SOCKET, SO_TIMESTAMP, true); + if (r < 0) + return r; + r = bind(s, &src.sa, sizeof(src.in6)); if (r < 0) return -errno; diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-option.c b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-option.c index 4249f90d..237771e6 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-option.c +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-option.c @@ -26,6 +26,193 @@ #define DHCP6_OPTION_IA_PD_LEN (sizeof(struct ia_pd)) #define DHCP6_OPTION_IA_TA_LEN (sizeof(struct ia_ta)) +bool dhcp6_option_can_request(uint16_t option) { + /* See Client ORO field in + * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2 */ + + switch (option) { + case SD_DHCP6_OPTION_CLIENTID: + case SD_DHCP6_OPTION_SERVERID: + case SD_DHCP6_OPTION_IA_NA: + case SD_DHCP6_OPTION_IA_TA: + case SD_DHCP6_OPTION_IAADDR: + case SD_DHCP6_OPTION_ORO: + case SD_DHCP6_OPTION_PREFERENCE: + case SD_DHCP6_OPTION_ELAPSED_TIME: + case SD_DHCP6_OPTION_RELAY_MSG: + case SD_DHCP6_OPTION_AUTH: + case SD_DHCP6_OPTION_UNICAST: + case SD_DHCP6_OPTION_STATUS_CODE: + case SD_DHCP6_OPTION_RAPID_COMMIT: + case SD_DHCP6_OPTION_USER_CLASS: + case SD_DHCP6_OPTION_VENDOR_CLASS: + return false; + case SD_DHCP6_OPTION_VENDOR_OPTS: + return true; + case SD_DHCP6_OPTION_INTERFACE_ID: + case SD_DHCP6_OPTION_RECONF_MSG: + case SD_DHCP6_OPTION_RECONF_ACCEPT: + return false; + case SD_DHCP6_OPTION_SIP_SERVER_DOMAIN_NAME: + case SD_DHCP6_OPTION_SIP_SERVER_ADDRESS: + case SD_DHCP6_OPTION_DNS_SERVERS: + case SD_DHCP6_OPTION_DOMAIN_LIST: + return true; + case SD_DHCP6_OPTION_IA_PD: + case SD_DHCP6_OPTION_IA_PD_PREFIX: + return false; + case SD_DHCP6_OPTION_NIS_SERVERS: + case SD_DHCP6_OPTION_NISP_SERVERS: + case SD_DHCP6_OPTION_NIS_DOMAIN_NAME: + case SD_DHCP6_OPTION_NISP_DOMAIN_NAME: + case SD_DHCP6_OPTION_SNTP_SERVERS: + case SD_DHCP6_OPTION_INFORMATION_REFRESH_TIME: + case SD_DHCP6_OPTION_BCMCS_SERVER_D: + case SD_DHCP6_OPTION_BCMCS_SERVER_A: + case SD_DHCP6_OPTION_GEOCONF_CIVIC: + return true; + case SD_DHCP6_OPTION_REMOTE_ID: + case SD_DHCP6_OPTION_SUBSCRIBER_ID: + return false; + case SD_DHCP6_OPTION_CLIENT_FQDN: + case SD_DHCP6_OPTION_PANA_AGENT: + case SD_DHCP6_OPTION_NEW_POSIX_TIMEZONE: + case SD_DHCP6_OPTION_NEW_TZDB_TIMEZONE: + return true; + case SD_DHCP6_OPTION_ERO: + case SD_DHCP6_OPTION_LQ_QUERY: + case SD_DHCP6_OPTION_CLIENT_DATA: + case SD_DHCP6_OPTION_CLT_TIME: + case SD_DHCP6_OPTION_LQ_RELAY_DATA: + case SD_DHCP6_OPTION_LQ_CLIENT_LINK: + return false; + case SD_DHCP6_OPTION_MIP6_HNIDF: + case SD_DHCP6_OPTION_MIP6_VDINF: + case SD_DHCP6_OPTION_V6_LOST: + case SD_DHCP6_OPTION_CAPWAP_AC_V6: + return true; + case SD_DHCP6_OPTION_RELAY_ID: + return false; + case SD_DHCP6_OPTION_IPV6_ADDRESS_MOS: + case SD_DHCP6_OPTION_IPV6_FQDN_MOS: + case SD_DHCP6_OPTION_NTP_SERVER: + case SD_DHCP6_OPTION_V6_ACCESS_DOMAIN: + case SD_DHCP6_OPTION_SIP_UA_CS_LIST: + case SD_DHCP6_OPTION_BOOTFILE_URL: + case SD_DHCP6_OPTION_BOOTFILE_PARAM: + return true; + case SD_DHCP6_OPTION_CLIENT_ARCH_TYPE: + return false; + case SD_DHCP6_OPTION_NII: + case SD_DHCP6_OPTION_GEOLOCATION: + case SD_DHCP6_OPTION_AFTR_NAME: + case SD_DHCP6_OPTION_ERP_LOCAL_DOMAIN_NAME: + return true; + case SD_DHCP6_OPTION_RSOO: + return false; + case SD_DHCP6_OPTION_PD_EXCLUDE: + return true; + case SD_DHCP6_OPTION_VSS: + return false; + case SD_DHCP6_OPTION_MIP6_IDINF: + case SD_DHCP6_OPTION_MIP6_UDINF: + case SD_DHCP6_OPTION_MIP6_HNP: + case SD_DHCP6_OPTION_MIP6_HAA: + case SD_DHCP6_OPTION_MIP6_HAF: + case SD_DHCP6_OPTION_RDNSS_SELECTION: + case SD_DHCP6_OPTION_KRB_PRINCIPAL_NAME: + case SD_DHCP6_OPTION_KRB_REALM_NAME: + case SD_DHCP6_OPTION_KRB_DEFAULT_REALM_NAME: + case SD_DHCP6_OPTION_KRB_KDC: + return true; + case SD_DHCP6_OPTION_CLIENT_LINKLAYER_ADDR: + case SD_DHCP6_OPTION_LINK_ADDRESS: + case SD_DHCP6_OPTION_RADIUS: + return false; + case SD_DHCP6_OPTION_SOL_MAX_RT: + case SD_DHCP6_OPTION_INF_MAX_RT: + case SD_DHCP6_OPTION_ADDRSEL: + case SD_DHCP6_OPTION_ADDRSEL_TABLE: + case SD_DHCP6_OPTION_V6_PCP_SERVER: + return true; + case SD_DHCP6_OPTION_DHCPV4_MSG: + return false; + case SD_DHCP6_OPTION_DHCP4_O_DHCP6_SERVER: + return true; + case SD_DHCP6_OPTION_S46_RULE: + return false; + case SD_DHCP6_OPTION_S46_BR: + return true; + case SD_DHCP6_OPTION_S46_DMR: + case SD_DHCP6_OPTION_S46_V4V6BIND: + case SD_DHCP6_OPTION_S46_PORTPARAMS: + return false; + case SD_DHCP6_OPTION_S46_CONT_MAPE: + case SD_DHCP6_OPTION_S46_CONT_MAPT: + case SD_DHCP6_OPTION_S46_CONT_LW: + case SD_DHCP6_OPTION_4RD: + case SD_DHCP6_OPTION_4RD_MAP_RULE: + case SD_DHCP6_OPTION_4RD_NON_MAP_RULE: + return true; + case SD_DHCP6_OPTION_LQ_BASE_TIME: + case SD_DHCP6_OPTION_LQ_START_TIME: + case SD_DHCP6_OPTION_LQ_END_TIME: + return false; + case SD_DHCP6_OPTION_CAPTIVE_PORTAL: + case SD_DHCP6_OPTION_MPL_PARAMETERS: + return true; + case SD_DHCP6_OPTION_ANI_ATT: + case SD_DHCP6_OPTION_ANI_NETWORK_NAME: + case SD_DHCP6_OPTION_ANI_AP_NAME: + case SD_DHCP6_OPTION_ANI_AP_BSSID: + case SD_DHCP6_OPTION_ANI_OPERATOR_ID: + case SD_DHCP6_OPTION_ANI_OPERATOR_REALM: + return false; + case SD_DHCP6_OPTION_S46_PRIORITY: + return true; + case SD_DHCP6_OPTION_MUD_URL_V6: + return false; + case SD_DHCP6_OPTION_V6_PREFIX64: + return true; + case SD_DHCP6_OPTION_F_BINDING_STATUS: + case SD_DHCP6_OPTION_F_CONNECT_FLAGS: + case SD_DHCP6_OPTION_F_DNS_REMOVAL_INFO: + case SD_DHCP6_OPTION_F_DNS_HOST_NAME: + case SD_DHCP6_OPTION_F_DNS_ZONE_NAME: + case SD_DHCP6_OPTION_F_DNS_FLAGS: + case SD_DHCP6_OPTION_F_EXPIRATION_TIME: + case SD_DHCP6_OPTION_F_MAX_UNACKED_BNDUPD: + case SD_DHCP6_OPTION_F_MCLT: + case SD_DHCP6_OPTION_F_PARTNER_LIFETIME: + case SD_DHCP6_OPTION_F_PARTNER_LIFETIME_SENT: + case SD_DHCP6_OPTION_F_PARTNER_DOWN_TIME: + case SD_DHCP6_OPTION_F_PARTNER_RAW_CLT_TIME: + case SD_DHCP6_OPTION_F_PROTOCOL_VERSION: + case SD_DHCP6_OPTION_F_KEEPALIVE_TIME: + case SD_DHCP6_OPTION_F_RECONFIGURE_DATA: + case SD_DHCP6_OPTION_F_RELATIONSHIP_NAME: + case SD_DHCP6_OPTION_F_SERVER_FLAGS: + case SD_DHCP6_OPTION_F_SERVER_STATE: + case SD_DHCP6_OPTION_F_START_TIME_OF_STATE: + case SD_DHCP6_OPTION_F_STATE_EXPIRATION_TIME: + case SD_DHCP6_OPTION_RELAY_PORT: + return false; + case SD_DHCP6_OPTION_V6_SZTP_REDIRECT: + case SD_DHCP6_OPTION_S46_BIND_IPV6_PREFIX: + return true; + case SD_DHCP6_OPTION_IA_LL: + case SD_DHCP6_OPTION_LLADDR: + case SD_DHCP6_OPTION_SLAP_QUAD: + return false; + case SD_DHCP6_OPTION_V6_DOTS_RI: + case SD_DHCP6_OPTION_V6_DOTS_ADDRESS: + case SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF: + return true; + default: + return false; + } +} + static int option_append_hdr(uint8_t **buf, size_t *buflen, uint16_t optcode, size_t optlen) { DHCP6Option *option; @@ -275,7 +462,7 @@ int dhcp6_option_append_fqdn(uint8_t **buf, size_t *buflen, const char *fqdn) { if (dns_name_is_single_label(fqdn)) r--; - r = dhcp6_option_append(buf, buflen, SD_DHCP6_OPTION_FQDN, 1 + r, buffer); + r = dhcp6_option_append(buf, buflen, SD_DHCP6_OPTION_CLIENT_FQDN, 1 + r, buffer); return r; } diff --git a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-protocol.h b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-protocol.h index c7003638..5d2af439 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/dhcp6-protocol.h +++ b/src/libnm-systemd-core/src/libsystemd-network/dhcp6-protocol.h @@ -5,6 +5,7 @@ Copyright © 2014 Intel Corporation. All rights reserved. ***/ +#include #include #include @@ -36,57 +37,83 @@ enum { DHCP6_PORT_CLIENT = 546, }; -#define DHCP6_INF_TIMEOUT 1 * USEC_PER_SEC -#define DHCP6_INF_MAX_RT 120 * USEC_PER_SEC -#define DHCP6_SOL_MAX_DELAY 1 * USEC_PER_SEC -#define DHCP6_SOL_TIMEOUT 1 * USEC_PER_SEC -#define DHCP6_SOL_MAX_RT 120 * USEC_PER_SEC -#define DHCP6_REQ_TIMEOUT 1 * USEC_PER_SEC -#define DHCP6_REQ_MAX_RT 120 * USEC_PER_SEC +#define DHCP6_INF_TIMEOUT (1 * USEC_PER_SEC) +#define DHCP6_INF_MAX_RT (120 * USEC_PER_SEC) +#define DHCP6_SOL_MAX_DELAY (1 * USEC_PER_SEC) +#define DHCP6_SOL_TIMEOUT (1 * USEC_PER_SEC) +#define DHCP6_SOL_MAX_RT (120 * USEC_PER_SEC) +#define DHCP6_REQ_TIMEOUT (1 * USEC_PER_SEC) +#define DHCP6_REQ_MAX_RT (120 * USEC_PER_SEC) #define DHCP6_REQ_MAX_RC 10 -#define DHCP6_REN_TIMEOUT 10 * USEC_PER_SEC -#define DHCP6_REN_MAX_RT 600 * USEC_PER_SEC -#define DHCP6_REB_TIMEOUT 10 * USEC_PER_SEC -#define DHCP6_REB_MAX_RT 600 * USEC_PER_SEC +#define DHCP6_REN_TIMEOUT (10 * USEC_PER_SEC) +#define DHCP6_REN_MAX_RT (600 * USEC_PER_SEC) +#define DHCP6_REB_TIMEOUT (10 * USEC_PER_SEC) +#define DHCP6_REB_MAX_RT (600 * USEC_PER_SEC) -enum DHCP6State { - DHCP6_STATE_STOPPED = 0, - DHCP6_STATE_INFORMATION_REQUEST = 1, - DHCP6_STATE_SOLICITATION = 2, - DHCP6_STATE_REQUEST = 3, - DHCP6_STATE_BOUND = 4, - DHCP6_STATE_RENEW = 5, - DHCP6_STATE_REBIND = 6, -}; +typedef enum DHCP6State { + DHCP6_STATE_STOPPED, + DHCP6_STATE_INFORMATION_REQUEST, + DHCP6_STATE_SOLICITATION, + DHCP6_STATE_REQUEST, + DHCP6_STATE_BOUND, + DHCP6_STATE_RENEW, + DHCP6_STATE_REBIND, + _DHCP6_STATE_MAX, + _DHCP6_STATE_INVALID = -EINVAL, +} DHCP6State; -enum { - DHCP6_SOLICIT = 1, - DHCP6_ADVERTISE = 2, - DHCP6_REQUEST = 3, - DHCP6_CONFIRM = 4, - DHCP6_RENEW = 5, - DHCP6_REBIND = 6, - DHCP6_REPLY = 7, - DHCP6_RELEASE = 8, - DHCP6_DECLINE = 9, - DHCP6_RECONFIGURE = 10, - DHCP6_INFORMATION_REQUEST = 11, - DHCP6_RELAY_FORW = 12, - DHCP6_RELAY_REPL = 13, - _DHCP6_MESSAGE_MAX = 14, -}; +/* https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-1 */ +typedef enum DHCP6MessageType { + DHCP6_MESSAGE_SOLICIT = 1, /* RFC 8415 */ + DHCP6_MESSAGE_ADVERTISE = 2, /* RFC 8415 */ + DHCP6_MESSAGE_REQUEST = 3, /* RFC 8415 */ + DHCP6_MESSAGE_CONFIRM = 4, /* RFC 8415 */ + DHCP6_MESSAGE_RENEW = 5, /* RFC 8415 */ + DHCP6_MESSAGE_REBIND = 6, /* RFC 8415 */ + DHCP6_MESSAGE_REPLY = 7, /* RFC 8415 */ + DHCP6_MESSAGE_RELEASE = 8, /* RFC 8415 */ + DHCP6_MESSAGE_DECLINE = 9, /* RFC 8415 */ + DHCP6_MESSAGE_RECONFIGURE = 10, /* RFC 8415 */ + DHCP6_MESSAGE_INFORMATION_REQUEST = 11, /* RFC 8415 */ + DHCP6_MESSAGE_RELAY_FORWARD = 12, /* RFC 8415 */ + DHCP6_MESSAGE_RELAY_REPLY = 13, /* RFC 8415 */ + DHCP6_MESSAGE_LEASE_QUERY = 14, /* RFC 5007 */ + DHCP6_MESSAGE_LEASE_QUERY_REPLY = 15, /* RFC 5007 */ + DHCP6_MESSAGE_LEASE_QUERY_DONE = 16, /* RFC 5460 */ + DHCP6_MESSAGE_LEASE_QUERY_DATA = 17, /* RFC 5460 */ + DHCP6_MESSAGE_RECONFIGURE_REQUEST = 18, /* RFC 6977 */ + DHCP6_MESSAGE_RECONFIGURE_REPLY = 19, /* RFC 6977 */ + DHCP6_MESSAGE_DHCPV4_QUERY = 20, /* RFC 7341 */ + DHCP6_MESSAGE_DHCPV4_RESPONSE = 21, /* RFC 7341 */ + DHCP6_MESSAGE_ACTIVE_LEASE_QUERY = 22, /* RFC 7653 */ + DHCP6_MESSAGE_START_TLS = 23, /* RFC 7653 */ + DHCP6_MESSAGE_BINDING_UPDATE = 24, /* RFC 8156 */ + DHCP6_MESSAGE_BINDING_REPLY = 25, /* RFC 8156 */ + DHCP6_MESSAGE_POOL_REQUEST = 26, /* RFC 8156 */ + DHCP6_MESSAGE_POOL_RESPONSE = 27, /* RFC 8156 */ + DHCP6_MESSAGE_UPDATE_REQUEST = 28, /* RFC 8156 */ + DHCP6_MESSAGE_UPDATE_REQUEST_ALL = 29, /* RFC 8156 */ + DHCP6_MESSAGE_UPDATE_DONE = 30, /* RFC 8156 */ + DHCP6_MESSAGE_CONNECT = 31, /* RFC 8156 */ + DHCP6_MESSAGE_CONNECT_REPLY = 32, /* RFC 8156 */ + DHCP6_MESSAGE_DISCONNECT = 33, /* RFC 8156 */ + DHCP6_MESSAGE_STATE = 34, /* RFC 8156 */ + DHCP6_MESSAGE_CONTACT = 35, /* RFC 8156 */ + _DHCP6_MESSAGE_TYPE_MAX, + _DHCP6_MESSAGE_TYPE_INVALID = -EINVAL, +} DHCP6MessageType; -enum { +typedef enum DHCP6NTPSubOption { DHCP6_NTP_SUBOPTION_SRV_ADDR = 1, DHCP6_NTP_SUBOPTION_MC_ADDR = 2, DHCP6_NTP_SUBOPTION_SRV_FQDN = 3, -}; +} DHCP6NTPSubOption; /* * RFC 8415, RFC 5007 and RFC 7653 status codes: * https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5 */ -enum { +typedef enum DHCP6Status { DHCP6_STATUS_SUCCESS = 0, DHCP6_STATUS_UNSPEC_FAIL = 1, DHCP6_STATUS_NO_ADDRS_AVAIL = 2, @@ -110,11 +137,12 @@ enum { DHCP6_STATUS_SERVER_SHUTTING_DOWN = 20, DHCP6_STATUS_DNS_UPDATE_NOT_SUPPORTED = 21, DHCP6_STATUS_EXCESSIVE_TIME_SKEW = 22, - _DHCP6_STATUS_MAX = 23, -}; + _DHCP6_STATUS_MAX, + _DHCP6_STATUS_INVALID = -EINVAL, +} DHCP6Status; -enum { - DHCP6_FQDN_FLAG_S = (1 << 0), - DHCP6_FQDN_FLAG_O = (1 << 1), - DHCP6_FQDN_FLAG_N = (1 << 2), -}; +typedef enum DHCP6FQDNFlag { + DHCP6_FQDN_FLAG_S = 1 << 0, + DHCP6_FQDN_FLAG_O = 1 << 1, + DHCP6_FQDN_FLAG_N = 1 << 2, +} DHCP6FQDNFlag; diff --git a/src/libnm-systemd-core/src/libsystemd-network/lldp-neighbor.c b/src/libnm-systemd-core/src/libsystemd-network/lldp-neighbor.c index 3d6d7e42..b4d7c327 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/lldp-neighbor.c +++ b/src/libnm-systemd-core/src/libsystemd-network/lldp-neighbor.c @@ -47,7 +47,7 @@ int lldp_neighbor_prioq_compare_func(const void *a, const void *b) { return CMP(x->until, y->until); } -_public_ sd_lldp_neighbor *sd_lldp_neighbor_ref(sd_lldp_neighbor *n) { +sd_lldp_neighbor *sd_lldp_neighbor_ref(sd_lldp_neighbor *n) { if (!n) return NULL; @@ -72,7 +72,7 @@ static sd_lldp_neighbor *lldp_neighbor_free(sd_lldp_neighbor *n) { return mfree(n); } -_public_ sd_lldp_neighbor *sd_lldp_neighbor_unref(sd_lldp_neighbor *n) { +sd_lldp_neighbor *sd_lldp_neighbor_unref(sd_lldp_neighbor *n) { /* Drops one reference from the neighbor. Note that the object is not freed unless it is already unlinked from * the sd_lldp object. */ @@ -360,7 +360,7 @@ bool lldp_neighbor_equal(const sd_lldp_neighbor *a, const sd_lldp_neighbor *b) { return memcmp(LLDP_NEIGHBOR_RAW(a), LLDP_NEIGHBOR_RAW(b), a->raw_size) == 0; } -_public_ int sd_lldp_neighbor_get_source_address(sd_lldp_neighbor *n, struct ether_addr* address) { +int sd_lldp_neighbor_get_source_address(sd_lldp_neighbor *n, struct ether_addr* address) { assert_return(n, -EINVAL); assert_return(address, -EINVAL); @@ -368,7 +368,7 @@ _public_ int sd_lldp_neighbor_get_source_address(sd_lldp_neighbor *n, struct eth return 0; } -_public_ int sd_lldp_neighbor_get_destination_address(sd_lldp_neighbor *n, struct ether_addr* address) { +int sd_lldp_neighbor_get_destination_address(sd_lldp_neighbor *n, struct ether_addr* address) { assert_return(n, -EINVAL); assert_return(address, -EINVAL); @@ -376,7 +376,7 @@ _public_ int sd_lldp_neighbor_get_destination_address(sd_lldp_neighbor *n, struc return 0; } -_public_ int sd_lldp_neighbor_get_raw(sd_lldp_neighbor *n, const void **ret, size_t *size) { +int sd_lldp_neighbor_get_raw(sd_lldp_neighbor *n, const void **ret, size_t *size) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); assert_return(size, -EINVAL); @@ -387,7 +387,7 @@ _public_ int sd_lldp_neighbor_get_raw(sd_lldp_neighbor *n, const void **ret, siz return 0; } -_public_ int sd_lldp_neighbor_get_chassis_id(sd_lldp_neighbor *n, uint8_t *type, const void **ret, size_t *size) { +int sd_lldp_neighbor_get_chassis_id(sd_lldp_neighbor *n, uint8_t *type, const void **ret, size_t *size) { assert_return(n, -EINVAL); assert_return(type, -EINVAL); assert_return(ret, -EINVAL); @@ -440,7 +440,7 @@ static int format_network_address(const void *data, size_t sz, char **ret) { return 1; } -_public_ int sd_lldp_neighbor_get_chassis_id_as_string(sd_lldp_neighbor *n, const char **ret) { +int sd_lldp_neighbor_get_chassis_id_as_string(sd_lldp_neighbor *n, const char **ret) { char *k; int r; @@ -496,7 +496,7 @@ done: return 0; } -_public_ int sd_lldp_neighbor_get_port_id(sd_lldp_neighbor *n, uint8_t *type, const void **ret, size_t *size) { +int sd_lldp_neighbor_get_port_id(sd_lldp_neighbor *n, uint8_t *type, const void **ret, size_t *size) { assert_return(n, -EINVAL); assert_return(type, -EINVAL); assert_return(ret, -EINVAL); @@ -511,7 +511,7 @@ _public_ int sd_lldp_neighbor_get_port_id(sd_lldp_neighbor *n, uint8_t *type, co return 0; } -_public_ int sd_lldp_neighbor_get_port_id_as_string(sd_lldp_neighbor *n, const char **ret) { +int sd_lldp_neighbor_get_port_id_as_string(sd_lldp_neighbor *n, const char **ret) { char *k; int r; @@ -566,7 +566,7 @@ done: return 0; } -_public_ int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret_sec) { +int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret_sec) { assert_return(n, -EINVAL); assert_return(ret_sec, -EINVAL); @@ -574,7 +574,7 @@ _public_ int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret_sec) { return 0; } -_public_ int sd_lldp_neighbor_get_system_name(sd_lldp_neighbor *n, const char **ret) { +int sd_lldp_neighbor_get_system_name(sd_lldp_neighbor *n, const char **ret) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); @@ -585,7 +585,7 @@ _public_ int sd_lldp_neighbor_get_system_name(sd_lldp_neighbor *n, const char ** return 0; } -_public_ int sd_lldp_neighbor_get_system_description(sd_lldp_neighbor *n, const char **ret) { +int sd_lldp_neighbor_get_system_description(sd_lldp_neighbor *n, const char **ret) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); @@ -596,7 +596,7 @@ _public_ int sd_lldp_neighbor_get_system_description(sd_lldp_neighbor *n, const return 0; } -_public_ int sd_lldp_neighbor_get_port_description(sd_lldp_neighbor *n, const char **ret) { +int sd_lldp_neighbor_get_port_description(sd_lldp_neighbor *n, const char **ret) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); @@ -607,7 +607,7 @@ _public_ int sd_lldp_neighbor_get_port_description(sd_lldp_neighbor *n, const ch return 0; } -_public_ int sd_lldp_neighbor_get_mud_url(sd_lldp_neighbor *n, const char **ret) { +int sd_lldp_neighbor_get_mud_url(sd_lldp_neighbor *n, const char **ret) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); @@ -618,7 +618,7 @@ _public_ int sd_lldp_neighbor_get_mud_url(sd_lldp_neighbor *n, const char **ret) return 0; } -_public_ int sd_lldp_neighbor_get_system_capabilities(sd_lldp_neighbor *n, uint16_t *ret) { +int sd_lldp_neighbor_get_system_capabilities(sd_lldp_neighbor *n, uint16_t *ret) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); @@ -629,7 +629,7 @@ _public_ int sd_lldp_neighbor_get_system_capabilities(sd_lldp_neighbor *n, uint1 return 0; } -_public_ int sd_lldp_neighbor_get_enabled_capabilities(sd_lldp_neighbor *n, uint16_t *ret) { +int sd_lldp_neighbor_get_enabled_capabilities(sd_lldp_neighbor *n, uint16_t *ret) { assert_return(n, -EINVAL); assert_return(ret, -EINVAL); @@ -640,7 +640,7 @@ _public_ int sd_lldp_neighbor_get_enabled_capabilities(sd_lldp_neighbor *n, uint return 0; } -_public_ int sd_lldp_neighbor_from_raw(sd_lldp_neighbor **ret, const void *raw, size_t raw_size) { +int sd_lldp_neighbor_from_raw(sd_lldp_neighbor **ret, const void *raw, size_t raw_size) { _cleanup_(sd_lldp_neighbor_unrefp) sd_lldp_neighbor *n = NULL; int r; @@ -661,7 +661,7 @@ _public_ int sd_lldp_neighbor_from_raw(sd_lldp_neighbor **ret, const void *raw, return r; } -_public_ int sd_lldp_neighbor_tlv_rewind(sd_lldp_neighbor *n) { +int sd_lldp_neighbor_tlv_rewind(sd_lldp_neighbor *n) { assert_return(n, -EINVAL); assert(n->raw_size >= sizeof(struct ether_header)); @@ -670,7 +670,7 @@ _public_ int sd_lldp_neighbor_tlv_rewind(sd_lldp_neighbor *n) { return n->rindex < n->raw_size; } -_public_ int sd_lldp_neighbor_tlv_next(sd_lldp_neighbor *n) { +int sd_lldp_neighbor_tlv_next(sd_lldp_neighbor *n) { size_t length; assert_return(n, -EINVAL); @@ -689,7 +689,7 @@ _public_ int sd_lldp_neighbor_tlv_next(sd_lldp_neighbor *n) { return n->rindex < n->raw_size; } -_public_ int sd_lldp_neighbor_tlv_get_type(sd_lldp_neighbor *n, uint8_t *type) { +int sd_lldp_neighbor_tlv_get_type(sd_lldp_neighbor *n, uint8_t *type) { assert_return(n, -EINVAL); assert_return(type, -EINVAL); @@ -703,7 +703,7 @@ _public_ int sd_lldp_neighbor_tlv_get_type(sd_lldp_neighbor *n, uint8_t *type) { return 0; } -_public_ int sd_lldp_neighbor_tlv_is_type(sd_lldp_neighbor *n, uint8_t type) { +int sd_lldp_neighbor_tlv_is_type(sd_lldp_neighbor *n, uint8_t type) { uint8_t k; int r; @@ -716,7 +716,7 @@ _public_ int sd_lldp_neighbor_tlv_is_type(sd_lldp_neighbor *n, uint8_t type) { return type == k; } -_public_ int sd_lldp_neighbor_tlv_get_oui(sd_lldp_neighbor *n, uint8_t oui[_SD_ARRAY_STATIC 3], uint8_t *subtype) { +int sd_lldp_neighbor_tlv_get_oui(sd_lldp_neighbor *n, uint8_t oui[_SD_ARRAY_STATIC 3], uint8_t *subtype) { const uint8_t *d; size_t length; int r; @@ -745,7 +745,7 @@ _public_ int sd_lldp_neighbor_tlv_get_oui(sd_lldp_neighbor *n, uint8_t oui[_SD_A return 0; } -_public_ int sd_lldp_neighbor_tlv_is_oui(sd_lldp_neighbor *n, const uint8_t oui[_SD_ARRAY_STATIC 3], uint8_t subtype) { +int sd_lldp_neighbor_tlv_is_oui(sd_lldp_neighbor *n, const uint8_t oui[_SD_ARRAY_STATIC 3], uint8_t subtype) { uint8_t k[3], st; int r; @@ -758,7 +758,7 @@ _public_ int sd_lldp_neighbor_tlv_is_oui(sd_lldp_neighbor *n, const uint8_t oui[ return memcmp(k, oui, 3) == 0 && st == subtype; } -_public_ int sd_lldp_neighbor_tlv_get_raw(sd_lldp_neighbor *n, const void **ret, size_t *size) { +int sd_lldp_neighbor_tlv_get_raw(sd_lldp_neighbor *n, const void **ret, size_t *size) { size_t length; assert_return(n, -EINVAL); @@ -780,7 +780,7 @@ _public_ int sd_lldp_neighbor_tlv_get_raw(sd_lldp_neighbor *n, const void **ret, return 0; } -_public_ int sd_lldp_neighbor_get_timestamp(sd_lldp_neighbor *n, clockid_t clock, uint64_t *ret) { +int sd_lldp_neighbor_get_timestamp(sd_lldp_neighbor *n, clockid_t clock, uint64_t *ret) { assert_return(n, -EINVAL); assert_return(TRIPLE_TIMESTAMP_HAS_CLOCK(clock), -EOPNOTSUPP); assert_return(clock_supported(clock), -EOPNOTSUPP); diff --git a/src/libnm-systemd-core/src/libsystemd-network/lldp-network.c b/src/libnm-systemd-core/src/libsystemd-network/lldp-network.c index 34a4f3f0..00eb9703 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/lldp-network.c +++ b/src/libnm-systemd-core/src/libsystemd-network/lldp-network.c @@ -11,7 +11,6 @@ #include "socket-util.h" int lldp_network_bind_raw_socket(int ifindex) { - static const struct sock_filter filter[] = { BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ethhdr, h_dest)), /* A <- 4 bytes of destination MAC */ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x0180c200, 1, 0), /* A != 01:80:c2:00 */ @@ -26,26 +25,21 @@ int lldp_network_bind_raw_socket(int ifindex) { BPF_STMT(BPF_RET + BPF_K, 0), /* drop packet */ BPF_STMT(BPF_RET + BPF_K, UINT32_MAX), /* accept packet */ }; - static const struct sock_fprog fprog = { .len = ELEMENTSOF(filter), .filter = (struct sock_filter*) filter, }; - struct packet_mreq mreq = { .mr_ifindex = ifindex, .mr_type = PACKET_MR_MULTICAST, .mr_alen = ETH_ALEN, .mr_address = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x00 } }; - union sockaddr_union saddrll = { .ll.sll_family = AF_PACKET, .ll.sll_ifindex = ifindex, }; - _cleanup_close_ int fd = -1; - int r; assert(ifindex > 0); @@ -54,29 +48,24 @@ int lldp_network_bind_raw_socket(int ifindex) { if (fd < 0) return -errno; - r = setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &fprog, sizeof(fprog)); - if (r < 0) + if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &fprog, sizeof(fprog)) < 0) return -errno; /* customer bridge */ - r = setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); - if (r < 0) + if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0) return -errno; /* non TPMR bridge */ mreq.mr_address[ETH_ALEN - 1] = 0x03; - r = setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); - if (r < 0) + if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0) return -errno; /* nearest bridge */ mreq.mr_address[ETH_ALEN - 1] = 0x0E; - r = setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); - if (r < 0) + if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0) return -errno; - r = bind(fd, &saddrll.sa, sizeof(saddrll.ll)); - if (r < 0) + if (bind(fd, &saddrll.sa, sizeof(saddrll.ll)) < 0) return -errno; return TAKE_FD(fd); diff --git a/src/libnm-systemd-core/src/libsystemd-network/network-common.h b/src/libnm-systemd-core/src/libsystemd-network/network-common.h index d43b76d4..2b0e3b56 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/network-common.h +++ b/src/libnm-systemd-core/src/libsystemd-network/network-common.h @@ -8,8 +8,10 @@ int _e = (error); \ if (DEBUG_LOGGING) { \ const char *_n = NULL; \ + type *_v = (val); \ \ - (void) type##_get_ifname(val, &_n); \ + if (_v) \ + (void) type##_get_ifname(_v, &_n); \ log_interface_full_errno_zerook( \ _n, LOG_DEBUG, _e, prefix fmt, \ ##__VA_ARGS__); \ diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-client.c index cb984b6e..1600f806 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-client.c @@ -837,7 +837,8 @@ static int client_message_init( return -ENOMEM; r = dhcp_message_init(&packet->dhcp, BOOTREQUEST, client->xid, type, - client->arp_type, optlen, &optoffset); + client->arp_type, client->mac_addr_len, client->mac_addr, + optlen, &optoffset); if (r < 0) return r; @@ -853,7 +854,7 @@ static int client_message_init( secs = ((time_now - client->start_time) / USEC_PER_SEC) ? : 1; packet->dhcp.secs = htobe16(secs); - /* RFC2132 section 4.1 + /* RFC2131 section 4.1 A client that cannot receive unicast IP datagrams until its protocol software has been configured with an IP address SHOULD set the BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or @@ -867,15 +868,6 @@ static int client_message_init( if (client->request_broadcast || client->arp_type != ARPHRD_ETHER) packet->dhcp.flags = htobe16(0x8000); - /* RFC2132 section 4.1.1: - The client MUST include its hardware address in the ’chaddr’ field, if - necessary for delivery of DHCP reply messages. Non-Ethernet - interfaces will leave 'chaddr' empty and use the client identifier - instead (eg, RFC 4390 section 2.1). - */ - if (client->arp_type == ARPHRD_ETHER) - memcpy(&packet->dhcp.chaddr, &client->mac_addr, ETH_ALEN); - /* If no client identifier exists, construct an RFC 4361-compliant one */ if (client->client_id_len == 0) { size_t duid_len; @@ -1935,13 +1927,13 @@ static int client_receive_message_udp( assert(client); buflen = next_datagram_size_fd(fd); - if (buflen == -ENETDOWN) - /* the link is down. Don't return an error or the I/O event - source will be disconnected and we won't be able to receive - packets again when the link comes back. */ + if (buflen < 0) { + if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) + return 0; + + log_dhcp_client_errno(client, buflen, "Failed to determine datagram size to read, ignoring: %m"); return 0; - if (buflen < 0) - return buflen; + } message = malloc0(buflen); if (!message) @@ -1949,12 +1941,11 @@ static int client_receive_message_udp( len = recv(fd, message, buflen, 0); if (len < 0) { - /* see comment above for why we shouldn't error out on ENETDOWN. */ - if (IN_SET(errno, EAGAIN, EINTR, ENETDOWN)) + if (ERRNO_IS_TRANSIENT(errno) || ERRNO_IS_DISCONNECT(errno)) return 0; - return log_dhcp_client_errno(client, errno, - "Could not receive message from UDP socket: %m"); + log_dhcp_client_errno(client, errno, "Could not receive message from UDP socket, ignoring: %m"); + return 0; } if ((size_t) len < sizeof(DHCPMessage)) { log_dhcp_client(client, "Too small to be a DHCP message: ignoring"); @@ -2000,7 +1991,9 @@ static int client_receive_message_udp( return 0; } - return client_handle_message(client, message, len); + log_dhcp_client(client, "Received message from UDP socket, processing."); + (void) client_handle_message(client, message, len); + return 0; } static int client_receive_message_raw( @@ -2028,10 +2021,13 @@ static int client_receive_message_raw( assert(client); buflen = next_datagram_size_fd(fd); - if (buflen == -ENETDOWN) + if (buflen < 0) { + if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) + return 0; + + log_dhcp_client_errno(client, buflen, "Failed to determine datagram size to read, ignoring: %m"); return 0; - if (buflen < 0) - return buflen; + } packet = malloc0(buflen); if (!packet) @@ -2040,12 +2036,13 @@ static int client_receive_message_raw( iov = IOVEC_MAKE(packet, buflen); len = recvmsg_safe(fd, &msg, 0); - if (IN_SET(len, -EAGAIN, -EINTR, -ENETDOWN)) - return 0; - if (len < 0) - return log_dhcp_client_errno(client, len, - "Could not receive message from raw socket: %m"); + if (len < 0) { + if (ERRNO_IS_TRANSIENT(len) || ERRNO_IS_DISCONNECT(len)) + return 0; + log_dhcp_client_errno(client, len, "Could not receive message from raw socket, ignoring: %m"); + return 0; + } if ((size_t) len < sizeof(DHCPPacket)) return 0; @@ -2061,7 +2058,9 @@ static int client_receive_message_raw( len -= DHCP_IP_UDP_SIZE; - return client_handle_message(client, &packet->dhcp, len); + log_dhcp_client(client, "Received message from RAW socket, processing."); + (void) client_handle_message(client, &packet->dhcp, len); + return 0; } int sd_dhcp_client_send_renew(sd_dhcp_client *client) { diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c index 4cd9295c..7a250534 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c @@ -107,12 +107,13 @@ int sd_dhcp_lease_get_servers( assert_return(lease, -EINVAL); assert_return(what >= 0, -EINVAL); assert_return(what < _SD_DHCP_LEASE_SERVER_TYPE_MAX, -EINVAL); - assert_return(addr, -EINVAL); if (lease->servers[what].size <= 0) return -ENODATA; - *addr = lease->servers[what].addr; + if (addr) + *addr = lease->servers[what].addr; + return (int) lease->servers[what].size; } @@ -252,6 +253,33 @@ int sd_dhcp_lease_get_search_domains(sd_dhcp_lease *lease, char ***domains) { return -ENODATA; } +int sd_dhcp_lease_get_6rd( + sd_dhcp_lease *lease, + uint8_t *ret_ipv4masklen, + uint8_t *ret_prefixlen, + struct in6_addr *ret_prefix, + const struct in_addr **ret_br_addresses, + size_t *ret_n_br_addresses) { + + assert_return(lease, -EINVAL); + + if (lease->sixrd_n_br_addresses <= 0) + return -ENODATA; + + if (ret_ipv4masklen) + *ret_ipv4masklen = lease->sixrd_ipv4masklen; + if (ret_prefixlen) + *ret_prefixlen = lease->sixrd_prefixlen; + if (ret_prefix) + *ret_prefix = lease->sixrd_prefix; + if (ret_br_addresses) + *ret_br_addresses = lease->sixrd_br_addresses; + if (ret_n_br_addresses) + *ret_n_br_addresses = lease->sixrd_n_br_addresses; + + return 0; +} + int sd_dhcp_lease_get_vendor_specific(sd_dhcp_lease *lease, const void **data, size_t *data_len) { assert_return(lease, -EINVAL); assert_return(data, -EINVAL); @@ -290,6 +318,7 @@ static sd_dhcp_lease *dhcp_lease_free(sd_dhcp_lease *lease) { free(lease->client_id); free(lease->vendor_specific); strv_free(lease->search_domains); + free(lease->sixrd_br_addresses); return mfree(lease); } @@ -535,6 +564,61 @@ static int lease_parse_classless_routes( return 0; } +static int lease_parse_6rd(sd_dhcp_lease *lease, const uint8_t *option, size_t len) { + uint8_t ipv4masklen, prefixlen; + struct in6_addr prefix; + _cleanup_free_ struct in_addr *br_addresses = NULL; + size_t n_br_addresses; + + assert(lease); + assert(option); + + /* See RFC 5969 Section 7.1.1 */ + + if (lease->sixrd_n_br_addresses > 0) + /* Multiple 6rd option?? */ + return -EINVAL; + + /* option-length: The length of the DHCP option in octets (22 octets with one BR IPv4 address). */ + if (len < 2 + sizeof(struct in6_addr) + sizeof(struct in_addr) || + (len - 2 - sizeof(struct in6_addr)) % sizeof(struct in_addr) != 0) + return -EINVAL; + + /* IPv4MaskLen: The number of high-order bits that are identical across all CE IPv4 addresses + * within a given 6rd domain. This may be any value between 0 and 32. Any value + * greater than 32 is invalid. */ + ipv4masklen = option[0]; + if (ipv4masklen > 32) + return -EINVAL; + + /* 6rdPrefixLen: The IPv6 prefix length of the SP's 6rd IPv6 prefix in number of bits. For the + * purpose of bounds checking by DHCP option processing, the sum of + * (32 - IPv4MaskLen) + 6rdPrefixLen MUST be less than or equal to 128. */ + prefixlen = option[1]; + if (32 - ipv4masklen + prefixlen > 128) + return -EINVAL; + + /* 6rdPrefix: The service provider's 6rd IPv6 prefix represented as a 16-octet IPv6 address. + * The bits in the prefix after the 6rdPrefixlen number of bits are reserved and + * MUST be initialized to zero by the sender and ignored by the receiver. */ + memcpy(&prefix, option + 2, sizeof(struct in6_addr)); + (void) in6_addr_mask(&prefix, prefixlen); + + /* 6rdBRIPv4Address: One or more IPv4 addresses of the 6rd Border Relay(s) for a given 6rd domain. */ + n_br_addresses = (len - 2 - sizeof(struct in6_addr)) / sizeof(struct in_addr); + br_addresses = newdup(struct in_addr, option + 2 + sizeof(struct in6_addr), n_br_addresses); + if (!br_addresses) + return -ENOMEM; + + lease->sixrd_ipv4masklen = ipv4masklen; + lease->sixrd_prefixlen = prefixlen; + lease->sixrd_prefix = prefix; + lease->sixrd_br_addresses = TAKE_PTR(br_addresses); + lease->sixrd_n_br_addresses = n_br_addresses; + + return 0; +} + int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void *userdata) { sd_dhcp_lease *lease = userdata; int r; @@ -693,7 +777,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void } if (!timezone_is_valid(tz, LOG_DEBUG)) { - log_debug_errno(r, "Timezone is not valid, ignoring: %m"); + log_debug("Timezone is not valid, ignoring."); return 0; } @@ -720,6 +804,12 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void lease->vendor_specific_len = len; break; + case SD_DHCP_OPTION_6RD: + r = lease_parse_6rd(lease, option, len); + if (r < 0) + log_debug_errno(r, "Failed to parse 6rd option, ignoring: %m"); + break; + case SD_DHCP_OPTION_PRIVATE_BASE ... SD_DHCP_OPTION_PRIVATE_LAST: r = dhcp_lease_insert_private_option(lease, code, option, len); if (r < 0) diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c index 5398bdff..0c2206ff 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c @@ -27,6 +27,7 @@ #include "hexdecoct.h" #include "hostname-util.h" #include "in-addr-util.h" +#include "io-util.h" #include "network-common.h" #include "random-util.h" #include "socket-util.h" @@ -41,16 +42,16 @@ #define IRT_MINIMUM (600 * USEC_PER_SEC) /* what to request from the server, addresses (IA_NA) and/or prefixes (IA_PD) */ -enum { - DHCP6_REQUEST_IA_NA = 1, - DHCP6_REQUEST_IA_TA = 2, /* currently not used */ - DHCP6_REQUEST_IA_PD = 4, -}; +typedef enum DHCP6RequestIA { + DHCP6_REQUEST_IA_NA = 1 << 0, + DHCP6_REQUEST_IA_TA = 1 << 1, /* currently not used */ + DHCP6_REQUEST_IA_PD = 1 << 2, +} DHCP6RequestIA; struct sd_dhcp6_client { unsigned n_ref; - enum DHCP6State state; + DHCP6State state; sd_event *event; int event_priority; int ifindex; @@ -64,7 +65,7 @@ struct sd_dhcp6_client { DHCP6IA ia_pd; sd_event_source *timeout_t1; sd_event_source *timeout_t2; - unsigned request; + DHCP6RequestIA request_ia; be32_t transaction_id; usec_t transaction_start; struct sd_dhcp6_lease *lease; @@ -102,20 +103,42 @@ static const uint16_t default_req_opts[] = { SD_DHCP6_OPTION_SNTP_SERVERS, }; -const char * dhcp6_message_type_table[_DHCP6_MESSAGE_MAX] = { - [DHCP6_SOLICIT] = "SOLICIT", - [DHCP6_ADVERTISE] = "ADVERTISE", - [DHCP6_REQUEST] = "REQUEST", - [DHCP6_CONFIRM] = "CONFIRM", - [DHCP6_RENEW] = "RENEW", - [DHCP6_REBIND] = "REBIND", - [DHCP6_REPLY] = "REPLY", - [DHCP6_RELEASE] = "RELEASE", - [DHCP6_DECLINE] = "DECLINE", - [DHCP6_RECONFIGURE] = "RECONFIGURE", - [DHCP6_INFORMATION_REQUEST] = "INFORMATION-REQUEST", - [DHCP6_RELAY_FORW] = "RELAY-FORW", - [DHCP6_RELAY_REPL] = "RELAY-REPL", +const char * dhcp6_message_type_table[_DHCP6_MESSAGE_TYPE_MAX] = { + [DHCP6_MESSAGE_SOLICIT] = "Solicit", + [DHCP6_MESSAGE_ADVERTISE] = "Advertise", + [DHCP6_MESSAGE_REQUEST] = "Request", + [DHCP6_MESSAGE_CONFIRM] = "Confirm", + [DHCP6_MESSAGE_RENEW] = "Renew", + [DHCP6_MESSAGE_REBIND] = "Rebind", + [DHCP6_MESSAGE_REPLY] = "Reply", + [DHCP6_MESSAGE_RELEASE] = "Release", + [DHCP6_MESSAGE_DECLINE] = "Decline", + [DHCP6_MESSAGE_RECONFIGURE] = "Reconfigure", + [DHCP6_MESSAGE_INFORMATION_REQUEST] = "Information Request", + [DHCP6_MESSAGE_RELAY_FORWARD] = "Relay Forward", + [DHCP6_MESSAGE_RELAY_REPLY] = "Relay Reply", + [DHCP6_MESSAGE_LEASE_QUERY] = "Lease Query", + [DHCP6_MESSAGE_LEASE_QUERY_REPLY] = "Lease Query Reply", + [DHCP6_MESSAGE_LEASE_QUERY_DONE] = "Lease Query Done", + [DHCP6_MESSAGE_LEASE_QUERY_DATA] = "Lease Query Data", + [DHCP6_MESSAGE_RECONFIGURE_REQUEST] = "Reconfigure Request", + [DHCP6_MESSAGE_RECONFIGURE_REPLY] = "Reconfigure Reply", + [DHCP6_MESSAGE_DHCPV4_QUERY] = "DHCPv4 Query", + [DHCP6_MESSAGE_DHCPV4_RESPONSE] = "DHCPv4 Response", + [DHCP6_MESSAGE_ACTIVE_LEASE_QUERY] = "Active Lease Query", + [DHCP6_MESSAGE_START_TLS] = "Start TLS", + [DHCP6_MESSAGE_BINDING_UPDATE] = "Binding Update", + [DHCP6_MESSAGE_BINDING_REPLY] = "Binding Reply", + [DHCP6_MESSAGE_POOL_REQUEST] = "Pool Request", + [DHCP6_MESSAGE_POOL_RESPONSE] = "Pool Response", + [DHCP6_MESSAGE_UPDATE_REQUEST] = "Update Request", + [DHCP6_MESSAGE_UPDATE_REQUEST_ALL] = "Update Request All", + [DHCP6_MESSAGE_UPDATE_DONE] = "Update Done", + [DHCP6_MESSAGE_CONNECT] = "Connect", + [DHCP6_MESSAGE_CONNECT_REPLY] = "Connect Reply", + [DHCP6_MESSAGE_DISCONNECT] = "Disconnect", + [DHCP6_MESSAGE_STATE] = "State", + [DHCP6_MESSAGE_CONTACT] = "Contact", }; DEFINE_STRING_TABLE_LOOKUP(dhcp6_message_type, int); @@ -151,7 +174,7 @@ DEFINE_STRING_TABLE_LOOKUP(dhcp6_message_status, int); #define DHCP6_CLIENT_DONT_DESTROY(client) \ _cleanup_(sd_dhcp6_client_unrefp) _unused_ sd_dhcp6_client *_dont_destroy_##client = sd_dhcp6_client_ref(client) -static int client_start(sd_dhcp6_client *client, enum DHCP6State state); +static int client_start(sd_dhcp6_client *client, DHCP6State state); int sd_dhcp6_client_set_callback( sd_dhcp6_client *client, @@ -234,10 +257,6 @@ int sd_dhcp6_client_set_mac( return 0; } - if (client->mac_addr_len == addr_len && - memcmp(&client->mac_addr, addr, addr_len) == 0) - return 0; - memcpy(&client->mac_addr, addr, addr_len); client->mac_addr_len = addr_len; client->arp_type = arp_type; @@ -475,7 +494,7 @@ int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client, uint16_t option) assert_return(client, -EINVAL); assert_return(client->state == DHCP6_STATE_STOPPED, -EBUSY); - if (option <= 0 || option >= UINT8_MAX) + if (!dhcp6_option_can_request(option)) return -EINVAL; for (t = 0; t < client->req_opts_len; t++) @@ -548,7 +567,7 @@ int sd_dhcp6_client_get_prefix_delegation(sd_dhcp6_client *client, int *delegati assert_return(client, -EINVAL); assert_return(delegation, -EINVAL); - *delegation = FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD); + *delegation = FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD); return 0; } @@ -556,7 +575,7 @@ int sd_dhcp6_client_get_prefix_delegation(sd_dhcp6_client *client, int *delegati int sd_dhcp6_client_set_prefix_delegation(sd_dhcp6_client *client, int delegation) { assert_return(client, -EINVAL); - SET_FLAG(client->request, DHCP6_REQUEST_IA_PD, delegation); + SET_FLAG(client->request_ia, DHCP6_REQUEST_IA_PD, delegation); return 0; } @@ -565,7 +584,7 @@ int sd_dhcp6_client_get_address_request(sd_dhcp6_client *client, int *request) { assert_return(client, -EINVAL); assert_return(request, -EINVAL); - *request = FLAGS_SET(client->request, DHCP6_REQUEST_IA_NA); + *request = FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_NA); return 0; } @@ -573,7 +592,7 @@ int sd_dhcp6_client_get_address_request(sd_dhcp6_client *client, int *request) { int sd_dhcp6_client_set_address_request(sd_dhcp6_client *client, int request) { assert_return(client, -EINVAL); - SET_FLAG(client->request, DHCP6_REQUEST_IA_NA, request); + SET_FLAG(client->request_ia, DHCP6_REQUEST_IA_NA, request); return 0; } @@ -678,11 +697,11 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { switch(client->state) { case DHCP6_STATE_INFORMATION_REQUEST: - message->type = DHCP6_INFORMATION_REQUEST; + message->type = DHCP6_MESSAGE_INFORMATION_REQUEST; if (client->mudurl) { r = dhcp6_option_append(&opt, &optlen, - SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl), + SD_DHCP6_OPTION_MUD_URL_V6, strlen(client->mudurl), client->mudurl); if (r < 0) return r; @@ -691,14 +710,14 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { break; case DHCP6_STATE_SOLICITATION: - message->type = DHCP6_SOLICIT; + message->type = DHCP6_MESSAGE_SOLICIT; r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_RAPID_COMMIT, 0, NULL); if (r < 0) return r; - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_NA)) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_NA)) { r = dhcp6_option_append_ia(&opt, &optlen, &client->ia_na); if (r < 0) @@ -713,7 +732,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { if (client->mudurl) { r = dhcp6_option_append(&opt, &optlen, - SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl), + SD_DHCP6_OPTION_MUD_URL_V6, strlen(client->mudurl), client->mudurl); if (r < 0) return r; @@ -738,7 +757,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { return r; } - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD)) { r = dhcp6_option_append_pd(&opt, &optlen, &client->ia_pd, &client->hint_pd_prefix); if (r < 0) return r; @@ -750,9 +769,9 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { case DHCP6_STATE_RENEW: if (client->state == DHCP6_STATE_REQUEST) - message->type = DHCP6_REQUEST; + message->type = DHCP6_MESSAGE_REQUEST; else - message->type = DHCP6_RENEW; + message->type = DHCP6_MESSAGE_RENEW; r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_SERVERID, client->lease->serverid_len, @@ -760,7 +779,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { if (r < 0) return r; - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_NA) && client->lease->ia.addresses) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_NA) && client->lease->ia.addresses) { r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia); if (r < 0) @@ -775,7 +794,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { if (client->mudurl) { r = dhcp6_option_append(&opt, &optlen, - SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl), + SD_DHCP6_OPTION_MUD_URL_V6, strlen(client->mudurl), client->mudurl); if (r < 0) return r; @@ -799,7 +818,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { return r; } - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD) && client->lease->pd.addresses) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD) && client->lease->pd.addresses) { r = dhcp6_option_append_pd(&opt, &optlen, &client->lease->pd, NULL); if (r < 0) return r; @@ -808,9 +827,9 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { break; case DHCP6_STATE_REBIND: - message->type = DHCP6_REBIND; + message->type = DHCP6_MESSAGE_REBIND; - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_NA)) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_NA)) { r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia); if (r < 0) return r; @@ -824,7 +843,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { if (client->mudurl) { r = dhcp6_option_append(&opt, &optlen, - SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl), + SD_DHCP6_OPTION_MUD_URL_V6, strlen(client->mudurl), client->mudurl); if (r < 0) return r; @@ -848,7 +867,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { return r; } - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD) && client->lease->pd.addresses) { r = dhcp6_option_append_pd(&opt, &optlen, &client->lease->pd, NULL); if (r < 0) return r; @@ -859,6 +878,8 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { case DHCP6_STATE_STOPPED: case DHCP6_STATE_BOUND: return -EINVAL; + default: + assert_not_reached(); } r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_ORO, @@ -873,14 +894,12 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { if (r < 0) return r; - elapsed_usec = time_now - client->transaction_start; - if (elapsed_usec < 0xffff * USEC_PER_MSEC * 10) - elapsed_time = htobe16(elapsed_usec / USEC_PER_MSEC / 10); - else - elapsed_time = 0xffff; - - r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_ELAPSED_TIME, - sizeof(elapsed_time), &elapsed_time); + /* RFC 8415 Section 21.9. + * A client MUST include an Elapsed Time option in messages to indicate how long the client has + * been trying to complete a DHCP message exchange. */ + elapsed_usec = MIN(usec_sub_unsigned(time_now, client->transaction_start) / USEC_PER_MSEC / 10, (usec_t) UINT16_MAX); + elapsed_time = htobe16(elapsed_usec); + r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_ELAPSED_TIME, sizeof(elapsed_time), &elapsed_time); if (r < 0) return r; @@ -936,7 +955,7 @@ static int client_timeout_t1(sd_event_source *s, uint64_t usec, void *userdata) static int client_timeout_resend_expire(sd_event_source *s, uint64_t usec, void *userdata) { sd_dhcp6_client *client = userdata; DHCP6_CLIENT_DONT_DESTROY(client); - enum DHCP6State state; + DHCP6State state; assert(s); assert(client); @@ -980,7 +999,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda case DHCP6_STATE_SOLICITATION: - if (client->retransmit_count && client->lease) { + if (client->retransmit_count > 0 && client->lease) { client_start(client, DHCP6_STATE_REQUEST); return 0; } @@ -1027,6 +1046,8 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda case DHCP6_STATE_STOPPED: case DHCP6_STATE_BOUND: return 0; + default: + assert_not_reached(); } if (max_retransmit_count > 0 && @@ -1051,8 +1072,8 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda client->retransmit_time += init_retransmit_time / 10; } else { - if (max_retransmit_time > 0 && - client->retransmit_time > max_retransmit_time / 2) + assert(max_retransmit_time > 0); + if (client->retransmit_time > max_retransmit_time / 2) client->retransmit_time = client_timeout_compute_random(max_retransmit_time); else client->retransmit_time += client_timeout_compute_random(client->retransmit_time); @@ -1113,7 +1134,7 @@ static int client_ensure_iaid(sd_dhcp6_client *client) { return 0; } -static int client_parse_message( +int client_parse_message( sd_dhcp6_client *client, DHCP6Message *message, size_t len, @@ -1121,7 +1142,6 @@ static int client_parse_message( uint32_t lt_t1 = UINT32_MAX, lt_t2 = UINT32_MAX; usec_t irt = IRT_DEFAULT; - bool clientid = false; int r; assert(client); @@ -1141,23 +1161,19 @@ static int client_parse_message( switch (optcode) { case SD_DHCP6_OPTION_CLIENTID: - if (clientid) - return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s contains multiple clientids", + if (dhcp6_lease_get_clientid(lease, NULL, NULL) >= 0) + return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s contains multiple client IDs", dhcp6_message_type_to_string(message->type)); - if (optlen != client->duid_len || - memcmp(&client->duid, optval, optlen) != 0) - return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s DUID does not match", - dhcp6_message_type_to_string(message->type)); - - clientid = true; + r = dhcp6_lease_set_clientid(lease, optval, optlen); + if (r < 0) + return r; break; case SD_DHCP6_OPTION_SERVERID: - r = dhcp6_lease_get_serverid(lease, NULL, NULL); - if (r >= 0) - return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s contains multiple serverids", + if (dhcp6_lease_get_serverid(lease, NULL, NULL) >= 0) + return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s contains multiple server IDs", dhcp6_message_type_to_string(message->type)); r = dhcp6_lease_set_serverid(lease, optval, optlen); @@ -1255,35 +1271,35 @@ static int client_parse_message( case SD_DHCP6_OPTION_DNS_SERVERS: r = dhcp6_lease_add_dns(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse DNS server option, ignoring: %m"); break; case SD_DHCP6_OPTION_DOMAIN_LIST: r = dhcp6_lease_add_domains(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse domain list option, ignoring: %m"); break; case SD_DHCP6_OPTION_NTP_SERVER: r = dhcp6_lease_add_ntp(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse NTP server option, ignoring: %m"); break; case SD_DHCP6_OPTION_SNTP_SERVERS: r = dhcp6_lease_add_sntp(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse SNTP server option, ignoring: %m"); break; - case SD_DHCP6_OPTION_FQDN: + case SD_DHCP6_OPTION_CLIENT_FQDN: r = dhcp6_lease_set_fqdn(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse FQDN option, ignoring: %m"); break; @@ -1296,8 +1312,15 @@ static int client_parse_message( } } - if (!clientid) - return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s has incomplete options", + uint8_t *clientid; + size_t clientid_len; + if (dhcp6_lease_get_clientid(lease, &clientid, &clientid_len) < 0) + return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "%s message does not contain client ID. Ignoring.", + dhcp6_message_type_to_string(message->type)); + + if (clientid_len != client->duid_len || + memcmp(clientid, &client->duid, clientid_len) != 0) + return log_dhcp6_client_errno(client, SYNTHETIC_ERRNO(EINVAL), "The client ID in %s message does not match. Ignoring.", dhcp6_message_type_to_string(message->type)); if (client->state != DHCP6_STATE_INFORMATION_REQUEST) { @@ -1325,21 +1348,32 @@ static int client_parse_message( return 0; } -static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply, size_t len) { +static int client_receive_reply( + sd_dhcp6_client *client, + DHCP6Message *reply, + size_t len, + const triple_timestamp *t, + const struct in6_addr *server_address) { + _cleanup_(sd_dhcp6_lease_unrefp) sd_dhcp6_lease *lease = NULL; bool rapid_commit; int r; assert(client); assert(reply); + assert(t); - if (reply->type != DHCP6_REPLY) + if (reply->type != DHCP6_MESSAGE_REPLY) return 0; r = dhcp6_lease_new(&lease); if (r < 0) return -ENOMEM; + lease->timestamp = *t; + if (server_address) + lease->server_address = *server_address; + r = client_parse_message(client, reply, len, lease); if (r < 0) return r; @@ -1359,18 +1393,32 @@ static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply, si return DHCP6_STATE_BOUND; } -static int client_receive_advertise(sd_dhcp6_client *client, DHCP6Message *advertise, size_t len) { +static int client_receive_advertise( + sd_dhcp6_client *client, + DHCP6Message *advertise, + size_t len, + const triple_timestamp *t, + const struct in6_addr *server_address) { + _cleanup_(sd_dhcp6_lease_unrefp) sd_dhcp6_lease *lease = NULL; uint8_t pref_advertise = 0, pref_lease = 0; int r; - if (advertise->type != DHCP6_ADVERTISE) + assert(client); + assert(advertise); + assert(t); + + if (advertise->type != DHCP6_MESSAGE_ADVERTISE) return 0; r = dhcp6_lease_new(&lease); if (r < 0) return r; + lease->timestamp = *t; + if (server_address) + lease->server_address = *server_address; + r = client_parse_message(client, advertise, len, lease); if (r < 0) return r; @@ -1401,7 +1449,22 @@ static int client_receive_message( sd_dhcp6_client *client = userdata; DHCP6_CLIENT_DONT_DESTROY(client); + /* This needs to be initialized with zero. See #20741. */ + CMSG_BUFFER_TYPE(CMSG_SPACE_TIMEVAL) control = {}; + struct iovec iov; + union sockaddr_union sa = {}; + struct msghdr msg = { + .msg_name = &sa.sa, + .msg_namelen = sizeof(sa), + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = &control, + .msg_controllen = sizeof(control), + }; + struct cmsghdr *cmsg; + triple_timestamp t = {}; _cleanup_free_ DHCP6Message *message = NULL; + struct in6_addr *server_address = NULL; ssize_t buflen, len; int r = 0; @@ -1410,52 +1473,59 @@ static int client_receive_message( assert(client->event); buflen = next_datagram_size_fd(fd); - if (buflen == -ENETDOWN) - /* the link is down. Don't return an error or the I/O event - source will be disconnected and we won't be able to receive - packets again when the link comes back. */ + if (buflen < 0) { + if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) + return 0; + + log_dhcp6_client_errno(client, buflen, "Failed to determine datagram size to read, ignoring: %m"); return 0; - if (buflen < 0) - return buflen; + } message = malloc(buflen); if (!message) return -ENOMEM; - len = recv(fd, message, buflen, 0); + iov = IOVEC_MAKE(message, buflen); + + len = recvmsg_safe(fd, &msg, MSG_DONTWAIT); if (len < 0) { - /* see comment above for why we shouldn't error out on ENETDOWN. */ - if (IN_SET(errno, EAGAIN, EINTR, ENETDOWN)) + if (ERRNO_IS_TRANSIENT(len) || ERRNO_IS_DISCONNECT(len)) return 0; - return log_dhcp6_client_errno(client, errno, "Could not receive message from UDP socket: %m"); - + log_dhcp6_client_errno(client, len, "Could not receive message from UDP socket, ignoring: %m"); + return 0; } if ((size_t) len < sizeof(DHCP6Message)) { log_dhcp6_client(client, "Too small to be DHCP6 message: ignoring"); return 0; } - switch(message->type) { - case DHCP6_SOLICIT: - case DHCP6_REQUEST: - case DHCP6_CONFIRM: - case DHCP6_RENEW: - case DHCP6_REBIND: - case DHCP6_RELEASE: - case DHCP6_DECLINE: - case DHCP6_INFORMATION_REQUEST: - case DHCP6_RELAY_FORW: - case DHCP6_RELAY_REPL: - return 0; + /* msg_namelen == 0 happens when running the test-suite over a socketpair */ + if (msg.msg_namelen > 0) { + if (msg.msg_namelen != sizeof(struct sockaddr_in6) || sa.in6.sin6_family != AF_INET6) { + log_dhcp6_client(client, "Received message from invalid source, ignoring."); + return 0; + } - case DHCP6_ADVERTISE: - case DHCP6_REPLY: - case DHCP6_RECONFIGURE: - break; + server_address = &sa.in6.sin6_addr; + } - default: - log_dhcp6_client(client, "Unknown message type %d", message->type); + CMSG_FOREACH(cmsg, &msg) { + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SO_TIMESTAMP && + cmsg->cmsg_len == CMSG_LEN(sizeof(struct timeval))) + triple_timestamp_from_realtime(&t, timeval_load((struct timeval*) CMSG_DATA(cmsg))); + } + + if (!triple_timestamp_is_set(&t)) + triple_timestamp_get(&t); + + if (!IN_SET(message->type, DHCP6_MESSAGE_ADVERTISE, DHCP6_MESSAGE_REPLY, DHCP6_MESSAGE_RECONFIGURE)) { + const char *type_str = dhcp6_message_type_to_string(message->type); + if (type_str) + log_dhcp6_client(client, "Received unexpected %s message, ignoring.", type_str); + else + log_dhcp6_client(client, "Received unsupported message type %u, ignoring.", message->type); return 0; } @@ -1464,7 +1534,7 @@ static int client_receive_message( switch (client->state) { case DHCP6_STATE_INFORMATION_REQUEST: - r = client_receive_reply(client, message, len); + r = client_receive_reply(client, message, len, &t, server_address); if (r < 0) { log_dhcp6_client_errno(client, r, "Failed to process received reply message, ignoring: %m"); return 0; @@ -1477,7 +1547,7 @@ static int client_receive_message( break; case DHCP6_STATE_SOLICITATION: - r = client_receive_advertise(client, message, len); + r = client_receive_advertise(client, message, len, &t, server_address); if (r < 0) { log_dhcp6_client_errno(client, r, "Failed to process received advertise message, ignoring: %m"); return 0; @@ -1493,7 +1563,7 @@ static int client_receive_message( case DHCP6_STATE_RENEW: case DHCP6_STATE_REBIND: - r = client_receive_reply(client, message, len); + r = client_receive_reply(client, message, len, &t, server_address); if (r < 0) { log_dhcp6_client_errno(client, r, "Failed to process received reply message, ignoring: %m"); return 0; @@ -1517,6 +1587,8 @@ static int client_receive_message( case DHCP6_STATE_STOPPED: return 0; + default: + assert_not_reached(); } log_dhcp6_client(client, "Recv %s", @@ -1530,14 +1602,14 @@ static int client_get_lifetime(sd_dhcp6_client *client, uint32_t *lifetime_t1, assert_return(client, -EINVAL); assert_return(client->lease, -EINVAL); - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_NA) && client->lease->ia.addresses) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_NA) && client->lease->ia.addresses) { *lifetime_t1 = be32toh(client->lease->ia.ia_na.lifetime_t1); *lifetime_t2 = be32toh(client->lease->ia.ia_na.lifetime_t2); return 0; } - if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD) && client->lease->pd.addresses) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD) && client->lease->pd.addresses) { *lifetime_t1 = be32toh(client->lease->pd.ia_pd.lifetime_t1); *lifetime_t2 = be32toh(client->lease->pd.ia_pd.lifetime_t2); @@ -1547,7 +1619,7 @@ static int client_get_lifetime(sd_dhcp6_client *client, uint32_t *lifetime_t1, return -ENOMSG; } -static int client_start(sd_dhcp6_client *client, enum DHCP6State state) { +static int client_start(sd_dhcp6_client *client, DHCP6State state) { int r; usec_t timeout, time_now; uint32_t lifetime_t1, lifetime_t2; @@ -1647,6 +1719,8 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state) { client->state = state; return 0; + default: + assert_not_reached(); } client->transaction_id = random_u32() & htobe32(0x00ffffff); @@ -1685,7 +1759,7 @@ int sd_dhcp6_client_is_running(sd_dhcp6_client *client) { } int sd_dhcp6_client_start(sd_dhcp6_client *client) { - enum DHCP6State state = DHCP6_STATE_SOLICITATION; + DHCP6State state = DHCP6_STATE_SOLICITATION; int r; assert_return(client, -EINVAL); @@ -1696,7 +1770,7 @@ int sd_dhcp6_client_start(sd_dhcp6_client *client) { if (client->state != DHCP6_STATE_STOPPED) return -EBUSY; - if (!client->information_request && !client->request) + if (!client->information_request && client->request_ia == 0) return -EINVAL; r = client_reset(client); @@ -1824,7 +1898,7 @@ int sd_dhcp6_client_new(sd_dhcp6_client **ret) { .ia_na.type = SD_DHCP6_OPTION_IA_NA, .ia_pd.type = SD_DHCP6_OPTION_IA_PD, .ifindex = -1, - .request = DHCP6_REQUEST_IA_NA, + .request_ia = DHCP6_REQUEST_IA_NA | DHCP6_REQUEST_IA_PD, .fd = -1, .req_opts_len = ELEMENTSOF(default_req_opts), .hint_pd_prefix.iapdprefix.lifetime_preferred = (be32_t) -1, diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c index 85649d92..b46a2e33 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c +++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-lease.c @@ -13,6 +13,27 @@ #include "strv.h" #include "util.h" +int sd_dhcp6_lease_get_timestamp(sd_dhcp6_lease *lease, clockid_t clock, uint64_t *ret) { + assert_return(lease, -EINVAL); + assert_return(TRIPLE_TIMESTAMP_HAS_CLOCK(clock), -EOPNOTSUPP); + assert_return(clock_supported(clock), -EOPNOTSUPP); + assert_return(ret, -EINVAL); + + if (!triple_timestamp_is_set(&lease->timestamp)) + return -ENODATA; + + *ret = triple_timestamp_by_clock(&lease->timestamp, clock); + return 0; +} + +int sd_dhcp6_lease_get_server_address(sd_dhcp6_lease *lease, struct in6_addr *ret) { + assert_return(lease, -EINVAL); + assert_return(ret, -EINVAL); + + *ret = lease->server_address; + return 0; +} + int dhcp6_lease_ia_rebind_expire(const DHCP6IA *ia, uint32_t *expire) { DHCP6Address *addr; uint32_t valid = 0, t; @@ -52,12 +73,43 @@ DHCP6IA *dhcp6_lease_free_ia(DHCP6IA *ia) { return NULL; } -int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, - size_t len) { +int dhcp6_lease_set_clientid(sd_dhcp6_lease *lease, const uint8_t *id, size_t len) { + uint8_t *clientid; + + assert_return(lease, -EINVAL); + assert_return(id, -EINVAL); + assert_return(len > 0, -EINVAL); + + clientid = memdup(id, len); + if (!clientid) + return -ENOMEM; + + free_and_replace(lease->clientid, clientid); + lease->clientid_len = len; + + return 0; +} + +int dhcp6_lease_get_clientid(sd_dhcp6_lease *lease, uint8_t **ret_id, size_t *ret_len) { + assert_return(lease, -EINVAL); + + if (!lease->clientid) + return -ENODATA; + + if (ret_id) + *ret_id = lease->clientid; + if (ret_len) + *ret_len = lease->clientid_len; + + return 0; +} + +int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, size_t len) { uint8_t *serverid; assert_return(lease, -EINVAL); assert_return(id, -EINVAL); + assert_return(len > 0, -EINVAL); serverid = memdup(id, len); if (!serverid) @@ -69,16 +121,16 @@ int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, return 0; } -int dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **id, size_t *len) { +int dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **ret_id, size_t *ret_len) { assert_return(lease, -EINVAL); if (!lease->serverid) - return -ENOMSG; + return -ENODATA; - if (id) - *id = lease->serverid; - if (len) - *len = lease->serverid_len; + if (ret_id) + *ret_id = lease->serverid; + if (ret_len) + *ret_len = lease->serverid_len; return 0; } @@ -119,24 +171,6 @@ int dhcp6_lease_get_rapid_commit(sd_dhcp6_lease *lease, bool *rapid_commit) { return 0; } -int dhcp6_lease_get_iaid(sd_dhcp6_lease *lease, be32_t *iaid) { - assert_return(lease, -EINVAL); - assert_return(iaid, -EINVAL); - - *iaid = lease->ia.ia_na.id; - - return 0; -} - -int dhcp6_lease_get_pd_iaid(sd_dhcp6_lease *lease, be32_t *iaid) { - assert_return(lease, -EINVAL); - assert_return(iaid, -EINVAL); - - *iaid = lease->pd.ia_pd.id; - - return 0; -} - int sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease, struct in6_addr *addr, uint32_t *lifetime_preferred, uint32_t *lifetime_valid) { @@ -207,12 +241,13 @@ int dhcp6_lease_add_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t opt int sd_dhcp6_lease_get_dns(sd_dhcp6_lease *lease, const struct in6_addr **ret) { assert_return(lease, -EINVAL); - assert_return(ret, -EINVAL); if (!lease->dns) return -ENOENT; - *ret = lease->dns; + if (ret) + *ret = lease->dns; + return lease->dns_count; } @@ -305,16 +340,17 @@ int dhcp6_lease_add_sntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t op int sd_dhcp6_lease_get_ntp_addrs(sd_dhcp6_lease *lease, const struct in6_addr **ret) { assert_return(lease, -EINVAL); - assert_return(ret, -EINVAL); if (lease->ntp) { - *ret = lease->ntp; + if (ret) + *ret = lease->ntp; return lease->ntp_count; } if (lease->sntp && !lease->ntp_fqdn) { /* Fallback to the deprecated SNTP option. */ - *ret = lease->sntp; + if (ret) + *ret = lease->sntp; return lease->sntp_count; } @@ -323,12 +359,12 @@ int sd_dhcp6_lease_get_ntp_addrs(sd_dhcp6_lease *lease, const struct in6_addr ** int sd_dhcp6_lease_get_ntp_fqdn(sd_dhcp6_lease *lease, char ***ret) { assert_return(lease, -EINVAL); - assert_return(ret, -EINVAL); if (!lease->ntp_fqdn) return -ENOENT; - *ret = lease->ntp_fqdn; + if (ret) + *ret = lease->ntp_fqdn; return strv_length(lease->ntp_fqdn); } @@ -366,6 +402,7 @@ static sd_dhcp6_lease *dhcp6_lease_free(sd_dhcp6_lease *lease) { if (!lease) return NULL; + free(lease->clientid); free(lease->serverid); dhcp6_lease_free_ia(&lease->ia); dhcp6_lease_free_ia(&lease->pd); diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c b/src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c deleted file mode 100644 index f0612ed5..00000000 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-ipv4acd.c +++ /dev/null @@ -1,616 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/*** - Copyright © 2014 Axis Communications AB. All rights reserved. -***/ - -#include "nm-sd-adapt-core.h" - -#include -#include -#include -#include -#include - -#include "sd-ipv4acd.h" - -#include "alloc-util.h" -#include "arp-util.h" -#include "ether-addr-util.h" -#include "event-util.h" -#include "fd-util.h" -#include "in-addr-util.h" -#include "memory-util.h" -#include "network-common.h" -#include "random-util.h" -#include "siphash24.h" -#include "string-table.h" -#include "string-util.h" -#include "time-util.h" - -/* Constants from the RFC */ -#define PROBE_WAIT_USEC (1U * USEC_PER_SEC) -#define PROBE_NUM 3U -#define PROBE_MIN_USEC (1U * USEC_PER_SEC) -#define PROBE_MAX_USEC (2U * USEC_PER_SEC) -#define ANNOUNCE_WAIT_USEC (2U * USEC_PER_SEC) -#define ANNOUNCE_NUM 2U -#define ANNOUNCE_INTERVAL_USEC (2U * USEC_PER_SEC) -#define MAX_CONFLICTS 10U -#define RATE_LIMIT_INTERVAL_USEC (60U * USEC_PER_SEC) -#define DEFEND_INTERVAL_USEC (10U * USEC_PER_SEC) - -typedef enum IPv4ACDState { - IPV4ACD_STATE_INIT, - IPV4ACD_STATE_STARTED, - IPV4ACD_STATE_WAITING_PROBE, - IPV4ACD_STATE_PROBING, - IPV4ACD_STATE_WAITING_ANNOUNCE, - IPV4ACD_STATE_ANNOUNCING, - IPV4ACD_STATE_RUNNING, - _IPV4ACD_STATE_MAX, - _IPV4ACD_STATE_INVALID = -EINVAL, -} IPv4ACDState; - -struct sd_ipv4acd { - unsigned n_ref; - - IPv4ACDState state; - int ifindex; - int fd; - - char *ifname; - unsigned n_iteration; - unsigned n_conflict; - - sd_event_source *receive_message_event_source; - sd_event_source *timer_event_source; - - usec_t defend_window; - struct in_addr address; - - /* External */ - struct ether_addr mac_addr; - - sd_event *event; - int event_priority; - sd_ipv4acd_callback_t callback; - void *userdata; - sd_ipv4acd_check_mac_callback_t check_mac_callback; - void *check_mac_userdata; -}; - -#define log_ipv4acd_errno(acd, error, fmt, ...) \ - log_interface_prefix_full_errno( \ - "IPv4ACD: ", \ - sd_ipv4acd, acd, \ - error, fmt, ##__VA_ARGS__) -#define log_ipv4acd(acd, fmt, ...) \ - log_interface_prefix_full_errno_zerook( \ - "IPv4ACD: ", \ - sd_ipv4acd, acd, \ - 0, fmt, ##__VA_ARGS__) - -static const char * const ipv4acd_state_table[_IPV4ACD_STATE_MAX] = { - [IPV4ACD_STATE_INIT] = "init", - [IPV4ACD_STATE_STARTED] = "started", - [IPV4ACD_STATE_WAITING_PROBE] = "waiting-probe", - [IPV4ACD_STATE_PROBING] = "probing", - [IPV4ACD_STATE_WAITING_ANNOUNCE] = "waiting-announce", - [IPV4ACD_STATE_ANNOUNCING] = "announcing", - [IPV4ACD_STATE_RUNNING] = "running", -}; - -DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(ipv4acd_state, IPv4ACDState); - -static void ipv4acd_set_state(sd_ipv4acd *acd, IPv4ACDState st, bool reset_counter) { - assert(acd); - assert(st < _IPV4ACD_STATE_MAX); - - if (st != acd->state) - log_ipv4acd(acd, "%s -> %s", ipv4acd_state_to_string(acd->state), ipv4acd_state_to_string(st)); - - if (st == acd->state && !reset_counter) - acd->n_iteration++; - else { - acd->state = st; - acd->n_iteration = 0; - } -} - -static void ipv4acd_reset(sd_ipv4acd *acd) { - assert(acd); - - (void) event_source_disable(acd->timer_event_source); - acd->receive_message_event_source = sd_event_source_disable_unref(acd->receive_message_event_source); - - acd->fd = safe_close(acd->fd); - - ipv4acd_set_state(acd, IPV4ACD_STATE_INIT, true); -} - -static sd_ipv4acd *ipv4acd_free(sd_ipv4acd *acd) { - assert(acd); - - ipv4acd_reset(acd); - sd_event_source_unref(acd->timer_event_source); - sd_ipv4acd_detach_event(acd); - free(acd->ifname); - return mfree(acd); -} - -DEFINE_TRIVIAL_REF_UNREF_FUNC(sd_ipv4acd, sd_ipv4acd, ipv4acd_free); - -int sd_ipv4acd_new(sd_ipv4acd **ret) { - _cleanup_(sd_ipv4acd_unrefp) sd_ipv4acd *acd = NULL; - - assert_return(ret, -EINVAL); - - acd = new(sd_ipv4acd, 1); - if (!acd) - return -ENOMEM; - - *acd = (sd_ipv4acd) { - .n_ref = 1, - .state = IPV4ACD_STATE_INIT, - .ifindex = -1, - .fd = -1, - }; - - *ret = TAKE_PTR(acd); - - return 0; -} - -static void ipv4acd_client_notify(sd_ipv4acd *acd, int event) { - assert(acd); - - if (!acd->callback) - return; - - acd->callback(acd, event, acd->userdata); -} - -int sd_ipv4acd_stop(sd_ipv4acd *acd) { - IPv4ACDState old_state; - - if (!acd) - return 0; - - old_state = acd->state; - - ipv4acd_reset(acd); - - if (old_state == IPV4ACD_STATE_INIT) - return 0; - - log_ipv4acd(acd, "STOPPED"); - - ipv4acd_client_notify(acd, SD_IPV4ACD_EVENT_STOP); - - return 0; -} - -static int ipv4acd_on_timeout(sd_event_source *s, uint64_t usec, void *userdata); - -static int ipv4acd_set_next_wakeup(sd_ipv4acd *acd, usec_t usec, usec_t random_usec) { - usec_t next_timeout, time_now; - - assert(acd); - - next_timeout = usec; - - if (random_usec > 0) - next_timeout += (usec_t) random_u64() % random_usec; - - assert_se(sd_event_now(acd->event, clock_boottime_or_monotonic(), &time_now) >= 0); - - return event_reset_time(acd->event, &acd->timer_event_source, - clock_boottime_or_monotonic(), - time_now + next_timeout, 0, - ipv4acd_on_timeout, acd, - acd->event_priority, "ipv4acd-timer", true); -} - -static int ipv4acd_on_timeout(sd_event_source *s, uint64_t usec, void *userdata) { - sd_ipv4acd *acd = userdata; - int r = 0; - - assert(acd); - - switch (acd->state) { - - case IPV4ACD_STATE_STARTED: - acd->defend_window = 0; - - ipv4acd_set_state(acd, IPV4ACD_STATE_WAITING_PROBE, true); - - if (acd->n_conflict >= MAX_CONFLICTS) { - log_ipv4acd(acd, "Max conflicts reached, delaying by %s", - FORMAT_TIMESPAN(RATE_LIMIT_INTERVAL_USEC, 0)); - r = ipv4acd_set_next_wakeup(acd, RATE_LIMIT_INTERVAL_USEC, PROBE_WAIT_USEC); - } else - r = ipv4acd_set_next_wakeup(acd, 0, PROBE_WAIT_USEC); - if (r < 0) - goto fail; - - break; - - case IPV4ACD_STATE_WAITING_PROBE: - case IPV4ACD_STATE_PROBING: - /* Send a probe */ - r = arp_send_probe(acd->fd, acd->ifindex, &acd->address, &acd->mac_addr); - if (r < 0) { - log_ipv4acd_errno(acd, r, "Failed to send ARP probe: %m"); - goto fail; - } - - log_ipv4acd(acd, "Probing "IPV4_ADDRESS_FMT_STR, IPV4_ADDRESS_FMT_VAL(acd->address)); - - if (acd->n_iteration < PROBE_NUM - 2) { - ipv4acd_set_state(acd, IPV4ACD_STATE_PROBING, false); - - r = ipv4acd_set_next_wakeup(acd, PROBE_MIN_USEC, (PROBE_MAX_USEC-PROBE_MIN_USEC)); - if (r < 0) - goto fail; - } else { - ipv4acd_set_state(acd, IPV4ACD_STATE_WAITING_ANNOUNCE, true); - - r = ipv4acd_set_next_wakeup(acd, ANNOUNCE_WAIT_USEC, 0); - if (r < 0) - goto fail; - } - - break; - - case IPV4ACD_STATE_ANNOUNCING: - if (acd->n_iteration >= ANNOUNCE_NUM - 1) { - ipv4acd_set_state(acd, IPV4ACD_STATE_RUNNING, false); - break; - } - - _fallthrough_; - case IPV4ACD_STATE_WAITING_ANNOUNCE: - /* Send announcement packet */ - r = arp_send_announcement(acd->fd, acd->ifindex, &acd->address, &acd->mac_addr); - if (r < 0) { - log_ipv4acd_errno(acd, r, "Failed to send ARP announcement: %m"); - goto fail; - } - - log_ipv4acd(acd, "Announcing "IPV4_ADDRESS_FMT_STR, IPV4_ADDRESS_FMT_VAL(acd->address)); - - ipv4acd_set_state(acd, IPV4ACD_STATE_ANNOUNCING, false); - - r = ipv4acd_set_next_wakeup(acd, ANNOUNCE_INTERVAL_USEC, 0); - if (r < 0) - goto fail; - - if (acd->n_iteration == 0) { - acd->n_conflict = 0; - ipv4acd_client_notify(acd, SD_IPV4ACD_EVENT_BIND); - } - - break; - - default: - assert_not_reached(); - } - - return 0; - -fail: - sd_ipv4acd_stop(acd); - return 0; -} - -static bool ipv4acd_arp_conflict(sd_ipv4acd *acd, const struct ether_arp *arp, bool announced) { - assert(acd); - assert(arp); - - /* RFC 5227 section 2.1.1. - * "the host receives any ARP packet (Request *or* Reply) on the interface where the probe is - * being performed, where the packet's 'sender IP address' is the address being probed for, - * then the host MUST treat this address as being in use by some other host" */ - if (memcmp(arp->arp_spa, &acd->address, sizeof(struct in_addr)) == 0) - return true; - - if (announced) - /* the TPA matched instead of SPA, this is not a conflict */ - return false; - - /* "any ARP Probe where the packet's 'target IP address' is the address being probed for, and - * the packet's 'sender hardware address' is not the hardware address of any of the host's - * interfaces, then the host SHOULD similarly treat this as an address conflict" */ - if (arp->ea_hdr.ar_op != htobe16(ARPOP_REQUEST)) - return false; /* not ARP Request, ignoring. */ - if (memeqzero(arp->arp_spa, sizeof(struct in_addr)) == 0) - return false; /* not ARP Probe, ignoring. */ - if (memcmp(arp->arp_tpa, &acd->address, sizeof(struct in_addr)) != 0) - return false; /* target IP address does not match, BPF code is broken? */ - - if (acd->check_mac_callback && - acd->check_mac_callback(acd, (const struct ether_addr*) arp->arp_sha, acd->check_mac_userdata) > 0) - /* sender hardware is one of the host's interfaces, ignoring. */ - return true; - - return true; /* conflict! */ -} - -static void ipv4acd_on_conflict(sd_ipv4acd *acd) { - assert(acd); - - acd->n_conflict++; - - log_ipv4acd(acd, "Conflict on "IPV4_ADDRESS_FMT_STR" (%u)", IPV4_ADDRESS_FMT_VAL(acd->address), acd->n_conflict); - - ipv4acd_reset(acd); - ipv4acd_client_notify(acd, SD_IPV4ACD_EVENT_CONFLICT); -} - -static int ipv4acd_on_packet( - sd_event_source *s, - int fd, - uint32_t revents, - void *userdata) { - - sd_ipv4acd *acd = userdata; - struct ether_arp packet; - ssize_t n; - int r; - - assert(s); - assert(acd); - assert(fd >= 0); - - n = recv(fd, &packet, sizeof(struct ether_arp), 0); - if (n < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) - return 0; - - log_ipv4acd_errno(acd, errno, "Failed to read ARP packet: %m"); - goto fail; - } - if ((size_t) n != sizeof(struct ether_arp)) { - log_ipv4acd(acd, "Ignoring too short ARP packet."); - return 0; - } - - switch (acd->state) { - - case IPV4ACD_STATE_ANNOUNCING: - case IPV4ACD_STATE_RUNNING: - - if (ipv4acd_arp_conflict(acd, &packet, true)) { - usec_t ts; - - assert_se(sd_event_now(acd->event, clock_boottime_or_monotonic(), &ts) >= 0); - - /* Defend address */ - if (ts > acd->defend_window) { - acd->defend_window = ts + DEFEND_INTERVAL_USEC; - r = arp_send_announcement(acd->fd, acd->ifindex, &acd->address, &acd->mac_addr); - if (r < 0) { - log_ipv4acd_errno(acd, r, "Failed to send ARP announcement: %m"); - goto fail; - } - - log_ipv4acd(acd, "Defending "IPV4_ADDRESS_FMT_STR, IPV4_ADDRESS_FMT_VAL(acd->address)); - - } else - ipv4acd_on_conflict(acd); - } - break; - - case IPV4ACD_STATE_WAITING_PROBE: - case IPV4ACD_STATE_PROBING: - case IPV4ACD_STATE_WAITING_ANNOUNCE: - if (ipv4acd_arp_conflict(acd, &packet, false)) - ipv4acd_on_conflict(acd); - break; - - default: - assert_not_reached(); - } - - return 0; - -fail: - sd_ipv4acd_stop(acd); - return 0; -} - -int sd_ipv4acd_set_ifindex(sd_ipv4acd *acd, int ifindex) { - assert_return(acd, -EINVAL); - assert_return(ifindex > 0, -EINVAL); - assert_return(acd->state == IPV4ACD_STATE_INIT, -EBUSY); - - acd->ifindex = ifindex; - - return 0; -} - -int sd_ipv4acd_get_ifindex(sd_ipv4acd *acd) { - if (!acd) - return -EINVAL; - - return acd->ifindex; -} - -int sd_ipv4acd_set_ifname(sd_ipv4acd *acd, const char *ifname) { - assert_return(acd, -EINVAL); - assert_return(ifname, -EINVAL); - - if (!ifname_valid_full(ifname, IFNAME_VALID_ALTERNATIVE)) - return -EINVAL; - - return free_and_strdup(&acd->ifname, ifname); -} - -int sd_ipv4acd_get_ifname(sd_ipv4acd *acd, const char **ret) { - int r; - - assert_return(acd, -EINVAL); - - r = get_ifname(acd->ifindex, &acd->ifname); - if (r < 0) - return r; - - if (ret) - *ret = acd->ifname; - - return 0; -} - -int sd_ipv4acd_set_mac(sd_ipv4acd *acd, const struct ether_addr *addr) { - int r; - - assert_return(acd, -EINVAL); - assert_return(addr, -EINVAL); - assert_return(!ether_addr_is_null(addr), -EINVAL); - - acd->mac_addr = *addr; - - if (!sd_ipv4acd_is_running(acd)) - return 0; - - assert(acd->fd >= 0); - r = arp_update_filter(acd->fd, &acd->address, &acd->mac_addr); - if (r < 0) { - ipv4acd_reset(acd); - return r; - } - - return 0; -} - -int sd_ipv4acd_detach_event(sd_ipv4acd *acd) { - assert_return(acd, -EINVAL); - - acd->event = sd_event_unref(acd->event); - - return 0; -} - -int sd_ipv4acd_attach_event(sd_ipv4acd *acd, sd_event *event, int64_t priority) { - int r; - - assert_return(acd, -EINVAL); - assert_return(!acd->event, -EBUSY); - - if (event) - acd->event = sd_event_ref(event); - else { - r = sd_event_default(&acd->event); - if (r < 0) - return r; - } - - acd->event_priority = priority; - - return 0; -} - -int sd_ipv4acd_set_callback(sd_ipv4acd *acd, sd_ipv4acd_callback_t cb, void *userdata) { - assert_return(acd, -EINVAL); - - acd->callback = cb; - acd->userdata = userdata; - - return 0; -} - -int sd_ipv4acd_set_check_mac_callback(sd_ipv4acd *acd, sd_ipv4acd_check_mac_callback_t cb, void *userdata) { - assert_return(acd, -EINVAL); - - acd->check_mac_callback = cb; - acd->check_mac_userdata = userdata; - return 0; -} - -int sd_ipv4acd_set_address(sd_ipv4acd *acd, const struct in_addr *address) { - int r; - - assert_return(acd, -EINVAL); - assert_return(address, -EINVAL); - assert_return(in4_addr_is_set(address), -EINVAL); - - if (in4_addr_equal(&acd->address, address)) - return 0; - - acd->address = *address; - - if (!sd_ipv4acd_is_running(acd)) - return 0; - - assert(acd->fd >= 0); - r = arp_update_filter(acd->fd, &acd->address, &acd->mac_addr); - if (r < 0) - goto fail; - - r = ipv4acd_set_next_wakeup(acd, 0, 0); - if (r < 0) - goto fail; - - ipv4acd_set_state(acd, IPV4ACD_STATE_STARTED, true); - return 0; - -fail: - ipv4acd_reset(acd); - return r; -} - -int sd_ipv4acd_get_address(sd_ipv4acd *acd, struct in_addr *address) { - assert_return(acd, -EINVAL); - assert_return(address, -EINVAL); - - *address = acd->address; - - return 0; -} - -int sd_ipv4acd_is_running(sd_ipv4acd *acd) { - assert_return(acd, false); - - return acd->state != IPV4ACD_STATE_INIT; -} - -int sd_ipv4acd_start(sd_ipv4acd *acd, bool reset_conflicts) { - int r; - - assert_return(acd, -EINVAL); - assert_return(acd->event, -EINVAL); - assert_return(acd->ifindex > 0, -EINVAL); - assert_return(in4_addr_is_set(&acd->address), -EINVAL); - assert_return(!ether_addr_is_null(&acd->mac_addr), -EINVAL); - assert_return(acd->state == IPV4ACD_STATE_INIT, -EBUSY); - - r = arp_network_bind_raw_socket(acd->ifindex, &acd->address, &acd->mac_addr); - if (r < 0) - return r; - - CLOSE_AND_REPLACE(acd->fd, r); - - if (reset_conflicts) - acd->n_conflict = 0; - - r = sd_event_add_io(acd->event, &acd->receive_message_event_source, acd->fd, EPOLLIN, ipv4acd_on_packet, acd); - if (r < 0) - goto fail; - - r = sd_event_source_set_priority(acd->receive_message_event_source, acd->event_priority); - if (r < 0) - goto fail; - - (void) sd_event_source_set_description(acd->receive_message_event_source, "ipv4acd-receive-message"); - - r = ipv4acd_set_next_wakeup(acd, 0, 0); - if (r < 0) - goto fail; - - ipv4acd_set_state(acd, IPV4ACD_STATE_STARTED, true); - return 0; - -fail: - ipv4acd_reset(acd); - return r; -} diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c b/src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c deleted file mode 100644 index 4a500dfc..00000000 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-ipv4ll.c +++ /dev/null @@ -1,382 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/*** - Copyright © 2014 Axis Communications AB. All rights reserved. -***/ - -#include "nm-sd-adapt-core.h" - -#include -#include -#include -#include - -#include "sd-id128.h" -#include "sd-ipv4acd.h" -#include "sd-ipv4ll.h" - -#include "alloc-util.h" -#include "ether-addr-util.h" -#include "in-addr-util.h" -#include "network-common.h" -#include "random-util.h" -#include "siphash24.h" -#include "sparse-endian.h" -#include "string-util.h" -#include "util.h" - -#define IPV4LL_NETWORK UINT32_C(0xA9FE0000) -#define IPV4LL_NETMASK UINT32_C(0xFFFF0000) - -#define IPV4LL_DONT_DESTROY(ll) \ - _cleanup_(sd_ipv4ll_unrefp) _unused_ sd_ipv4ll *_dont_destroy_##ll = sd_ipv4ll_ref(ll) - -struct sd_ipv4ll { - unsigned n_ref; - - sd_ipv4acd *acd; - - be32_t address; /* the address pushed to ACD */ - struct ether_addr mac; - - struct { - le64_t value; - le64_t generation; - } seed; - bool seed_set; - - /* External */ - be32_t claimed_address; - - sd_ipv4ll_callback_t callback; - void *userdata; - - sd_ipv4ll_check_mac_callback_t check_mac_callback; - void *check_mac_userdata; -}; - -#define log_ipv4ll_errno(ll, error, fmt, ...) \ - log_interface_prefix_full_errno( \ - "IPv4LL: ", \ - sd_ipv4ll, ll, \ - error, fmt, ##__VA_ARGS__) -#define log_ipv4ll(ll, fmt, ...) \ - log_interface_prefix_full_errno_zerook( \ - "IPv4LL: ", \ - sd_ipv4ll, ll, \ - 0, fmt, ##__VA_ARGS__) - -static void ipv4ll_on_acd(sd_ipv4acd *acd, int event, void *userdata); -static int ipv4ll_check_mac(sd_ipv4acd *acd, const struct ether_addr *mac, void *userdata); - -static sd_ipv4ll *ipv4ll_free(sd_ipv4ll *ll) { - assert(ll); - - sd_ipv4acd_unref(ll->acd); - return mfree(ll); -} - -DEFINE_TRIVIAL_REF_UNREF_FUNC(sd_ipv4ll, sd_ipv4ll, ipv4ll_free); - -int sd_ipv4ll_new(sd_ipv4ll **ret) { - _cleanup_(sd_ipv4ll_unrefp) sd_ipv4ll *ll = NULL; - int r; - - assert_return(ret, -EINVAL); - - ll = new0(sd_ipv4ll, 1); - if (!ll) - return -ENOMEM; - - ll->n_ref = 1; - - r = sd_ipv4acd_new(&ll->acd); - if (r < 0) - return r; - - r = sd_ipv4acd_set_callback(ll->acd, ipv4ll_on_acd, ll); - if (r < 0) - return r; - - r = sd_ipv4acd_set_check_mac_callback(ll->acd, ipv4ll_check_mac, ll); - if (r < 0) - return r; - - *ret = TAKE_PTR(ll); - - return 0; -} - -int sd_ipv4ll_stop(sd_ipv4ll *ll) { - if (!ll) - return 0; - - return sd_ipv4acd_stop(ll->acd); -} - -int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int ifindex) { - assert_return(ll, -EINVAL); - assert_return(ifindex > 0, -EINVAL); - assert_return(sd_ipv4ll_is_running(ll) == 0, -EBUSY); - - return sd_ipv4acd_set_ifindex(ll->acd, ifindex); -} - -int sd_ipv4ll_get_ifindex(sd_ipv4ll *ll) { - if (!ll) - return -EINVAL; - - return sd_ipv4acd_get_ifindex(ll->acd); -} - -int sd_ipv4ll_set_ifname(sd_ipv4ll *ll, const char *ifname) { - assert_return(ll, -EINVAL); - assert_return(ifname, -EINVAL); - - return sd_ipv4acd_set_ifname(ll->acd, ifname); -} - -int sd_ipv4ll_get_ifname(sd_ipv4ll *ll, const char **ret) { - assert_return(ll, -EINVAL); - - return sd_ipv4acd_get_ifname(ll->acd, ret); -} - -int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr) { - int r; - - assert_return(ll, -EINVAL); - assert_return(addr, -EINVAL); - assert_return(!ether_addr_is_null(addr), -EINVAL); - - r = sd_ipv4acd_set_mac(ll->acd, addr); - if (r < 0) - return r; - - ll->mac = *addr; - return 0; -} - -int sd_ipv4ll_detach_event(sd_ipv4ll *ll) { - assert_return(ll, -EINVAL); - - return sd_ipv4acd_detach_event(ll->acd); -} - -int sd_ipv4ll_attach_event(sd_ipv4ll *ll, sd_event *event, int64_t priority) { - assert_return(ll, -EINVAL); - - return sd_ipv4acd_attach_event(ll->acd, event, priority); -} - -int sd_ipv4ll_set_callback(sd_ipv4ll *ll, sd_ipv4ll_callback_t cb, void *userdata) { - assert_return(ll, -EINVAL); - - ll->callback = cb; - ll->userdata = userdata; - - return 0; -} - -int sd_ipv4ll_set_check_mac_callback(sd_ipv4ll *ll, sd_ipv4ll_check_mac_callback_t cb, void *userdata) { - assert_return(ll, -EINVAL); - - ll->check_mac_callback = cb; - ll->check_mac_userdata = userdata; - - return 0; -} - -int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address) { - assert_return(ll, -EINVAL); - assert_return(address, -EINVAL); - - if (ll->claimed_address == 0) - return -ENOENT; - - address->s_addr = ll->claimed_address; - - return 0; -} - -int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint64_t seed) { - assert_return(ll, -EINVAL); - assert_return(sd_ipv4ll_is_running(ll) == 0, -EBUSY); - - ll->seed.value = htole64(seed); - ll->seed_set = true; - - return 0; -} - -int sd_ipv4ll_is_running(sd_ipv4ll *ll) { - assert_return(ll, false); - - return sd_ipv4acd_is_running(ll->acd); -} - -static bool ipv4ll_address_is_valid(const struct in_addr *address) { - assert(address); - - if (!in4_addr_is_link_local(address)) - return false; - - return !IN_SET(be32toh(address->s_addr) & 0x0000FF00U, 0x0000U, 0xFF00U); -} - -int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address) { - int r; - - assert_return(ll, -EINVAL); - assert_return(address, -EINVAL); - assert_return(ipv4ll_address_is_valid(address), -EINVAL); - - r = sd_ipv4acd_set_address(ll->acd, address); - if (r < 0) - return r; - - ll->address = address->s_addr; - - return 0; -} - -#define PICK_HASH_KEY SD_ID128_MAKE(15,ac,82,a6,d6,3f,49,78,98,77,5d,0c,69,02,94,0b) - -static int ipv4ll_pick_address(sd_ipv4ll *ll) { - _cleanup_free_ char *address = NULL; - be32_t addr; - - assert(ll); - - do { - uint64_t h; - - h = siphash24(&ll->seed, sizeof(ll->seed), PICK_HASH_KEY.bytes); - - /* Increase the generation counter by one */ - ll->seed.generation = htole64(le64toh(ll->seed.generation) + 1); - - addr = htobe32((h & UINT32_C(0x0000FFFF)) | IPV4LL_NETWORK); - } while (addr == ll->address || - IN_SET(be32toh(addr) & 0x0000FF00U, 0x0000U, 0xFF00U)); - - (void) in_addr_to_string(AF_INET, &(union in_addr_union) { .in.s_addr = addr }, &address); - log_ipv4ll(ll, "Picked new IP address %s.", strna(address)); - - return sd_ipv4ll_set_address(ll, &(struct in_addr) { addr }); -} - -#define MAC_HASH_KEY SD_ID128_MAKE(df,04,22,98,3f,ad,14,52,f9,87,2e,d1,9c,70,e2,f2) - -static int ipv4ll_start_internal(sd_ipv4ll *ll, bool reset_generation) { - int r; - bool picked_address = false; - - assert_return(ll, -EINVAL); - assert_return(!ether_addr_is_null(&ll->mac), -EINVAL); - - /* If no random seed is set, generate some from the MAC address */ - if (!ll->seed_set) - ll->seed.value = htole64(siphash24(ll->mac.ether_addr_octet, ETH_ALEN, MAC_HASH_KEY.bytes)); - - if (reset_generation) - ll->seed.generation = 0; - - if (ll->address == 0) { - r = ipv4ll_pick_address(ll); - if (r < 0) - return r; - - picked_address = true; - } - - r = sd_ipv4acd_start(ll->acd, reset_generation); - if (r < 0) { - - /* We couldn't start? If so, let's forget the picked address again, the user might make a change and - * retry, and we want the new data to take effect when picking an address. */ - if (picked_address) - ll->address = 0; - - return r; - } - - return 1; -} - -int sd_ipv4ll_start(sd_ipv4ll *ll) { - assert_return(ll, -EINVAL); - - if (sd_ipv4ll_is_running(ll)) - return 0; - - return ipv4ll_start_internal(ll, true); -} - -int sd_ipv4ll_restart(sd_ipv4ll *ll) { - ll->address = 0; - - return ipv4ll_start_internal(ll, false); -} - -static void ipv4ll_client_notify(sd_ipv4ll *ll, int event) { - assert(ll); - - if (ll->callback) - ll->callback(ll, event, ll->userdata); -} - -void ipv4ll_on_acd(sd_ipv4acd *acd, int event, void *userdata) { - sd_ipv4ll *ll = userdata; - IPV4LL_DONT_DESTROY(ll); - int r; - - assert(acd); - assert(ll); - - switch (event) { - - case SD_IPV4ACD_EVENT_STOP: - ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_STOP); - ll->claimed_address = 0; - break; - - case SD_IPV4ACD_EVENT_BIND: - ll->claimed_address = ll->address; - ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_BIND); - break; - - case SD_IPV4ACD_EVENT_CONFLICT: - /* if an address was already bound we must call up to the - user to handle this, otherwise we just try again */ - if (ll->claimed_address != 0) { - ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_CONFLICT); - - ll->claimed_address = 0; - } else { - r = sd_ipv4ll_restart(ll); - if (r < 0) - goto error; - } - - break; - - default: - assert_not_reached(); - } - - return; - -error: - ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_STOP); -} - -static int ipv4ll_check_mac(sd_ipv4acd *acd, const struct ether_addr *mac, void *userdata) { - sd_ipv4ll *ll = userdata; - - assert(ll); - - if (ll->check_mac_callback) - return ll->check_mac_callback(ll, mac, ll->check_mac_userdata); - - return 0; -} diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c b/src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c index 9da2b149..f50e9c8d 100644 --- a/src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c +++ b/src/libnm-systemd-core/src/libsystemd-network/sd-lldp-rx.c @@ -202,6 +202,9 @@ static int lldp_rx_receive_datagram(sd_event_source *s, int fd, uint32_t revents space = next_datagram_size_fd(fd); if (space < 0) { + if (ERRNO_IS_TRANSIENT(space) || ERRNO_IS_DISCONNECT(space)) + return 0; + log_lldp_rx_errno(lldp_rx, space, "Failed to determine datagram size to read, ignoring: %m"); return 0; } @@ -214,7 +217,7 @@ static int lldp_rx_receive_datagram(sd_event_source *s, int fd, uint32_t revents length = recv(fd, LLDP_NEIGHBOR_RAW(n), n->raw_size, MSG_DONTWAIT); if (length < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno) || ERRNO_IS_DISCONNECT(errno)) return 0; log_lldp_rx_errno(lldp_rx, errno, "Failed to read LLDP datagram, ignoring: %m"); @@ -251,7 +254,7 @@ int sd_lldp_rx_is_running(sd_lldp_rx *lldp_rx) { return lldp_rx->fd >= 0; } -_public_ int sd_lldp_rx_start(sd_lldp_rx *lldp_rx) { +int sd_lldp_rx_start(sd_lldp_rx *lldp_rx) { int r; assert_return(lldp_rx, -EINVAL); @@ -285,7 +288,7 @@ fail: return r; } -_public_ int sd_lldp_rx_stop(sd_lldp_rx *lldp_rx) { +int sd_lldp_rx_stop(sd_lldp_rx *lldp_rx) { if (!sd_lldp_rx_is_running(lldp_rx)) return 0; @@ -297,7 +300,7 @@ _public_ int sd_lldp_rx_stop(sd_lldp_rx *lldp_rx) { return 1; } -_public_ int sd_lldp_rx_attach_event(sd_lldp_rx *lldp_rx, sd_event *event, int64_t priority) { +int sd_lldp_rx_attach_event(sd_lldp_rx *lldp_rx, sd_event *event, int64_t priority) { int r; assert_return(lldp_rx, -EINVAL); @@ -317,7 +320,7 @@ _public_ int sd_lldp_rx_attach_event(sd_lldp_rx *lldp_rx, sd_event *event, int64 return 0; } -_public_ int sd_lldp_rx_detach_event(sd_lldp_rx *lldp_rx) { +int sd_lldp_rx_detach_event(sd_lldp_rx *lldp_rx) { assert_return(lldp_rx, -EINVAL); assert_return(!sd_lldp_rx_is_running(lldp_rx), -EBUSY); @@ -327,13 +330,13 @@ _public_ int sd_lldp_rx_detach_event(sd_lldp_rx *lldp_rx) { return 0; } -_public_ sd_event* sd_lldp_rx_get_event(sd_lldp_rx *lldp_rx) { +sd_event* sd_lldp_rx_get_event(sd_lldp_rx *lldp_rx) { assert_return(lldp_rx, NULL); return lldp_rx->event; } -_public_ int sd_lldp_rx_set_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_callback_t cb, void *userdata) { +int sd_lldp_rx_set_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_callback_t cb, void *userdata) { assert_return(lldp_rx, -EINVAL); lldp_rx->callback = cb; @@ -342,7 +345,7 @@ _public_ int sd_lldp_rx_set_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_callback_t return 0; } -_public_ int sd_lldp_rx_set_ifindex(sd_lldp_rx *lldp_rx, int ifindex) { +int sd_lldp_rx_set_ifindex(sd_lldp_rx *lldp_rx, int ifindex) { assert_return(lldp_rx, -EINVAL); assert_return(ifindex > 0, -EINVAL); assert_return(!sd_lldp_rx_is_running(lldp_rx), -EBUSY); @@ -394,7 +397,7 @@ static sd_lldp_rx *lldp_rx_free(sd_lldp_rx *lldp_rx) { DEFINE_PUBLIC_TRIVIAL_REF_UNREF_FUNC(sd_lldp_rx, sd_lldp_rx, lldp_rx_free); -_public_ int sd_lldp_rx_new(sd_lldp_rx **ret) { +int sd_lldp_rx_new(sd_lldp_rx **ret) { _cleanup_(sd_lldp_rx_unrefp) sd_lldp_rx *lldp_rx = NULL; assert_return(ret, -EINVAL); @@ -462,7 +465,7 @@ static inline int neighbor_compare_func(sd_lldp_neighbor * const *a, sd_lldp_nei return lldp_neighbor_id_compare_func(&(*a)->id, &(*b)->id); } -_public_ int sd_lldp_rx_get_neighbors(sd_lldp_rx *lldp_rx, sd_lldp_neighbor ***ret) { +int sd_lldp_rx_get_neighbors(sd_lldp_rx *lldp_rx, sd_lldp_neighbor ***ret) { _cleanup_free_ sd_lldp_neighbor **l = NULL; sd_lldp_neighbor *n; int k = 0; @@ -491,7 +494,7 @@ _public_ int sd_lldp_rx_get_neighbors(sd_lldp_rx *lldp_rx, sd_lldp_neighbor ***r return k; } -_public_ int sd_lldp_rx_set_neighbors_max(sd_lldp_rx *lldp_rx, uint64_t m) { +int sd_lldp_rx_set_neighbors_max(sd_lldp_rx *lldp_rx, uint64_t m) { assert_return(lldp_rx, -EINVAL); assert_return(m > 0, -EINVAL); @@ -501,7 +504,7 @@ _public_ int sd_lldp_rx_set_neighbors_max(sd_lldp_rx *lldp_rx, uint64_t m) { return 0; } -_public_ int sd_lldp_rx_match_capabilities(sd_lldp_rx *lldp_rx, uint16_t mask) { +int sd_lldp_rx_match_capabilities(sd_lldp_rx *lldp_rx, uint16_t mask) { assert_return(lldp_rx, -EINVAL); assert_return(mask != 0, -EINVAL); @@ -510,7 +513,7 @@ _public_ int sd_lldp_rx_match_capabilities(sd_lldp_rx *lldp_rx, uint16_t mask) { return 0; } -_public_ int sd_lldp_rx_set_filter_address(sd_lldp_rx *lldp_rx, const struct ether_addr *addr) { +int sd_lldp_rx_set_filter_address(sd_lldp_rx *lldp_rx, const struct ether_addr *addr) { assert_return(lldp_rx, -EINVAL); /* In order to deal nicely with bridges that send back our own packets, allow one address to be filtered, so diff --git a/src/libnm-systemd-core/src/libsystemd/sd-event/event-source.h b/src/libnm-systemd-core/src/libsystemd/sd-event/event-source.h index 08b409fe..74cbc269 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-event/event-source.h +++ b/src/libnm-systemd-core/src/libsystemd/sd-event/event-source.h @@ -71,6 +71,7 @@ struct sd_event_source { uint64_t prepare_iteration; sd_event_destroy_t destroy_callback; + sd_event_handler_t ratelimit_expire_callback; LIST_FIELDS(sd_event_source, sources); @@ -214,6 +215,11 @@ struct inotify_data { * the events locally if they can't be coalesced). */ unsigned n_pending; + /* If this counter is non-zero, don't GC the inotify data object even if not used to watch any inode + * anymore. This is useful to pin the object for a bit longer, after the last event source needing it + * is gone. */ + unsigned n_busy; + /* A linked list of all inotify objects with data already read, that still need processing. We keep this list * to make it efficient to figure out what inotify objects to process data on next. */ LIST_FIELDS(struct inotify_data, buffered); diff --git a/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.c b/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.c index 7cc55be1..13e16f9b 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.c +++ b/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.c @@ -86,6 +86,30 @@ int event_reset_time( return created; } +int event_reset_time_relative( + sd_event *e, + sd_event_source **s, + clockid_t clock, + uint64_t usec, + uint64_t accuracy, + sd_event_time_handler_t callback, + void *userdata, + int64_t priority, + const char *description, + bool force_reset) { + + usec_t usec_now; + int r; + + assert(e); + + r = sd_event_now(e, clock, &usec_now); + if (r < 0) + return log_debug_errno(r, "sd-event: Failed to get the current time: %m"); + + return event_reset_time(e, s, clock, usec_add(usec_now, usec), accuracy, callback, userdata, priority, description, force_reset); +} + int event_source_disable(sd_event_source *s) { if (!s) return 0; diff --git a/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.h b/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.h index c8f97bc8..64a41992 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.h +++ b/src/libnm-systemd-core/src/libsystemd/sd-event/event-util.h @@ -5,9 +5,27 @@ #include "sd-event.h" -int event_reset_time(sd_event *e, sd_event_source **s, - clockid_t clock, uint64_t usec, uint64_t accuracy, - sd_event_time_handler_t callback, void *userdata, - int64_t priority, const char *description, bool force_reset); +int event_reset_time( + sd_event *e, + sd_event_source **s, + clockid_t clock, + uint64_t usec, + uint64_t accuracy, + sd_event_time_handler_t callback, + void *userdata, + int64_t priority, + const char *description, + bool force_reset); +int event_reset_time_relative( + sd_event *e, + sd_event_source **s, + clockid_t clock, + uint64_t usec, + uint64_t accuracy, + sd_event_time_handler_t callback, + void *userdata, + int64_t priority, + const char *description, + bool force_reset); int event_source_disable(sd_event_source *s); int event_source_is_enabled(sd_event_source *s); diff --git a/src/libnm-systemd-core/src/libsystemd/sd-event/sd-event.c b/src/libnm-systemd-core/src/libsystemd/sd-event/sd-event.c index 0acbdd54..e87d900c 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-event/sd-event.c +++ b/src/libnm-systemd-core/src/libsystemd/sd-event/sd-event.c @@ -1824,6 +1824,29 @@ static void event_free_inode_data( free(d); } +static void event_gc_inotify_data( + sd_event *e, + struct inotify_data *d) { + + assert(e); + + /* GCs the inotify data object if we don't need it anymore. That's the case if we don't want to watch + * any inode with it anymore, which in turn happens if no event source of this priority is interested + * in any inode any longer. That said, we maintain an extra busy counter: if non-zero we'll delay GC + * (under the expectation that the GC is called again once the counter is decremented). */ + + if (!d) + return; + + if (!hashmap_isempty(d->inodes)) + return; + + if (d->n_busy > 0) + return; + + event_free_inotify_data(e, d); +} + static void event_gc_inode_data( sd_event *e, struct inode_data *d) { @@ -1841,8 +1864,7 @@ static void event_gc_inode_data( inotify_data = d->inotify_data; event_free_inode_data(e, d); - if (inotify_data && hashmap_isempty(inotify_data->inodes)) - event_free_inotify_data(e, inotify_data); + event_gc_inotify_data(e, inotify_data); } static int event_make_inode_data( @@ -1971,24 +1993,25 @@ static int inotify_exit_callback(sd_event_source *s, const struct inotify_event return sd_event_exit(sd_event_source_get_event(s), PTR_TO_INT(userdata)); } -_public_ int sd_event_add_inotify( +static int event_add_inotify_fd_internal( sd_event *e, sd_event_source **ret, - const char *path, + int fd, + bool donate, uint32_t mask, sd_event_inotify_handler_t callback, void *userdata) { + _cleanup_close_ int donated_fd = donate ? fd : -1; + _cleanup_(source_freep) sd_event_source *s = NULL; struct inotify_data *inotify_data = NULL; struct inode_data *inode_data = NULL; - _cleanup_close_ int fd = -1; - _cleanup_(source_freep) sd_event_source *s = NULL; struct stat st; int r; assert_return(e, -EINVAL); assert_return(e = event_resolve(e), -ENOPKG); - assert_return(path, -EINVAL); + assert_return(fd >= 0, -EBADF); assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); assert_return(!event_pid_changed(e), -ECHILD); @@ -2001,12 +2024,6 @@ _public_ int sd_event_add_inotify( if (mask & IN_MASK_ADD) return -EINVAL; - fd = open(path, O_PATH|O_CLOEXEC| - (mask & IN_ONLYDIR ? O_DIRECTORY : 0)| - (mask & IN_DONT_FOLLOW ? O_NOFOLLOW : 0)); - if (fd < 0) - return -errno; - if (fstat(fd, &st) < 0) return -errno; @@ -2026,14 +2043,24 @@ _public_ int sd_event_add_inotify( r = event_make_inode_data(e, inotify_data, st.st_dev, st.st_ino, &inode_data); if (r < 0) { - event_free_inotify_data(e, inotify_data); + event_gc_inotify_data(e, inotify_data); return r; } /* Keep the O_PATH fd around until the first iteration of the loop, so that we can still change the priority of * the event source, until then, for which we need the original inode. */ if (inode_data->fd < 0) { - inode_data->fd = TAKE_FD(fd); + if (donated_fd >= 0) + inode_data->fd = TAKE_FD(donated_fd); + else { + inode_data->fd = fcntl(fd, F_DUPFD_CLOEXEC, 3); + if (inode_data->fd < 0) { + r = -errno; + event_gc_inode_data(e, inode_data); + return r; + } + } + LIST_PREPEND(to_close, e->inode_data_to_close, inode_data); } @@ -2046,8 +2073,6 @@ _public_ int sd_event_add_inotify( if (r < 0) return r; - (void) sd_event_source_set_description(s, path); - if (ret) *ret = s; TAKE_PTR(s); @@ -2055,6 +2080,48 @@ _public_ int sd_event_add_inotify( return 0; } +_public_ int sd_event_add_inotify_fd( + sd_event *e, + sd_event_source **ret, + int fd, + uint32_t mask, + sd_event_inotify_handler_t callback, + void *userdata) { + + return event_add_inotify_fd_internal(e, ret, fd, /* donate= */ false, mask, callback, userdata); +} + +_public_ int sd_event_add_inotify( + sd_event *e, + sd_event_source **ret, + const char *path, + uint32_t mask, + sd_event_inotify_handler_t callback, + void *userdata) { + + sd_event_source *s = NULL; /* avoid false maybe-uninitialized warning */ + int fd, r; + + assert_return(path, -EINVAL); + + fd = open(path, O_PATH|O_CLOEXEC| + (mask & IN_ONLYDIR ? O_DIRECTORY : 0)| + (mask & IN_DONT_FOLLOW ? O_NOFOLLOW : 0)); + if (fd < 0) + return -errno; + + r = event_add_inotify_fd_internal(e, &s, fd, /* donate= */ true, mask, callback, userdata); + if (r < 0) + return r; + + (void) sd_event_source_set_description(s, path); + + if (ret) + *ret = s; + + return r; +} + static sd_event_source* event_source_free(sd_event_source *s) { if (!s) return NULL; @@ -2845,7 +2912,7 @@ fail: return r; } -static int event_source_leave_ratelimit(sd_event_source *s) { +static int event_source_leave_ratelimit(sd_event_source *s, bool run_callback) { int r; assert(s); @@ -2877,6 +2944,30 @@ static int event_source_leave_ratelimit(sd_event_source *s) { ratelimit_reset(&s->rate_limit); log_debug("Event source %p (%s) left rate limit state.", s, strna(s->description)); + + if (run_callback && s->ratelimit_expire_callback) { + s->dispatching = true; + r = s->ratelimit_expire_callback(s, s->userdata); + s->dispatching = false; + + if (r < 0) { + log_debug_errno(r, "Ratelimit expiry callback of event source %s (type %s) returned error, %s: %m", + strna(s->description), + event_source_type_to_string(s->type), + s->exit_on_failure ? "exiting" : "disabling"); + + if (s->exit_on_failure) + (void) sd_event_exit(s->event, r); + } + + if (s->n_ref == 0) + source_free(s); + else if (r < 0) + assert_se(sd_event_source_set_enabled(s, SD_EVENT_OFF) >= 0); + + return 1; + } + return 0; fail: @@ -3055,7 +3146,7 @@ static int flush_timer(sd_event *e, int fd, uint32_t events, usec_t *next) { ss = read(fd, &x, sizeof(x)); if (ss < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; @@ -3076,6 +3167,7 @@ static int process_timer( struct clock_data *d) { sd_event_source *s; + bool callback_invoked = false; int r; assert(e); @@ -3093,9 +3185,11 @@ static int process_timer( * again. */ assert(s->ratelimited); - r = event_source_leave_ratelimit(s); + r = event_source_leave_ratelimit(s, /* run_callback */ true); if (r < 0) return r; + else if (r == 1) + callback_invoked = true; continue; } @@ -3110,7 +3204,7 @@ static int process_timer( event_source_time_prioq_reshuffle(s); } - return 0; + return callback_invoked; } static int process_child(sd_event *e, int64_t threshold, int64_t *ret_min_priority) { @@ -3258,7 +3352,7 @@ static int process_signal(sd_event *e, struct signal_data *d, uint32_t events, i n = read(d->fd, &si, sizeof(si)); if (n < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; @@ -3312,7 +3406,7 @@ static int event_inotify_data_read(sd_event *e, struct inotify_data *d, uint32_t n = read(d->fd, &d->buffer, sizeof(d->buffer)); if (n < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; @@ -3560,13 +3654,23 @@ static int source_dispatch(sd_event_source *s) { sz = offsetof(struct inotify_event, name) + d->buffer.ev.len; assert(d->buffer_filled >= sz); + /* If the inotify callback destroys the event source then this likely means we don't need to + * watch the inode anymore, and thus also won't need the inotify object anymore. But if we'd + * free it immediately, then we couldn't drop the event from the inotify event queue without + * memory corruption anymore, as below. Hence, let's not free it immediately, but mark it + * "busy" with a counter (which will ensure it's not GC'ed away prematurely). Let's then + * explicitly GC it after we are done dropping the inotify event from the buffer. */ + d->n_busy++; r = s->inotify.callback(s, &d->buffer.ev, s->userdata); + d->n_busy--; - /* When no event is pending anymore on this inotify object, then let's drop the event from the - * buffer. */ + /* When no event is pending anymore on this inotify object, then let's drop the event from + * the inotify event queue buffer. */ if (d->n_pending == 0) event_inotify_data_drop(e, d, sz); + /* Now we don't want to access 'd' anymore, it's OK to GC now. */ + event_gc_inotify_data(e, d); break; } @@ -3591,7 +3695,7 @@ static int source_dispatch(sd_event_source *s) { if (s->n_ref == 0) source_free(s); else if (r < 0) - sd_event_source_set_enabled(s, SD_EVENT_OFF); + assert_se(sd_event_source_set_enabled(s, SD_EVENT_OFF) >= 0); return 1; } @@ -3632,7 +3736,7 @@ static int event_prepare(sd_event *e) { if (s->n_ref == 0) source_free(s); else if (r < 0) - sd_event_source_set_enabled(s, SD_EVENT_OFF); + assert_se(sd_event_source_set_enabled(s, SD_EVENT_OFF) >= 0); } return 0; @@ -3693,10 +3797,7 @@ static int arm_watchdog(sd_event *e) { if (its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0) its.it_value.tv_nsec = 1; - if (timerfd_settime(e->watchdog_fd, TFD_TIMER_ABSTIME, &its, NULL) < 0) - return -errno; - - return 0; + return RET_NERRNO(timerfd_settime(e->watchdog_fd, TFD_TIMER_ABSTIME, &its, NULL)); } static int process_watchdog(sd_event *e) { @@ -3806,7 +3907,7 @@ static int epoll_wait_usec( int maxevents, usec_t timeout) { - int r, msec; + int msec; #if 0 static bool epoll_pwait2_absent = false; @@ -3846,14 +3947,7 @@ static int epoll_wait_usec( msec = (int) k; } - r = epoll_wait(fd, - events, - maxevents, - msec); - if (r < 0) - return -errno; - - return r; + return RET_NERRNO(epoll_wait(fd, events, maxevents, msec)); } static int process_epoll(sd_event *e, usec_t timeout, int64_t threshold, int64_t *ret_min_priority) { @@ -4024,15 +4118,15 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { if (r < 0) goto finish; - r = process_timer(e, e->timestamp.realtime, &e->realtime); + r = process_inotify(e); if (r < 0) goto finish; - r = process_timer(e, e->timestamp.boottime, &e->boottime); + r = process_timer(e, e->timestamp.realtime, &e->realtime); if (r < 0) goto finish; - r = process_timer(e, e->timestamp.monotonic, &e->monotonic); + r = process_timer(e, e->timestamp.boottime, &e->boottime); if (r < 0) goto finish; @@ -4044,9 +4138,20 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { if (r < 0) goto finish; - r = process_inotify(e); + r = process_timer(e, e->timestamp.monotonic, &e->monotonic); if (r < 0) goto finish; + else if (r == 1) { + /* Ratelimit expiry callback was called. Let's postpone processing pending sources and + * put loop in the initial state in order to evaluate (in the next iteration) also sources + * there were potentially re-enabled by the callback. + * + * Wondering why we treat only this invocation of process_timer() differently? Once event + * source is ratelimited we essentially transform it into CLOCK_MONOTONIC timer hence + * ratelimit expiry callback is never called for any other timer type. */ + r = 0; + goto finish; + } if (event_next_pending(e)) { e->state = SD_EVENT_PENDING; @@ -4117,7 +4222,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) { this_run = now(CLOCK_MONOTONIC); - l = u64log2(this_run - e->last_run_usec); + l = log2u64(this_run - e->last_run_usec); assert(l < ELEMENTSOF(e->delays)); e->delays[l]++; @@ -4416,7 +4521,7 @@ _public_ int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval /* When ratelimiting is configured we'll always reset the rate limit state first and start fresh, * non-ratelimited. */ - r = event_source_leave_ratelimit(s); + r = event_source_leave_ratelimit(s, /* run_callback */ false); if (r < 0) return r; @@ -4424,6 +4529,13 @@ _public_ int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval return 0; } +_public_ int sd_event_source_set_ratelimit_expire_callback(sd_event_source *s, sd_event_handler_t callback) { + assert_return(s, -EINVAL); + + s->ratelimit_expire_callback = callback; + return 0; +} + _public_ int sd_event_source_get_ratelimit(sd_event_source *s, uint64_t *ret_interval, unsigned *ret_burst) { assert_return(s, -EINVAL); diff --git a/src/libnm-systemd-core/src/libsystemd/sd-id128/id128-util.c b/src/libnm-systemd-core/src/libsystemd/sd-id128/id128-util.c index d80145a8..9ec2abc8 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-id128/id128-util.c +++ b/src/libnm-systemd-core/src/libsystemd/sd-id128/id128-util.c @@ -224,7 +224,7 @@ int id128_get_product(sd_id128_t *ret) { r = id128_read("/sys/class/dmi/id/product_uuid", ID128_UUID, &uuid); if (r == -ENOENT) - r = id128_read("/sys/firmware/devicetree/base/vm,uuid", ID128_UUID, &uuid); + r = id128_read("/proc/device-tree/vm,uuid", ID128_UUID, &uuid); if (r < 0) return r; diff --git a/src/libnm-systemd-core/src/libsystemd/sd-id128/sd-id128.c b/src/libnm-systemd-core/src/libsystemd/sd-id128/sd-id128.c index 0860f493..c3ed3bbb 100644 --- a/src/libnm-systemd-core/src/libsystemd/sd-id128/sd-id128.c +++ b/src/libnm-systemd-core/src/libsystemd/sd-id128/sd-id128.c @@ -6,21 +6,14 @@ #include #include -#if HAVE_OPENSSL -#include -#include -#endif - #include "sd-id128.h" #include "alloc-util.h" #include "fd-util.h" #include "hexdecoct.h" +#include "hmac.h" #include "id128-util.h" #include "io-util.h" -#if !HAVE_OPENSSL -#include "khash.h" -#endif #include "macro.h" #include "missing_syscall.h" #include "random-util.h" @@ -283,43 +276,15 @@ _public_ int sd_id128_randomize(sd_id128_t *ret) { } static int get_app_specific(sd_id128_t base, sd_id128_t app_id, sd_id128_t *ret) { + uint8_t hmac[SHA256_DIGEST_SIZE]; sd_id128_t result; assert(ret); -#if HAVE_OPENSSL - /* We prefer doing this in-process, since we this means we are not dependent on kernel configuration, - * and this also works in locked down container environments. But some distros don't like OpenSSL's - * license and its (in-) compatibility with GPL2, hence also support khash */ - uint8_t md[256/8]; - if (!HMAC(EVP_sha256(), - &base, sizeof(base), - (const unsigned char*) &app_id, sizeof(app_id), - md, NULL)) - return -ENOTRECOVERABLE; + hmac_sha256(&base, sizeof(base), &app_id, sizeof(app_id), hmac); /* Take only the first half. */ - memcpy(&result, md, MIN(sizeof(md), sizeof(result))); -#else - _cleanup_(khash_unrefp) khash *h = NULL; - const void *p; - int r; - - r = khash_new_with_key(&h, "hmac(sha256)", &base, sizeof(base)); - if (r < 0) - return r; - - r = khash_put(h, &app_id, sizeof(app_id)); - if (r < 0) - return r; - - r = khash_digest_data(h, &p); - if (r < 0) - return r; - - /* We chop off the trailing 16 bytes */ - memcpy(&result, p, MIN(khash_get_size(h), sizeof(result))); -#endif + memcpy(&result, hmac, MIN(sizeof(hmac), sizeof(result))); *ret = id128_make_v4_uuid(result); return 0; diff --git a/src/libnm-systemd-core/src/systemd/sd-dhcp-client.h b/src/libnm-systemd-core/src/systemd/sd-dhcp-client.h index 23979b12..4af4b45f 100644 --- a/src/libnm-systemd-core/src/systemd/sd-dhcp-client.h +++ b/src/libnm-systemd-core/src/systemd/sd-dhcp-client.h @@ -45,65 +45,66 @@ enum { }; enum { - SD_DHCP_OPTION_PAD = 0, - SD_DHCP_OPTION_SUBNET_MASK = 1, - SD_DHCP_OPTION_TIME_OFFSET = 2, - SD_DHCP_OPTION_ROUTER = 3, - SD_DHCP_OPTION_DOMAIN_NAME_SERVER = 6, - SD_DHCP_OPTION_LPR_SERVER = 9, - SD_DHCP_OPTION_HOST_NAME = 12, - SD_DHCP_OPTION_BOOT_FILE_SIZE = 13, - SD_DHCP_OPTION_DOMAIN_NAME = 15, - SD_DHCP_OPTION_ROOT_PATH = 17, - SD_DHCP_OPTION_ENABLE_IP_FORWARDING = 19, - SD_DHCP_OPTION_ENABLE_IP_FORWARDING_NL = 20, - SD_DHCP_OPTION_POLICY_FILTER = 21, - SD_DHCP_OPTION_INTERFACE_MDR = 22, - SD_DHCP_OPTION_INTERFACE_TTL = 23, - SD_DHCP_OPTION_INTERFACE_MTU_AGING_TIMEOUT = 24, - SD_DHCP_OPTION_INTERFACE_MTU = 26, - SD_DHCP_OPTION_BROADCAST = 28, - /* Windows 10 option to send when Anonymize=true */ - SD_DHCP_OPTION_ROUTER_DISCOVER = 31, - SD_DHCP_OPTION_STATIC_ROUTE = 33, - SD_DHCP_OPTION_NTP_SERVER = 42, - SD_DHCP_OPTION_VENDOR_SPECIFIC = 43, - /* Windows 10 option to send when Anonymize=true */ - SD_DHCP_OPTION_NETBIOS_NAMESERVER = 44, - /* Windows 10 option to send when Anonymize=true */ - SD_DHCP_OPTION_NETBIOS_NODETYPE = 46, - /* Windows 10 option to send when Anonymize=true */ - SD_DHCP_OPTION_NETBIOS_SCOPE = 47, - SD_DHCP_OPTION_REQUESTED_IP_ADDRESS = 50, - SD_DHCP_OPTION_IP_ADDRESS_LEASE_TIME = 51, - SD_DHCP_OPTION_OVERLOAD = 52, - SD_DHCP_OPTION_MESSAGE_TYPE = 53, - SD_DHCP_OPTION_SERVER_IDENTIFIER = 54, - SD_DHCP_OPTION_PARAMETER_REQUEST_LIST = 55, - SD_DHCP_OPTION_ERROR_MESSAGE = 56, - SD_DHCP_OPTION_MAXIMUM_MESSAGE_SIZE = 57, - SD_DHCP_OPTION_RENEWAL_T1_TIME = 58, - SD_DHCP_OPTION_REBINDING_T2_TIME = 59, - SD_DHCP_OPTION_VENDOR_CLASS_IDENTIFIER = 60, - SD_DHCP_OPTION_CLIENT_IDENTIFIER = 61, - SD_DHCP_OPTION_SMTP_SERVER = 69, - SD_DHCP_OPTION_POP3_SERVER = 70, - SD_DHCP_OPTION_USER_CLASS = 77, - SD_DHCP_OPTION_FQDN = 81, - SD_DHCP_OPTION_RELAY_AGENT_INFORMATION = 82, - SD_DHCP_OPTION_NEW_POSIX_TIMEZONE = 100, - SD_DHCP_OPTION_NEW_TZDB_TIMEZONE = 101, - SD_DHCP_OPTION_DOMAIN_SEARCH_LIST = 119, - SD_DHCP_OPTION_SIP_SERVER = 120, - SD_DHCP_OPTION_CLASSLESS_STATIC_ROUTE = 121, - SD_DHCP_OPTION_MUD_URL = 161, - SD_DHCP_OPTION_PRIVATE_BASE = 224, - /* Windows 10 option to send when Anonymize=true */ + SD_DHCP_OPTION_PAD = 0, + SD_DHCP_OPTION_SUBNET_MASK = 1, + SD_DHCP_OPTION_TIME_OFFSET = 2, + SD_DHCP_OPTION_ROUTER = 3, + SD_DHCP_OPTION_DOMAIN_NAME_SERVER = 6, + SD_DHCP_OPTION_LPR_SERVER = 9, + SD_DHCP_OPTION_HOST_NAME = 12, + SD_DHCP_OPTION_BOOT_FILE_SIZE = 13, + SD_DHCP_OPTION_DOMAIN_NAME = 15, + SD_DHCP_OPTION_ROOT_PATH = 17, + SD_DHCP_OPTION_ENABLE_IP_FORWARDING = 19, + SD_DHCP_OPTION_ENABLE_IP_FORWARDING_NL = 20, + SD_DHCP_OPTION_POLICY_FILTER = 21, + SD_DHCP_OPTION_INTERFACE_MDR = 22, + SD_DHCP_OPTION_INTERFACE_TTL = 23, + SD_DHCP_OPTION_INTERFACE_MTU_AGING_TIMEOUT = 24, + SD_DHCP_OPTION_INTERFACE_MTU = 26, + SD_DHCP_OPTION_BROADCAST = 28, + /* Windows 10 option to send when Anonymize=true */ + SD_DHCP_OPTION_ROUTER_DISCOVER = 31, + SD_DHCP_OPTION_STATIC_ROUTE = 33, + SD_DHCP_OPTION_NTP_SERVER = 42, + SD_DHCP_OPTION_VENDOR_SPECIFIC = 43, + /* Windows 10 option to send when Anonymize=true */ + SD_DHCP_OPTION_NETBIOS_NAMESERVER = 44, + /* Windows 10 option to send when Anonymize=true */ + SD_DHCP_OPTION_NETBIOS_NODETYPE = 46, + /* Windows 10 option to send when Anonymize=true */ + SD_DHCP_OPTION_NETBIOS_SCOPE = 47, + SD_DHCP_OPTION_REQUESTED_IP_ADDRESS = 50, + SD_DHCP_OPTION_IP_ADDRESS_LEASE_TIME = 51, + SD_DHCP_OPTION_OVERLOAD = 52, + SD_DHCP_OPTION_MESSAGE_TYPE = 53, + SD_DHCP_OPTION_SERVER_IDENTIFIER = 54, + SD_DHCP_OPTION_PARAMETER_REQUEST_LIST = 55, + SD_DHCP_OPTION_ERROR_MESSAGE = 56, + SD_DHCP_OPTION_MAXIMUM_MESSAGE_SIZE = 57, + SD_DHCP_OPTION_RENEWAL_T1_TIME = 58, + SD_DHCP_OPTION_REBINDING_T2_TIME = 59, + SD_DHCP_OPTION_VENDOR_CLASS_IDENTIFIER = 60, + SD_DHCP_OPTION_CLIENT_IDENTIFIER = 61, + SD_DHCP_OPTION_SMTP_SERVER = 69, + SD_DHCP_OPTION_POP3_SERVER = 70, + SD_DHCP_OPTION_USER_CLASS = 77, + SD_DHCP_OPTION_FQDN = 81, + SD_DHCP_OPTION_RELAY_AGENT_INFORMATION = 82, + SD_DHCP_OPTION_NEW_POSIX_TIMEZONE = 100, + SD_DHCP_OPTION_NEW_TZDB_TIMEZONE = 101, + SD_DHCP_OPTION_DOMAIN_SEARCH_LIST = 119, + SD_DHCP_OPTION_SIP_SERVER = 120, + SD_DHCP_OPTION_CLASSLESS_STATIC_ROUTE = 121, + SD_DHCP_OPTION_MUD_URL = 161, + SD_DHCP_OPTION_6RD = 212, + SD_DHCP_OPTION_PRIVATE_BASE = 224, + /* Windows 10 option to send when Anonymize=true */ SD_DHCP_OPTION_PRIVATE_CLASSLESS_STATIC_ROUTE = 249, - /* Windows 10 option to send when Anonymize=true */ - SD_DHCP_OPTION_PRIVATE_PROXY_AUTODISCOVERY = 252, - SD_DHCP_OPTION_PRIVATE_LAST = 254, - SD_DHCP_OPTION_END = 255, + /* Windows 10 option to send when Anonymize=true */ + SD_DHCP_OPTION_PRIVATE_PROXY_AUTODISCOVERY = 252, + SD_DHCP_OPTION_PRIVATE_LAST = 254, + SD_DHCP_OPTION_END = 255, }; /* Suboptions for SD_DHCP_OPTION_RELAY_AGENT_INFORMATION option */ diff --git a/src/libnm-systemd-core/src/systemd/sd-dhcp-lease.h b/src/libnm-systemd-core/src/systemd/sd-dhcp-lease.h index 5abf9a40..478bbfd7 100644 --- a/src/libnm-systemd-core/src/systemd/sd-dhcp-lease.h +++ b/src/libnm-systemd-core/src/systemd/sd-dhcp-lease.h @@ -71,6 +71,13 @@ int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, sd_dhcp_route ***routes); int sd_dhcp_lease_get_vendor_specific(sd_dhcp_lease *lease, const void **data, size_t *data_len); int sd_dhcp_lease_get_client_id(sd_dhcp_lease *lease, const void **client_id, size_t *client_id_len); int sd_dhcp_lease_get_timezone(sd_dhcp_lease *lease, const char **timezone); +int sd_dhcp_lease_get_6rd( + sd_dhcp_lease *lease, + uint8_t *ret_ipv4masklen, + uint8_t *ret_prefixlen, + struct in6_addr *ret_prefix, + const struct in_addr **ret_br_addresses, + size_t *ret_n_br_addresses); int sd_dhcp_route_get_destination(sd_dhcp_route *route, struct in_addr *destination); int sd_dhcp_route_get_destination_prefix_length(sd_dhcp_route *route, uint8_t *length); diff --git a/src/libnm-systemd-core/src/systemd/sd-dhcp6-client.h b/src/libnm-systemd-core/src/systemd/sd-dhcp6-client.h index f3889782..0e23c84e 100644 --- a/src/libnm-systemd-core/src/systemd/sd-dhcp6-client.h +++ b/src/libnm-systemd-core/src/systemd/sd-dhcp6-client.h @@ -39,44 +39,151 @@ enum { SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST = 13, }; +/* https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2 */ enum { - SD_DHCP6_OPTION_CLIENTID = 1, - SD_DHCP6_OPTION_SERVERID = 2, - SD_DHCP6_OPTION_IA_NA = 3, - SD_DHCP6_OPTION_IA_TA = 4, - SD_DHCP6_OPTION_IAADDR = 5, - SD_DHCP6_OPTION_ORO = 6, - SD_DHCP6_OPTION_PREFERENCE = 7, - SD_DHCP6_OPTION_ELAPSED_TIME = 8, - SD_DHCP6_OPTION_RELAY_MSG = 9, + SD_DHCP6_OPTION_CLIENTID = 1, /* RFC 8415 */ + SD_DHCP6_OPTION_SERVERID = 2, /* RFC 8415 */ + SD_DHCP6_OPTION_IA_NA = 3, /* RFC 8415 */ + SD_DHCP6_OPTION_IA_TA = 4, /* RFC 8415 */ + SD_DHCP6_OPTION_IAADDR = 5, /* RFC 8415 */ + SD_DHCP6_OPTION_ORO = 6, /* RFC 8415 */ + SD_DHCP6_OPTION_PREFERENCE = 7, /* RFC 8415 */ + SD_DHCP6_OPTION_ELAPSED_TIME = 8, /* RFC 8415 */ + SD_DHCP6_OPTION_RELAY_MSG = 9, /* RFC 8415 */ /* option code 10 is unassigned */ - SD_DHCP6_OPTION_AUTH = 11, - SD_DHCP6_OPTION_UNICAST = 12, - SD_DHCP6_OPTION_STATUS_CODE = 13, - SD_DHCP6_OPTION_RAPID_COMMIT = 14, - SD_DHCP6_OPTION_USER_CLASS = 15, - SD_DHCP6_OPTION_VENDOR_CLASS = 16, - SD_DHCP6_OPTION_VENDOR_OPTS = 17, - SD_DHCP6_OPTION_INTERFACE_ID = 18, - SD_DHCP6_OPTION_RECONF_MSG = 19, - SD_DHCP6_OPTION_RECONF_ACCEPT = 20, - + SD_DHCP6_OPTION_AUTH = 11, /* RFC 8415 */ + SD_DHCP6_OPTION_UNICAST = 12, /* RFC 8415 */ + SD_DHCP6_OPTION_STATUS_CODE = 13, /* RFC 8415 */ + SD_DHCP6_OPTION_RAPID_COMMIT = 14, /* RFC 8415 */ + SD_DHCP6_OPTION_USER_CLASS = 15, /* RFC 8415 */ + SD_DHCP6_OPTION_VENDOR_CLASS = 16, /* RFC 8415 */ + SD_DHCP6_OPTION_VENDOR_OPTS = 17, /* RFC 8415 */ + SD_DHCP6_OPTION_INTERFACE_ID = 18, /* RFC 8415 */ + SD_DHCP6_OPTION_RECONF_MSG = 19, /* RFC 8415 */ + SD_DHCP6_OPTION_RECONF_ACCEPT = 20, /* RFC 8415 */ + SD_DHCP6_OPTION_SIP_SERVER_DOMAIN_NAME = 21, /* RFC 3319 */ + SD_DHCP6_OPTION_SIP_SERVER_ADDRESS = 22, /* RFC 3319 */ SD_DHCP6_OPTION_DNS_SERVERS = 23, /* RFC 3646 */ SD_DHCP6_OPTION_DOMAIN_LIST = 24, /* RFC 3646 */ - SD_DHCP6_OPTION_IA_PD = 25, /* RFC 3633, prefix delegation */ - SD_DHCP6_OPTION_IA_PD_PREFIX = 26, /* RFC 3633, prefix delegation */ - + SD_DHCP6_OPTION_IA_PD = 25, /* RFC 3633, RFC 8415 */ + SD_DHCP6_OPTION_IA_PD_PREFIX = 26, /* RFC 3633, RFC 8415 */ + SD_DHCP6_OPTION_NIS_SERVERS = 27, /* RFC 3898 */ + SD_DHCP6_OPTION_NISP_SERVERS = 28, /* RFC 3898 */ + SD_DHCP6_OPTION_NIS_DOMAIN_NAME = 29, /* RFC 3898 */ + SD_DHCP6_OPTION_NISP_DOMAIN_NAME = 30, /* RFC 3898 */ SD_DHCP6_OPTION_SNTP_SERVERS = 31, /* RFC 4075, deprecated */ - SD_DHCP6_OPTION_INFORMATION_REFRESH_TIME = 32, /* RFC 8415, sec. 21.23 */ - + SD_DHCP6_OPTION_INFORMATION_REFRESH_TIME = 32, /* RFC 4242, 8415, sec. 21.23 */ + SD_DHCP6_OPTION_BCMCS_SERVER_D = 33, /* RFC 4280 */ + SD_DHCP6_OPTION_BCMCS_SERVER_A = 34, /* RFC 4280 */ /* option code 35 is unassigned */ - - SD_DHCP6_OPTION_FQDN = 39, /* RFC 4704 */ - + SD_DHCP6_OPTION_GEOCONF_CIVIC = 36, /* RFC 4776 */ + SD_DHCP6_OPTION_REMOTE_ID = 37, /* RFC 4649 */ + SD_DHCP6_OPTION_SUBSCRIBER_ID = 38, /* RFC 4580 */ + SD_DHCP6_OPTION_CLIENT_FQDN = 39, /* RFC 4704 */ + SD_DHCP6_OPTION_PANA_AGENT = 40, /* RFC 5192 */ + SD_DHCP6_OPTION_NEW_POSIX_TIMEZONE = 41, /* RFC 4833 */ + SD_DHCP6_OPTION_NEW_TZDB_TIMEZONE = 42, /* RFC 4833 */ + SD_DHCP6_OPTION_ERO = 43, /* RFC 4994 */ + SD_DHCP6_OPTION_LQ_QUERY = 44, /* RFC 5007 */ + SD_DHCP6_OPTION_CLIENT_DATA = 45, /* RFC 5007 */ + SD_DHCP6_OPTION_CLT_TIME = 46, /* RFC 5007 */ + SD_DHCP6_OPTION_LQ_RELAY_DATA = 47, /* RFC 5007 */ + SD_DHCP6_OPTION_LQ_CLIENT_LINK = 48, /* RFC 5007 */ + SD_DHCP6_OPTION_MIP6_HNIDF = 49, /* RFC 6610 */ + SD_DHCP6_OPTION_MIP6_VDINF = 50, /* RFC 6610 */ + SD_DHCP6_OPTION_V6_LOST = 51, /* RFC 5223 */ + SD_DHCP6_OPTION_CAPWAP_AC_V6 = 52, /* RFC 5417 */ + SD_DHCP6_OPTION_RELAY_ID = 53, /* RFC 5460 */ + SD_DHCP6_OPTION_IPV6_ADDRESS_MOS = 54, /* RFC 5678 */ + SD_DHCP6_OPTION_IPV6_FQDN_MOS = 55, /* RFC 5678 */ SD_DHCP6_OPTION_NTP_SERVER = 56, /* RFC 5908 */ - SD_DHCP6_OPTION_MUD_URL = 112, /* RFC 8250 */ - - /* option codes 89-142 are unassigned */ + SD_DHCP6_OPTION_V6_ACCESS_DOMAIN = 57, /* RFC 5986 */ + SD_DHCP6_OPTION_SIP_UA_CS_LIST = 58, /* RFC 6011 */ + SD_DHCP6_OPTION_BOOTFILE_URL = 59, /* RFC 5970 */ + SD_DHCP6_OPTION_BOOTFILE_PARAM = 60, /* RFC 5970 */ + SD_DHCP6_OPTION_CLIENT_ARCH_TYPE = 61, /* RFC 5970 */ + SD_DHCP6_OPTION_NII = 62, /* RFC 5970 */ + SD_DHCP6_OPTION_GEOLOCATION = 63, /* RFC 6225 */ + SD_DHCP6_OPTION_AFTR_NAME = 64, /* RFC 6334 */ + SD_DHCP6_OPTION_ERP_LOCAL_DOMAIN_NAME = 65, /* RFC 6440 */ + SD_DHCP6_OPTION_RSOO = 66, /* RFC 6422 */ + SD_DHCP6_OPTION_PD_EXCLUDE = 67, /* RFC 6603 */ + SD_DHCP6_OPTION_VSS = 68, /* RFC 6607 */ + SD_DHCP6_OPTION_MIP6_IDINF = 69, /* RFC 6610 */ + SD_DHCP6_OPTION_MIP6_UDINF = 70, /* RFC 6610 */ + SD_DHCP6_OPTION_MIP6_HNP = 71, /* RFC 6610 */ + SD_DHCP6_OPTION_MIP6_HAA = 72, /* RFC 6610 */ + SD_DHCP6_OPTION_MIP6_HAF = 73, /* RFC 6610 */ + SD_DHCP6_OPTION_RDNSS_SELECTION = 74, /* RFC 6731 */ + SD_DHCP6_OPTION_KRB_PRINCIPAL_NAME = 75, /* RFC 6784 */ + SD_DHCP6_OPTION_KRB_REALM_NAME = 76, /* RFC 6784 */ + SD_DHCP6_OPTION_KRB_DEFAULT_REALM_NAME = 77, /* RFC 6784 */ + SD_DHCP6_OPTION_KRB_KDC = 78, /* RFC 6784 */ + SD_DHCP6_OPTION_CLIENT_LINKLAYER_ADDR = 79, /* RFC 6939 */ + SD_DHCP6_OPTION_LINK_ADDRESS = 80, /* RFC 6977 */ + SD_DHCP6_OPTION_RADIUS = 81, /* RFC 7037 */ + SD_DHCP6_OPTION_SOL_MAX_RT = 82, /* RFC 7083, RFC 8415 */ + SD_DHCP6_OPTION_INF_MAX_RT = 83, /* RFC 7083, RFC 8415 */ + SD_DHCP6_OPTION_ADDRSEL = 84, /* RFC 7078 */ + SD_DHCP6_OPTION_ADDRSEL_TABLE = 85, /* RFC 7078 */ + SD_DHCP6_OPTION_V6_PCP_SERVER = 86, /* RFC 7291 */ + SD_DHCP6_OPTION_DHCPV4_MSG = 87, /* RFC 7341 */ + SD_DHCP6_OPTION_DHCP4_O_DHCP6_SERVER = 88, /* RFC 7341 */ + SD_DHCP6_OPTION_S46_RULE = 89, /* RFC 7598 */ + SD_DHCP6_OPTION_S46_BR = 90, /* RFC 7598, RFC 8539 */ + SD_DHCP6_OPTION_S46_DMR = 91, /* RFC 7598 */ + SD_DHCP6_OPTION_S46_V4V6BIND = 92, /* RFC 7598 */ + SD_DHCP6_OPTION_S46_PORTPARAMS = 93, /* RFC 7598 */ + SD_DHCP6_OPTION_S46_CONT_MAPE = 94, /* RFC 7598 */ + SD_DHCP6_OPTION_S46_CONT_MAPT = 95, /* RFC 7598 */ + SD_DHCP6_OPTION_S46_CONT_LW = 96, /* RFC 7598 */ + SD_DHCP6_OPTION_4RD = 97, /* RFC 7600 */ + SD_DHCP6_OPTION_4RD_MAP_RULE = 98, /* RFC 7600 */ + SD_DHCP6_OPTION_4RD_NON_MAP_RULE = 99, /* RFC 7600 */ + SD_DHCP6_OPTION_LQ_BASE_TIME = 100, /* RFC 7653 */ + SD_DHCP6_OPTION_LQ_START_TIME = 101, /* RFC 7653 */ + SD_DHCP6_OPTION_LQ_END_TIME = 102, /* RFC 7653 */ + SD_DHCP6_OPTION_CAPTIVE_PORTAL = 103, /* RFC 8910 */ + SD_DHCP6_OPTION_MPL_PARAMETERS = 104, /* RFC 7774 */ + SD_DHCP6_OPTION_ANI_ATT = 105, /* RFC 7839 */ + SD_DHCP6_OPTION_ANI_NETWORK_NAME = 106, /* RFC 7839 */ + SD_DHCP6_OPTION_ANI_AP_NAME = 107, /* RFC 7839 */ + SD_DHCP6_OPTION_ANI_AP_BSSID = 108, /* RFC 7839 */ + SD_DHCP6_OPTION_ANI_OPERATOR_ID = 109, /* RFC 7839 */ + SD_DHCP6_OPTION_ANI_OPERATOR_REALM = 110, /* RFC 7839 */ + SD_DHCP6_OPTION_S46_PRIORITY = 111, /* RFC 8026 */ + SD_DHCP6_OPTION_MUD_URL_V6 = 112, /* RFC 8520 */ + SD_DHCP6_OPTION_V6_PREFIX64 = 113, /* RFC 8115 */ + SD_DHCP6_OPTION_F_BINDING_STATUS = 114, /* RFC 8156 */ + SD_DHCP6_OPTION_F_CONNECT_FLAGS = 115, /* RFC 8156 */ + SD_DHCP6_OPTION_F_DNS_REMOVAL_INFO = 116, /* RFC 8156 */ + SD_DHCP6_OPTION_F_DNS_HOST_NAME = 117, /* RFC 8156 */ + SD_DHCP6_OPTION_F_DNS_ZONE_NAME = 118, /* RFC 8156 */ + SD_DHCP6_OPTION_F_DNS_FLAGS = 119, /* RFC 8156 */ + SD_DHCP6_OPTION_F_EXPIRATION_TIME = 120, /* RFC 8156 */ + SD_DHCP6_OPTION_F_MAX_UNACKED_BNDUPD = 121, /* RFC 8156 */ + SD_DHCP6_OPTION_F_MCLT = 122, /* RFC 8156 */ + SD_DHCP6_OPTION_F_PARTNER_LIFETIME = 123, /* RFC 8156 */ + SD_DHCP6_OPTION_F_PARTNER_LIFETIME_SENT = 124, /* RFC 8156 */ + SD_DHCP6_OPTION_F_PARTNER_DOWN_TIME = 125, /* RFC 8156 */ + SD_DHCP6_OPTION_F_PARTNER_RAW_CLT_TIME = 126, /* RFC 8156 */ + SD_DHCP6_OPTION_F_PROTOCOL_VERSION = 127, /* RFC 8156 */ + SD_DHCP6_OPTION_F_KEEPALIVE_TIME = 128, /* RFC 8156 */ + SD_DHCP6_OPTION_F_RECONFIGURE_DATA = 129, /* RFC 8156 */ + SD_DHCP6_OPTION_F_RELATIONSHIP_NAME = 130, /* RFC 8156 */ + SD_DHCP6_OPTION_F_SERVER_FLAGS = 131, /* RFC 8156 */ + SD_DHCP6_OPTION_F_SERVER_STATE = 132, /* RFC 8156 */ + SD_DHCP6_OPTION_F_START_TIME_OF_STATE = 133, /* RFC 8156 */ + SD_DHCP6_OPTION_F_STATE_EXPIRATION_TIME = 134, /* RFC 8156 */ + SD_DHCP6_OPTION_RELAY_PORT = 135, /* RFC 8357 */ + SD_DHCP6_OPTION_V6_SZTP_REDIRECT = 136, /* RFC 8572 */ + SD_DHCP6_OPTION_S46_BIND_IPV6_PREFIX = 137, /* RFC 8539 */ + SD_DHCP6_OPTION_IA_LL = 138, /* RFC 8947 */ + SD_DHCP6_OPTION_LLADDR = 139, /* RFC 8947 */ + SD_DHCP6_OPTION_SLAP_QUAD = 140, /* RFC 8948 */ + SD_DHCP6_OPTION_V6_DOTS_RI = 141, /* RFC 8973 */ + SD_DHCP6_OPTION_V6_DOTS_ADDRESS = 142, /* RFC 8973 */ + SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF = 143, /* RFC 6153 */ /* option codes 144-65535 are unassigned */ }; diff --git a/src/libnm-systemd-core/src/systemd/sd-dhcp6-lease.h b/src/libnm-systemd-core/src/systemd/sd-dhcp6-lease.h index a10901e5..472276de 100644 --- a/src/libnm-systemd-core/src/systemd/sd-dhcp6-lease.h +++ b/src/libnm-systemd-core/src/systemd/sd-dhcp6-lease.h @@ -21,6 +21,7 @@ #include #include +#include #include "_sd-common.h" @@ -28,6 +29,9 @@ _SD_BEGIN_DECLARATIONS; typedef struct sd_dhcp6_lease sd_dhcp6_lease; +int sd_dhcp6_lease_get_timestamp(sd_dhcp6_lease *lease, clockid_t clock, uint64_t *ret); +int sd_dhcp6_lease_get_server_address(sd_dhcp6_lease *lease, struct in6_addr *ret); + void sd_dhcp6_lease_reset_address_iter(sd_dhcp6_lease *lease); int sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease, struct in6_addr *addr, diff --git a/src/libnm-systemd-core/src/systemd/sd-event.h b/src/libnm-systemd-core/src/systemd/sd-event.h index 2ae2a0da..63984eef 100644 --- a/src/libnm-systemd-core/src/systemd/sd-event.h +++ b/src/libnm-systemd-core/src/systemd/sd-event.h @@ -93,6 +93,7 @@ int sd_event_add_signal(sd_event *e, sd_event_source **s, int sig, sd_event_sign int sd_event_add_child(sd_event *e, sd_event_source **s, pid_t pid, int options, sd_event_child_handler_t callback, void *userdata); int sd_event_add_child_pidfd(sd_event *e, sd_event_source **s, int pidfd, int options, sd_event_child_handler_t callback, void *userdata); int sd_event_add_inotify(sd_event *e, sd_event_source **s, const char *path, uint32_t mask, sd_event_inotify_handler_t callback, void *userdata); +int sd_event_add_inotify_fd(sd_event *e, sd_event_source **s, int fd, uint32_t mask, sd_event_inotify_handler_t callback, void *userdata); int sd_event_add_defer(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); int sd_event_add_post(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); int sd_event_add_exit(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); @@ -165,6 +166,7 @@ int sd_event_source_set_exit_on_failure(sd_event_source *s, int b); int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval_usec, unsigned burst); int sd_event_source_get_ratelimit(sd_event_source *s, uint64_t *ret_interval_usec, unsigned *ret_burst); int sd_event_source_is_ratelimited(sd_event_source *s); +int sd_event_source_set_ratelimit_expire_callback(sd_event_source *s, sd_event_handler_t callback); /* Define helpers so that __attribute__((cleanup(sd_event_unrefp))) and similar may be used. */ _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_event, sd_event_unref); diff --git a/src/libnm-systemd-core/src/systemd/sd-ipv4acd.h b/src/libnm-systemd-core/src/systemd/sd-ipv4acd.h deleted file mode 100644 index 90d3f0a0..00000000 --- a/src/libnm-systemd-core/src/systemd/sd-ipv4acd.h +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -#ifndef foosdipv4acdfoo -#define foosdipv4acdfoo - -/*** - Copyright © 2014 Axis Communications AB. All rights reserved. - systemd 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.1 of the License, or - (at your option) any later version. - - systemd 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 systemd; If not, see . -***/ - -#include -#include -#include - -#include "sd-event.h" - -#include "_sd-common.h" - -_SD_BEGIN_DECLARATIONS; - -enum { - SD_IPV4ACD_EVENT_STOP = 0, - SD_IPV4ACD_EVENT_BIND = 1, - SD_IPV4ACD_EVENT_CONFLICT = 2, -}; - -typedef struct sd_ipv4acd sd_ipv4acd; -typedef void (*sd_ipv4acd_callback_t)(sd_ipv4acd *acd, int event, void *userdata); -typedef int (*sd_ipv4acd_check_mac_callback_t)(sd_ipv4acd *acd, const struct ether_addr *mac, void *userdata); - -int sd_ipv4acd_detach_event(sd_ipv4acd *acd); -int sd_ipv4acd_attach_event(sd_ipv4acd *acd, sd_event *event, int64_t priority); -int sd_ipv4acd_get_address(sd_ipv4acd *acd, struct in_addr *address); -int sd_ipv4acd_set_callback(sd_ipv4acd *acd, sd_ipv4acd_callback_t cb, void *userdata); -int sd_ipv4acd_set_check_mac_callback(sd_ipv4acd *acd, sd_ipv4acd_check_mac_callback_t cb, void *userdata); -int sd_ipv4acd_set_mac(sd_ipv4acd *acd, const struct ether_addr *addr); -int sd_ipv4acd_set_ifindex(sd_ipv4acd *acd, int interface_index); -int sd_ipv4acd_get_ifindex(sd_ipv4acd *acd); -int sd_ipv4acd_set_ifname(sd_ipv4acd *acd, const char *interface_name); -int sd_ipv4acd_get_ifname(sd_ipv4acd *acd, const char **ret); -int sd_ipv4acd_set_address(sd_ipv4acd *acd, const struct in_addr *address); -int sd_ipv4acd_is_running(sd_ipv4acd *acd); -int sd_ipv4acd_start(sd_ipv4acd *acd, bool reset_conflicts); -int sd_ipv4acd_stop(sd_ipv4acd *acd); -sd_ipv4acd *sd_ipv4acd_ref(sd_ipv4acd *acd); -sd_ipv4acd *sd_ipv4acd_unref(sd_ipv4acd *acd); -int sd_ipv4acd_new(sd_ipv4acd **ret); - -_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4acd, sd_ipv4acd_unref); - -_SD_END_DECLARATIONS; - -#endif diff --git a/src/libnm-systemd-core/src/systemd/sd-ipv4ll.h b/src/libnm-systemd-core/src/systemd/sd-ipv4ll.h deleted file mode 100644 index ed014b53..00000000 --- a/src/libnm-systemd-core/src/systemd/sd-ipv4ll.h +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -#ifndef foosdipv4llfoo -#define foosdipv4llfoo - -/*** - Copyright © 2014 Axis Communications AB. All rights reserved. - - systemd 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.1 of the License, or - (at your option) any later version. - - systemd 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 systemd; If not, see . -***/ - -#include -#include - -#include "sd-event.h" - -#include "_sd-common.h" - -_SD_BEGIN_DECLARATIONS; - -enum { - SD_IPV4LL_EVENT_STOP = 0, - SD_IPV4LL_EVENT_BIND = 1, - SD_IPV4LL_EVENT_CONFLICT = 2, -}; - -typedef struct sd_ipv4ll sd_ipv4ll; -typedef void (*sd_ipv4ll_callback_t)(sd_ipv4ll *ll, int event, void *userdata); -typedef int (*sd_ipv4ll_check_mac_callback_t)(sd_ipv4ll *ll, const struct ether_addr *mac, void *userdata); - -int sd_ipv4ll_detach_event(sd_ipv4ll *ll); -int sd_ipv4ll_attach_event(sd_ipv4ll *ll, sd_event *event, int64_t priority); -int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address); -int sd_ipv4ll_set_callback(sd_ipv4ll *ll, sd_ipv4ll_callback_t cb, void *userdata); -int sd_ipv4ll_set_check_mac_callback(sd_ipv4ll *ll, sd_ipv4ll_check_mac_callback_t cb, void *userdata); -int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr); -int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int interface_index); -int sd_ipv4ll_get_ifindex(sd_ipv4ll *ll); -int sd_ipv4ll_set_ifname(sd_ipv4ll *ll, const char *interface_name); -int sd_ipv4ll_get_ifname(sd_ipv4ll *ll, const char **ret); -int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address); -int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint64_t seed); -int sd_ipv4ll_is_running(sd_ipv4ll *ll); -int sd_ipv4ll_restart(sd_ipv4ll *ll); -int sd_ipv4ll_start(sd_ipv4ll *ll); -int sd_ipv4ll_stop(sd_ipv4ll *ll); -sd_ipv4ll *sd_ipv4ll_ref(sd_ipv4ll *ll); -sd_ipv4ll *sd_ipv4ll_unref(sd_ipv4ll *ll); -int sd_ipv4ll_new(sd_ipv4ll **ret); - -_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4ll, sd_ipv4ll_unref); - -_SD_END_DECLARATIONS; - -#endif diff --git a/src/libnm-systemd-core/src/systemd/sd-ndisc.h b/src/libnm-systemd-core/src/systemd/sd-ndisc.h index f45b2ad6..ab9ff55d 100644 --- a/src/libnm-systemd-core/src/systemd/sd-ndisc.h +++ b/src/libnm-systemd-core/src/systemd/sd-ndisc.h @@ -82,9 +82,6 @@ int sd_ndisc_set_ifname(sd_ndisc *nd, const char *interface_name); int sd_ndisc_get_ifname(sd_ndisc *nd, const char **ret); int sd_ndisc_set_mac(sd_ndisc *nd, const struct ether_addr *mac_addr); -int sd_ndisc_get_mtu(sd_ndisc *nd, uint32_t *ret); -int sd_ndisc_get_hop_limit(sd_ndisc *nd, uint8_t *ret); - int sd_ndisc_router_from_raw(sd_ndisc_router **ret, const void *raw, size_t raw_size); sd_ndisc_router *sd_ndisc_router_ref(sd_ndisc_router *rt); sd_ndisc_router *sd_ndisc_router_unref(sd_ndisc_router *rt); diff --git a/src/libnm-systemd-shared/sd-adapt-shared/filesystems.h b/src/libnm-systemd-shared/sd-adapt-shared/filesystems.h new file mode 100644 index 00000000..637892c2 --- /dev/null +++ b/src/libnm-systemd-shared/sd-adapt-shared/filesystems.h @@ -0,0 +1,3 @@ +#pragma once + +/* dummy header */ diff --git a/src/libnm-systemd-shared/sd-adapt-shared/hmac.h b/src/libnm-systemd-shared/sd-adapt-shared/hmac.h new file mode 100644 index 00000000..637892c2 --- /dev/null +++ b/src/libnm-systemd-shared/sd-adapt-shared/hmac.h @@ -0,0 +1,3 @@ +#pragma once + +/* dummy header */ diff --git a/src/libnm-systemd-shared/sd-adapt-shared/missing_magic.h b/src/libnm-systemd-shared/sd-adapt-shared/missing_magic.h index 637892c2..a5dce206 100644 --- a/src/libnm-systemd-shared/sd-adapt-shared/missing_magic.h +++ b/src/libnm-systemd-shared/sd-adapt-shared/missing_magic.h @@ -1,3 +1,5 @@ #pragma once /* dummy header */ + +#include diff --git a/src/libnm-systemd-shared/sd-adapt-shared/netif-util.h b/src/libnm-systemd-shared/sd-adapt-shared/netif-util.h new file mode 100644 index 00000000..637892c2 --- /dev/null +++ b/src/libnm-systemd-shared/sd-adapt-shared/netif-util.h @@ -0,0 +1,3 @@ +#pragma once + +/* dummy header */ diff --git a/src/libnm-systemd-shared/src/basic/alloc-util.h b/src/libnm-systemd-shared/src/basic/alloc-util.h index e587fe79..65d51756 100644 --- a/src/libnm-systemd-shared/src/basic/alloc-util.h +++ b/src/libnm-systemd-shared/src/basic/alloc-util.h @@ -22,20 +22,25 @@ typedef void (*free_func_t)(void *p); #define new0(t, n) ((t*) calloc((n) ?: 1, sizeof(t))) +#define alloca_safe(n) \ + ({ \ + size_t _nn_ = n; \ + assert(_nn_ <= ALLOCA_MAX); \ + alloca(_nn_ == 0 ? 1 : _nn_); \ + }) \ + #define newa(t, n) \ ({ \ size_t _n_ = n; \ assert(!size_multiply_overflow(sizeof(t), _n_)); \ - assert(sizeof(t)*_n_ <= ALLOCA_MAX); \ - (t*) alloca((sizeof(t)*_n_) ?: 1); \ + (t*) alloca_safe(sizeof(t)*_n_); \ }) #define newa0(t, n) \ ({ \ size_t _n_ = n; \ assert(!size_multiply_overflow(sizeof(t), _n_)); \ - assert(sizeof(t)*_n_ <= ALLOCA_MAX); \ - (t*) alloca0((sizeof(t)*_n_) ?: 1); \ + (t*) alloca0((sizeof(t)*_n_)); \ }) #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n))) @@ -44,12 +49,6 @@ typedef void (*free_func_t)(void *p); #define malloc0(n) (calloc(1, (n) ?: 1)) -#define mfree(memory) \ - ({ \ - free(memory); \ - (typeof(memory)) NULL; \ - }) - #define free_and_replace(a, b) \ ({ \ typeof(a)* _a = &(a); \ @@ -67,8 +66,7 @@ void* memdup_suffix0(const void *p, size_t l); /* We can't use _alloc_() here, s ({ \ void *_q_; \ size_t _l_ = l; \ - assert(_l_ <= ALLOCA_MAX); \ - _q_ = alloca(_l_ ?: 1); \ + _q_ = alloca_safe(_l_); \ memcpy_safe(_q_, p, _l_); \ }) @@ -76,8 +74,7 @@ void* memdup_suffix0(const void *p, size_t l); /* We can't use _alloc_() here, s ({ \ void *_q_; \ size_t _l_ = l; \ - assert(_l_ <= ALLOCA_MAX); \ - _q_ = alloca(_l_ + 1); \ + _q_ = alloca_safe(_l_ + 1); \ ((uint8_t*) _q_)[_l_] = 0; \ memcpy_safe(_q_, p, _l_); \ }) @@ -144,9 +141,8 @@ void* greedy_realloc0(void **p, size_t need, size_t size); ({ \ char *_new_; \ size_t _len_ = n; \ - assert(_len_ <= ALLOCA_MAX); \ - _new_ = alloca(_len_ ?: 1); \ - (void *) memset(_new_, 0, _len_); \ + _new_ = alloca_safe(_len_); \ + memset(_new_, 0, _len_); \ }) /* It's not clear what alignment glibc/gcc alloca() guarantee, hence provide a guaranteed safe version */ @@ -155,8 +151,7 @@ void* greedy_realloc0(void **p, size_t need, size_t size); void *_ptr_; \ size_t _mask_ = (align) - 1; \ size_t _size_ = size; \ - assert(_size_ <= ALLOCA_MAX); \ - _ptr_ = alloca((_size_ + _mask_) ?: 1); \ + _ptr_ = alloca_safe(_size_ + _mask_); \ (void*)(((uintptr_t)_ptr_ + _mask_) & ~_mask_); \ }) @@ -165,7 +160,7 @@ void* greedy_realloc0(void **p, size_t need, size_t size); void *_new_; \ size_t _xsize_ = (size); \ _new_ = alloca_align(_xsize_, (align)); \ - (void*)memset(_new_, 0, _xsize_); \ + memset(_new_, 0, _xsize_); \ }) #if HAS_FEATURE_MEMORY_SANITIZER @@ -193,3 +188,19 @@ void* greedy_realloc0(void **p, size_t need, size_t size); __builtin_types_compatible_p(typeof(x), typeof(&*(x))), \ MALLOC_SIZEOF_SAFE(x)/sizeof((x)[0]), \ VOID_0)) + + +/* These are like strdupa()/strndupa(), but honour ALLOCA_MAX */ +#define strdupa_safe(s) \ + ({ \ + const char *_t = (s); \ + (char*) memdupa_suffix0(_t, strlen(_t)); \ + }) + +#define strndupa_safe(s, n) \ + ({ \ + const char *_t = (s); \ + (char*) memdupa_suffix0(_t, strnlen(_t, (n))); \ + }) + +#include "memory-util.h" diff --git a/src/libnm-systemd-shared/src/basic/cgroup-util.h b/src/libnm-systemd-shared/src/basic/cgroup-util.h index 90ccd2c0..461c01b3 100644 --- a/src/libnm-systemd-shared/src/basic/cgroup-util.h +++ b/src/libnm-systemd-shared/src/basic/cgroup-util.h @@ -2,6 +2,7 @@ #pragma once #include +#include #include #include #include @@ -33,6 +34,9 @@ typedef enum CGroupController { CGROUP_CONTROLLER_BPF_FOREIGN, CGROUP_CONTROLLER_BPF_SOCKET_BIND, CGROUP_CONTROLLER_BPF_RESTRICT_NETWORK_INTERFACES, + /* The BPF hook implementing RestrictFileSystems= is not defined here. + * It's applied as late as possible in exec_child() so we don't block + * our own unit setup code. */ _CGROUP_CONTROLLER_MAX, _CGROUP_CONTROLLER_INVALID = -EINVAL, @@ -123,6 +127,20 @@ static inline bool CGROUP_CPU_SHARES_IS_OK(uint64_t x) { (x >= CGROUP_CPU_SHARES_MIN && x <= CGROUP_CPU_SHARES_MAX); } +/* Special values for the special {blkio,io}.bfq.weight attribute */ +#define CGROUP_BFQ_WEIGHT_INVALID UINT64_MAX +#define CGROUP_BFQ_WEIGHT_MIN UINT64_C(1) +#define CGROUP_BFQ_WEIGHT_MAX UINT64_C(1000) +#define CGROUP_BFQ_WEIGHT_DEFAULT UINT64_C(100) + +/* Convert the normal io.weight value to io.bfq.weight */ +static inline uint64_t BFQ_WEIGHT(uint64_t io_weight) { + return + io_weight <= CGROUP_WEIGHT_DEFAULT ? + CGROUP_BFQ_WEIGHT_DEFAULT - (CGROUP_WEIGHT_DEFAULT - io_weight) * (CGROUP_BFQ_WEIGHT_DEFAULT - CGROUP_BFQ_WEIGHT_MIN) / (CGROUP_WEIGHT_DEFAULT - CGROUP_WEIGHT_MIN) : + CGROUP_BFQ_WEIGHT_DEFAULT + (io_weight - CGROUP_WEIGHT_DEFAULT) * (CGROUP_BFQ_WEIGHT_MAX - CGROUP_BFQ_WEIGHT_DEFAULT) / (CGROUP_WEIGHT_MAX - CGROUP_WEIGHT_DEFAULT); +} + /* Special values for the blkio.weight attribute */ #define CGROUP_BLKIO_WEIGHT_INVALID UINT64_MAX #define CGROUP_BLKIO_WEIGHT_MIN UINT64_C(10) @@ -236,6 +254,7 @@ int cg_is_empty_recursive(const char *controller, const char *path); int cg_get_root_path(char **path); +int cg_path_get_cgroupid(const char *path, uint64_t *ret); int cg_path_get_session(const char *path, char **session); int cg_path_get_owner_uid(const char *path, uid_t *uid); int cg_path_get_unit(const char *path, char **unit); @@ -311,3 +330,12 @@ typedef enum ManagedOOMPreference { const char* managed_oom_preference_to_string(ManagedOOMPreference a) _const_; ManagedOOMPreference managed_oom_preference_from_string(const char *s) _pure_; + +/* The structure to pass to name_to_handle_at() on cgroupfs2 */ +typedef union { + struct file_handle file_handle; + uint8_t space[offsetof(struct file_handle, f_handle) + sizeof(uint64_t)]; +} cg_file_handle; + +#define CG_FILE_HANDLE_INIT { .file_handle.handle_bytes = sizeof(uint64_t) } +#define CG_FILE_HANDLE_CGROUPID(fh) (*(uint64_t*) (fh).file_handle.f_handle) diff --git a/src/libnm-systemd-shared/src/basic/env-util.c b/src/libnm-systemd-shared/src/basic/env-util.c index 431862f6..f47ddefe 100644 --- a/src/libnm-systemd-shared/src/basic/env-util.c +++ b/src/libnm-systemd-shared/src/basic/env-util.c @@ -10,6 +10,7 @@ #include "alloc-util.h" #include "env-util.h" +#include "errno-util.h" #include "escape.h" #include "extract-word.h" #include "macro.h" @@ -397,7 +398,7 @@ int strv_env_replace_consume(char ***l, char *p) { return -EINVAL; } - name = strndupa(p, t - p); + name = strndupa_safe(p, t - p); STRV_FOREACH(f, *l) if (env_entry_has_name(*f, name)) { @@ -484,7 +485,7 @@ char *strv_env_get_n(char **l, const char *name, size_t k, unsigned flags) { if (flags & REPLACE_ENV_USE_ENVIRONMENT) { const char *t; - t = strndupa(name, k); + t = strndupa_safe(name, k); return getenv(t); }; @@ -791,15 +792,12 @@ int getenv_bool_secure(const char *p) { #if 0 /* NM_IGNORED */ int set_unset_env(const char *name, const char *value, bool overwrite) { - int r; + assert(name); if (value) - r = setenv(name, value, overwrite); - else - r = unsetenv(name); - if (r < 0) - return -errno; - return 0; + return RET_NERRNO(setenv(name, value, overwrite)); + + return RET_NERRNO(unsetenv(name)); } int putenv_dup(const char *assignment, bool override) { @@ -809,12 +807,10 @@ int putenv_dup(const char *assignment, bool override) { if (!e) return -EINVAL; - n = strndupa(assignment, e - assignment); + n = strndupa_safe(assignment, e - assignment); /* This is like putenv(), but uses setenv() so that our memory doesn't become part of environ[]. */ - if (setenv(n, e + 1, override) < 0) - return -errno; - return 0; + return RET_NERRNO(setenv(n, e + 1, override)); } int setenv_systemd_exec_pid(bool update_only) { diff --git a/src/libnm-systemd-shared/src/basic/errno-util.h b/src/libnm-systemd-shared/src/basic/errno-util.h index 3f2d0af5..09abf0b7 100644 --- a/src/libnm-systemd-shared/src/basic/errno-util.h +++ b/src/libnm-systemd-shared/src/basic/errno-util.h @@ -13,7 +13,7 @@ static inline void _reset_errno_(int *saved_errno) { errno = *saved_errno; } -#define PROTECT_ERRNO \ +#define PROTECT_ERRNO \ _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno #define UNPROTECT_ERRNO \ @@ -31,6 +31,29 @@ static inline int negative_errno(void) { return -errno; } +static inline int RET_NERRNO(int ret) { + + /* Helper to wrap system calls in to make them return negative errno errors. This brings system call + * error handling in sync with how we usually handle errors in our own code, i.e. with immediate + * returning of negative errno. Usage is like this: + * + * … + * r = RET_NERRNO(unlink(t)); + * … + * + * or + * + * … + * fd = RET_NERRNO(open("/etc/fstab", O_RDONLY|O_CLOEXEC)); + * … + */ + + if (ret < 0) + return negative_errno(); + + return ret; +} + static inline const char *strerror_safe(int error) { /* 'safe' here does NOT mean thread safety. */ return strerror(abs(error)); /* lgtm [cpp/potentially-dangerous-function] */ @@ -47,6 +70,13 @@ static inline int errno_or_else(int fallback) { return -abs(fallback); } +/* For send()/recv() or read()/write(). */ +static inline bool ERRNO_IS_TRANSIENT(int r) { + return IN_SET(abs(r), + EAGAIN, + EINTR); +} + /* Hint #1: ENETUNREACH happens if we try to connect to "non-existing" special IP addresses, such as ::5. * * Hint #2: The kernel sends e.g., EHOSTUNREACH or ENONET to userspace in some ICMP error cases. See the @@ -77,10 +107,8 @@ static inline bool ERRNO_IS_DISCONNECT(int r) { * the accept(2) man page. */ static inline bool ERRNO_IS_ACCEPT_AGAIN(int r) { return ERRNO_IS_DISCONNECT(r) || - IN_SET(abs(r), - EAGAIN, - EINTR, - EOPNOTSUPP); + ERRNO_IS_TRANSIENT(r) || + abs(r) == EOPNOTSUPP; } /* Resource exhaustion, could be our fault or general system trouble */ diff --git a/src/libnm-systemd-shared/src/basic/escape.c b/src/libnm-systemd-shared/src/basic/escape.c index 93288563..4dfb9a16 100644 --- a/src/libnm-systemd-shared/src/basic/escape.c +++ b/src/libnm-systemd-shared/src/basic/escape.c @@ -547,7 +547,7 @@ char* shell_maybe_quote(const char *s, ShellEscapeFlags flags) { return str_realloc(buf); } -char* quote_command_line(char **argv) { +char* quote_command_line(char **argv, ShellEscapeFlags flags) { _cleanup_free_ char *result = NULL; assert(argv); @@ -556,7 +556,7 @@ char* quote_command_line(char **argv) { STRV_FOREACH(a, argv) { _cleanup_free_ char *t = NULL; - t = shell_maybe_quote(*a, SHELL_ESCAPE_EMPTY); + t = shell_maybe_quote(*a, flags); if (!t) return NULL; @@ -564,6 +564,6 @@ char* quote_command_line(char **argv) { return NULL; } - return TAKE_PTR(result); + return str_realloc(TAKE_PTR(result)); } #endif /* NM_IGNORED */ diff --git a/src/libnm-systemd-shared/src/basic/escape.h b/src/libnm-systemd-shared/src/basic/escape.h index d490510d..318da6f2 100644 --- a/src/libnm-systemd-shared/src/basic/escape.h +++ b/src/libnm-systemd-shared/src/basic/escape.h @@ -69,4 +69,4 @@ char* escape_non_printable_full(const char *str, size_t console_width, XEscapeFl char* shell_escape(const char *s, const char *bad); char* shell_maybe_quote(const char *s, ShellEscapeFlags flags); -char* quote_command_line(char **argv); +char* quote_command_line(char **argv, ShellEscapeFlags flags); diff --git a/src/libnm-systemd-shared/src/basic/ether-addr-util.c b/src/libnm-systemd-shared/src/basic/ether-addr-util.c index c73dcff1..4504b6be 100644 --- a/src/libnm-systemd-shared/src/basic/ether-addr-util.c +++ b/src/libnm-systemd-shared/src/basic/ether-addr-util.c @@ -9,20 +9,29 @@ #include #include "ether-addr-util.h" +#include "hexdecoct.h" #include "macro.h" #include "string-util.h" -char* hw_addr_to_string(const struct hw_addr_data *addr, char buffer[HW_ADDR_TO_STRING_MAX]) { +char *hw_addr_to_string_full( + const struct hw_addr_data *addr, + HardwareAddressToStringFlags flags, + char buffer[static HW_ADDR_TO_STRING_MAX]) { + assert(addr); assert(buffer); assert(addr->length <= HW_ADDR_MAX_SIZE); - for (size_t i = 0; i < addr->length; i++) { - sprintf(&buffer[3*i], "%02"PRIx8, addr->bytes[i]); - if (i < addr->length - 1) - buffer[3*i + 2] = ':'; + for (size_t i = 0, j = 0; i < addr->length; i++) { + buffer[j++] = hexchar(addr->bytes[i] >> 4); + buffer[j++] = hexchar(addr->bytes[i] & 0x0f); + if (!FLAGS_SET(flags, HW_ADDR_TO_STRING_NO_COLON)) + buffer[j++] = ':'; } + buffer[addr->length == 0 || FLAGS_SET(flags, HW_ADDR_TO_STRING_NO_COLON) ? + addr->length * 2 : + addr->length * 3 - 1] = '\0'; return buffer; } @@ -39,7 +48,7 @@ int hw_addr_compare(const struct hw_addr_data *a, const struct hw_addr_data *b) return memcmp(a->bytes, b->bytes, a->length); } -static void hw_addr_hash_func(const struct hw_addr_data *p, struct siphash *state) { +void hw_addr_hash_func(const struct hw_addr_data *p, struct siphash *state) { assert(p); assert(state); @@ -48,6 +57,7 @@ static void hw_addr_hash_func(const struct hw_addr_data *p, struct siphash *stat } DEFINE_HASH_OPS(hw_addr_hash_ops, struct hw_addr_data, hw_addr_hash_func, hw_addr_compare); +DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(hw_addr_hash_ops_free, struct hw_addr_data, hw_addr_hash_func, hw_addr_compare, free); char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]) { assert(addr); @@ -93,75 +103,163 @@ static void ether_addr_hash_func(const struct ether_addr *p, struct siphash *sta } DEFINE_HASH_OPS(ether_addr_hash_ops, struct ether_addr, ether_addr_hash_func, ether_addr_compare); +DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(ether_addr_hash_ops_free, struct ether_addr, ether_addr_hash_func, ether_addr_compare, free); -int ether_addr_from_string(const char *s, struct ether_addr *ret) { - size_t pos = 0, n, field; - char sep = '\0'; - const char *hex = HEXDIGITS, *hexoff; - size_t x; - bool touched; - -#define parse_fields(v) \ - for (field = 0; field < ELEMENTSOF(v); field++) { \ - touched = false; \ - for (n = 0; n < (2 * sizeof(v[0])); n++) { \ - if (s[pos] == '\0') \ - break; \ - hexoff = strchr(hex, s[pos]); \ - if (!hexoff) \ - break; \ - assert(hexoff >= hex); \ - x = hexoff - hex; \ - if (x >= 16) \ - x -= 6; /* A-F */ \ - assert(x < 16); \ - touched = true; \ - v[field] <<= 4; \ - v[field] += x; \ - pos++; \ - } \ - if (!touched) \ - return -EINVAL; \ - if (field < (ELEMENTSOF(v)-1)) { \ - if (s[pos] != sep) \ - return -EINVAL; \ - else \ - pos++; \ - } \ - } +static int parse_hw_addr_one_field(const char **s, char sep, size_t len, uint8_t *buf) { + const char *hex = HEXDIGITS, *p; + uint16_t data = 0; + bool cont; assert(s); - assert(ret); + assert(*s); + assert(IN_SET(len, 1, 2)); + assert(buf); - s += strspn(s, WHITESPACE); - sep = s[strspn(s, hex)]; + p = *s; - if (sep == '.') { - uint16_t shorts[3] = { 0 }; + for (size_t i = 0; i < len * 2; i++) { + const char *hexoff; + size_t x; - parse_fields(shorts); + if (*p == '\0' || *p == sep) { + if (i == 0) + return -EINVAL; + break; + } - if (s[pos] != '\0') + hexoff = strchr(hex, *p); + if (!hexoff) return -EINVAL; - for (n = 0; n < ELEMENTSOF(shorts); n++) { - ret->ether_addr_octet[2*n] = ((shorts[n] & (uint16_t)0xff00) >> 8); - ret->ether_addr_octet[2*n + 1] = (shorts[n] & (uint16_t)0x00ff); + assert(hexoff >= hex); + x = hexoff - hex; + if (x >= 16) + x -= 6; /* A-F */ + + assert(x < 16); + data <<= 4; + data += x; + + p++; + } + + if (*p != '\0' && *p != sep) + return -EINVAL; + + switch (len) { + case 1: + buf[0] = data; + break; + case 2: + buf[0] = (data & 0xff00) >> 8; + buf[1] = data & 0xff; + break; + default: + assert_not_reached(); + } + + cont = *p == sep; + *s = p + cont; + return cont; +} + +int parse_hw_addr_full(const char *s, size_t expected_len, struct hw_addr_data *ret) { + size_t field_size, max_len, len = 0; + uint8_t bytes[HW_ADDR_MAX_SIZE]; + char sep; + int r; + + assert(s); + assert(expected_len <= HW_ADDR_MAX_SIZE || expected_len == SIZE_MAX); + assert(ret); + + /* This accepts the following formats: + * + * Dot separated 2 bytes format: xxyy.zzaa.bbcc + * Colon separated 1 bytes format: xx:yy:zz:aa:bb:cc + * Hyphen separated 1 bytes format: xx-yy-zz-aa-bb-cc + * + * Moreover, if expected_len == 0, 4, or 16, this also accepts: + * + * IPv4 format: used by IPv4 tunnel, e.g. ipgre + * IPv6 format: used by IPv6 tunnel, e.g. ip6gre + * + * The expected_len argument controls the length of acceptable addresses: + * + * 0: accepts 4 (AF_INET), 16 (AF_INET6), 6 (ETH_ALEN), or 20 (INFINIBAND_ALEN). + * SIZE_MAX: accepts arbitrary length, but at least one separator must be included. + * Otherwise: accepts addresses with matching length. + */ + + if (IN_SET(expected_len, 0, sizeof(struct in_addr), sizeof(struct in6_addr))) { + union in_addr_union a; + int family; + + if (expected_len == 0) + r = in_addr_from_string_auto(s, &family, &a); + else { + family = expected_len == sizeof(struct in_addr) ? AF_INET : AF_INET6; + r = in_addr_from_string(family, s, &a); + } + if (r >= 0) { + ret->length = FAMILY_ADDRESS_SIZE(family); + memcpy(ret->bytes, a.bytes, ret->length); + return 0; } + } - } else if (IN_SET(sep, ':', '-')) { - struct ether_addr out = ETHER_ADDR_NULL; + max_len = + expected_len == 0 ? INFINIBAND_ALEN : + expected_len == SIZE_MAX ? HW_ADDR_MAX_SIZE : expected_len; + sep = s[strspn(s, HEXDIGITS)]; - parse_fields(out.ether_addr_octet); + if (sep == '.') + field_size = 2; + else if (IN_SET(sep, ':', '-')) + field_size = 1; + else + return -EINVAL; - if (s[pos] != '\0') - return -EINVAL; + if (max_len % field_size != 0) + return -EINVAL; - for (n = 0; n < ELEMENTSOF(out.ether_addr_octet); n++) - ret->ether_addr_octet[n] = out.ether_addr_octet[n]; + for (size_t i = 0; i < max_len / field_size; i++) { + r = parse_hw_addr_one_field(&s, sep, field_size, bytes + i * field_size); + if (r < 0) + return r; + if (r == 0) { + len = (i + 1) * field_size; + break; + } + } - } else + if (len == 0) return -EINVAL; + if (expected_len == 0) { + if (!IN_SET(len, 4, 16, ETH_ALEN, INFINIBAND_ALEN)) + return -EINVAL; + } else if (expected_len != SIZE_MAX) { + if (len != expected_len) + return -EINVAL; + } + + ret->length = len; + memcpy(ret->bytes, bytes, ret->length); + return 0; +} + +int parse_ether_addr(const char *s, struct ether_addr *ret) { + struct hw_addr_data a; + int r; + + assert(s); + assert(ret); + + r = parse_hw_addr_full(s, ETH_ALEN, &a); + if (r < 0) + return r; + + *ret = a.ether; return 0; } diff --git a/src/libnm-systemd-shared/src/basic/ether-addr-util.h b/src/libnm-systemd-shared/src/basic/ether-addr-util.h index 794fc55b..32f45fe8 100644 --- a/src/libnm-systemd-shared/src/basic/ether-addr-util.h +++ b/src/libnm-systemd-shared/src/basic/ether-addr-util.h @@ -6,6 +6,9 @@ #include #include "hash-funcs.h" +#include "in-addr-util.h" +#include "macro.h" +#include "memory-util.h" /* This is MAX_ADDR_LEN as defined in linux/netdevice.h, but net/if_arp.h * defines a macro of the same name with a much lower size. */ @@ -16,29 +19,51 @@ struct hw_addr_data { union { struct ether_addr ether; uint8_t infiniband[INFINIBAND_ALEN]; + struct in_addr in; + struct in6_addr in6; uint8_t bytes[HW_ADDR_MAX_SIZE]; }; }; +int parse_hw_addr_full(const char *s, size_t expected_len, struct hw_addr_data *ret); +static inline int parse_hw_addr(const char *s, struct hw_addr_data *ret) { + return parse_hw_addr_full(s, 0, ret); +} +int parse_ether_addr(const char *s, struct ether_addr *ret); + +typedef enum HardwareAddressToStringFlags { + HW_ADDR_TO_STRING_NO_COLON = 1 << 0, +} HardwareAddressToStringFlags; + #define HW_ADDR_TO_STRING_MAX (3*HW_ADDR_MAX_SIZE) -char* hw_addr_to_string(const struct hw_addr_data *addr, char buffer[HW_ADDR_TO_STRING_MAX]); +char *hw_addr_to_string_full( + const struct hw_addr_data *addr, + HardwareAddressToStringFlags flags, + char buffer[static HW_ADDR_TO_STRING_MAX]); +static inline char *hw_addr_to_string(const struct hw_addr_data *addr, char buffer[static HW_ADDR_TO_STRING_MAX]) { + return hw_addr_to_string_full(addr, 0, buffer); +} /* Note: the lifetime of the compound literal is the immediately surrounding block, * see C11 §6.5.2.5, and * https://stackoverflow.com/questions/34880638/compound-literal-lifetime-and-if-blocks */ -#define HW_ADDR_TO_STR(hw_addr) hw_addr_to_string((hw_addr), (char[HW_ADDR_TO_STRING_MAX]){}) +#define HW_ADDR_TO_STR_FULL(hw_addr, flags) hw_addr_to_string_full((hw_addr), flags, (char[HW_ADDR_TO_STRING_MAX]){}) +#define HW_ADDR_TO_STR(hw_addr) HW_ADDR_TO_STR_FULL(hw_addr, 0) #define HW_ADDR_NULL ((const struct hw_addr_data){}) +void hw_addr_hash_func(const struct hw_addr_data *p, struct siphash *state); int hw_addr_compare(const struct hw_addr_data *a, const struct hw_addr_data *b); static inline bool hw_addr_equal(const struct hw_addr_data *a, const struct hw_addr_data *b) { return hw_addr_compare(a, b) == 0; } static inline bool hw_addr_is_null(const struct hw_addr_data *addr) { - return hw_addr_equal(addr, &HW_ADDR_NULL); + assert(addr); + return addr->length == 0 || memeqzero(addr->bytes, addr->length); } extern const struct hash_ops hw_addr_hash_ops; +extern const struct hash_ops hw_addr_hash_ops_free; #define ETHER_ADDR_FORMAT_STR "%02X%02X%02X%02X%02X%02X" #define ETHER_ADDR_FORMAT_VAL(x) (x).ether_addr_octet[0], (x).ether_addr_octet[1], (x).ether_addr_octet[2], (x).ether_addr_octet[3], (x).ether_addr_octet[4], (x).ether_addr_octet[5] @@ -60,6 +85,29 @@ static inline bool ether_addr_is_null(const struct ether_addr *addr) { return ether_addr_equal(addr, ÐER_ADDR_NULL); } -int ether_addr_from_string(const char *s, struct ether_addr *ret); +static inline bool ether_addr_is_broadcast(const struct ether_addr *addr) { + assert(addr); + return memeqbyte(0xff, addr->ether_addr_octet, ETH_ALEN); +} + +static inline bool ether_addr_is_multicast(const struct ether_addr *addr) { + assert(addr); + return FLAGS_SET(addr->ether_addr_octet[0], 0x01); +} + +static inline bool ether_addr_is_unicast(const struct ether_addr *addr) { + return !ether_addr_is_multicast(addr); +} + +static inline bool ether_addr_is_local(const struct ether_addr *addr) { + /* Determine if the Ethernet address is locally-assigned one (IEEE 802) */ + assert(addr); + return FLAGS_SET(addr->ether_addr_octet[0], 0x02); +} + +static inline bool ether_addr_is_global(const struct ether_addr *addr) { + return !ether_addr_is_local(addr); +} extern const struct hash_ops ether_addr_hash_ops; +extern const struct hash_ops ether_addr_hash_ops_free; diff --git a/src/libnm-systemd-shared/src/basic/fd-util.c b/src/libnm-systemd-shared/src/basic/fd-util.c index ee2a4caf..c3df68de 100644 --- a/src/libnm-systemd-shared/src/basic/fd-util.c +++ b/src/libnm-systemd-shared/src/basic/fd-util.c @@ -154,10 +154,7 @@ int fd_nonblock(int fd, bool nonblock) { if (nflags == flags) return 0; - if (fcntl(fd, F_SETFL, nflags) < 0) - return -errno; - - return 0; + return RET_NERRNO(fcntl(fd, F_SETFL, nflags)); } int fd_cloexec(int fd, bool cloexec) { @@ -173,10 +170,7 @@ int fd_cloexec(int fd, bool cloexec) { if (nflags == flags) return 0; - if (fcntl(fd, F_SETFD, nflags) < 0) - return -errno; - - return 0; + return RET_NERRNO(fcntl(fd, F_SETFD, nflags)); } #if 0 /* NM_IGNORED */ @@ -190,7 +184,7 @@ _pure_ static bool fd_in_set(int fd, const int fdset[], size_t n_fdset) { return false; } -static int get_max_fd(void) { +int get_max_fd(void) { struct rlimit rl; rlim_t m; @@ -211,37 +205,147 @@ static int get_max_fd(void) { return (int) (m - 1); } -int close_all_fds_full(int except[], size_t n_except, bool allow_alloc) { - static bool have_close_range = true; /* Assume we live in the future */ +static int close_all_fds_frugal(const int except[], size_t n_except) { + int max_fd, r = 0; + + assert(n_except == 0 || except); + + /* This is the inner fallback core of close_all_fds(). This never calls malloc() or opendir() or so + * and hence is safe to be called in signal handler context. Most users should call close_all_fds(), + * but when we assume we are called from signal handler context, then use this simpler call + * instead. */ + + max_fd = get_max_fd(); + if (max_fd < 0) + return max_fd; + + /* Refuse to do the loop over more too many elements. It's better to fail immediately than to + * spin the CPU for a long time. */ + if (max_fd > MAX_FD_LOOP_LIMIT) + return log_debug_errno(SYNTHETIC_ERRNO(EPERM), + "Refusing to loop over %d potential fds.", + max_fd); + + for (int fd = 3; fd >= 0; fd = fd < max_fd ? fd + 1 : -1) { + int q; + + if (fd_in_set(fd, except, n_except)) + continue; + + q = close_nointr(fd); + if (q < 0 && q != -EBADF && r >= 0) + r = q; + } + + return r; +} + +static bool have_close_range = true; /* Assume we live in the future */ + +static int close_all_fds_special_case(const int except[], size_t n_except) { + assert(n_except == 0 || except); + + /* Handles a few common special cases separately, since they are common and can be optimized really + * nicely, since we won't need sorting for them. Returns > 0 if the special casing worked, 0 + * otherwise. */ + + if (!have_close_range) + return 0; + + switch (n_except) { + + case 0: + /* Close everything. Yay! */ + + if (close_range(3, -1, 0) >= 0) + return 1; + + if (ERRNO_IS_NOT_SUPPORTED(errno) || ERRNO_IS_PRIVILEGE(errno)) { + have_close_range = false; + return 0; + } + + return -errno; + + case 1: + /* Close all but exactly one, then we don't need no sorting. This is a pretty common + * case, hence let's handle it specially. */ + + if ((except[0] <= 3 || close_range(3, except[0]-1, 0) >= 0) && + (except[0] >= INT_MAX || close_range(MAX(3, except[0]+1), -1, 0) >= 0)) + return 1; + + if (ERRNO_IS_NOT_SUPPORTED(errno) || ERRNO_IS_PRIVILEGE(errno)) { + have_close_range = false; + return 0; + } + + return -errno; + + default: + return 0; + } +} + +int close_all_fds_without_malloc(const int except[], size_t n_except) { + int r; + + assert(n_except == 0 || except); + + r = close_all_fds_special_case(except, n_except); + if (r < 0) + return r; + if (r > 0) /* special case worked! */ + return 0; + + return close_all_fds_frugal(except, n_except); +} + +int close_all_fds(const int except[], size_t n_except) { _cleanup_closedir_ DIR *d = NULL; int r = 0; assert(n_except == 0 || except); + r = close_all_fds_special_case(except, n_except); + if (r < 0) + return r; + if (r > 0) /* special case worked! */ + return 0; + if (have_close_range) { + _cleanup_free_ int *sorted_malloc = NULL; + size_t n_sorted; + int *sorted; + /* In the best case we have close_range() to close all fds between a start and an end fd, * which we can use on the "inverted" exception array, i.e. all intervals between all * adjacent pairs from the sorted exception array. This changes loop complexity from O(n) * where n is number of open fds to O(m⋅log(m)) where m is the number of fds to keep * open. Given that we assume n ≫ m that's preferable to us. */ - if (n_except == 0) { - /* Close everything. Yay! */ + assert(n_except < SIZE_MAX); + n_sorted = n_except + 1; - if (close_range(3, -1, 0) >= 0) - return 0; + if (n_sorted > 64) /* Use heap for large numbers of fds, stack otherwise */ + sorted = sorted_malloc = new(int, n_sorted); + else + sorted = newa(int, n_sorted); - if (ERRNO_IS_NOT_SUPPORTED(errno) || ERRNO_IS_PRIVILEGE(errno)) - have_close_range = false; - else - return -errno; + if (sorted) { + memcpy(sorted, except, n_except * sizeof(int)); - } else { - typesafe_qsort(except, n_except, cmp_int); + /* Let's add fd 2 to the list of fds, to simplify the loop below, as this + * allows us to cover the head of the array the same way as the body */ + sorted[n_sorted-1] = 2; - for (size_t i = 0; i < n_except; i++) { - int start = i == 0 ? 2 : MAX(except[i-1], 2); /* The first three fds shall always remain open */ - int end = MAX(except[i], 2); + typesafe_qsort(sorted, n_sorted, cmp_int); + + for (size_t i = 0; i < n_sorted-1; i++) { + int start, end; + + start = MAX(sorted[i], 2); /* The first three fds shall always remain open */ + end = MAX(sorted[i+1], 2); assert(end >= start); @@ -250,83 +354,58 @@ int close_all_fds_full(int except[], size_t n_except, bool allow_alloc) { /* Close everything between the start and end fds (both of which shall stay open) */ if (close_range(start + 1, end - 1, 0) < 0) { - if (ERRNO_IS_NOT_SUPPORTED(errno) || ERRNO_IS_PRIVILEGE(errno)) - have_close_range = false; - else + if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno)) return -errno; - goto opendir_fallback; + + have_close_range = false; + break; } } - /* The loop succeeded. Let's now close everything beyond the end */ + if (have_close_range) { + /* The loop succeeded. Let's now close everything beyond the end */ - if (except[n_except-1] >= INT_MAX) /* Don't let the addition below overflow */ - return 0; + if (sorted[n_sorted-1] >= INT_MAX) /* Dont let the addition below overflow */ + return 0; - int start = MAX(except[n_except-1], 2); + if (close_range(sorted[n_sorted-1] + 1, -1, 0) >= 0) + return 0; - if (close_range(start + 1, -1, 0) >= 0) - return 0; + if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno)) + return -errno; - if (ERRNO_IS_NOT_SUPPORTED(errno) || ERRNO_IS_PRIVILEGE(errno)) have_close_range = false; - else - return -errno; + } } - } - - /* Fallback for when close_range() is not supported */ - opendir_fallback: - d = allow_alloc ? opendir("/proc/self/fd") : NULL; - if (d) { - struct dirent *de; - - FOREACH_DIRENT(de, d, return -errno) { - int fd = -1, q; - - if (safe_atoi(de->d_name, &fd) < 0) - /* Let's better ignore this, just in case */ - continue; - if (fd < 3) - continue; - - if (fd == dirfd(d)) - continue; + /* Fallback on OOM or if close_range() is not supported */ + } - if (fd_in_set(fd, except, n_except)) - continue; + d = opendir("/proc/self/fd"); + if (!d) + return close_all_fds_frugal(except, n_except); /* ultimate fallback if /proc/ is not available */ - q = close_nointr(fd); - if (q < 0 && q != -EBADF && r >= 0) /* Valgrind has its own FD and doesn't want to have it closed */ - r = q; - } + FOREACH_DIRENT(de, d, return -errno) { + int fd = -1, q; - return r; - } - - /* Fallback for when /proc isn't available (for example in chroots) or when we cannot allocate by - * brute-forcing through the file descriptor table. */ + if (!IN_SET(de->d_type, DT_LNK, DT_UNKNOWN)) + continue; - int max_fd = get_max_fd(); - if (max_fd < 0) - return max_fd; + if (safe_atoi(de->d_name, &fd) < 0) + /* Let's better ignore this, just in case */ + continue; - /* Refuse to do the loop over more too many elements. It's better to fail immediately than to - * spin the CPU for a long time. */ - if (max_fd > MAX_FD_LOOP_LIMIT) - return log_debug_errno(SYNTHETIC_ERRNO(EPERM), - "/proc/self/fd is inaccessible. Refusing to loop over %d potential fds.", - max_fd); + if (fd < 3) + continue; - for (int fd = 3; fd >= 0; fd = fd < max_fd ? fd + 1 : -1) { - int q; + if (fd == dirfd(d)) + continue; if (fd_in_set(fd, except, n_except)) continue; q = close_nointr(fd); - if (q < 0 && q != -EBADF && r >= 0) + if (q < 0 && q != -EBADF && r >= 0) /* Valgrind has its own FD and doesn't want to have it closed */ r = q; } @@ -652,7 +731,7 @@ finish: } int fd_reopen(int fd, int flags) { - int new_fd; + int new_fd, r; /* Reopens the specified fd with new flags. This is useful for convert an O_PATH fd into a regular one, or to * turn O_RDWR fds into O_RDONLY fds. @@ -661,15 +740,28 @@ int fd_reopen(int fd, int flags) { * * This implicitly resets the file read index to 0. */ + if (FLAGS_SET(flags, O_DIRECTORY)) { + /* If we shall reopen the fd as directory we can just go via "." and thus bypass the whole + * magic /proc/ directory, and make ourselves independent of that being mounted. */ + new_fd = openat(fd, ".", flags); + if (new_fd < 0) + return -errno; + + return new_fd; + } + new_fd = open(FORMAT_PROC_FD_PATH(fd), flags); if (new_fd < 0) { if (errno != ENOENT) return -errno; - if (proc_mounted() == 0) + r = proc_mounted(); + if (r == 0) return -ENOSYS; /* if we have no /proc/, the concept is not implementable */ - return -ENOENT; + return r > 0 ? -EBADF : -ENOENT; /* If /proc/ is definitely around then this means the fd is + * not valid, otherwise let's propagate the original + * error */ } return new_fd; @@ -710,9 +802,6 @@ int btrfs_defrag_fd(int fd) { if (r < 0) return r; - if (ioctl(fd, BTRFS_IOC_DEFRAG, NULL) < 0) - return -errno; - - return 0; + return RET_NERRNO(ioctl(fd, BTRFS_IOC_DEFRAG, NULL)); } #endif /* NM_IGNORED */ diff --git a/src/libnm-systemd-shared/src/basic/fd-util.h b/src/libnm-systemd-shared/src/basic/fd-util.h index 2382d52d..f5cfcb4e 100644 --- a/src/libnm-systemd-shared/src/basic/fd-util.h +++ b/src/libnm-systemd-shared/src/basic/fd-util.h @@ -57,10 +57,10 @@ DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL); int fd_nonblock(int fd, bool nonblock); int fd_cloexec(int fd, bool cloexec); -int close_all_fds_full(int except[], size_t n_except, bool allow_alloc); -static inline int close_all_fds(int except[], size_t n_except) { - return close_all_fds_full(except, n_except, true); -} +int get_max_fd(void); + +int close_all_fds(const int except[], size_t n_except); +int close_all_fds_without_malloc(const int except[], size_t n_except); int same_fd(int a, int b); @@ -91,9 +91,10 @@ static inline int make_null_stdio(void) { /* Like TAKE_PTR() but for file descriptors, resetting them to -1 */ #define TAKE_FD(fd) \ ({ \ - int _fd_ = (fd); \ - (fd) = -1; \ - _fd_; \ + int *_fd_ = &(fd); \ + int _ret_ = *_fd_; \ + *_fd_ = -1; \ + _ret_; \ }) /* Like free_and_replace(), but for file descriptors */ diff --git a/src/libnm-systemd-shared/src/basic/fileio.c b/src/libnm-systemd-shared/src/basic/fileio.c index 322638a2..c66bc67b 100644 --- a/src/libnm-systemd-shared/src/basic/fileio.c +++ b/src/libnm-systemd-shared/src/basic/fileio.c @@ -169,7 +169,7 @@ int write_string_stream_ts( * it won't be equal to the new value. */ if (read_virtual_file_fd(fd, strlen(line)+1, &t, NULL) > 0 && streq_skip_trailing_chars(line, t, NEWLINE)) { - log_debug("No change in value '%s', supressing write", line); + log_debug("No change in value '%s', suppressing write", line); return 0; } @@ -551,12 +551,25 @@ int read_virtual_file_fd(int fd, size_t max_size, char **ret_contents, size_t *r return !truncated; } -int read_virtual_file(const char *filename, size_t max_size, char **ret_contents, size_t *ret_size) { +int read_virtual_file_at( + int dir_fd, + const char *filename, + size_t max_size, + char **ret_contents, + size_t *ret_size) { + _cleanup_close_ int fd = -1; - assert(filename); + assert(dir_fd >= 0 || dir_fd == AT_FDCWD); - fd = open(filename, O_RDONLY | O_NOCTTY | O_CLOEXEC); + if (!filename) { + if (dir_fd == AT_FDCWD) + return -EBADF; + + return read_virtual_file_fd(dir_fd, max_size, ret_contents, ret_size); + } + + fd = openat(dir_fd, filename, O_RDONLY | O_NOCTTY | O_CLOEXEC); if (fd < 0) return -errno; @@ -934,6 +947,9 @@ DIR *xopendirat(int fd, const char *name, int flags) { assert(!(flags & O_CREAT)); + if (fd == AT_FDCWD && flags == 0) + return opendir(name); + nfd = openat(fd, name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|flags, 0); if (nfd < 0) return NULL; diff --git a/src/libnm-systemd-shared/src/basic/fileio.h b/src/libnm-systemd-shared/src/basic/fileio.h index 899def94..cea3dd89 100644 --- a/src/libnm-systemd-shared/src/basic/fileio.h +++ b/src/libnm-systemd-shared/src/basic/fileio.h @@ -69,7 +69,10 @@ static inline int read_full_file(const char *filename, char **ret_contents, size } int read_virtual_file_fd(int fd, size_t max_size, char **ret_contents, size_t *ret_size); -int read_virtual_file(const char *filename, size_t max_size, char **ret_contents, size_t *ret_size); +int read_virtual_file_at(int dir_fd, const char *filename, size_t max_size, char **ret_contents, size_t *ret_size); +static inline int read_virtual_file(const char *filename, size_t max_size, char **ret_contents, size_t *ret_size) { + return read_virtual_file_at(AT_FDCWD, filename, max_size, ret_contents, ret_size); +} static inline int read_full_virtual_file(const char *filename, char **ret_contents, size_t *ret_size) { return read_virtual_file(filename, SIZE_MAX, ret_contents, ret_size); } diff --git a/src/libnm-systemd-shared/src/basic/format-util.h b/src/libnm-systemd-shared/src/basic/format-util.h index 7dd422b9..7db8b61d 100644 --- a/src/libnm-systemd-shared/src/basic/format-util.h +++ b/src/libnm-systemd-shared/src/basic/format-util.h @@ -26,11 +26,15 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); # error Unknown time_t size #endif -#if defined __x86_64__ && defined __ILP32__ +#if 0 /* NM_IGNORED */ +#if SIZEOF_TIMEX_MEMBER == 8 # define PRI_TIMEX PRIi64 -#else +#elif SIZEOF_TIMEX_MEMBER == 4 # define PRI_TIMEX "li" +#else +# error Unknown timex member size #endif +#endif /* NM_IGNORED */ #if SIZEOF_RLIM_T == 8 # define RLIM_FMT "%" PRIu64 diff --git a/src/libnm-systemd-shared/src/basic/fs-util.c b/src/libnm-systemd-shared/src/basic/fs-util.c index 3f309868..b524a6fd 100644 --- a/src/libnm-systemd-shared/src/basic/fs-util.c +++ b/src/libnm-systemd-shared/src/basic/fs-util.c @@ -14,6 +14,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" +#include "hostname-util.h" #include "log.h" #include "macro.h" #include "missing_fcntl.h" @@ -31,18 +32,13 @@ #include "strv.h" #include "time-util.h" #include "tmpfile-util.h" +#include "umask-util.h" #include "user-util.h" #include "util.h" int unlink_noerrno(const char *path) { PROTECT_ERRNO; - int r; - - r = unlink(path); - if (r < 0) - return -errno; - - return 0; + return RET_NERRNO(unlink(path)); } #if 0 /* NM_IGNORED */ @@ -59,7 +55,7 @@ int rmdir_parents(const char *path, const char *stop) { if (!path_is_safe(stop)) return -EINVAL; - p = strdupa(path); + p = strdupa_safe(path); for (;;) { char *slash = NULL; @@ -99,8 +95,8 @@ int rename_noreplace(int olddirfd, const char *oldpath, int newdirfd, const char * want — though not atomic (i.e. for a short period both the new and the old filename will exist). */ if (linkat(olddirfd, oldpath, newdirfd, newpath, 0) >= 0) { - if (unlinkat(olddirfd, oldpath, 0) < 0) { - r = -errno; /* Backup errno before the following unlinkat() alters it */ + r = RET_NERRNO(unlinkat(olddirfd, oldpath, 0)); + if (r < 0) { (void) unlinkat(newdirfd, newpath, 0); return r; } @@ -119,10 +115,7 @@ int rename_noreplace(int olddirfd, const char *oldpath, int newdirfd, const char if (errno != ENOENT) return -errno; - if (renameat(olddirfd, oldpath, newdirfd, newpath) < 0) - return -errno; - - return 0; + return RET_NERRNO(renameat(olddirfd, oldpath, newdirfd, newpath)); } #endif /* NM_IGNORED */ @@ -290,14 +283,9 @@ int fchmod_and_chown_with_fallback(int fd, const char *path, mode_t mode, uid_t } int fchmod_umask(int fd, mode_t m) { - mode_t u; - int r; - - u = umask(0777); - r = fchmod(fd, m & (~u)) < 0 ? -errno : 0; - umask(u); + _cleanup_umask_ mode_t u = umask(0777); - return r; + return RET_NERRNO(fchmod(fd, m & (~u))); } int fchmod_opath(int fd, mode_t m) { @@ -550,7 +538,6 @@ int mkfifoat_atomic(int dirfd, const char *path, mode_t mode) { int get_files_in_directory(const char *path, char ***list) { _cleanup_strv_free_ char **l = NULL; _cleanup_closedir_ DIR *d = NULL; - struct dirent *de; size_t n = 0; assert(path); @@ -830,7 +817,7 @@ int unlinkat_deallocate(int fd, const char *name, UnlinkDeallocateFlags flags) { int open_parent(const char *path, int flags, mode_t mode) { _cleanup_free_ char *parent = NULL; - int fd, r; + int r; r = path_extract_directory(path, &parent); if (r < 0) @@ -844,11 +831,7 @@ int open_parent(const char *path, int flags, mode_t mode) { else if (!FLAGS_SET(flags, O_TMPFILE)) flags |= O_DIRECTORY|O_RDONLY; - fd = open(parent, flags, mode); - if (fd < 0) - return -errno; - - return fd; + return RET_NERRNO(open(parent, flags, mode)); } #endif /* NM_IGNORED */ @@ -962,3 +945,152 @@ int posix_fallocate_loop(int fd, uint64_t offset, uint64_t size) { return -EINTR; } + +int parse_cifs_service( + const char *s, + char **ret_host, + char **ret_service, + char **ret_path) { + + _cleanup_free_ char *h = NULL, *ss = NULL, *x = NULL; + const char *p, *e, *d; + char delimiter; + + /* Parses a CIFS service in form of //host/service/path… and splitting it in three parts. The last + * part is optional, in which case NULL is returned there. To maximize compatibility syntax with + * backslashes instead of slashes is accepted too. */ + + if (!s) + return -EINVAL; + + p = startswith(s, "//"); + if (!p) { + p = startswith(s, "\\\\"); + if (!p) + return -EINVAL; + } + + delimiter = s[0]; + e = strchr(p, delimiter); + if (!e) + return -EINVAL; + + h = strndup(p, e - p); + if (!h) + return -ENOMEM; + + if (!hostname_is_valid(h, 0)) + return -EINVAL; + + e++; + + d = strchrnul(e, delimiter); + + ss = strndup(e, d - e); + if (!ss) + return -ENOMEM; + + if (!filename_is_valid(ss)) + return -EINVAL; + + if (!isempty(d)) { + x = strdup(skip_leading_chars(d, CHAR_TO_STR(delimiter))); + if (!x) + return -EINVAL; + + /* Make sure to convert Windows-style "\" → Unix-style / */ + for (char *i = x; *i; i++) + if (*i == delimiter) + *i = '/'; + + if (!path_is_valid(x)) + return -EINVAL; + + path_simplify(x); + if (!path_is_normalized(x)) + return -EINVAL; + } + + if (ret_host) + *ret_host = TAKE_PTR(h); + if (ret_service) + *ret_service = TAKE_PTR(ss); + if (ret_path) + *ret_path = TAKE_PTR(x); + + return 0; +} + +int open_mkdir_at(int dirfd, const char *path, int flags, mode_t mode) { + _cleanup_close_ int fd = -1, parent_fd = -1; + _cleanup_free_ char *fname = NULL; + bool made; + int r; + + /* Creates a directory with mkdirat() and then opens it, in the "most atomic" fashion we can + * do. Guarantees that the returned fd refers to a directory. If O_EXCL is specified will fail if the + * dir already exists. Otherwise will open an existing dir, but only if it is one. */ + + if (flags & ~(O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_EXCL|O_NOATIME|O_NOFOLLOW|O_PATH)) + return -EINVAL; + if ((flags & O_ACCMODE) != O_RDONLY) + return -EINVAL; + + /* Note that O_DIRECTORY|O_NOFOLLOW is implied, but we allow specifying it anyway. The following + * flags actually make sense to specify: O_CLOEXEC, O_EXCL, O_NOATIME, O_PATH */ + + if (isempty(path)) + return -EINVAL; + + if (!filename_is_valid(path)) { + _cleanup_free_ char *parent = NULL; + + /* If this is not a valid filename, it's a path. Let's open the parent directory then, so + * that we can pin it, and operate below it. */ + + r = path_extract_directory(path, &parent); + if (r < 0) + return r; + + r = path_extract_filename(path, &fname); + if (r < 0) + return r; + + parent_fd = openat(dirfd, parent, O_PATH|O_DIRECTORY|O_CLOEXEC); + if (parent_fd < 0) + return -errno; + + dirfd = parent_fd; + path = fname; + } + + r = RET_NERRNO(mkdirat(dirfd, path, mode)); + if (r == -EEXIST) { + if (FLAGS_SET(flags, O_EXCL)) + return -EEXIST; + + made = false; + } else if (r < 0) + return r; + else + made = true; + + fd = RET_NERRNO(openat(dirfd, path, (flags & ~O_EXCL)|O_DIRECTORY|O_NOFOLLOW)); + if (fd < 0) { + if (fd == -ENOENT) /* We got ENOENT? then someone else immediately removed it after we + * created it. In that case let's return immediately without unlinking + * anything, because there simply isn't anything to unlink anymore. */ + return -ENOENT; + if (fd == -ELOOP) /* is a symlink? exists already → created by someone else, don't unlink */ + return -EEXIST; + if (fd == -ENOTDIR) /* not a directory? exists already → created by someone else, don't unlink */ + return -EEXIST; + + if (made) + (void) unlinkat(dirfd, path, AT_REMOVEDIR); + + return fd; + } + + return TAKE_FD(fd); +} diff --git a/src/libnm-systemd-shared/src/basic/fs-util.h b/src/libnm-systemd-shared/src/basic/fs-util.h index f8a7657a..0bbb3f62 100644 --- a/src/libnm-systemd-shared/src/basic/fs-util.h +++ b/src/libnm-systemd-shared/src/basic/fs-util.h @@ -47,7 +47,7 @@ int fd_warn_permissions(const char *path, int fd); int stat_warn_permissions(const char *path, const struct stat *st); #define laccess(path, mode) \ - (faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) < 0 ? -errno : 0) + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)) int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); int touch(const char *path); @@ -106,3 +106,7 @@ static inline int conservative_rename(const char *oldpath, const char *newpath) } int posix_fallocate_loop(int fd, uint64_t offset, uint64_t size); + +int parse_cifs_service(const char *s, char **ret_host, char **ret_service, char **ret_path); + +int open_mkdir_at(int dirfd, const char *path, int flags, mode_t mode); diff --git a/src/libnm-systemd-shared/src/basic/hostname-util.c b/src/libnm-systemd-shared/src/basic/hostname-util.c index 3063cc7c..1d1c2f51 100644 --- a/src/libnm-systemd-shared/src/basic/hostname-util.c +++ b/src/libnm-systemd-shared/src/basic/hostname-util.c @@ -49,8 +49,7 @@ int gethostname_full(GetHostnameFlags flags, char **ret) { assert_se(uname(&u) >= 0); s = u.nodename; - if (isempty(s) || - (!FLAGS_SET(flags, GET_HOSTNAME_ALLOW_NONE) && streq(s, "(none)")) || + if (isempty(s) || streq(s, "(none)") || (!FLAGS_SET(flags, GET_HOSTNAME_ALLOW_LOCALHOST) && is_localhost(s)) || (FLAGS_SET(flags, GET_HOSTNAME_SHORT) && s[0] == '.')) { if (!FLAGS_SET(flags, GET_HOSTNAME_FALLBACK_DEFAULT)) diff --git a/src/libnm-systemd-shared/src/basic/hostname-util.h b/src/libnm-systemd-shared/src/basic/hostname-util.h index 0d1574db..d435bed5 100644 --- a/src/libnm-systemd-shared/src/basic/hostname-util.h +++ b/src/libnm-systemd-shared/src/basic/hostname-util.h @@ -9,10 +9,9 @@ #include "strv.h" typedef enum GetHostnameFlags { - GET_HOSTNAME_ALLOW_NONE = 1 << 0, /* accepts "(none)". */ - GET_HOSTNAME_ALLOW_LOCALHOST = 1 << 1, /* accepts "localhost" or friends. */ - GET_HOSTNAME_FALLBACK_DEFAULT = 1 << 2, /* use default hostname if no hostname is set. */ - GET_HOSTNAME_SHORT = 1 << 3, /* kills the FQDN part if present. */ + GET_HOSTNAME_ALLOW_LOCALHOST = 1 << 0, /* accepts "localhost" or friends. */ + GET_HOSTNAME_FALLBACK_DEFAULT = 1 << 1, /* use default hostname if no hostname is set. */ + GET_HOSTNAME_SHORT = 1 << 2, /* kills the FQDN part if present. */ } GetHostnameFlags; int gethostname_full(GetHostnameFlags flags, char **ret); diff --git a/src/libnm-systemd-shared/src/basic/in-addr-util.c b/src/libnm-systemd-shared/src/basic/in-addr-util.c index bd4dd8fc..1bf0764d 100644 --- a/src/libnm-systemd-shared/src/basic/in-addr-util.c +++ b/src/libnm-systemd-shared/src/basic/in-addr-util.c @@ -629,65 +629,120 @@ int in4_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mas return 0; } -#if 0 /* NM_IGNORED */ -int in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen) { +int in4_addr_mask(struct in_addr *addr, unsigned char prefixlen) { + struct in_addr mask; + assert(addr); - if (family == AF_INET) { - struct in_addr mask; + if (!in4_addr_prefixlen_to_netmask(&mask, prefixlen)) + return -EINVAL; - if (!in4_addr_prefixlen_to_netmask(&mask, prefixlen)) - return -EINVAL; + addr->s_addr &= mask.s_addr; + return 0; +} - addr->in.s_addr &= mask.s_addr; - return 0; - } +int in6_addr_mask(struct in6_addr *addr, unsigned char prefixlen) { + unsigned i; - if (family == AF_INET6) { - unsigned i; + for (i = 0; i < 16; i++) { + uint8_t mask; - for (i = 0; i < 16; i++) { - uint8_t mask; + if (prefixlen >= 8) { + mask = 0xFF; + prefixlen -= 8; + } else if (prefixlen > 0) { + mask = 0xFF << (8 - prefixlen); + prefixlen = 0; + } else { + assert(prefixlen == 0); + mask = 0; + } - if (prefixlen >= 8) { - mask = 0xFF; - prefixlen -= 8; - } else { - mask = 0xFF << (8 - prefixlen); - prefixlen = 0; - } + addr->s6_addr[i] &= mask; + } - addr->in6.s6_addr[i] &= mask; - } + return 0; +} - return 0; +#if 0 /* NM_IGNORED */ +int in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen) { + assert(addr); + + switch (family) { + case AF_INET: + return in4_addr_mask(&addr->in, prefixlen); + case AF_INET6: + return in6_addr_mask(&addr->in6, prefixlen); + default: + return -EAFNOSUPPORT; } +} - return -EAFNOSUPPORT; +int in4_addr_prefix_covers( + const struct in_addr *prefix, + unsigned char prefixlen, + const struct in_addr *address) { + + struct in_addr masked_prefix, masked_address; + int r; + + assert(prefix); + assert(address); + + masked_prefix = *prefix; + r = in4_addr_mask(&masked_prefix, prefixlen); + if (r < 0) + return r; + + masked_address = *address; + r = in4_addr_mask(&masked_address, prefixlen); + if (r < 0) + return r; + + return in4_addr_equal(&masked_prefix, &masked_address); } -int in_addr_prefix_covers(int family, - const union in_addr_union *prefix, - unsigned char prefixlen, - const union in_addr_union *address) { +int in6_addr_prefix_covers( + const struct in6_addr *prefix, + unsigned char prefixlen, + const struct in6_addr *address) { - union in_addr_union masked_prefix, masked_address; + struct in6_addr masked_prefix, masked_address; int r; assert(prefix); assert(address); masked_prefix = *prefix; - r = in_addr_mask(family, &masked_prefix, prefixlen); + r = in6_addr_mask(&masked_prefix, prefixlen); if (r < 0) return r; masked_address = *address; - r = in_addr_mask(family, &masked_address, prefixlen); + r = in6_addr_mask(&masked_address, prefixlen); if (r < 0) return r; - return in_addr_equal(family, &masked_prefix, &masked_address); + return in6_addr_equal(&masked_prefix, &masked_address); +} + +int in_addr_prefix_covers( + int family, + const union in_addr_union *prefix, + unsigned char prefixlen, + const union in_addr_union *address) { + + assert(prefix); + assert(address); + + switch (family) { + case AF_INET: + return in4_addr_prefix_covers(&prefix->in, prefixlen, &address->in); + case AF_INET6: + return in6_addr_prefix_covers(&prefix->in6, prefixlen, &address->in6); + default: + return -EAFNOSUPPORT; + } } int in_addr_parse_prefixlen(int family, const char *p, unsigned char *ret) { @@ -855,4 +910,10 @@ int in6_addr_compare_func(const struct in6_addr *a, const struct in6_addr *b) { } DEFINE_HASH_OPS(in6_addr_hash_ops, struct in6_addr, in6_addr_hash_func, in6_addr_compare_func); +DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR( + in6_addr_hash_ops_free, + struct in6_addr, + in6_addr_hash_func, + in6_addr_compare_func, + free); #endif /* NM_IGNORED */ diff --git a/src/libnm-systemd-shared/src/basic/in-addr-util.h b/src/libnm-systemd-shared/src/basic/in-addr-util.h index c74b0d51..0178391e 100644 --- a/src/libnm-systemd-shared/src/basic/in-addr-util.h +++ b/src/libnm-systemd-shared/src/basic/in-addr-util.h @@ -89,7 +89,11 @@ unsigned char in4_addr_netmask_to_prefixlen(const struct in_addr *addr); struct in_addr* in4_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned char prefixlen); int in4_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen); int in4_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask); +int in4_addr_mask(struct in_addr *addr, unsigned char prefixlen); +int in6_addr_mask(struct in6_addr *addr, unsigned char prefixlen); int in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen); +int in4_addr_prefix_covers(const struct in_addr *prefix, unsigned char prefixlen, const struct in_addr *address); +int in6_addr_prefix_covers(const struct in6_addr *prefix, unsigned char prefixlen, const struct in6_addr *address); int in_addr_prefix_covers(int family, const union in_addr_union *prefix, unsigned char prefixlen, const union in_addr_union *address); int in_addr_parse_prefixlen(int family, const char *p, unsigned char *ret); int in_addr_prefix_from_string(const char *p, int family, union in_addr_union *ret_prefix, unsigned char *ret_prefixlen); @@ -110,6 +114,13 @@ static inline size_t FAMILY_ADDRESS_SIZE(int family) { return family == AF_INET6 ? 16 : 4; } +#define FAMILY_ADDRESS_SIZE_SAFE(f) \ + ({ \ + int _f = (f); \ + _f == AF_INET ? sizeof(struct in_addr) : \ + _f == AF_INET6 ? sizeof(struct in6_addr) : 0; \ + }) + /* Workaround for clang, explicitly specify the maximum-size element here. * See also oss-fuzz#11344. */ #define IN_ADDR_NULL ((union in_addr_union) { .in6 = {} }) @@ -119,6 +130,7 @@ int in6_addr_compare_func(const struct in6_addr *a, const struct in6_addr *b); extern const struct hash_ops in_addr_data_hash_ops; extern const struct hash_ops in6_addr_hash_ops; +extern const struct hash_ops in6_addr_hash_ops_free; #define IPV4_ADDRESS_FMT_STR "%u.%u.%u.%u" #define IPV4_ADDRESS_FMT_VAL(address) \ diff --git a/src/libnm-systemd-shared/src/basic/inotify-util.c b/src/libnm-systemd-shared/src/basic/inotify-util.c index cc2a92ad..59e03e62 100644 --- a/src/libnm-systemd-shared/src/basic/inotify-util.c +++ b/src/libnm-systemd-shared/src/basic/inotify-util.c @@ -4,14 +4,26 @@ #include "fd-util.h" #include "inotify-util.h" +#include "stat-util.h" int inotify_add_watch_fd(int fd, int what, uint32_t mask) { - int wd; + int wd, r; /* This is like inotify_add_watch(), except that the file to watch is not referenced by a path, but by an fd */ wd = inotify_add_watch(fd, FORMAT_PROC_FD_PATH(what), mask); - if (wd < 0) - return -errno; + if (wd < 0) { + if (errno != ENOENT) + return -errno; + + /* Didn't work with ENOENT? If so, then either /proc/ isn't mounted, or the fd is bad */ + r = proc_mounted(); + if (r == 0) + return -ENOSYS; + if (r > 0) + return -EBADF; + + return -ENOENT; /* OK, no clue, let's propagate the original error */ + } return wd; } diff --git a/src/libnm-systemd-shared/src/basic/list.h b/src/libnm-systemd-shared/src/basic/list.h index e488fff9..f827e721 100644 --- a/src/libnm-systemd-shared/src/basic/list.h +++ b/src/libnm-systemd-shared/src/basic/list.h @@ -134,7 +134,7 @@ } while (false) #define LIST_JUST_US(name,item) \ - (!(item)->name##_prev && !(item)->name##_next) \ + (!(item)->name##_prev && !(item)->name##_next) #define LIST_FOREACH(name,i,head) \ for ((i) = (head); (i); (i) = (i)->name##_next) @@ -181,3 +181,12 @@ } \ (b) = NULL; \ } while (false) + +#define LIST_POP(name, a) \ + ({ \ + typeof(a)* _a = &(a); \ + typeof(a) _p = *_a; \ + if (_p) \ + LIST_REMOVE(name, *_a, _p); \ + _p; \ + }) diff --git a/src/libnm-systemd-shared/src/basic/log.h b/src/libnm-systemd-shared/src/basic/log.h index b11eac21..88d278fd 100644 --- a/src/libnm-systemd-shared/src/basic/log.h +++ b/src/libnm-systemd-shared/src/basic/log.h @@ -27,10 +27,14 @@ typedef enum LogTarget{ _LOG_TARGET_INVALID = -EINVAL, } LogTarget; -/* Note to readers: << and >> have lower precedence than & and | */ +/* This log level disables logging completely. It can only be passed to log_set_max_level() and cannot be + * used a regular log level. */ +#define LOG_NULL (LOG_EMERG - 1) + +/* Note to readers: << and >> have lower precedence (are evaluated earlier) than & and | */ #define SYNTHETIC_ERRNO(num) (1 << 30 | (num)) #define IS_SYNTHETIC_ERRNO(val) ((val) >> 30 & 1) -#define ERRNO_VALUE(val) (abs(val) & 255) +#define ERRNO_VALUE(val) (abs(val) & ~(1 << 30)) /* The callback function to be invoked when syntax warnings are seen * in the unit files. */ @@ -90,6 +94,7 @@ int log_open(void); void log_close(void); void log_forget_fds(void); +void log_parse_environment_variables(void); void log_parse_environment(void); #if 0 /* NM_IGNORED */ diff --git a/src/libnm-systemd-shared/src/basic/macro.h b/src/libnm-systemd-shared/src/basic/macro.h index 33d28332..79437775 100644 --- a/src/libnm-systemd-shared/src/basic/macro.h +++ b/src/libnm-systemd-shared/src/basic/macro.h @@ -25,7 +25,7 @@ #define _public_ __attribute__((__visibility__("default"))) #define _hidden_ __attribute__((__visibility__("hidden"))) #define _weakref_(x) __attribute__((__weakref__(#x))) -#define _alignas_(x) __attribute__((__aligned__(__alignof(x)))) +#define _alignas_(x) __attribute__((__aligned__(__alignof__(x)))) #define _alignptr_ __attribute__((__aligned__(sizeof(void*)))) #define _warn_unused_result_ __attribute__((__warn_unused_result__)) @@ -154,24 +154,6 @@ #define ALIGN4_PTR(p) ((void*) ALIGN4((unsigned long) (p))) #define ALIGN8_PTR(p) ((void*) ALIGN8((unsigned long) (p))) -static inline size_t ALIGN_TO(size_t l, size_t ali) { - /* Check that alignment is exponent of 2 */ -#if SIZE_MAX == UINT_MAX - assert(__builtin_popcount(ali) == 1); -#elif SIZE_MAX == ULONG_MAX - assert(__builtin_popcountl(ali) == 1); -#elif SIZE_MAX == ULLONG_MAX - assert(__builtin_popcountll(ali) == 1); -#else -#error "Unexpected size_t" -#endif - - if (l > SIZE_MAX - (ali - 1)) - return SIZE_MAX; /* indicate overflow */ - - return ((l + ali - 1) & ~(ali - 1)); -} - #define ALIGN_TO_PTR(p, ali) ((void*) ALIGN_TO((unsigned long) (p), (ali))) /* align to next higher power-of-2 (except for: 0 => 0, overflow => 0) */ @@ -355,13 +337,6 @@ static inline int __coverity_check_and_return__(int condition) { ans; \ }) -#define UPDATE_FLAG(orig, flag, b) \ - ((b) ? ((orig) | (flag)) : ((orig) & ~(flag))) -#define SET_FLAG(v, flag, b) \ - (v) = UPDATE_FLAG(v, flag, b) -#define FLAGS_SET(v, flags) \ - ((~(v) & (flags)) == 0) - #define SWAP_TWO(x, y) do { \ typeof(x) _t = (x); \ (x) = (y); \ diff --git a/src/libnm-systemd-shared/src/basic/missing_syscall.h b/src/libnm-systemd-shared/src/basic/missing_syscall.h index aeb994f0..41c83ec5 100644 --- a/src/libnm-systemd-shared/src/basic/missing_syscall.h +++ b/src/libnm-systemd-shared/src/basic/missing_syscall.h @@ -20,6 +20,7 @@ #include #endif +#include "macro.h" #include "missing_keyctl.h" #include "missing_stat.h" #include "missing_syscall_def.h" @@ -79,7 +80,8 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) { /* ======================================================================= */ #if !HAVE_GETRANDOM -static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) { +/* glibc says getrandom() returns ssize_t */ +static inline ssize_t missing_getrandom(void *buffer, size_t count, unsigned flags) { # ifdef __NR_getrandom return syscall(__NR_getrandom, buffer, count, flags); # else @@ -466,8 +468,52 @@ struct mount_attr { struct mount_attr; #endif +#ifndef MOUNT_ATTR_RDONLY +#define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ +#endif + +#ifndef MOUNT_ATTR_NOSUID +#define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */ +#endif + +#ifndef MOUNT_ATTR_NODEV +#define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files */ +#endif + +#ifndef MOUNT_ATTR_NOEXEC +#define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */ +#endif + +#ifndef MOUNT_ATTR__ATIME +#define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */ +#endif + +#ifndef MOUNT_ATTR_RELATIME +#define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */ +#endif + +#ifndef MOUNT_ATTR_NOATIME +#define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */ +#endif + +#ifndef MOUNT_ATTR_STRICTATIME +#define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */ +#endif + +#ifndef MOUNT_ATTR_NODIRATIME +#define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times */ +#endif + #ifndef MOUNT_ATTR_IDMAP -#define MOUNT_ATTR_IDMAP 0x00100000 +#define MOUNT_ATTR_IDMAP 0x00100000 /* Idmap mount to @userns_fd in struct mount_attr. */ +#endif + +#ifndef MOUNT_ATTR_NOSYMFOLLOW +#define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks */ +#endif + +#ifndef MOUNT_ATTR_SIZE_VER0 +#define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */ #endif #ifndef AT_RECURSIVE @@ -545,4 +591,20 @@ static inline int missing_move_mount( # define move_mount missing_move_mount #endif + +/* ======================================================================= */ + +#if !HAVE_GETDENTS64 + +static inline ssize_t missing_getdents64(int fd, void *buffer, size_t length) { +# if defined __NR_getdents64 && __NR_getdents64 >= 0 + return syscall(__NR_getdents64, fd, buffer, length); +# else + errno = ENOSYS; + return -1; +# endif +} + +# define getdents64 missing_getdents64 +#endif #endif /* NM_IGNORED */ diff --git a/src/libnm-systemd-shared/src/basic/parse-util.c b/src/libnm-systemd-shared/src/basic/parse-util.c index f81bf1da..4ba2657c 100644 --- a/src/libnm-systemd-shared/src/basic/parse-util.c +++ b/src/libnm-systemd-shared/src/basic/parse-util.c @@ -651,7 +651,7 @@ int parse_ip_port(const char *s, uint16_t *ret) { uint16_t l; int r; - r = safe_atou16(s, &l); + r = safe_atou16_full(s, SAFE_ATO_REFUSE_LEADING_WHITESPACE, &l); if (r < 0) return r; @@ -711,7 +711,7 @@ int parse_dev(const char *s, dev_t *ret) { if (s[n] != ':') return -EINVAL; - major = strndupa(s, n); + major = strndupa_safe(s, n); r = safe_atou(major, &x); if (r < 0) return r; @@ -772,7 +772,7 @@ int parse_loadavg_fixed_point(const char *s, loadavg_t *ret) { if (!d) return -EINVAL; - i_str = strndupa(s, d - s); + i_str = strndupa_safe(s, d - s); f_str = d + 1; r = safe_atolu_full(i_str, 10, &i); diff --git a/src/libnm-systemd-shared/src/basic/path-util.c b/src/libnm-systemd-shared/src/basic/path-util.c index 92c55048..f391848f 100644 --- a/src/libnm-systemd-shared/src/basic/path-util.c +++ b/src/libnm-systemd-shared/src/basic/path-util.c @@ -1246,8 +1246,6 @@ char *file_in_same_dir(const char *path, const char *filename) { } bool hidden_or_backup_file(const char *filename) { - const char *p; - assert(filename); if (filename[0] == '.' || @@ -1257,24 +1255,25 @@ bool hidden_or_backup_file(const char *filename) { endswith(filename, "~")) return true; - p = strrchr(filename, '.'); - if (!p) + const char *dot = strrchr(filename, '.'); + if (!dot) return false; - /* Please, let's not add more entries to the list below. If external projects think it's a good idea to come up - * with always new suffixes and that everybody else should just adjust to that, then it really should be on - * them. Hence, in future, let's not add any more entries. Instead, let's ask those packages to instead adopt - * one of the generic suffixes/prefixes for hidden files or backups, possibly augmented with an additional - * string. Specifically: there's now: + /* Please, let's not add more entries to the list below. If external projects think it's a good idea + * to come up with always new suffixes and that everybody else should just adjust to that, then it + * really should be on them. Hence, in future, let's not add any more entries. Instead, let's ask + * those packages to instead adopt one of the generic suffixes/prefixes for hidden files or backups, + * possibly augmented with an additional string. Specifically: there's now: * * The generic suffixes "~" and ".bak" for backup files * The generic prefix "." for hidden files * - * Thus, if a new package manager "foopkg" wants its own set of ".foopkg-new", ".foopkg-old", ".foopkg-dist" - * or so registered, let's refuse that and ask them to use ".foopkg.new", ".foopkg.old" or ".foopkg~" instead. + * Thus, if a new package manager "foopkg" wants its own set of ".foopkg-new", ".foopkg-old", + * ".foopkg-dist" or so registered, let's refuse that and ask them to use ".foopkg.new", + * ".foopkg.old" or ".foopkg~" instead. */ - return STR_IN_SET(p + 1, + return STR_IN_SET(dot + 1, "rpmnew", "rpmsave", "rpmorig", @@ -1296,15 +1295,16 @@ bool hidden_or_backup_file(const char *filename) { bool is_device_path(const char *path) { - /* Returns true on paths that likely refer to a device, either by path in sysfs or to something in /dev */ + /* Returns true for paths that likely refer to a device, either by path in sysfs or to something in + * /dev. */ return PATH_STARTSWITH_SET(path, "/dev/", "/sys/"); } bool valid_device_node_path(const char *path) { - /* Some superficial checks whether the specified path is a valid device node path, all without looking at the - * actual device node. */ + /* Some superficial checks whether the specified path is a valid device node path, all without + * looking at the actual device node. */ if (!PATH_STARTSWITH_SET(path, "/dev/", "/run/systemd/inaccessible/")) return false; @@ -1318,8 +1318,8 @@ bool valid_device_node_path(const char *path) { bool valid_device_allow_pattern(const char *path) { assert(path); - /* Like valid_device_node_path(), but also allows full-subsystem expressions, like DeviceAllow= and DeviceDeny= - * accept it */ + /* Like valid_device_node_path(), but also allows full-subsystem expressions like those accepted by + * DeviceAllow= and DeviceDeny=. */ if (STARTSWITH_SET(path, "block-", "char-")) return true; @@ -1412,8 +1412,8 @@ bool dot_or_dot_dot(const char *path) { #if 0 /* NM_IGNORED */ bool empty_or_root(const char *path) { - /* For operations relative to some root directory, returns true if the specified root directory is redundant, - * i.e. either / or NULL or the empty string or any equivalent. */ + /* For operations relative to some root directory, returns true if the specified root directory is + * redundant, i.e. either / or NULL or the empty string or any equivalent. */ if (isempty(path)) return true; diff --git a/src/libnm-systemd-shared/src/basic/process-util.c b/src/libnm-systemd-shared/src/basic/process-util.c index 96d0912c..70564bd3 100644 --- a/src/libnm-systemd-shared/src/basic/process-util.c +++ b/src/libnm-systemd-shared/src/basic/process-util.c @@ -187,13 +187,13 @@ static int get_process_cmdline_nulstr( return r; } -int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags, char **line) { +int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags, char **ret) { _cleanup_free_ char *t = NULL; size_t k; char *ans; - assert(line); assert(pid >= 0); + assert(ret); /* Retrieve and format a commandline. See above for discussion of retrieval options. * @@ -220,25 +220,23 @@ int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags assert(!(flags & PROCESS_CMDLINE_USE_LOCALE)); _cleanup_strv_free_ char **args = NULL; + char **p; args = strv_parse_nulstr(t, k); if (!args) return -ENOMEM; - for (size_t i = 0; args[i]; i++) { - char *e; - - e = shell_maybe_quote(args[i], shflags); - if (!e) - return -ENOMEM; + /* Drop trailing empty strings. See issue #21186. */ + STRV_FOREACH_BACKWARDS(p, args) { + if (!isempty(*p)) + break; - free_and_replace(args[i], e); + *p = mfree(*p); } - ans = strv_join(args, " "); + ans = quote_command_line(args, shflags); if (!ans) return -ENOMEM; - } else { /* Arguments are separated by NULs. Let's replace those with spaces. */ for (size_t i = 0; i < k - 1; i++) @@ -257,7 +255,7 @@ int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags ans = str_realloc(ans); } - *line = ans; + *ret = ans; return 0; } @@ -464,29 +462,29 @@ int is_kernel_thread(pid_t pid) { return !!(flags & PF_KTHREAD); } -int get_process_capeff(pid_t pid, char **capeff) { +int get_process_capeff(pid_t pid, char **ret) { const char *p; int r; - assert(capeff); assert(pid >= 0); + assert(ret); p = procfs_file_alloca(pid, "status"); - r = get_proc_field(p, "CapEff", WHITESPACE, capeff); + r = get_proc_field(p, "CapEff", WHITESPACE, ret); if (r == -ENOENT) return -ESRCH; return r; } -static int get_process_link_contents(const char *proc_file, char **name) { +static int get_process_link_contents(const char *proc_file, char **ret) { int r; assert(proc_file); - assert(name); + assert(ret); - r = readlink_malloc(proc_file, name); + r = readlink_malloc(proc_file, ret); if (r == -ENOENT) return -ESRCH; if (r < 0) @@ -495,32 +493,33 @@ static int get_process_link_contents(const char *proc_file, char **name) { return 0; } -int get_process_exe(pid_t pid, char **name) { +int get_process_exe(pid_t pid, char **ret) { const char *p; char *d; int r; assert(pid >= 0); + assert(ret); p = procfs_file_alloca(pid, "exe"); - r = get_process_link_contents(p, name); + r = get_process_link_contents(p, ret); if (r < 0) return r; - d = endswith(*name, " (deleted)"); + d = endswith(*ret, " (deleted)"); if (d) *d = '\0'; return 0; } -static int get_process_id(pid_t pid, const char *field, uid_t *uid) { +static int get_process_id(pid_t pid, const char *field, uid_t *ret) { _cleanup_fclose_ FILE *f = NULL; const char *p; int r; assert(field); - assert(uid); + assert(ret); if (pid < 0) return -EINVAL; @@ -550,60 +549,62 @@ static int get_process_id(pid_t pid, const char *field, uid_t *uid) { l[strcspn(l, WHITESPACE)] = 0; - return parse_uid(l, uid); + return parse_uid(l, ret); } } return -EIO; } -int get_process_uid(pid_t pid, uid_t *uid) { +int get_process_uid(pid_t pid, uid_t *ret) { if (pid == 0 || pid == getpid_cached()) { - *uid = getuid(); + *ret = getuid(); return 0; } - return get_process_id(pid, "Uid:", uid); + return get_process_id(pid, "Uid:", ret); } -int get_process_gid(pid_t pid, gid_t *gid) { +int get_process_gid(pid_t pid, gid_t *ret) { if (pid == 0 || pid == getpid_cached()) { - *gid = getgid(); + *ret = getgid(); return 0; } assert_cc(sizeof(uid_t) == sizeof(gid_t)); - return get_process_id(pid, "Gid:", gid); + return get_process_id(pid, "Gid:", ret); } -int get_process_cwd(pid_t pid, char **cwd) { +int get_process_cwd(pid_t pid, char **ret) { const char *p; assert(pid >= 0); + assert(ret); if (pid == 0 || pid == getpid_cached()) - return safe_getcwd(cwd); + return safe_getcwd(ret); p = procfs_file_alloca(pid, "cwd"); - return get_process_link_contents(p, cwd); + return get_process_link_contents(p, ret); } -int get_process_root(pid_t pid, char **root) { +int get_process_root(pid_t pid, char **ret) { const char *p; assert(pid >= 0); + assert(ret); p = procfs_file_alloca(pid, "root"); - return get_process_link_contents(p, root); + return get_process_link_contents(p, ret); } #define ENVIRONMENT_BLOCK_MAX (5U*1024U*1024U) -int get_process_environ(pid_t pid, char **env) { +int get_process_environ(pid_t pid, char **ret) { _cleanup_fclose_ FILE *f = NULL; _cleanup_free_ char *outcome = NULL; size_t sz = 0; @@ -611,7 +612,7 @@ int get_process_environ(pid_t pid, char **env) { int r; assert(pid >= 0); - assert(env); + assert(ret); p = procfs_file_alloca(pid, "environ"); @@ -643,7 +644,7 @@ int get_process_environ(pid_t pid, char **env) { } outcome[sz] = '\0'; - *env = TAKE_PTR(outcome); + *ret = TAKE_PTR(outcome); return 0; } @@ -702,13 +703,13 @@ int get_process_ppid(pid_t pid, pid_t *ret) { return 0; } -int get_process_umask(pid_t pid, mode_t *umask) { +int get_process_umask(pid_t pid, mode_t *ret) { _cleanup_free_ char *m = NULL; const char *p; int r; - assert(umask); assert(pid >= 0); + assert(ret); p = procfs_file_alloca(pid, "status"); @@ -716,7 +717,7 @@ int get_process_umask(pid_t pid, mode_t *umask) { if (r == -ENOENT) return -ESRCH; - return parse_mode(m, umask); + return parse_mode(m, ret); } int wait_for_terminate(pid_t pid, siginfo_t *status) { @@ -830,7 +831,7 @@ int wait_for_terminate_with_timeout(pid_t pid, usec_t timeout) { if (n >= until) break; - r = sigtimedwait(&mask, NULL, timespec_store(&ts, until - n)) < 0 ? -errno : 0; + r = RET_NERRNO(sigtimedwait(&mask, NULL, timespec_store(&ts, until - n))); /* Assuming we woke due to the child exiting. */ if (waitid(P_PID, pid, &status, WEXITED|WNOHANG) == 0) { if (status.si_pid == pid) { @@ -863,8 +864,8 @@ int wait_for_terminate_with_timeout(pid_t pid, usec_t timeout) { void sigkill_wait(pid_t pid) { assert(pid > 1); - if (kill(pid, SIGKILL) >= 0) - (void) wait_for_terminate(pid, NULL); + (void) kill(pid, SIGKILL); + (void) wait_for_terminate(pid, NULL); } void sigkill_waitp(pid_t *pid) { @@ -881,14 +882,14 @@ void sigkill_waitp(pid_t *pid) { void sigterm_wait(pid_t pid) { assert(pid > 1); - if (kill_and_sigcont(pid, SIGTERM) >= 0) - (void) wait_for_terminate(pid, NULL); + (void) kill_and_sigcont(pid, SIGTERM); + (void) wait_for_terminate(pid, NULL); } int kill_and_sigcont(pid_t pid, int sig) { int r; - r = kill(pid, sig) < 0 ? -errno : 0; + r = RET_NERRNO(kill(pid, sig)); /* If this worked, also send SIGCONT, unless we already just sent a SIGCONT, or SIGKILL was sent which isn't * affected by a process being suspended anyway. */ @@ -1064,8 +1065,8 @@ unsigned long personality_from_string(const char *p) { if (architecture == native_architecture()) return PER_LINUX; -#ifdef SECONDARY_ARCHITECTURE - if (architecture == SECONDARY_ARCHITECTURE) +#ifdef ARCHITECTURE_SECONDARY + if (architecture == ARCHITECTURE_SECONDARY) return PER_LINUX32; #endif @@ -1077,9 +1078,9 @@ const char* personality_to_string(unsigned long p) { if (p == PER_LINUX) architecture = native_architecture(); -#ifdef SECONDARY_ARCHITECTURE +#ifdef ARCHITECTURE_SECONDARY else if (p == PER_LINUX32) - architecture = SECONDARY_ARCHITECTURE; + architecture = ARCHITECTURE_SECONDARY; #endif if (architecture < 0) @@ -1150,23 +1151,6 @@ int pid_compare_func(const pid_t *a, const pid_t *b) { /* Suitable for usage in qsort() */ return CMP(*a, *b); } - -int ioprio_parse_priority(const char *s, int *ret) { - int i, r; - - assert(s); - assert(ret); - - r = safe_atoi(s, &i); - if (r < 0) - return r; - - if (!ioprio_priority_is_valid(i)) - return -EINVAL; - - *ret = i; - return 0; -} #endif /* NM_IGNORED */ /* The cached PID, possible values: @@ -1256,7 +1240,7 @@ static void restore_sigsetp(sigset_t **ssp) { int safe_fork_full( const char *name, - int except_fds[], + const int except_fds[], size_t n_except_fds, ForkFlags flags, pid_t *ret_pid) { @@ -1451,7 +1435,7 @@ int safe_fork_full( int namespace_fork( const char *outer_name, const char *inner_name, - int except_fds[], + const int except_fds[], size_t n_except_fds, ForkFlags flags, int pidns_fd, @@ -1467,8 +1451,7 @@ int namespace_fork( * process. This ensures that we are fully a member of the destination namespace, with pidns an all, so that * /proc/self/fd works correctly. */ - r = safe_fork_full(outer_name, except_fds, n_except_fds, - (flags|FORK_DEATHSIG) & ~(FORK_REOPEN_LOG|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE), ret_pid); + r = safe_fork_full(outer_name, except_fds, n_except_fds, (flags|FORK_DEATHSIG) & ~(FORK_REOPEN_LOG|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE), ret_pid); if (r < 0) return r; if (r == 0) { @@ -1513,7 +1496,7 @@ int set_oom_score_adjust(int value) { } int get_oom_score_adjust(int *ret) { - _cleanup_free_ char *t; + _cleanup_free_ char *t = NULL; int r, a; r = read_virtual_file("/proc/self/oom_score_adj", SIZE_MAX, &t, NULL); @@ -1628,14 +1611,27 @@ bool invoked_as(char *argv[], const char *token) { return strstr(last_path_component(argv[0]), token); } -static const char *const ioprio_class_table[] = { - [IOPRIO_CLASS_NONE] = "none", - [IOPRIO_CLASS_RT] = "realtime", - [IOPRIO_CLASS_BE] = "best-effort", - [IOPRIO_CLASS_IDLE] = "idle", -}; +_noreturn_ void freeze(void) { + log_close(); + + /* Make sure nobody waits for us (i.e. on one of our sockets) anymore. Note that we use + * close_all_fds_without_malloc() instead of plain close_all_fds() here, since we want this function + * to be compatible with being called from signal handlers. */ + (void) close_all_fds_without_malloc(NULL, 0); + + /* Let's not freeze right away, but keep reaping zombies. */ + for (;;) { + siginfo_t si = {}; + + if (waitid(P_ALL, 0, &si, WEXITED) < 0 && errno != EINTR) + break; + } + + /* waitid() failed with an unexpected error, things are really borked. Freeze now! */ + for (;;) + pause(); +} -DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ioprio_class, int, IOPRIO_N_CLASSES); static const char *const sigchld_code_table[] = { [CLD_EXITED] = "exited", diff --git a/src/libnm-systemd-shared/src/basic/process-util.h b/src/libnm-systemd-shared/src/basic/process-util.h index bc16d328..a957cab2 100644 --- a/src/libnm-systemd-shared/src/basic/process-util.h +++ b/src/libnm-systemd-shared/src/basic/process-util.h @@ -14,7 +14,6 @@ #include "alloc-util.h" #include "format-util.h" #include "macro.h" -#include "missing_ioprio.h" #include "time-util.h" #define procfs_file_alloca(pid, field) \ @@ -39,17 +38,17 @@ typedef enum ProcessCmdlineFlags { PROCESS_CMDLINE_QUOTE_POSIX = 1 << 3, } ProcessCmdlineFlags; -int get_process_comm(pid_t pid, char **name); -int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags, char **line); -int get_process_exe(pid_t pid, char **name); -int get_process_uid(pid_t pid, uid_t *uid); -int get_process_gid(pid_t pid, gid_t *gid); -int get_process_capeff(pid_t pid, char **capeff); -int get_process_cwd(pid_t pid, char **cwd); -int get_process_root(pid_t pid, char **root); -int get_process_environ(pid_t pid, char **environ); -int get_process_ppid(pid_t pid, pid_t *ppid); -int get_process_umask(pid_t pid, mode_t *umask); +int get_process_comm(pid_t pid, char **ret); +int get_process_cmdline(pid_t pid, size_t max_columns, ProcessCmdlineFlags flags, char **ret); +int get_process_exe(pid_t pid, char **ret); +int get_process_uid(pid_t pid, uid_t *ret); +int get_process_gid(pid_t pid, gid_t *ret); +int get_process_capeff(pid_t pid, char **ret); +int get_process_cwd(pid_t pid, char **ret); +int get_process_root(pid_t pid, char **ret); +int get_process_environ(pid_t pid, char **ret); +int get_process_ppid(pid_t pid, pid_t *ret); +int get_process_umask(pid_t pid, mode_t *ret); int wait_for_terminate(pid_t pid, siginfo_t *status); @@ -97,9 +96,6 @@ const char *personality_to_string(unsigned long); int safe_personality(unsigned long p); int opinionated_personality(unsigned long *ret); -int ioprio_class_to_string_alloc(int i, char **s); -int ioprio_class_from_string(const char *s); - const char *sigchld_code_to_string(int i) _const_; int sigchld_code_from_string(const char *s) _pure_; @@ -131,21 +127,11 @@ static inline bool sched_priority_is_valid(int i) { return i >= 0 && i <= sched_get_priority_max(SCHED_RR); } -static inline bool ioprio_class_is_valid(int i) { - return IN_SET(i, IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE); -} - -static inline bool ioprio_priority_is_valid(int i) { - return i >= 0 && i < IOPRIO_BE_NR; -} - static inline bool pid_is_valid(pid_t p) { return p > 0; } #endif /* NM_IGNORED */ -int ioprio_parse_priority(const char *s, int *ret); - pid_t getpid_cached(void); void reset_cached_pid(void); @@ -168,13 +154,13 @@ typedef enum ForkFlags { FORK_NEW_USERNS = 1 << 13, /* Run child in its own user namespace */ } ForkFlags; -int safe_fork_full(const char *name, int except_fds[], size_t n_except_fds, ForkFlags flags, pid_t *ret_pid); +int safe_fork_full(const char *name, const int except_fds[], size_t n_except_fds, ForkFlags flags, pid_t *ret_pid); static inline int safe_fork(const char *name, ForkFlags flags, pid_t *ret_pid) { return safe_fork_full(name, NULL, 0, flags, ret_pid); } -int namespace_fork(const char *outer_name, const char *inner_name, int except_fds[], size_t n_except_fds, ForkFlags flags, int pidns_fd, int mntns_fd, int netns_fd, int userns_fd, int root_fd, pid_t *ret_pid); +int namespace_fork(const char *outer_name, const char *inner_name, const int except_fds[], size_t n_except_fds, ForkFlags flags, int pidns_fd, int mntns_fd, int netns_fd, int userns_fd, int root_fd, pid_t *ret_pid); int set_oom_score_adjust(int value); int get_oom_score_adjust(int *ret); @@ -194,8 +180,9 @@ assert_cc(TASKS_MAX <= (unsigned long) PID_T_MAX); /* Like TAKE_PTR() but for child PIDs, resetting them to 0 */ #define TAKE_PID(pid) \ ({ \ - pid_t _pid_ = (pid); \ - (pid) = 0; \ + pid_t *_ppid_ = &(pid); \ + pid_t _pid_ = *_ppid_; \ + *_ppid_ = 0; \ _pid_; \ }) @@ -204,3 +191,5 @@ int pidfd_get_pid(int fd, pid_t *ret); int setpriority_closest(int priority); bool invoked_as(char *argv[], const char *token); + +_noreturn_ void freeze(void); diff --git a/src/libnm-systemd-shared/src/basic/random-util.c b/src/libnm-systemd-shared/src/basic/random-util.c index 063784dc..9832f8ef 100644 --- a/src/libnm-systemd-shared/src/basic/random-util.c +++ b/src/libnm-systemd-shared/src/basic/random-util.c @@ -163,7 +163,6 @@ int genuine_random_bytes(void *p, size_t n, RandomFlags flags) { static int have_syscall = -1; _cleanup_close_ int fd = -1; bool got_some = false; - int r; /* Gathers some high-quality randomness from the kernel (or potentially mid-quality randomness from * the CPU if the RANDOM_ALLOW_RDRAND flag is set). This call won't block, unless the RANDOM_BLOCK @@ -222,25 +221,26 @@ int genuine_random_bytes(void *p, size_t n, RandomFlags flags) { if (have_syscall != 0 && !HAS_FEATURE_MEMORY_SANITIZER) { for (;;) { + ssize_t l; #if !HAVE_GETRANDOM /* NetworkManager Note: systemd calls the syscall directly in this case. Don't add that workaround. * If you don't compile against a libc that provides getrandom(), you don't get it. */ - r = -1; + l = -1; errno = ENOSYS; #else - r = getrandom(p, n, + l = getrandom(p, n, (FLAGS_SET(flags, RANDOM_BLOCK) ? 0 : GRND_NONBLOCK) | (FLAGS_SET(flags, RANDOM_ALLOW_INSECURE) ? GRND_INSECURE : 0)); #endif - if (r > 0) { + if (l > 0) { have_syscall = true; - if ((size_t) r == n) + if ((size_t) l == n) return 0; /* Yay, success! */ - assert((size_t) r < n); - p = (uint8_t*) p + r; - n -= r; + assert((size_t) l < n); + p = (uint8_t*) p + l; + n -= l; if (FLAGS_SET(flags, RANDOM_EXTEND_WITH_PSEUDO)) { /* Fill in the remaining bytes using pseudo-random values */ @@ -257,7 +257,7 @@ int genuine_random_bytes(void *p, size_t n, RandomFlags flags) { /* Fill in the rest with /dev/urandom */ break; - } else if (r == 0) { + } else if (l == 0) { have_syscall = true; return -EIO; diff --git a/src/libnm-systemd-shared/src/basic/signal-util.c b/src/libnm-systemd-shared/src/basic/signal-util.c index f96eb4d4..6d8c9920 100644 --- a/src/libnm-systemd-shared/src/basic/signal-util.c +++ b/src/libnm-systemd-shared/src/basic/signal-util.c @@ -5,6 +5,7 @@ #include #include +#include "errno-util.h" #include "macro.h" #include "parse-util.h" #include "signal-util.h" @@ -42,10 +43,7 @@ int reset_signal_mask(void) { if (sigemptyset(&ss) < 0) return -errno; - if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0) - return -errno; - - return 0; + return RET_NERRNO(sigprocmask(SIG_SETMASK, &ss, NULL)); } int sigaction_many_internal(const struct sigaction *sa, ...) { @@ -122,7 +120,7 @@ int sigprocmask_many(int how, sigset_t *old, ...) { return 0; } -static const char *const __signal_table[] = { +static const char *const static_signal_table[] = { [SIGHUP] = "HUP", [SIGINT] = "INT", [SIGQUIT] = "QUIT", @@ -158,13 +156,13 @@ static const char *const __signal_table[] = { [SIGSYS] = "SYS" }; -DEFINE_PRIVATE_STRING_TABLE_LOOKUP(__signal, int); +DEFINE_PRIVATE_STRING_TABLE_LOOKUP(static_signal, int); const char *signal_to_string(int signo) { static thread_local char buf[STRLEN("RTMIN+") + DECIMAL_STR_MAX(int)]; const char *name; - name = __signal_to_string(signo); + name = static_signal_to_string(signo); if (name) return name; @@ -193,7 +191,7 @@ int signal_from_string(const char *s) { s += 3; /* Check that the input is a signal name. */ - signo = __signal_from_string(s); + signo = static_signal_from_string(s); if (signo > 0) return signo; @@ -250,11 +248,7 @@ int signal_is_blocked(int sig) { if (r != 0) return -r; - r = sigismember(&ss, sig); - if (r < 0) - return -errno; - - return r; + return RET_NERRNO(sigismember(&ss, sig)); } int pop_pending_signal_internal(int sig, ...) { diff --git a/src/libnm-systemd-shared/src/basic/socket-util.c b/src/libnm-systemd-shared/src/basic/socket-util.c index 49a4df44..6478fdee 100644 --- a/src/libnm-systemd-shared/src/basic/socket-util.c +++ b/src/libnm-systemd-shared/src/basic/socket-util.c @@ -405,6 +405,41 @@ const union in_addr_union *sockaddr_in_addr(const struct sockaddr *_sa) { } } +int sockaddr_set_in_addr( + union sockaddr_union *u, + int family, + const union in_addr_union *a, + uint16_t port) { + + assert(u); + assert(a); + + switch (family) { + + case AF_INET: + u->in = (struct sockaddr_in) { + .sin_family = AF_INET, + .sin_addr = a->in, + .sin_port = htobe16(port), + }; + + return 0; + + case AF_INET6: + u->in6 = (struct sockaddr_in6) { + .sin6_family = AF_INET6, + .sin6_addr = a->in6, + .sin6_port = htobe16(port), + }; + + return 0; + + default: + return -EAFNOSUPPORT; + + } +} + int sockaddr_pretty( const struct sockaddr *_sa, socklen_t salen, @@ -556,7 +591,7 @@ int getpeername_pretty(int fd, bool include_port, char **ret) { return -errno; if (sa.sa.sa_family == AF_UNIX) { - struct ucred ucred = {}; + struct ucred ucred = UCRED_INVALID; /* UNIX connection sockets are anonymous, so let's use * PID/UID as pretty credentials instead */ @@ -1238,10 +1273,7 @@ int socket_bind_to_ifname(int fd, const char *ifname) { /* Call with NULL to drop binding */ - if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen_ptr(ifname)) < 0) - return -errno; - - return 0; + return RET_NERRNO(setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen_ptr(ifname))); } int socket_bind_to_ifindex(int fd, int ifindex) { @@ -1250,13 +1282,9 @@ int socket_bind_to_ifindex(int fd, int ifindex) { assert(fd >= 0); - if (ifindex <= 0) { + if (ifindex <= 0) /* Drop binding */ - if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, NULL, 0) < 0) - return -errno; - - return 0; - } + return RET_NERRNO(setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, NULL, 0)); r = setsockopt_int(fd, SOL_SOCKET, SO_BINDTOIFINDEX, ifindex); if (r != -ENOPROTOOPT) @@ -1345,16 +1373,10 @@ int socket_set_unicast_if(int fd, int af, int ifi) { switch (af) { case AF_INET: - if (setsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex_be, sizeof(ifindex_be)) < 0) - return -errno; - - return 0; + return RET_NERRNO(setsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex_be, sizeof(ifindex_be))); case AF_INET6: - if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_IF, &ifindex_be, sizeof(ifindex_be)) < 0) - return -errno; - - return 0; + return RET_NERRNO(setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_IF, &ifindex_be, sizeof(ifindex_be))); default: return -EAFNOSUPPORT; diff --git a/src/libnm-systemd-shared/src/basic/socket-util.h b/src/libnm-systemd-shared/src/basic/socket-util.h index 4caa27c8..ddea5350 100644 --- a/src/libnm-systemd-shared/src/basic/socket-util.h +++ b/src/libnm-systemd-shared/src/basic/socket-util.h @@ -15,6 +15,7 @@ #include #include "errno-util.h" +#include "in-addr-util.h" #include "macro.h" #include "missing_network.h" #include "missing_socket.h" @@ -108,6 +109,7 @@ bool socket_ipv6_is_enabled(void); int sockaddr_port(const struct sockaddr *_sa, unsigned *port); const union in_addr_union *sockaddr_in_addr(const struct sockaddr *sa); +int sockaddr_set_in_addr(union sockaddr_union *u, int family, const union in_addr_union *a, uint16_t port); int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret); int getpeername_pretty(int fd, bool include_port, char **ret); @@ -331,3 +333,6 @@ static inline int socket_set_recvfragsize(int fd, int af, bool b) { #endif /* NM_IGNORED */ int socket_get_mtu(int fd, int af, size_t *ret); + +/* an initializer for struct ucred that initialized all fields to the invalid value appropriate for each */ +#define UCRED_INVALID { .pid = 0, .uid = UID_INVALID, .gid = GID_INVALID } diff --git a/src/libnm-systemd-shared/src/basic/sort-util.h b/src/libnm-systemd-shared/src/basic/sort-util.h index a8984fc1..28c06c40 100644 --- a/src/libnm-systemd-shared/src/basic/sort-util.h +++ b/src/libnm-systemd-shared/src/basic/sort-util.h @@ -5,14 +5,20 @@ #include "macro.h" +/* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the + * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that + * ourselves, picking a name that is obvious, but likely enough to not clash with glibc's choice of naming if + * they should ever add one. */ +typedef int (*comparison_userdata_fn_t)(const void *, const void *, void *); + void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, - __compar_d_fn_t compar, void *arg); + comparison_userdata_fn_t compar, void *arg); #define typesafe_bsearch_r(k, b, n, func, userdata) \ ({ \ const typeof(b[0]) *_k = k; \ int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \ - xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \ + xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (comparison_userdata_fn_t) _func_, userdata); \ }) /** @@ -20,7 +26,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, * that only if nmemb > 0. */ static inline void* bsearch_safe(const void *key, const void *base, - size_t nmemb, size_t size, __compar_fn_t compar) { + size_t nmemb, size_t size, comparison_fn_t compar) { if (nmemb <= 0) return NULL; @@ -32,14 +38,14 @@ static inline void* bsearch_safe(const void *key, const void *base, ({ \ const typeof(b[0]) *_k = k; \ int (*_func_)(const typeof(b[0])*, const typeof(b[0])*) = func; \ - bsearch_safe((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_fn_t) _func_); \ + bsearch_safe((const void*) _k, (b), (n), sizeof((b)[0]), (comparison_fn_t) _func_); \ }) /** * Normal qsort requires base to be nonnull. Here were require * that only if nmemb > 0. */ -static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn_t compar) { +static inline void _qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) { if (nmemb <= 1) return; @@ -52,11 +58,11 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f #define typesafe_qsort(p, n, func) \ ({ \ int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ - _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ + _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \ }) #if 0 /* NM_IGNORED */ -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { +static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) { if (nmemb <= 1) return; @@ -67,7 +73,7 @@ static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_ #define typesafe_qsort_r(p, n, func, userdata) \ ({ \ int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ + qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \ }) #endif /* NM_IGNORED */ diff --git a/src/libnm-systemd-shared/src/basic/sparse-endian.h b/src/libnm-systemd-shared/src/basic/sparse-endian.h index 9583dda9..c795d3da 100644 --- a/src/libnm-systemd-shared/src/basic/sparse-endian.h +++ b/src/libnm-systemd-shared/src/basic/sparse-endian.h @@ -55,9 +55,9 @@ typedef uint64_t __sd_bitwise be64_t; #undef le64toh #if __BYTE_ORDER == __LITTLE_ENDIAN -#define bswap_16_on_le(x) __bswap_16(x) -#define bswap_32_on_le(x) __bswap_32(x) -#define bswap_64_on_le(x) __bswap_64(x) +#define bswap_16_on_le(x) bswap_16(x) +#define bswap_32_on_le(x) bswap_32(x) +#define bswap_64_on_le(x) bswap_64(x) #define bswap_16_on_be(x) (x) #define bswap_32_on_be(x) (x) #define bswap_64_on_be(x) (x) @@ -65,9 +65,9 @@ typedef uint64_t __sd_bitwise be64_t; #define bswap_16_on_le(x) (x) #define bswap_32_on_le(x) (x) #define bswap_64_on_le(x) (x) -#define bswap_16_on_be(x) __bswap_16(x) -#define bswap_32_on_be(x) __bswap_32(x) -#define bswap_64_on_be(x) __bswap_64(x) +#define bswap_16_on_be(x) bswap_16(x) +#define bswap_32_on_be(x) bswap_32(x) +#define bswap_64_on_be(x) bswap_64(x) #endif static inline le16_t htole16(uint16_t value) { return (le16_t __sd_force) bswap_16_on_be(value); } diff --git a/src/libnm-systemd-shared/src/basic/stat-util.c b/src/libnm-systemd-shared/src/basic/stat-util.c index 133828bc..8126ce08 100644 --- a/src/libnm-systemd-shared/src/basic/stat-util.c +++ b/src/libnm-systemd-shared/src/basic/stat-util.c @@ -15,10 +15,13 @@ #include "errno-util.h" #include "fd-util.h" #include "fileio.h" +#include "filesystems.h" +#include "fs-util.h" #include "macro.h" #include "missing_fs.h" #include "missing_magic.h" #include "missing_syscall.h" +#include "nulstr-util.h" #include "parse-util.h" #include "stat-util.h" #include "string-util.h" @@ -75,27 +78,41 @@ int is_device_node(const char *path) { int dir_is_empty_at(int dir_fd, const char *path) { _cleanup_close_ int fd = -1; - _cleanup_closedir_ DIR *d = NULL; + /* Allocate space for at least 3 full dirents, since every dir has at least two entries ("." + + * ".."), and only once we have seen if there's a third we know whether the dir is empty or not. */ + DEFINE_DIRENT_BUFFER(buffer, 3); struct dirent *de; + ssize_t n; if (path) { + assert(dir_fd >= 0 || dir_fd == AT_FDCWD); + fd = openat(dir_fd, path, O_RDONLY|O_DIRECTORY|O_CLOEXEC); if (fd < 0) return -errno; + } else if (dir_fd == AT_FDCWD) { + fd = open(".", O_RDONLY|O_DIRECTORY|O_CLOEXEC); + if (fd < 0) + return -errno; } else { - /* Note that DUPing is not enough, as the internal pointer - * would still be shared and moved by FOREACH_DIRENT. */ - fd = fd_reopen(dir_fd, O_CLOEXEC); + /* Note that DUPing is not enough, as the internal pointer would still be shared and moved + * getedents64(). */ + assert(dir_fd >= 0); + + fd = fd_reopen(dir_fd, O_RDONLY|O_DIRECTORY|O_CLOEXEC); if (fd < 0) return fd; } - d = take_fdopendir(&fd); - if (!d) + n = getdents64(fd, &buffer, sizeof(buffer)); + if (n < 0) return -errno; - FOREACH_DIRENT(de, d, return -errno) - return 0; + msan_unpoison(&buffer, n); + + FOREACH_DIRENT_IN_BUFFER(de, &buffer.de, n) + if (!dot_or_dot_dot(de->d_name)) + return 0; return 1; } @@ -178,7 +195,6 @@ int files_same(const char *filea, const char *fileb, int flags) { a.st_ino == b.st_ino; } -#if 0 /* NM_IGNORED */ bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) { assert(s); assert_cc(sizeof(statfs_f_type_t) >= sizeof(s->f_type)); @@ -186,6 +202,7 @@ bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) { return F_TYPE_EQUAL(s->f_type, magic_value); } +#if 0 /* NM_IGNORED */ int fd_is_fs_type(int fd, statfs_f_type_t magic_value) { struct statfs s; @@ -194,6 +211,7 @@ int fd_is_fs_type(int fd, statfs_f_type_t magic_value) { return is_fs_type(&s, magic_value); } +#endif /* NM_IGNORE */ int path_is_fs_type(const char *path, statfs_f_type_t magic_value) { struct statfs s; @@ -204,20 +222,13 @@ int path_is_fs_type(const char *path, statfs_f_type_t magic_value) { return is_fs_type(&s, magic_value); } +#if 0 /* NM_IGNORE */ bool is_temporary_fs(const struct statfs *s) { - return is_fs_type(s, TMPFS_MAGIC) || - is_fs_type(s, RAMFS_MAGIC); + return fs_in_group(s, FILESYSTEM_SET_TEMPORARY); } bool is_network_fs(const struct statfs *s) { - return is_fs_type(s, CIFS_MAGIC_NUMBER) || - is_fs_type(s, CODA_SUPER_MAGIC) || - is_fs_type(s, NCP_SUPER_MAGIC) || - is_fs_type(s, NFS_SUPER_MAGIC) || - is_fs_type(s, SMB_SUPER_MAGIC) || - is_fs_type(s, V9FS_MAGIC) || - is_fs_type(s, AFS_SUPER_MAGIC) || - is_fs_type(s, OCFS2_SUPER_MAGIC); + return fs_in_group(s, FILESYSTEM_SET_NETWORK); } int fd_is_temporary_fs(int fd) { @@ -395,6 +406,7 @@ int device_path_parse_major_minor(const char *path, mode_t *ret_mode, dev_t *ret return 0; } +#endif /* NM_IGNORED */ int proc_mounted(void) { int r; @@ -408,6 +420,7 @@ int proc_mounted(void) { return r; } +#if 0 /* NM_IGNORED */ bool stat_inode_unmodified(const struct stat *a, const struct stat *b) { /* Returns if the specified stat structures reference the same, unmodified inode. This check tries to diff --git a/src/libnm-systemd-shared/src/basic/string-util.h b/src/libnm-systemd-shared/src/basic/string-util.h index 775d694c..a1d88fbb 100644 --- a/src/libnm-systemd-shared/src/basic/string-util.h +++ b/src/libnm-systemd-shared/src/basic/string-util.h @@ -60,6 +60,10 @@ static inline const char *empty_to_null(const char *p) { return isempty(p) ? NULL : p; } +static inline const char *empty_to_na(const char *p) { + return isempty(p) ? "n/a" : p; +} + static inline const char *empty_to_dash(const char *str) { return isempty(str) ? "-" : str; } diff --git a/src/libnm-systemd-shared/src/basic/strv.c b/src/libnm-systemd-shared/src/basic/strv.c index 1d840923..3e0faf95 100644 --- a/src/libnm-systemd-shared/src/basic/strv.c +++ b/src/libnm-systemd-shared/src/basic/strv.c @@ -18,7 +18,7 @@ #include "string-util.h" #include "strv.h" -char *strv_find(char * const *l, const char *name) { +char* strv_find(char * const *l, const char *name) { char * const *i; assert(name); @@ -30,7 +30,7 @@ char *strv_find(char * const *l, const char *name) { return NULL; } -char *strv_find_case(char * const *l, const char *name) { +char* strv_find_case(char * const *l, const char *name) { char * const *i; assert(name); @@ -42,7 +42,7 @@ char *strv_find_case(char * const *l, const char *name) { return NULL; } -char *strv_find_prefix(char * const *l, const char *name) { +char* strv_find_prefix(char * const *l, const char *name) { char * const *i; assert(name); @@ -54,7 +54,7 @@ char *strv_find_prefix(char * const *l, const char *name) { return NULL; } -char *strv_find_startswith(char * const *l, const char *name) { +char* strv_find_startswith(char * const *l, const char *name) { char * const *i, *e; assert(name); @@ -71,19 +71,17 @@ char *strv_find_startswith(char * const *l, const char *name) { return NULL; } -char **strv_free(char **l) { - char **k; - +char** strv_free(char **l) { if (!l) return NULL; - for (k = l; *k; k++) + for (char **k = l; *k; k++) free(*k); return mfree(l); } -char **strv_free_erase(char **l) { +char** strv_free_erase(char **l) { char **i; STRV_FOREACH(i, l) @@ -92,7 +90,7 @@ char **strv_free_erase(char **l) { return mfree(l); } -char **strv_copy(char * const *l) { +char** strv_copy(char * const *l) { char **r, **k; k = r = new(char*, strv_length(l) + 1); @@ -124,7 +122,7 @@ size_t strv_length(char * const *l) { return n; } -char **strv_new_ap(const char *x, va_list ap) { +char** strv_new_ap(const char *x, va_list ap) { _cleanup_strv_free_ char **a = NULL; size_t n = 0, i = 0; va_list aq; @@ -163,7 +161,7 @@ char **strv_new_ap(const char *x, va_list ap) { return TAKE_PTR(a); } -char **strv_new_internal(const char *x, ...) { +char** strv_new_internal(const char *x, ...) { char **r; va_list ap; @@ -176,7 +174,7 @@ char **strv_new_internal(const char *x, ...) { int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates) { char * const *s, **t; - size_t p, q, i = 0, j; + size_t p, q, i = 0; assert(a); @@ -197,7 +195,6 @@ int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates) { *a = t; STRV_FOREACH(s, b) { - if (filter_duplicates && strv_contains(t, *s)) continue; @@ -214,7 +211,7 @@ int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates) { return (int) i; rollback: - for (j = 0; j < i; j++) + for (size_t j = 0; j < i; j++) free(t[p + j]); t[p] = NULL; @@ -289,7 +286,6 @@ int strv_split_full(char ***t, const char *s, const char *separators, ExtractFla return -ENOMEM; l[n++] = TAKE_PTR(word); - l[n] = NULL; } @@ -376,7 +372,7 @@ int strv_split_colon_pairs(char ***t, const char *s) { } #endif /* NM_IGNORED */ -char *strv_join_full(char * const *l, const char *separator, const char *prefix, bool unescape_separators) { +char* strv_join_full(char * const *l, const char *separator, const char *prefix, bool unescape_separators) { char * const *s; char *r, *e; size_t n, k, m; @@ -483,7 +479,7 @@ int strv_push_pair(char ***l, char *a, char *b) { int strv_insert(char ***l, size_t position, char *value) { char **c; - size_t n, m, i; + size_t n, m; if (!value) return 0; @@ -500,18 +496,14 @@ int strv_insert(char ***l, size_t position, char *value) { if (!c) return -ENOMEM; - for (i = 0; i < position; i++) + for (size_t i = 0; i < position; i++) c[i] = (*l)[i]; c[position] = value; - for (i = position; i < n; i++) + for (size_t i = position; i < n; i++) c[i+1] = (*l)[i]; - c[n+1] = NULL; - free(*l); - *l = c; - - return 0; + return free_and_replace(*l, c); } int strv_consume(char ***l, char *value) { @@ -608,7 +600,7 @@ int strv_extend_front(char ***l, const char *value) { return 0; } -char **strv_uniq(char **l) { +char** strv_uniq(char **l) { char **i; /* Drops duplicate entries. The first identical string will be @@ -630,7 +622,7 @@ bool strv_is_uniq(char * const *l) { return true; } -char **strv_remove(char **l, const char *s) { +char** strv_remove(char **l, const char *s) { char **f, **t; if (!l) @@ -651,7 +643,7 @@ char **strv_remove(char **l, const char *s) { return l; } -char **strv_parse_nulstr(const char *s, size_t l) { +char** strv_parse_nulstr(const char *s, size_t l) { /* l is the length of the input data, which will be split at NULs into * elements of the resulting strv. Hence, the number of items in the resulting strv * will be equal to one plus the number of NUL bytes in the l bytes starting at s, @@ -663,7 +655,6 @@ char **strv_parse_nulstr(const char *s, size_t l) { * empty strings in s. */ - const char *p; size_t c = 0, i = 0; char **v; @@ -672,7 +663,7 @@ char **strv_parse_nulstr(const char *s, size_t l) { if (l <= 0) return new0(char*, 1); - for (p = s; p < s + l; p++) + for (const char *p = s; p < s + l; p++) if (*p == 0) c++; @@ -683,8 +674,7 @@ char **strv_parse_nulstr(const char *s, size_t l) { if (!v) return NULL; - p = s; - while (p < s + l) { + for (const char *p = s; p < s + l; ) { const char *e; e = memchr(p, 0, s + l - p); @@ -709,7 +699,7 @@ char **strv_parse_nulstr(const char *s, size_t l) { } #if 0 /* NM_IGNORED */ -char **strv_split_nulstr(const char *s) { +char** strv_split_nulstr(const char *s) { const char *i; char **r = NULL; @@ -786,7 +776,7 @@ static int str_compare(char * const *a, char * const *b) { return strcmp(*a, *b); } -char **strv_sort(char **l) { +char** strv_sort(char **l) { typesafe_qsort(l, strv_length(l), str_compare); return l; } @@ -836,21 +826,21 @@ int strv_extendf(char ***l, const char *format, ...) { return strv_consume(l, x); } -char **strv_reverse(char **l) { - size_t n, i; +char** strv_reverse(char **l) { + size_t n; n = strv_length(l); if (n <= 1) return l; - for (i = 0; i < n / 2; i++) + for (size_t i = 0; i < n / 2; i++) SWAP_TWO(l[i], l[n-1-i]); return l; } #if 0 /* NM_IGNORED */ -char **strv_shell_escape(char **l, const char *bad) { +char** strv_shell_escape(char **l, const char *bad) { char **s; /* Escapes every character in every string in l that is in bad, @@ -882,19 +872,7 @@ bool strv_fnmatch_full(char* const* patterns, const char *s, int flags, size_t * return false; } -char ***strv_free_free(char ***l) { - char ***i; - - if (!l) - return NULL; - - for (i = l; *i; i++) - strv_free(*i); - - return mfree(l); -} - -char **strv_skip(char **l, size_t n) { +char** strv_skip(char **l, size_t n) { while (n > 0) { if (strv_isempty(l)) @@ -907,7 +885,7 @@ char **strv_skip(char **l, size_t n) { } int strv_extend_n(char ***l, const char *value, size_t n) { - size_t i, j, k; + size_t i, k; char **nl; assert(l); @@ -934,15 +912,15 @@ int strv_extend_n(char ***l, const char *value, size_t n) { if (!nl[i]) goto rollback; } - nl[i] = NULL; + return 0; rollback: - for (j = k; j < i; j++) + for (size_t j = k; j < i; j++) free(nl[j]); - nl[k] = NULL; + return -ENOMEM; } diff --git a/src/libnm-systemd-shared/src/basic/strv.h b/src/libnm-systemd-shared/src/basic/strv.h index a56ef941..092d40c8 100644 --- a/src/libnm-systemd-shared/src/basic/strv.h +++ b/src/libnm-systemd-shared/src/basic/strv.h @@ -13,23 +13,23 @@ #include "macro.h" #include "string-util.h" -char *strv_find(char * const *l, const char *name) _pure_; -char *strv_find_case(char * const *l, const char *name) _pure_; -char *strv_find_prefix(char * const *l, const char *name) _pure_; -char *strv_find_startswith(char * const *l, const char *name) _pure_; +char* strv_find(char * const *l, const char *name) _pure_; +char* strv_find_case(char * const *l, const char *name) _pure_; +char* strv_find_prefix(char * const *l, const char *name) _pure_; +char* strv_find_startswith(char * const *l, const char *name) _pure_; #define strv_contains(l, s) (!!strv_find((l), (s))) #define strv_contains_case(l, s) (!!strv_find_case((l), (s))) -char **strv_free(char **l); +char** strv_free(char **l); DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free); #define _cleanup_strv_free_ _cleanup_(strv_freep) -char **strv_free_erase(char **l); +char** strv_free_erase(char **l); DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free_erase); #define _cleanup_strv_free_erase_ _cleanup_(strv_free_erasep) -char **strv_copy(char * const *l); +char** strv_copy(char * const *l); size_t strv_length(char * const *l) _pure_; int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates); @@ -50,8 +50,8 @@ int strv_consume(char ***l, char *value); int strv_consume_pair(char ***l, char *a, char *b); int strv_consume_prepend(char ***l, char *value); -char **strv_remove(char **l, const char *s); -char **strv_uniq(char **l); +char** strv_remove(char **l, const char *s); +char** strv_uniq(char **l); bool strv_is_uniq(char * const *l); int strv_compare(char * const *a, char * const *b); @@ -59,8 +59,8 @@ static inline bool strv_equal(char * const *a, char * const *b) { return strv_compare(a, b) == 0; } -char **strv_new_internal(const char *x, ...) _sentinel_; -char **strv_new_ap(const char *x, va_list ap); +char** strv_new_internal(const char *x, ...) _sentinel_; +char** strv_new_ap(const char *x, va_list ap); #define strv_new(...) strv_new_internal(__VA_ARGS__, NULL) #define STRV_IGNORE ((const char *) POINTER_MAX) @@ -74,7 +74,7 @@ static inline bool strv_isempty(char * const *l) { } int strv_split_full(char ***t, const char *s, const char *separators, ExtractFlags flags); -static inline char **strv_split(const char *s, const char *separators) { +static inline char** strv_split(const char *s, const char *separators) { char **ret; if (strv_split_full(&ret, s, separators, 0) < 0) @@ -87,7 +87,7 @@ int strv_split_and_extend_full(char ***t, const char *s, const char *separators, #define strv_split_and_extend(t, s, sep, dup) strv_split_and_extend_full(t, s, sep, dup, 0) int strv_split_newlines_full(char ***ret, const char *s, ExtractFlags flags); -static inline char **strv_split_newlines(const char *s) { +static inline char** strv_split_newlines(const char *s) { char **ret; if (strv_split_newlines_full(&ret, s, 0) < 0) @@ -101,13 +101,13 @@ static inline char **strv_split_newlines(const char *s) { * string in the vector is an empty string. */ int strv_split_colon_pairs(char ***t, const char *s); -char *strv_join_full(char * const *l, const char *separator, const char *prefix, bool escape_separtor); +char* strv_join_full(char * const *l, const char *separator, const char *prefix, bool escape_separtor); static inline char *strv_join(char * const *l, const char *separator) { return strv_join_full(l, separator, NULL, false); } -char **strv_parse_nulstr(const char *s, size_t l); -char **strv_split_nulstr(const char *s); +char** strv_parse_nulstr(const char *s, size_t l); +char** strv_split_nulstr(const char *s); int strv_make_nulstr(char * const *l, char **p, size_t *n); static inline int strv_from_nulstr(char ***a, const char *nulstr) { @@ -136,7 +136,7 @@ bool strv_overlap(char * const *a, char * const *b) _pure_; #define STRV_FOREACH_PAIR(x, y, l) \ for ((x) = (l), (y) = (x) ? (x+1) : NULL; (x) && *(x) && *(y); (x) += 2, (y) = (x + 1)) -char **strv_sort(char **l); +char** strv_sort(char **l); void strv_print(char * const *l); #define strv_from_stdarg_alloca(first) \ @@ -206,13 +206,16 @@ void strv_print(char * const *l); _found; \ }) -#define FOREACH_STRING(x, y, ...) \ - for (char **_l = STRV_MAKE(({ x = y; }), ##__VA_ARGS__); \ +#define _FOREACH_STRING(uniq, x, y, ...) \ + for (char **UNIQ_T(l, uniq) = STRV_MAKE(({ x = y; }), ##__VA_ARGS__); \ x; \ - x = *(++_l)) + x = *(++UNIQ_T(l, uniq))) -char **strv_reverse(char **l); -char **strv_shell_escape(char **l, const char *bad); +#define FOREACH_STRING(x, y, ...) \ + _FOREACH_STRING(UNIQ, x, y, ##__VA_ARGS__) + +char** strv_reverse(char **l); +char** strv_shell_escape(char **l, const char *bad); bool strv_fnmatch_full(char* const* patterns, const char *s, int flags, size_t *matched_pos); static inline bool strv_fnmatch(char* const* patterns, const char *s) { @@ -225,10 +228,7 @@ static inline bool strv_fnmatch_or_empty(char* const* patterns, const char *s, i strv_fnmatch_full(patterns, s, flags, NULL); } -char ***strv_free_free(char ***l); -DEFINE_TRIVIAL_CLEANUP_FUNC(char***, strv_free_free); - -char **strv_skip(char **l, size_t n); +char** strv_skip(char **l, size_t n); int strv_extend_n(char ***l, const char *value, size_t n); diff --git a/src/libnm-systemd-shared/src/basic/strxcpyx.c b/src/libnm-systemd-shared/src/basic/strxcpyx.c index 39aebb88..2788dd82 100644 --- a/src/libnm-systemd-shared/src/basic/strxcpyx.c +++ b/src/libnm-systemd-shared/src/basic/strxcpyx.c @@ -17,57 +17,73 @@ #include #include +#include "string-util.h" #include "strxcpyx.h" -size_t strnpcpy(char **dest, size_t size, const char *src, size_t len) { +size_t strnpcpy_full(char **dest, size_t size, const char *src, size_t len, bool *ret_truncated) { + bool truncated = false; + assert(dest); assert(src); - if (size == 0) + if (size == 0) { + if (ret_truncated) + *ret_truncated = len > 0; return 0; + } if (len >= size) { if (size > 1) *dest = mempcpy(*dest, src, size-1); size = 0; + truncated = true; } else if (len > 0) { *dest = mempcpy(*dest, src, len); size -= len; } + if (ret_truncated) + *ret_truncated = truncated; + *dest[0] = '\0'; return size; } -size_t strpcpy(char **dest, size_t size, const char *src) { +size_t strpcpy_full(char **dest, size_t size, const char *src, bool *ret_truncated) { assert(dest); assert(src); - return strnpcpy(dest, size, src, strlen(src)); + return strnpcpy_full(dest, size, src, strlen(src), ret_truncated); } -size_t strpcpyf(char **dest, size_t size, const char *src, ...) { +size_t strpcpyf_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) { + bool truncated = false; va_list va; int i; assert(dest); assert(src); - if (size == 0) - return 0; - va_start(va, src); i = vsnprintf(*dest, size, src, va); - if (i < (int)size) { + va_end(va); + + if (i < (int) size) { *dest += i; size -= i; - } else + } else { size = 0; - va_end(va); + truncated = i > 0; + } + + if (ret_truncated) + *ret_truncated = truncated; + return size; } -size_t strpcpyl(char **dest, size_t size, const char *src, ...) { +size_t strpcpyl_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) { + bool truncated = false; va_list va; assert(dest); @@ -75,31 +91,38 @@ size_t strpcpyl(char **dest, size_t size, const char *src, ...) { va_start(va, src); do { - size = strpcpy(dest, size, src); + bool t; + + size = strpcpy_full(dest, size, src, &t); + truncated = truncated || t; src = va_arg(va, char *); } while (src); va_end(va); + + if (ret_truncated) + *ret_truncated = truncated; return size; } -size_t strnscpy(char *dest, size_t size, const char *src, size_t len) { +size_t strnscpy_full(char *dest, size_t size, const char *src, size_t len, bool *ret_truncated) { char *s; assert(dest); assert(src); s = dest; - return strnpcpy(&s, size, src, len); + return strnpcpy_full(&s, size, src, len, ret_truncated); } -size_t strscpy(char *dest, size_t size, const char *src) { +size_t strscpy_full(char *dest, size_t size, const char *src, bool *ret_truncated) { assert(dest); assert(src); - return strnscpy(dest, size, src, strlen(src)); + return strnscpy_full(dest, size, src, strlen(src), ret_truncated); } -size_t strscpyl(char *dest, size_t size, const char *src, ...) { +size_t strscpyl_full(char *dest, size_t size, bool *ret_truncated, const char *src, ...) { + bool truncated = false; va_list va; char *s; @@ -109,10 +132,16 @@ size_t strscpyl(char *dest, size_t size, const char *src, ...) { va_start(va, src); s = dest; do { - size = strpcpy(&s, size, src); + bool t; + + size = strpcpy_full(&s, size, src, &t); + truncated = truncated || t; src = va_arg(va, char *); } while (src); va_end(va); + if (ret_truncated) + *ret_truncated = truncated; + return size; } diff --git a/src/libnm-systemd-shared/src/basic/strxcpyx.h b/src/libnm-systemd-shared/src/basic/strxcpyx.h index cdef492d..4a648ed0 100644 --- a/src/libnm-systemd-shared/src/basic/strxcpyx.h +++ b/src/libnm-systemd-shared/src/basic/strxcpyx.h @@ -1,14 +1,33 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once +#include #include #include "macro.h" -size_t strnpcpy(char **dest, size_t size, const char *src, size_t len); -size_t strpcpy(char **dest, size_t size, const char *src); -size_t strpcpyf(char **dest, size_t size, const char *src, ...) _printf_(3, 4); -size_t strpcpyl(char **dest, size_t size, const char *src, ...) _sentinel_; -size_t strnscpy(char *dest, size_t size, const char *src, size_t len); -size_t strscpy(char *dest, size_t size, const char *src); -size_t strscpyl(char *dest, size_t size, const char *src, ...) _sentinel_; +size_t strnpcpy_full(char **dest, size_t size, const char *src, size_t len, bool *ret_truncated); +static inline size_t strnpcpy(char **dest, size_t size, const char *src, size_t len) { + return strnpcpy_full(dest, size, src, len, NULL); +} +size_t strpcpy_full(char **dest, size_t size, const char *src, bool *ret_truncated); +static inline size_t strpcpy(char **dest, size_t size, const char *src) { + return strpcpy_full(dest, size, src, NULL); +} +size_t strpcpyf_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) _printf_(4, 5); +#define strpcpyf(dest, size, src, ...) \ + strpcpyf_full((dest), (size), NULL, (src), ##__VA_ARGS__) +size_t strpcpyl_full(char **dest, size_t size, bool *ret_truncated, const char *src, ...) _sentinel_; +#define strpcpyl(dest, size, src, ...) \ + strpcpyl_full((dest), (size), NULL, (src), ##__VA_ARGS__) +size_t strnscpy_full(char *dest, size_t size, const char *src, size_t len, bool *ret_truncated); +static inline size_t strnscpy(char *dest, size_t size, const char *src, size_t len) { + return strnscpy_full(dest, size, src, len, NULL); +} +size_t strscpy_full(char *dest, size_t size, const char *src, bool *ret_truncated); +static inline size_t strscpy(char *dest, size_t size, const char *src) { + return strscpy_full(dest, size, src, NULL); +} +size_t strscpyl_full(char *dest, size_t size, bool *ret_truncated, const char *src, ...) _sentinel_; +#define strscpyl(dest, size, src, ...) \ + strscpyl_full(dest, size, NULL, src, ##__VA_ARGS__) diff --git a/src/libnm-systemd-shared/src/basic/time-util.c b/src/libnm-systemd-shared/src/basic/time-util.c index 21e7b24a..d7ea2b38 100644 --- a/src/libnm-systemd-shared/src/basic/time-util.c +++ b/src/libnm-systemd-shared/src/basic/time-util.c @@ -271,7 +271,6 @@ struct timespec *timespec_store_nsec(struct timespec *ts, nsec_t n) { return ts; } -#if 0 /* NM_IGNORED */ usec_t timeval_load(const struct timeval *tv) { assert(tv); @@ -286,6 +285,7 @@ usec_t timeval_load(const struct timeval *tv) { (usec_t) tv->tv_usec; } +#if 0 /* NM_IGNORED */ struct timeval *timeval_store(struct timeval *tv, usec_t u) { assert(tv); @@ -676,7 +676,7 @@ static int parse_timestamp_impl(const char *t, usec_t *usec, bool with_tz) { goto finish; } else if ((k = endswith(t, " ago"))) { - t = strndupa(t, k - t); + t = strndupa_safe(t, k - t); r = parse_sec(t, &minus); if (r < 0) @@ -685,7 +685,7 @@ static int parse_timestamp_impl(const char *t, usec_t *usec, bool with_tz) { goto finish; } else if ((k = endswith(t, " left"))) { - t = strndupa(t, k - t); + t = strndupa_safe(t, k - t); r = parse_sec(t, &plus); if (r < 0) @@ -697,7 +697,7 @@ static int parse_timestamp_impl(const char *t, usec_t *usec, bool with_tz) { /* See if the timestamp is suffixed with UTC */ utc = endswith_no_case(t, " UTC"); if (utc) - t = strndupa(t, utc - t); + t = strndupa_safe(t, utc - t); else { const char *e = NULL; int j; @@ -728,7 +728,7 @@ static int parse_timestamp_impl(const char *t, usec_t *usec, bool with_tz) { if (IN_SET(j, 0, 1)) { /* Found one of the two timezones specified. */ - t = strndupa(t, e - t - 1); + t = strndupa_safe(t, e - t - 1); dst = j; tzn = tzname[j]; } @@ -929,7 +929,7 @@ int parse_timestamp(const char *t, usec_t *usec) { /* Cut off the timezone if we don't need it. */ if (with_tz) - t = strndupa(t, last_space - t); + t = strndupa_safe(t, last_space - t); shared->return_value = parse_timestamp_impl(t, &shared->usec, with_tz); diff --git a/src/libnm-systemd-shared/src/basic/tmpfile-util.c b/src/libnm-systemd-shared/src/basic/tmpfile-util.c index 8a6404d3..dc5a49e2 100644 --- a/src/libnm-systemd-shared/src/basic/tmpfile-util.c +++ b/src/libnm-systemd-shared/src/basic/tmpfile-util.c @@ -67,16 +67,9 @@ int fopen_temporary(const char *path, FILE **ret_f, char **ret_temp_path) { /* This is much like mkostemp() but is subject to umask(). */ int mkostemp_safe(char *pattern) { - int fd = -1; /* avoid false maybe-uninitialized warning */ - assert(pattern); - - RUN_WITH_UMASK(0077) - fd = mkostemp(pattern, O_CLOEXEC); - if (fd < 0) - return -errno; - - return fd; + BLOCK_WITH_UMASK(0077); + return RET_NERRNO(mkostemp(pattern, O_CLOEXEC)); } #if 0 /* NM_IGNORED */ @@ -288,8 +281,6 @@ int open_tmpfile_linkable(const char *target, int flags, char **ret_path) { } int link_tmpfile(int fd, const char *path, const char *target) { - int r; - assert(fd >= 0); assert(target); @@ -300,16 +291,10 @@ int link_tmpfile(int fd, const char *path, const char *target) { * Note that in both cases we will not replace existing files. This is because linkat() does not support this * operation currently (renameat2() does), and there is no nice way to emulate this. */ - if (path) { - r = rename_noreplace(AT_FDCWD, path, AT_FDCWD, target); - if (r < 0) - return r; - } else { - if (linkat(AT_FDCWD, FORMAT_PROC_FD_PATH(fd), AT_FDCWD, target, AT_SYMLINK_FOLLOW) < 0) - return -errno; - } + if (path) + return rename_noreplace(AT_FDCWD, path, AT_FDCWD, target); - return 0; + return RET_NERRNO(linkat(AT_FDCWD, FORMAT_PROC_FD_PATH(fd), AT_FDCWD, target, AT_SYMLINK_FOLLOW)); } int mkdtemp_malloc(const char *template, char **ret) { diff --git a/src/libnm-systemd-shared/src/basic/umask-util.h b/src/libnm-systemd-shared/src/basic/umask-util.h index bd7c2bdb..90d18f70 100644 --- a/src/libnm-systemd-shared/src/basic/umask-util.h +++ b/src/libnm-systemd-shared/src/basic/umask-util.h @@ -24,3 +24,6 @@ assert_cc((S_IFMT & 0777) == 0); for (_cleanup_umask_ mode_t _saved_umask_ = umask(mask) | S_IFMT; \ FLAGS_SET(_saved_umask_, S_IFMT); \ _saved_umask_ &= 0777) + +#define BLOCK_WITH_UMASK(mask) \ + _unused_ _cleanup_umask_ mode_t _saved_umask_ = umask(mask); diff --git a/src/libnm-systemd-shared/src/basic/utf8.c b/src/libnm-systemd-shared/src/basic/utf8.c index dfa010e8..c8e39fe4 100644 --- a/src/libnm-systemd-shared/src/basic/utf8.c +++ b/src/libnm-systemd-shared/src/basic/utf8.c @@ -126,11 +126,9 @@ int utf8_encoded_to_unichar(const char *str, char32_t *ret_unichar) { } bool utf8_is_printable_newline(const char* str, size_t length, bool allow_newline) { - const char *p; - assert(str); - for (p = str; length > 0;) { + for (const char *p = str; length > 0;) { int encoded_len, r; char32_t val; @@ -293,14 +291,12 @@ char *utf8_escape_non_printable_full(const char *str, size_t console_width, bool #endif /* NM_IGNORED */ char *ascii_is_valid(const char *str) { - const char *p; - /* Check whether the string consists of valid ASCII bytes, * i.e values between 0 and 127, inclusive. */ assert(str); - for (p = str; *p; p++) + for (const char *p = str; *p; p++) if ((unsigned char) *p >= 128) return NULL; @@ -322,6 +318,37 @@ char *ascii_is_valid_n(const char *str, size_t len) { } #endif /* NM_IGNORED */ +int utf8_to_ascii(const char *str, char replacement_char, char **ret) { + /* Convert to a string that has only ASCII chars, replacing anything that is not ASCII + * by replacement_char. */ + + _cleanup_free_ char *ans = new(char, strlen(str) + 1); + if (!ans) + return -ENOMEM; + + char *q = ans; + + for (const char *p = str; *p; q++) { + int l; + + l = utf8_encoded_valid_unichar(p, SIZE_MAX); + if (l < 0) /* Non-UTF-8, let's not even try to propagate the garbage */ + return l; + + if (l == 1) + *q = *p; + else + /* non-ASCII, we need to replace it */ + *q = replacement_char; + + p += l; + } + *q = '\0'; + + *ret = TAKE_PTR(ans); + return 0; +} + /** * utf8_encode_unichar() - Encode single UCS-4 character as UTF-8 * @out_utf8: output buffer of at least 4 bytes or NULL diff --git a/src/libnm-systemd-shared/src/basic/utf8.h b/src/libnm-systemd-shared/src/basic/utf8.h index b0e969f6..4a06dd62 100644 --- a/src/libnm-systemd-shared/src/basic/utf8.h +++ b/src/libnm-systemd-shared/src/basic/utf8.h @@ -21,6 +21,8 @@ static inline char *utf8_is_valid(const char *s) { char *ascii_is_valid(const char *s) _pure_; char *ascii_is_valid_n(const char *str, size_t len); +int utf8_to_ascii(const char *str, char replacement_char, char **ret); + bool utf8_is_printable_newline(const char* str, size_t length, bool allow_newline) _pure_; #define utf8_is_printable(str, length) utf8_is_printable_newline(str, length, true) diff --git a/src/libnm-systemd-shared/src/basic/util.c b/src/libnm-systemd-shared/src/basic/util.c index ed328466..3425d0f0 100644 --- a/src/libnm-systemd-shared/src/basic/util.c +++ b/src/libnm-systemd-shared/src/basic/util.c @@ -8,7 +8,6 @@ #include "alloc-util.h" #include "build.h" -#include "dirent-util.h" #include "env-file.h" #include "env-util.h" #include "fd-util.h" @@ -118,71 +117,6 @@ void in_initrd_force(bool value) { saved_in_initrd = value; } -int on_ac_power(void) { - bool found_offline = false, found_online = false; - _cleanup_closedir_ DIR *d = NULL; - struct dirent *de; - - d = opendir("/sys/class/power_supply"); - if (!d) - return errno == ENOENT ? true : -errno; - - FOREACH_DIRENT(de, d, return -errno) { - _cleanup_close_ int fd = -1, device = -1; - char contents[6]; - ssize_t n; - - device = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY|O_CLOEXEC|O_NOCTTY); - if (device < 0) { - if (IN_SET(errno, ENOENT, ENOTDIR)) - continue; - - return -errno; - } - - fd = openat(device, "type", O_RDONLY|O_CLOEXEC|O_NOCTTY); - if (fd < 0) { - if (errno == ENOENT) - continue; - - return -errno; - } - - n = read(fd, contents, sizeof(contents)); - if (n < 0) - return -errno; - - if (n != 6 || memcmp(contents, "Mains\n", 6)) - continue; - - safe_close(fd); - fd = openat(device, "online", O_RDONLY|O_CLOEXEC|O_NOCTTY); - if (fd < 0) { - if (errno == ENOENT) - continue; - - return -errno; - } - - n = read(fd, contents, sizeof(contents)); - if (n < 0) - return -errno; - - if (n != 2 || contents[1] != '\n') - return -EIO; - - if (contents[0] == '1') { - found_online = true; - break; - } else if (contents[0] == '0') - found_offline = true; - else - return -EIO; - } - - return found_online || !found_offline; -} - int container_get_leader(const char *machine, pid_t *pid) { _cleanup_free_ char *s = NULL, *class = NULL; const char *p; diff --git a/src/libnm-systemd-shared/src/basic/util.h b/src/libnm-systemd-shared/src/basic/util.h index b6c51c03..dd1cb4f3 100644 --- a/src/libnm-systemd-shared/src/basic/util.h +++ b/src/libnm-systemd-shared/src/basic/util.h @@ -20,13 +20,24 @@ int prot_from_flags(int flags) _const_; bool in_initrd(void); void in_initrd_force(bool value); -int on_ac_power(void); - -static inline unsigned u64log2(uint64_t n) { +/* Note: log2(0) == log2(1) == 0 here and below. */ + +#define CONST_LOG2ULL(x) ((x) > 1 ? (unsigned) __builtin_clzll(x) ^ 63U : 0) +#define NONCONST_LOG2ULL(x) ({ \ + unsigned long long _x = (x); \ + _x > 1 ? (unsigned) __builtin_clzll(_x) ^ 63U : 0; \ + }) +#if 0 /* NM_IGNORED */ +#define LOG2ULL(x) __builtin_choose_expr(__builtin_constant_p(x), CONST_LOG2ULL(x), NONCONST_LOG2ULL(x)) +#else /* NM_IGNORED */ +#define LOG2ULL(x) NONCONST_LOG2ULL(x) +#endif /* NM_IGNORED */ + +static inline unsigned log2u64(uint64_t x) { #if __SIZEOF_LONG_LONG__ == 8 - return (n > 1) ? (unsigned) __builtin_clzll(n) ^ 63U : 0; + return LOG2ULL(x); #else -#error "Wut?" +# error "Wut?" #endif } @@ -34,26 +45,31 @@ static inline unsigned u32ctz(uint32_t n) { #if __SIZEOF_INT__ == 4 return n != 0 ? __builtin_ctz(n) : 32; #else -#error "Wut?" +# error "Wut?" #endif } -static inline unsigned log2i(int x) { - assert(x > 0); +#define CONST_LOG2U(x) ((x) > 1 ? __SIZEOF_INT__ * 8 - __builtin_clz(x) - 1 : 0) +#define NONCONST_LOG2U(x) ({ \ + unsigned _x = (x); \ + _x > 1 ? __SIZEOF_INT__ * 8 - __builtin_clz(_x) - 1 : 0; \ + }) +#if 0 /* NM_IGNORED */ +#define LOG2U(x) __builtin_choose_expr(__builtin_constant_p(x), CONST_LOG2U(x), NONCONST_LOG2U(x)) +#else /* NM_IGNORED */ +#define LOG2U(x) NONCONST_LOG2U(x) +#endif /* NM_IGNORED */ - return __SIZEOF_INT__ * 8 - __builtin_clz(x) - 1; +static inline unsigned log2i(int x) { + return LOG2U(x); } static inline unsigned log2u(unsigned x) { - assert(x > 0); - - return sizeof(unsigned) * 8 - __builtin_clz(x) - 1; + return LOG2U(x); } static inline unsigned log2u_round_up(unsigned x) { - assert(x > 0); - - if (x == 1) + if (x <= 1) return 0; return log2u(x - 1) + 1; diff --git a/src/libnm-systemd-shared/src/fundamental/macro-fundamental.h b/src/libnm-systemd-shared/src/fundamental/macro-fundamental.h index 20d8dabf..d597c743 100644 --- a/src/libnm-systemd-shared/src/fundamental/macro-fundamental.h +++ b/src/libnm-systemd-shared/src/fundamental/macro-fundamental.h @@ -5,13 +5,15 @@ #include #endif -#include "type.h" +#include +#include "types-fundamental.h" #define _align_(x) __attribute__((__aligned__(x))) #define _const_ __attribute__((__const__)) #define _pure_ __attribute__((__pure__)) #define _section_(x) __attribute__((__section__(x))) #define _packed_ __attribute__((__packed__)) +#define _retain_ __attribute__((__retain__)) #define _used_ __attribute__((__used__)) #define _unused_ __attribute__((__unused__)) #define _cleanup_(x) __attribute__((__cleanup__(x))) @@ -59,8 +61,19 @@ #define assert(expr) ({ _likely_(expr) ? VOID_0 : efi_assert(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); }) #define assert_not_reached() efi_assert("Code should not be reached", __FILE__, __LINE__, __PRETTY_FUNCTION__) #endif + + #define memcpy(a, b, c) CopyMem((a), (b), (c)) + #define free(a) FreePool(a) #endif +/* This passes the argument through after (if asserts are enabled) checking that it is not null. */ +#define ASSERT_PTR(expr) \ + ({ \ + typeof(expr) _expr_ = (expr); \ + assert(_expr_); \ + _expr_; \ + }) + #if defined(static_assert) #define assert_cc(expr) \ static_assert(expr, #expr) @@ -81,8 +94,8 @@ #define ONCE __ONCE(UNIQ_T(_once_, UNIQ)) #define __ONCE(o) \ ({ \ - static bool (o) = false; \ - __sync_bool_compare_and_swap(&(o), false, true); \ + static sd_bool (o) = sd_false; \ + __sync_bool_compare_and_swap(&(o), sd_false, sd_true); \ }) #undef MAX @@ -232,7 +245,7 @@ #define IN_SET(x, ...) \ ({ \ - sd_bool _found = false; \ + sd_bool _found = sd_false; \ /* If the build breaks in the line below, you need to extend the case macros. (We use "long double" as \ * type for the array, in the hope that checkers such as ubsan don't complain that the initializers for \ * the array are not representable by the base type. Ideally we'd use typeof(x) as base type, but that \ @@ -241,7 +254,7 @@ assert_cc(ELEMENTSOF(__assert_in_set) <= 20); \ switch(x) { \ FOR_EACH_MAKE_CASE(__VA_ARGS__) \ - _found = true; \ + _found = sd_true; \ break; \ default: \ break; \ @@ -253,8 +266,9 @@ * resets it to NULL. See: https://doc.rust-lang.org/std/option/enum.Option.html#method.take */ #define TAKE_PTR(ptr) \ ({ \ - typeof(ptr) _ptr_ = (ptr); \ - (ptr) = NULL; \ + typeof(ptr) *_pptr_ = &(ptr); \ + typeof(ptr) _ptr_ = *_pptr_; \ + *_pptr_ = NULL; \ _ptr_; \ }) @@ -264,3 +278,47 @@ * @x: a string literal. */ #define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0]))) + +#define mfree(memory) \ + ({ \ + free(memory); \ + (typeof(memory)) NULL; \ + }) + +static inline size_t ALIGN_TO(size_t l, size_t ali) { + /* sd-boot uses UINTN for size_t, let's make sure SIZE_MAX is correct. */ + assert_cc(SIZE_MAX == ~(size_t)0); + + /* Check that alignment is exponent of 2 */ +#if SIZE_MAX == UINT_MAX + assert(__builtin_popcount(ali) == 1); +#elif SIZE_MAX == ULONG_MAX + assert(__builtin_popcountl(ali) == 1); +#elif SIZE_MAX == ULLONG_MAX + assert(__builtin_popcountll(ali) == 1); +#else + #error "Unexpected size_t" +#endif + + if (l > SIZE_MAX - (ali - 1)) + return SIZE_MAX; /* indicate overflow */ + + return ((l + ali - 1) & ~(ali - 1)); +} + +/* Same as ALIGN_TO but callable in constant contexts. */ +#define CONST_ALIGN_TO(l, ali) \ + __builtin_choose_expr( \ + __builtin_constant_p(l) && \ + __builtin_constant_p(ali) && \ + __builtin_popcountll(ali) == 1 && /* is power of 2? */ \ + (l <= SIZE_MAX - (ali - 1)), /* overflow? */ \ + ((l) + (ali) - 1) & ~((ali) - 1), \ + VOID_0) + +#define UPDATE_FLAG(orig, flag, b) \ + ((b) ? ((orig) | (flag)) : ((orig) & ~(flag))) +#define SET_FLAG(v, flag, b) \ + (v) = UPDATE_FLAG(v, flag, b) +#define FLAGS_SET(v, flags) \ + ((~(v) & (flags)) == 0) diff --git a/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c b/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c index f1703926..73569765 100644 --- a/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c +++ b/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c @@ -10,7 +10,7 @@ #include "string-util-fundamental.h" sd_char *startswith(const sd_char *s, const sd_char *prefix) { - sd_size_t l; + size_t l; assert(s); assert(prefix); @@ -24,7 +24,7 @@ sd_char *startswith(const sd_char *s, const sd_char *prefix) { #ifndef SD_BOOT sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) { - sd_size_t l; + size_t l; assert(s); assert(prefix); @@ -38,7 +38,7 @@ sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) { #endif sd_char* endswith(const sd_char *s, const sd_char *postfix) { - sd_size_t sl, pl; + size_t sl, pl; assert(s); assert(postfix); @@ -59,7 +59,7 @@ sd_char* endswith(const sd_char *s, const sd_char *postfix) { } sd_char* endswith_no_case(const sd_char *s, const sd_char *postfix) { - sd_size_t sl, pl; + size_t sl, pl; assert(s); assert(postfix); diff --git a/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.h b/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.h index 7455c054..dc0c1202 100644 --- a/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.h +++ b/src/libnm-systemd-shared/src/fundamental/string-util-fundamental.h @@ -68,10 +68,10 @@ static inline const sd_char *yes_no(sd_bool b) { sd_int strverscmp_improved(const sd_char *a, const sd_char *b); /* Like startswith(), but operates on arbitrary memory blocks */ -static inline void *memory_startswith(const void *p, sd_size_t sz, const sd_char *token) { +static inline void *memory_startswith(const void *p, size_t sz, const sd_char *token) { assert(token); - sd_size_t n = strlen(token) * sizeof(sd_char); + size_t n = strlen(token) * sizeof(sd_char); if (sz < n) return NULL; diff --git a/src/libnm-systemd-shared/src/fundamental/type.h b/src/libnm-systemd-shared/src/fundamental/type.h deleted file mode 100644 index f645d2de..00000000 --- a/src/libnm-systemd-shared/src/fundamental/type.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -#pragma once - -#ifdef SD_BOOT -#include - -typedef BOOLEAN sd_bool; -typedef CHAR16 sd_char; -typedef INTN sd_int; -typedef UINTN sd_size_t; - -#define true TRUE -#define false FALSE -#else -#include -#include - -typedef bool sd_bool; -typedef char sd_char; -typedef int sd_int; -typedef size_t sd_size_t; -#endif diff --git a/src/libnm-systemd-shared/src/fundamental/types-fundamental.h b/src/libnm-systemd-shared/src/fundamental/types-fundamental.h new file mode 100644 index 00000000..5977e40c --- /dev/null +++ b/src/libnm-systemd-shared/src/fundamental/types-fundamental.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +/* This defines a number of basic types that are one thing in userspace and another in the UEFI environment, + * but mostly the same in concept and behaviour. + * + * Note: if the definition of these types/values has slightly different semantics in userspace and in the + * UEFI environment then please prefix its name with "sd_" to make clear these types have special semantics, + * and *we* defined them. Otherwise, if the types are effectively 100% identical in behaviour in userspace + * and UEFI environment you can omit the prefix. (Examples: sd_char is 8 bit in userspace and 16 bit in UEFI + * space hence it should have the sd_ prefix; but size_t in userspace and UINTN in UEFI environment are 100% + * defined the same way ultimately, hence it's OK to just define size_t as alias to UINTN in UEFI + * environment, so that size_t can be used everywhere, without any "sd_" prefix.) + * + * Note: we generally prefer the userspace names of types and concepts. i.e. if in doubt please name types + * after the userspace vocabulary, and let's keep UEFI vocabulary specific to the UEFI build environment. */ + +#ifdef SD_BOOT +#include + +typedef BOOLEAN sd_bool; +typedef CHAR16 sd_char; +typedef INTN sd_int; +typedef UINTN size_t; + +#define sd_true TRUE +#define sd_false FALSE +#else +#include +#include + +typedef bool sd_bool; +typedef char sd_char; +typedef int sd_int; + +#define sd_true true +#define sd_false false + +#endif diff --git a/src/libnm-systemd-shared/src/shared/dns-domain.c b/src/libnm-systemd-shared/src/shared/dns-domain.c index 473f6a02..b82a9a1c 100644 --- a/src/libnm-systemd-shared/src/shared/dns-domain.c +++ b/src/libnm-systemd-shared/src/shared/dns-domain.c @@ -687,7 +687,7 @@ int dns_name_change_suffix(const char *name, const char *old_suffix, const char } /* Found it! Now generate the new name */ - prefix = strndupa(name, saved_before - name); + prefix = strndupa_safe(name, saved_before - name); r = dns_name_concat(prefix, new_suffix, 0, ret); if (r < 0) @@ -1037,7 +1037,7 @@ static bool dns_service_name_label_is_valid(const char *label, size_t n) { if (memchr(label, 0, n)) return false; - s = strndupa(label, n); + s = strndupa_safe(label, n); return dns_service_name_is_valid(s); } diff --git a/src/libnm-systemd-shared/src/shared/dns-domain.h b/src/libnm-systemd-shared/src/shared/dns-domain.h index d0195c58..c237f761 100644 --- a/src/libnm-systemd-shared/src/shared/dns-domain.h +++ b/src/libnm-systemd-shared/src/shared/dns-domain.h @@ -62,6 +62,10 @@ static inline int dns_name_is_valid_ldh(const char *s) { return 1; } +static inline bool dns_name_is_empty(const char *s) { + return isempty(s) || streq(s, "."); +} + void dns_name_hash_func(const char *s, struct siphash *state); int dns_name_compare_func(const char *a, const char *b); extern const struct hash_ops dns_name_hash_ops; diff --git a/src/libnm-udev-aux/nm-udev-utils.c b/src/libnm-udev-aux/nm-udev-utils.c index ef1cf26b..744d03ce 100644 --- a/src/libnm-udev-aux/nm-udev-utils.c +++ b/src/libnm-udev-aux/nm-udev-utils.c @@ -10,9 +10,9 @@ #include struct _NMPUdevClient { - char ** subsystems; - GSource * watch_source; - struct udev * udev; + char **subsystems; + GSource *watch_source; + struct udev *udev; struct udev_monitor *monitor; NMUdevClientEvent event_handler; gpointer event_user_data; @@ -36,8 +36,8 @@ const char * nm_udev_utils_property_decode(const char *uproperty, char **to_free) { const char *p; - char * unescaped = NULL; - char * n = NULL; + char *unescaped = NULL; + char *n = NULL; if (!uproperty) { *to_free = NULL; @@ -87,10 +87,10 @@ nm_udev_utils_property_decode_cp(const char *uproperty) /*****************************************************************************/ static void -_subsystem_split(const char * subsystem_full, +_subsystem_split(const char *subsystem_full, const char **out_subsystem, const char **out_devtype, - char ** to_free) + char **to_free) { char *tmp, *s; @@ -124,8 +124,8 @@ nm_udev_utils_enumerate(struct udev *uclient, const char *const *subsystems) if (subsystems) { for (n = 0; subsystems[n]; n++) { - const char * subsystem; - const char * devtype; + const char *subsystem; + const char *devtype; gs_free char *to_free = NULL; _subsystem_split(subsystems[n], &subsystem, &devtype, &to_free); @@ -161,7 +161,7 @@ nm_udev_client_enumerate_new(NMUdevClient *self) static gboolean monitor_event(int fd, GIOCondition condition, gpointer user_data) { - NMUdevClient * self = user_data; + NMUdevClient *self = user_data; struct udev_device *udevice; if (!self->monitor) @@ -217,8 +217,8 @@ nm_udev_client_new(const char *const *subsystems, /* install subsystem filters to only wake up for certain events */ for (n = 0; self->subsystems[n]; n++) { gs_free char *to_free = NULL; - const char * subsystem; - const char * devtype; + const char *subsystem; + const char *devtype; _subsystem_split(self->subsystems[n], &subsystem, &devtype, &to_free); udev_monitor_filter_add_match_subsystem_devtype(self->monitor, subsystem, devtype); diff --git a/src/libnm-udev-aux/nm-udev-utils.h b/src/libnm-udev-aux/nm-udev-utils.h index 191f9a89..1c04fc58 100644 --- a/src/libnm-udev-aux/nm-udev-utils.h +++ b/src/libnm-udev-aux/nm-udev-utils.h @@ -12,11 +12,11 @@ struct udev_enumerate; gboolean nm_udev_utils_property_as_boolean(const char *uproperty); const char *nm_udev_utils_property_decode(const char *uproperty, char **to_free); -char * nm_udev_utils_property_decode_cp(const char *uproperty); +char *nm_udev_utils_property_decode_cp(const char *uproperty); typedef struct _NMPUdevClient NMUdevClient; -typedef void (*NMUdevClientEvent)(NMUdevClient * udev_client, +typedef void (*NMUdevClientEvent)(NMUdevClient *udev_client, struct udev_device *udevice, gpointer event_user_data); diff --git a/src/libnmc-base/nm-client-utils.c b/src/libnmc-base/nm-client-utils.c index 49234d97..01b3df32 100644 --- a/src/libnmc-base/nm-client-utils.c +++ b/src/libnmc-base/nm-client-utils.c @@ -55,14 +55,14 @@ nmc_objects_sort_by_path(const NMObject *const *objs, gssize len) * If required, the resulting number is checked to be in the range. */ static gboolean -nmc_string_to_uint_base(const char * str, +nmc_string_to_uint_base(const char *str, int base, gboolean range_check, unsigned long int min, unsigned long int max, unsigned long int *value) { - char * end; + char *end; unsigned long int tmp; if (!str || !str[0]) @@ -79,7 +79,7 @@ nmc_string_to_uint_base(const char * str, } gboolean -nmc_string_to_uint(const char * str, +nmc_string_to_uint(const char *str, gboolean range_check, unsigned long int min, unsigned long int max, @@ -130,10 +130,10 @@ nmc_string_to_bool(const char *str, gboolean *val_bool, GError **error) } gboolean -nmc_string_to_ternary_full(const char * str, +nmc_string_to_ternary_full(const char *str, NMCStringToTernaryFlags flags, - NMTernary * val, - GError ** error) + NMTernary *val, + GError **error) { gs_free char *str_to_free = NULL; int i; @@ -194,7 +194,7 @@ _nmc_string_is_valid(const char *input, const char *const *allowed, GError **err { const char *const *p; size_t input_ln, p_len; - const char * partial_match = NULL; + const char *partial_match = NULL; gboolean ambiguous = FALSE; g_return_val_if_fail(!error || !*error, NULL); @@ -324,7 +324,7 @@ nmc_device_state_to_string_with_external(NMDevice *device) { NMActiveConnection *ac; NMDeviceState state; - const char * s; + const char *s; state = nm_device_get_state(device); @@ -501,8 +501,8 @@ NM_UTILS_LOOKUP_STR_DEFINE( NMActiveConnectionState nmc_activation_get_effective_state(NMActiveConnection *active, - NMDevice * device, - const char ** reason) + NMDevice *device, + const char **reason) { NMActiveConnectionState ac_state; NMActiveConnectionStateReason ac_reason; @@ -569,7 +569,7 @@ can_show_utf8(void) { static gboolean can_show_utf8_set = FALSE; static gboolean can_show_utf8 = TRUE; - char * locale_str; + char *locale_str; if (G_LIKELY(can_show_utf8_set)) return can_show_utf8; @@ -763,12 +763,12 @@ nmc_utils_read_passwd_file(const char *passwd_file, gssize *out_error_line, GErr } GHashTable * -nmc_utils_parse_passwd_file(char * contents /* will be modified */, - gssize * out_error_line, +nmc_utils_parse_passwd_file(char *contents /* will be modified */, + gssize *out_error_line, GError **error) { gs_unref_hashtable GHashTable *pwds_hash = NULL; - const char * contents_str; + const char *contents_str; gsize contents_line; pwds_hash = @@ -781,11 +781,11 @@ nmc_utils_parse_passwd_file(char * contents /* will be modified */, while (contents_str[0]) { nm_auto_free_secret char *l_hash_key = NULL; nm_auto_free_secret char *l_hash_val = NULL; - const char * l_content_line; - const char * l_setting; - const char * l_prop; - const char * l_val; - const char * s; + const char *l_content_line; + const char *l_setting; + const char *l_prop; + const char *l_val; + const char *s; gsize l_hash_val_len; /* consume first line. As line delimiters we accept "\r\n", "\n", and "\r". */ diff --git a/src/libnmc-base/nm-client-utils.h b/src/libnmc-base/nm-client-utils.h index 1fc18aca..7d6ec707 100644 --- a/src/libnmc-base/nm-client-utils.h +++ b/src/libnmc-base/nm-client-utils.h @@ -17,7 +17,7 @@ const char *_nmc_string_is_valid(const char *input, const char *const *allowed, #define nmc_string_is_valid(input, allowed, error) \ _nmc_string_is_valid((input), NM_CAST_STRV_CC(allowed), (error)) -gboolean nmc_string_to_uint(const char * str, +gboolean nmc_string_to_uint(const char *str, gboolean range_check, unsigned long int min, unsigned long int max, @@ -29,10 +29,10 @@ typedef enum { NMC_STRING_TO_TERNARY_FLAGS_IGNORE_FOR_DEFAULT = (1LL << 0), } NMCStringToTernaryFlags; -gboolean nmc_string_to_ternary_full(const char * str, +gboolean nmc_string_to_ternary_full(const char *str, NMCStringToTernaryFlags flags, - NMTernary * val, - GError ** error); + NMTernary *val, + GError **error); static inline gboolean nmc_string_to_ternary(const char *str, NMTernary *val, GError **error) @@ -53,8 +53,8 @@ const char *nmc_device_reason_to_string(NMDeviceStateReason reason); const char *nmc_device_metered_to_string(NMMetered value); NMActiveConnectionState nmc_activation_get_effective_state(NMActiveConnection *active, - NMDevice * device, - const char ** reason); + NMDevice *device, + const char **reason); const char *nmc_wifi_strength_bars(guint8 strength); diff --git a/src/libnmc-base/nm-polkit-listener.c b/src/libnmc-base/nm-polkit-listener.c index 29c25b4e..39a06bc6 100644 --- a/src/libnmc-base/nm-polkit-listener.c +++ b/src/libnmc-base/nm-polkit-listener.c @@ -59,9 +59,9 @@ static guint signals[LAST_SIGNAL] = {0}; struct _NMPolkitListener { GObject parent; GDBusConnection *dbus_connection; - char * name_owner; - GCancellable * cancellable; - GMainContext * main_context; + char *name_owner; + GCancellable *cancellable; + GMainContext *main_context; CList request_lst_head; guint pk_auth_agent_reg_id; guint name_owner_changed_id; @@ -79,14 +79,14 @@ G_DEFINE_TYPE(NMPolkitListener, nm_polkit_listener, G_TYPE_OBJECT); typedef struct { CList request_lst; - NMPolkitListener * listener; - GSource * child_stdout_watch_source; - GSource * child_stdin_watch_source; + NMPolkitListener *listener; + GSource *child_stdout_watch_source; + GSource *child_stdin_watch_source; GDBusMethodInvocation *dbus_invocation; - char * action_id; - char * message; - char * username; - char * cookie; + char *action_id; + char *message; + char *username; + char *cookie; NMStrBuf in_buffer; NMStrBuf out_buffer; gsize out_buffer_offset; @@ -163,11 +163,11 @@ static char * choose_identity(GVariant *identities) { GVariantIter identity_iter; - GVariant * details_tmp; - const char * kind; + GVariant *details_tmp; + const char *kind; gs_free char *username_first = NULL; gs_free char *username_root = NULL; - const char * user; + const char *user; /* Choose identity. First try current user, then root, and else * take the first one we find. */ @@ -221,10 +221,10 @@ choose_identity(GVariant *identities) static void agent_register_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) { - NMPolkitListener *listener = NM_POLKIT_LISTENER(user_data); - GDBusConnection * dbus_connection = G_DBUS_CONNECTION(source_object); - gs_free_error GError *error = NULL; - gs_unref_variant GVariant *ret = NULL; + NMPolkitListener *listener = NM_POLKIT_LISTENER(user_data); + GDBusConnection *dbus_connection = G_DBUS_CONNECTION(source_object); + gs_free_error GError *error = NULL; + gs_unref_variant GVariant *ret = NULL; ret = g_dbus_connection_call_finish(dbus_connection, res, &error); @@ -242,9 +242,9 @@ agent_register_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) static void agent_register(NMPolkitListener *self, const char *session_id) { - const char * locale = NULL; + const char *locale = NULL; gs_unref_object NMAuthSubject *subject = NULL; - GVariant * subject_variant = NULL; + GVariant *subject_variant = NULL; locale = g_getenv("LANG"); if (locale == NULL) { @@ -277,7 +277,7 @@ static void agent_unregister(NMPolkitListener *self) { gs_unref_object NMAuthSubject *subject = NULL; - GVariant * subject_variant = NULL; + GVariant *subject_variant = NULL; subject = nm_auth_subject_new_unix_process_self(); subject_variant = nm_auth_subject_unix_to_polkit_gvariant(subject); @@ -299,14 +299,14 @@ agent_unregister(NMPolkitListener *self) static void retrieve_session_id_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) { - NMPolkitListener * listener = NM_POLKIT_LISTENER(user_data); - char * session_id; - guint32 session_uid; - nm_auto_free_variant_iter GVariantIter *iter = NULL; - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError *error = NULL; - gs_free char * err_str = NULL; - uid_t uid = getuid(); + NMPolkitListener *listener = NM_POLKIT_LISTENER(user_data); + char *session_id; + guint32 session_uid; + nm_auto_free_variant_iter GVariantIter *iter = NULL; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; + gs_free char *err_str = NULL; + uid_t uid = getuid(); ret = g_dbus_connection_call_finish(listener->dbus_connection, res, &error); @@ -437,7 +437,7 @@ io_watch_have_data(int fd, GIOCondition condition, gpointer user_data) } while (TRUE) { - char * line_terminator; + char *line_terminator; const char *line; line = nm_str_buf_get_str(&request->in_buffer); @@ -568,12 +568,12 @@ get_request(NMPolkitListener *listener, const char *cookie) } static AuthRequest * -create_request(NMPolkitListener * listener, +create_request(NMPolkitListener *listener, GDBusMethodInvocation *invocation, - const char * action_id, - const char * message, - char * username_take, - const char * cookie) + const char *action_id, + const char *message, + char *username_take, + const char *cookie) { AuthRequest *request; @@ -596,20 +596,20 @@ create_request(NMPolkitListener * listener, } static void -dbus_method_call_cb(GDBusConnection * connection, - const char * sender, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +dbus_method_call_cb(GDBusConnection *connection, + const char *sender, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { - NMPolkitListener *listener = NM_POLKIT_LISTENER(user_data); - const char * action_id; - const char * message; - const char * cookie; - AuthRequest * request; + NMPolkitListener *listener = NM_POLKIT_LISTENER(user_data); + const char *action_id; + const char *message; + const char *cookie; + AuthRequest *request; gs_unref_variant GVariant *identities_gvariant = NULL; if (nm_streq(method_name, "BeginAuthentication")) { @@ -724,15 +724,15 @@ name_owner_changed(NMPolkitListener *self, const char *name_owner) static void name_owner_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { NMPolkitListener *self = user_data; - const char * new_owner; + const char *new_owner; if (!g_variant_is_of_type(parameters, G_VARIANT_TYPE("(sss)"))) { return; @@ -829,7 +829,7 @@ static void dispose(GObject *object) { NMPolkitListener *self = NM_POLKIT_LISTENER(object); - AuthRequest * request; + AuthRequest *request; nm_clear_g_cancellable(&self->cancellable); diff --git a/src/libnmc-base/nm-secret-agent-simple.c b/src/libnmc-base/nm-secret-agent-simple.c index a3d5062d..5651a15b 100644 --- a/src/libnmc-base/nm-secret-agent-simple.c +++ b/src/libnmc-base/nm-secret-agent-simple.c @@ -34,12 +34,12 @@ typedef struct { NMSecretAgentSimple *self; - NMConnection * connection; - const char * setting_name; - char ** hints; + NMConnection *connection; + const char *setting_name; + char **hints; NMSecretAgentOldGetSecretsFunc callback; gpointer callback_data; - GCancellable * cancellable; + GCancellable *cancellable; NMSecretAgentGetSecretsFlags flags; } RequestData; @@ -54,7 +54,7 @@ static guint signals[LAST_SIGNAL] = {0}; typedef struct { GHashTable *requests; - char * path; + char *path; gboolean enabled; } NMSecretAgentSimplePrivate; @@ -88,12 +88,12 @@ _request_data_free(gpointer data) } static void -_request_data_complete(RequestData * request, - GVariant * secrets, - GError * error, +_request_data_complete(RequestData *request, + GVariant *secrets, + GError *error, GHashTableIter *iter_to_remove) { - NMSecretAgentSimple * self = request->self; + NMSecretAgentSimple *self = request->self; NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self); nm_assert((secrets != NULL) != (error != NULL)); @@ -124,8 +124,8 @@ _request_data_complete(RequestData * request, typedef struct { NMSecretAgentSimpleSecret base; - NMSetting * setting; - char * property; + NMSetting *setting; + char *property; } SecretReal; static void @@ -145,11 +145,11 @@ _secret_real_free(NMSecretAgentSimpleSecret *secret) static NMSecretAgentSimpleSecret * _secret_real_new_plain(NMSecretAgentSecretType secret_type, - const char * pretty_name, - NMSetting * setting, - const char * property) + const char *pretty_name, + NMSetting *setting, + const char *property) { - SecretReal * real; + SecretReal *real; gs_free char *value = NULL; nm_assert(property); @@ -178,7 +178,7 @@ _secret_real_new_plain(NMSecretAgentSecretType secret_type, static NMSecretAgentSimpleSecret * _secret_real_new_vpn_secret(const char *pretty_name, - NMSetting * setting, + NMSetting *setting, const char *property, const char *vpn_type) { @@ -208,8 +208,8 @@ _secret_real_new_vpn_secret(const char *pretty_name, static NMSecretAgentSimpleSecret * _secret_real_new_wireguard_peer_psk(NMSettingWireGuard *s_wg, - const char * public_key, - const char * preshared_key) + const char *public_key, + const char *preshared_key) { SecretReal *real; @@ -238,8 +238,8 @@ _secret_real_new_wireguard_peer_psk(NMSettingWireGuard *s_wg, static gboolean add_8021x_secrets(RequestData *request, GPtrArray *secrets) { - NMSetting8021x * s_8021x = nm_connection_get_setting_802_1x(request->connection); - const char * eap_method; + NMSetting8021x *s_8021x = nm_connection_get_setting_802_1x(request->connection); + const char *eap_method; NMSecretAgentSimpleSecret *secret; /* If hints are given, then always ask for what the hints require */ @@ -301,7 +301,7 @@ add_wireless_secrets(RequestData *request, GPtrArray *secrets) { NMSettingWirelessSecurity *s_wsec = nm_connection_get_setting_wireless_security(request->connection); - const char * key_mgmt = nm_setting_wireless_security_get_key_mgmt(s_wsec); + const char *key_mgmt = nm_setting_wireless_security_get_key_mgmt(s_wsec); NMSecretAgentSimpleSecret *secret; if (!key_mgmt || nm_streq(key_mgmt, "owe")) @@ -350,7 +350,7 @@ add_wireless_secrets(RequestData *request, GPtrArray *secrets) static gboolean add_pppoe_secrets(RequestData *request, GPtrArray *secrets) { - NMSettingPppoe * s_pppoe = nm_connection_get_setting_pppoe(request->connection); + NMSettingPppoe *s_pppoe = nm_connection_get_setting_pppoe(request->connection); NMSecretAgentSimpleSecret *secret; secret = _secret_real_new_plain(NM_SECRET_AGENT_SECRET_TYPE_PROPERTY, @@ -375,7 +375,7 @@ static NMSettingSecretFlags get_vpn_secret_flags(NMSettingVpn *s_vpn, const char *secret_name) { NMSettingSecretFlags flags = NM_SETTING_SECRET_FLAG_NONE; - GHashTable * vpn_data; + GHashTable *vpn_data; g_object_get(s_vpn, NM_SETTING_VPN_DATA, &vpn_data, NULL); nm_vpn_service_plugin_get_secret_flags(vpn_data, secret_name, &flags); @@ -385,10 +385,10 @@ get_vpn_secret_flags(NMSettingVpn *s_vpn, const char *secret_name) } static void -add_vpn_secret_helper(GPtrArray * secrets, +add_vpn_secret_helper(GPtrArray *secrets, NMSettingVpn *s_vpn, - const char * name, - const char * ui_name) + const char *name, + const char *ui_name) { NMSecretAgentSimpleSecret *secret; NMSettingSecretFlags flags; @@ -421,10 +421,10 @@ add_vpn_secret_helper(GPtrArray * secrets, static gboolean add_vpn_secrets(RequestData *request, GPtrArray *secrets, char **msg) { - NMSettingVpn * s_vpn = nm_connection_get_setting_vpn(request->connection); + NMSettingVpn *s_vpn = nm_connection_get_setting_vpn(request->connection); const NmcVpnPasswordName *p; - const char * vpn_msg = NULL; - char ** iter; + const char *vpn_msg = NULL; + char **iter; /* If hints are given, then always ask for what the hints require */ if (request->hints) { @@ -451,7 +451,7 @@ add_vpn_secrets(RequestData *request, GPtrArray *secrets, char **msg) static gboolean add_wireguard_secrets(RequestData *request, GPtrArray *secrets, char **msg, GError **error) { - NMSettingWireGuard * s_wg; + NMSettingWireGuard *s_wg; NMSecretAgentSimpleSecret *secret; guint i; @@ -479,8 +479,8 @@ add_wireguard_secrets(RequestData *request, GPtrArray *secrets, char **msg, GErr if (request->hints) { for (i = 0; request->hints[i]; i++) { NMWireGuardPeer *peer; - const char * name = request->hints[i]; - gs_free char * public_key = NULL; + const char *name = request->hints[i]; + gs_free char *public_key = NULL; if (nm_streq(name, NM_SETTING_WIREGUARD_PRIVATE_KEY)) continue; @@ -516,13 +516,13 @@ add_wireguard_secrets(RequestData *request, GPtrArray *secrets, char **msg, GErr typedef struct { GPid auth_dialog_pid; - GString * auth_dialog_response; - RequestData * request; - GPtrArray * secrets; - GCancellable * cancellable; + GString *auth_dialog_response; + RequestData *request; + GPtrArray *secrets; + GCancellable *cancellable; gulong cancellable_id; guint child_watch_id; - GInputStream * input_stream; + GInputStream *input_stream; GOutputStream *output_stream; char read_buf[5]; } AuthDialogData; @@ -544,16 +544,16 @@ _auth_dialog_data_free(AuthDialogData *data) static void _auth_dialog_exited(GPid pid, int status, gpointer user_data) { - AuthDialogData * data = user_data; - RequestData * request = data->request; - GPtrArray * secrets = data->secrets; - NMSettingVpn * s_vpn = nm_connection_get_setting_vpn(request->connection); + AuthDialogData *data = user_data; + RequestData *request = data->request; + GPtrArray *secrets = data->secrets; + NMSettingVpn *s_vpn = nm_connection_get_setting_vpn(request->connection); nm_auto_unref_keyfile GKeyFile *keyfile = NULL; - gs_strfreev char ** groups = NULL; - gs_free char * title = NULL; - gs_free char * message = NULL; + gs_strfreev char **groups = NULL; + gs_free char *title = NULL; + gs_free char *message = NULL; int i; - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; data->child_watch_id = 0; @@ -646,9 +646,9 @@ _request_cancelled(GObject *object, gpointer user_data) static void _auth_dialog_read_done(GObject *source_object, GAsyncResult *res, gpointer user_data) { - GInputStream * auth_dialog_out = G_INPUT_STREAM(source_object); - AuthDialogData *data = user_data; - gssize read_size; + GInputStream *auth_dialog_out = G_INPUT_STREAM(source_object); + AuthDialogData *data = user_data; + gssize read_size; gs_free_error GError *error = NULL; read_size = g_input_stream_read_finish(auth_dialog_out, res, &error); @@ -684,7 +684,7 @@ _auth_dialog_read_done(GObject *source_object, GAsyncResult *res, gpointer user_ static void _auth_dialog_write_done(GObject *source_object, GAsyncResult *res, gpointer user_data) { - GOutputStream *auth_dialog_out = G_OUTPUT_STREAM(source_object); + GOutputStream *auth_dialog_out = G_OUTPUT_STREAM(source_object); _nm_unused gs_free char *auth_dialog_request_free = user_data; /* We don't care about write errors. If there are any problems, the @@ -732,20 +732,20 @@ _add_secret_to_string(const char *key, const char *value, gpointer user_data) static gboolean try_spawn_vpn_auth_helper(RequestData *request, GPtrArray *secrets) { - NMSettingVpn * s_vpn = nm_connection_get_setting_vpn(request->connection); + NMSettingVpn *s_vpn = nm_connection_get_setting_vpn(request->connection); gs_unref_ptrarray GPtrArray *auth_dialog_argv = NULL; - NMVpnPluginInfo * plugin_info; - const char * s; + NMVpnPluginInfo *plugin_info; + const char *s; GPid auth_dialog_pid; int auth_dialog_in_fd; int auth_dialog_out_fd; - GOutputStream * auth_dialog_in; - GInputStream * auth_dialog_out; - GError * error = NULL; - GString * auth_dialog_request; - gs_free char * auth_dialog_request_str = NULL; + GOutputStream *auth_dialog_in; + GInputStream *auth_dialog_out; + GError *error = NULL; + GString *auth_dialog_request; + gs_free char *auth_dialog_request_str = NULL; gsize auth_dialog_request_len; - AuthDialogData * data; + AuthDialogData *data; int i; plugin_info = nm_vpn_plugin_info_list_find_by_service(nm_vpn_get_plugin_infos(), @@ -845,11 +845,11 @@ static void request_secrets_from_ui(RequestData *request) { gs_unref_ptrarray GPtrArray *secrets = NULL; - gs_free_error GError * error = NULL; - NMSecretAgentSimplePrivate *priv; - NMSecretAgentSimpleSecret * secret; - const char * title; - gs_free char * msg = NULL; + gs_free_error GError *error = NULL; + NMSecretAgentSimplePrivate *priv; + NMSecretAgentSimpleSecret *secret; + const char *title; + gs_free char *msg = NULL; priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(request->self); g_return_if_fail(priv->enabled); @@ -869,8 +869,8 @@ request_secrets_from_ui(RequestData *request) if (nm_connection_is_type(request->connection, NM_SETTING_WIRELESS_SETTING_NAME)) { NMSettingWireless *s_wireless; - GBytes * ssid; - gs_free char * ssid_utf8 = NULL; + GBytes *ssid; + gs_free char *ssid_utf8 = NULL; s_wireless = nm_connection_get_setting_wireless(request->connection); ssid = nm_setting_wireless_get_ssid(s_wireless); @@ -1022,21 +1022,21 @@ out_fail_error: } static void -get_secrets(NMSecretAgentOld * agent, - NMConnection * connection, - const char * connection_path, - const char * setting_name, - const char ** hints, +get_secrets(NMSecretAgentOld *agent, + NMConnection *connection, + const char *connection_path, + const char *setting_name, + const char **hints, NMSecretAgentGetSecretsFlags flags, NMSecretAgentOldGetSecretsFunc callback, gpointer callback_data) { - NMSecretAgentSimple * self = NM_SECRET_AGENT_SIMPLE(agent); + NMSecretAgentSimple *self = NM_SECRET_AGENT_SIMPLE(agent); NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self); - RequestData * request; - gs_free_error GError *error = NULL; - gs_free char * request_id = NULL; - const char * request_id_setting_name; + RequestData *request; + gs_free_error GError *error = NULL; + gs_free char *request_id = NULL; + const char *request_id_setting_name; request_id = g_strdup_printf("%s/%s", connection_path, setting_name); @@ -1097,14 +1097,14 @@ get_secrets(NMSecretAgentOld * agent, */ void nm_secret_agent_simple_response(NMSecretAgentSimple *self, - const char * request_id, - GPtrArray * secrets) + const char *request_id, + GPtrArray *secrets) { NMSecretAgentSimplePrivate *priv; - RequestData * request; - gs_unref_variant GVariant *secrets_dict = NULL; - gs_free_error GError *error = NULL; - int i; + RequestData *request; + gs_unref_variant GVariant *secrets_dict = NULL; + gs_free_error GError *error = NULL; + int i; g_return_if_fail(NM_IS_SECRET_AGENT_SIMPLE(self)); @@ -1117,9 +1117,9 @@ nm_secret_agent_simple_response(NMSecretAgentSimple *self, GVariantBuilder vpn_secrets_builder; GVariantBuilder wg_secrets_builder; GVariantBuilder wg_peer_builder; - GHashTable * settings; + GHashTable *settings; GHashTableIter iter; - const char * name; + const char *name; gboolean has_vpn = FALSE; gboolean has_wg = FALSE; @@ -1207,11 +1207,11 @@ nm_secret_agent_simple_response(NMSecretAgentSimple *self, static void cancel_get_secrets(NMSecretAgentOld *agent, const char *connection_path, const char *setting_name) { - NMSecretAgentSimple * self = NM_SECRET_AGENT_SIMPLE(agent); - NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self); - gs_free_error GError *error = NULL; - gs_free char * request_id = NULL; - RequestData * request; + NMSecretAgentSimple *self = NM_SECRET_AGENT_SIMPLE(agent); + NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self); + gs_free_error GError *error = NULL; + gs_free char *request_id = NULL; + RequestData *request; request_id = g_strdup_printf("%s/%s", connection_path, setting_name); request = g_hash_table_lookup(priv->requests, &request_id); @@ -1229,9 +1229,9 @@ cancel_get_secrets(NMSecretAgentOld *agent, const char *connection_path, const c } static void -save_secrets(NMSecretAgentOld * agent, - NMConnection * connection, - const char * connection_path, +save_secrets(NMSecretAgentOld *agent, + NMConnection *connection, + const char *connection_path, NMSecretAgentOldSaveSecretsFunc callback, gpointer callback_data) { @@ -1240,9 +1240,9 @@ save_secrets(NMSecretAgentOld * agent, } static void -delete_secrets(NMSecretAgentOld * agent, - NMConnection * connection, - const char * connection_path, +delete_secrets(NMSecretAgentOld *agent, + NMConnection *connection, + const char *connection_path, NMSecretAgentOldDeleteSecretsFunc callback, gpointer callback_data) { @@ -1263,10 +1263,10 @@ delete_secrets(NMSecretAgentOld * agent, void nm_secret_agent_simple_enable(NMSecretAgentSimple *self, const char *path) { - NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self); - gs_free RequestData **requests = NULL; - gsize i; - gs_free char * path_full = NULL; + NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(self); + gs_free RequestData **requests = NULL; + gsize i; + gs_free char *path_full = NULL; /* The path is only used to match a request_id with the current * connection. Since the request_id is "${CONNECTION_PATH}/${SETTING}", @@ -1326,10 +1326,10 @@ nm_secret_agent_simple_new(const char *name) static void dispose(GObject *object) { - NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(object); - gs_free_error GError *error = NULL; - GHashTableIter iter; - RequestData * request; + NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE(object); + gs_free_error GError *error = NULL; + GHashTableIter iter; + RequestData *request; g_hash_table_iter_init(&iter, priv->requests); while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &request)) { @@ -1356,7 +1356,7 @@ finalize(GObject *object) void nm_secret_agent_simple_class_init(NMSecretAgentSimpleClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMSecretAgentOldClass *agent_class = NM_SECRET_AGENT_OLD_CLASS(klass); object_class->dispose = dispose; diff --git a/src/libnmc-base/nm-secret-agent-simple.h b/src/libnmc-base/nm-secret-agent-simple.h index 878f9c75..7193f7e5 100644 --- a/src/libnmc-base/nm-secret-agent-simple.h +++ b/src/libnmc-base/nm-secret-agent-simple.h @@ -17,10 +17,10 @@ typedef enum { typedef struct { NMSecretAgentSecretType secret_type; - const char * pretty_name; - const char * entry_id; - char * value; - const char * vpn_type; + const char *pretty_name; + const char *entry_id; + char *value; + const char *vpn_type; bool is_secret : 1; bool no_prompt_entry_id : 1; } NMSecretAgentSimpleSecret; @@ -53,8 +53,8 @@ GType nm_secret_agent_simple_get_type(void); NMSecretAgentSimple *nm_secret_agent_simple_new(const char *name); void nm_secret_agent_simple_response(NMSecretAgentSimple *self, - const char * request_id, - GPtrArray * secrets); + const char *request_id, + GPtrArray *secrets); void nm_secret_agent_simple_enable(NMSecretAgentSimple *self, const char *path); diff --git a/src/libnmc-base/nm-vpn-helpers.c b/src/libnmc-base/nm-vpn-helpers.c index 99a69276..e2c0c394 100644 --- a/src/libnmc-base/nm-vpn-helpers.c +++ b/src/libnmc-base/nm-vpn-helpers.c @@ -25,8 +25,8 @@ NMVpnEditorPlugin * nm_vpn_get_editor_plugin(const char *service_type, GError **error) { - NMVpnEditorPlugin *plugin = NULL; - NMVpnPluginInfo * plugin_info; + NMVpnEditorPlugin *plugin = NULL; + NMVpnPluginInfo *plugin_info; gs_free_error GError *local = NULL; g_return_val_if_fail(service_type, NULL); @@ -95,8 +95,8 @@ nm_vpn_get_plugin_infos(void) gboolean nm_vpn_supports_ipv6(NMConnection *connection) { - NMSettingVpn * s_vpn; - const char * service_type; + NMSettingVpn *s_vpn; + const char *service_type; NMVpnEditorPlugin *plugin; guint32 capabilities; @@ -188,16 +188,16 @@ _extract_variable_value(char *line, const char *tag, char **value) gboolean nm_vpn_openconnect_authenticate_helper(const char *host, - char ** cookie, - char ** gateway, - char ** gwcert, - int * status, - GError ** error) + char **cookie, + char **gateway, + char **gwcert, + int *status, + GError **error) { - gs_free char * output = NULL; + gs_free char *output = NULL; gs_free const char **output_v = NULL; - const char *const * iter; - const char * path; + const char *const *iter; + const char *path; const char *const DEFAULT_PATHS[] = { "/sbin/", "/usr/sbin/", @@ -249,14 +249,14 @@ nm_vpn_openconnect_authenticate_helper(const char *host, } static gboolean -_wg_complete_peer(GPtrArray ** p_peers, +_wg_complete_peer(GPtrArray **p_peers, NMWireGuardPeer *peer_take, gsize peer_start_line_nr, - const char * filename, - GError ** error) + const char *filename, + GError **error) { - nm_auto_unref_wgpeer NMWireGuardPeer *peer = peer_take; - gs_free_error GError *local = NULL; + nm_auto_unref_wgpeer NMWireGuardPeer *peer = peer_take; + gs_free_error GError *local = NULL; if (!peer) return TRUE; @@ -330,37 +330,37 @@ nm_vpn_wireguard_import(const char *filename, GError **error) { nm_auto_clear_secret_ptr NMSecretPtr file_content = NM_SECRET_PTR_INIT(); char ifname[IFNAMSIZ]; - gs_free char * uuid = NULL; + gs_free char *uuid = NULL; gboolean ifname_valid = FALSE; - const char * cstr; - char * line_remainder; - gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingWireGuard * s_wg; - gs_free_error GError *local = NULL; + const char *cstr; + char *line_remainder; + gs_unref_object NMConnection *connection = NULL; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingWireGuard *s_wg; + gs_free_error GError *local = NULL; enum { LINE_CONTEXT_INIT, LINE_CONTEXT_INTERFACE, LINE_CONTEXT_PEER, } line_context; - gsize line_nr; - gsize current_peer_start_line_nr = 0; - nm_auto_unref_wgpeer NMWireGuardPeer *current_peer = NULL; - gs_unref_ptrarray GPtrArray *data_dns_search = NULL; - gs_unref_ptrarray GPtrArray *data_dns_v4 = NULL; - gs_unref_ptrarray GPtrArray *data_dns_v6 = NULL; - gs_unref_ptrarray GPtrArray *data_addr_v4 = NULL; - gs_unref_ptrarray GPtrArray *data_addr_v6 = NULL; - gs_unref_ptrarray GPtrArray *data_peers = NULL; - const char * data_private_key = NULL; - gint64 data_table; - guint data_listen_port = 0; - guint data_fwmark = 0; - guint data_mtu = 0; - int is_v4; - guint i; + gsize line_nr; + gsize current_peer_start_line_nr = 0; + nm_auto_unref_wgpeer NMWireGuardPeer *current_peer = NULL; + gs_unref_ptrarray GPtrArray *data_dns_search = NULL; + gs_unref_ptrarray GPtrArray *data_dns_v4 = NULL; + gs_unref_ptrarray GPtrArray *data_dns_v6 = NULL; + gs_unref_ptrarray GPtrArray *data_addr_v4 = NULL; + gs_unref_ptrarray GPtrArray *data_addr_v6 = NULL; + gs_unref_ptrarray GPtrArray *data_peers = NULL; + const char *data_private_key = NULL; + gint64 data_table; + guint data_listen_port = 0; + guint data_fwmark = 0; + guint data_mtu = 0; + int is_v4; + guint i; g_return_val_if_fail(filename, NULL); g_return_val_if_fail(!error || !*error, NULL); @@ -420,8 +420,8 @@ nm_vpn_wireguard_import(const char *filename, GError **error) line_nr = 0; while (line_remainder[0] != '\0') { const char *matched_key = NULL; - char * value = NULL; - char * line; + char *value = NULL; + char *line; char ch; gint64 i64; @@ -742,9 +742,9 @@ fail_invalid_secret: const char *method_manual = is_v4 ? NM_SETTING_IP4_CONFIG_METHOD_MANUAL : NM_SETTING_IP6_CONFIG_METHOD_MANUAL; NMSettingIPConfig *s_ip = is_v4 ? s_ip4 : s_ip6; - GPtrArray * data_dns = is_v4 ? data_dns_v4 : data_dns_v6; - GPtrArray * data_addr = is_v4 ? data_addr_v4 : data_addr_v6; - GPtrArray * data_dns_search2 = data_dns_search; + GPtrArray *data_dns = is_v4 ? data_dns_v4 : data_dns_v6; + GPtrArray *data_addr = is_v4 ? data_addr_v4 : data_addr_v6; + GPtrArray *data_dns_search2 = data_dns_search; if (!data_addr) { /* When specifying "DNS", we also require an "Address" for the same address diff --git a/src/libnmc-base/nm-vpn-helpers.h b/src/libnmc-base/nm-vpn-helpers.h index 1cf06743..678ce1e2 100644 --- a/src/libnmc-base/nm-vpn-helpers.h +++ b/src/libnmc-base/nm-vpn-helpers.h @@ -20,11 +20,11 @@ gboolean nm_vpn_supports_ipv6(NMConnection *connection); const NmcVpnPasswordName *nm_vpn_get_secret_names(const char *service_type); gboolean nm_vpn_openconnect_authenticate_helper(const char *host, - char ** cookie, - char ** gateway, - char ** gwcert, - int * status, - GError ** error); + char **cookie, + char **gateway, + char **gwcert, + int *status, + GError **error); NMConnection *nm_vpn_wireguard_import(const char *filename, GError **error); diff --git a/src/libnmc-base/qrcodegen.c b/src/libnmc-base/qrcodegen.c index 0aacdb01..b86ca587 100644 --- a/src/libnmc-base/qrcodegen.c +++ b/src/libnmc-base/qrcodegen.c @@ -133,7 +133,7 @@ static const int PENALTY_N4 = 10; // Public function - see documentation comment in header file. bool -qrcodegen_encodeText(const char * text, +qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode[], enum qrcodegen_Ecc ecl, diff --git a/src/libnmc-base/qrcodegen.h b/src/libnmc-base/qrcodegen.h index b91ae49a..46d986a3 100644 --- a/src/libnmc-base/qrcodegen.h +++ b/src/libnmc-base/qrcodegen.h @@ -158,7 +158,7 @@ struct qrcodegen_Segment { * - Please consult the QR Code specification for information on * data capacities per version, ECC level, and text encoding mode. */ -bool qrcodegen_encodeText(const char * text, +bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode[], enum qrcodegen_Ecc ecl, diff --git a/src/libnmc-setting/nm-meta-setting-access.c b/src/libnmc-setting/nm-meta-setting-access.c index cd4cbdd5..7f679ae5 100644 --- a/src/libnmc-setting/nm-meta-setting-access.c +++ b/src/libnmc-setting/nm-meta-setting-access.c @@ -72,7 +72,7 @@ nm_meta_setting_info_editor_find_by_setting(NMSetting *setting) const NMMetaPropertyInfo * nm_meta_setting_info_editor_get_property_info(const NMMetaSettingInfoEditor *setting_info, - const char * property_name) + const char *property_name) { guint i; @@ -109,7 +109,7 @@ const NMMetaPropertyInfo * nm_meta_property_info_find_by_name(const char *setting_name, const char *property_name) { const NMMetaSettingInfoEditor *setting_info; - const NMMetaPropertyInfo * property_info; + const NMMetaPropertyInfo *property_info; setting_info = nm_meta_setting_info_editor_find_by_name(setting_name, FALSE); if (!setting_info) @@ -128,7 +128,7 @@ const NMMetaPropertyInfo * nm_meta_property_info_find_by_setting(NMSetting *setting, const char *property_name) { const NMMetaSettingInfoEditor *setting_info; - const NMMetaPropertyInfo * property_info; + const NMMetaPropertyInfo *property_info; setting_info = nm_meta_setting_info_editor_find_by_setting(setting); if (!setting_info) @@ -193,8 +193,8 @@ nm_meta_abstract_info_get_name(const NMMetaAbstractInfo *abstract_info, gboolean const NMMetaAbstractInfo *const * nm_meta_abstract_info_get_nested(const NMMetaAbstractInfo *abstract_info, - guint * out_len, - gpointer * nested_to_free) + guint *out_len, + gpointer *nested_to_free) { const NMMetaAbstractInfo *const *nested; guint l = 0; @@ -219,16 +219,16 @@ nm_meta_abstract_info_get_nested(const NMMetaAbstractInfo *abstract_info, } gconstpointer -nm_meta_abstract_info_get(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +nm_meta_abstract_info_get(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, gpointer target, gpointer target_data, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free) + gboolean *out_is_default, + gpointer *out_to_free) { nm_assert(abstract_info); nm_assert(abstract_info->meta_type); @@ -254,13 +254,13 @@ nm_meta_abstract_info_get(const NMMetaAbstractInfo * abstract_info, } const char *const * -nm_meta_abstract_info_complete(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +nm_meta_abstract_info_complete(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, const NMMetaOperationContext *operation_context, - const char * text, - gboolean * out_complete_filename, - char *** out_to_free) + const char *text, + gboolean *out_complete_filename, + char ***out_to_free) { const char *const *values; gsize i, j, text_len; @@ -319,7 +319,7 @@ nm_meta_abstract_info_complete(const NMMetaAbstractInfo * abstract_info, return (const char *const *) v; } else { const char *const *v = values; - char ** r; + char **r; for (i = 0, j = 0; v[i]; i++) { if (strncmp(v[i], text, text_len) != 0) @@ -347,7 +347,7 @@ nm_meta_abstract_info_complete(const NMMetaAbstractInfo * abstract_info, char * nm_meta_abstract_info_get_nested_names_str(const NMMetaAbstractInfo *abstract_info, - const char * name_prefix) + const char *name_prefix) { gs_free gpointer nested_to_free = NULL; const NMMetaAbstractInfo *const *nested; @@ -364,7 +364,7 @@ nm_meta_abstract_info_get_nested_names_str(const NMMetaAbstractInfo *abstract_in char * nm_meta_abstract_infos_get_names_str(const NMMetaAbstractInfo *const *fields_array, - const char * name_prefix) + const char *name_prefix) { GString *str; guint i; @@ -417,7 +417,7 @@ _output_selection_pack(const NMMetaAbstractInfo *const *fields_array, GArray *ar memcpy(pdata, str->str, str->len); for (i = 0; i < len; i++) { const OutputSelectionItem *a = &g_array_index(array, OutputSelectionItem, i); - NMMetaSelectionItem * p = (NMMetaSelectionItem *) &result->items[i]; + NMMetaSelectionItem *p = (NMMetaSelectionItem *) &result->items[i]; p->info = fields_array[a->idx]; p->idx = a->idx; @@ -433,19 +433,19 @@ _output_selection_pack(const NMMetaAbstractInfo *const *fields_array, GArray *ar static gboolean _output_selection_select_one(const NMMetaAbstractInfo *const *fields_array, - const char * fields_prefix, - const char * fields_str, + const char *fields_prefix, + const char *fields_str, gboolean validate_nested, - GArray ** p_array, - GString ** p_str, - GError ** error) + GArray **p_array, + GString **p_str, + GError **error) { guint i, j; - const char * i_name; - const char * right; + const char *i_name; + const char *right; gboolean found = FALSE; const NMMetaAbstractInfo *fields_array_failure = NULL; - gs_free char * fields_str_clone = NULL; + gs_free char *fields_str_clone = NULL; nm_assert(fields_str); nm_assert(p_array); @@ -465,7 +465,7 @@ _output_selection_select_one(const NMMetaAbstractInfo *const *fields_array, goto not_found; for (i = 0; fields_array[i]; i++) { - const NMMetaAbstractInfo * fi = fields_array[i]; + const NMMetaAbstractInfo *fi = fields_array[i]; const NMMetaAbstractInfo *const *nested; gs_free gpointer nested_to_free = NULL; @@ -536,7 +536,7 @@ not_found: } { - GString * str; + GString *str; OutputSelectionItem s = { .idx = i, }; @@ -588,14 +588,14 @@ nm_meta_selection_create_all(const NMMetaAbstractInfo *const *fields_array) NMMetaSelectionResultList * nm_meta_selection_create_parse_one( const NMMetaAbstractInfo *const *fields_array, - const char * fields_prefix, + const char *fields_prefix, const char * fields_str, /* one field selector (contains no commas) and is already stripped of spaces. */ gboolean validate_nested, GError **error) { - gs_unref_array GArray *array = NULL; - nm_auto_free_gstring GString *str = NULL; + gs_unref_array GArray *array = NULL; + nm_auto_free_gstring GString *str = NULL; g_return_val_if_fail(!error || !*error, NULL); nm_assert(fields_str && !strchr(fields_str, ',')); @@ -614,15 +614,15 @@ nm_meta_selection_create_parse_one( NMMetaSelectionResultList * nm_meta_selection_create_parse_list( const NMMetaAbstractInfo *const *fields_array, - const char * fields_str, /* a comma separated list of selectors */ + const char *fields_str, /* a comma separated list of selectors */ gboolean validate_nested, - GError ** error) + GError **error) { - gs_unref_array GArray *array = NULL; + gs_unref_array GArray *array = NULL; nm_auto_free_gstring GString *str = NULL; - gs_free char * fields_str_clone = NULL; - char * fields_str_cur; - char * fields_str_next; + gs_free char *fields_str_clone = NULL; + char *fields_str_cur; + char *fields_str_next; g_return_val_if_fail(!error || !*error, NULL); diff --git a/src/libnmc-setting/nm-meta-setting-access.h b/src/libnmc-setting/nm-meta-setting-access.h index 81aa3b6f..9b00eb0a 100644 --- a/src/libnmc-setting/nm-meta-setting-access.h +++ b/src/libnmc-setting/nm-meta-setting-access.h @@ -20,10 +20,10 @@ const NMMetaSettingInfoEditor *nm_meta_setting_info_editor_find_by_setting(NMSet const NMMetaPropertyInfo * nm_meta_setting_info_editor_get_property_info(const NMMetaSettingInfoEditor *setting_info, - const char * property_name); + const char *property_name); const NMMetaPropertyInfo *nm_meta_property_info_find_by_name(const char *setting_name, const char *property_name); -const NMMetaPropertyInfo *nm_meta_property_info_find_by_setting(NMSetting * setting, +const NMMetaPropertyInfo *nm_meta_property_info_find_by_setting(NMSetting *setting, const char *property_name); gboolean nm_meta_setting_info_editor_has_secrets(const NMMetaSettingInfoEditor *setting_info); @@ -39,41 +39,41 @@ const char *nm_meta_abstract_info_get_name(const NMMetaAbstractInfo *abstract_in const NMMetaAbstractInfo *const * nm_meta_abstract_info_get_nested(const NMMetaAbstractInfo *abstract_info, - guint * out_len, - gpointer * nested_to_free); + guint *out_len, + gpointer *nested_to_free); -gconstpointer nm_meta_abstract_info_get(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +gconstpointer nm_meta_abstract_info_get(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, gpointer target, gpointer target_data, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free); + gboolean *out_is_default, + gpointer *out_to_free); const char *const *nm_meta_abstract_info_complete(const NMMetaAbstractInfo *abstract_info, - const NMMetaEnvironment * environment, + const NMMetaEnvironment *environment, gpointer environment_user_data, const NMMetaOperationContext *operation_context, - const char * text, + const char *text, gboolean *out_complete_filename, - char *** out_to_free); + char ***out_to_free); /*****************************************************************************/ char *nm_meta_abstract_info_get_nested_names_str(const NMMetaAbstractInfo *abstract_info, - const char * name_prefix); + const char *name_prefix); char *nm_meta_abstract_infos_get_names_str(const NMMetaAbstractInfo *const *fields_array, - const char * name_prefix); + const char *name_prefix); /*****************************************************************************/ typedef struct { const NMMetaAbstractInfo *info; - const char * self_selection; - const char * sub_selection; + const char *self_selection; + const char *sub_selection; guint idx; } NMMetaSelectionItem; @@ -86,14 +86,14 @@ NMMetaSelectionResultList * nm_meta_selection_create_all(const NMMetaAbstractInfo *const *fields_array); NMMetaSelectionResultList * nm_meta_selection_create_parse_one(const NMMetaAbstractInfo *const *fields_array, - const char * fields_prefix, - const char * fields_str, + const char *fields_prefix, + const char *fields_str, gboolean validate_nested, - GError ** error); + GError **error); NMMetaSelectionResultList * nm_meta_selection_create_parse_list(const NMMetaAbstractInfo *const *fields_array, - const char * fields_str, + const char *fields_str, gboolean validate_nested, - GError ** error); + GError **error); #endif /* _NM_META_SETTING_ACCESS_H__ */ diff --git a/src/libnmc-setting/nm-meta-setting-base-impl.c b/src/libnmc-setting/nm-meta-setting-base-impl.c index 8c1ad10e..cd55779f 100644 --- a/src/libnmc-setting/nm-meta-setting-base-impl.c +++ b/src/libnmc-setting/nm-meta-setting-base-impl.c @@ -646,8 +646,8 @@ nm_meta_setting_infos_by_gtype(GType gtype) { #if _NM_META_SETTING_BASE_IMPL_LIBNM nm_auto_unref_gtypeclass GTypeClass *gtypeclass_unref = NULL; - GTypeClass * gtypeclass; - NMSettingClass * klass; + GTypeClass *gtypeclass; + NMSettingClass *klass; if (!g_type_is_a(gtype, NM_TYPE_SETTING)) goto out_none; diff --git a/src/libnmc-setting/nm-meta-setting-base-impl.h b/src/libnmc-setting/nm-meta-setting-base-impl.h index eba1fb96..ea4f85ff 100644 --- a/src/libnmc-setting/nm-meta-setting-base-impl.h +++ b/src/libnmc-setting/nm-meta-setting-base-impl.h @@ -73,18 +73,18 @@ typedef struct { const char *(*uri_func)(NMSetting8021x *setting); const char *(*passwd_func)(NMSetting8021x *setting); NMSettingSecretFlags (*pwflag_func)(NMSetting8021x *setting); - gboolean (*set_cert_func)(NMSetting8021x * setting, - const char * value, + gboolean (*set_cert_func)(NMSetting8021x *setting, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); - gboolean (*set_private_key_func)(NMSetting8021x * setting, - const char * value, - const char * password, + GError **error); + gboolean (*set_private_key_func)(NMSetting8021x *setting, + const char *value, + const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, - GError ** error); - const char * file_suffix; + GError **error); + const char *file_suffix; NMSetting8021xSchemeType scheme_type; bool is_secret : 1; } NMSetting8021xSchemeVtable; diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index 5bb2b451..4a6f3882 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -49,7 +49,7 @@ _gtype_property_get_gtype(GType gtype, const char *property_name) /* given @gtype, a type for a GObject, lookup the property @property_name * and return its value_type. */ if (G_TYPE_IS_CLASSED(gtype)) { - GParamSpec * param_spec; + GParamSpec *param_spec; nm_auto_unref_gtypeclass GTypeClass *gtypeclass = g_type_class_ref(gtype); if (G_IS_OBJECT_CLASS(gtypeclass)) { @@ -88,12 +88,12 @@ _int64_cmp_desc(gconstpointer a, gconstpointer b, gpointer user_data) static gint64 * _value_str_as_index_list(const char *value, gsize *out_len) { - gs_free char *str_clone_free = NULL; - gboolean str_cloned = FALSE; - char * str; - gsize i, j; - gsize n_alloc; - gsize len; + gs_free char *str_clone_free = NULL; + gboolean str_cloned = FALSE; + char *str; + gsize i, j; + gsize n_alloc; + gsize len; gs_free gint64 *arr = NULL; *out_len = 0; @@ -244,10 +244,10 @@ _parse_ip_address(int family, const char *address, GError **error) { gs_free char *ip_str = NULL; const int MAX_PREFIX = (family == AF_INET) ? 32 : 128; - NMIPAddress * addr; - char * plen; + NMIPAddress *addr; + char *plen; int prefix; - GError * local = NULL; + GError *local = NULL; g_return_val_if_fail(address, NULL); g_return_val_if_fail(!error || !*error, NULL); @@ -285,19 +285,19 @@ _parse_ip_address(int family, const char *address, GError **error) static NMIPRoute * _parse_ip_route(int family, const char *str, GError **error) { - const int MAX_PREFIX = (family == AF_INET) ? 32 : 128; - const char * next_hop = NULL; - int prefix; - NMIPRoute * route = NULL; - GError * local = NULL; - gint64 metric = -1; - guint i; - gs_free const char **routev = NULL; - gs_free char * str_clean_free = NULL; - const char * str_clean; - gs_free char * dest_clone = NULL; - const char * dest; - const char * plen; + const int MAX_PREFIX = (family == AF_INET) ? 32 : 128; + const char *next_hop = NULL; + int prefix; + NMIPRoute *route = NULL; + GError *local = NULL; + gint64 metric = -1; + guint i; + gs_free const char **routev = NULL; + gs_free char *str_clean_free = NULL; + const char *str_clean; + gs_free char *dest_clone = NULL; + const char *dest; + const char *plen; gs_unref_hashtable GHashTable *attrs = NULL; #define ROUTE_SYNTAX \ _("The valid syntax is: 'ip[/prefix] [next-hop] [metric] [attribute=val]... [,ip[/prefix] " \ @@ -357,9 +357,9 @@ _parse_ip_route(int family, const char *str, GError **error) } metric = tmp64; } else if (strchr(routev[i], '=')) { - GHashTableIter iter; - char * iter_key; - GVariant * iter_value; + GHashTableIter iter; + char *iter_key; + GVariant *iter_value; gs_unref_hashtable GHashTable *tmp_attrs = NULL; tmp_attrs = nm_utils_parse_variant_attributes(routev[i], @@ -409,8 +409,8 @@ _parse_ip_route(int family, const char *str, GError **error) if (attrs) { GHashTableIter iter; - char * name; - GVariant * variant; + char *name; + GVariant *variant; g_hash_table_iter_init(&iter, attrs); while (g_hash_table_iter_next(&iter, (gpointer *) &name, (gpointer *) &variant)) @@ -445,7 +445,7 @@ nmc_proxy_check_script(const char *script, char **out_script, GError **error) _PAC_SCRIPT_TYPE_FILE, _PAC_SCRIPT_TYPE_JSON, } desired_type = _PAC_SCRIPT_TYPE_GUESS; - const char * filename = NULL; + const char *filename = NULL; size_t c_len = 0; gs_free char *script_clone = NULL; @@ -588,7 +588,7 @@ static void _env_warn_fcn(const NMMetaEnvironment *environment, gpointer environment_user_data, NMMetaEnvWarnLevel warn_level, - const char * fmt_l10n, + const char *fmt_l10n, ...) { va_list ap; @@ -636,7 +636,7 @@ static gboolean _set_fcn_optionlist(ARGS_SET_FCN); static gboolean _SET_FCN_DO_RESET_DEFAULT(const NMMetaPropertyInfo *property_info, NMMetaAccessorModifier modifier, - const char * value) + const char *value) { nm_assert(property_info); nm_assert(!property_info->property_type->set_supports_remove); @@ -649,7 +649,7 @@ _SET_FCN_DO_RESET_DEFAULT(const NMMetaPropertyInfo *property_info, static gboolean _SET_FCN_DO_RESET_DEFAULT_WITH_SUPPORTS_REMOVE(const NMMetaPropertyInfo *property_info, NMMetaAccessorModifier modifier, - const char * value) + const char *value) { nm_assert(property_info); nm_assert(property_info->property_type->set_supports_remove); @@ -724,9 +724,9 @@ static gboolean _gobject_property_is_default(NMSetting *setting, const char *prop_name) { nm_auto_unset_gvalue GValue v = G_VALUE_INIT; - GParamSpec * pspec; - GHashTable * ht; - char ** strv; + GParamSpec *pspec; + GHashTable *ht; + char **strv; pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(setting)), prop_name); if (!G_IS_PARAM_SPEC(pspec)) @@ -750,7 +750,7 @@ static gboolean _gobject_property_reset(NMSetting *setting, const char *prop_name, gboolean reset_default) { nm_auto_unset_gvalue GValue v = G_VALUE_INIT; - GParamSpec * pspec; + GParamSpec *pspec; pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT(setting)), prop_name); if (!G_IS_PARAM_SPEC(pspec)) @@ -772,8 +772,8 @@ _gobject_property_reset_default(NMSetting *setting, const char *prop_name) static const char * _coerce_str_emptyunset(NMMetaAccessorGetType get_type, gboolean is_default, - const char * cstr, - char ** out_str) + const char *cstr, + char **out_str) { nm_assert(out_str && !*out_str); nm_assert((!is_default && cstr && cstr[0] != '\0') || NM_IN_STRSET(cstr, NULL, "")); @@ -803,7 +803,7 @@ _coerce_str_emptyunset(NMMetaAccessorGetType get_type, #define RETURN_STR_EMPTYUNSET(get_type, is_default, cstr) \ G_STMT_START \ { \ - char * _str = NULL; \ + char *_str = NULL; \ const char *_cstr; \ \ _cstr = _coerce_str_emptyunset((get_type), (is_default), (cstr), &_str); \ @@ -824,13 +824,13 @@ _is_default(const NMMetaPropertyInfo *property_info, NMSetting *setting) static gconstpointer _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info, - NMSetting * setting, + NMSetting *setting, NMMetaAccessorGetType get_type, gboolean handle_emptyunset, - gboolean * out_is_default, - gpointer * out_to_free) + gboolean *out_is_default, + gpointer *out_to_free) { - const char * cstr; + const char *cstr; GType gtype_prop; nm_auto_unset_gvalue GValue val = G_VALUE_INIT; gboolean is_default; @@ -910,9 +910,9 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info, } if (gtype_prop == G_TYPE_HASH_TABLE) { - GHashTable * strdict; + GHashTable *strdict; gs_free const char **keys = NULL; - GString * str; + GString *str; gsize i; nm_assert(property_info->setting_info @@ -927,8 +927,8 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info, str = g_string_new(NULL); for (i = 0; keys[i]; i++) { - const char * key = keys[i]; - const char * v = g_hash_table_lookup(strdict, key); + const char *key = keys[i]; + const char *v = g_hash_table_lookup(strdict, key); gs_free char *escaped_key = NULL; gs_free char *escaped_val = NULL; @@ -945,7 +945,8 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info, return NULL; } -static gconstpointer _get_fcn_gobject(ARGS_GET_FCN) +static gconstpointer +_get_fcn_gobject(ARGS_GET_FCN) { return _get_fcn_gobject_impl(property_info, setting, @@ -955,15 +956,16 @@ static gconstpointer _get_fcn_gobject(ARGS_GET_FCN) out_to_free); } -static gconstpointer _get_fcn_gobject_int(ARGS_GET_FCN) +static gconstpointer +_get_fcn_gobject_int(ARGS_GET_FCN) { - GParamSpec * pspec; + GParamSpec *pspec; nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; gboolean is_uint64 = FALSE; NMMetaSignUnsignInt64 v; guint base = 10; const NMMetaUtilsIntValueInfo *value_infos; - char * return_str; + char *return_str; RETURN_UNSUPPORTED_GET_TYPE(); @@ -1034,7 +1036,8 @@ static gconstpointer _get_fcn_gobject_int(ARGS_GET_FCN) RETURN_STR_TO_FREE(return_str); } -static gconstpointer _get_fcn_gobject_mtu(ARGS_GET_FCN) +static gconstpointer +_get_fcn_gobject_mtu(ARGS_GET_FCN) { guint32 mtu; @@ -1058,7 +1061,8 @@ static gconstpointer _get_fcn_gobject_mtu(ARGS_GET_FCN) RETURN_STR_TO_FREE(g_strdup_printf("%u", (unsigned) mtu)); } -static gconstpointer _get_fcn_gobject_secret_flags(ARGS_GET_FCN) +static gconstpointer +_get_fcn_gobject_secret_flags(ARGS_GET_FCN) { guint v; GValue val = G_VALUE_INIT; @@ -1072,12 +1076,13 @@ static gconstpointer _get_fcn_gobject_secret_flags(ARGS_GET_FCN) RETURN_STR_TO_FREE(secret_flags_to_string(v, get_type)); } -static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN) +static gconstpointer +_get_fcn_gobject_enum(ARGS_GET_FCN) { - GType gtype = 0; + GType gtype = 0; nm_auto_unref_gtypeclass GTypeClass *gtype_class = NULL; nm_auto_unref_gtypeclass GTypeClass *gtype_prop_class = NULL; - const struct _NMUtilsEnumValueInfo * value_infos = NULL; + const struct _NMUtilsEnumValueInfo *value_infos = NULL; gboolean has_gtype = FALSE; nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; gint64 v; @@ -1086,9 +1091,9 @@ static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN) gboolean format_numeric_hex_unknown = FALSE; gboolean format_text = FALSE; gboolean format_text_l10n = FALSE; - gs_free char * s = NULL; + gs_free char *s = NULL; char s_numeric[64]; - GParamSpec * pspec; + GParamSpec *pspec; RETURN_UNSUPPORTED_GET_TYPE(); @@ -1221,7 +1226,8 @@ static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN) /*****************************************************************************/ -static gboolean _set_fcn_gobject_string(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_string(ARGS_SET_FCN) { gs_free char *to_free = NULL; @@ -1264,10 +1270,10 @@ static gboolean _set_fcn_gobject_string(ARGS_SET_FCN) static gboolean _set_fcn_gobject_bool_impl(const NMMetaPropertyInfo *property_info, - NMSetting * setting, + NMSetting *setting, NMMetaAccessorModifier modifier, - const char * value, - GError ** error) + const char *value, + GError **error) { gboolean val_bool; @@ -1281,12 +1287,14 @@ _set_fcn_gobject_bool_impl(const NMMetaPropertyInfo *property_info, return TRUE; } -static gboolean _set_fcn_gobject_bool(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_bool(ARGS_SET_FCN) { return _set_fcn_gobject_bool_impl(property_info, setting, modifier, value, error); } -static gboolean _set_fcn_gobject_ternary(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_ternary(ARGS_SET_FCN) { NMTernary val; @@ -1303,10 +1311,11 @@ static gboolean _set_fcn_gobject_ternary(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_gobject_int(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_int(ARGS_SET_FCN) { int errsv; - const GParamSpec * pspec; + const GParamSpec *pspec; nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; gboolean is_uint64; NMMetaSignUnsignInt64 v; @@ -1330,7 +1339,7 @@ static gboolean _set_fcn_gobject_int(ARGS_SET_FCN) if (value && (value_infos = property_info->property_typ_data->subtype.gobject_int.value_infos)) { gs_free char *vv_free = NULL; - const char * vv; + const char *vv; vv = nm_strstrip_avoid_copy_a(300, value, &vv_free); for (; value_infos->nick; value_infos++) { @@ -1454,10 +1463,11 @@ have_value_from_nick: return TRUE; } -static gboolean _set_fcn_gobject_mtu(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_mtu(ARGS_SET_FCN) { nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; - const GParamSpec * pspec; + const GParamSpec *pspec; gint64 v; if (_SET_FCN_DO_RESET_DEFAULT(property_info, modifier, value)) @@ -1496,7 +1506,8 @@ static gboolean _set_fcn_gobject_mtu(ARGS_SET_FCN) #define IEEE802154_ADDR_LEN 8 #endif -static gboolean _set_fcn_gobject_mac(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_mac(ARGS_SET_FCN) { NMMetaPropertyTypeMacMode mode; gboolean valid; @@ -1528,12 +1539,13 @@ static gboolean _set_fcn_gobject_mac(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_gobject_enum(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_enum(ARGS_SET_FCN) { - GType gtype = 0; - GType gtype_prop; - gboolean has_gtype = FALSE; - nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; + GType gtype = 0; + GType gtype_prop; + gboolean has_gtype = FALSE; + nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; nm_auto_unref_gtypeclass GTypeClass *gtype_prop_class = NULL; nm_auto_unref_gtypeclass GTypeClass *gtype_class = NULL; gboolean is_flags; @@ -1619,7 +1631,7 @@ static gboolean _set_fcn_gobject_enum(ARGS_SET_FCN) fail: if (error) { gs_free const char **valid_all = NULL; - gs_free const char * valid_str = NULL; + gs_free const char *valid_str = NULL; gboolean has_minmax = FALSE; int min = G_MININT; int max = G_MAXINT; @@ -1661,14 +1673,15 @@ fail: /*****************************************************************************/ -static const char *const *_values_fcn_gobject_enum(ARGS_VALUES_FCN) +static const char *const * +_values_fcn_gobject_enum(ARGS_VALUES_FCN) { GType gtype = 0; gboolean has_gtype = FALSE; gboolean has_minmax = FALSE; int min = G_MININT; int max = G_MAXINT; - char ** v; + char **v; if (property_info->property_typ_data) { if (property_info->property_typ_data->subtype.gobject_enum.min @@ -1707,7 +1720,8 @@ static const char *const *_values_fcn_gobject_enum(ARGS_VALUES_FCN) /*****************************************************************************/ -static const char *const *_complete_fcn_gobject_bool(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_gobject_bool(ARGS_COMPLETE_FCN) { static const char *const v[] = { "true", @@ -1726,7 +1740,8 @@ static const char *const *_complete_fcn_gobject_bool(ARGS_COMPLETE_FCN) return v; } -static const char *const *_complete_fcn_gobject_ternary(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_gobject_ternary(ARGS_COMPLETE_FCN) { static const char *const v[] = { "on", @@ -1748,12 +1763,13 @@ static const char *const *_complete_fcn_gobject_ternary(ARGS_COMPLETE_FCN) return v; } -static const char *const *_complete_fcn_gobject_devices(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_gobject_devices(ARGS_COMPLETE_FCN) { NMDevice *const *devices = NULL; guint i, j; guint len = 0; - char ** ifnames; + char **ifnames; if (environment && environment->get_nm_devices) { devices = environment->get_nm_devices(environment, environment_user_data, &len); @@ -1860,9 +1876,9 @@ secret_flags_to_string(guint32 flags, NMMetaAccessorGetType get_type) static const char * _multilist_do_validate(const NMMetaPropertyInfo *property_info, - NMSetting * setting, - const char * item, - GError ** error) + NMSetting *setting, + const char *item, + GError **error) { if (property_info->property_typ_data->values_static) { nm_assert(!property_info->property_typ_data->subtype.multilist.validate_fcn); @@ -1882,7 +1898,8 @@ _multilist_do_validate(const NMMetaPropertyInfo *property_info, return item; } -static gconstpointer _get_fcn_multilist(ARGS_GET_FCN) +static gconstpointer +_get_fcn_multilist(ARGS_GET_FCN) { return _get_fcn_gobject_impl( property_info, @@ -1895,7 +1912,7 @@ static gconstpointer _get_fcn_multilist(ARGS_GET_FCN) static gboolean _multilist_clear_property(const NMMetaPropertyInfo *property_info, - NMSetting * setting, + NMSetting *setting, gboolean is_set /* or else set default */) { if (property_info->property_typ_data->subtype.multilist.clear_emptyunset_fcn) { @@ -1909,7 +1926,8 @@ _multilist_clear_property(const NMMetaPropertyInfo *property_info, return _gobject_property_reset(setting, property_info->property_name, FALSE); } -static gboolean _set_fcn_multilist(ARGS_SET_FCN) +static gboolean +_set_fcn_multilist(ARGS_SET_FCN) { gs_free const char **strv = NULL; gsize i, j, nstrv; @@ -2000,7 +2018,8 @@ static gboolean _set_fcn_multilist(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_optionlist(ARGS_SET_FCN) +static gboolean +_set_fcn_optionlist(ARGS_SET_FCN) { gs_free const char **strv = NULL; gs_free const char **strv_val = NULL; @@ -2112,7 +2131,7 @@ validate_flags(NMSetting *setting, const char *prop, guint val, GError **error) if (g_param_value_validate(pspec, &value)) { GParamSpecFlags *pspec_flags = (GParamSpecFlags *) pspec; - gs_free char * flag_values = NULL; + gs_free char *flag_values = NULL; flag_values = flag_values_to_string(pspec_flags->flags_class->values, pspec_flags->flags_class->n_values); @@ -2129,7 +2148,8 @@ validate_flags(NMSetting *setting, const char *prop, guint val, GError **error) return success; } -static gboolean _set_fcn_gobject_flags(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_flags(ARGS_SET_FCN) { unsigned long val_int; @@ -2149,7 +2169,8 @@ static gboolean _set_fcn_gobject_flags(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_gobject_ssid(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_ssid(ARGS_SET_FCN) { gs_unref_bytes GBytes *ssid = NULL; @@ -2166,7 +2187,8 @@ static gboolean _set_fcn_gobject_ssid(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_gobject_ifname(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_ifname(ARGS_SET_FCN) { if (_SET_FCN_DO_RESET_DEFAULT(property_info, modifier, value)) return _gobject_property_reset_default(setting, property_info->property_name); @@ -2175,7 +2197,8 @@ static gboolean _set_fcn_gobject_ifname(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_vpn_service_type(ARGS_SET_FCN) +static gboolean +_set_fcn_vpn_service_type(ARGS_SET_FCN) { gs_free char *service_name = NULL; @@ -2187,7 +2210,8 @@ static gboolean _set_fcn_vpn_service_type(ARGS_SET_FCN) return TRUE; } -static const char *const *_complete_fcn_vpn_service_type(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_vpn_service_type(ARGS_COMPLETE_FCN) { gsize i, j; char **values; @@ -2240,14 +2264,15 @@ _multilist_validate_fcn_is_ipv4_addr_or_subnet(const char *value, GError **error return value; } -static gboolean _set_fcn_gobject_bytes(ARGS_SET_FCN) +static gboolean +_set_fcn_gobject_bytes(ARGS_SET_FCN) { - gs_free char * val_strip_free = NULL; - gs_free const char **strv = NULL; - const char * val_strip; - const char ** iter; + gs_free char *val_strip_free = NULL; + gs_free const char **strv = NULL; + const char *val_strip; + const char **iter; gs_unref_bytes GBytes *bytes = NULL; - GByteArray * array; + GByteArray *array; if (_SET_FCN_DO_RESET_DEFAULT(property_info, modifier, value)) return _gobject_property_reset_default(setting, property_info->property_name); @@ -2294,11 +2319,12 @@ done: /*****************************************************************************/ -static gconstpointer _get_fcn_cert_8021x(ARGS_GET_FCN) +static gconstpointer +_get_fcn_cert_8021x(ARGS_GET_FCN) { - NMSetting8021x * s_8021X = NM_SETTING_802_1X(setting); + NMSetting8021x *s_8021X = NM_SETTING_802_1X(setting); const NMSetting8021xSchemeVtable *vtable; - char * str = NULL; + char *str = NULL; RETURN_UNSUPPORTED_GET_TYPE(); @@ -2325,9 +2351,10 @@ static gconstpointer _get_fcn_cert_8021x(ARGS_GET_FCN) RETURN_STR_TO_FREE(str); } -static gboolean _set_fcn_cert_8021x(ARGS_SET_FCN) +static gboolean +_set_fcn_cert_8021x(ARGS_SET_FCN) { - gs_free char * value_to_free = NULL; + gs_free char *value_to_free = NULL; NMSetting8021xCKScheme scheme = NM_SETTING_802_1X_CK_SCHEME_PATH; const NMSetting8021xSchemeVtable *vtable; @@ -2352,9 +2379,9 @@ static gboolean _set_fcn_cert_8021x(ARGS_SET_FCN) if (vtable->is_secret) { nm_auto_free_secret char *password_free = NULL; - gs_free const char ** strv = NULL; - const char * password; - const char * path; + gs_free const char **strv = NULL; + const char *password; + const char *path; gsize len; strv = nm_utils_escaped_tokens_split(value, NM_ASCII_SPACES); @@ -2383,7 +2410,8 @@ static gboolean _set_fcn_cert_8021x(ARGS_SET_FCN) } } -static const char *const *_complete_fcn_cert_8021x(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_cert_8021x(ARGS_COMPLETE_FCN) { const NMSetting8021xSchemeVtable *vtable; @@ -2403,10 +2431,11 @@ static const char *const *_complete_fcn_cert_8021x(ARGS_COMPLETE_FCN) return NULL; } -static gconstpointer _get_fcn_bond_options(ARGS_GET_FCN) +static gconstpointer +_get_fcn_bond_options(ARGS_GET_FCN) { NMSettingBond *s_bond = NM_SETTING_BOND(setting); - GString * str; + GString *str; guint32 i, len; RETURN_UNSUPPORTED_GET_TYPE(); @@ -2414,10 +2443,10 @@ static gconstpointer _get_fcn_bond_options(ARGS_GET_FCN) str = g_string_new(NULL); len = nm_setting_bond_get_num_options(s_bond); for (i = 0; i < len; i++) { - const char * key; - const char * val; + const char *key; + const char *val; gs_free char *val_tmp = NULL; - char * p; + char *p; gs_free char *escaped_key = NULL; gs_free char *escaped_val = NULL; @@ -2444,15 +2473,15 @@ static gconstpointer _get_fcn_bond_options(ARGS_GET_FCN) } gboolean -_nm_meta_setting_bond_add_option(NMSetting * setting, +_nm_meta_setting_bond_add_option(NMSetting *setting, const char *name, const char *value, - GError ** error) + GError **error) { NMSettingBond *s_bond = NM_SETTING_BOND(setting); - gs_free char * tmp_value = NULL; - const char * val2; - char * p; + gs_free char *tmp_value = NULL; + const char *val2; + char *p; if (!value || !value[0]) { /* This call only fails if name is currently not tracked. It's not an @@ -2513,11 +2542,12 @@ _nm_meta_setting_bond_add_option(NMSetting * setting, return TRUE; } -static const char *_describe_fcn_bond_options(ARGS_DESCRIBE_FCN) +static const char * +_describe_fcn_bond_options(ARGS_DESCRIBE_FCN) { gs_free char *options_str = NULL; - const char ** valid_options; - char * s; + const char **valid_options; + char *s; valid_options = nm_setting_bond_get_valid_options(NULL); options_str = g_strjoinv(", ", (char **) valid_options); @@ -2538,17 +2568,19 @@ static const char *_describe_fcn_bond_options(ARGS_DESCRIBE_FCN) return (*out_to_free = s); } -static const char *const *_values_fcn_bond_options(ARGS_VALUES_FCN) +static const char *const * +_values_fcn_bond_options(ARGS_VALUES_FCN) { return nm_setting_bond_get_valid_options(NULL); } -static gconstpointer _get_fcn_connection_permissions(ARGS_GET_FCN) +static gconstpointer +_get_fcn_connection_permissions(ARGS_GET_FCN) { NMSettingConnection *s_con = NM_SETTING_CONNECTION(setting); - GString * perm = NULL; - const char * perm_item; - const char * perm_type; + GString *perm = NULL; + const char *perm_item; + const char *perm_type; guint i, n; RETURN_UNSUPPORTED_GET_TYPE(); @@ -2575,7 +2607,8 @@ static gconstpointer _get_fcn_connection_permissions(ARGS_GET_FCN) return NULL; } -static gboolean _set_fcn_connection_type(ARGS_SET_FCN) +static gboolean +_set_fcn_connection_type(ARGS_SET_FCN) { gs_free char *uuid = NULL; @@ -2603,10 +2636,11 @@ static gboolean _set_fcn_connection_type(ARGS_SET_FCN) return TRUE; } -static const char *const *_complete_fcn_connection_type(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_connection_type(ARGS_COMPLETE_FCN) { guint i, j; - char ** result; + char **result; gsize text_len; const char *slave_types[] = {"bond-slave", "bridge-slave", "team-slave"}; @@ -2617,7 +2651,7 @@ static const char *const *_complete_fcn_connection_type(ARGS_COMPLETE_FCN) for (i = 0, j = 0; i < _NM_META_SETTING_TYPE_NUM; i++) { const NMMetaSettingInfoEditor *setting_info = &nm_meta_setting_infos_editor[i]; GType gtype = setting_info->general->get_setting_gtype(); - const char * v; + const char *v; if (_nm_setting_type_get_base_type_priority(gtype) == NM_SETTING_PRIORITY_INVALID) { nm_assert(!setting_info->valid_parts); @@ -2662,9 +2696,9 @@ _sanitize_connection_permission_user(const char *perm) } static const char * -_multilist_validate2_fcn_connection_permissions(NMSetting * setting, +_multilist_validate2_fcn_connection_permissions(NMSetting *setting, const char *item, - GError ** error) + GError **error) { if (!_sanitize_connection_permission_user(item)) { nm_utils_error_set(error, @@ -2703,14 +2737,15 @@ _multilist_remove_by_value_fcn_connection_permissions(NMSetting *setting, const return TRUE; } -static const char *const *_complete_fcn_connection_master(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_connection_master(ARGS_COMPLETE_FCN) { NMRemoteConnection *const *connections = NULL; guint len = 0; guint i, j; - char ** result; - NMSettingConnection * s_con; - const char * expected_type = NULL; + char **result; + NMSettingConnection *s_con; + const char *expected_type = NULL; gsize text_len; if (environment && environment->get_nm_connections) { @@ -2776,10 +2811,11 @@ _multilist_validate2_fcn_uuid(NMSetting *setting, const char *item, GError **err return item; } -static gconstpointer _get_fcn_connection_metered(ARGS_GET_FCN) +static gconstpointer +_get_fcn_connection_metered(ARGS_GET_FCN) { NMSettingConnection *s_conn = NM_SETTING_CONNECTION(setting); - const char * s; + const char *s; RETURN_UNSUPPORTED_GET_TYPE(); @@ -2802,7 +2838,8 @@ static gconstpointer _get_fcn_connection_metered(ARGS_GET_FCN) return s; } -static gboolean _set_fcn_connection_metered(ARGS_SET_FCN) +static gboolean +_set_fcn_connection_metered(ARGS_SET_FCN) { NMMetered metered; NMTernary ts_val; @@ -2859,10 +2896,11 @@ dcb_flags_to_string(NMSettingDcbFlags flags) return g_string_free(flag_str, FALSE); } -static gconstpointer _get_fcn_dcb(ARGS_GET_FCN) +static gconstpointer +_get_fcn_dcb(ARGS_GET_FCN) { NMSettingDcb *s_dcb = NM_SETTING_DCB(setting); - GString * str; + GString *str; guint i; RETURN_UNSUPPORTED_GET_TYPE(); @@ -2884,7 +2922,8 @@ static gconstpointer _get_fcn_dcb(ARGS_GET_FCN) #define DCB_ALL_FLAGS \ (NM_SETTING_DCB_FLAG_ENABLE | NM_SETTING_DCB_FLAG_ADVERTISE | NM_SETTING_DCB_FLAG_WILLING) -static gconstpointer _get_fcn_dcb_flags(ARGS_GET_FCN) +static gconstpointer +_get_fcn_dcb_flags(ARGS_GET_FCN) { nm_auto_unset_gvalue GValue val = G_VALUE_INIT; guint v; @@ -2898,7 +2937,8 @@ static gconstpointer _get_fcn_dcb_flags(ARGS_GET_FCN) RETURN_STR_TO_FREE(dcb_flags_to_string(v)); } -static gboolean _set_fcn_dcb_flags(ARGS_SET_FCN) +static gboolean +_set_fcn_dcb_flags(ARGS_SET_FCN) { NMSettingDcbFlags flags = NM_SETTING_DCB_FLAG_NONE; long int t; @@ -2912,7 +2952,7 @@ static gboolean _set_fcn_dcb_flags(ARGS_SET_FCN) flags = (guint) t; else { gs_free const char **strv = NULL; - const char *const * iter; + const char *const *iter; /* Check for individual flag numbers */ strv = nm_strsplit_set(value, " \t,"); @@ -2950,10 +2990,10 @@ dcb_parse_uint_array(const char *val, guint max, guint other, guint out_array[static 8], - GError ** error) + GError **error) { gs_free const char **items = NULL; - const char *const * iter; + const char *const *iter; gsize i; items = nm_strsplit_set_with_empty(val, ","); @@ -2997,9 +3037,9 @@ dcb_parse_uint_array(const char *val, static void dcb_check_feature_enabled(const NMMetaEnvironment *environment, - gpointer * environment_user_data, - NMSettingDcb * s_dcb, - const char * flags_prop) + gpointer *environment_user_data, + NMSettingDcb *s_dcb, + const char *flags_prop) { NMSettingDcbFlags flags = NM_SETTING_DCB_FLAG_NONE; @@ -3013,7 +3053,8 @@ dcb_check_feature_enabled(const NMMetaEnvironment *environment, } } -static gboolean _set_fcn_dcb(ARGS_SET_FCN) +static gboolean +_set_fcn_dcb(ARGS_SET_FCN) { guint i = 0; guint nums[8] = { @@ -3054,10 +3095,11 @@ static gboolean _set_fcn_dcb(ARGS_SET_FCN) return TRUE; } -static gconstpointer _get_fcn_dcb_bool(ARGS_GET_FCN) +static gconstpointer +_get_fcn_dcb_bool(ARGS_GET_FCN) { NMSettingDcb *s_dcb = NM_SETTING_DCB(setting); - GString * str; + GString *str; guint i; RETURN_UNSUPPORTED_GET_TYPE(); @@ -3076,7 +3118,8 @@ static gconstpointer _get_fcn_dcb_bool(ARGS_GET_FCN) RETURN_STR_TO_FREE(g_string_free(str, FALSE)); } -static gboolean _set_fcn_dcb_bool(ARGS_SET_FCN) +static gboolean +_set_fcn_dcb_bool(ARGS_SET_FCN) { guint i = 0; guint nums[8] = { @@ -3105,7 +3148,8 @@ static gboolean _set_fcn_dcb_bool(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_gsm_auto_config(ARGS_SET_FCN) +static gboolean +_set_fcn_gsm_auto_config(ARGS_SET_FCN) { if (!_set_fcn_gobject_bool_impl(property_info, setting, modifier, value, error)) return FALSE; @@ -3127,7 +3171,8 @@ static gboolean _set_fcn_gsm_auto_config(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_gsm_sim_operator_id(ARGS_SET_FCN) +static gboolean +_set_fcn_gsm_sim_operator_id(ARGS_SET_FCN) { const char *p = value; @@ -3152,7 +3197,8 @@ static gboolean _set_fcn_gsm_sim_operator_id(ARGS_SET_FCN) return TRUE; } -static gboolean _set_fcn_infiniband_p_key(ARGS_SET_FCN) +static gboolean +_set_fcn_infiniband_p_key(ARGS_SET_FCN) { gint64 p_key; @@ -3173,7 +3219,8 @@ static gboolean _set_fcn_infiniband_p_key(ARGS_SET_FCN) return TRUE; } -static gconstpointer _get_fcn_infiniband_p_key(ARGS_GET_FCN) +static gconstpointer +_get_fcn_infiniband_p_key(ARGS_GET_FCN) { NMSettingInfiniband *s_infiniband = NM_SETTING_INFINIBAND(setting); int p_key; @@ -3192,7 +3239,8 @@ static gconstpointer _get_fcn_infiniband_p_key(ARGS_GET_FCN) RETURN_STR_TO_FREE(g_strdup_printf("0x%04x", p_key)); } -static gconstpointer _get_fcn_objlist(ARGS_GET_FCN) +static gconstpointer +_get_fcn_objlist(ARGS_GET_FCN) { GString *str = NULL; guint num; @@ -3247,9 +3295,9 @@ static gconstpointer _get_fcn_objlist(ARGS_GET_FCN) static void _objlist_obj_to_str_fcn_ip_config_addresses(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { NMIPAddress *obj; @@ -3262,14 +3310,14 @@ _objlist_obj_to_str_fcn_ip_config_addresses(NMMetaAccessorGetType get_type, static void _objlist_obj_to_str_fcn_ip_config_routes(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { - NMIPRoute * route; - gs_free char * attr_str = NULL; - gs_strfreev char **attr_names = NULL; - gs_unref_hashtable GHashTable *hash = g_hash_table_new(nm_str_hash, g_str_equal); + NMIPRoute *route; + gs_free char *attr_str = NULL; + gs_strfreev char **attr_names = NULL; + gs_unref_hashtable GHashTable *hash = g_hash_table_new(nm_str_hash, g_str_equal); int j; route = nm_setting_ip_config_get_route(NM_SETTING_IP_CONFIG(setting), idx); @@ -3314,7 +3362,8 @@ _objlist_obj_to_str_fcn_ip_config_routes(NMMetaAccessorGetType get_type, } } -static gboolean _set_fcn_ip_config_method(ARGS_SET_FCN) +static gboolean +_set_fcn_ip_config_method(ARGS_SET_FCN) { if (_SET_FCN_DO_RESET_DEFAULT(property_info, modifier, value)) return _gobject_property_reset_default(setting, property_info->property_name); @@ -3367,7 +3416,8 @@ _multilist_add_fcn_ip_config_dns_options(NMSetting *setting, const char *item) return TRUE; } -static gboolean _set_fcn_objlist(ARGS_SET_FCN) +static gboolean +_set_fcn_objlist(ARGS_SET_FCN) { gs_free const char **strv = NULL; gsize i, nstrv; @@ -3439,10 +3489,10 @@ static gboolean _set_fcn_objlist(ARGS_SET_FCN) } static gboolean -_objlist_set_fcn_ip_config_addresses(NMSetting * setting, +_objlist_set_fcn_ip_config_addresses(NMSetting *setting, gboolean do_add, const char *value, - GError ** error) + GError **error) { int addr_family = nm_setting_ip_config_get_addr_family(NM_SETTING_IP_CONFIG(setting)); nm_auto_unref_ip_address NMIPAddress *addr = NULL; @@ -3457,7 +3507,8 @@ _objlist_set_fcn_ip_config_addresses(NMSetting * setting, return TRUE; } -static gboolean _set_fcn_ip_config_gateway(ARGS_SET_FCN) +static gboolean +_set_fcn_ip_config_gateway(ARGS_SET_FCN) { gs_free char *value_to_free = NULL; int addr_family = nm_setting_ip_config_get_addr_family(NM_SETTING_IP_CONFIG(setting)); @@ -3489,10 +3540,10 @@ static gboolean _set_fcn_ip_config_gateway(ARGS_SET_FCN) } static gboolean -_objlist_set_fcn_ip_config_routes(NMSetting * setting, +_objlist_set_fcn_ip_config_routes(NMSetting *setting, gboolean do_add, const char *value, - GError ** error) + GError **error) { int addr_family = nm_setting_ip_config_get_addr_family(NM_SETTING_IP_CONFIG(setting)); nm_auto_unref_ip_route NMIPRoute *route = NULL; @@ -3515,12 +3566,12 @@ _is_default_func_ip_config_dns_options(NMSetting *setting) static void _objlist_obj_to_str_fcn_ip_config_routing_rules(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { NMIPRoutingRule *rule; - gs_free char * s = NULL; + gs_free char *s = NULL; rule = nm_setting_ip_config_get_routing_rule(NM_SETTING_IP_CONFIG(setting), idx); s = nm_ip_routing_rule_to_string(rule, NM_IP_ROUTING_RULE_AS_STRING_FLAGS_NONE, NULL, NULL); @@ -3529,12 +3580,12 @@ _objlist_obj_to_str_fcn_ip_config_routing_rules(NMMetaAccessorGetType get_type, } static gboolean -_objlist_set_fcn_ip_config_routing_rules(NMSetting * setting, +_objlist_set_fcn_ip_config_routing_rules(NMSetting *setting, gboolean do_add, const char *str, - GError ** error) + GError **error) { - NMSettingIPConfig * s_ip = NM_SETTING_IP_CONFIG(setting); + NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG(setting); nm_auto_unref_ip_routing_rule NMIPRoutingRule *rule = NULL; guint i, n; @@ -3581,7 +3632,7 @@ _multilist_get_num_fcn_ip_config_dhcp_reject_servers(NMSettingIPConfig *setting) static gboolean _multilist_remove_by_value_fcn_ip_config_dhcp_reject_servers(NMSettingIPConfig *setting, - const char * item) + const char *item) { const char *const *strv; guint num; @@ -3594,11 +3645,12 @@ _multilist_remove_by_value_fcn_ip_config_dhcp_reject_servers(NMSettingIPConfig * return TRUE; } -static gconstpointer _get_fcn_olpc_mesh_ssid(ARGS_GET_FCN) +static gconstpointer +_get_fcn_olpc_mesh_ssid(ARGS_GET_FCN) { NMSettingOlpcMesh *s_olpc_mesh = NM_SETTING_OLPC_MESH(setting); - GBytes * ssid; - char * ssid_str = NULL; + GBytes *ssid; + char *ssid_str = NULL; RETURN_UNSUPPORTED_GET_TYPE(); @@ -3611,7 +3663,8 @@ static gconstpointer _get_fcn_olpc_mesh_ssid(ARGS_GET_FCN) RETURN_STR_TO_FREE(ssid_str); } -static gboolean _set_fcn_olpc_mesh_channel(ARGS_SET_FCN) +static gboolean +_set_fcn_olpc_mesh_channel(ARGS_SET_FCN) { unsigned long chan_int; @@ -3638,12 +3691,12 @@ _validate_fcn_proxy_pac_script(const char *value, char **out_to_free, GError **e static void _objlist_obj_to_str_fcn_sriov_vfs(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { gs_free char *s = NULL; - NMSriovVF * vf; + NMSriovVF *vf; vf = nm_setting_sriov_get_vf(NM_SETTING_SRIOV(setting), idx); s = nm_utils_sriov_vf_to_str(vf, FALSE, NULL); @@ -3653,12 +3706,12 @@ _objlist_obj_to_str_fcn_sriov_vfs(NMMetaAccessorGetType get_type, static void _objlist_obj_to_str_fcn_tc_config_qdiscs(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { gs_free char *s = NULL; - NMTCQdisc * qdisc; + NMTCQdisc *qdisc; qdisc = nm_setting_tc_config_get_qdisc(NM_SETTING_TC_CONFIG(setting), idx); s = nm_utils_tc_qdisc_to_str(qdisc, NULL); @@ -3668,9 +3721,9 @@ _objlist_obj_to_str_fcn_tc_config_qdiscs(NMMetaAccessorGetType get_type, static void _objlist_obj_to_str_fcn_bridge_vlans(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { gs_free char *s = NULL; NMBridgeVlan *vlan; @@ -3688,8 +3741,8 @@ _objlist_obj_to_str_fcn_bridge_vlans(NMMetaAccessorGetType get_type, static gboolean _objlist_set_fcn_sriov_vfs(NMSetting *setting, gboolean do_add, const char *value, GError **error) { - nm_auto_unref_sriov_vf NMSriovVF *vf = NULL; - gs_free_error GError *local = NULL; + nm_auto_unref_sriov_vf NMSriovVF *vf = NULL; + gs_free_error GError *local = NULL; vf = nm_utils_sriov_vf_from_str(value, &local); if (!vf) { @@ -3709,13 +3762,13 @@ _objlist_set_fcn_sriov_vfs(NMSetting *setting, gboolean do_add, const char *valu } static gboolean -_objlist_set_fcn_tc_config_qdiscs(NMSetting * setting, +_objlist_set_fcn_tc_config_qdiscs(NMSetting *setting, gboolean do_add, const char *value, - GError ** error) + GError **error) { nm_auto_unref_tc_qdisc NMTCQdisc *tc_qdisc = NULL; - gs_free_error GError *local = NULL; + gs_free_error GError *local = NULL; tc_qdisc = nm_utils_tc_qdisc_from_str(value, &local); if (!tc_qdisc) { @@ -3735,14 +3788,14 @@ _objlist_set_fcn_tc_config_qdiscs(NMSetting * setting, } static gboolean -_objlist_set_fcn_bridge_vlans(NMSetting * setting, +_objlist_set_fcn_bridge_vlans(NMSetting *setting, gboolean do_add, const char *value, - GError ** error) + GError **error) { - nm_auto_unref_bridge_vlan NMBridgeVlan *vlan = NULL; - gs_free_error GError *local = NULL; - guint16 vid_start, vid_end; + nm_auto_unref_bridge_vlan NMBridgeVlan *vlan = NULL; + gs_free_error GError *local = NULL; + guint16 vid_start, vid_end; vlan = nm_bridge_vlan_from_str(value, &local); if (!vlan) { @@ -3777,11 +3830,11 @@ _objlist_set_fcn_bridge_vlans(NMSetting * setting, static void _objlist_obj_to_str_fcn_tc_config_tfilters(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { - NMTCTfilter * tfilter; + NMTCTfilter *tfilter; gs_free char *s = NULL; tfilter = nm_setting_tc_config_get_tfilter(NM_SETTING_TC_CONFIG(setting), idx); @@ -3791,12 +3844,12 @@ _objlist_obj_to_str_fcn_tc_config_tfilters(NMMetaAccessorGetType get_type, } static gboolean -_objlist_set_fcn_tc_config_tfilters(NMSetting * setting, +_objlist_set_fcn_tc_config_tfilters(NMSetting *setting, gboolean do_add, const char *value, - GError ** error) + GError **error) { - gs_free_error GError * local = NULL; + gs_free_error GError *local = NULL; nm_auto_unref_tc_tfilter NMTCTfilter *tc_tfilter = NULL; tc_tfilter = nm_utils_tc_tfilter_from_str(value, &local); @@ -3828,12 +3881,12 @@ _validate_fcn_team_config(const char *value, char **out_to_free, GError **error) static void _objlist_obj_to_str_fcn_team_link_watchers(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str) + GString *str) { NMTeamLinkWatcher *watcher; - gs_free char * s = NULL; + gs_free char *s = NULL; if (NM_IS_SETTING_TEAM(setting)) watcher = nm_setting_team_get_link_watcher(NM_SETTING_TEAM(setting), idx); @@ -3846,10 +3899,10 @@ _objlist_obj_to_str_fcn_team_link_watchers(NMMetaAccessorGetType get_type, } static gboolean -_objlist_set_fcn_team_link_watchers(NMSetting * setting, +_objlist_set_fcn_team_link_watchers(NMSetting *setting, gboolean do_add, const char *value, - GError ** error) + GError **error) { nm_auto_unref_team_link_watcher NMTeamLinkWatcher *watcher = NULL; @@ -3871,7 +3924,8 @@ _objlist_set_fcn_team_link_watchers(NMSetting * setting, return TRUE; } -static gconstpointer _get_fcn_vlan_flags(ARGS_GET_FCN) +static gconstpointer +_get_fcn_vlan_flags(ARGS_GET_FCN) { NMSettingVlan *s_vlan = NM_SETTING_VLAN(setting); guint32 flags; @@ -3898,11 +3952,12 @@ _vlan_priority_map_type_from_property_info(const NMMetaPropertyInfo *property_in : NM_VLAN_EGRESS_MAP; } -static gconstpointer _get_fcn_vlan_xgress_priority_map(ARGS_GET_FCN) +static gconstpointer +_get_fcn_vlan_xgress_priority_map(ARGS_GET_FCN) { NMVlanPriorityMap map_type = _vlan_priority_map_type_from_property_info(property_info); - NMSettingVlan * s_vlan = NM_SETTING_VLAN(setting); - GString * str = NULL; + NMSettingVlan *s_vlan = NM_SETTING_VLAN(setting); + GString *str = NULL; gint32 i, num; RETURN_UNSUPPORTED_GET_TYPE(); @@ -3927,7 +3982,8 @@ static gconstpointer _get_fcn_vlan_xgress_priority_map(ARGS_GET_FCN) RETURN_STR_TO_FREE(g_string_free(str, FALSE)); } -static gboolean _set_fcn_vlan_xgress_priority_map(ARGS_SET_FCN) +static gboolean +_set_fcn_vlan_xgress_priority_map(ARGS_SET_FCN) { NMVlanPriorityMap map_type = _vlan_priority_map_type_from_property_info(property_info); gs_free const char **prio_map = NULL; @@ -3970,7 +4026,7 @@ static gboolean _set_fcn_vlan_xgress_priority_map(ARGS_SET_FCN) static void _vpn_options_callback(const char *key, const char *val, gpointer user_data) { - GString * str = user_data; + GString *str = user_data; gs_free char *escaped_key = NULL; gs_free char *escaped_val = NULL; @@ -3982,10 +4038,11 @@ _vpn_options_callback(const char *key, const char *val, gpointer user_data) g_string_append(str, nm_utils_escaped_tokens_options_escape_val(val, &escaped_val)); } -static gconstpointer _get_fcn_vpn_options(ARGS_GET_FCN) +static gconstpointer +_get_fcn_vpn_options(ARGS_GET_FCN) { NMSettingVpn *s_vpn = NM_SETTING_VPN(setting); - GString * str; + GString *str; RETURN_UNSUPPORTED_GET_TYPE(); @@ -3999,10 +4056,10 @@ static gconstpointer _get_fcn_vpn_options(ARGS_GET_FCN) } static gboolean -_optionlist_set_fcn_vpn_data(NMSetting * setting, +_optionlist_set_fcn_vpn_data(NMSetting *setting, const char *option, const char *value, - GError ** error) + GError **error) { if (value) nm_setting_vpn_add_data_item(NM_SETTING_VPN(setting), option, value); @@ -4012,10 +4069,10 @@ _optionlist_set_fcn_vpn_data(NMSetting * setting, } static gboolean -_optionlist_set_fcn_vpn_secrets(NMSetting * setting, +_optionlist_set_fcn_vpn_secrets(NMSetting *setting, const char *option, const char *value, - GError ** error) + GError **error) { if (value) nm_setting_vpn_add_secret(NM_SETTING_VPN(setting), option, value); @@ -4024,7 +4081,8 @@ _optionlist_set_fcn_vpn_secrets(NMSetting * setting, return TRUE; } -static gboolean _set_fcn_wired_s390_subchannels(ARGS_SET_FCN) +static gboolean +_set_fcn_wired_s390_subchannels(ARGS_SET_FCN) { gs_free const char **strv = NULL; gsize len; @@ -4044,10 +4102,10 @@ static gboolean _set_fcn_wired_s390_subchannels(ARGS_SET_FCN) } static gboolean -_optionlist_set_fcn_wired_s390_options(NMSetting * setting, +_optionlist_set_fcn_wired_s390_options(NMSetting *setting, const char *name, const char *value, - GError ** error) + GError **error) { if (value) nm_setting_wired_add_s390_option(NM_SETTING_WIRED(setting), name, value); @@ -4056,16 +4114,18 @@ _optionlist_set_fcn_wired_s390_options(NMSetting * setting, return TRUE; } -static const char *const *_values_fcn_wired_s390_options(ARGS_VALUES_FCN) +static const char *const * +_values_fcn_wired_s390_options(ARGS_VALUES_FCN) { return nm_setting_wired_get_valid_s390_options(NULL); } -static const char *_describe_fcn_wired_s390_options(ARGS_DESCRIBE_FCN) +static const char * +_describe_fcn_wired_s390_options(ARGS_DESCRIBE_FCN) { gs_free char *options_str = NULL; - const char ** valid_options; - char * s; + const char **valid_options; + char *s; valid_options = nm_setting_wired_get_valid_s390_options(NULL); @@ -4078,11 +4138,12 @@ static const char *_describe_fcn_wired_s390_options(ARGS_DESCRIBE_FCN) return (*out_to_free = s); } -static gconstpointer _get_fcn_wireless_ssid(ARGS_GET_FCN) +static gconstpointer +_get_fcn_wireless_ssid(ARGS_GET_FCN) { NMSettingWireless *s_wireless = NM_SETTING_WIRELESS(setting); - GBytes * ssid; - char * ssid_str = NULL; + GBytes *ssid; + char *ssid_str = NULL; RETURN_UNSUPPORTED_GET_TYPE(); @@ -4095,7 +4156,8 @@ static gconstpointer _get_fcn_wireless_ssid(ARGS_GET_FCN) RETURN_STR_TO_FREE(ssid_str); } -static gboolean _set_fcn_wireless_channel(ARGS_SET_FCN) +static gboolean +_set_fcn_wireless_channel(ARGS_SET_FCN) { unsigned long chan_int; @@ -4133,10 +4195,11 @@ _multilist_validate2_fcn_mac_addr(NMSetting *setting, const char *item, GError * return item; } -static gconstpointer _get_fcn_wireless_security_wep_key(ARGS_GET_FCN) +static gconstpointer +_get_fcn_wireless_security_wep_key(ARGS_GET_FCN) { NMSettingWirelessSecurity *s_wireless_sec = NM_SETTING_WIRELESS_SECURITY(setting); - char * key; + char *key; guint index; RETURN_UNSUPPORTED_GET_TYPE(); @@ -4152,7 +4215,8 @@ static gconstpointer _get_fcn_wireless_security_wep_key(ARGS_GET_FCN) RETURN_STR_TO_FREE(key); } -static gboolean _set_fcn_wireless_wep_key(ARGS_SET_FCN) +static gboolean +_set_fcn_wireless_wep_key(ARGS_SET_FCN) { NMWepKeyType guessed_type = NM_WEP_KEY_TYPE_UNKNOWN; NMWepKeyType type; @@ -4221,9 +4285,9 @@ static gboolean _set_fcn_wireless_wep_key(ARGS_SET_FCN) static void _gobject_enum_pre_set_notify_fcn_wireless_security_wep_key_type( const NMMetaPropertyInfo *property_info, - const NMMetaEnvironment * environment, + const NMMetaEnvironment *environment, gpointer environment_user_data, - NMSetting * setting, + NMSetting *setting, int value) { guint i; @@ -4255,7 +4319,8 @@ _gobject_enum_pre_set_notify_fcn_wireless_security_wep_key_type( /*****************************************************************************/ -static gconstpointer _get_fcn_ethtool(ARGS_GET_FCN) +static gconstpointer +_get_fcn_ethtool(ARGS_GET_FCN) { NMEthtoolID ethtool_id = property_info->property_typ_data->subtype.ethtool.ethtool_id; const char *s; @@ -4286,7 +4351,8 @@ static gconstpointer _get_fcn_ethtool(ARGS_GET_FCN) return s; } -static gboolean _set_fcn_ethtool(ARGS_SET_FCN) +static gboolean +_set_fcn_ethtool(ARGS_SET_FCN) { NMEthtoolID ethtool_id = property_info->property_typ_data->subtype.ethtool.ethtool_id; gint64 i64; @@ -4336,7 +4402,8 @@ do_unset: return TRUE; } -static const char *const *_complete_fcn_ethtool(ARGS_COMPLETE_FCN) +static const char *const * +_complete_fcn_ethtool(ARGS_COMPLETE_FCN) { static const char *const v[] = { "true", @@ -6618,7 +6685,10 @@ static const NMMetaPropertyInfo *const property_infos_OVS_BRIDGE[] = { static const NMMetaPropertyInfo *const property_infos_OVS_DPDK[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_DPDK_DEVARGS, .property_type = &_pt_gobject_string, - ), + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_OVS_DPDK_N_RXQ, + .property_type = &_pt_gobject_int, + ), NULL }; @@ -8596,16 +8666,16 @@ _meta_type_property_info_get_name(const NMMetaAbstractInfo *abstract_info, gbool } static gconstpointer -_meta_type_setting_info_editor_get_fcn(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +_meta_type_setting_info_editor_get_fcn(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, gpointer target, gpointer target_data, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free) + gboolean *out_is_default, + gpointer *out_to_free) { const NMMetaSettingInfoEditor *info = (const NMMetaSettingInfoEditor *) abstract_info; @@ -8622,16 +8692,16 @@ _meta_type_setting_info_editor_get_fcn(const NMMetaAbstractInfo * abstract_info, } static gconstpointer -_meta_type_property_info_get_fcn(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +_meta_type_property_info_get_fcn(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, gpointer target, gpointer target_data, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free) + gboolean *out_is_default, + gpointer *out_to_free) { const NMMetaPropertyInfo *info = (const NMMetaPropertyInfo *) abstract_info; gboolean is_default_local = FALSE; @@ -8671,8 +8741,8 @@ _meta_type_property_info_get_fcn(const NMMetaAbstractInfo * abstract_info, static const NMMetaAbstractInfo *const * _meta_type_setting_info_editor_get_nested(const NMMetaAbstractInfo *abstract_info, - guint * out_len, - gpointer * out_to_free) + guint *out_len, + gpointer *out_to_free) { const NMMetaSettingInfoEditor *info; @@ -8684,21 +8754,21 @@ _meta_type_setting_info_editor_get_nested(const NMMetaAbstractInfo *abstract_inf static const NMMetaAbstractInfo *const * _meta_type_property_info_get_nested(const NMMetaAbstractInfo *abstract_info, - guint * out_len, - gpointer * out_to_free) + guint *out_len, + gpointer *out_to_free) { NM_SET_OUT(out_len, 0); return NULL; } static const char *const * -_meta_type_property_info_complete_fcn(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +_meta_type_property_info_complete_fcn(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, const NMMetaOperationContext *operation_context, - const char * text, - gboolean * out_complete_filename, - char *** out_to_free) + const char *text, + gboolean *out_complete_filename, + char ***out_to_free) { const NMMetaPropertyInfo *info = (const NMMetaPropertyInfo *) abstract_info; diff --git a/src/libnmc-setting/nm-meta-setting-desc.h b/src/libnmc-setting/nm-meta-setting-desc.h index 29416dcb..91905253 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.h +++ b/src/libnmc-setting/nm-meta-setting-desc.h @@ -203,32 +203,32 @@ struct _NMMetaPropertyType { /* should return a translated string */ const char *(*describe_fcn)(const NMMetaPropertyInfo *property_info, char **out_to_free); - gconstpointer (*get_fcn)(const NMMetaPropertyInfo * property_info, - const NMMetaEnvironment * environment, + gconstpointer (*get_fcn)(const NMMetaPropertyInfo *property_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, - NMSetting * setting, + NMSetting *setting, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free); + gboolean *out_is_default, + gpointer *out_to_free); gboolean (*set_fcn)(const NMMetaPropertyInfo *property_info, - const NMMetaEnvironment * environment, + const NMMetaEnvironment *environment, gpointer environment_user_data, - NMSetting * setting, + NMSetting *setting, NMMetaAccessorModifier modifier, - const char * value, - GError ** error); + const char *value, + GError **error); const char *const *(*values_fcn)(const NMMetaPropertyInfo *property_info, char ***out_to_free); - const char *const *(*complete_fcn)(const NMMetaPropertyInfo * property_info, - const NMMetaEnvironment * environment, + const char *const *(*complete_fcn)(const NMMetaPropertyInfo *property_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, const NMMetaOperationContext *operation_context, - const char * text, - gboolean * out_complete_filename, - char *** out_to_free); + const char *text, + gboolean *out_complete_filename, + char ***out_to_free); /* Whether set_fcn() supports the '-' modifier. That is, whether the property * is a list type. */ @@ -243,7 +243,7 @@ typedef union { } NMMetaSignUnsignInt64; typedef struct { - const char * nick; + const char *nick; NMMetaSignUnsignInt64 value; } NMMetaUtilsIntValueInfo; @@ -256,9 +256,9 @@ struct _NMMetaPropertyTypData { const struct _NMUtilsEnumValueInfo *value_infos_get; /* nicks for get function */ const struct _NMUtilsEnumValueInfo *value_infos; /* nicks for set function */ void (*pre_set_notify)(const NMMetaPropertyInfo *property_info, - const NMMetaEnvironment * environment, + const NMMetaEnvironment *environment, gpointer environment_user_data, - NMSetting * setting, + NMSetting *setting, int value); } gobject_enum; struct { @@ -299,13 +299,13 @@ struct _NMMetaPropertyTypData { struct { guint (*get_num_fcn)(NMSetting *setting); void (*obj_to_str_fcn)(NMMetaAccessorGetType get_type, - NMSetting * setting, + NMSetting *setting, guint idx, - GString * str); - gboolean (*set_fcn)(NMSetting * setting, + GString *str); + gboolean (*set_fcn)(NMSetting *setting, gboolean do_add /* or else remove. */, const char *value, - GError ** error); + GError **error); void (*clear_all_fcn)(NMSetting *setting); void (*remove_by_idx_fcn_u)(NMSetting *setting, guint idx); void (*remove_by_idx_fcn_s)(NMSetting *setting, int idx); @@ -313,10 +313,10 @@ struct _NMMetaPropertyTypData { bool strsplit_plain : 1; } objlist; struct { - gboolean (*set_fcn)(NMSetting * setting, + gboolean (*set_fcn)(NMSetting *setting, const char *option, const char *value, - GError ** error); + GError **error); bool no_empty_value : 1; } optionlist; struct { @@ -345,7 +345,7 @@ struct _NMMetaPropertyTypData { } ethtool; } subtype; gboolean (*is_default_fcn)(NMSetting *setting); - const char *const * values_static; + const char *const *values_static; const NMMetaPropertyTypDataNested *nested; NMMetaPropertyTypFlags typ_flags; }; @@ -396,7 +396,7 @@ struct _NMMetaPropertyInfo { /* a non-translated but translatable static description (marked with N_()). */ const char *describe_message; - const NMMetaPropertyType * property_type; + const NMMetaPropertyType *property_type; const NMMetaPropertyTypData *property_typ_data; }; @@ -410,9 +410,9 @@ struct _NMMetaSettingInfoEditor { NMObjBaseInst parent; const NMMetaType *meta_type; }; - const NMMetaSettingInfo * general; - const char * alias; - const char * pretty_name; + const NMMetaSettingInfo *general; + const char *alias; + const char *pretty_name; const NMMetaPropertyInfo *const *properties; guint properties_num; @@ -429,34 +429,34 @@ struct _NMMetaSettingInfoEditor { const NMMetaSettingValidPartItem *const *valid_parts; void (*setting_init_fcn)(const NMMetaSettingInfoEditor *setting_info, - NMSetting * setting, + NMSetting *setting, NMMetaAccessorSettingInitType init_type); }; struct _NMMetaType { NMObjBaseClass parent; - const char * type_name; + const char *type_name; const char *(*get_name)(const NMMetaAbstractInfo *abstract_info, gboolean for_header); const NMMetaAbstractInfo *const *(*get_nested)(const NMMetaAbstractInfo *abstract_info, - guint * out_len, - gpointer * out_to_free); - gconstpointer (*get_fcn)(const NMMetaAbstractInfo * info, - const NMMetaEnvironment * environment, + guint *out_len, + gpointer *out_to_free); + gconstpointer (*get_fcn)(const NMMetaAbstractInfo *info, + const NMMetaEnvironment *environment, gpointer environment_user_data, gpointer target, gpointer target_data, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free); - const char *const *(*complete_fcn)(const NMMetaAbstractInfo * info, - const NMMetaEnvironment * environment, + gboolean *out_is_default, + gpointer *out_to_free); + const char *const *(*complete_fcn)(const NMMetaAbstractInfo *info, + const NMMetaEnvironment *environment, gpointer environment_user_data, const NMMetaOperationContext *operation_context, - const char * text, - gboolean * out_complete_filename, - char *** out_to_free); + const char *text, + gboolean *out_complete_filename, + char ***out_to_free); }; struct _NMMetaAbstractInfo { @@ -474,7 +474,7 @@ extern const NMMetaSettingInfoEditor nm_meta_setting_infos_editor[_NM_META_SETTI extern const NMMetaSettingValidPartItem *const nm_meta_setting_info_valid_parts_default[]; const NMMetaSettingValidPartItem *const * -nm_meta_setting_info_valid_parts_for_slave_type(const char * slave_type, +nm_meta_setting_info_valid_parts_for_slave_type(const char *slave_type, const char **out_slave_name); /*****************************************************************************/ @@ -499,11 +499,11 @@ struct _NMMetaEnvironment { struct _NMDevice *const *(*get_nm_devices)(const NMMetaEnvironment *environment, gpointer environment_user_data, - guint * out_len); + guint *out_len); struct _NMRemoteConnection *const *(*get_nm_connections)(const NMMetaEnvironment *environment, gpointer environment_user_data, - guint * out_len); + guint *out_len); }; /*****************************************************************************/ @@ -516,7 +516,7 @@ extern const NMMetaType nm_meta_type_nested_property_info; struct _NMMetaNestedPropertyInfo { union { - const NMMetaType * meta_type; + const NMMetaType *meta_type; NMMetaPropertyInfo base; }; const NMMetaPropertyInfo *parent_info; @@ -531,10 +531,10 @@ extern const NMMetaPropertyTypDataNested nm_meta_property_typ_data_bond; /*****************************************************************************/ -gboolean _nm_meta_setting_bond_add_option(NMSetting * setting, +gboolean _nm_meta_setting_bond_add_option(NMSetting *setting, const char *name, const char *value, - GError ** error); + GError **error); /*****************************************************************************/ diff --git a/src/libnmc-setting/settings-docs-input.xml b/src/libnmc-setting/settings-docs-input.xml index 3555f302..4e642677 100644 --- a/src/libnmc-setting/settings-docs-input.xml +++ b/src/libnmc-setting/settings-docs-input.xml @@ -1,4 +1,4 @@ - + Array of TC queueing disciplines. qdisc is a basic block in the Linux traffic control subsystem diff --git a/src/libnmc-setting/settings-docs.h b/src/libnmc-setting/settings-docs.h index 06346b1e..0bc7d069 100644 --- a/src/libnmc-setting/settings-docs.h +++ b/src/libnmc-setting/settings-docs.h @@ -303,6 +303,7 @@ #define DESCRIBE_DOC_NM_SETTING_OVS_BRIDGE_RSTP_ENABLE N_("Enable or disable RSTP.") #define DESCRIBE_DOC_NM_SETTING_OVS_BRIDGE_STP_ENABLE N_("Enable or disable STP.") #define DESCRIBE_DOC_NM_SETTING_OVS_DPDK_DEVARGS N_("Open vSwitch DPDK device arguments.") +#define DESCRIBE_DOC_NM_SETTING_OVS_DPDK_N_RXQ N_("Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue.") #define DESCRIBE_DOC_NM_SETTING_OVS_EXTERNAL_IDS_DATA N_("A dictionary of key/value pairs with exernal-ids for OVS.") #define DESCRIBE_DOC_NM_SETTING_OVS_INTERFACE_TYPE N_("The interface type. Either \"internal\", \"system\", \"patch\", \"dpdk\", or empty.") #define DESCRIBE_DOC_NM_SETTING_OVS_PATCH_PEER N_("Specifies the name of the interface for the other side of the patch. The patch on the other side must also set this interface as peer.") diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in index 06346b1e..0bc7d069 100644 --- a/src/libnmc-setting/settings-docs.h.in +++ b/src/libnmc-setting/settings-docs.h.in @@ -303,6 +303,7 @@ #define DESCRIBE_DOC_NM_SETTING_OVS_BRIDGE_RSTP_ENABLE N_("Enable or disable RSTP.") #define DESCRIBE_DOC_NM_SETTING_OVS_BRIDGE_STP_ENABLE N_("Enable or disable STP.") #define DESCRIBE_DOC_NM_SETTING_OVS_DPDK_DEVARGS N_("Open vSwitch DPDK device arguments.") +#define DESCRIBE_DOC_NM_SETTING_OVS_DPDK_N_RXQ N_("Open vSwitch DPDK number of rx queues. Defaults to zero which means to leave the parameter in OVS unspecified and effectively configures one queue.") #define DESCRIBE_DOC_NM_SETTING_OVS_EXTERNAL_IDS_DATA N_("A dictionary of key/value pairs with exernal-ids for OVS.") #define DESCRIBE_DOC_NM_SETTING_OVS_INTERFACE_TYPE N_("The interface type. Either \"internal\", \"system\", \"patch\", \"dpdk\", or empty.") #define DESCRIBE_DOC_NM_SETTING_OVS_PATCH_PEER N_("Specifies the name of the interface for the other side of the patch. The patch on the other side must also set this interface as peer.") diff --git a/src/libnmc-setting/tests/test-libnmc-setting.c b/src/libnmc-setting/tests/test-libnmc-setting.c index fe196ad0..d34bf028 100644 --- a/src/libnmc-setting/tests/test-libnmc-setting.c +++ b/src/libnmc-setting/tests/test-libnmc-setting.c @@ -106,7 +106,7 @@ test_client_meta_check(void) g_assert((!!info->valid_parts) == is_base_type); if (info->valid_parts) { - gsize i, l; + gsize i, l; gs_unref_hashtable GHashTable *dup = g_hash_table_new(nm_direct_hash, NULL); l = NM_PTRARRAY_LEN(info->valid_parts); @@ -161,12 +161,12 @@ test_client_meta_check(void) static void test_client_import_wireguard_test0(void) { - gs_unref_object NMConnection *connection; - NMSettingWireGuard * s_wg; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMWireGuardPeer * peer; - gs_free_error GError *error = NULL; + gs_unref_object NMConnection *connection = NULL; + NMSettingWireGuard *s_wg; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMWireGuardPeer *peer; + gs_free_error GError *error = NULL; connection = nm_vpn_wireguard_import(NM_BUILD_SRCDIR "/src/libnmc-setting/tests/wg-test0.conf", &error); @@ -271,48 +271,48 @@ test_client_import_wireguard_missing(void) /*****************************************************************************/ -#define _do_test_parse_passwd_file(contents, success, exp_error_line, ...) \ - G_STMT_START \ - { \ - static const NMUtilsNamedValue _values[] = {__VA_ARGS__}; \ - gs_free char * _contents = g_strndup(contents, NM_STRLEN(contents)); \ - gs_unref_hashtable GHashTable *_secrets = NULL; \ - gs_free_error GError *_local = NULL; \ - gssize _error_line; \ - GError ** _p_local = nmtst_get_rand_bool() ? &_local : NULL; \ - gssize * _p_error_line = nmtst_get_rand_bool() ? &_error_line : NULL; \ - gboolean _success = !!(success); \ - gssize _exp_error_line = (exp_error_line); \ - int _i; \ - \ - g_assert(_success || (G_N_ELEMENTS(_values) == 0)); \ - \ - _secrets = nmc_utils_parse_passwd_file(_contents, _p_error_line, _p_local); \ - \ - g_assert(_success == (!!_secrets)); \ - if (!_success) { \ - if (_p_error_line) \ - g_assert_cmpint(_exp_error_line, ==, *_p_error_line); \ - if (_p_local) \ - g_assert(_local); \ - } else { \ - if (_p_error_line) \ - g_assert_cmpint(-1, ==, *_p_error_line); \ - g_assert(!_local); \ - \ - for (_i = 0; _i < (int) G_N_ELEMENTS(_values); _i++) { \ - const NMUtilsNamedValue *_n = &_values[_i]; \ - const char * _v; \ - \ - _v = g_hash_table_lookup(_secrets, _n->name); \ - if (!_v) \ - g_error("cannot find key \"%s\"", _n->name); \ - g_assert_cmpstr(_v, ==, _n->value_str); \ - } \ - \ - g_assert_cmpint(g_hash_table_size(_secrets), ==, G_N_ELEMENTS(_values)); \ - } \ - } \ +#define _do_test_parse_passwd_file(contents, success, exp_error_line, ...) \ + G_STMT_START \ + { \ + static const NMUtilsNamedValue _values[] = {__VA_ARGS__}; \ + gs_free char *_contents = g_strndup(contents, NM_STRLEN(contents)); \ + gs_unref_hashtable GHashTable *_secrets = NULL; \ + gs_free_error GError *_local = NULL; \ + gssize _error_line; \ + GError **_p_local = nmtst_get_rand_bool() ? &_local : NULL; \ + gssize *_p_error_line = nmtst_get_rand_bool() ? &_error_line : NULL; \ + gboolean _success = !!(success); \ + gssize _exp_error_line = (exp_error_line); \ + int _i; \ + \ + g_assert(_success || (G_N_ELEMENTS(_values) == 0)); \ + \ + _secrets = nmc_utils_parse_passwd_file(_contents, _p_error_line, _p_local); \ + \ + g_assert(_success == (!!_secrets)); \ + if (!_success) { \ + if (_p_error_line) \ + g_assert_cmpint(_exp_error_line, ==, *_p_error_line); \ + if (_p_local) \ + g_assert(_local); \ + } else { \ + if (_p_error_line) \ + g_assert_cmpint(-1, ==, *_p_error_line); \ + g_assert(!_local); \ + \ + for (_i = 0; _i < (int) G_N_ELEMENTS(_values); _i++) { \ + const NMUtilsNamedValue *_n = &_values[_i]; \ + const char *_v; \ + \ + _v = g_hash_table_lookup(_secrets, _n->name); \ + if (!_v) \ + g_error("cannot find key \"%s\"", _n->name); \ + g_assert_cmpstr(_v, ==, _n->value_str); \ + } \ + \ + g_assert_cmpint(g_hash_table_size(_secrets), ==, G_N_ELEMENTS(_values)); \ + } \ + } \ G_STMT_END #define _do_test_parse_passwd_file_bad(contents, exp_error_line) \ diff --git a/src/libnmt-newt/nmt-newt-button-box.c b/src/libnmt-newt/nmt-newt-button-box.c index d86a154c..f3c8b27e 100644 --- a/src/libnmt-newt/nmt-newt-button-box.c +++ b/src/libnmt-newt/nmt-newt-button-box.c @@ -29,7 +29,7 @@ G_DEFINE_TYPE(NmtNewtButtonBox, nmt_newt_button_box, NMT_TYPE_NEWT_CONTAINER) typedef struct { NmtNewtButtonBoxOrientation orientation; - GPtrArray * start_buttons, *end_buttons; + GPtrArray *start_buttons, *end_buttons; } NmtNewtButtonBoxPrivate; enum { @@ -193,7 +193,7 @@ static newtComponent * nmt_newt_button_box_get_components(NmtNewtWidget *widget) { NmtNewtButtonBoxPrivate *priv = NMT_NEWT_BUTTON_BOX_GET_PRIVATE(widget); - GPtrArray * cos; + GPtrArray *cos; cos = g_ptr_array_new(); add_buttons(priv->start_buttons, cos); @@ -231,7 +231,7 @@ size_request_buttons(NmtNewtButtonBox *bbox, GPtrArray *buttons, int *width, int static void nmt_newt_button_box_size_request(NmtNewtWidget *widget, int *width, int *height) { - NmtNewtButtonBox * bbox = NMT_NEWT_BUTTON_BOX(widget); + NmtNewtButtonBox *bbox = NMT_NEWT_BUTTON_BOX(widget); NmtNewtButtonBoxPrivate *priv = NMT_NEWT_BUTTON_BOX_GET_PRIVATE(widget); *width = *height = 0; @@ -248,7 +248,7 @@ static void nmt_newt_button_box_size_allocate(NmtNewtWidget *widget, int x, int y, int width, int height) { NmtNewtButtonBoxPrivate *priv = NMT_NEWT_BUTTON_BOX_GET_PRIVATE(widget); - NmtNewtWidget * child; + NmtNewtWidget *child; int child_x, child_y, child_width, child_height; int i; @@ -295,10 +295,10 @@ nmt_newt_button_box_size_allocate(NmtNewtWidget *widget, int x, int y, int width } static void -nmt_newt_button_box_set_property(GObject * object, +nmt_newt_button_box_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtNewtButtonBoxPrivate *priv = NMT_NEWT_BUTTON_BOX_GET_PRIVATE(object); @@ -330,8 +330,8 @@ nmt_newt_button_box_get_property(GObject *object, guint prop_id, GValue *value, static void nmt_newt_button_box_class_init(NmtNewtButtonBoxClass *bbox_class) { - GObjectClass * object_class = G_OBJECT_CLASS(bbox_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(bbox_class); + GObjectClass *object_class = G_OBJECT_CLASS(bbox_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(bbox_class); NmtNewtContainerClass *container_class = NMT_NEWT_CONTAINER_CLASS(bbox_class); g_type_class_add_private(bbox_class, sizeof(NmtNewtButtonBoxPrivate)); diff --git a/src/libnmt-newt/nmt-newt-button.c b/src/libnmt-newt/nmt-newt-button.c index 974d05bd..b21ae537 100644 --- a/src/libnmt-newt/nmt-newt-button.c +++ b/src/libnmt-newt/nmt-newt-button.c @@ -108,7 +108,7 @@ nmt_newt_button_build_component(NmtNewtComponent *component, gboolean sensitive) { NmtNewtButtonPrivate *priv = NMT_NEWT_BUTTON_GET_PRIVATE(component); newtComponent co; - gs_free char * label_lc = NULL; + gs_free char *label_lc = NULL; if (sensitive) { label_lc = nmt_newt_locale_from_utf8(priv->label); @@ -183,9 +183,9 @@ nmt_newt_button_get_property(GObject *object, guint prop_id, GValue *value, GPar static void nmt_newt_button_class_init(NmtNewtButtonClass *button_class) { - GObjectClass * object_class = G_OBJECT_CLASS(button_class); + GObjectClass *object_class = G_OBJECT_CLASS(button_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(button_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(button_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(button_class); g_type_class_add_private(button_class, sizeof(NmtNewtButtonPrivate)); diff --git a/src/libnmt-newt/nmt-newt-checkbox.c b/src/libnmt-newt/nmt-newt-checkbox.c index cf825e08..26e7ebf0 100644 --- a/src/libnmt-newt/nmt-newt-checkbox.c +++ b/src/libnmt-newt/nmt-newt-checkbox.c @@ -21,7 +21,7 @@ G_DEFINE_TYPE(NmtNewtCheckbox, nmt_newt_checkbox, NMT_TYPE_NEWT_COMPONENT) (G_TYPE_INSTANCE_GET_PRIVATE((o), NMT_TYPE_NEWT_CHECKBOX, NmtNewtCheckboxPrivate)) typedef struct { - char * label_lc; + char *label_lc; gboolean active; } NmtNewtCheckboxPrivate; @@ -139,12 +139,12 @@ nmt_newt_checkbox_build_component(NmtNewtComponent *component, gboolean sensitiv } static void -nmt_newt_checkbox_set_property(GObject * object, +nmt_newt_checkbox_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { - NmtNewtCheckbox * checkbox = NMT_NEWT_CHECKBOX(object); + NmtNewtCheckbox *checkbox = NMT_NEWT_CHECKBOX(object); NmtNewtCheckboxPrivate *priv = NMT_NEWT_CHECKBOX_GET_PRIVATE(object); switch (prop_id) { @@ -182,7 +182,7 @@ nmt_newt_checkbox_get_property(GObject *object, guint prop_id, GValue *value, GP static void nmt_newt_checkbox_class_init(NmtNewtCheckboxClass *checkbox_class) { - GObjectClass * object_class = G_OBJECT_CLASS(checkbox_class); + GObjectClass *object_class = G_OBJECT_CLASS(checkbox_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(checkbox_class); g_type_class_add_private(checkbox_class, sizeof(NmtNewtCheckboxPrivate)); diff --git a/src/libnmt-newt/nmt-newt-component.c b/src/libnmt-newt/nmt-newt-component.c index 8d7a9005..d3cb12c6 100644 --- a/src/libnmt-newt/nmt-newt-component.c +++ b/src/libnmt-newt/nmt-newt-component.c @@ -89,7 +89,7 @@ static newtComponent * nmt_newt_component_get_components(NmtNewtWidget *widget) { NmtNewtComponentPrivate *priv = NMT_NEWT_COMPONENT_GET_PRIVATE(widget); - newtComponent * cos; + newtComponent *cos; priv->own_component = FALSE; cos = g_new0(newtComponent, 2); @@ -209,10 +209,10 @@ nmt_newt_component_set_sensitive(NmtNewtComponent *component, gboolean sensitive } static void -nmt_newt_component_set_property(GObject * object, +nmt_newt_component_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtNewtComponent *component = NMT_NEWT_COMPONENT(object); @@ -247,7 +247,7 @@ nmt_newt_component_get_property(GObject *object, guint prop_id, GValue *value, G static void nmt_newt_component_class_init(NmtNewtComponentClass *component_class) { - GObjectClass * object_class = G_OBJECT_CLASS(component_class); + GObjectClass *object_class = G_OBJECT_CLASS(component_class); NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(component_class); g_type_class_add_private(component_class, sizeof(NmtNewtComponentPrivate)); diff --git a/src/libnmt-newt/nmt-newt-container.c b/src/libnmt-newt/nmt-newt-container.c index 4cc8db24..65e0a644 100644 --- a/src/libnmt-newt/nmt-newt-container.c +++ b/src/libnmt-newt/nmt-newt-container.c @@ -42,7 +42,7 @@ nmt_newt_container_init(NmtNewtContainer *container) static void nmt_newt_container_finalize(GObject *object) { - NmtNewtContainer * container = NMT_NEWT_CONTAINER(object); + NmtNewtContainer *container = NMT_NEWT_CONTAINER(object); NmtNewtContainerPrivate *priv = NMT_NEWT_CONTAINER_GET_PRIVATE(object); while (priv->children->len) @@ -178,7 +178,7 @@ static NmtNewtWidget * nmt_newt_container_find_component(NmtNewtWidget *widget, newtComponent co) { NmtNewtContainerPrivate *priv = NMT_NEWT_CONTAINER_GET_PRIVATE(widget); - NmtNewtWidget * found, *child; + NmtNewtWidget *found, *child; int i; for (i = 0; i < priv->children->len; i++) { @@ -204,7 +204,7 @@ GSList * nmt_newt_container_get_children(NmtNewtContainer *container) { NmtNewtContainerPrivate *priv = NMT_NEWT_CONTAINER_GET_PRIVATE(container); - GSList * ret; + GSList *ret; int i; for (i = 0, ret = NULL; i < priv->children->len; i++) @@ -215,7 +215,7 @@ nmt_newt_container_get_children(NmtNewtContainer *container) static void nmt_newt_container_class_init(NmtNewtContainerClass *container_class) { - GObjectClass * object_class = G_OBJECT_CLASS(container_class); + GObjectClass *object_class = G_OBJECT_CLASS(container_class); NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(container_class); g_type_class_add_private(container_class, sizeof(NmtNewtContainerPrivate)); diff --git a/src/libnmt-newt/nmt-newt-entry-numeric.c b/src/libnmt-newt/nmt-newt-entry-numeric.c index 7e8edd6c..829eac11 100644 --- a/src/libnmt-newt/nmt-newt-entry-numeric.c +++ b/src/libnmt-newt/nmt-newt-entry-numeric.c @@ -84,7 +84,7 @@ nmt_newt_entry_numeric_new_full(int width, gint64 min, gint64 max, gboolean opti static gboolean newt_entry_numeric_filter(NmtNewtEntry *entry, - const char * text, + const char *text, int ch, int position, gpointer user_data) @@ -136,10 +136,10 @@ nmt_newt_entry_numeric_constructed(GObject *object) } static void -nmt_newt_entry_numeric_set_property(GObject * object, +nmt_newt_entry_numeric_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtNewtEntryNumericPrivate *priv = NMT_NEWT_ENTRY_NUMERIC_GET_PRIVATE(object); @@ -160,9 +160,9 @@ nmt_newt_entry_numeric_set_property(GObject * object, } static void -nmt_newt_entry_numeric_get_property(GObject * object, +nmt_newt_entry_numeric_get_property(GObject *object, guint prop_id, - GValue * value, + GValue *value, GParamSpec *pspec) { NmtNewtEntryNumericPrivate *priv = NMT_NEWT_ENTRY_NUMERIC_GET_PRIVATE(object); diff --git a/src/libnmt-newt/nmt-newt-entry.c b/src/libnmt-newt/nmt-newt-entry.c index 76a96df2..3b0a21be 100644 --- a/src/libnmt-newt/nmt-newt-entry.c +++ b/src/libnmt-newt/nmt-newt-entry.c @@ -28,7 +28,7 @@ G_DEFINE_TYPE(NmtNewtEntry, nmt_newt_entry, NMT_TYPE_NEWT_COMPONENT) typedef struct { int width; NmtNewtEntryFlags flags; - char * text; + char *text; int last_cursor_pos; guint idle_update; @@ -150,7 +150,7 @@ nmt_newt_entry_check_valid(NmtNewtEntry *entry) * will not be considered #NmtNewtWidget:valid. */ void -nmt_newt_entry_set_validator(NmtNewtEntry * entry, +nmt_newt_entry_set_validator(NmtNewtEntry *entry, NmtNewtEntryValidator validator, gpointer user_data) { @@ -296,7 +296,7 @@ idle_update_entry(gpointer entry) { NmtNewtEntryPrivate *priv = NMT_NEWT_ENTRY_GET_PRIVATE(entry); newtComponent co = nmt_newt_component_get_component(entry); - char * text; + char *text; priv->idle_update = 0; if (!co) @@ -351,7 +351,7 @@ nmt_newt_entry_build_component(NmtNewtComponent *component, gboolean sensitive) { NmtNewtEntryPrivate *priv = NMT_NEWT_ENTRY_GET_PRIVATE(component); newtComponent co; - char * text_lc; + char *text_lc; int flags; flags = convert_flags(priv->flags); @@ -385,7 +385,7 @@ nmt_newt_entry_activated(NmtNewtWidget *widget) static void nmt_newt_entry_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NmtNewtEntry * entry = NMT_NEWT_ENTRY(object); + NmtNewtEntry *entry = NMT_NEWT_ENTRY(object); NmtNewtEntryPrivate *priv = NMT_NEWT_ENTRY_GET_PRIVATE(entry); switch (prop_id) { @@ -415,7 +415,7 @@ nmt_newt_entry_set_property(GObject *object, guint prop_id, const GValue *value, static void nmt_newt_entry_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NmtNewtEntry * entry = NMT_NEWT_ENTRY(object); + NmtNewtEntry *entry = NMT_NEWT_ENTRY(object); NmtNewtEntryPrivate *priv = NMT_NEWT_ENTRY_GET_PRIVATE(entry); switch (prop_id) { @@ -440,8 +440,8 @@ nmt_newt_entry_get_property(GObject *object, guint prop_id, GValue *value, GPara static void nmt_newt_entry_class_init(NmtNewtEntryClass *entry_class) { - GObjectClass * object_class = G_OBJECT_CLASS(entry_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(entry_class); + GObjectClass *object_class = G_OBJECT_CLASS(entry_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(entry_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(entry_class); g_type_class_add_private(entry_class, sizeof(NmtNewtEntryPrivate)); diff --git a/src/libnmt-newt/nmt-newt-entry.h b/src/libnmt-newt/nmt-newt-entry.h index da1a9aee..81221812 100644 --- a/src/libnmt-newt/nmt-newt-entry.h +++ b/src/libnmt-newt/nmt-newt-entry.h @@ -41,7 +41,7 @@ typedef enum { NmtNewtWidget *nmt_newt_entry_new(int width, NmtNewtEntryFlags flags); void nmt_newt_entry_set_filter(NmtNewtEntry *entry, NmtNewtEntryFilter filter, gpointer user_data); -void nmt_newt_entry_set_validator(NmtNewtEntry * entry, +void nmt_newt_entry_set_validator(NmtNewtEntry *entry, NmtNewtEntryValidator validator, gpointer user_data); diff --git a/src/libnmt-newt/nmt-newt-form.c b/src/libnmt-newt/nmt-newt-form.c index 825f7cfe..7d28c80e 100644 --- a/src/libnmt-newt/nmt-newt-form.c +++ b/src/libnmt-newt/nmt-newt-form.c @@ -34,7 +34,7 @@ typedef struct { guint padding; gboolean fixed_x, fixed_y; gboolean fixed_width, fixed_height; - char * title_lc; + char *title_lc; gboolean dirty, escape_exits; NmtNewtWidget *focus; @@ -137,7 +137,7 @@ nmt_newt_form_needs_rebuild(NmtNewtWidget *widget) static void nmt_newt_form_remove(NmtNewtContainer *container, NmtNewtWidget *widget) { - NmtNewtFormPrivate * priv = NMT_NEWT_FORM_GET_PRIVATE(container); + NmtNewtFormPrivate *priv = NMT_NEWT_FORM_GET_PRIVATE(container); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_newt_form_parent_class); g_return_if_fail(widget == priv->content); @@ -156,7 +156,7 @@ nmt_newt_form_remove(NmtNewtContainer *container, NmtNewtWidget *widget) void nmt_newt_form_set_content(NmtNewtForm *form, NmtNewtWidget *content) { - NmtNewtFormPrivate * priv = NMT_NEWT_FORM_GET_PRIVATE(form); + NmtNewtFormPrivate *priv = NMT_NEWT_FORM_GET_PRIVATE(form); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_newt_form_parent_class); if (priv->content) @@ -173,7 +173,7 @@ nmt_newt_form_build(NmtNewtForm *form) { NmtNewtFormPrivate *priv = NMT_NEWT_FORM_GET_PRIVATE(form); int screen_height, screen_width, form_height, form_width; - newtComponent * cos; + newtComponent *cos; int i; priv->dirty = FALSE; @@ -260,8 +260,8 @@ nmt_newt_form_destroy(NmtNewtForm *form) static void nmt_newt_form_iterate(NmtNewtForm *form) { - NmtNewtFormPrivate * priv = NMT_NEWT_FORM_GET_PRIVATE(form); - NmtNewtWidget * focus; + NmtNewtFormPrivate *priv = NMT_NEWT_FORM_GET_PRIVATE(form); + NmtNewtWidget *focus; struct newtExitStruct es; if (priv->dirty) { @@ -301,7 +301,7 @@ nmt_newt_form_iterate(NmtNewtForm *form) * nmt_newt_form_keypress_callback() iterates the top-most form, so it can * process the keypress. */ -static GSList * form_stack; +static GSList *form_stack; static GSource *keypress_source; static gboolean @@ -552,9 +552,9 @@ nmt_newt_form_get_property(GObject *object, guint prop_id, GValue *value, GParam static void nmt_newt_form_class_init(NmtNewtFormClass *form_class) { - GObjectClass * object_class = G_OBJECT_CLASS(form_class); + GObjectClass *object_class = G_OBJECT_CLASS(form_class); NmtNewtContainerClass *container_class = NMT_NEWT_CONTAINER_CLASS(form_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(form_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(form_class); g_type_class_add_private(form_class, sizeof(NmtNewtFormPrivate)); diff --git a/src/libnmt-newt/nmt-newt-grid.c b/src/libnmt-newt/nmt-newt-grid.c index a68a496b..1078723d 100644 --- a/src/libnmt-newt/nmt-newt-grid.c +++ b/src/libnmt-newt/nmt-newt-grid.c @@ -37,16 +37,16 @@ G_DEFINE_TYPE(NmtNewtGrid, nmt_newt_grid, NMT_TYPE_NEWT_CONTAINER) (G_TYPE_INSTANCE_GET_PRIVATE((o), NMT_TYPE_NEWT_GRID, NmtNewtGridPrivate)) typedef struct { - NmtNewtWidget * widget; + NmtNewtWidget *widget; int x, y; NmtNewtGridFlags flags; int req_height, req_width; } NmtNewtGridChild; typedef struct { - GArray * children; + GArray *children; int max_x, max_y; - int * row_heights, *col_widths; + int *row_heights, *col_widths; gboolean *expand_rows, *expand_cols; int n_expand_rows, n_expand_cols; int req_height, req_width; @@ -103,9 +103,9 @@ static newtComponent * nmt_newt_grid_get_components(NmtNewtWidget *widget) { NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(widget); - NmtNewtGridChild * children; - GPtrArray * cos; - newtComponent * child_cos; + NmtNewtGridChild *children; + GPtrArray *cos; + newtComponent *child_cos; int i, c; g_array_sort(priv->children, child_sort_func); @@ -130,9 +130,9 @@ nmt_newt_grid_get_components(NmtNewtWidget *widget) static void nmt_newt_grid_size_request(NmtNewtWidget *widget, int *width, int *height) { - NmtNewtGrid * grid = NMT_NEWT_GRID(widget); + NmtNewtGrid *grid = NMT_NEWT_GRID(widget); NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(grid); - NmtNewtGridChild * children = (NmtNewtGridChild *) priv->children->data; + NmtNewtGridChild *children = (NmtNewtGridChild *) priv->children->data; int row, col, i; g_free(priv->row_heights); @@ -190,7 +190,7 @@ static void nmt_newt_grid_size_allocate(NmtNewtWidget *widget, int x, int y, int width, int height) { NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(widget); - NmtNewtGridChild * children = (NmtNewtGridChild *) priv->children->data, *child; + NmtNewtGridChild *children = (NmtNewtGridChild *) priv->children->data, *child; int i, row, col; int child_x, child_y, child_width, child_height; int extra, extra_all, extra_some; @@ -268,7 +268,7 @@ static void nmt_newt_grid_find_size(NmtNewtGrid *grid) { NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(grid); - NmtNewtGridChild * children = (NmtNewtGridChild *) priv->children->data; + NmtNewtGridChild *children = (NmtNewtGridChild *) priv->children->data; int i; priv->max_x = priv->max_y = 0; @@ -315,7 +315,7 @@ static int find_child(NmtNewtGrid *grid, NmtNewtWidget *widget) { NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(grid); - NmtNewtGridChild * children = (NmtNewtGridChild *) priv->children->data; + NmtNewtGridChild *children = (NmtNewtGridChild *) priv->children->data; int i; for (i = 0; i < priv->children->len; i++) { @@ -329,7 +329,7 @@ find_child(NmtNewtGrid *grid, NmtNewtWidget *widget) static void nmt_newt_grid_remove(NmtNewtContainer *container, NmtNewtWidget *widget) { - NmtNewtGrid * grid = NMT_NEWT_GRID(container); + NmtNewtGrid *grid = NMT_NEWT_GRID(container); NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(grid); int i; @@ -355,7 +355,7 @@ void nmt_newt_grid_move(NmtNewtGrid *grid, NmtNewtWidget *widget, int x, int y) { NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(grid); - NmtNewtGridChild * children = (NmtNewtGridChild *) priv->children->data; + NmtNewtGridChild *children = (NmtNewtGridChild *) priv->children->data; int i; i = find_child(grid, widget); @@ -411,7 +411,7 @@ void nmt_newt_grid_set_flags(NmtNewtGrid *grid, NmtNewtWidget *widget, NmtNewtGridFlags flags) { NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE(grid); - NmtNewtGridChild * children = (NmtNewtGridChild *) priv->children->data; + NmtNewtGridChild *children = (NmtNewtGridChild *) priv->children->data; int i; i = find_child(grid, widget); @@ -422,8 +422,8 @@ nmt_newt_grid_set_flags(NmtNewtGrid *grid, NmtNewtWidget *widget, NmtNewtGridFla static void nmt_newt_grid_class_init(NmtNewtGridClass *grid_class) { - GObjectClass * object_class = G_OBJECT_CLASS(grid_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(grid_class); + GObjectClass *object_class = G_OBJECT_CLASS(grid_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(grid_class); NmtNewtContainerClass *container_class = NMT_NEWT_CONTAINER_CLASS(grid_class); g_type_class_add_private(grid_class, sizeof(NmtNewtGridPrivate)); diff --git a/src/libnmt-newt/nmt-newt-hacks.c b/src/libnmt-newt/nmt-newt-hacks.c index 40114a29..a4539ed5 100644 --- a/src/libnmt-newt/nmt-newt-hacks.c +++ b/src/libnmt-newt/nmt-newt-hacks.c @@ -25,10 +25,10 @@ struct newtComponent_0_52_15_struct_hack { struct componentOps *ops; newtCallback callback; - void * callbackData; + void *callbackData; newtCallback destroyCallback; - void * destroyCallbackData; + void *destroyCallbackData; void *data; }; @@ -57,7 +57,7 @@ newtComponentGetPosition(newtComponent component, int *left, int *top) #ifndef HAVE_NEWTENTRYGETCURSORPOSITION struct newtEntry_0_52_15_struct_hack { int flags; - char * buf; + char *buf; const char **resultPtr; int bufAlloced; int bufUsed; @@ -69,7 +69,7 @@ int newtEntryGetCursorPosition(newtComponent component) { struct newtComponent_0_52_15_struct_hack *co_hack = (void *) component; - struct newtEntry_0_52_15_struct_hack * entry_hack = co_hack->data; + struct newtEntry_0_52_15_struct_hack *entry_hack = co_hack->data; return entry_hack->cursorPosition; } @@ -78,7 +78,7 @@ void newtEntrySetCursorPosition(newtComponent component, int position) { struct newtComponent_0_52_15_struct_hack *co_hack = (void *) component; - struct newtEntry_0_52_15_struct_hack * entry_hack = co_hack->data; + struct newtEntry_0_52_15_struct_hack *entry_hack = co_hack->data; entry_hack->cursorPosition = position; } diff --git a/src/libnmt-newt/nmt-newt-label.c b/src/libnmt-newt/nmt-newt-label.c index 32c7809d..f823b9b2 100644 --- a/src/libnmt-newt/nmt-newt-label.c +++ b/src/libnmt-newt/nmt-newt-label.c @@ -24,7 +24,7 @@ G_DEFINE_TYPE(NmtNewtLabel, nmt_newt_label, NMT_TYPE_NEWT_COMPONENT) (G_TYPE_INSTANCE_GET_PRIVATE((o), NMT_TYPE_NEWT_LABEL, NmtNewtLabelPrivate)) typedef struct { - char * text; + char *text; NmtNewtLabelStyle style; gboolean highlight; } NmtNewtLabelPrivate; @@ -193,7 +193,7 @@ nmt_newt_label_build_component(NmtNewtComponent *component, gboolean sensitive) { NmtNewtLabelPrivate *priv = NMT_NEWT_LABEL_GET_PRIVATE(component); newtComponent co; - char * text_lc; + char *text_lc; text_lc = nmt_newt_locale_from_utf8(priv->text); co = newtLabel(-1, -1, text_lc); @@ -252,7 +252,7 @@ nmt_newt_label_get_property(GObject *object, guint prop_id, GValue *value, GPara static void nmt_newt_label_class_init(NmtNewtLabelClass *label_class) { - GObjectClass * object_class = G_OBJECT_CLASS(label_class); + GObjectClass *object_class = G_OBJECT_CLASS(label_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(label_class); g_type_class_add_private(label_class, sizeof(NmtNewtLabelPrivate)); diff --git a/src/libnmt-newt/nmt-newt-listbox.c b/src/libnmt-newt/nmt-newt-listbox.c index cfe23647..96e04c15 100644 --- a/src/libnmt-newt/nmt-newt-listbox.c +++ b/src/libnmt-newt/nmt-newt-listbox.c @@ -307,7 +307,7 @@ update_active_internal(NmtNewtListbox *listbox, int new_active) static void selection_changed_callback(newtComponent co, void *user_data) { - NmtNewtListbox * listbox = user_data; + NmtNewtListbox *listbox = user_data; NmtNewtListboxPrivate *priv = NMT_NEWT_LISTBOX_GET_PRIVATE(listbox); int new_active; @@ -369,12 +369,12 @@ nmt_newt_listbox_activated(NmtNewtWidget *widget) } static void -nmt_newt_listbox_set_property(GObject * object, +nmt_newt_listbox_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { - NmtNewtListbox * listbox = NMT_NEWT_LISTBOX(object); + NmtNewtListbox *listbox = NMT_NEWT_LISTBOX(object); NmtNewtListboxPrivate *priv = NMT_NEWT_LISTBOX_GET_PRIVATE(object); switch (prop_id) { @@ -430,8 +430,8 @@ nmt_newt_listbox_get_property(GObject *object, guint prop_id, GValue *value, GPa static void nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class) { - GObjectClass * object_class = G_OBJECT_CLASS(listbox_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(listbox_class); + GObjectClass *object_class = G_OBJECT_CLASS(listbox_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(listbox_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(listbox_class); g_type_class_add_private(listbox_class, sizeof(NmtNewtListboxPrivate)); diff --git a/src/libnmt-newt/nmt-newt-popup.c b/src/libnmt-newt/nmt-newt-popup.c index 1822c9d9..c62951ca 100644 --- a/src/libnmt-newt/nmt-newt-popup.c +++ b/src/libnmt-newt/nmt-newt-popup.c @@ -59,7 +59,7 @@ enum { NmtNewtWidget * nmt_newt_popup_new(NmtNewtPopupEntry *entries) { - NmtNewtWidget * widget; + NmtNewtWidget *widget; NmtNewtPopupPrivate *priv; int i; @@ -107,7 +107,7 @@ static newtComponent nmt_newt_popup_build_component(NmtNewtComponent *component, gboolean sensitive) { NmtNewtPopupPrivate *priv = NMT_NEWT_POPUP_GET_PRIVATE(component); - NmtNewtPopupEntry * entries = (NmtNewtPopupEntry *) priv->entries->data; + NmtNewtPopupEntry *entries = (NmtNewtPopupEntry *) priv->entries->data; nmt_newt_button_set_label(NMT_NEWT_BUTTON(component), entries[priv->active].label); return NMT_NEWT_COMPONENT_CLASS(nmt_newt_popup_parent_class) @@ -118,9 +118,9 @@ static void nmt_newt_popup_activated(NmtNewtWidget *widget) { NmtNewtPopupPrivate *priv = NMT_NEWT_POPUP_GET_PRIVATE(widget); - NmtNewtPopupEntry * entries = (NmtNewtPopupEntry *) priv->entries->data; - NmtNewtForm * form; - NmtNewtWidget * listbox, *ret; + NmtNewtPopupEntry *entries = (NmtNewtPopupEntry *) priv->entries->data; + NmtNewtForm *form; + NmtNewtWidget *listbox, *ret; int button_x, button_y; int window_x, window_y; int list_w, list_h; @@ -234,7 +234,7 @@ const char * nmt_newt_popup_get_active_id(NmtNewtPopup *popup) { NmtNewtPopupPrivate *priv = NMT_NEWT_POPUP_GET_PRIVATE(popup); - NmtNewtPopupEntry * entries = (NmtNewtPopupEntry *) priv->entries->data; + NmtNewtPopupEntry *entries = (NmtNewtPopupEntry *) priv->entries->data; return entries[priv->active].id; } @@ -250,7 +250,7 @@ void nmt_newt_popup_set_active_id(NmtNewtPopup *popup, const char *active_id) { NmtNewtPopupPrivate *priv = NMT_NEWT_POPUP_GET_PRIVATE(popup); - NmtNewtPopupEntry * entries = (NmtNewtPopupEntry *) priv->entries->data; + NmtNewtPopupEntry *entries = (NmtNewtPopupEntry *) priv->entries->data; int i; for (i = 0; i < priv->entries->len; i++) { @@ -300,8 +300,8 @@ nmt_newt_popup_get_property(GObject *object, guint prop_id, GValue *value, GPara static void nmt_newt_popup_class_init(NmtNewtPopupClass *popup_class) { - GObjectClass * object_class = G_OBJECT_CLASS(popup_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(popup_class); + GObjectClass *object_class = G_OBJECT_CLASS(popup_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(popup_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(popup_class); g_type_class_add_private(popup_class, sizeof(NmtNewtPopupPrivate)); diff --git a/src/libnmt-newt/nmt-newt-section.c b/src/libnmt-newt/nmt-newt-section.c index fa73ea4a..eb551273 100644 --- a/src/libnmt-newt/nmt-newt-section.c +++ b/src/libnmt-newt/nmt-newt-section.c @@ -47,7 +47,7 @@ typedef struct { NmtNewtWidget *border_open_label; NmtNewtWidget *border_closed_label; NmtNewtWidget *border_end_label; - GPtrArray * border_line_labels; + GPtrArray *border_line_labels; gboolean open; } NmtNewtSectionPrivate; @@ -124,7 +124,7 @@ nmt_newt_section_set_header(NmtNewtSection *section, NmtNewtWidget *header) { NmtNewtSectionPrivate *priv = NMT_NEWT_SECTION_GET_PRIVATE(section); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_newt_section_parent_class); - NmtNewtContainer * container = NMT_NEWT_CONTAINER(section); + NmtNewtContainer *container = NMT_NEWT_CONTAINER(section); if (priv->header) parent_class->remove(container, priv->header); @@ -160,7 +160,7 @@ nmt_newt_section_set_body(NmtNewtSection *section, NmtNewtWidget *body) { NmtNewtSectionPrivate *priv = NMT_NEWT_SECTION_GET_PRIVATE(section); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_newt_section_parent_class); - NmtNewtContainer * container = NMT_NEWT_CONTAINER(section); + NmtNewtContainer *container = NMT_NEWT_CONTAINER(section); if (priv->body) parent_class->remove(container, priv->body); @@ -187,7 +187,7 @@ nmt_newt_section_get_body(NmtNewtSection *section) static void nmt_newt_section_remove(NmtNewtContainer *container, NmtNewtWidget *widget) { - NmtNewtSection * section = NMT_NEWT_SECTION(container); + NmtNewtSection *section = NMT_NEWT_SECTION(container); NmtNewtSectionPrivate *priv = NMT_NEWT_SECTION_GET_PRIVATE(section); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_newt_section_parent_class); @@ -205,8 +205,8 @@ static newtComponent * nmt_newt_section_get_components(NmtNewtWidget *widget) { NmtNewtSectionPrivate *priv = NMT_NEWT_SECTION_GET_PRIVATE(widget); - newtComponent * child_cos; - GPtrArray * cos; + newtComponent *child_cos; + GPtrArray *cos; int i; g_return_val_if_fail(priv->header != NULL && priv->body != NULL, NULL); @@ -316,10 +316,10 @@ nmt_newt_section_size_allocate(NmtNewtWidget *widget, int x, int y, int width, i } static void -nmt_newt_section_set_property(GObject * object, +nmt_newt_section_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtNewtSectionPrivate *priv = NMT_NEWT_SECTION_GET_PRIVATE(object); @@ -359,8 +359,8 @@ nmt_newt_section_get_property(GObject *object, guint prop_id, GValue *value, GPa static void nmt_newt_section_class_init(NmtNewtSectionClass *section_class) { - GObjectClass * object_class = G_OBJECT_CLASS(section_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(section_class); + GObjectClass *object_class = G_OBJECT_CLASS(section_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(section_class); NmtNewtContainerClass *container_class = NMT_NEWT_CONTAINER_CLASS(section_class); g_type_class_add_private(section_class, sizeof(NmtNewtSectionPrivate)); diff --git a/src/libnmt-newt/nmt-newt-stack.c b/src/libnmt-newt/nmt-newt-stack.c index e0fdb3b9..bb05e51b 100644 --- a/src/libnmt-newt/nmt-newt-stack.c +++ b/src/libnmt-newt/nmt-newt-stack.c @@ -87,7 +87,7 @@ nmt_newt_stack_get_components(NmtNewtWidget *widget) static void nmt_newt_stack_size_request(NmtNewtWidget *widget, int *width, int *height) { - NmtNewtStack * stack = NMT_NEWT_STACK(widget); + NmtNewtStack *stack = NMT_NEWT_STACK(widget); NmtNewtStackPrivate *priv = NMT_NEWT_STACK_GET_PRIVATE(stack); int i, child_width, child_height; @@ -142,7 +142,7 @@ nmt_newt_stack_add(NmtNewtStack *stack, const char *id, NmtNewtWidget *widget) static void nmt_newt_stack_remove(NmtNewtContainer *container, NmtNewtWidget *widget) { - NmtNewtStack * stack = NMT_NEWT_STACK(container); + NmtNewtStack *stack = NMT_NEWT_STACK(container); NmtNewtStackPrivate *priv = NMT_NEWT_STACK_GET_PRIVATE(stack); int i; @@ -293,8 +293,8 @@ nmt_newt_stack_get_property(GObject *object, guint prop_id, GValue *value, GPara static void nmt_newt_stack_class_init(NmtNewtStackClass *stack_class) { - GObjectClass * object_class = G_OBJECT_CLASS(stack_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(stack_class); + GObjectClass *object_class = G_OBJECT_CLASS(stack_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(stack_class); NmtNewtContainerClass *container_class = NMT_NEWT_CONTAINER_CLASS(stack_class); g_type_class_add_private(stack_class, sizeof(NmtNewtStackPrivate)); diff --git a/src/libnmt-newt/nmt-newt-textbox.c b/src/libnmt-newt/nmt-newt-textbox.c index 128e539b..24aae9f9 100644 --- a/src/libnmt-newt/nmt-newt-textbox.c +++ b/src/libnmt-newt/nmt-newt-textbox.c @@ -76,7 +76,7 @@ void nmt_newt_textbox_set_text(NmtNewtTextbox *textbox, const char *text) { NmtNewtTextboxPrivate *priv = NMT_NEWT_TEXTBOX_GET_PRIVATE(textbox); - char ** lines; + char **lines; int i, width; if (!text) @@ -151,8 +151,8 @@ nmt_newt_textbox_build_component(NmtNewtComponent *component, gboolean sensitive { NmtNewtTextboxPrivate *priv = NMT_NEWT_TEXTBOX_GET_PRIVATE(component); newtComponent co; - const char * text; - char * text_lc; + const char *text; + char *text_lc; text = priv->text; if (!*text) @@ -176,12 +176,12 @@ nmt_newt_textbox_build_component(NmtNewtComponent *component, gboolean sensitive } static void -nmt_newt_textbox_set_property(GObject * object, +nmt_newt_textbox_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { - NmtNewtTextbox * textbox = NMT_NEWT_TEXTBOX(object); + NmtNewtTextbox *textbox = NMT_NEWT_TEXTBOX(object); NmtNewtTextboxPrivate *priv = NMT_NEWT_TEXTBOX_GET_PRIVATE(textbox); switch (prop_id) { @@ -224,7 +224,7 @@ nmt_newt_textbox_get_property(GObject *object, guint prop_id, GValue *value, GPa static void nmt_newt_textbox_class_init(NmtNewtTextboxClass *textbox_class) { - GObjectClass * object_class = G_OBJECT_CLASS(textbox_class); + GObjectClass *object_class = G_OBJECT_CLASS(textbox_class); NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS(textbox_class); g_type_class_add_private(textbox_class, sizeof(NmtNewtTextboxPrivate)); diff --git a/src/libnmt-newt/nmt-newt-toggle-button.c b/src/libnmt-newt/nmt-newt-toggle-button.c index c48931e5..069dff84 100644 --- a/src/libnmt-newt/nmt-newt-toggle-button.c +++ b/src/libnmt-newt/nmt-newt-toggle-button.c @@ -20,7 +20,7 @@ G_DEFINE_TYPE(NmtNewtToggleButton, nmt_newt_toggle_button, NMT_TYPE_NEWT_BUTTON) (G_TYPE_INSTANCE_GET_PRIVATE((o), NMT_TYPE_NEWT_TOGGLE_BUTTON, NmtNewtToggleButtonPrivate)) typedef struct { - char * on_label, *off_label; + char *on_label, *off_label; gboolean active; } NmtNewtToggleButtonPrivate; @@ -115,10 +115,10 @@ nmt_newt_toggle_button_activated(NmtNewtWidget *widget) } static void -nmt_newt_toggle_button_set_property(GObject * object, +nmt_newt_toggle_button_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtNewtToggleButtonPrivate *priv = NMT_NEWT_TOGGLE_BUTTON_GET_PRIVATE(object); @@ -146,9 +146,9 @@ nmt_newt_toggle_button_set_property(GObject * object, } static void -nmt_newt_toggle_button_get_property(GObject * object, +nmt_newt_toggle_button_get_property(GObject *object, guint prop_id, - GValue * value, + GValue *value, GParamSpec *pspec) { NmtNewtToggleButtonPrivate *priv = NMT_NEWT_TOGGLE_BUTTON_GET_PRIVATE(object); @@ -172,7 +172,7 @@ nmt_newt_toggle_button_get_property(GObject * object, static void nmt_newt_toggle_button_class_init(NmtNewtToggleButtonClass *button_class) { - GObjectClass * object_class = G_OBJECT_CLASS(button_class); + GObjectClass *object_class = G_OBJECT_CLASS(button_class); NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(button_class); g_type_class_add_private(button_class, sizeof(NmtNewtToggleButtonPrivate)); diff --git a/src/libnmt-newt/nmt-newt-utils.c b/src/libnmt-newt/nmt-newt-utils.c index 99bde747..14825fab 100644 --- a/src/libnmt-newt/nmt-newt-utils.c +++ b/src/libnmt-newt/nmt-newt-utils.c @@ -19,13 +19,13 @@ #include "libnm-glib-aux/nm-io-utils.h" static void -nmt_newt_dialog_g_log_handler(const char * log_domain, +nmt_newt_dialog_g_log_handler(const char *log_domain, GLogLevelFlags log_level, - const char * message, + const char *message, gpointer user_data) { - const char * level_name; - char * full_message; + const char *level_name; + char *full_message; int screen_width, screen_height; newtComponent text, ok, form; newtGrid grid; @@ -85,9 +85,9 @@ nmt_newt_dialog_g_log_handler(const char * log_domain, } static void -nmt_newt_basic_g_log_handler(const char * log_domain, +nmt_newt_basic_g_log_handler(const char *log_domain, GLogLevelFlags log_level, - const char * message, + const char *message, gpointer user_data) { newtSuspend(); @@ -133,7 +133,7 @@ nmt_newt_parse_colors(const char *s, bool is_newt) const char *name; const char *fg; const char *bg; - char * parsed_s; + char *parsed_s; parsed_s = (char *) lines[i]; name = parsed_s; @@ -178,7 +178,7 @@ nmt_newt_parse_colors(const char *s, bool is_newt) static void nmt_newt_init_colors(gboolean is_newt) { - const char * colors; + const char *colors; gs_free char *file_content = NULL; colors = getenv(is_newt ? "NEWT_COLORS" : "NMT_NEWT_COLORS"); @@ -257,7 +257,7 @@ void nmt_newt_message_dialog(const char *message, ...) { va_list ap; - char * msg, *msg_lc, *ok_lc; + char *msg, *msg_lc, *ok_lc; va_start(ap, message); msg = g_strdup_vprintf(message, ap); @@ -288,7 +288,7 @@ int nmt_newt_choice_dialog(const char *button1, const char *button2, const char *message, ...) { va_list ap; - char * msg, *msg_lc, *button1_lc, *button2_lc; + char *msg, *msg_lc, *button1_lc, *button2_lc; int choice; va_start(ap, message); @@ -402,10 +402,10 @@ char * nmt_newt_edit_string(const char *data) { gssize len, nwrote; - char * filename, *argv[3]; + char *filename, *argv[3]; GError *error = NULL; int fd, status; - char * new_data = NULL; + char *new_data = NULL; fd = g_file_open_tmp("XXXXXX.json", &filename, &error); if (fd == -1) { diff --git a/src/nm-cloud-setup/main.c b/src/nm-cloud-setup/main.c index 916f41da..f6acadca 100644 --- a/src/nm-cloud-setup/main.c +++ b/src/nm-cloud-setup/main.c @@ -16,7 +16,7 @@ /*****************************************************************************/ typedef struct { - GMainLoop * main_loop; + GMainLoop *main_loop; GCancellable *cancellable; NMCSProvider *provider_result; guint detect_count; @@ -26,9 +26,9 @@ static void _provider_detect_cb(GObject *source, GAsyncResult *result, gpointer user_data) { gs_unref_object NMCSProvider *provider = NMCS_PROVIDER(source); - gs_free_error GError *error = NULL; - ProviderDetectData * dd; - gboolean success; + gs_free_error GError *error = NULL; + ProviderDetectData *dd; + gboolean success; success = nmcs_provider_detect_finish(provider, result, &error); @@ -75,14 +75,14 @@ _provider_detect_sigterm_cb(GCancellable *source, gpointer user_data) static NMCSProvider * _provider_detect(GCancellable *sigterm_cancellable) { - nm_auto_unref_gmainloop GMainLoop *main_loop = g_main_loop_new(NULL, FALSE); - gs_unref_object GCancellable *cancellable = g_cancellable_new(); - gs_unref_object NMHttpClient *http_client = NULL; - ProviderDetectData dd = { - .cancellable = cancellable, - .main_loop = main_loop, - .detect_count = 0, - .provider_result = NULL, + nm_auto_unref_gmainloop GMainLoop *main_loop = g_main_loop_new(NULL, FALSE); + gs_unref_object GCancellable *cancellable = g_cancellable_new(); + gs_unref_object NMHttpClient *http_client = NULL; + ProviderDetectData dd = { + .cancellable = cancellable, + .main_loop = main_loop, + .detect_count = 0, + .provider_result = NULL, }; const GType gtypes[] = { NMCS_TYPE_PROVIDER_EC2, @@ -127,17 +127,17 @@ static char ** _nmc_get_hwaddrs(NMClient *nmc) { gs_unref_ptrarray GPtrArray *hwaddrs = NULL; - const GPtrArray * devices; - char ** hwaddrs_v; - gs_free char * str = NULL; + const GPtrArray *devices; + char **hwaddrs_v; + gs_free char *str = NULL; guint i; devices = nm_client_get_devices(nmc); for (i = 0; i < devices->len; i++) { - NMDevice * device = devices->pdata[i]; + NMDevice *device = devices->pdata[i]; const char *hwaddr; - char * s; + char *s; if (!NM_IS_DEVICE_ETHERNET(device)) continue; @@ -180,8 +180,8 @@ _nmc_get_device_by_hwaddr(NMClient *nmc, const char *hwaddr) devices = nm_client_get_devices(nmc); for (i = 0; i < devices->len; i++) { - NMDevice * device = devices->pdata[i]; - const char * hwaddr_dev; + NMDevice *device = devices->pdata[i]; + const char *hwaddr_dev; gs_free char *s = NULL; if (!NM_IS_DEVICE_ETHERNET(device)) @@ -202,16 +202,16 @@ _nmc_get_device_by_hwaddr(NMClient *nmc, const char *hwaddr) /*****************************************************************************/ typedef struct { - GMainLoop * main_loop; + GMainLoop *main_loop; NMCSProviderGetConfigResult *result; } GetConfigData; static void _get_config_cb(GObject *source, GAsyncResult *res, gpointer user_data) { - GetConfigData * data = user_data; + GetConfigData *data = user_data; nm_auto_free_nmcs_provider_get_config_result NMCSProviderGetConfigResult *result = NULL; - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; result = nmcs_provider_get_config_finish(NMCS_PROVIDER(source), res, &error); @@ -230,7 +230,7 @@ _get_config(GCancellable *sigterm_cancellable, NMCSProvider *provider, NMClient { nm_auto_unref_gmainloop GMainLoop *main_loop = g_main_loop_new(NULL, FALSE); GetConfigData data = { - .main_loop = main_loop, + .main_loop = main_loop, }; gs_strfreev char **hwaddrs = NULL; @@ -254,7 +254,7 @@ static gboolean _nmc_skip_connection(NMConnection *connection) { NMSettingUser *s_user; - const char * v; + const char *v; s_user = NM_SETTING_USER(nm_connection_get_setting(connection, NM_TYPE_SETTING_USER)); if (!s_user) @@ -269,24 +269,24 @@ _nmc_skip_connection(NMConnection *connection) } static gboolean -_nmc_mangle_connection(NMDevice * device, - NMConnection * connection, - const NMCSProviderGetConfigResult * result, +_nmc_mangle_connection(NMDevice *device, + NMConnection *connection, + const NMCSProviderGetConfigResult *result, const NMCSProviderGetConfigIfaceData *config_data, - gboolean * out_skipped_single_addr, - gboolean * out_changed) + gboolean *out_skipped_single_addr, + gboolean *out_changed) { - NMSettingIPConfig * s_ip; - NMActiveConnection *ac; - NMConnection * remote_connection; - NMSettingIPConfig * remote_s_ip = NULL; - gsize i; - gboolean addrs_changed = FALSE; - gboolean rules_changed = FALSE; - gboolean routes_changed = FALSE; - gs_unref_ptrarray GPtrArray *addrs_new = NULL; - gs_unref_ptrarray GPtrArray *rules_new = NULL; - gs_unref_ptrarray GPtrArray *routes_new = NULL; + NMSettingIPConfig *s_ip; + NMActiveConnection *ac; + NMConnection *remote_connection; + NMSettingIPConfig *remote_s_ip = NULL; + gsize i; + gboolean addrs_changed = FALSE; + gboolean rules_changed = FALSE; + gboolean routes_changed = FALSE; + gs_unref_ptrarray GPtrArray *addrs_new = NULL; + gs_unref_ptrarray GPtrArray *rules_new = NULL; + gs_unref_ptrarray GPtrArray *routes_new = NULL; NM_SET_OUT(out_skipped_single_addr, FALSE); NM_SET_OUT(out_changed, FALSE); @@ -339,8 +339,8 @@ _nmc_mangle_connection(NMDevice * device, } else if (config_data->has_ipv4s && config_data->has_cidr) { gs_unref_hashtable GHashTable *unique_subnets = g_hash_table_new(nm_direct_hash, g_direct_equal); - NMIPAddress * addr_entry; - NMIPRoute * route_entry; + NMIPAddress *addr_entry; + NMIPRoute *route_entry; NMIPRoutingRule *rule_entry; in_addr_t gateway; char sbuf[NM_UTILS_INET_ADDRSTRLEN]; @@ -435,22 +435,22 @@ _nmc_mangle_connection(NMDevice * device, /*****************************************************************************/ static gboolean -_config_one(GCancellable * sigterm_cancellable, - NMClient * nmc, +_config_one(GCancellable *sigterm_cancellable, + NMClient *nmc, const NMCSProviderGetConfigResult *result, guint idx) { - const NMCSProviderGetConfigIfaceData *config_data = result->iface_datas_arr[idx]; - const char * hwaddr = config_data->hwaddr; - gs_unref_object NMDevice *device = NULL; - gs_unref_object NMConnection *applied_connection = NULL; - guint64 applied_version_id; - gs_free_error GError *error = NULL; - gboolean changed; - gboolean skipped_single_addr; - gboolean version_id_changed; - guint try_count; - gboolean any_changes = FALSE; + const NMCSProviderGetConfigIfaceData *config_data = result->iface_datas_arr[idx]; + const char *hwaddr = config_data->hwaddr; + gs_unref_object NMDevice *device = NULL; + gs_unref_object NMConnection *applied_connection = NULL; + guint64 applied_version_id; + gs_free_error GError *error = NULL; + gboolean changed; + gboolean skipped_single_addr; + gboolean version_id_changed; + guint try_count; + gboolean any_changes = FALSE; g_main_context_iteration(NULL, FALSE); @@ -572,8 +572,8 @@ try_again: } static gboolean -_config_all(GCancellable * sigterm_cancellable, - NMClient * nmc, +_config_all(GCancellable *sigterm_cancellable, + NMClient *nmc, const NMCSProviderGetConfigResult *result) { gboolean any_changes = FALSE; @@ -607,12 +607,12 @@ sigterm_handler(gpointer user_data) int main(int argc, const char *const *argv) { - gs_unref_object GCancellable * sigterm_cancellable = NULL; + gs_unref_object GCancellable *sigterm_cancellable = NULL; nm_auto_destroy_and_unref_gsource GSource *sigterm_source = NULL; - gs_unref_object NMCSProvider *provider = NULL; - gs_unref_object NMClient * nmc = NULL; + gs_unref_object NMCSProvider *provider = NULL; + gs_unref_object NMClient *nmc = NULL; nm_auto_free_nmcs_provider_get_config_result NMCSProviderGetConfigResult *result = NULL; - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; _nm_logging_enabled_init(g_getenv(NMCS_ENV_VARIABLE("NM_CLOUD_SETUP_LOG"))); diff --git a/src/nm-cloud-setup/nm-cloud-setup-utils.c b/src/nm-cloud-setup/nm-cloud-setup-utils.c index 206461e4..bf705549 100644 --- a/src/nm-cloud-setup/nm-cloud-setup-utils.c +++ b/src/nm-cloud-setup/nm-cloud-setup-utils.c @@ -113,7 +113,7 @@ _wait_for_objects_iterate_until_done_idle_cb(gpointer user_data) gboolean nmcs_wait_for_objects_iterate_until_done(GMainContext *context, int timeout_msec) { - nm_auto_unref_gmainloop GMainLoop *loop = g_main_loop_new(context, FALSE); + nm_auto_unref_gmainloop GMainLoop *loop = g_main_loop_new(context, FALSE); nm_auto_destroy_and_unref_gsource GSource *timeout_source = NULL; WaitForObjectsData data; gboolean has_more_objects; @@ -167,11 +167,11 @@ nmcs_wait_for_objects_iterate_until_done(GMainContext *context, int timeout_msec /*****************************************************************************/ typedef struct { - GTask * task; - GSource * source_timeout; - GSource * source_next_poll; - GMainContext * context; - GCancellable * internal_cancellable; + GTask *task; + GSource *source_timeout; + GSource *source_next_poll; + GMainContext *context; + GCancellable *internal_cancellable; NMCSUtilsPollProbeStartFcn probe_start_fcn; NMCSUtilsPollProbeFinishFcn probe_finish_fcn; gpointer probe_user_data; @@ -220,7 +220,7 @@ static gboolean _poll_start_cb(gpointer user_data); static void _poll_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - PollTaskData * poll_task_data = user_data; + PollTaskData *poll_task_data = user_data; _nm_unused gs_unref_object GTask *task = poll_task_data->task; /* balance ref from _poll_start_cb() */ gs_free_error GError *error = NULL; @@ -291,7 +291,7 @@ static void _poll_cancelled_cb(GObject *object, gpointer user_data) { PollTaskData *poll_task_data = user_data; - GError * error = NULL; + GError *error = NULL; nm_clear_g_signal_handler(g_task_get_cancellable(poll_task_data->task), &poll_task_data->cancellable_id); @@ -330,7 +330,7 @@ nmcs_utils_poll(int poll_timeout_ms, NMCSUtilsPollProbeStartFcn probe_start_fcn, NMCSUtilsPollProbeFinishFcn probe_finish_fcn, gpointer probe_user_data, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -400,7 +400,7 @@ nmcs_utils_poll(int poll_timeout_ms, gboolean nmcs_utils_poll_finish(GAsyncResult *result, gpointer *probe_user_data, GError **error) { - GTask * task; + GTask *task; PollTaskData *poll_task_data; g_return_val_if_fail(nm_g_task_is_valid(result, NULL, nmcs_utils_poll), FALSE); @@ -422,7 +422,7 @@ char * nmcs_utils_hwaddr_normalize(const char *hwaddr, gssize len) { gs_free char *hwaddr_clone = NULL; - char * hw; + char *hw; guint8 buf[ETH_ALEN]; gsize l; @@ -474,11 +474,11 @@ gboolean nmcs_utils_ipaddr_normalize_bin(int addr_family, const char *addr, gssize len, - int * out_addr_family, + int *out_addr_family, gpointer out_addr_bin) { gs_free char *addr_clone = NULL; - char * ad; + char *ad; gsize l; nm_assert(len >= -1); @@ -620,7 +620,7 @@ nmcs_utils_uri_complete_interned(const char *uri) gboolean nmcs_setting_ip_replace_ipv4_addresses(NMSettingIPConfig *s_ip, - NMIPAddress ** entries_arr, + NMIPAddress **entries_arr, guint entries_len) { gboolean any_changes = FALSE; @@ -667,7 +667,7 @@ nmcs_setting_ip_replace_ipv4_addresses(NMSettingIPConfig *s_ip, gboolean nmcs_setting_ip_replace_ipv4_routes(NMSettingIPConfig *s_ip, - NMIPRoute ** entries_arr, + NMIPRoute **entries_arr, guint entries_len) { gboolean any_changes = FALSE; @@ -713,7 +713,7 @@ nmcs_setting_ip_replace_ipv4_routes(NMSettingIPConfig *s_ip, gboolean nmcs_setting_ip_replace_ipv4_rules(NMSettingIPConfig *s_ip, - NMIPRoutingRule ** entries_arr, + NMIPRoutingRule **entries_arr, guint entries_len) { gboolean any_changes = FALSE; @@ -758,9 +758,9 @@ nmcs_setting_ip_replace_ipv4_rules(NMSettingIPConfig *s_ip, /*****************************************************************************/ typedef struct { - GMainLoop * main_loop; + GMainLoop *main_loop; NMConnection *connection; - GError * error; + GError *error; guint64 version_id; } DeviceGetAppliedConnectionData; @@ -777,14 +777,14 @@ _nmcs_device_get_applied_connection_cb(GObject *source, GAsyncResult *result, gp } NMConnection * -nmcs_device_get_applied_connection(NMDevice * device, +nmcs_device_get_applied_connection(NMDevice *device, GCancellable *cancellable, - guint64 * version_id, - GError ** error) + guint64 *version_id, + GError **error) { nm_auto_unref_gmainloop GMainLoop *main_loop = g_main_loop_new(NULL, FALSE); DeviceGetAppliedConnectionData data = { - .main_loop = main_loop, + .main_loop = main_loop, }; nm_device_get_applied_connection_async(device, @@ -805,7 +805,7 @@ nmcs_device_get_applied_connection(NMDevice * device, typedef struct { GMainLoop *main_loop; - GError * error; + GError *error; } DeviceReapplyData; static void @@ -818,16 +818,16 @@ _nmcs_device_reapply_cb(GObject *source, GAsyncResult *result, gpointer user_dat } gboolean -nmcs_device_reapply(NMDevice * device, +nmcs_device_reapply(NMDevice *device, GCancellable *sigterm_cancellable, NMConnection *connection, guint64 version_id, - gboolean * out_version_id_changed, - GError ** error) + gboolean *out_version_id_changed, + GError **error) { nm_auto_unref_gmainloop GMainLoop *main_loop = g_main_loop_new(NULL, FALSE); DeviceReapplyData data = { - .main_loop = main_loop, + .main_loop = main_loop, }; nm_device_reapply_async(device, diff --git a/src/nm-cloud-setup/nm-cloud-setup-utils.h b/src/nm-cloud-setup/nm-cloud-setup-utils.h index e1502b95..4131abfe 100644 --- a/src/nm-cloud-setup/nm-cloud-setup-utils.h +++ b/src/nm-cloud-setup/nm-cloud-setup-utils.h @@ -40,15 +40,15 @@ gboolean nmcs_wait_for_objects_iterate_until_done(GMainContext *context, int tim /*****************************************************************************/ -typedef void (*NMCSUtilsPollProbeStartFcn)(GCancellable * cancellable, +typedef void (*NMCSUtilsPollProbeStartFcn)(GCancellable *cancellable, gpointer probe_user_data, GAsyncReadyCallback callback, gpointer user_data); -typedef gboolean (*NMCSUtilsPollProbeFinishFcn)(GObject * source, +typedef gboolean (*NMCSUtilsPollProbeFinishFcn)(GObject *source, GAsyncResult *result, gpointer probe_user_data, - GError ** error); + GError **error); void nmcs_utils_poll(int poll_timeout_ms, int ratelimit_timeout_ms, @@ -56,7 +56,7 @@ void nmcs_utils_poll(int poll_timeout_ms, NMCSUtilsPollProbeStartFcn probe_start_fcn, NMCSUtilsPollProbeFinishFcn probe_finish_fcn, gpointer probe_user_data, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -81,7 +81,7 @@ nmcs_utils_hwaddr_normalize_gbytes(GBytes *hwaddr) gboolean nmcs_utils_ipaddr_normalize_bin(int addr_family, const char *addr, gssize len, - int * out_addr_family, + int *out_addr_family, gpointer out_addr_bin); char *nmcs_utils_ipaddr_normalize(int addr_family, const char *addr, gssize len); @@ -114,29 +114,29 @@ const char *nmcs_utils_uri_complete_interned(const char *uri); /*****************************************************************************/ gboolean nmcs_setting_ip_replace_ipv4_addresses(NMSettingIPConfig *s_ip, - NMIPAddress ** entries_arr, + NMIPAddress **entries_arr, guint entries_len); gboolean nmcs_setting_ip_replace_ipv4_routes(NMSettingIPConfig *s_ip, - NMIPRoute ** entries_arr, + NMIPRoute **entries_arr, guint entries_len); gboolean nmcs_setting_ip_replace_ipv4_rules(NMSettingIPConfig *s_ip, - NMIPRoutingRule ** entries_arr, + NMIPRoutingRule **entries_arr, guint entries_len); /*****************************************************************************/ -NMConnection *nmcs_device_get_applied_connection(NMDevice * device, +NMConnection *nmcs_device_get_applied_connection(NMDevice *device, GCancellable *cancellable, - guint64 * version_id, - GError ** error); + guint64 *version_id, + GError **error); -gboolean nmcs_device_reapply(NMDevice * device, +gboolean nmcs_device_reapply(NMDevice *device, GCancellable *sigterm_cancellable, NMConnection *connection, guint64 version_id, - gboolean * out_version_id_changed, - GError ** error); + gboolean *out_version_id_changed, + GError **error); #endif /* __NM_CLOUD_SETUP_UTILS_H__ */ diff --git a/src/nm-cloud-setup/nm-http-client.c b/src/nm-cloud-setup/nm-http-client.c index 618ab1be..2f71cefa 100644 --- a/src/nm-cloud-setup/nm-http-client.c +++ b/src/nm-cloud-setup/nm-http-client.c @@ -15,9 +15,9 @@ typedef struct { GMainContext *context; - CURLM * mhandle; - GSource * mhandle_source_timeout; - GHashTable * source_sockets_hashtable; + CURLM *mhandle; + GSource *mhandle_source_timeout; + GHashTable *source_sockets_hashtable; } NMHttpClientPrivate; struct _NMHttpClient { @@ -113,11 +113,11 @@ _get_result_free(gpointer data) } typedef struct { - GTask * task; - GSource * timeout_source; + GTask *task; + GSource *timeout_source; CURLcode ehandle_result; - CURL * ehandle; - char * url; + CURL *ehandle; + char *url; NMStrBuf recv_data; struct curl_slist *headers; gssize max_data; @@ -128,7 +128,7 @@ static void _ehandle_free_ehandle(EHandleData *edata) { if (edata->ehandle) { - NMHttpClient * self = g_task_get_source_object(edata->task); + NMHttpClient *self = g_task_get_source_object(edata->task); NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); curl_multi_remove_handle(priv->mhandle, edata->ehandle); @@ -154,7 +154,7 @@ _ehandle_free(EHandleData *edata) static void _ehandle_complete(EHandleData *edata, GError *error_take) { - GetResult * get_result; + GetResult *get_result; gs_free char *str_tmp_1 = NULL; long response_code = -1; @@ -249,7 +249,7 @@ static void _get_cancelled_cb(GObject *object, gpointer user_data) { EHandleData *edata = user_data; - GError * error = NULL; + GError *error = NULL; nm_clear_g_signal_handler(g_task_get_cancellable(edata->task), &edata->cancellable_id); nm_utils_error_set_cancelled(&error, FALSE, NULL); @@ -257,17 +257,17 @@ _get_cancelled_cb(GObject *object, gpointer user_data) } void -nm_http_client_get(NMHttpClient * self, - const char * url, +nm_http_client_get(NMHttpClient *self, + const char *url, int timeout_msec, gssize max_data, - const char *const * http_headers, - GCancellable * cancellable, + const char *const *http_headers, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { NMHttpClientPrivate *priv; - EHandleData * edata; + EHandleData *edata; guint i; g_return_if_fail(NM_IS_HTTP_CLIENT(self)); @@ -363,9 +363,9 @@ nm_http_client_get(NMHttpClient * self, gboolean nm_http_client_get_finish(NMHttpClient *self, GAsyncResult *result, - long * out_response_code, - GBytes ** out_response_data, - GError ** error) + long *out_response_code, + GBytes **out_response_data, + GError **error) { GetResult *get_result; @@ -394,12 +394,12 @@ nm_http_client_get_finish(NMHttpClient *self, /*****************************************************************************/ typedef struct { - GTask * task; - char * uri; - const char *const * http_headers; + GTask *task; + char *uri; + const char *const *http_headers; NMHttpClientPollGetCheckFcn check_fcn; gpointer check_user_data; - GBytes * response_data; + GBytes *response_data; gsize request_max_data; long response_code; int request_timeout_ms; @@ -419,7 +419,7 @@ _poll_get_data_free(gpointer data) } static void -_poll_get_probe_start_fcn(GCancellable * cancellable, +_poll_get_probe_start_fcn(GCancellable *cancellable, gpointer probe_user_data, GAsyncReadyCallback callback, gpointer user_data) @@ -440,16 +440,16 @@ _poll_get_probe_start_fcn(GCancellable * cancellable, } static gboolean -_poll_get_probe_finish_fcn(GObject * source, +_poll_get_probe_finish_fcn(GObject *source, GAsyncResult *result, gpointer probe_user_data, - GError ** error) + GError **error) { - PollGetData * poll_get_data = probe_user_data; + PollGetData *poll_get_data = probe_user_data; _nm_unused gs_unref_object GTask *task = poll_get_data->task; /* balance ref from _poll_get_probe_start_fcn() */ - gboolean success; - gs_free_error GError *local_error = NULL; + gboolean success; + gs_free_error GError *local_error = NULL; gs_unref_bytes GBytes *response_data = NULL; long response_code = -1; @@ -496,8 +496,8 @@ _poll_get_probe_finish_fcn(GObject * source, static void _poll_get_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - PollGetData * poll_get_data = user_data; - gs_free_error GError *error = NULL; + PollGetData *poll_get_data = user_data; + gs_free_error GError *error = NULL; gboolean success; success = nmcs_utils_poll_finish(result, NULL, &error); @@ -513,21 +513,21 @@ _poll_get_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) } void -nm_http_client_poll_get(NMHttpClient * self, - const char * uri, +nm_http_client_poll_get(NMHttpClient *self, + const char *uri, int request_timeout_ms, gssize request_max_data, int poll_timeout_ms, int ratelimit_timeout_ms, - const char *const * http_headers, - GCancellable * cancellable, + const char *const *http_headers, + GCancellable *cancellable, NMHttpClientPollGetCheckFcn check_fcn, gpointer check_user_data, GAsyncReadyCallback callback, gpointer user_data) { nm_auto_pop_gmaincontext GMainContext *context = NULL; - PollGetData * poll_get_data; + PollGetData *poll_get_data; g_return_if_fail(NM_IS_HTTP_CLIENT(self)); g_return_if_fail(uri && uri[0]); @@ -570,13 +570,13 @@ nm_http_client_poll_get(NMHttpClient * self, gboolean nm_http_client_poll_get_finish(NMHttpClient *self, GAsyncResult *result, - long * out_response_code, - GBytes ** out_response_data, - GError ** error) + long *out_response_code, + GBytes **out_response_data, + GError **error) { - PollGetData * poll_get_data; - GTask * task; - gboolean success; + PollGetData *poll_get_data; + GTask *task; + gboolean success; gs_free_error GError *local_error = NULL; g_return_val_if_fail(NM_HTTP_CLIENT(self), FALSE); @@ -608,8 +608,8 @@ static void _mhandle_action(NMHttpClient *self, int sockfd, int ev_bitmask) { NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); - EHandleData * edata; - CURLMsg * msg; + EHandleData *edata; + CURLMsg *msg; CURLcode eret; int m_left; CURLMcode ret; @@ -652,14 +652,14 @@ _mhandle_socket_cb(int fd, GIOCondition condition, gpointer user_data) } static int -_mhandle_socketfunction_cb(CURL * e_handle, +_mhandle_socketfunction_cb(CURL *e_handle, curl_socket_t fd, int what, - void * user_data, - void * socketp) + void *user_data, + void *socketp) { - GSource * source_socket; - NMHttpClient * self = user_data; + GSource *source_socket; + NMHttpClient *self = user_data; NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); (void) _NM_ENSURE_TYPE(int, fd); @@ -704,7 +704,7 @@ _mhandle_timeout_cb(gpointer user_data) static int _mhandle_timerfunction_cb(CURLM *multi, long timeout_msec, void *user_data) { - NMHttpClient * self = user_data; + NMHttpClient *self = user_data; NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); nm_clear_pointer(&priv->mhandle_source_timeout, nm_g_source_destroy_and_unref); @@ -737,7 +737,7 @@ nm_http_client_init(NMHttpClient *self) static void constructed(GObject *object) { - NMHttpClient * self = NM_HTTP_CLIENT(object); + NMHttpClient *self = NM_HTTP_CLIENT(object); NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); priv->context = g_main_context_ref_thread_default(); @@ -764,7 +764,7 @@ nm_http_client_new(void) static void dispose(GObject *object) { - NMHttpClient * self = NM_HTTP_CLIENT(object); + NMHttpClient *self = NM_HTTP_CLIENT(object); NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); nm_clear_pointer(&priv->mhandle, curl_multi_cleanup); @@ -778,7 +778,7 @@ dispose(GObject *object) static void finalize(GObject *object) { - NMHttpClient * self = NM_HTTP_CLIENT(object); + NMHttpClient *self = NM_HTTP_CLIENT(object); NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE(self); G_OBJECT_CLASS(nm_http_client_parent_class)->finalize(object); diff --git a/src/nm-cloud-setup/nm-http-client.h b/src/nm-cloud-setup/nm-http-client.h index 862b7338..0a7052ae 100644 --- a/src/nm-cloud-setup/nm-http-client.h +++ b/src/nm-cloud-setup/nm-http-client.h @@ -27,34 +27,34 @@ GMainContext *nm_http_client_get_main_context(NMHttpClient *self); /*****************************************************************************/ -void nm_http_client_get(NMHttpClient * self, - const char * uri, +void nm_http_client_get(NMHttpClient *self, + const char *uri, int timeout_msec, gssize max_data, - const char *const * http_headers, - GCancellable * cancellable, + const char *const *http_headers, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean nm_http_client_get_finish(NMHttpClient *self, GAsyncResult *result, - long * out_response_code, - GBytes ** out_response_data, - GError ** error); + long *out_response_code, + GBytes **out_response_data, + GError **error); typedef gboolean (*NMHttpClientPollGetCheckFcn)(long response_code, - GBytes * response_data, + GBytes *response_data, gpointer check_user_data, GError **error); -void nm_http_client_poll_get(NMHttpClient * self, - const char * uri, +void nm_http_client_poll_get(NMHttpClient *self, + const char *uri, int request_timeout_ms, gssize request_max_data, int poll_timeout_ms, int ratelimit_timeout_ms, - const char *const * http_headers, - GCancellable * cancellable, + const char *const *http_headers, + GCancellable *cancellable, NMHttpClientPollGetCheckFcn check_fcn, gpointer check_user_data, GAsyncReadyCallback callback, @@ -62,9 +62,9 @@ void nm_http_client_poll_get(NMHttpClient * self, gboolean nm_http_client_poll_get_finish(NMHttpClient *self, GAsyncResult *result, - long * out_response_code, - GBytes ** out_response_data, - GError ** error); + long *out_response_code, + GBytes **out_response_data, + GError **error); /*****************************************************************************/ diff --git a/src/nm-cloud-setup/nmcs-provider-aliyun.c b/src/nm-cloud-setup/nmcs-provider-aliyun.c index 7073318c..31c9830d 100644 --- a/src/nm-cloud-setup/nmcs-provider-aliyun.c +++ b/src/nm-cloud-setup/nmcs-provider-aliyun.c @@ -22,7 +22,7 @@ static const char * _aliyun_base(void) { static const char *base_cached = NULL; - const char * base; + const char *base; again: base = g_atomic_pointer_get(&base_cached); @@ -73,9 +73,9 @@ filter_chars(char *str, const char *chars) static void _detect_get_meta_data_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_object GTask *task = user_data; - gs_free_error GError *get_error = NULL; - gs_free_error GError *error = NULL; + gs_unref_object GTask *task = user_data; + gs_free_error GError *get_error = NULL; + gs_free_error GError *error = NULL; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, NULL, &get_error); @@ -128,20 +128,20 @@ typedef enum { } GetConfigFetchDoneType; static void -_get_config_fetch_done_cb(NMHttpClient * http_client, - GAsyncResult * result, +_get_config_fetch_done_cb(NMHttpClient *http_client, + GAsyncResult *result, gpointer user_data, GetConfigFetchDoneType fetch_type) { - NMCSProviderGetConfigTaskData *get_config_data; - gs_unref_bytes GBytes *response = NULL; - gs_free_error GError * error = NULL; + NMCSProviderGetConfigTaskData *get_config_data; + gs_unref_bytes GBytes *response = NULL; + gs_free_error GError *error = NULL; NMCSProviderGetConfigIfaceData *config_iface_data; in_addr_t tmp_addr; int tmp_prefix; in_addr_t netmask_bin; in_addr_t gateway_bin; - gs_free const char ** s_addrs = NULL; + gs_free const char **s_addrs = NULL; gsize i; gsize len; @@ -263,11 +263,11 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us { NMCSProviderGetConfigTaskData *get_config_data; gs_unref_hashtable GHashTable *response_parsed = NULL; - gs_free_error GError *error = NULL; - GetConfigMetadataMac *v_mac_data; - const char * v_hwaddr; - GHashTableIter h_iter; - NMHttpClient * http_client; + gs_free_error GError *error = NULL; + GetConfigMetadataMac *v_mac_data; + const char *v_hwaddr; + GHashTableIter h_iter; + NMHttpClient *http_client; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, NULL, &error); @@ -293,10 +293,10 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us g_hash_table_iter_init(&h_iter, response_parsed); while (g_hash_table_iter_next(&h_iter, (gpointer *) &v_hwaddr, (gpointer *) &v_mac_data)) { NMCSProviderGetConfigIfaceData *config_iface_data; - gs_free char * uri1 = NULL; - gs_free char * uri2 = NULL; - gs_free char * uri3 = NULL; - gs_free char * uri4 = NULL; + gs_free char *uri1 = NULL; + gs_free char *uri2 = NULL; + gs_free char *uri3 = NULL; + gs_free char *uri4 = NULL; config_iface_data = g_hash_table_lookup(get_config_data->result_dict, v_hwaddr); @@ -397,19 +397,19 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us static gboolean _get_config_metadata_ready_check(long response_code, - GBytes * response, + GBytes *response, gpointer check_user_data, GError **error) { NMCSProviderGetConfigTaskData *get_config_data = check_user_data; gs_unref_hashtable GHashTable *response_parsed = NULL; - const guint8 * r_data; - const char * cur_line; + const guint8 *r_data; + const char *cur_line; gsize r_len; gsize cur_line_len; GHashTableIter h_iter; gboolean has_all; - const char * c_hwaddr; + const char *c_hwaddr; gssize iface_idx_counter = 0; if (response_code != 200 || !response) { @@ -423,7 +423,7 @@ _get_config_metadata_ready_check(long response_code, while (nm_utils_parse_next_line((const char **) &r_data, &r_len, &cur_line, &cur_line_len)) { GetConfigMetadataMac *mac_data; - char * hwaddr; + char *hwaddr; if (cur_line_len == 0) continue; diff --git a/src/nm-cloud-setup/nmcs-provider-azure.c b/src/nm-cloud-setup/nmcs-provider-azure.c index b3f0c68b..06f23ea7 100644 --- a/src/nm-cloud-setup/nmcs-provider-azure.c +++ b/src/nm-cloud-setup/nmcs-provider-azure.c @@ -38,9 +38,9 @@ G_DEFINE_TYPE(NMCSProviderAzure, nmcs_provider_azure, NMCS_TYPE_PROVIDER); static void _detect_get_meta_data_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_object GTask *task = user_data; - gs_free_error GError *get_error = NULL; - gs_free_error GError *error = NULL; + gs_unref_object GTask *task = user_data; + gs_free_error GError *get_error = NULL; + gs_free_error GError *error = NULL; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, NULL, &get_error); @@ -92,7 +92,7 @@ typedef enum { } GetConfigFetchType; typedef struct { - NMCSProviderGetConfigTaskData * get_config_data; + NMCSProviderGetConfigTaskData *get_config_data; NMCSProviderGetConfigIfaceData *iface_get_config; gssize intern_iface_idx; gssize extern_iface_idx; @@ -106,20 +106,20 @@ _azure_iface_data_destroy(AzureIfaceData *iface_data) } static void -_get_config_fetch_done_cb(NMHttpClient * http_client, - GAsyncResult * result, - AzureIfaceData * iface_data, +_get_config_fetch_done_cb(NMHttpClient *http_client, + GAsyncResult *result, + AzureIfaceData *iface_data, GetConfigFetchType fetch_type) { - NMCSProviderGetConfigTaskData * get_config_data; + NMCSProviderGetConfigTaskData *get_config_data; NMCSProviderGetConfigIfaceData *iface_get_config; - gs_unref_bytes GBytes *response = NULL; - gs_free_error GError *error = NULL; - const char * resp_str = NULL; - gsize resp_len; - char tmp_addr_str[NM_UTILS_INET_ADDRSTRLEN]; - in_addr_t tmp_addr; - int tmp_prefix = -1; + gs_unref_bytes GBytes *response = NULL; + gs_free_error GError *error = NULL; + const char *resp_str = NULL; + gsize resp_len; + char tmp_addr_str[NM_UTILS_INET_ADDRSTRLEN]; + in_addr_t tmp_addr; + int tmp_prefix = -1; nm_http_client_poll_get_finish(http_client, result, NULL, &response, &error); @@ -196,7 +196,7 @@ out_done: } static void -_get_config_fetch_done_cb_ipv4_ipaddress_x_privateipaddress(GObject * source, +_get_config_fetch_done_cb_ipv4_ipaddress_x_privateipaddress(GObject *source, GAsyncResult *result, gpointer user_data) { @@ -207,7 +207,7 @@ _get_config_fetch_done_cb_ipv4_ipaddress_x_privateipaddress(GObject * source } static void -_get_config_fetch_done_cb_ipv4_subnet_0_address(GObject * source, +_get_config_fetch_done_cb_ipv4_subnet_0_address(GObject *source, GAsyncResult *result, gpointer user_data) { @@ -218,7 +218,7 @@ _get_config_fetch_done_cb_ipv4_subnet_0_address(GObject * source, } static void -_get_config_fetch_done_cb_ipv4_subnet_0_prefix(GObject * source, +_get_config_fetch_done_cb_ipv4_subnet_0_prefix(GObject *source, GAsyncResult *result, gpointer user_data) { @@ -231,13 +231,13 @@ _get_config_fetch_done_cb_ipv4_subnet_0_prefix(GObject * source, static void _get_config_ips_prefix_list_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_bytes GBytes *response = NULL; - AzureIfaceData * iface_data = user_data; - gs_free_error GError * error = NULL; - const char * response_str = NULL; + gs_unref_bytes GBytes *response = NULL; + AzureIfaceData *iface_data = user_data; + gs_free_error GError *error = NULL; + const char *response_str = NULL; gsize response_len; NMCSProviderGetConfigTaskData *get_config_data; - const char * line; + const char *line; gsize line_len; char iface_idx_str[30]; @@ -350,12 +350,12 @@ static void _get_config_iface_cb(GObject *source, GAsyncResult *result, gpointer user_data) { NMCSProviderGetConfigTaskData *get_config_data; - gs_unref_bytes GBytes *response = NULL; - AzureIfaceData * iface_data = user_data; - gs_free char * v_hwaddr = NULL; - gs_free_error GError *error = NULL; - gs_free const char * uri = NULL; - char buf[100]; + gs_unref_bytes GBytes *response = NULL; + AzureIfaceData *iface_data = user_data; + gs_free char *v_hwaddr = NULL; + gs_free_error GError *error = NULL; + gs_free const char *uri = NULL; + char buf[100]; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, &response, &error); @@ -433,15 +433,15 @@ static void _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_data) { NMCSProviderGetConfigTaskData *get_config_data; - gs_unref_ptrarray GPtrArray *ifaces_arr = NULL; - gs_unref_bytes GBytes *response = NULL; - gs_free_error GError *error = NULL; - const char * response_str; - gsize response_len; - const char * line; - gsize line_len; - guint i; - gssize extern_iface_idx_cnt = 0; + gs_unref_ptrarray GPtrArray *ifaces_arr = NULL; + gs_unref_bytes GBytes *response = NULL; + gs_free_error GError *error = NULL; + const char *response_str; + gsize response_len; + const char *line; + gsize line_len; + guint i; + gssize extern_iface_idx_cnt = 0; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, &response, &error); @@ -500,7 +500,7 @@ _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat } for (i = 0; i < ifaces_arr->len; ++i) { - AzureIfaceData * iface_data = ifaces_arr->pdata[i]; + AzureIfaceData *iface_data = ifaces_arr->pdata[i]; gs_free const char *uri = NULL; char buf[100]; diff --git a/src/nm-cloud-setup/nmcs-provider-ec2.c b/src/nm-cloud-setup/nmcs-provider-ec2.c index 96b08807..ee4e2a95 100644 --- a/src/nm-cloud-setup/nmcs-provider-ec2.c +++ b/src/nm-cloud-setup/nmcs-provider-ec2.c @@ -20,7 +20,7 @@ static const char * _ec2_base(void) { static const char *base_cached = NULL; - const char * base; + const char *base; again: base = g_atomic_pointer_get(&base_cached); @@ -58,7 +58,7 @@ G_DEFINE_TYPE(NMCSProviderEC2, nmcs_provider_ec2, NMCS_TYPE_PROVIDER); static gboolean _detect_get_meta_data_check_cb(long response_code, - GBytes * response, + GBytes *response, gpointer check_user_data, GError **error) { @@ -68,9 +68,9 @@ _detect_get_meta_data_check_cb(long response_code, static void _detect_get_meta_data_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_object GTask *task = user_data; - gs_free_error GError *get_error = NULL; - gs_free_error GError *error = NULL; + gs_unref_object GTask *task = user_data; + gs_free_error GError *get_error = NULL; + gs_free_error GError *error = NULL; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, NULL, &get_error); @@ -121,9 +121,9 @@ _get_config_fetch_done_cb(NMHttpClient *http_client, gpointer user_data, gboolean is_local_ipv4) { - NMCSProviderGetConfigTaskData *get_config_data; - gs_unref_bytes GBytes *response = NULL; - gs_free_error GError * error = NULL; + NMCSProviderGetConfigTaskData *get_config_data; + gs_unref_bytes GBytes *response = NULL; + gs_free_error GError *error = NULL; NMCSProviderGetConfigIfaceData *config_iface_data; in_addr_t tmp_addr; int tmp_prefix; @@ -178,7 +178,7 @@ out: } static void -_get_config_fetch_done_cb_subnet_ipv4_cidr_block(GObject * source, +_get_config_fetch_done_cb_subnet_ipv4_cidr_block(GObject *source, GAsyncResult *result, gpointer user_data) { @@ -201,11 +201,11 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us { NMCSProviderGetConfigTaskData *get_config_data; gs_unref_hashtable GHashTable *response_parsed = NULL; - gs_free_error GError *error = NULL; - GetConfigMetadataMac *v_mac_data; - const char * v_hwaddr; - GHashTableIter h_iter; - NMHttpClient * http_client; + gs_free_error GError *error = NULL; + GetConfigMetadataMac *v_mac_data; + const char *v_hwaddr; + GHashTableIter h_iter; + NMHttpClient *http_client; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, NULL, &error); @@ -231,8 +231,8 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us g_hash_table_iter_init(&h_iter, response_parsed); while (g_hash_table_iter_next(&h_iter, (gpointer *) &v_hwaddr, (gpointer *) &v_mac_data)) { NMCSProviderGetConfigIfaceData *config_iface_data; - gs_free char * uri1 = NULL; - gs_free char * uri2 = NULL; + gs_free char *uri1 = NULL; + gs_free char *uri2 = NULL; config_iface_data = g_hash_table_lookup(get_config_data->result_dict, v_hwaddr); @@ -298,19 +298,19 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us static gboolean _get_config_metadata_ready_check(long response_code, - GBytes * response, + GBytes *response, gpointer check_user_data, GError **error) { NMCSProviderGetConfigTaskData *get_config_data = check_user_data; gs_unref_hashtable GHashTable *response_parsed = NULL; - const guint8 * r_data; - const char * cur_line; + const guint8 *r_data; + const char *cur_line; gsize r_len; gsize cur_line_len; GHashTableIter h_iter; gboolean has_all; - const char * c_hwaddr; + const char *c_hwaddr; gssize iface_idx_counter = 0; if (response_code != 200 || !response) { @@ -324,7 +324,7 @@ _get_config_metadata_ready_check(long response_code, while (nm_utils_parse_next_line((const char **) &r_data, &r_len, &cur_line, &cur_line_len)) { GetConfigMetadataMac *mac_data; - char * hwaddr; + char *hwaddr; if (cur_line_len == 0) continue; diff --git a/src/nm-cloud-setup/nmcs-provider-gcp.c b/src/nm-cloud-setup/nmcs-provider-gcp.c index 60425ad9..0df2bdd6 100644 --- a/src/nm-cloud-setup/nmcs-provider-gcp.c +++ b/src/nm-cloud-setup/nmcs-provider-gcp.c @@ -41,9 +41,9 @@ G_DEFINE_TYPE(NMCSProviderGCP, nmcs_provider_gcp, NMCS_TYPE_PROVIDER); static void _detect_get_meta_data_done_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_object GTask *task = user_data; - gs_free_error GError *get_error = NULL; - gs_free_error GError *error = NULL; + gs_unref_object GTask *task = user_data; + gs_free_error GError *get_error = NULL; + gs_free_error GError *error = NULL; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, NULL, &get_error); @@ -89,7 +89,7 @@ detect(NMCSProvider *provider, GTask *task) /*****************************************************************************/ typedef struct { - NMCSProviderGetConfigTaskData * get_config_data; + NMCSProviderGetConfigTaskData *get_config_data; NMCSProviderGetConfigIfaceData *iface_get_config; gssize intern_iface_idx; gssize extern_iface_idx; @@ -105,14 +105,14 @@ _gcp_iface_data_destroy(GCPIfaceData *iface_data) static void _get_config_fip_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMCSProviderGetConfigTaskData * get_config_data; + NMCSProviderGetConfigTaskData *get_config_data; NMCSProviderGetConfigIfaceData *iface_get_config; - gs_unref_bytes GBytes *response = NULL; - GCPIfaceData * iface_data = user_data; - gs_free_error GError *error = NULL; - gs_free char * ipaddr = NULL; - NMIPRoute ** routes_arr; - NMIPRoute * route_new; + gs_unref_bytes GBytes *response = NULL; + GCPIfaceData *iface_data = user_data; + gs_free_error GError *error = NULL; + gs_free char *ipaddr = NULL; + NMIPRoute **routes_arr; + NMIPRoute *route_new; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, &response, &error); @@ -161,15 +161,15 @@ static void _get_config_ips_list_cb(GObject *source, GAsyncResult *result, gpointer user_data) { NMCSProviderGetConfigTaskData *get_config_data; - gs_unref_ptrarray GPtrArray *uri_arr = NULL; - gs_unref_bytes GBytes *response = NULL; - GCPIfaceData * iface_data = user_data; - gs_free_error GError *error = NULL; - const char * response_str = NULL; - gsize response_len; - const char * line; - gsize line_len; - guint i; + gs_unref_ptrarray GPtrArray *uri_arr = NULL; + gs_unref_bytes GBytes *response = NULL; + GCPIfaceData *iface_data = user_data; + gs_free_error GError *error = NULL; + const char *response_str = NULL; + gsize response_len; + const char *line; + gsize line_len; + guint i; nm_http_client_poll_get_finish(NM_HTTP_CLIENT(source), result, NULL, &response, &error); @@ -217,7 +217,7 @@ _get_config_ips_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat iface_data->iface_get_config->iproutes_arr = g_new(NMIPRoute *, iface_data->n_fips_pending); for (i = 0; i < uri_arr->len; ++i) { - const char * str = uri_arr->pdata[i]; + const char *str = uri_arr->pdata[i]; gs_free const char *uri = NULL; nm_http_client_poll_get(NM_HTTP_CLIENT(source), @@ -243,11 +243,11 @@ out_error: static void _get_config_iface_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_bytes GBytes *response = NULL; - GCPIfaceData * iface_data = user_data; - gs_free_error GError * error = NULL; - gs_free char * v_hwaddr = NULL; - gs_free const char * uri = NULL; + gs_unref_bytes GBytes *response = NULL; + GCPIfaceData *iface_data = user_data; + gs_free_error GError *error = NULL; + gs_free char *v_hwaddr = NULL; + gs_free const char *uri = NULL; char sbuf[100]; NMCSProviderGetConfigTaskData *get_config_data; gboolean is_requested; @@ -330,13 +330,13 @@ out_done: static void _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - gs_unref_ptrarray GPtrArray *ifaces_arr = NULL; - gs_unref_bytes GBytes *response = NULL; - gs_free_error GError * error = NULL; + gs_unref_ptrarray GPtrArray *ifaces_arr = NULL; + gs_unref_bytes GBytes *response = NULL; + gs_free_error GError *error = NULL; NMCSProviderGetConfigTaskData *get_config_data; - const char * response_str; + const char *response_str; gsize response_len; - const char * line; + const char *line; gsize line_len; guint i; gssize extern_iface_idx_cnt = 0; @@ -397,7 +397,7 @@ _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat } for (i = 0; i < ifaces_arr->len; ++i) { - GCPIfaceData * data = ifaces_arr->pdata[i]; + GCPIfaceData *data = ifaces_arr->pdata[i]; gs_free const char *uri = NULL; char sbuf[100]; diff --git a/src/nm-cloud-setup/nmcs-provider.c b/src/nm-cloud-setup/nmcs-provider.c index 138e78d4..f14a3d02 100644 --- a/src/nm-cloud-setup/nmcs-provider.c +++ b/src/nm-cloud-setup/nmcs-provider.c @@ -68,11 +68,11 @@ static NMCSProviderGetConfigResult * nmcs_provider_get_config_result_new(GHashTable *iface_datas) { const NMCSProviderGetConfigIfaceData *iface_data; - NMCSProviderGetConfigResult * result; + NMCSProviderGetConfigResult *result; GHashTableIter h_iter; guint num_valid_ifaces = 0; guint num_ipv4s = 0; - GPtrArray * ptrarr; + GPtrArray *ptrarr; guint n_iface_datas; n_iface_datas = g_hash_table_size(iface_datas); @@ -137,13 +137,13 @@ nmcs_provider_get_config_result_free(NMCSProviderGetConfigResult *result) /*****************************************************************************/ void -nmcs_provider_detect(NMCSProvider * self, - GCancellable * cancellable, +nmcs_provider_detect(NMCSProvider *self, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { gs_unref_object GTask *task = NULL; - const char * env; + const char *env; g_return_if_fail(NMCS_IS_PROVIDER(self)); g_return_if_fail(!cancellable || G_IS_CANCELLABLE(cancellable)); @@ -251,7 +251,7 @@ _get_config_task_maybe_return(NMCSProviderGetConfigTaskData *get_config_data, GE void _nmcs_provider_get_config_task_maybe_return(NMCSProviderGetConfigTaskData *get_config_data, - GError * error_take) + GError *error_take) { nm_assert(!error_take || !nm_utils_error_is_cancelled(error_take)); _get_config_task_maybe_return(get_config_data, error_take); @@ -264,10 +264,10 @@ _get_config_cancelled_cb(GObject *object, gpointer user_data) } void -nmcs_provider_get_config(NMCSProvider * self, +nmcs_provider_get_config(NMCSProvider *self, gboolean any, - const char *const * hwaddrs, - GCancellable * cancellable, + const char *const *hwaddrs, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -351,7 +351,7 @@ nmcs_provider_init(NMCSProvider *self) static void dispose(GObject *object) { - NMCSProvider * self = NMCS_PROVIDER(object); + NMCSProvider *self = NMCS_PROVIDER(object); NMCSProviderPrivate *priv = NMCS_PROVIDER_GET_PRIVATE(self); g_clear_object(&priv->http_client); diff --git a/src/nm-cloud-setup/nmcs-provider.h b/src/nm-cloud-setup/nmcs-provider.h index 36632059..bce41dcb 100644 --- a/src/nm-cloud-setup/nmcs-provider.h +++ b/src/nm-cloud-setup/nmcs-provider.h @@ -125,8 +125,8 @@ typedef struct { typedef struct { GObjectClass parent; - const char * _name; - const char * _env_provider_enabled; + const char *_name; + const char *_env_provider_enabled; void (*detect)(NMCSProvider *self, GTask *task); @@ -145,8 +145,8 @@ GMainContext *nmcs_provider_get_main_context(NMCSProvider *provider); /*****************************************************************************/ -void nmcs_provider_detect(NMCSProvider * provider, - GCancellable * cancellable, +void nmcs_provider_detect(NMCSProvider *provider, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -155,12 +155,12 @@ gboolean nmcs_provider_detect_finish(NMCSProvider *provider, GAsyncResult *resul /*****************************************************************************/ void _nmcs_provider_get_config_task_maybe_return(NMCSProviderGetConfigTaskData *get_config_data, - GError * error_take); + GError *error_take); -void nmcs_provider_get_config(NMCSProvider * provider, +void nmcs_provider_get_config(NMCSProvider *provider, gboolean any, - const char *const * hwaddrs, - GCancellable * cancellable, + const char *const *hwaddrs, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); diff --git a/src/nm-cloud-setup/tests/test-cloud-setup-general.c b/src/nm-cloud-setup/tests/test-cloud-setup-general.c index 82df4e17..c8635009 100644 --- a/src/nm-cloud-setup/tests/test-cloud-setup-general.c +++ b/src/nm-cloud-setup/tests/test-cloud-setup-general.c @@ -41,10 +41,10 @@ static void _test_ri4a(const char *const *addrs_before, const char *const *addrs_new) { gs_unref_object NMSettingIPConfig *s_ip = NULL; - gs_unref_ptrarray GPtrArray *arr = NULL; - const gsize n = NM_PTRARRAY_LEN(addrs_new); - gboolean changed; - gsize i; + gs_unref_ptrarray GPtrArray *arr = NULL; + const gsize n = NM_PTRARRAY_LEN(addrs_new); + gboolean changed; + gsize i; s_ip = _ri4a_new_s_ip(addrs_before); arr = _ri4a_new_arr(addrs_new); diff --git a/src/nm-dispatcher/nm-dispatcher-utils.c b/src/nm-dispatcher/nm-dispatcher-utils.c index f754a3fa..74ea4e40 100644 --- a/src/nm-dispatcher/nm-dispatcher-utils.c +++ b/src/nm-dispatcher/nm-dispatcher-utils.c @@ -131,7 +131,7 @@ static void _items_add_printf(GPtrArray *items, const char *fmt, ...) { va_list ap; - char * line; + char *line; nm_assert(items); nm_assert(fmt); @@ -225,8 +225,8 @@ construct_ip_items(GPtrArray *items, int addr_family, GVariant *ip_config, const : G_VARIANT_TYPE("a(ayuay)")); if (val) { gs_unref_ptrarray GPtrArray *addresses = NULL; - gs_free char * gateway_free = NULL; - const char * gateway; + gs_free char *gateway_free = NULL; + const char *gateway; if (addr_family == AF_INET) addresses = nm_utils_ip4_addresses_from_variant(val, &gateway_free); @@ -346,12 +346,12 @@ construct_ip_items(GPtrArray *items, int addr_family, GVariant *ip_config, const static void construct_device_dhcp_items(GPtrArray *items, int addr_family, GVariant *dhcp_config) { - GVariantIter iter; - const char * key; - GVariant * val; - char four_or_six; - gboolean found_unknown_245 = FALSE; - gs_unref_variant GVariant *private_245_val = NULL; + GVariantIter iter; + const char *key; + GVariant *val; + char four_or_six; + gboolean found_unknown_245 = FALSE; + gs_unref_variant GVariant *private_245_val = NULL; if (!dhcp_config) return; @@ -415,34 +415,34 @@ construct_device_dhcp_items(GPtrArray *items, int addr_family, GVariant *dhcp_co /*****************************************************************************/ char ** -nm_dispatcher_utils_construct_envp(const char * action, - GVariant * connection_dict, - GVariant * connection_props, - GVariant * device_props, - GVariant * device_proxy_props, - GVariant * device_ip4_props, - GVariant * device_ip6_props, - GVariant * device_dhcp4_props, - GVariant * device_dhcp6_props, - const char * connectivity_state, - const char * vpn_ip_iface, - GVariant * vpn_proxy_props, - GVariant * vpn_ip4_props, - GVariant * vpn_ip6_props, - char ** out_iface, +nm_dispatcher_utils_construct_envp(const char *action, + GVariant *connection_dict, + GVariant *connection_props, + GVariant *device_props, + GVariant *device_proxy_props, + GVariant *device_ip4_props, + GVariant *device_ip6_props, + GVariant *device_dhcp4_props, + GVariant *device_dhcp6_props, + const char *connectivity_state, + const char *vpn_ip_iface, + GVariant *vpn_proxy_props, + GVariant *vpn_ip4_props, + GVariant *vpn_ip6_props, + char **out_iface, const char **out_error_message) { - const char * iface = NULL; - const char * ip_iface = NULL; - const char * uuid = NULL; - const char * id = NULL; - const char * path = NULL; - const char * filename = NULL; - gboolean external; - NMDeviceState dev_state = NM_DEVICE_STATE_UNKNOWN; - GVariant * variant; + const char *iface = NULL; + const char *ip_iface = NULL; + const char *uuid = NULL; + const char *id = NULL; + const char *path = NULL; + const char *filename = NULL; + gboolean external; + NMDeviceState dev_state = NM_DEVICE_STATE_UNKNOWN; + GVariant *variant; gs_unref_ptrarray GPtrArray *items = NULL; - const char * error_message_backup; + const char *error_message_backup; if (!out_error_message) out_error_message = &error_message_backup; diff --git a/src/nm-dispatcher/nm-dispatcher-utils.h b/src/nm-dispatcher/nm-dispatcher-utils.h index cb40d146..b9e9b2c1 100644 --- a/src/nm-dispatcher/nm-dispatcher-utils.h +++ b/src/nm-dispatcher/nm-dispatcher-utils.h @@ -6,21 +6,21 @@ #ifndef __NETWORKMANAGER_DISPATCHER_UTILS_H__ #define __NETWORKMANAGER_DISPATCHER_UTILS_H__ -char **nm_dispatcher_utils_construct_envp(const char * action, - GVariant * connection_dict, - GVariant * connection_props, - GVariant * device_props, - GVariant * device_proxy_props, - GVariant * device_ip4_props, - GVariant * device_ip6_props, - GVariant * device_dhcp4_props, - GVariant * device_dhcp6_props, - const char * connectivity_state, - const char * vpn_ip_iface, - GVariant * vpn_proxy_props, - GVariant * vpn_ip4_props, - GVariant * vpn_ip6_props, - char ** out_iface, +char **nm_dispatcher_utils_construct_envp(const char *action, + GVariant *connection_dict, + GVariant *connection_props, + GVariant *device_props, + GVariant *device_proxy_props, + GVariant *device_ip4_props, + GVariant *device_ip6_props, + GVariant *device_dhcp4_props, + GVariant *device_dhcp6_props, + const char *connectivity_state, + const char *vpn_ip_iface, + GVariant *vpn_proxy_props, + GVariant *vpn_ip4_props, + GVariant *vpn_ip6_props, + char **out_iface, const char **out_error_message); #endif /* __NETWORKMANAGER_DISPATCHER_UTILS_H__ */ diff --git a/src/nm-dispatcher/nm-dispatcher.c b/src/nm-dispatcher/nm-dispatcher.c index b29f5aca..aeecaa9b 100644 --- a/src/nm-dispatcher/nm-dispatcher.c +++ b/src/nm-dispatcher/nm-dispatcher.c @@ -35,7 +35,7 @@ typedef struct Request Request; typedef struct { GDBusConnection *dbus_connection; - GCancellable * quit_cancellable; + GCancellable *quit_cancellable; bool log_verbose; bool log_stdout; @@ -50,7 +50,7 @@ typedef struct { gboolean persist; Request *current_request; - GQueue * requests_waiting; + GQueue *requests_waiting; int num_requests_pending; bool exit_with_failure; @@ -67,23 +67,23 @@ GlobalData gl; typedef struct { Request *request; - char * script; + char *script; GPid pid; DispatchResult result; - char * error; + char *error; gboolean wait; gboolean dispatched; - GSource * watch_source; - GSource * timeout_source; + GSource *watch_source; + GSource *timeout_source; } ScriptInfo; struct Request { guint request_id; GDBusMethodInvocation *context; - char * action; - char * iface; - char ** envp; + char *action; + char *iface; + char **envp; gboolean debug; GPtrArray *scripts; /* list of ScriptInfo */ @@ -293,7 +293,7 @@ static void complete_request(Request *request) { GVariantBuilder results; - GVariant * ret; + GVariant *ret; guint i; nm_assert(request); @@ -397,7 +397,7 @@ complete_script(ScriptInfo *script) static void script_watch_cb(GPid pid, int status, gpointer user_data) { - ScriptInfo * script = user_data; + ScriptInfo *script = user_data; gs_free char *status_desc = NULL; g_assert(pid == script->pid); @@ -518,8 +518,8 @@ static gboolean script_dispatch(ScriptInfo *script) { gs_free_error GError *error = NULL; - char * argv[4]; - Request * request = script->request; + char *argv[4]; + Request *request = script->request; if (script->dispatched) return FALSE; @@ -596,10 +596,10 @@ _compare_basenames(gconstpointer a, gconstpointer b) static void _find_scripts(Request *request, GHashTable *scripts, const char *base, const char *subdir) { - const char * filename; + const char *filename; gs_free char *dirname = NULL; - GError * error = NULL; - GDir * dir; + GError *error = NULL; + GDir *dir; dirname = g_build_filename(base, "dispatcher.d", subdir, NULL); @@ -628,11 +628,11 @@ static GSList * find_scripts(Request *request) { gs_unref_hashtable GHashTable *scripts = NULL; - GSList * script_list = NULL; + GSList *script_list = NULL; GHashTableIter iter; - const char * subdir; - char * path; - char * filename; + const char *subdir; + char *path; + char *filename; if (NM_IN_STRSET(request->action, NMD_ACTION_PRE_UP, NMD_ACTION_VPN_PRE_UP)) subdir = "pre-up.d"; @@ -649,7 +649,7 @@ find_scripts(Request *request) g_hash_table_iter_init(&iter, scripts); while (g_hash_table_iter_next(&iter, (gpointer *) &filename, (gpointer *) &path)) { gs_free char *link_target = NULL; - const char * err_msg = NULL; + const char *err_msg = NULL; struct stat st; int err; @@ -681,7 +681,7 @@ script_must_wait(const char *path) link = g_file_read_link(path, NULL); if (link) { - gs_free char * dir = NULL; + gs_free char *dir = NULL; nm_auto_free char *real = NULL; if (!g_path_is_absolute(link)) { @@ -706,7 +706,7 @@ script_must_wait(const char *path) static void _handle_action(GDBusMethodInvocation *invocation, GVariant *parameters) { - const char * action; + const char *action; gs_unref_variant GVariant *connection = NULL; gs_unref_variant GVariant *connection_properties = NULL; gs_unref_variant GVariant *device_properties = NULL; @@ -715,18 +715,18 @@ _handle_action(GDBusMethodInvocation *invocation, GVariant *parameters) gs_unref_variant GVariant *device_ip6_config = NULL; gs_unref_variant GVariant *device_dhcp4_config = NULL; gs_unref_variant GVariant *device_dhcp6_config = NULL; - const char * connectivity_state; - const char * vpn_ip_iface; + const char *connectivity_state; + const char *vpn_ip_iface; gs_unref_variant GVariant *vpn_proxy_properties = NULL; gs_unref_variant GVariant *vpn_ip4_config = NULL; gs_unref_variant GVariant *vpn_ip6_config = NULL; gboolean debug; - GSList * sorted_scripts = NULL; - GSList * iter; - Request * request; - char ** p; + GSList *sorted_scripts = NULL; + GSList *iter; + Request *request; + char **p; guint i, num_nowait = 0; - const char * error_message = NULL; + const char *error_message = NULL; g_variant_get(parameters, "(" @@ -872,7 +872,7 @@ _handle_ping(GDBusMethodInvocation *invocation, GVariant *parameters) { gs_free char *msg = NULL; gint64 running_msec; - const char * arg_s; + const char *arg_s; g_variant_get(parameters, "(&s)", &arg_s); @@ -888,12 +888,12 @@ _handle_ping(GDBusMethodInvocation *invocation, GVariant *parameters) } static void -_bus_method_call(GDBusConnection * connection, - const char * sender, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_bus_method_call(GDBusConnection *connection, + const char *sender, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { @@ -955,9 +955,9 @@ _bus_register_service(void) static const GDBusInterfaceVTable interface_vtable = { .method_call = _bus_method_call, }; - gs_free_error GError * error = NULL; + gs_free_error GError *error = NULL; NMDBusConnectionCallBlockingData data = { - .result = NULL, + .result = NULL, }; gs_unref_variant GVariant *ret = NULL; guint32 ret_val; @@ -1185,8 +1185,8 @@ int main(int argc, char **argv) { gs_free_error GError *error = NULL; - GSource * source_term = NULL; - GSource * source_int = NULL; + GSource *source_term = NULL; + GSource *source_int = NULL; signal(SIGPIPE, SIG_IGN); source_term = diff --git a/src/nm-dispatcher/tests/test-dispatcher-envp.c b/src/nm-dispatcher/tests/test-dispatcher-envp.c index 8a24c426..f53bb1c1 100644 --- a/src/nm-dispatcher/tests/test-dispatcher-envp.c +++ b/src/nm-dispatcher/tests/test-dispatcher-envp.c @@ -24,7 +24,7 @@ _print_env(const char *const *denv, GHashTable *expected_env) { const char *const *iter; GHashTableIter k; - const char * key; + const char *key; g_print("\n******* Generated environment:\n"); for (iter = denv; iter && *iter; iter++) @@ -37,22 +37,22 @@ _print_env(const char *const *denv, GHashTable *expected_env) } static gboolean -parse_main(GKeyFile * kf, +parse_main(GKeyFile *kf, const char *filename, - GVariant ** out_con_dict, - GVariant ** out_con_props, - char ** out_expected_iface, - char ** out_action, - char ** out_connectivity_state, - char ** out_vpn_ip_iface, - GError ** error) + GVariant **out_con_dict, + GVariant **out_con_props, + char **out_expected_iface, + char **out_action, + char **out_connectivity_state, + char **out_vpn_ip_iface, + GError **error) { - nm_auto_clear_variant_builder GVariantBuilder props = {}; - gs_free char * uuid = NULL; - gs_free char * id = NULL; - gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - const char * s; + nm_auto_clear_variant_builder GVariantBuilder props = {}; + gs_free char *uuid = NULL; + gs_free char *id = NULL; + gs_unref_object NMConnection *connection = NULL; + NMSettingConnection *s_con; + const char *s; *out_expected_iface = g_key_file_get_string(kf, "main", "expected-iface", NULL); @@ -108,7 +108,7 @@ static gboolean parse_device(GKeyFile *kf, GVariant **out_device_props, GError **error) { nm_auto_clear_variant_builder GVariantBuilder props = {}; - gs_free char * tmp = NULL; + gs_free char *tmp = NULL; int i; g_variant_builder_init(&props, G_VARIANT_TYPE("a{sv}")); @@ -145,13 +145,13 @@ parse_device(GKeyFile *kf, GVariant **out_device_props, GError **error) } static gboolean -add_uint_array(GKeyFile * kf, +add_uint_array(GKeyFile *kf, GVariantBuilder *props, - const char * section, - const char * key, - GError ** error) + const char *section, + const char *key, + GError **error) { - gs_free char * tmp = NULL; + gs_free char *tmp = NULL; gs_free const char **split = NULL; gsize i; @@ -193,7 +193,7 @@ static gboolean parse_proxy(GKeyFile *kf, GVariant **out_props, const char *section, GError **error) { nm_auto_clear_variant_builder GVariantBuilder props = {}; - gs_free char * tmp = NULL; + gs_free char *tmp = NULL; g_variant_builder_init(&props, G_VARIANT_TYPE("a{sv}")); @@ -216,9 +216,9 @@ static gboolean parse_ip4(GKeyFile *kf, GVariant **out_props, const char *section, GError **error) { nm_auto_clear_variant_builder GVariantBuilder props = {}; - gs_free char * tmp = NULL; - gs_free const char ** split = NULL; - const char ** iter; + gs_free char *tmp = NULL; + gs_free const char **split = NULL; + const char **iter; g_variant_builder_init(&props, G_VARIANT_TYPE("a{sv}")); @@ -250,14 +250,14 @@ parse_ip4(GKeyFile *kf, GVariant **out_props, const char *section, GError **erro split = nm_strsplit_set_with_empty(tmp, ","); if (split) { gs_unref_ptrarray GPtrArray *addresses = NULL; - const char * gateway = NULL; + const char *gateway = NULL; addresses = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_address_unref); for (iter = split; *iter; iter++) { - const char * s = *iter; + const char *s = *iter; NMIPAddress *addr; - const char * ip; - const char * prefix; + const char *ip; + const char *prefix; g_strstrip((char *) s); if (s[0] == '\0') @@ -298,7 +298,7 @@ parse_ip4(GKeyFile *kf, GVariant **out_props, const char *section, GError **erro routes = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_route_unref); for (iter = split; *iter; iter++) { const char *s = *iter; - NMIPRoute * route; + NMIPRoute *route; const char *dest; const char *prefix; const char *next_hop; @@ -344,8 +344,8 @@ static gboolean parse_dhcp(GKeyFile *kf, const char *group_name, GVariant **out_props, GError **error) { nm_auto_clear_variant_builder GVariantBuilder props = {}; - gs_strfreev char ** keys = NULL; - char ** iter; + gs_strfreev char **keys = NULL; + char **iter; keys = g_key_file_get_keys(kf, group_name, NULL, error); if (!keys) @@ -366,28 +366,28 @@ parse_dhcp(GKeyFile *kf, const char *group_name, GVariant **out_props, GError ** } static gboolean -get_dispatcher_file(const char * file, - GVariant ** out_con_dict, - GVariant ** out_con_props, - GVariant ** out_device_props, - GVariant ** out_device_proxy_props, - GVariant ** out_device_ip4_props, - GVariant ** out_device_ip6_props, - GVariant ** out_device_dhcp4_props, - GVariant ** out_device_dhcp6_props, - char ** out_connectivity_state, - char ** out_vpn_ip_iface, - GVariant ** out_vpn_proxy_props, - GVariant ** out_vpn_ip4_props, - GVariant ** out_vpn_ip6_props, - char ** out_expected_iface, - char ** out_action, +get_dispatcher_file(const char *file, + GVariant **out_con_dict, + GVariant **out_con_props, + GVariant **out_device_props, + GVariant **out_device_proxy_props, + GVariant **out_device_ip4_props, + GVariant **out_device_ip6_props, + GVariant **out_device_dhcp4_props, + GVariant **out_device_dhcp6_props, + char **out_connectivity_state, + char **out_vpn_ip_iface, + GVariant **out_vpn_proxy_props, + GVariant **out_vpn_ip4_props, + GVariant **out_vpn_ip6_props, + char **out_expected_iface, + char **out_action, GHashTable **out_env, - GError ** error) + GError **error) { nm_auto_unref_keyfile GKeyFile *kf = NULL; - gs_strfreev char ** keys = NULL; - char ** iter; + gs_strfreev char **keys = NULL; + char **iter; g_assert(!error || !*error); g_assert(out_con_dict && !*out_con_dict); @@ -465,29 +465,29 @@ get_dispatcher_file(const char * file, static void test_generic(const char *file, const char *override_vpn_ip_iface) { - gs_unref_variant GVariant *con_dict = NULL; - gs_unref_variant GVariant *con_props = NULL; - gs_unref_variant GVariant *device_props = NULL; - gs_unref_variant GVariant *device_proxy_props = NULL; - gs_unref_variant GVariant *device_ip4_props = NULL; - gs_unref_variant GVariant *device_ip6_props = NULL; - gs_unref_variant GVariant *device_dhcp4_props = NULL; - gs_unref_variant GVariant *device_dhcp6_props = NULL; - gs_free char * connectivity_change = NULL; - gs_free char * vpn_ip_iface = NULL; - gs_unref_variant GVariant *vpn_proxy_props = NULL; - gs_unref_variant GVariant *vpn_ip4_props = NULL; - gs_unref_variant GVariant *vpn_ip6_props = NULL; - gs_free char * expected_iface = NULL; - gs_free char * action = NULL; - gs_free char * out_iface = NULL; - const char * error_message = NULL; - gs_unref_hashtable GHashTable *expected_env = NULL; - GError * error = NULL; + gs_unref_variant GVariant *con_dict = NULL; + gs_unref_variant GVariant *con_props = NULL; + gs_unref_variant GVariant *device_props = NULL; + gs_unref_variant GVariant *device_proxy_props = NULL; + gs_unref_variant GVariant *device_ip4_props = NULL; + gs_unref_variant GVariant *device_ip6_props = NULL; + gs_unref_variant GVariant *device_dhcp4_props = NULL; + gs_unref_variant GVariant *device_dhcp6_props = NULL; + gs_free char *connectivity_change = NULL; + gs_free char *vpn_ip_iface = NULL; + gs_unref_variant GVariant *vpn_proxy_props = NULL; + gs_unref_variant GVariant *vpn_ip4_props = NULL; + gs_unref_variant GVariant *vpn_ip6_props = NULL; + gs_free char *expected_iface = NULL; + gs_free char *action = NULL; + gs_free char *out_iface = NULL; + const char *error_message = NULL; + gs_unref_hashtable GHashTable *expected_env = NULL; + GError *error = NULL; gboolean success; - gs_free char * filename = NULL; - gs_strfreev char ** denv = NULL; - char ** iter; + gs_free char *filename = NULL; + gs_strfreev char **denv = NULL; + char **iter; filename = g_build_filename(TEST_DIR, file, NULL); success = get_dispatcher_file(filename, diff --git a/src/nm-initrd-generator/nm-initrd-generator.c b/src/nm-initrd-generator/nm-initrd-generator.c index b78808b2..981cb14b 100644 --- a/src/nm-initrd-generator/nm-initrd-generator.c +++ b/src/nm-initrd-generator/nm-initrd-generator.c @@ -28,14 +28,14 @@ static void output_conn(gpointer key, gpointer value, gpointer user_data) { - const char * basename = key; - NMConnection * connection = value; - char * connections_dir = user_data; - nm_auto_unref_keyfile GKeyFile *file = NULL; - gs_free char * data = NULL; - gs_free_error GError *error = NULL; - gsize len; - NMSetting * setting; + const char *basename = key; + NMConnection *connection = value; + char *connections_dir = user_data; + nm_auto_unref_keyfile GKeyFile *file = NULL; + gs_free char *data = NULL; + gs_free_error GError *error = NULL; + gsize len; + NMSetting *setting; setting = nm_setting_user_new(); nm_connection_add_setting(connection, setting); @@ -79,14 +79,15 @@ err_out: int main(int argc, char *argv[]) { - GHashTable * connections; - gs_free char * connections_dir = NULL; - gs_free char * initrd_dir = NULL; - gs_free char * sysfs_dir = NULL; - gs_free char * run_config_dir = NULL; - gboolean dump_to_stdout = FALSE; - gs_strfreev char **remaining = NULL; - GOptionEntry option_entries[] = { + GHashTable *connections; + gs_free char *connections_dir = NULL; + gs_free char *etc_connections_dir = NULL; + gs_free char *initrd_dir = NULL; + gs_free char *sysfs_dir = NULL; + gs_free char *run_config_dir = NULL; + gboolean dump_to_stdout = FALSE; + gs_strfreev char **remaining = NULL; + GOptionEntry option_entries[] = { {"connections-dir", 'c', 0, @@ -94,6 +95,13 @@ main(int argc, char *argv[]) &connections_dir, "Output connection directory", NM_KEYFILE_PATH_NAME_RUN}, + {"persistent-connections-dir", + 'p', + 0, + G_OPTION_ARG_FILENAME, + &etc_connections_dir, + "Persistent connection directory", + NM_KEYFILE_PATH_NAME_ETC_DEFAULT}, {"initrd-data-dir", 'i', 0, @@ -125,10 +133,10 @@ main(int argc, char *argv[]) {G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &remaining, NULL, NULL}, {NULL}}; nm_auto_free_option_context GOptionContext *option_context = NULL; - gs_free_error GError *error = NULL; - gs_free char * hostname = NULL; - int errsv; - gint64 carrier_timeout_sec = 0; + gs_free_error GError *error = NULL; + gs_free char *hostname = NULL; + int errsv; + gint64 carrier_timeout_sec = 0; option_context = g_option_context_new( "-- [ip=...] [rd.route=...] [bridge=...] [bond=...] [team=...] [vlan=...] " @@ -153,6 +161,8 @@ main(int argc, char *argv[]) return 0; } + if (!etc_connections_dir) + etc_connections_dir = g_strdup(NM_KEYFILE_PATH_NAME_ETC_DEFAULT); if (!connections_dir) connections_dir = g_strdup(NM_KEYFILE_PATH_NAME_RUN); if (!sysfs_dir) @@ -162,7 +172,8 @@ main(int argc, char *argv[]) if (!run_config_dir) run_config_dir = g_strdup(DEFAULT_RUN_CONFIG_DIR); - connections = nmi_cmdline_reader_parse(sysfs_dir, + connections = nmi_cmdline_reader_parse(etc_connections_dir, + sysfs_dir, (const char *const *) remaining, &hostname, &carrier_timeout_sec); @@ -207,7 +218,7 @@ main(int argc, char *argv[]) } if (carrier_timeout_sec != 0) { nm_auto_unref_keyfile GKeyFile *keyfile = NULL; - gs_free char * filename = NULL; + gs_free char *filename = NULL; keyfile = g_key_file_new(); g_key_file_set_list_separator(keyfile, NM_CONFIG_KEYFILE_LIST_SEPARATOR); diff --git a/src/nm-initrd-generator/nm-initrd-generator.h b/src/nm-initrd-generator/nm-initrd-generator.h index 2ec52a01..4f33ac65 100644 --- a/src/nm-initrd-generator/nm-initrd-generator.h +++ b/src/nm-initrd-generator/nm-initrd-generator.h @@ -38,9 +38,10 @@ nmi_ibft_update_connection_from_nic(NMConnection *connection, GHashTable *nic, G NMConnection *nmi_dt_reader_parse(const char *sysfs_dir); -GHashTable *nmi_cmdline_reader_parse(const char * sysfs_dir, +GHashTable *nmi_cmdline_reader_parse(const char *etc_connections_dir, + const char *sysfs_dir, const char *const *argv, - char ** hostname, - gint64 * carrier_timeout_sec); + char **hostname, + gint64 *carrier_timeout_sec); #endif /* __NM_INITRD_GENERATOR_H__ */ diff --git a/src/nm-initrd-generator/nmi-cmdline-reader.c b/src/nm-initrd-generator/nmi-cmdline-reader.c index 8fafb08f..412c7510 100644 --- a/src/nm-initrd-generator/nmi-cmdline-reader.c +++ b/src/nm-initrd-generator/nmi-cmdline-reader.c @@ -27,18 +27,19 @@ /*****************************************************************************/ typedef struct { - GHashTable * hash; - GPtrArray * array; - GPtrArray * vlan_parents; - GHashTable * explicit_ip_connections; + GHashTable *hash; + GPtrArray *array; + GPtrArray *vlan_parents; + GHashTable *explicit_ip_connections; NMConnection *bootdev_connection; /* connection for bootdev=$ifname */ NMConnection *default_connection; /* connection not bound to any ifname */ - char * hostname; + char *hostname; + GHashTable *znet_ifnames; /* Parameters to be set for all connections */ gboolean ignore_auto_dns; int dhcp_timeout; - char * dhcp4_vci; + char *dhcp4_vci; gint64 carrier_timeout_sec; } Reader; @@ -55,6 +56,7 @@ reader_new(void) g_hash_table_new_full(nm_direct_hash, NULL, g_object_unref, NULL), .vlan_parents = g_ptr_array_new_with_free_func(g_free), .array = g_ptr_array_new(), + .znet_ifnames = g_hash_table_new_full(nm_str_hash, g_str_equal, g_free, g_free), }; return reader; @@ -70,6 +72,7 @@ reader_destroy(Reader *reader, gboolean free_hash) g_hash_table_unref(reader->explicit_ip_connections); hash = g_steal_pointer(&reader->hash); nm_clear_g_free(&reader->hostname); + g_hash_table_unref(reader->znet_ifnames); nm_clear_g_free(&reader->dhcp4_vci); nm_g_slice_free(reader); if (!free_hash) @@ -91,16 +94,16 @@ reader_add_connection(Reader *reader, const char *name, NMConnection *connection /* Returns a new connection owned by the reader */ static NMConnection * -reader_create_connection(Reader * reader, - const char * basename, - const char * id, - const char * ifname, - const char * mac, - const char * type_name, +reader_create_connection(Reader *reader, + const char *basename, + const char *id, + const char *ifname, + const char *mac, + const char *type_name, NMConnectionMultiConnect multi_connect) { NMConnection *connection; - NMSetting * setting; + NMSetting *setting; connection = reader_add_connection(reader, basename, nm_simple_connection_new()); @@ -195,14 +198,14 @@ reader_get_default_connection(Reader *reader) } static NMConnection * -reader_get_connection(Reader * reader, +reader_get_connection(Reader *reader, const char *iface_spec, const char *type_name, gboolean create_if_missing) { NMConnection *connection = NULL; - NMSetting * setting; - const char * ifname = NULL; + NMSetting *setting; + const char *ifname = NULL; gs_free char *mac = NULL; if (iface_spec) { @@ -216,7 +219,7 @@ reader_get_connection(Reader * reader, } if (!ifname && !mac) { - NMConnection * candidate; + NMConnection *candidate; NMSettingConnection *s_con; guint i; @@ -314,14 +317,14 @@ get_word(char **argument, const char separator) static void connection_set(NMConnection *connection, - const char * setting_name, - const char * property, - const char * value) + const char *setting_name, + const char *property, + const char *value) { - NMSetting * setting; - GType setting_type; + NMSetting *setting; + GType setting_type; nm_auto_unref_gtypeclass GObjectClass *object_class = NULL; - GParamSpec * spec; + GParamSpec *spec; setting_type = nm_setting_lookup_type(setting_name); object_class = g_type_class_ref(setting_type); @@ -355,20 +358,20 @@ static void reader_read_all_connections_from_fw(Reader *reader, const char *sysfs_dir) { gs_unref_hashtable GHashTable *ibft = NULL; - NMConnection * dt_connection; - const char * mac; - GHashTable * nic; - const char * index; - GError * error = NULL; + NMConnection *dt_connection; + const char *mac; + GHashTable *nic; + const char *index; + GError *error = NULL; guint i, length; - gs_free const char ** keys = NULL; + gs_free const char **keys = NULL; ibft = nmi_ibft_read(sysfs_dir); keys = nm_strdict_get_keys(ibft, TRUE, &length); for (i = 0; i < length; i++) { gs_unref_object NMConnection *connection = NULL; - gs_free char * name = NULL; + gs_free char *name = NULL; mac = keys[i]; nic = g_hash_table_lookup(ibft, mac); @@ -426,7 +429,7 @@ _parse_ip_method(const char *kind) "auto", "ibft", }; - gs_free char * kind_to_free = NULL; + gs_free char *kind_to_free = NULL; gs_free const char **strv = NULL; gsize i; @@ -512,26 +515,26 @@ _parse_ip_method(const char *kind) static void reader_parse_ip(Reader *reader, const char *sysfs_dir, char *argument) { - NMConnection * connection; - NMSettingConnection *s_con; - NMSettingIPConfig * s_ip4 = NULL, *s_ip6 = NULL; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4 = NULL, *s_ip6 = NULL; gs_unref_hashtable GHashTable *ibft = NULL; - const char * tmp; - const char * tmp2; - const char * tmp3; - const char * kind; - const char * client_ip = NULL; - const char * peer = NULL; - const char * gateway_ip = NULL; - const char * netmask = NULL; - const char * client_hostname = NULL; - const char * iface_spec = NULL; - const char * mtu = NULL; - const char * macaddr = NULL; + const char *tmp; + const char *tmp2; + const char *tmp3; + const char *kind; + const char *client_ip = NULL; + const char *peer = NULL; + const char *gateway_ip = NULL; + const char *netmask = NULL; + const char *client_hostname = NULL; + const char *iface_spec = NULL; + const char *mtu = NULL; + const char *macaddr = NULL; int client_ip_family = AF_UNSPEC; int client_ip_prefix = -1; gboolean clear_ip4_required_timeout = TRUE; - const char * dns[2] = { + const char *dns[2] = { NULL, NULL, }; @@ -770,11 +773,11 @@ reader_parse_ip(Reader *reader, const char *sysfs_dir, char *argument) } } else if (nm_streq(kind, "ibft")) { NMSettingWired *s_wired; - const char * mac = NULL; - const char * ifname; - gs_free char * mac_free = NULL; - gs_free char * address_path = NULL; - GHashTable * nic = NULL; + const char *mac = NULL; + const char *ifname; + gs_free char *mac_free = NULL; + gs_free char *address_path = NULL; + GHashTable *nic = NULL; if ((s_wired = nm_connection_get_setting_wired(connection)) && (mac = nm_setting_wired_get_mac_address(s_wired))) { @@ -857,14 +860,14 @@ reader_parse_ip(Reader *reader, const char *sysfs_dir, char *argument) static void reader_parse_master(Reader *reader, char *argument, const char *type_name, const char *default_name) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - gs_free char * master_to_free = NULL; - const char * master; - char * slaves; - const char * slave; - char * opts; - const char * mtu = NULL; + gs_free char *master_to_free = NULL; + const char *master; + char *slaves; + const char *slave; + char *opts; + const char *mtu = NULL; master = get_word(&argument, ':'); if (!master) @@ -886,8 +889,8 @@ reader_parse_master(Reader *reader, char *argument, const char *type_name, const opts = get_word(&argument, ':'); while (opts && *opts) { gs_free_error GError *error = NULL; - char * opt; - const char * opt_name; + char *opt; + const char *opt_name; opt = get_word(&opts, ','); opt_name = get_word(&opt, '='); @@ -934,17 +937,17 @@ reader_add_routes(Reader *reader, GPtrArray *array) guint i; for (i = 0; i < array->len; i++) { - NMConnection * connection = NULL; - const char * net; - const char * gateway; - const char * interface; - int family = AF_UNSPEC; - NMIPAddr net_addr = {}; - NMIPAddr gateway_addr = {}; - int net_prefix = -1; - NMIPRoute * route; - NMSettingIPConfig *s_ip; - char * argument; + NMConnection *connection = NULL; + const char *net; + const char *gateway; + const char *interface; + int family = AF_UNSPEC; + NMIPAddr net_addr = {}; + NMIPAddr gateway_addr = {}; + int net_prefix = -1; + NMIPRoute *route; + NMSettingIPConfig *s_ip; + char *argument; gs_free_error GError *error = NULL; argument = array->pdata[i]; @@ -1010,11 +1013,11 @@ reader_add_routes(Reader *reader, GPtrArray *array) static void reader_parse_vlan(Reader *reader, char *argument) { - NMConnection * connection; + NMConnection *connection; NMSettingVlan *s_vlan; - const char * vlan; - const char * phy; - const char * vlanid; + const char *vlan; + const char *phy; + const char *vlanid; vlan = get_word(&argument, ':'); phy = get_word(&argument, ':'); @@ -1044,11 +1047,11 @@ reader_parse_vlan(Reader *reader, char *argument) static void reader_parse_ib_pkey(Reader *reader, char *argument) { - NMConnection * connection; + NMConnection *connection; NMSettingInfiniband *s_ib; - char * ifname; - gs_free char * parent = NULL; - char * pkey; + char *ifname; + gs_free char *parent = NULL; + char *pkey; gint64 pkey_int; /* At the moment we only support ib.pkey=.; @@ -1091,19 +1094,36 @@ reader_parse_ib_pkey(Reader *reader, char *argument) _LOGW(LOGD_CORE, "Ignoring extra: '%s' for ib.pkey=", argument); } +static void +reader_parse_znet_ifname(Reader *reader, char *argument) +{ + char *ifname; + + ifname = get_word(&argument, ':'); + if (!ifname) { + _LOGW(LOGD_CORE, "rd.znet_ifname= without argument"); + return; + } + + if (!g_hash_table_replace(reader->znet_ifnames, g_strdup(argument), g_strdup(ifname))) { + _LOGW(LOGD_CORE, "duplicate rd.znet_ifname for ifname=%s", ifname); + } +} + static void reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames) { - const char * nettype; - const char * subchannels[4] = {0, 0, 0, 0}; - const char * tmp; - gs_free char * ifname = NULL; - const char * prefix; - NMConnection * connection; + const char *nettype; + const char *subchannels[4] = {0, 0, 0, 0}; + const char *tmp; + gs_free char *ifname = NULL; + gs_free char *str_subchannels = NULL; + const char *prefix; + NMConnection *connection; NMSettingWired *s_wired; static int count_ctc = 0; static int count_eth = 0; - int index; + int index = -1; nettype = get_word(&argument, ','); subchannels[0] = get_word(&argument, ','); @@ -1131,7 +1151,13 @@ reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames) } } - if (net_ifnames == TRUE) { + str_subchannels = g_strjoinv(",", (char **) subchannels); + ifname = g_hash_table_lookup(reader->znet_ifnames, str_subchannels); + + if (ifname) { + ifname = g_strdup(ifname); + g_hash_table_remove(reader->znet_ifnames, str_subchannels); + } else if (net_ifnames == TRUE) { const char *bus_id; size_t bus_id_len; size_t bus_id_start; @@ -1144,6 +1170,7 @@ reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames) ifname = g_strdup_printf("%sc%s", prefix, bus_id); } else { + nm_assert(index > -1); ifname = g_strdup_printf("%s%d", prefix, index); } @@ -1160,7 +1187,7 @@ reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames) while ((tmp = get_word(&argument, ',')) != NULL) { const char *key; - char * val; + char *val; val = strchr(tmp, '='); if (!val) { @@ -1184,11 +1211,11 @@ reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames) static void reader_parse_ethtool(Reader *reader, char *argument) { - NMConnection * connection; + NMConnection *connection; NMSettingWired *s_wired; - const char * autoneg_str; - const char * speed_str; - const char * interface; + const char *autoneg_str; + const char *speed_str; + const char *interface; int autoneg; guint speed; @@ -1251,11 +1278,11 @@ _normalize_conn(gpointer key, gpointer value, gpointer user_data) static void reader_add_nameservers(Reader *reader, GPtrArray *nameservers) { - NMConnection * connection; + NMConnection *connection; NMSettingIPConfig *s_ip; GHashTableIter iter; int addr_family; - const char * ns; + const char *ns; guint i; for (i = 0; i < nameservers->len; i++) { @@ -1316,21 +1343,22 @@ connection_set_needed_cb(gpointer key, gpointer value, gpointer user_data) } GHashTable * -nmi_cmdline_reader_parse(const char * sysfs_dir, +nmi_cmdline_reader_parse(const char *etc_connections_dir, + const char *sysfs_dir, const char *const *argv, - char ** hostname, - gint64 * carrier_timeout_sec) + char **hostname, + gint64 *carrier_timeout_sec) { - Reader * reader; - const char * tag; - gboolean ignore_bootif = FALSE; - gboolean neednet = FALSE; - gs_free char * bootif_val = NULL; - gs_free char * bootdev = NULL; - gboolean net_ifnames = TRUE; - gs_unref_ptrarray GPtrArray *nameservers = NULL; - gs_unref_ptrarray GPtrArray *routes = NULL; - gs_unref_ptrarray GPtrArray *znets = NULL; + Reader *reader; + const char *tag; + gboolean ignore_bootif = FALSE; + gboolean neednet = FALSE; + gs_free char *bootif_val = NULL; + gs_free char *bootdev = NULL; + gboolean net_ifnames = TRUE; + gs_unref_ptrarray GPtrArray *nameservers = NULL; + gs_unref_ptrarray GPtrArray *routes = NULL; + gs_unref_ptrarray GPtrArray *znets = NULL; int i; guint64 dhcp_timeout = 90; guint64 dhcp_num_tries = 1; @@ -1339,7 +1367,7 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, for (i = 0; argv[i]; i++) { gs_free char *argument_clone = NULL; - char * argument; + char *argument; argument_clone = g_strdup(argv[i]); argument = argument_clone; @@ -1375,8 +1403,8 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, for (i = 0; argv[i]; i++) { gs_free char *argument_clone = NULL; - char * argument; - char * word; + char *argument; + char *word; argument_clone = g_strdup(argv[i]); argument = argument_clone; @@ -1422,6 +1450,8 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, if (!znets) znets = g_ptr_array_new_with_free_func(g_free); g_ptr_array_add(znets, g_strdup(argument)); + } else if (nm_streq(tag, "rd.znet_ifname")) { + reader_parse_znet_ifname(reader, argument); } else if (g_ascii_strcasecmp(tag, "BOOTIF") == 0) { nm_clear_g_free(&bootif_val); bootif_val = g_strdup(argument); @@ -1430,7 +1460,7 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, } for (i = 0; i < reader->vlan_parents->len; i++) { - NMConnection * connection; + NMConnection *connection; NMSettingIPConfig *s_ip; /* Disable IP configuration for parent connections of VLANs, @@ -1459,9 +1489,9 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, if (ignore_bootif) nm_clear_g_free(&bootif_val); if (bootif_val) { - NMConnection * connection; + NMConnection *connection; NMSettingWired *s_wired; - const char * bootif = bootif_val; + const char *bootif = bootif_val; char prefix[4]; if (!nm_utils_hwaddr_valid(bootif, ETH_ALEN)) { @@ -1512,7 +1542,8 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, } if (neednet) { - if (g_hash_table_size(reader->hash) == 0) { + if (!(etc_connections_dir && g_file_test(etc_connections_dir, G_FILE_TEST_IS_DIR)) + && g_hash_table_size(reader->hash) == 0) { /* Make sure there's some connection. */ reader_get_default_connection(reader); } @@ -1531,6 +1562,10 @@ nmi_cmdline_reader_parse(const char * sysfs_dir, reader_parse_rd_znet(reader, znets->pdata[i], net_ifnames); } + if (g_hash_table_size(reader->znet_ifnames)) { + _LOGW(LOGD_CORE, "Mismatch between rd.znet_ifname and rd.znet"); + } + g_hash_table_foreach(reader->hash, _normalize_conn, NULL); NM_SET_OUT(hostname, g_steal_pointer(&reader->hostname)); diff --git a/src/nm-initrd-generator/nmi-dt-reader.c b/src/nm-initrd-generator/nmi-dt-reader.c index 99c149dc..8bd591a8 100644 --- a/src/nm-initrd-generator/nmi-dt-reader.c +++ b/src/nm-initrd-generator/nmi-dt-reader.c @@ -28,11 +28,11 @@ static gboolean dt_get_property(const char *base, const char *dev, const char *prop, - char ** contents, - size_t * length) + char **contents, + size_t *length) { - gs_free char *filename = g_build_filename(base, dev, prop, NULL); - gs_free_error GError *error = NULL; + gs_free char *filename = g_build_filename(base, dev, prop, NULL); + gs_free_error GError *error = NULL; if (!g_file_test(filename, G_FILE_TEST_EXISTS)) return FALSE; @@ -106,31 +106,31 @@ str_addr(const char *str, int *family) NMConnection * nmi_dt_reader_parse(const char *sysfs_dir) { - gs_unref_object NMConnection *connection = NULL; - gs_free char * base = NULL; - gs_free char * bootpath = NULL; - gs_strfreev char ** tokens = NULL; - char * path = NULL; - gboolean bootp = FALSE; - const char * s_ipaddr = NULL; - const char * s_netmask = NULL; - const char * s_gateway = NULL; + gs_unref_object NMConnection *connection = NULL; + gs_free char *base = NULL; + gs_free char *bootpath = NULL; + gs_strfreev char **tokens = NULL; + char *path = NULL; + gboolean bootp = FALSE; + const char *s_ipaddr = NULL; + const char *s_netmask = NULL; + const char *s_gateway = NULL; nm_auto_unref_ip_address NMIPAddress *ipaddr = NULL; nm_auto_unref_ip_address NMIPAddress *gateway = NULL; - const char * duplex = NULL; - gs_free char * hwaddr = NULL; - gs_free char * local_hwaddr = NULL; - gs_free char * hostname = NULL; + const char *duplex = NULL; + gs_free char *hwaddr = NULL; + gs_free char *local_hwaddr = NULL; + gs_free char *hostname = NULL; guint32 speed = 0; int prefix = -1; - NMSettingIPConfig * s_ip = NULL; - NMSetting * s_ip4 = NULL; - NMSetting * s_ip6 = NULL; - NMSetting * s_wired = NULL; + NMSettingIPConfig *s_ip = NULL; + NMSetting *s_ip4 = NULL; + NMSetting *s_ip6 = NULL; + NMSetting *s_wired = NULL; int family = AF_UNSPEC; int i = 0; - char * c; - gs_free_error GError *error = NULL; + char *c; + gs_free_error GError *error = NULL; base = g_build_filename(sysfs_dir, "firmware", "devicetree", "base", NULL); diff --git a/src/nm-initrd-generator/nmi-ibft-reader.c b/src/nm-initrd-generator/nmi-ibft-reader.c index b3db3f01..196bb141 100644 --- a/src/nm-initrd-generator/nmi-ibft-reader.c +++ b/src/nm-initrd-generator/nmi-ibft-reader.c @@ -36,12 +36,12 @@ static GHashTable * load_one_nic(const char *sysfs_dir, const char *dir_name) { - gs_free char *nic_path = g_build_filename(sysfs_dir, dir_name, NULL); - GDir * nic_dir; - const char * entry_name; - char * content; + gs_free char *nic_path = g_build_filename(sysfs_dir, dir_name, NULL); + GDir *nic_dir; + const char *entry_name; + char *content; gs_free_error GError *error = NULL; - GHashTable * nic; + GHashTable *nic; g_return_val_if_fail(sysfs_dir != NULL, FALSE); @@ -77,11 +77,11 @@ load_one_nic(const char *sysfs_dir, const char *dir_name) GHashTable * nmi_ibft_read(const char *sysfs_dir) { - gs_free char *ibft_path = NULL; - GDir * ibft_dir; - const char * dir_name; - GHashTable * ibft, *nic; - char * mac; + gs_free char *ibft_path = NULL; + GDir *ibft_dir; + const char *dir_name; + GHashTable *ibft, *nic; + char *mac; gs_free_error GError *error = NULL; g_return_val_if_fail(sysfs_dir != NULL, FALSE); @@ -133,14 +133,14 @@ ip_setting_add_from_block(GHashTable *nic, NMConnection *connection, GError **er NMSettingIPConfig *s_ip = NULL; NMSettingIPConfig *s_ip4 = NULL; NMSettingIPConfig *s_ip6 = NULL; - NMIPAddress * addr; - const char * s_ipaddr = NULL; - const char * s_prefix = NULL; - const char * s_gateway = NULL; - const char * s_dns1 = NULL; - const char * s_dns2 = NULL; - const char * s_origin = NULL; - const char * method = NULL; + NMIPAddress *addr; + const char *s_ipaddr = NULL; + const char *s_prefix = NULL; + const char *s_gateway = NULL; + const char *s_dns1 = NULL; + const char *s_dns2 = NULL; + const char *s_origin = NULL; + const char *method = NULL; int family; gint64 prefix; @@ -276,14 +276,14 @@ ip_setting_add_from_block(GHashTable *nic, NMConnection *connection, GError **er } static gboolean -connection_setting_add(GHashTable * nic, +connection_setting_add(GHashTable *nic, NMConnection *connection, - const char * type, - const char * prefix, - GError ** error) + const char *type, + const char *prefix, + GError **error) { - NMSetting * s_con; - char * id, *uuid; + NMSetting *s_con; + char *id, *uuid; const char *s_index, *s_hwaddr, *s_ipaddr, *s_vlanid; s_index = (const char *) g_hash_table_lookup(nic, "index"); @@ -359,7 +359,7 @@ is_ibft_vlan_device(GHashTable *nic) static gboolean vlan_setting_add_from_block(GHashTable *nic, NMConnection *connection, GError **error) { - NMSetting * s_vlan = NULL; + NMSetting *s_vlan = NULL; const char *vlan_id_str = NULL; gint64 vlan_id = -1; @@ -397,7 +397,7 @@ vlan_setting_add_from_block(GHashTable *nic, NMConnection *connection, GError ** static gboolean wired_setting_add_from_block(GHashTable *nic, NMConnection *connection, GError **error) { - NMSetting * s_wired = NULL; + NMSetting *s_wired = NULL; const char *hwaddr = NULL; g_assert(nic); diff --git a/src/nm-initrd-generator/tests/test-cmdline-reader.c b/src/nm-initrd-generator/tests/test-cmdline-reader.c index 2cb1b2f4..d7b7b3cb 100644 --- a/src/nm-initrd-generator/tests/test-cmdline-reader.c +++ b/src/nm-initrd-generator/tests/test-cmdline-reader.c @@ -27,9 +27,10 @@ const char *const *const _ARGV = (ARGV); \ char **const _out_hostname = (out_hostname); \ gint64 *const _out_carrier_timeout_sec = (out_carrier_timeout_sec); \ - GHashTable * _connections; \ + GHashTable *_connections; \ \ - _connections = nmi_cmdline_reader_parse(TEST_INITRD_DIR "/sysfs", \ + _connections = nmi_cmdline_reader_parse(NULL, \ + TEST_INITRD_DIR "/sysfs", \ _ARGV, \ _out_hostname, \ _out_carrier_timeout_sec); \ @@ -41,7 +42,7 @@ #define _parse_cons(ARGV) \ ({ \ - GHashTable * _con_connections; \ + GHashTable *_con_connections; \ gs_free char *_con_hostname = NULL; \ gint64 _con_carrier_timeout_sec = 0; \ \ @@ -57,7 +58,7 @@ #define _parse_con(ARGV, connection_name) \ ({ \ gs_unref_hashtable GHashTable *_1_connections = NULL; \ - NMConnection * _1_connection; \ + NMConnection *_1_connection; \ const char *const _1_connection_name = (connection_name); \ \ g_assert(_1_connection_name); \ @@ -89,12 +90,12 @@ static void test_auto(void) { - const char *const *ARGV = NM_MAKE_STRV("ip=auto"); + const char *const *ARGV = NM_MAKE_STRV("ip=auto"); gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "default_connection"); @@ -140,13 +141,13 @@ static void test_dhcp_with_hostname(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("ip=::::host1::dhcp,dhcp6"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - gs_free char * hostname = NULL; + const char *const *ARGV = NM_MAKE_STRV("ip=::::host1::dhcp,dhcp6"); + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -198,10 +199,10 @@ test_dhcp_with_mtu(void) for (i = 0; i < G_N_ELEMENTS(ARGV); i++) { gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV[i], "default_connection"); @@ -259,9 +260,9 @@ test_dhcp_timeout(void) for (i = 0; i < G_N_ELEMENTS(data); i++) { gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(data[i].cmdline, "default_connection"); @@ -300,12 +301,12 @@ test_dhcp_timeout(void) static void test_if_auto_with_mtu(void) { - const char *const *ARGV = NM_MAKE_STRV("ip=eth0:dhcp,dhcp6:1666", "="); + const char *const *ARGV = NM_MAKE_STRV("ip=eth0:dhcp,dhcp6:1666", "="); gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "eth0"); @@ -340,10 +341,10 @@ test_if_auto_with_mtu(void) static void test_if_dhcp6(void) { - const char *const *ARGV = NM_MAKE_STRV("ip=eth1:dhcp6"); + const char *const *ARGV = NM_MAKE_STRV("ip=eth1:dhcp6"); gs_unref_object NMConnection *connection = NULL; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "eth1"); @@ -365,11 +366,11 @@ test_if_dhcp6(void) static void test_if_auto_with_mtu_and_mac(void) { - const char *const *ARGV = NM_MAKE_STRV("ip=eth2:auto6:2048:00:53:ef:12:34:56"); + const char *const *ARGV = NM_MAKE_STRV("ip=eth2:auto6:2048:00:53:ef:12:34:56"); gs_unref_object NMConnection *connection = NULL; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "eth2"); @@ -397,16 +398,16 @@ static void test_if_ip4_manual(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("ip=192.0.2.2::192.0.2.1:255.255.255.0:" - "hostname0.example.com:eth3:none:192.0.2.53", + const char *const *ARGV = NM_MAKE_STRV("ip=192.0.2.2::192.0.2.1:255.255.255.0:" + "hostname0.example.com:eth3:none:192.0.2.53", "ip=203.0.113.2::203.0.113.1:26:" - "hostname1.example.com:eth4"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMIPAddress * ip_addr; - gs_free char * hostname = NULL; + "hostname1.example.com:eth4"); + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMIPAddress *ip_addr; + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -477,12 +478,12 @@ test_if_ip4_manual(void) static void test_if_ip4_manual_no_dev(void) { - const char *const * ARGV = NM_MAKE_STRV("ip=192.0.2.2::192.0.2.1:24:::", "=foo"); - NMConnection * connection; + const char *const *ARGV = NM_MAKE_STRV("ip=192.0.2.2::192.0.2.1:24:::", "=foo"); + NMConnection *connection; NMSettingConnection *s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMIPAddress * ip_addr; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMIPAddress *ip_addr; connection = _parse_con(ARGV, "default_connection"); g_assert_cmpstr(nm_connection_get_id(connection), ==, "Wired Connection"); @@ -518,12 +519,12 @@ static void test_if_ip6_manual(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("ip=[2001:0db8::02]/64::[2001:0db8::01]::" - "hostname0.example.com:eth4::[2001:0db8::53]"); - NMConnection * connection; - NMSettingIPConfig * s_ip6; - NMIPAddress * ip_addr; - gs_free char * hostname = NULL; + const char *const *ARGV = NM_MAKE_STRV("ip=[2001:0db8::02]/64::[2001:0db8::01]::" + "hostname0.example.com:eth4::[2001:0db8::53]"); + NMConnection *connection; + NMSettingIPConfig *s_ip6; + NMIPAddress *ip_addr; + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -557,13 +558,13 @@ static void test_if_off(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("ip=off", + const char *const *ARGV = NM_MAKE_STRV("ip=off", "ip=ens3:off", "ip=10.0.0.8:::::ens4:off", "ip=[2001:DB8::8]:::::ens5:off"); - NMConnection * connection; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMConnection *connection; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; struct { const char name[32]; const char ipv4_method[32]; @@ -599,13 +600,13 @@ static void test_if_mac_ifname(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("ip=[2001:0db8::42]/64::[2001:0db8::01]::" - "hostname0:00-11-22-33-44-55::[2001:0db8::53]"); - NMConnection * connection; - NMSettingIPConfig * s_ip6; - NMSettingWired * s_wired; - NMIPAddress * ip_addr; - gs_free char * hostname = NULL; + const char *const *ARGV = NM_MAKE_STRV("ip=[2001:0db8::42]/64::[2001:0db8::01]::" + "hostname0:00-11-22-33-44-55::[2001:0db8::53]"); + NMConnection *connection; + NMSettingIPConfig *s_ip6; + NMSettingWired *s_wired; + NMIPAddress *ip_addr; + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -646,11 +647,11 @@ test_multiple_merge(void) const char *const *ARGV = NM_MAKE_STRV("ip=192.0.2.2/16:::::eth0", "ip=[2001:db8::2]:::56::eth0"); gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMIPAddress * ip_addr; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMIPAddress *ip_addr; connection = _parse_con(ARGV, "eth0"); @@ -699,10 +700,10 @@ test_multiple_bootdev(void) "ip=eth5:link6", "bootdev=eth4"); - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 3); @@ -745,9 +746,9 @@ static void test_bootdev(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("vlan=vlan2:ens5", "bootdev=ens3"); - NMConnection * connection; - NMSettingConnection * s_con; + const char *const *ARGV = NM_MAKE_STRV("vlan=vlan2:ens5", "bootdev=ens3"); + NMConnection *connection; + NMSettingConnection *s_con; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 3); @@ -793,7 +794,7 @@ static void test_some_more(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("bootdev=eth1", + const char *const *ARGV = NM_MAKE_STRV("bootdev=eth1", "hail", "nameserver=[2001:DB8:3::53]", "satan", @@ -802,12 +803,12 @@ test_some_more(void) "doom", "rd.peerdns=0", "rd.route=[2001:DB8:3::/48]:[2001:DB8:2::1]:ens10"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMIPRoute * ip_route; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMIPRoute *ip_route; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -883,17 +884,17 @@ static void test_bond(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("rd.route=192.0.2.53::bong0", + const char *const *ARGV = NM_MAKE_STRV("rd.route=192.0.2.53::bong0", "bond=bong0:eth0,eth1:mode=balance-rr:9000", "nameserver=203.0.113.53"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingBond * s_bond; - NMSettingWired * s_wired; - NMIPRoute * ip_route; - const char * master_uuid; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingBond *s_bond; + NMSettingWired *s_wired; + NMIPRoute *ip_route; + const char *master_uuid; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 3); @@ -976,18 +977,18 @@ static void test_bond_ip(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = + const char *const *ARGV = NM_MAKE_STRV("bond=bond0:eth0,eth1", "ip=192.168.1.1::192.168.1.254:24::bond0:none:1480:01:02:03:04:05:06", "nameserver=4.8.15.16"); - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingWired * s_wired; - NMSettingBond * s_bond; - NMIPAddress * ip_addr; - const char * master_uuid; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingWired *s_wired; + NMSettingBond *s_bond; + NMIPAddress *ip_addr; + const char *master_uuid; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 3); @@ -1073,13 +1074,13 @@ static void test_bond_default(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("bond"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingBond * s_bond; - const char * master_uuid; + const char *const *ARGV = NM_MAKE_STRV("bond"); + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingBond *s_bond; + const char *master_uuid; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -1136,16 +1137,16 @@ static void test_bridge(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("bridge=bridge0:eth0,eth1", + const char *const *ARGV = NM_MAKE_STRV("bridge=bridge0:eth0,eth1", "rd.route=192.0.2.53::bridge0", "rd.net.timeout.dhcp=10"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingBridge * s_bridge; - NMIPRoute * ip_route; - const char * master_uuid; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingBridge *s_bridge; + NMIPRoute *ip_route; + const char *master_uuid; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 3); @@ -1232,13 +1233,13 @@ static void test_bridge_default(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("bridge"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingBridge * s_bridge; - const char * master_uuid; + const char *const *ARGV = NM_MAKE_STRV("bridge"); + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingBridge *s_bridge; + const char *master_uuid; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -1295,16 +1296,16 @@ static void test_bridge_ip(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = + const char *const *ARGV = NM_MAKE_STRV("ip=bridge123:auto:1280:00:11:22:33:CA:fe", "bridge=bridge123:eth0,eth1,eth2,eth3,eth4,eth5,eth6,eth7,eth8,eth9"); - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingWired * s_wired; - NMSettingBridge * s_bridge; - const char * master_uuid; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingWired *s_wired; + NMSettingBridge *s_bridge; + const char *master_uuid; guint i; connections = _parse_cons(ARGV); @@ -1364,13 +1365,13 @@ static void test_team(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("team=team0:eth0,eth1", "ip=team0:dhcp6"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingTeam * s_team; - const char * master_uuid; + const char *const *ARGV = NM_MAKE_STRV("team=team0:eth0,eth1", "ip=team0:dhcp6"); + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingTeam *s_team; + const char *master_uuid; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 3); @@ -1448,10 +1449,10 @@ test_vlan(void) for (i = 0; i < G_N_ELEMENTS(ARGV); i++) { gs_unref_hashtable GHashTable *connections = NULL; - NMConnection * connection; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingVlan * s_vlan; + NMConnection *connection; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingVlan *s_vlan; connections = _parse_cons(ARGV[i]); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -1513,10 +1514,10 @@ test_vlan_with_dhcp_on_parent(void) for (i = 0; i < G_N_ELEMENTS(ARGV); i++) { gs_unref_hashtable GHashTable *connections = NULL; - NMConnection * connection; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingVlan * s_vlan; + NMConnection *connection; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingVlan *s_vlan; connections = _parse_cons(ARGV[i]); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -1585,10 +1586,10 @@ test_vlan_over_bond(void) for (i = 0; i < G_N_ELEMENTS(ARGV); i++) { gs_unref_hashtable GHashTable *connections = NULL; - NMConnection * connection; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMSettingVlan * s_vlan; + NMConnection *connection; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMSettingVlan *s_vlan; connections = _parse_cons(ARGV[i]); g_assert_cmpint(g_hash_table_size(connections), ==, 4); @@ -1649,8 +1650,8 @@ test_vlan_over_bond(void) static void test_ibft_ip_dev(void) { - const char *const * ARGV = NM_MAKE_STRV("ip=eth0:ibft"); - NMSettingConnection *s_con; + const char *const *ARGV = NM_MAKE_STRV("ip=eth0:ibft"); + NMSettingConnection *s_con; gs_unref_object NMConnection *connection = NULL; connection = _parse_con(ARGV, "eth0"); @@ -1666,8 +1667,8 @@ test_ibft_ip_dev(void) static void test_ibft_ip_dev_mac(void) { - const char *const * ARGV = NM_MAKE_STRV("ip=00-53-06-66-ab-01:ibft"); - NMSettingConnection *s_con; + const char *const *ARGV = NM_MAKE_STRV("ip=00-53-06-66-ab-01:ibft"); + NMSettingConnection *s_con; gs_unref_object NMConnection *connection = NULL; connection = _parse_con(ARGV, "00:53:06:66:AB:01"); @@ -1684,7 +1685,7 @@ static void _test_ibft_ip(const char *const *ARGV) { gs_unref_hashtable GHashTable *connections = NULL; - NMConnection * connection; + NMConnection *connection; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -1721,7 +1722,7 @@ static void test_ignore_extra(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("blabla", "extra", "lalala"); + const char *const *ARGV = NM_MAKE_STRV("blabla", "extra", "lalala"); connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 0); @@ -1736,10 +1737,10 @@ test_rd_znet(void) "ip=slc600:dhcp", "rd.znet=qeth,0.0.0800,0.0.0801,0.0.0802,layer2=0,portno=1", "rd.znet=ctc,0.0.0600,0.0.0601,layer2=0,portno=0"); - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingWired * s_wired; - const char *const * v_subchannels; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + const char *const *v_subchannels; const NMUtilsNamedValue s390_options[] = { {.name = "layer2", .value_str = "0"}, {.name = "portno", .value_str = "1"}, @@ -1778,9 +1779,9 @@ test_rd_znet(void) for (i_s390_options_keys = 0; i_s390_options_keys < G_N_ELEMENTS(s390_options); i_s390_options_keys++) { const NMUtilsNamedValue *s390_option = &s390_options[i_s390_options_keys]; - const char * k; - const char * v; - const char * v2; + const char *k; + const char *v; + const char *v2; g_assert(s390_option->name); g_assert(s390_option->value_str); @@ -1830,9 +1831,9 @@ test_rd_znet_legacy(void) "rd.znet=ctc,0.0.0600,0.0.0601,layer2=0,portno=0", "ip=ctc0:dhcp", "net.ifnames=0"); - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - gs_free char * hostname = NULL; + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -1896,14 +1897,83 @@ test_rd_znet_malformed(void) } } +static void +test_rd_znet_ifnames(void) +{ + gs_unref_hashtable GHashTable *connections = NULL; + const char *const *const ARGV = + NM_MAKE_STRV("rd.znet_ifname=zeth1:0.0.0600,0.0.0601", + "rd.znet=qeth,0.0.0800,0.0.0801,0.0.0802,layer2=0,portno=1,foo", + "rd.znet=ctc,0.0.0600,0.0.0601", + "rd.znet_ifname=zeth0:0.0.0800,0.0.0801,0.0.0802", + "ip=zeth0:dhcp", + "ip=zeth1:dhcp"); + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + gs_free char *hostname = NULL; + gint64 carrier_timeout_sec = 0; + const char *const *v_subchannels; + + connections = _parse(ARGV, &hostname, &carrier_timeout_sec); + g_assert_cmpint(g_hash_table_size(connections), ==, 2); + + connection = g_hash_table_lookup(connections, "zeth0"); + g_assert(NM_IS_CONNECTION(connection)); + + s_con = nm_connection_get_setting_connection(connection); + g_assert(NM_IS_SETTING_CONNECTION(s_con)); + g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con), + ==, + NM_SETTING_WIRED_SETTING_NAME); + g_assert_cmpstr(nm_setting_connection_get_id(s_con), ==, "zeth0"); + g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, "zeth0"); + + s_wired = nm_connection_get_setting_wired(connection); + g_assert_cmpstr(nm_setting_wired_get_s390_nettype(s_wired), ==, "qeth"); + g_assert(s_wired); + + v_subchannels = nm_setting_wired_get_s390_subchannels(s_wired); + g_assert(v_subchannels); + g_assert_cmpstr(v_subchannels[0], ==, "0.0.0800"); + g_assert_cmpstr(v_subchannels[1], ==, "0.0.0801"); + g_assert_cmpstr(v_subchannels[2], ==, "0.0.0802"); + g_assert_cmpstr(v_subchannels[3], ==, NULL); + + nmtst_assert_connection_verifies_without_normalization(connection); + + connection = g_hash_table_lookup(connections, "zeth1"); + g_assert(NM_IS_CONNECTION(connection)); + + s_con = nm_connection_get_setting_connection(connection); + g_assert(NM_IS_SETTING_CONNECTION(s_con)); + g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con), + ==, + NM_SETTING_WIRED_SETTING_NAME); + g_assert_cmpstr(nm_setting_connection_get_id(s_con), ==, "zeth1"); + g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, "zeth1"); + + s_wired = nm_connection_get_setting_wired(connection); + g_assert_cmpstr(nm_setting_wired_get_s390_nettype(s_wired), ==, "ctc"); + g_assert(s_wired); + + v_subchannels = nm_setting_wired_get_s390_subchannels(s_wired); + g_assert(v_subchannels); + g_assert_cmpstr(v_subchannels[0], ==, "0.0.0600"); + g_assert_cmpstr(v_subchannels[1], ==, "0.0.0601"); + g_assert_cmpstr(v_subchannels[2], ==, NULL); + + nmtst_assert_connection_verifies_without_normalization(connection); +} + static void test_bootif_ip(void) { - const char *const *ARGV = NM_MAKE_STRV("BOOTIF=00:53:AB:cd:02:03", "ip=dhcp"); + const char *const *ARGV = NM_MAKE_STRV("BOOTIF=00:53:AB:cd:02:03", "ip=dhcp"); gs_unref_object NMConnection *connection = NULL; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "default_connection"); @@ -1928,11 +1998,11 @@ test_bootif_ip(void) static void test_neednet_no_args(void) { - const char *const *ARGV = NM_MAKE_STRV("rd.neednet"); + const char *const *ARGV = NM_MAKE_STRV("rd.neednet"); gs_unref_object NMConnection *connection = NULL; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "default_connection"); @@ -1960,12 +2030,12 @@ static void test_neednet_args(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("rd.neednet", + const char *const *ARGV = NM_MAKE_STRV("rd.neednet", "ip=eno1:dhcp", "ip=172.25.1.100::172.25.1.1:24::eno2", "bridge=br0:eno3"); - NMConnection * connection; - NMSettingConnection * s_con; + NMConnection *connection; + NMSettingConnection *s_con; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 4); @@ -2008,11 +2078,11 @@ test_neednet_args(void) static void test_bootif_no_ip(void) { - const char *const *ARGV = NM_MAKE_STRV("BOOTIF=00:53:AB:cd:02:03"); + const char *const *ARGV = NM_MAKE_STRV("BOOTIF=00:53:AB:cd:02:03"); gs_unref_object NMConnection *connection = NULL; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connection = _parse_con(ARGV, "default_connection"); @@ -2043,10 +2113,10 @@ test_bootif_hwtype(void) for (i = 0; i < G_N_ELEMENTS(ARGV); i++) { gs_unref_hashtable GHashTable *connections = NULL; - NMConnection * connection; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMConnection *connection; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connections = _parse_cons(ARGV[i]); g_assert_cmpint(g_hash_table_size(connections), ==, 2); @@ -2108,16 +2178,16 @@ static void test_nameserver(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = + const char *const *ARGV = NM_MAKE_STRV("nameserver=1.1.1.1", "ip=eth0:dhcp", "ip=eth1:auto6", "ip=10.11.12.13::10.11.12.1:24:foo.example.com:eth2:none", "nameserver=1.0.0.1", "nameserver=[2606:4700:4700::1111]"); - NMConnection * connection; + NMConnection *connection; NMSettingIPConfig *s_ip; - gs_free char * hostname = NULL; + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -2165,10 +2235,10 @@ test_bootif_off(void) static void test_dhcp_vendor_class_id(void) { - const char *const *ARGV; + const char *const *ARGV; gs_unref_object NMConnection *connection = NULL; - NMSettingIP4Config * s_ip4; - gs_free char * vci_long = NULL; + NMSettingIP4Config *s_ip4; + gs_free char *vci_long = NULL; char vci_arg_long[512] = {0}; ARGV = NM_MAKE_STRV("rd.net.dhcp.vendor-class=testvci", "ip=eno1:dhcp"); @@ -2196,9 +2266,9 @@ test_dhcp_vendor_class_id(void) static void test_infiniband_iface(void) { - const char *const *ARGV = NM_MAKE_STRV("ip=ib1:dhcp"); + const char *const *ARGV = NM_MAKE_STRV("ip=ib1:dhcp"); gs_unref_object NMConnection *connection = NULL; - NMSettingInfiniband * s_ib; + NMSettingInfiniband *s_ib; connection = _parse_con(ARGV, "ib1"); @@ -2215,7 +2285,7 @@ test_infiniband_mac(void) const char *const *ARGV = NM_MAKE_STRV("ip=00-11-22-33-44-55-66-77-88-99-aa-bb-cc-dd-ee-ff-00-11-22-33:dhcp"); gs_unref_object NMConnection *connection = NULL; - NMSettingInfiniband * s_ib; + NMSettingInfiniband *s_ib; connection = _parse_con(ARGV, "00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33"); @@ -2233,12 +2303,12 @@ test_infiniband_mac(void) static void test_infiniband_pkey(void) { - const char *const *const ARGV = NM_MAKE_STRV("ib.pkey=ib0.8004", "ip=ib0.8004:dhcp"); + const char *const *const ARGV = NM_MAKE_STRV("ib.pkey=ib0.8004", "ip=ib0.8004:dhcp"); gs_unref_hashtable GHashTable *connections = NULL; - NMConnection * connection; - NMSettingInfiniband * s_ib; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; + NMConnection *connection; + NMSettingInfiniband *s_ib; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; connections = _parse_cons(ARGV); g_assert_cmpint(g_hash_table_size(connections), ==, 1); @@ -2268,8 +2338,8 @@ static void test_carrier_timeout(void) { gs_unref_hashtable GHashTable *connections = NULL; - const char *const * ARGV = NM_MAKE_STRV("rd.net.timeout.carrier=20"); - gs_free char * hostname = NULL; + const char *const *ARGV = NM_MAKE_STRV("rd.net.timeout.carrier=20"); + gs_free char *hostname = NULL; gint64 carrier_timeout_sec = 0; connections = _parse(ARGV, &hostname, &carrier_timeout_sec); @@ -2295,7 +2365,7 @@ test_carrier_timeout(void) G_STMT_START \ { \ gs_unref_object NMConnection *_connection = NULL; \ - NMSettingWired * _s_wired; \ + NMSettingWired *_s_wired; \ typeof(speed) _speed = speed; \ \ _connection = _parse_con(strv, "eth0"); \ @@ -2482,6 +2552,7 @@ main(int argc, char **argv) g_test_add_func("/initrd/cmdline/rd_znet/legacy", test_rd_znet_legacy); g_test_add_func("/initrd/cmdline/rd_znet/no_ip", test_rd_znet_no_ip); g_test_add_func("/initrd/cmdline/rd_znet/empty", test_rd_znet_malformed); + g_test_add_func("/initrd/cmdline/rd_znet/ifnames", test_rd_znet_ifnames); g_test_add_func("/initrd/cmdline/bootif/ip", test_bootif_ip); g_test_add_func("/initrd/cmdline/bootif/no_ip", test_bootif_no_ip); g_test_add_func("/initrd/cmdline/bootif/hwtype", test_bootif_hwtype); diff --git a/src/nm-initrd-generator/tests/test-dt-reader.c b/src/nm-initrd-generator/tests/test-dt-reader.c index c1c28e06..e194646d 100644 --- a/src/nm-initrd-generator/tests/test-dt-reader.c +++ b/src/nm-initrd-generator/tests/test-dt-reader.c @@ -25,12 +25,12 @@ static void test_read_dt_ofw(void) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - const char * mac_address; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + const char *mac_address; connection = nmi_dt_reader_parse(TEST_INITRD_DIR "/sysfs-dt"); g_assert(connection); @@ -69,12 +69,12 @@ test_read_dt_ofw(void) static void test_read_dt_slof(void) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - NMIPAddress * ip4_addr; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + NMIPAddress *ip4_addr; connection = nmi_dt_reader_parse(TEST_INITRD_DIR "/sysfs-dt-tftp"); g_assert(connection); diff --git a/src/nm-initrd-generator/tests/test-ibft-reader.c b/src/nm-initrd-generator/tests/test-ibft-reader.c index 0d437519..55925a9a 100644 --- a/src/nm-initrd-generator/tests/test-ibft-reader.c +++ b/src/nm-initrd-generator/tests/test-ibft-reader.c @@ -25,10 +25,10 @@ static NMConnection * read_connection(const char *sysfs_dir, const char *expected_mac, GError **error) { - NMConnection * connection = NULL; - gs_unref_hashtable GHashTable *ibft = NULL; - gs_free char * mac = NULL; - GHashTable * nic = NULL; + NMConnection *connection = NULL; + gs_unref_hashtable GHashTable *ibft = NULL; + gs_free char *mac = NULL; + GHashTable *nic = NULL; ibft = nmi_ibft_read(sysfs_dir); @@ -48,14 +48,14 @@ read_connection(const char *sysfs_dir, const char *expected_mac, GError **error) static void test_read_ibft_dhcp(void) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - GError * error = NULL; - const char * mac_address; - const char * expected_mac_address = "00:33:21:98:b9:f1"; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + GError *error = NULL; + const char *mac_address; + const char *expected_mac_address = "00:33:21:98:b9:f1"; connection = read_connection(TEST_INITRD_DIR "/sysfs-dhcp", expected_mac_address, &error); g_assert_no_error(error); @@ -96,15 +96,15 @@ test_read_ibft_dhcp(void) static void test_read_ibft_static(void) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingWired * s_wired; - NMSettingIPConfig * s_ip4; - NMSettingIPConfig * s_ip6; - GError * error = NULL; - const char * mac_address; - const char * expected_mac_address = "00:33:21:98:b9:f0"; - NMIPAddress * ip4_addr; + NMSettingWired *s_wired; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + GError *error = NULL; + const char *mac_address; + const char *expected_mac_address = "00:33:21:98:b9:f0"; + NMIPAddress *ip4_addr; connection = read_connection(TEST_INITRD_DIR "/sysfs-static", expected_mac_address, &error); g_assert_no_error(error); @@ -159,9 +159,9 @@ test_read_ibft_static(void) static void test_read_ibft_bad_address(gconstpointer user_data) { - const char * sysfs_dir = user_data; + const char *sysfs_dir = user_data; NMConnection *connection; - GError * error = NULL; + GError *error = NULL; g_assert(g_file_test(sysfs_dir, G_FILE_TEST_EXISTS)); @@ -174,15 +174,15 @@ test_read_ibft_bad_address(gconstpointer user_data) static void test_read_ibft_vlan(void) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSettingWired * s_wired; - NMSettingVlan * s_vlan; - NMSettingIPConfig * s_ip4; - const char * mac_address; - const char * expected_mac_address = "00:33:21:98:b9:f0"; - NMIPAddress * ip4_addr; - GError * error = NULL; + NMSettingWired *s_wired; + NMSettingVlan *s_vlan; + NMSettingIPConfig *s_ip4; + const char *mac_address; + const char *expected_mac_address = "00:33:21:98:b9:f0"; + NMIPAddress *ip4_addr; + GError *error = NULL; connection = read_connection(TEST_INITRD_DIR "/sysfs-vlan", expected_mac_address, &error); g_assert_no_error(error); @@ -231,10 +231,10 @@ test_read_ibft_vlan(void) static void test_read_ibft(void) { - NMConnection * connection; + NMConnection *connection; NMSettingIPConfig *s_ip4; NMSettingIPConfig *s_ip6; - GError * error = NULL; + GError *error = NULL; /* This test doesn't actually test too much (apart from the presence of * IPv6 that is not covered by other tests), but the test fixture is a good diff --git a/src/nm-online/nm-online.c b/src/nm-online/nm-online.c index 6c807a60..340c2d19 100644 --- a/src/nm-online/nm-online.c +++ b/src/nm-online/nm-online.c @@ -34,8 +34,8 @@ #define EXIT_FAILURE_UNSPECIFIED 43 typedef struct { - GMainLoop * loop; - NMClient * client; + GMainLoop *loop; + NMClient *client; GCancellable *client_new_cancellable; guint client_new_timeout_id; guint handle_timeout_id; @@ -139,7 +139,7 @@ client_properties_changed(GObject *object, GParamSpec *pspec, gpointer user_data static gboolean handle_timeout(gpointer user_data) { - OnlineData * data = user_data; + OnlineData *data = user_data; const gint64 now = _now_ms(); gint64 remaining_ms = data->end_timestamp_ms - now; const gint64 elapsed_ms = now - data->start_timestamp_ms; @@ -194,7 +194,7 @@ got_client_timeout(gpointer user_data) static void got_client(GObject *source_object, GAsyncResult *res, gpointer user_data) { - OnlineData * data = user_data; + OnlineData *data = user_data; gs_free_error GError *error = NULL; nm_assert(NM_IS_CLIENT(source_object)); diff --git a/src/nm-priv-helper/nm-priv-helper.c b/src/nm-priv-helper/nm-priv-helper.c index 76ca0cab..ec064bca 100644 --- a/src/nm-priv-helper/nm-priv-helper.c +++ b/src/nm-priv-helper/nm-priv-helper.c @@ -38,7 +38,7 @@ typedef struct { struct _GlobalData { GDBusConnection *dbus_connection; - GCancellable * quit_cancellable; + GCancellable *quit_cancellable; GSource *source_sigterm; @@ -112,9 +112,9 @@ _handle_ping(GlobalData *gl, GDBusMethodInvocation *invocation, const char *arg) static void _handle_get_fd(GlobalData *gl, GDBusMethodInvocation *invocation, guint32 fd_type) { - nm_auto_close int fd = -1; + nm_auto_close int fd = -1; gs_unref_object GUnixFDList *fd_list = NULL; - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; if (fd_type != (NMPrivHelperGetFDType) fd_type) fd_type = NM_PRIV_HELPER_GET_FD_TYPE_NONE; @@ -151,7 +151,7 @@ _signal_callback_term(gpointer user_data) static GDBusConnection * _bus_get(GCancellable *cancellable, int *out_exit_code) { - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; gs_unref_object GDBusConnection *dbus_connection = NULL; dbus_connection = nm_g_bus_get_blocking(cancellable, &error); @@ -178,11 +178,11 @@ _bus_get(GCancellable *cancellable, int *out_exit_code) static void _name_owner_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { GlobalData *gl = user_data; @@ -207,7 +207,7 @@ _name_owner_changed_cb(GDBusConnection *connection, typedef struct { GlobalData *gl; - char ** p_name_owner; + char **p_name_owner; gboolean is_cancelled; } BusFindNMNameOwnerData; @@ -226,7 +226,7 @@ _bus_find_nm_nameowner(GlobalData *gl) { BusFindNMNameOwnerData data; guint name_owner_changed_id; - gs_free char * name_owner = NULL; + gs_free char *name_owner = NULL; name_owner_changed_id = nm_dbus_connection_signal_subscribe_name_owner_changed(gl->dbus_connection, @@ -262,12 +262,12 @@ _bus_find_nm_nameowner(GlobalData *gl) /*****************************************************************************/ static void -_bus_method_call(GDBusConnection * connection, - const char * sender, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_bus_method_call(GDBusConnection *connection, + const char *sender, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { @@ -351,9 +351,9 @@ _bus_register_service(GlobalData *gl) static const GDBusInterfaceVTable interface_vtable = { .method_call = _bus_method_call, }; - gs_free_error GError * error = NULL; + gs_free_error GError *error = NULL; NMDBusConnectionCallBlockingData data = { - .result = NULL, + .result = NULL, }; gs_unref_variant GVariant *ret = NULL; guint32 ret_val; @@ -455,7 +455,7 @@ static gboolean _pending_job_register_object_release_on_idle_cb(gpointer data) { PendingJobData *idle_data = data; - GlobalData * gl = idle_data->gl; + GlobalData *gl = idle_data->gl; c_list_unlink_stale(&idle_data->pending_jobs_lst); nm_g_slice_free(idle_data); @@ -498,7 +498,7 @@ static void _bus_release_name_cb(GObject *source, GAsyncResult *result, gpointer user_data) { _nm_unused gs_unref_object GObject *keep_alive_object = NULL; - GlobalData * gl; + GlobalData *gl; nm_utils_user_data_unpack(user_data, &gl, &keep_alive_object); diff --git a/src/nmcli/agent.c b/src/nmcli/agent.c index bdbd6e45..6d0fcfb5 100644 --- a/src/nmcli/agent.c +++ b/src/nmcli/agent.c @@ -56,7 +56,8 @@ usage_agent_all(void) static char *pre_input_deftext; -static int set_deftext(_NMC_RL_STARTUPHOOK_ARGS) +static int +set_deftext(_NMC_RL_STARTUPHOOK_ARGS) { if (pre_input_deftext && rl_startup_hook) { rl_insert_text(pre_input_deftext); @@ -68,16 +69,16 @@ static int set_deftext(_NMC_RL_STARTUPHOOK_ARGS) static gboolean get_secrets_from_user(const NmcConfig *nmc_config, - const char * request_id, - const char * title, - const char * msg, - GPtrArray * secrets) + const char *request_id, + const char *title, + const char *msg, + GPtrArray *secrets) { int i; for (i = 0; i < secrets->len; i++) { NMSecretAgentSimpleSecret *secret = secrets->pdata[i]; - char * pwd = NULL; + char *pwd = NULL; /* Ask user for the password */ if (msg) @@ -103,13 +104,13 @@ get_secrets_from_user(const NmcConfig *nmc_config, static void secrets_requested(NMSecretAgentSimple *agent, - const char * request_id, - const char * title, - const char * msg, - GPtrArray * secrets, + const char *request_id, + const char *title, + const char *msg, + GPtrArray *secrets, gpointer user_data) { - NmCli * nmc = user_data; + NmCli *nmc = user_data; gboolean success; if (nmc->nmc_config.print_output == NMC_PRINT_PRETTY) diff --git a/src/nmcli/common.c b/src/nmcli/common.c index d9a981c3..26398c84 100644 --- a/src/nmcli/common.c +++ b/src/nmcli/common.c @@ -30,8 +30,8 @@ static char ** _ip_config_get_routes(NMIPConfig *cfg) { gs_unref_hashtable GHashTable *hash = NULL; - GPtrArray * ptr_array; - char ** arr; + GPtrArray *ptr_array; + char **arr; guint i; ptr_array = nm_ip_config_get_routes(cfg); @@ -43,12 +43,12 @@ _ip_config_get_routes(NMIPConfig *cfg) arr = g_new(char *, ptr_array->len + 1); for (i = 0; i < ptr_array->len; i++) { - NMIPRoute * route = g_ptr_array_index(ptr_array, i); + NMIPRoute *route = g_ptr_array_index(ptr_array, i); gs_strfreev char **names = NULL; gsize j; - GString * str; + GString *str; guint64 metric; - gs_free char * attributes = NULL; + gs_free char *attributes = NULL; str = g_string_new(NULL); g_string_append_printf( @@ -92,14 +92,15 @@ _ip_config_get_routes(NMIPConfig *cfg) /*****************************************************************************/ -static gconstpointer _metagen_ip4_config_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_ip4_config_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMIPConfig * cfg4 = target; - GPtrArray * ptr_array; - char ** arr; + NMIPConfig *cfg4 = target; + GPtrArray *ptr_array; + char **arr; const char *const *arrc; guint i = 0; - const char * str; + const char *str; nm_assert(info->info_type < _NMC_GENERIC_INFO_TYPE_IP4_CONFIG_NUM); @@ -185,14 +186,15 @@ const NmcMetaGenericInfo *const metagen_ip4_config[_NMC_GENERIC_INFO_TYPE_IP4_CO /*****************************************************************************/ -static gconstpointer _metagen_ip6_config_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_ip6_config_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMIPConfig * cfg6 = target; - GPtrArray * ptr_array; - char ** arr; + NMIPConfig *cfg6 = target; + GPtrArray *ptr_array; + char **arr; const char *const *arrc; guint i = 0; - const char * str; + const char *str; nm_assert(info->info_type < _NMC_GENERIC_INFO_TYPE_IP6_CONFIG_NUM); @@ -272,18 +274,19 @@ const NmcMetaGenericInfo *const metagen_ip6_config[_NMC_GENERIC_INFO_TYPE_IP6_CO /*****************************************************************************/ -static gconstpointer _metagen_dhcp_config_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_dhcp_config_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { NMDhcpConfig *dhcp = target; guint i; - char ** arr = NULL; + char **arr = NULL; NMC_HANDLE_COLOR(NM_META_COLOR_NONE); switch (info->info_type) { case NMC_GENERIC_INFO_TYPE_DHCP_CONFIG_OPTION: { - GHashTable * table; + GHashTable *table; gs_free char **arr2 = NULL; guint n; @@ -333,13 +336,13 @@ const NmcMetaGenericInfo *const metagen_dhcp_config[_NMC_GENERIC_INFO_TYPE_DHCP_ /*****************************************************************************/ gboolean -print_ip_config(NMIPConfig * cfg, +print_ip_config(NMIPConfig *cfg, int addr_family, const NmcConfig *nmc_config, - const char * one_field) + const char *one_field) { gs_free_error GError *error = NULL; - gs_free char * field_str = NULL; + gs_free char *field_str = NULL; if (!cfg) return FALSE; @@ -364,13 +367,13 @@ print_ip_config(NMIPConfig * cfg, } gboolean -print_dhcp_config(NMDhcpConfig * dhcp, +print_dhcp_config(NMDhcpConfig *dhcp, int addr_family, const NmcConfig *nmc_config, - const char * one_field) + const char *one_field) { gs_free_error GError *error = NULL; - gs_free char * field_str = NULL; + gs_free char *field_str = NULL; if (!dhcp) return FALSE; @@ -416,16 +419,16 @@ print_dhcp_config(NMDhcpConfig * dhcp, */ NMConnection * nmc_find_connection(const GPtrArray *connections, - const char * filter_type, - const char * filter_val, - GPtrArray ** out_result, + const char *filter_type, + const char *filter_val, + GPtrArray **out_result, gboolean complete) { - NMConnection * best_candidate_uuid = NULL; - NMConnection * best_candidate = NULL; - gs_unref_ptrarray GPtrArray *result_allocated = NULL; - GPtrArray * result = out_result ? *out_result : NULL; - const guint result_inital_len = result ? result->len : 0u; + NMConnection *best_candidate_uuid = NULL; + NMConnection *best_candidate = NULL; + gs_unref_ptrarray GPtrArray *result_allocated = NULL; + GPtrArray *result = out_result ? *out_result : NULL; + const guint result_inital_len = result ? result->len : 0u; guint i, j; nm_assert(connections); @@ -434,8 +437,8 @@ nmc_find_connection(const GPtrArray *connections, for (i = 0; i < connections->len; i++) { gboolean match_by_uuid = FALSE; NMConnection *connection; - const char * v; - const char * v_num; + const char *v; + const char *v_num; connection = NM_CONNECTION(connections->pdata[i]); @@ -517,21 +520,21 @@ found: NMActiveConnection * nmc_find_active_connection(const GPtrArray *active_cons, - const char * filter_type, - const char * filter_val, - GPtrArray ** out_result, + const char *filter_type, + const char *filter_val, + GPtrArray **out_result, gboolean complete) { guint i, j; NMActiveConnection *best_candidate = NULL; - GPtrArray * result = out_result ? *out_result : NULL; + GPtrArray *result = out_result ? *out_result : NULL; nm_assert(filter_val); for (i = 0; i < active_cons->len; i++) { NMRemoteConnection *con; NMActiveConnection *candidate = g_ptr_array_index(active_cons, i); - const char * v, *v_num; + const char *v, *v_num; con = nm_active_connection_get_connection(candidate); @@ -606,9 +609,9 @@ found: static gboolean vpn_openconnect_get_secrets(NMConnection *connection, GPtrArray *secrets) { - GError * error = NULL; + GError *error = NULL; NMSettingVpn *s_vpn; - const char * gw, *port; + const char *gw, *port; gs_free char *cookie = NULL; gs_free char *gateway = NULL; gs_free char *gwcert = NULL; @@ -679,13 +682,13 @@ vpn_openconnect_get_secrets(NMConnection *connection, GPtrArray *secrets) static gboolean get_secrets_from_user(const NmcConfig *nmc_config, - const char * request_id, - const char * title, - const char * msg, - NMConnection * connection, + const char *request_id, + const char *title, + const char *msg, + NMConnection *connection, gboolean ask, - GHashTable * pwds_hash, - GPtrArray * secrets) + GHashTable *pwds_hash, + GPtrArray *secrets) { int i; @@ -695,7 +698,7 @@ get_secrets_from_user(const NmcConfig *nmc_config, for (i = 0; i < secrets->len; i++) { NMSecretAgentSimpleSecret *secret = secrets->pdata[i]; - char * pwd = NULL; + char *pwd = NULL; /* First try to find the password in provided passwords file, * then ask user. */ @@ -764,15 +767,15 @@ get_secrets_from_user(const NmcConfig *nmc_config, */ void nmc_secrets_requested(NMSecretAgentSimple *agent, - const char * request_id, - const char * title, - const char * msg, - GPtrArray * secrets, + const char *request_id, + const char *title, + const char *msg, + GPtrArray *secrets, gpointer user_data) { - NmCli * nmc = (NmCli *) user_data; - NMConnection * connection = NULL; - char * path, *p; + NmCli *nmc = (NmCli *) user_data; + NMConnection *connection = NULL; + char *path, *p; gboolean success = FALSE; const GPtrArray *connections; @@ -814,8 +817,8 @@ char * nmc_unique_connection_name(const GPtrArray *connections, const char *try_name) { NMConnection *connection; - const char * name; - char * new_name; + const char *name; + char *new_name; unsigned num = 1; int i = 0; @@ -837,7 +840,7 @@ nmc_unique_connection_name(const GPtrArray *connections, const char *try_name) /* readline state variables */ static gboolean nmcli_in_readline = FALSE; static gboolean rl_got_line; -static char * rl_string; +static char *rl_string; /** * nmc_cleanup_readline: @@ -978,7 +981,7 @@ nmc_secret_redisplay(void) { int save_point = rl_point; int save_end = rl_end; - char * save_line_buffer = rl_line_buffer; + char *save_line_buffer = rl_line_buffer; const char *subst = nmc_password_subst_char(); int subst_len = strlen(subst); int i; @@ -1009,7 +1012,7 @@ nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *pro { va_list args; gs_free char *prompt = NULL; - char * str; + char *str; #if HAVE_READLINE_HISTORY nm_auto_free HISTORY_STATE *saved_history = NULL; HISTORY_STATE passwd_history = { @@ -1129,8 +1132,8 @@ nmc_rl_gen_func_ifnames(const char *text, int state) { int i; const GPtrArray *devices; - const char ** ifnames; - char * ret; + const char **ifnames; + char *ret; devices = nm_client_get_devices(nm_cli_global_readline->client); if (devices->len == 0) @@ -1138,7 +1141,7 @@ nmc_rl_gen_func_ifnames(const char *text, int state) ifnames = g_new(const char *, devices->len + 1); for (i = 0; i < devices->len; i++) { - NMDevice * dev = g_ptr_array_index(devices, i); + NMDevice *dev = g_ptr_array_index(devices, i); const char *ifname = nm_device_get_iface(dev); ifnames[i] = ifname; } @@ -1152,7 +1155,8 @@ nmc_rl_gen_func_ifnames(const char *text, int state) char *nmc_rl_pre_input_deftext; -int nmc_rl_set_deftext(_NMC_RL_STARTUPHOOK_ARGS) +int +nmc_rl_set_deftext(_NMC_RL_STARTUPHOOK_ARGS) { if (nmc_rl_pre_input_deftext && rl_startup_hook) { rl_insert_text(nmc_rl_pre_input_deftext); @@ -1186,7 +1190,7 @@ nmc_parse_lldp_capabilities(guint value) "s-vlan-component", "tpmr"}; gboolean first = TRUE; - GString * str; + GString *str; int i; if (!value) @@ -1217,8 +1221,8 @@ nmc_parse_lldp_capabilities(guint value) static void command_done(GObject *object, GAsyncResult *res, gpointer user_data) { - GTask * task = G_TASK(res); - NmCli * nmc = user_data; + GTask *task = G_TASK(res); + NmCli *nmc = user_data; gs_free_error GError *error = NULL; if (!g_task_propagate_boolean(task, &error)) { @@ -1233,8 +1237,8 @@ command_done(GObject *object, GAsyncResult *res, gpointer user_data) typedef struct { const NMCCommand *cmd; int argc; - char ** argv; - GTask * task; + char **argv; + GTask *task; } CmdCall; static void @@ -1243,10 +1247,10 @@ call_cmd(NmCli *nmc, GTask *task, const NMCCommand *cmd, int argc, const char *c static void got_client(GObject *source_object, GAsyncResult *res, gpointer user_data) { - gs_unref_object GTask *task = NULL; - gs_free_error GError *error = NULL; - CmdCall * call = user_data; - NmCli * nmc; + gs_unref_object GTask *task = NULL; + gs_free_error GError *error = NULL; + CmdCall *call = user_data; + NmCli *nmc; nm_assert(NM_IS_CLIENT(source_object)); @@ -1343,7 +1347,7 @@ nmc_complete_help(const char *prefix) void nmc_do_cmd(NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, const char *const *argv) { - const NMCCommand *c; + const NMCCommand *c; gs_unref_object GTask *task = NULL; task = nm_g_task_new(NULL, NULL, nmc_do_cmd, command_done, nmc); diff --git a/src/nmcli/common.h b/src/nmcli/common.h index 908dad06..1572c534 100644 --- a/src/nmcli/common.h +++ b/src/nmcli/common.h @@ -9,33 +9,33 @@ #include "nmcli.h" #include "libnmc-base/nm-secret-agent-simple.h" -gboolean print_ip_config(NMIPConfig * cfg, +gboolean print_ip_config(NMIPConfig *cfg, int addr_family, const NmcConfig *nmc_config, - const char * one_field); + const char *one_field); -gboolean print_dhcp_config(NMDhcpConfig * dhcp, +gboolean print_dhcp_config(NMDhcpConfig *dhcp, int addr_family, const NmcConfig *nmc_config, - const char * one_field); + const char *one_field); NMConnection *nmc_find_connection(const GPtrArray *connections, - const char * filter_type, - const char * filter_val, - GPtrArray ** out_result, + const char *filter_type, + const char *filter_val, + GPtrArray **out_result, gboolean complete); NMActiveConnection *nmc_find_active_connection(const GPtrArray *active_cons, - const char * filter_type, - const char * filter_val, - GPtrArray ** out_result, + const char *filter_type, + const char *filter_val, + GPtrArray **out_result, gboolean complete); void nmc_secrets_requested(NMSecretAgentSimple *agent, - const char * request_id, - const char * title, - const char * msg, - GPtrArray * secrets, + const char *request_id, + const char *title, + const char *msg, + GPtrArray *secrets, gpointer user_data); char *nmc_unique_connection_name(const GPtrArray *connections, const char *try_name); @@ -45,8 +45,8 @@ char *nmc_readline(const NmcConfig *nmc_config, const char *prompt_fmt, ...) G_G char *nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *prompt_fmt, ...) G_GNUC_PRINTF(3, 4); NmcCompEntryFunc nmc_rl_compentry_func_wrap(const char *const *values); -char * nmc_rl_gen_func_basic(const char *text, int state, const char *const *words); -char * nmc_rl_gen_func_ifnames(const char *text, int state); +char *nmc_rl_gen_func_basic(const char *text, int state, const char *const *words); +char *nmc_rl_gen_func_ifnames(const char *text, int state); gboolean nmc_get_in_readline(void); void nmc_set_in_readline(gboolean in_readline); diff --git a/src/nmcli/connections.c b/src/nmcli/connections.c index 5edd33f0..5a66b82f 100644 --- a/src/nmcli/connections.c +++ b/src/nmcli/connections.c @@ -45,13 +45,13 @@ typedef char *(*CompEntryFunc)(const char *, int); typedef struct _OptionInfo { const NMMetaSettingInfoEditor *setting_info; - const char * property; - const char * option; - gboolean (*check_and_set)(NmCli * nmc, - NMConnection * connection, + const char *property; + const char *option; + gboolean (*check_and_set)(NmCli *nmc, + NMConnection *connection, const struct _OptionInfo *option, - const char * value, - GError ** error); + const char *value, + GError **error); CompEntryFunc generator_func; } OptionInfo; @@ -100,9 +100,9 @@ static NM_UTILS_LOOKUP_STR_DEFINE( typedef struct { NmCli *nmc; - char * orig_id; - char * orig_uuid; - char * new_id; + char *orig_id; + char *orig_uuid; + char *new_id; } AddConnectionInfo; static AddConnectionInfo * @@ -189,10 +189,10 @@ active_connection_get_state_ord(NMActiveConnection *active) int nmc_active_connection_cmp(NMActiveConnection *ac_a, NMActiveConnection *ac_b) { - NMSettingIPConfig * s_ip; + NMSettingIPConfig *s_ip; NMRemoteConnection *conn; - NMIPConfig * da_ip; - NMIPConfig * db_ip; + NMIPConfig *da_ip; + NMIPConfig *db_ip; int da_num_addrs; int db_num_addrs; int cmp = 0; @@ -254,7 +254,7 @@ nmc_active_connection_cmp(NMActiveConnection *ac_a, NMActiveConnection *ac_b) static char * get_ac_device_string(NMActiveConnection *active) { - GString * dev_str; + GString *dev_str; const GPtrArray *devices; guint i; @@ -265,7 +265,7 @@ get_ac_device_string(NMActiveConnection *active) dev_str = g_string_new(NULL); devices = nm_active_connection_get_devices(active); for (i = 0; i < devices->len; i++) { - NMDevice * device = g_ptr_array_index(devices, i); + NMDevice *device = g_ptr_array_index(devices, i); const char *dev_iface = nm_device_get_iface(device); if (dev_iface) { @@ -288,7 +288,7 @@ static const char * get_vpn_connection_type(NMConnection *connection) { NMSettingVpn *s_vpn; - const char * type, *p; + const char *type, *p; s_vpn = nm_connection_get_setting_vpn(connection); if (!s_vpn) @@ -387,9 +387,9 @@ get_vpn_data_item(NMConnection *connection, enum VpnDataItem vpn_data_item) /*****************************************************************************/ typedef struct { - NMConnection * connection; + NMConnection *connection; NMActiveConnection *primary_active; - GPtrArray * all_active; + GPtrArray *all_active; bool show_active_fields; } MetagenConShowRowData; @@ -422,7 +422,7 @@ _metagen_con_show_row_data_new_for_active_connection(NMRemoteConnection *connect static void _metagen_con_show_row_data_add_active_connection(MetagenConShowRowData *row_data, - NMActiveConnection * active) + NMActiveConnection *active) { if (!row_data->primary_active) { row_data->primary_active = g_object_ref(active); @@ -477,7 +477,7 @@ static const char * _con_show_fcn_get_id(NMConnection *c, NMActiveConnection *ac) { NMSettingConnection *s_con = NULL; - const char * s; + const char *s; if (c) s_con = nm_connection_get_setting_connection(c); @@ -499,7 +499,7 @@ static const char * _con_show_fcn_get_type(NMConnection *c, NMActiveConnection *ac, NMMetaAccessorGetType get_type) { NMSettingConnection *s_con = NULL; - const char * s; + const char *s; if (c) s_con = nm_connection_get_setting_connection(c); @@ -513,14 +513,15 @@ _con_show_fcn_get_type(NMConnection *c, NMActiveConnection *ac, NMMetaAccessorGe return connection_type_to_display(s, get_type); } -static gconstpointer _metagen_con_show_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_con_show_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { const MetagenConShowRowData *row_data = target; - NMConnection * c = row_data->connection; - NMActiveConnection * ac = row_data->primary_active; - NMSettingConnection * s_con = NULL; - const char * s; - char * s_mut; + NMConnection *c = row_data->connection; + NMActiveConnection *ac = row_data->primary_active; + NMSettingConnection *s_con = NULL; + const char *s; + char *s_mut; NMC_HANDLE_COLOR(nmc_active_connection_state_to_color(ac)); @@ -654,14 +655,15 @@ const NmcMetaGenericInfo *const metagen_con_show[_NMC_GENERIC_INFO_TYPE_CON_SHOW /*****************************************************************************/ -static gconstpointer _metagen_con_active_general_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_con_active_general_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMActiveConnection * ac = target; - NMConnection * c; + NMActiveConnection *ac = target; + NMConnection *c; NMSettingConnection *s_con = NULL; - NMDevice * dev; + NMDevice *dev; guint i; - const char * s; + const char *s; NMC_HANDLE_COLOR(NM_META_COLOR_NONE); @@ -680,14 +682,14 @@ static gconstpointer _metagen_con_active_general_get_fcn(NMC_META_GENERIC_INFO_G case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEVICES: case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_IP_IFACE: { - GString * str = NULL; + GString *str = NULL; const GPtrArray *devices; s = NULL; devices = nm_active_connection_get_devices(ac); if (devices) { for (i = 0; i < devices->len; i++) { - NMDevice * device = g_ptr_array_index(devices, i); + NMDevice *device = g_ptr_array_index(devices, i); const char *iface; if (info->info_type == NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_DEVICES) { @@ -767,15 +769,16 @@ const NmcMetaGenericInfo /*****************************************************************************/ -static gconstpointer _metagen_con_active_vpn_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_con_active_vpn_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMActiveConnection * ac = target; - NMConnection * c; - NMSettingVpn * s_vpn = NULL; + NMActiveConnection *ac = target; + NMConnection *c; + NMSettingVpn *s_vpn = NULL; NMVpnConnectionState vpn_state; guint i; - const char * s; - char ** arr = NULL; + const char *s; + char **arr = NULL; nm_assert(NM_IS_VPN_CONNECTION(ac)); @@ -909,12 +912,12 @@ static guint progress_id = 0; /* ID of event source for displaying progress */ /* for readline TAB completion in editor */ typedef struct { - NmCli * nmc; - char * con_type; + NmCli *nmc; + char *con_type; NMConnection *connection; - NMSetting * setting; - const char * property; - char ** words; + NMSetting *setting; + const char *property; + char **words; } TabCompletionInfo; static TabCompletionInfo nmc_tab_completion; @@ -1291,12 +1294,12 @@ get_ac_for_connection_cmp(gconstpointer pa, gconstpointer pb) static NMActiveConnection * get_ac_for_connection(const GPtrArray *active_cons, - NMConnection * connection, - GPtrArray ** out_result) + NMConnection *connection, + GPtrArray **out_result) { guint i; NMActiveConnection *best_candidate = NULL; - GPtrArray * result = out_result ? *out_result : NULL; + GPtrArray *result = out_result ? *out_result : NULL; for (i = 0; i < active_cons->len; i++) { NMActiveConnection *candidate = g_ptr_array_index(active_cons, i); @@ -1323,16 +1326,16 @@ get_ac_for_connection(const GPtrArray *active_cons, } typedef struct { - GMainLoop * loop; + GMainLoop *loop; NMConnection *local; - const char * setting_name; + const char *setting_name; } GetSecretsData; static void got_secrets(GObject *source_object, GAsyncResult *res, gpointer user_data) { - NMRemoteConnection *remote = NM_REMOTE_CONNECTION(source_object); - GetSecretsData * data = user_data; + NMRemoteConnection *remote = NM_REMOTE_CONNECTION(source_object); + GetSecretsData *data = user_data; gs_unref_variant GVariant *secrets = NULL; secrets = nm_remote_connection_get_secrets_finish(remote, res, NULL); @@ -1384,13 +1387,13 @@ update_secrets_in_connection(NMRemoteConnection *remote, NMConnection *local) static gboolean nmc_connection_profile_details(NMConnection *connection, NmCli *nmc) { - GError * error = NULL; - GArray * print_settings_array; - GPtrArray * prop_array = NULL; + GError *error = NULL; + GArray *print_settings_array; + GPtrArray *prop_array = NULL; guint i; - char * fields_str; - char * fields_all = NMC_FIELDS_SETTINGS_NAMES_ALL; - char * fields_common = NMC_FIELDS_SETTINGS_NAMES_ALL; + char *fields_str; + char *fields_all = NMC_FIELDS_SETTINGS_NAMES_ALL; + char *fields_common = NMC_FIELDS_SETTINGS_NAMES_ALL; const char *base_hdr = _("Connection profile details"); gboolean was_output = FALSE; @@ -1417,9 +1420,9 @@ nmc_connection_profile_details(NMConnection *connection, NmCli *nmc) /* Main header */ { - gs_free char *header_name = NULL; - gs_free NmcOutputField *row = NULL; - gs_unref_array GArray *out_indices = NULL; + gs_free char *header_name = NULL; + gs_free NmcOutputField *row = NULL; + gs_unref_array GArray *out_indices = NULL; header_name = construct_header_name(base_hdr, nm_connection_get_id(connection)); out_indices = parse_output_fields( @@ -1444,7 +1447,7 @@ nmc_connection_profile_details(NMConnection *connection, NmCli *nmc) /* Loop through the required settings and print them. */ for (i = 0; i < print_settings_array->len; i++) { - NMSetting * setting; + NMSetting *setting; int section_idx = g_array_index(print_settings_array, int, i); const char *prop_name = (const char *) g_ptr_array_index(prop_array, i); @@ -1496,12 +1499,12 @@ nmc_active_connection_state_to_color(NMActiveConnection *ac) static gboolean nmc_active_connection_details(NMActiveConnection *acon, NmCli *nmc) { - GError * error = NULL; - GArray * print_groups; - GPtrArray * group_fields = NULL; + GError *error = NULL; + GArray *print_groups; + GPtrArray *group_fields = NULL; int i; const char *fields_str = NULL; - const char *base_hdr = _("Activate connection details"); + const char *base_hdr = _("Active connection details"); gboolean was_output = FALSE; if (!nmc->required_fields || g_ascii_strcasecmp(nmc->required_fields, "common") == 0) { @@ -1527,9 +1530,9 @@ nmc_active_connection_details(NMActiveConnection *acon, NmCli *nmc) /* Main header */ { - gs_free char *header_name = NULL; - gs_free NmcOutputField *row = NULL; - gs_unref_array GArray *out_indices = NULL; + gs_free char *header_name = NULL; + gs_free NmcOutputField *row = NULL; + gs_unref_array GArray *out_indices = NULL; header_name = construct_header_name(base_hdr, nm_active_connection_get_uuid(acon)); out_indices = parse_output_fields( @@ -1648,12 +1651,12 @@ nmc_active_connection_details(NMActiveConnection *acon, NmCli *nmc) static gboolean split_required_fields_for_con_show(const char *input, - char ** profile_flds, - char ** active_flds, - GError ** error) + char **profile_flds, + char **active_flds, + GError **error) { - gs_free const char **fields = NULL; - const char *const * iter; + gs_free const char **fields = NULL; + const char *const *iter; nm_auto_free_gstring GString *str1 = NULL; nm_auto_free_gstring GString *str2 = NULL; gboolean group_profile = FALSE; @@ -1671,8 +1674,8 @@ split_required_fields_for_con_show(const char *input, fields = nm_strsplit_set_with_empty(input, ","); for (iter = fields; iter && *iter; iter++) { - char * s_mutable = (char *) (*iter); - char * dot; + char *s_mutable = (char *) (*iter); + char *dot; gboolean is_all; gboolean is_common; gboolean found; @@ -1789,7 +1792,7 @@ typedef enum { } NmcSortOrder; typedef struct { - NmCli * nmc; + NmCli *nmc; const GArray *order; gboolean show_active_fields; } ConShowSortInfo; @@ -1797,15 +1800,15 @@ typedef struct { static int con_show_get_items_cmp(gconstpointer pa, gconstpointer pb, gpointer user_data) { - const ConShowSortInfo * sort_info = user_data; + const ConShowSortInfo *sort_info = user_data; const MetagenConShowRowData *row_data_a = *((const MetagenConShowRowData *const *) pa); const MetagenConShowRowData *row_data_b = *((const MetagenConShowRowData *const *) pb); - NMConnection * c_a = row_data_a->connection; - NMConnection * c_b = row_data_b->connection; - NMActiveConnection * ac_a = row_data_a->primary_active; - NMActiveConnection * ac_b = row_data_b->primary_active; - NMActiveConnection * ac_a_effective = sort_info->show_active_fields ? ac_a : NULL; - NMActiveConnection * ac_b_effective = sort_info->show_active_fields ? ac_b : NULL; + NMConnection *c_a = row_data_a->connection; + NMConnection *c_b = row_data_b->connection; + NMActiveConnection *ac_a = row_data_a->primary_active; + NMActiveConnection *ac_b = row_data_b->primary_active; + NMActiveConnection *ac_a_effective = sort_info->show_active_fields ? ac_a : NULL; + NMActiveConnection *ac_b_effective = sort_info->show_active_fields ? ac_b : NULL; /* first sort active-connections which are invisible, i.e. that have no connection */ if (!c_a && c_b) @@ -1815,7 +1818,7 @@ con_show_get_items_cmp(gconstpointer pa, gconstpointer pb, gpointer user_data) /* we have two connections... */ if (c_a && c_b && c_a != c_b) { - const NmcSortOrder * order_arr; + const NmcSortOrder *order_arr; guint i, order_len; NMMetaAccessorGetType get_type = nmc_print_output_to_accessor_get_type(sort_info->nmc->nmc_config.print_output); @@ -1892,15 +1895,15 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields { gs_unref_hashtable GHashTable *row_hash = NULL; GHashTableIter hiter; - GPtrArray * result; - const GPtrArray * arr; - NMRemoteConnection * c; - MetagenConShowRowData * row_data; + GPtrArray *result; + const GPtrArray *arr; + NMRemoteConnection *c; + MetagenConShowRowData *row_data; guint i; const ConShowSortInfo sort_info = { - .nmc = nmc, - .order = order, - .show_active_fields = show_active_fields, + .nmc = nmc, + .order = order, + .show_active_fields = show_active_fields, }; row_hash = g_hash_table_new(nm_direct_hash, NULL); @@ -2003,9 +2006,9 @@ static GArray * parse_preferred_connection_order(const char *order, GError **error) { gs_free const char **strv = NULL; - const char *const * iter; - const char * str; - GArray * order_arr; + const char *const *iter; + const char *str; + GArray *order_arr; NmcSortOrder val; gboolean inverse, unique; guint i; @@ -2057,17 +2060,17 @@ parse_preferred_connection_order(const char *order, GError **error) } static NMConnection * -get_connection(NmCli * nmc, - int * argc, +get_connection(NmCli *nmc, + int *argc, const char *const **argv, - const char ** out_selector, - const char ** out_value, - GPtrArray ** out_result, - GError ** error) + const char **out_selector, + const char **out_value, + GPtrArray **out_result, + GError **error) { const GPtrArray *connections; - NMConnection * connection = NULL; - const char * selector = NULL; + NMConnection *connection = NULL; + const char *selector = NULL; NM_SET_OUT(out_selector, NULL); NM_SET_OUT(out_value, NULL); @@ -2121,11 +2124,11 @@ get_connection(NmCli * nmc, static void do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - gs_free_error GError *err = NULL; - gs_free char * profile_flds = NULL; - gs_free char * active_flds = NULL; - gboolean active_only = FALSE; - gs_unref_array GArray *order = NULL; + gs_free_error GError *err = NULL; + gs_free char *profile_flds = NULL; + gs_free char *active_flds = NULL; + gboolean active_only = FALSE; + gs_unref_array GArray *order = NULL; guint i; int option; @@ -2153,8 +2156,8 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con } if (argc == 0) { - const char * fields_str = NULL; - gs_unref_ptrarray GPtrArray *items = NULL; + const char *fields_str = NULL; + gs_unref_ptrarray GPtrArray *items = NULL; gs_free NMMetaSelectionResultList *selection = NULL; gboolean show_active_fields = TRUE; @@ -2242,14 +2245,14 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con } while (argc > 0) { - const GPtrArray *connections; - gboolean res; - NMConnection * con; - gs_unref_object NMActiveConnection *explicit_acon = NULL; - const char * selector = NULL; - gs_unref_ptrarray GPtrArray *found_cons = NULL; - gboolean explicit_acon_handled = FALSE; - guint i_found_cons; + const GPtrArray *connections; + gboolean res; + NMConnection *con; + gs_unref_object NMActiveConnection *explicit_acon = NULL; + const char *selector = NULL; + gs_unref_ptrarray GPtrArray *found_cons = NULL; + gboolean explicit_acon_handled = FALSE; + guint i_found_cons; if (argc == 1 && nmc->complete) nmc_complete_strings(*argv, "id", "uuid", "path", "filename", "apath"); @@ -2396,9 +2399,9 @@ static NMActiveConnection * get_default_active_connection(NmCli *nmc, NMDevice **device) { NMActiveConnection *default_ac = NULL; - NMDevice * non_default_device = NULL; + NMDevice *non_default_device = NULL; NMActiveConnection *non_default_ac = NULL; - const GPtrArray * connections; + const GPtrArray *connections; guint i; g_return_val_if_fail(nmc, NULL); @@ -2408,7 +2411,7 @@ get_default_active_connection(NmCli *nmc, NMDevice **device) connections = nm_client_get_active_connections(nmc->client); for (i = 0; i < connections->len; i++) { NMActiveConnection *candidate = g_ptr_array_index(connections, i); - const GPtrArray * devices; + const GPtrArray *devices; devices = nm_active_connection_get_devices(candidate); if (!devices->len) @@ -2447,17 +2450,17 @@ get_default_active_connection(NmCli *nmc, NMDevice **device) * RETURNS: TRUE when a device is found, FALSE otherwise. */ static gboolean -find_device_for_connection(NmCli * nmc, +find_device_for_connection(NmCli *nmc, NMConnection *connection, - const char * iface, - const char * ap, - const char * nsp, - NMDevice ** device, - const char ** spec_object, - GError ** error) + const char *iface, + const char *ap, + const char *nsp, + NMDevice **device, + const char **spec_object, + GError **error) { NMSettingConnection *s_con; - const char * con_type; + const char *con_type; guint i, j; g_return_val_if_fail(nmc, FALSE); @@ -2495,7 +2498,7 @@ find_device_for_connection(NmCli * nmc, } } else { /* Other connections */ - NMDevice * found_device = NULL; + NMDevice *found_device = NULL; const GPtrArray *devices = nm_client_get_devices(nmc->client); gboolean found_device_with_name = FALSE; @@ -2524,14 +2527,14 @@ find_device_for_connection(NmCli * nmc, found_device = dev; if (ap && nm_streq(con_type, NM_SETTING_WIRELESS_SETTING_NAME) && NM_IS_DEVICE_WIFI(dev)) { - gs_free char * bssid_up = g_ascii_strup(ap, -1); + gs_free char *bssid_up = g_ascii_strup(ap, -1); const GPtrArray *aps = nm_device_wifi_get_access_points(NM_DEVICE_WIFI(dev)); found_device = NULL; /* Mark as not found; set to the device again later, only if AP matches */ for (j = 0; j < aps->len; j++) { NMAccessPoint *candidate_ap = g_ptr_array_index(aps, j); - const char * candidate_bssid = nm_access_point_get_bssid(candidate_ap); + const char *candidate_bssid = nm_access_point_get_bssid(candidate_ap); if (nm_streq0(bssid_up, candidate_bssid)) { found_device = dev; @@ -2575,17 +2578,17 @@ find_device_for_connection(NmCli * nmc, } typedef struct { - NmCli * nmc; - NMDevice * device; + NmCli *nmc; + NMDevice *device; NMActiveConnection *active; } ActivateConnectionInfo; static void active_connection_hint(GString *return_text, NMActiveConnection *active, NMDevice *device) { - NMRemoteConnection * connection; + NMRemoteConnection *connection; nm_auto_free_gstring GString *hint = NULL; - const GPtrArray * devices; + const GPtrArray *devices; guint i; if (!active) @@ -2623,8 +2626,8 @@ static void check_activated(ActivateConnectionInfo *info) { NMActiveConnectionState ac_state; - NmCli * nmc = info->nmc; - const char * reason = NULL; + NmCli *nmc = info->nmc; + const char *reason = NULL; ac_state = nmc_activation_get_effective_state(info->active, info->device, &reason); switch (ac_state) { @@ -2668,10 +2671,10 @@ device_state_cb(NMDevice *device, GParamSpec *pspec, ActivateConnectionInfo *inf } static void -active_connection_state_cb(NMActiveConnection * active, +active_connection_state_cb(NMActiveConnection *active, NMActiveConnectionState state, NMActiveConnectionStateReason reason, - ActivateConnectionInfo * info) + ActivateConnectionInfo *info) { check_activated(info); } @@ -2707,11 +2710,11 @@ progress_cb(gpointer user_data) static gboolean progress_active_connection_cb(gpointer user_data) { - NMActiveConnection * active = user_data; - const char * str; - NMDevice * device; + NMActiveConnection *active = user_data; + const char *str; + NMDevice *device; NMActiveConnectionState ac_state; - const GPtrArray * ac_devs; + const GPtrArray *ac_devs; ac_state = nm_active_connection_get_state(active); @@ -2755,12 +2758,12 @@ static void activate_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data) { ActivateConnectionInfo *info = (ActivateConnectionInfo *) user_data; - NmCli * nmc = info->nmc; - NMDevice * device = info->device; - NMActiveConnection * active; + NmCli *nmc = info->nmc; + NMDevice *device = info->device; + NMActiveConnection *active; NMActiveConnectionState state; - const GPtrArray * ac_devs; - GError * error = NULL; + const GPtrArray *ac_devs; + GError *error = NULL; info->active = active = nm_client_activate_connection_finish(NM_CLIENT(client), result, &error); @@ -2820,19 +2823,19 @@ activate_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data } static gboolean -nmc_activate_connection(NmCli * nmc, - NMConnection * connection, - const char * ifname, - const char * ap, - const char * nsp, - const char * pwds, +nmc_activate_connection(NmCli *nmc, + NMConnection *connection, + const char *ifname, + const char *ap, + const char *nsp, + const char *pwds, GAsyncReadyCallback callback, - GError ** error) + GError **error) { ActivateConnectionInfo *info; GHashTable *pwds_hash; - NMDevice * device = NULL; + NMDevice *device = NULL; const char *spec_object = NULL; gboolean device_found; @@ -2930,16 +2933,16 @@ nmc_activate_connection(NmCli * nmc, static void do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMConnection *connection = NULL; - const char * ifname = NULL; - const char * ap = NULL; - const char * nsp = NULL; - const char * pwds = NULL; - gs_free_error GError *error = NULL; - gs_strfreev char ** arg_arr = NULL; + NMConnection *connection = NULL; + const char *ifname = NULL; + const char *ap = NULL; + const char *nsp = NULL; + const char *pwds = NULL; + gs_free_error GError *error = NULL; + gs_strfreev char **arg_arr = NULL; int arg_num; - const char *const ** argv_ptr; - int * argc_ptr; + const char *const **argv_ptr; + int *argc_ptr; /* * Set default timeout for connection activation. @@ -3058,7 +3061,7 @@ typedef struct { NmCli *nmc; /* a list of object that is relevant for the callback. The object * type differs, and depends on the type of callback. */ - GPtrArray * obj_list; + GPtrArray *obj_list; guint timeout_id; GCancellable *cancellable; } ConnectionCbInfo; @@ -3067,8 +3070,8 @@ static void connection_removed_cb(NMClient *client, NMConnection *connection, ConnectionCbInfo *info); static void down_active_connection_state_cb(NMActiveConnection *active, - GParamSpec * pspec, - ConnectionCbInfo * info); + GParamSpec *pspec, + ConnectionCbInfo *info); static void connection_cb_info_obj_list_destroy(ConnectionCbInfo *info, gpointer obj) @@ -3165,8 +3168,8 @@ connection_removed_cb(NMClient *client, NMConnection *connection, ConnectionCbIn static void down_active_connection_state_cb(NMActiveConnection *active, - GParamSpec * pspec, - ConnectionCbInfo * info) + GParamSpec *pspec, + ConnectionCbInfo *info) { if (nm_active_connection_get_state(active) < NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) return; @@ -3194,13 +3197,13 @@ connection_op_timeout_cb(gpointer user_data) static void do_connection_down(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMActiveConnection *active; - ConnectionCbInfo * info = NULL; - const GPtrArray * active_cons; - gs_strfreev char ** arg_arr = NULL; - const char *const * arg_ptr; - int arg_num; - guint i; + NMActiveConnection *active; + ConnectionCbInfo *info = NULL; + const GPtrArray *active_cons; + gs_strfreev char **arg_arr = NULL; + const char *const *arg_ptr; + int arg_num; + guint i; gs_unref_ptrarray GPtrArray *found_active_cons = NULL; if (nmc->timeout == -1) @@ -3351,7 +3354,7 @@ get_valid_options_string(const NMMetaSettingValidPartItem *const *array, const NMMetaSettingValidPartItem *const *array_slv) { const NMMetaSettingValidPartItem *const *iter = array; - GString * str; + GString *str; int i; str = g_string_sized_new(150); @@ -3422,8 +3425,8 @@ get_valid_settings_array(const char *con_type) } static char * -_construct_property_name(const char * setting_name, - const char * property_name, +_construct_property_name(const char *setting_name, + const char *property_name, NMMetaAccessorModifier modifier) { return g_strdup_printf("%s%s.%s\n", @@ -3452,12 +3455,12 @@ static char * get_valid_properties_string(const NMMetaSettingValidPartItem *const *array, const NMMetaSettingValidPartItem *const *array_slv, NMMetaAccessorModifier modifier, - const char * prefix, - const char * postfix) + const char *prefix, + const char *postfix) { const NMMetaSettingValidPartItem *const *iter = array; - const char * prop_name = NULL; - GString * str; + const char *prop_name = NULL; + GString *str; guint i, j; gboolean full_match = FALSE; @@ -3493,7 +3496,7 @@ get_valid_properties_string(const NMMetaSettingValidPartItem *const *array, /* Search the array with the arguments of the current property */ for (j = 0; j < setting_info->properties_num; j++) { gs_free char *ss1 = NULL; - const char * arg_name; + const char *arg_name; arg_name = setting_info->properties[j]->property_name; @@ -3526,16 +3529,16 @@ get_valid_properties_string(const NMMetaSettingValidPartItem *const *array, * The returned string must not be freed. */ static const char * -check_valid_name(const char * val, +check_valid_name(const char *val, const NMMetaSettingValidPartItem *const *array, const NMMetaSettingValidPartItem *const *array_slv, - GError ** error) + GError **error) { const NMMetaSettingValidPartItem *const *iter; - gs_unref_ptrarray GPtrArray *tmp_arr = NULL; - const char * str; - GError * tmp_err = NULL; - int i; + gs_unref_ptrarray GPtrArray *tmp_arr = NULL; + const char *str; + GError *tmp_err = NULL; + int i; g_return_val_if_fail(array, NULL); @@ -3590,11 +3593,11 @@ check_valid_name(const char * val, static const char * check_valid_name_toplevel(const char *val, const char **slave_type, GError **error) { - gs_unref_ptrarray GPtrArray * tmp_arr = NULL; + gs_unref_ptrarray GPtrArray *tmp_arr = NULL; const NMMetaSettingInfoEditor *setting_info; - gs_free_error GError *tmp_err = NULL; - const char * str; - int i; + gs_free_error GError *tmp_err = NULL; + const char *str; + int i; NM_SET_OUT(slave_type, NULL); @@ -3649,11 +3652,11 @@ check_valid_name_toplevel(const char *val, const char **slave_type, GError **err static gboolean is_setting_mandatory(NMConnection *connection, NMSetting *setting) { - NMSettingConnection * s_con; - const char * c_type; + NMSettingConnection *s_con; + const char *c_type; const NMMetaSettingValidPartItem *const *item; - const char * name; - const char * s_type; + const char *name; + const char *s_type; guint i; s_con = nm_connection_get_setting_connection(connection); @@ -3716,17 +3719,17 @@ _strip_master_prefix(const char *master, const char *(**func)(NMConnection *) ) */ static const char * normalized_master_for_slave(const GPtrArray *connections, - const char * master, - const char * type, - const char ** out_type) + const char *master, + const char *type, + const char **out_type) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - const char * con_type = NULL, *id, *uuid, *ifname; + const char *con_type = NULL, *id, *uuid, *ifname; guint i; - const char * found_by_id = NULL; - const char * out_type_by_id = NULL; - const char * out_master = NULL; + const char *found_by_id = NULL; + const char *out_type_by_id = NULL; + const char *out_master = NULL; const char *(*func)(NMConnection *) = NULL; if (!master) @@ -3806,10 +3809,10 @@ prompt_yes_no(gboolean default_yes, char *delim) } static NMSetting * -is_setting_valid(NMConnection * connection, +is_setting_valid(NMConnection *connection, const NMMetaSettingValidPartItem *const *valid_settings_main, const NMMetaSettingValidPartItem *const *valid_settings_slave, - const char * setting) + const char *setting) { const char *setting_name; @@ -3823,7 +3826,7 @@ static char * is_property_valid(NMSetting *setting, const char *property, GError **error) { gs_strfreev char **valid_props = NULL; - const char * prop_name; + const char *prop_name; valid_props = nmc_setting_get_valid_properties(setting); prop_name = nmc_string_is_valid(property, (const char **) valid_props, error); @@ -3876,7 +3879,7 @@ set_default_interface_name(NmCli *nmc, NMSettingConnection *s_con) if (default_name) { const GPtrArray *connections; - gs_free char * ifname = NULL; + gs_free char *ifname = NULL; connections = nm_client_get_connections(nmc->client); ifname = unique_master_iface_ifname(connections, default_name); @@ -3932,10 +3935,10 @@ _meta_property_needs_bond_hack(const NMMetaPropertyInfo *property_info) static char ** _meta_abstract_complete(const NMMetaAbstractInfo *abstract_info, const char *text) { - const char *const * values; - char ** values_to_free = NULL; + const char *const *values; + char **values_to_free = NULL; const NMMetaOperationContext ctx = { - .connection = nmc_tab_completion.connection, + .connection = nmc_tab_completion.connection, }; values = nm_meta_abstract_info_complete(abstract_info, @@ -3961,14 +3964,14 @@ _meta_abstract_generator(const char *text, int state) } static void -_meta_abstract_get(const NMMetaAbstractInfo * abstract_info, +_meta_abstract_get(const NMMetaAbstractInfo *abstract_info, const NMMetaSettingInfoEditor **out_setting_info, - const char ** out_setting_name, - const char ** out_property_name, - const char ** out_option, - NMMetaPropertyInfFlags * out_inf_flags, - const char ** out_prompt, - const char ** out_def_hint) + const char **out_setting_name, + const char **out_property_name, + const char **out_option, + NMMetaPropertyInfFlags *out_inf_flags, + const char **out_prompt, + const char **out_def_hint) { const NMMetaPropertyInfo *info = (const NMMetaPropertyInfo *) abstract_info; @@ -4031,7 +4034,7 @@ enable_options(const char *setting_name, const char *property, const char *const static void disable_options(const char *setting_name, const char *property) { - const NMMetaPropertyInfo * property_infos_local[2]; + const NMMetaPropertyInfo *property_infos_local[2]; const NMMetaPropertyInfo *const *property_infos; guint p; @@ -4119,17 +4122,17 @@ reset_options(void) } static gboolean -set_property(NMClient * client, - NMConnection * connection, - const char * setting_name, - const char * property, - const char * value, +set_property(NMClient *client, + NMConnection *connection, + const char *setting_name, + const char *property, + const char *value, NMMetaAccessorModifier modifier, - GError ** error) + GError **error) { - gs_free char *property_name = NULL; - gs_free_error GError *local = NULL; - NMSetting * setting; + gs_free char *property_name = NULL; + gs_free_error GError *local = NULL; + NMSetting *setting; nm_assert(setting_name && setting_name[0]); nm_assert(NM_IN_SET(modifier, @@ -4182,15 +4185,15 @@ set_property(NMClient * client, } static gboolean -set_option(NmCli * nmc, - NMConnection * connection, +set_option(NmCli *nmc, + NMConnection *connection, const NMMetaAbstractInfo *abstract_info, - const char * value, - GError ** error) + const char *value, + GError **error) { - const char * setting_name, *property_name, *option_name; + const char *setting_name, *property_name, *option_name; NMMetaPropertyInfFlags inf_flags; - const OptionInfo * option; + const OptionInfo *option; option = _meta_abstract_get_option_info(abstract_info); @@ -4227,12 +4230,12 @@ set_option(NmCli * nmc, * and slave type. */ static gboolean -con_settings(NMConnection * connection, +con_settings(NMConnection *connection, const NMMetaSettingValidPartItem *const **type_settings, const NMMetaSettingValidPartItem *const **slv_settings, - GError ** error) + GError **error) { - const char * con_type; + const char *con_type; NMSettingConnection *s_con; g_return_val_if_fail(type_settings, FALSE); @@ -4332,17 +4335,17 @@ gen_func_bond_lacp_rate(const char *text, int state) /*****************************************************************************/ static gboolean -set_connection_type(NmCli * nmc, - NMConnection * con, +set_connection_type(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { const NMMetaSettingValidPartItem *const *type_settings; const NMMetaSettingValidPartItem *const *slv_settings; - GError * local = NULL; - const char * master[] = {"master", NULL}; - const char * slave_type = NULL; + GError *local = NULL; + const char *master[] = {"master", NULL}; + const char *slave_type = NULL; value = check_valid_name_toplevel(value, &slave_type, &local); if (!value) { @@ -4396,11 +4399,11 @@ set_connection_type(NmCli * nmc, } static gboolean -set_connection_iface(NmCli * nmc, - NMConnection * con, +set_connection_iface(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { if (value) { /* Special value of '*' means no specific interface name */ @@ -4418,15 +4421,15 @@ set_connection_iface(NmCli * nmc, } static gboolean -set_connection_master(NmCli * nmc, - NMConnection * con, +set_connection_master(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { - const GPtrArray * connections; + const GPtrArray *connections; NMSettingConnection *s_con; - const char * slave_type; + const char *slave_type; s_con = nm_connection_get_setting_connection(con); g_return_val_if_fail(s_con, FALSE); @@ -4463,16 +4466,16 @@ set_connection_master(NmCli * nmc, } static gboolean -set_bond_option(NmCli * nmc, - NMConnection * con, +set_bond_option(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { NMSettingBond *s_bond; gboolean success; - gs_free char * name = NULL; - char * p; + gs_free char *name = NULL; + char *p; s_bond = nm_connection_get_setting_bond(con); g_return_val_if_fail(s_bond, FALSE); @@ -4507,16 +4510,16 @@ set_bond_option(NmCli * nmc, } static gboolean -set_bond_monitoring_mode(NmCli * nmc, - NMConnection * con, +set_bond_monitoring_mode(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { NMSettingBond *s_bond; - gs_free char * monitor_mode = NULL; - const char * miimon_opts[] = {"miimon", "downdelay", "updelay", NULL}; - const char * arp_opts[] = {"arp-interval", "arp-ip-target", NULL}; + gs_free char *monitor_mode = NULL; + const char *miimon_opts[] = {"miimon", "downdelay", "updelay", NULL}; + const char *arp_opts[] = {"arp-interval", "arp-ip-target", NULL}; s_bond = nm_connection_get_setting_bond(con); g_return_val_if_fail(s_bond, FALSE); @@ -4547,11 +4550,11 @@ set_bond_monitoring_mode(NmCli * nmc, } static gboolean -set_bluetooth_type(NmCli * nmc, - NMConnection * con, +set_bluetooth_type(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { NMSetting *setting; @@ -4595,11 +4598,11 @@ set_bluetooth_type(NmCli * nmc, } static gboolean -set_ip4_address(NmCli * nmc, - NMConnection * con, +set_ip4_address(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { NMSettingIPConfig *s_ip4; @@ -4622,11 +4625,11 @@ set_ip4_address(NmCli * nmc, } static gboolean -set_ip6_address(NmCli * nmc, - NMConnection * con, +set_ip6_address(NmCli *nmc, + NMConnection *con, const OptionInfo *option, - const char * value, - GError ** error) + const char *value, + GError **error) { NMSettingIPConfig *s_ip6; @@ -4703,9 +4706,9 @@ _meta_abstract_get_option_info(const NMMetaAbstractInfo *abstract_info) OPTION_INFO(IP6_CONFIG, NM_SETTING_IP_CONFIG_ADDRESSES, "ip6", set_ip6_address, NULL), {0}, }; - const char * property_name, *option; + const char *property_name, *option; const NMMetaSettingInfoEditor *setting_info; - const OptionInfo * candidate; + const OptionInfo *candidate; _meta_abstract_get(abstract_info, &setting_info, @@ -4728,7 +4731,7 @@ _meta_abstract_get_option_info(const NMMetaAbstractInfo *abstract_info) static gboolean option_relevant(NMConnection *connection, const NMMetaAbstractInfo *abstract_info) { - const char * setting_name; + const char *setting_name; NMMetaPropertyInfFlags inf_flags; _meta_abstract_get(abstract_info, NULL, &setting_name, NULL, NULL, &inf_flags, NULL, NULL); @@ -4746,18 +4749,18 @@ option_relevant(NMConnection *connection, const NMMetaAbstractInfo *abstract_inf /*****************************************************************************/ static void -complete_property_name(NmCli * nmc, - NMConnection * connection, +complete_property_name(NmCli *nmc, + NMConnection *connection, NMMetaAccessorModifier modifier, - const char * prefix, - const char * postfix) + const char *prefix, + const char *postfix) { - NMSettingConnection * s_con; + NMSettingConnection *s_con; const NMMetaSettingValidPartItem *const *valid_settings_main; const NMMetaSettingValidPartItem *const *valid_settings_slave; - const char * connection_type = NULL; - const char * slave_type = NULL; - gs_free char * word_list = NULL; + const char *connection_type = NULL; + const char *slave_type = NULL; + gs_free char *word_list = NULL; NMMetaSettingType s; connection_type = nm_connection_get_connection_type(connection); @@ -4831,17 +4834,17 @@ run_rl_generator(rl_compentry_func_t *generator_func, const char *prefix) } static gboolean -complete_option(NmCli * nmc, +complete_option(NmCli *nmc, const NMMetaAbstractInfo *abstract_info, - const char * prefix, - NMConnection * context_connection) + const char *prefix, + NMConnection *context_connection) { - const OptionInfo * candidate; - const char *const * values; - gs_strfreev char ** values_to_free = NULL; + const OptionInfo *candidate; + const char *const *values; + gs_strfreev char **values_to_free = NULL; gboolean complete_filename = FALSE; const NMMetaOperationContext ctx = { - .connection = context_connection, + .connection = context_connection, }; values = nm_meta_abstract_info_complete(abstract_info, @@ -4873,7 +4876,7 @@ complete_option(NmCli * nmc, static void complete_existing_setting(NmCli *nmc, NMConnection *connection, const char *prefix) { - gs_free NMSetting ** settings = NULL; + gs_free NMSetting **settings = NULL; const NMMetaSettingInfoEditor *editor; guint i; @@ -4892,10 +4895,10 @@ complete_existing_setting(NmCli *nmc, NMConnection *connection, const char *pref } static void -complete_property(NmCli * nmc, - const char * setting_name, - const char * property, - const char * prefix, +complete_property(NmCli *nmc, + const char *setting_name, + const char *property, + const char *prefix, NMConnection *connection) { const NMMetaPropertyInfo *property_info; @@ -4928,11 +4931,11 @@ connection_remove_setting(NMConnection *connection, NMSetting *setting, GError * } static gboolean -get_value(const char ** value, - int * argc, +get_value(const char **value, + int *argc, const char *const **argv, - const char * option, - GError ** error) + const char *option, + GError **error) { if (!**argv) { g_set_error(error, @@ -4955,12 +4958,12 @@ get_value(const char ** value, } gboolean -nmc_process_connection_properties(NmCli * nmc, - NMConnection * connection, - int * argc, +nmc_process_connection_properties(NmCli *nmc, + NMConnection *connection, + int *argc, const char *const **argv, gboolean allow_setting_removal, - GError ** error) + GError **error) { /* First check if we have a slave-type, as this would mean we will not * have ip properties but possibly others, slave-type specific. @@ -4970,13 +4973,13 @@ nmc_process_connection_properties(NmCli * nmc, const NMMetaSettingValidPartItem *const *type_settings; const NMMetaSettingValidPartItem *const *slv_settings; NMMetaAccessorModifier modifier; - const char * option_orig; - const char * option; - const char * value = NULL; - const char * tmp; - const NMMetaAbstractInfo * chosen = NULL; - const char * chosen_setting_name = NULL; - const char * chosen_option = NULL; + const char *option_orig; + const char *option; + const char *value = NULL; + const char *tmp; + const NMMetaAbstractInfo *chosen = NULL; + const char *chosen_setting_name = NULL; + const char *chosen_option = NULL; NMMetaSettingType s; if (!con_settings(connection, &type_settings, &slv_settings, error)) @@ -5016,7 +5019,7 @@ nmc_process_connection_properties(NmCli * nmc, if (allow_setting_removal && modifier == NM_META_ACCESSOR_MODIFIER_SET && nm_streq(option, "remove")) { - NMSetting * ss; + NMSetting *ss; const char *setting_name; (*argc)--; @@ -5060,9 +5063,9 @@ nmc_process_connection_properties(NmCli * nmc, if ((tmp = strchr(option, '.'))) { gs_free char *option_sett = g_strndup(option, tmp - option); - const char * option_prop = &tmp[1]; - const char * option_sett_expanded; - GError * local = NULL; + const char *option_prop = &tmp[1]; + const char *option_sett_expanded; + GError *local = NULL; /* This seems like a . (such as "connection.id" or "bond.mode"), * optionally prefixed with "+| or "-". */ @@ -5208,10 +5211,10 @@ static void add_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data) { nm_auto_free_add_connection_info AddConnectionInfo *info = user_data; - NmCli * nmc = info->nmc; - NMRemoteConnection * connection; - GError * error = NULL; - const GPtrArray * connections; + NmCli *nmc = info->nmc; + NMRemoteConnection *connection; + GError *error = NULL; + const GPtrArray *connections; guint i, found; connection = nm_client_add_connection2_finish(NM_CLIENT(client), result, NULL, &error); @@ -5266,8 +5269,8 @@ add_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data) } static void -add_connection(NMClient * client, - NMConnection * connection, +add_connection(NMClient *client, + NMConnection *connection, gboolean temporary, GAsyncReadyCallback callback, gpointer user_data) @@ -5311,10 +5314,10 @@ static char ** nmcli_con_add_tab_completion(const char *text, int start, int end) { NMMetaSettingType s; - char ** match_array = NULL; - rl_compentry_func_t * generator_func = NULL; - gs_free char * no = g_strdup_printf("[%s]: ", _("no")); - gs_free char * yes = g_strdup_printf("[%s]: ", _("yes")); + char **match_array = NULL; + rl_compentry_func_t *generator_func = NULL; + gs_free char *no = g_strdup_printf("[%s]: ", _("no")); + gs_free char *yes = g_strdup_printf("[%s]: ", _("yes")); const NMMetaAbstractInfo *info; /* Disable readline's default filename completion */ @@ -5379,11 +5382,11 @@ next: static void ask_option(NmCli *nmc, NMConnection *connection, const NMMetaAbstractInfo *abstract_info) { - char * value; - GError * error = NULL; - gs_free char * prompt = NULL; + char *value; + GError *error = NULL; + gs_free char *prompt = NULL; gboolean multi; - const char * opt_prompt, *opt_def_hint; + const char *opt_prompt, *opt_def_hint; NMMetaPropertyInfFlags inf_flags; _meta_abstract_get(abstract_info, @@ -5420,8 +5423,8 @@ again: static NMMetaSettingType connection_get_base_meta_setting_type(NMConnection *connection) { - const char * connection_type; - NMSetting * base_setting; + const char *connection_type; + NMSetting *base_setting; const NMMetaSettingInfoEditor *editor; connection_type = nm_connection_get_connection_type(connection); @@ -5438,7 +5441,7 @@ static void questionnaire_mandatory_ask_setting(NmCli *nmc, NMConnection *connection, NMMetaSettingType type) { const NMMetaSettingInfoEditor *editor; - const NMMetaPropertyInfo * property_info; + const NMMetaPropertyInfo *property_info; guint p; editor = &nm_meta_setting_infos_editor[type]; @@ -5516,7 +5519,7 @@ want_provide_opt_args(const NmcConfig *nmc_config, const char *type, guint num) static gboolean questionnaire_one_optional(NmCli *nmc, NMConnection *connection) { - NMMetaSettingType base; + NMMetaSettingType base; gs_unref_ptrarray GPtrArray *infos = NULL; guint i, j; gboolean already_confirmed = FALSE; @@ -5600,11 +5603,11 @@ static void do_connection_add(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - gs_free_error GError *error = NULL; - gboolean save_bool = TRUE; - gboolean seen_dash_dash = FALSE; - NMMetaSettingType s; + NMSettingConnection *s_con; + gs_free_error GError *error = NULL; + gboolean save_bool = TRUE; + gboolean seen_dash_dash = FALSE; + NMMetaSettingType s; next_arg(nmc, &argc, &argv, NULL); @@ -5679,8 +5682,8 @@ read_properties: /* If only bother when there's a type, which is not guaranteed at this point. * Otherwise, the validation will fail anyway. */ if (type) { - gs_free char * try_name = NULL; - gs_free char * default_name = NULL; + gs_free char *try_name = NULL; + gs_free char *default_name = NULL; const GPtrArray *connections; connections = nm_client_get_connections(nmc->client); @@ -5769,10 +5772,10 @@ static void uuid_display_hook(char **array, int len, int max_len) { const GPtrArray *connections; - NMConnection * con; + NMConnection *con; int i, max = 0; - char * tmp; - const char * id; + char *tmp; + const char *id; for (i = 1; i <= len; i++) { connections = nm_client_get_connections(nmc_tab_completion.nmc->client); con = nmc_find_connection(connections, "uuid", array[i], NULL, FALSE); @@ -5842,12 +5845,12 @@ static char * gen_cmd_print0(const char *text, int state) { static char **words = NULL; - char * ret = NULL; + char *ret = NULL; if (!state) { - GVariant * settings; + GVariant *settings; GVariantIter iter; - const char * setting_name; + const char *setting_name; int i = 0; settings = nm_connection_to_dbus(nmc_tab_completion.connection, @@ -5888,9 +5891,9 @@ gen_cmd_save(const char *text, int state) static rl_compentry_func_t * gen_connection_types(const char *text) { - gs_free char ** values = NULL; + gs_free char **values = NULL; const NMMetaSettingInfoEditor *editor; - GPtrArray * array; + GPtrArray *array; int i; array = g_ptr_array_new(); @@ -5918,10 +5921,10 @@ static char * gen_setting_names(const char *text, int state) { static int list_idx, len, is_slv; - const char * s_name, *a_name; + const char *s_name, *a_name; const NMMetaSettingValidPartItem *const *valid_settings_arr; - NMSettingConnection * s_con; - const char * s_type = NULL; + NMSettingConnection *s_con; + const char *s_type = NULL; if (!state) { list_idx = 0; @@ -5982,16 +5985,16 @@ gen_setting_names(const char *text, int state) static char * gen_property_names(const char *text, int state) { - NMSetting * setting = NULL; - char ** valid_props = NULL; - char * ret = NULL; - const char * line = rl_line_buffer; - const char * setting_name; - char ** strv = NULL; + NMSetting *setting = NULL; + char **valid_props = NULL; + char *ret = NULL; + const char *line = rl_line_buffer; + const char *setting_name; + char **strv = NULL; const NMMetaSettingValidPartItem *const *valid_settings_main; const NMMetaSettingValidPartItem *const *valid_settings_slave; - const char * p1; - const char * slv_type; + const char *p1; + const char *slv_type; /* Try to get the setting from 'line' - setting_name.property */ p1 = strchr(line, '.'); @@ -6046,8 +6049,8 @@ gen_compat_devices(const char *text, int state) { guint i, j = 0; const GPtrArray *devices; - const char ** compatible_devices; - char * ret; + const char **compatible_devices; + char *ret; devices = nm_client_get_devices(nmc_tab_completion.nmc->client); if (devices->len == 0) @@ -6055,9 +6058,9 @@ gen_compat_devices(const char *text, int state) compatible_devices = g_new(const char *, devices->len + 1); for (i = 0; i < devices->len; i++) { - NMDevice * dev = g_ptr_array_index(devices, i); + NMDevice *dev = g_ptr_array_index(devices, i); const char *ifname = nm_device_get_iface(dev); - NMDevice * device = NULL; + NMDevice *device = NULL; const char *spec_object = NULL; if (find_device_for_connection(nmc_tab_completion.nmc, @@ -6091,7 +6094,7 @@ _create_vpn_array(const GPtrArray *connections, gboolean uuid) array = g_new(const char *, connections->len + 1); for (c = 0; c < connections->len; c++) { NMConnection *connection = NM_CONNECTION(connections->pdata[c]); - const char * type = nm_connection_get_connection_type(connection); + const char *type = nm_connection_get_connection_type(connection); if (nm_streq0(type, NM_SETTING_VPN_SETTING_NAME)) array[idx++] = @@ -6105,8 +6108,8 @@ static char * gen_vpn_uuids(const char *text, int state) { const GPtrArray *connections; - const char ** uuids; - char * ret; + const char **uuids; + char *ret; connections = nm_client_get_connections(nm_cli_global_readline->client); if (connections->len < 1) @@ -6122,8 +6125,8 @@ static char * gen_vpn_ids(const char *text, int state) { const GPtrArray *connections; - const char ** ids; - char * ret; + const char **ids; + char *ret; connections = nm_client_get_connections(nm_cli_global_readline->client); if (connections->len < 1) @@ -6171,7 +6174,7 @@ get_gen_func_cmd_nmcli(const char *str) static gboolean should_complete_cmd(const char *line, int end, const char *cmd, int *cw_num, char **prev_word) { - char * tmp; + char *tmp; const char *word1, *word2, *word3; size_t n1, n2, n3, n4, n5, n6; gboolean word1_done, word2_done, word3_done; @@ -6305,17 +6308,17 @@ static void get_setting_and_property(const char *prompt, const char *line, NMSetting **setting_out, - char ** property_out) + char **property_out) { const NMMetaSettingValidPartItem *const *valid_settings_main; const NMMetaSettingValidPartItem *const *valid_settings_slave; - gs_unref_object NMSetting *setting = NULL; - gs_free char * property = NULL; - NMSettingConnection * s_con; - gs_free char * sett = NULL; - gs_free char * prop = NULL; - const char * s_type = NULL; - const char * setting_name; + gs_unref_object NMSetting *setting = NULL; + gs_free char *property = NULL; + NMSettingConnection *s_con; + gs_free char *sett = NULL; + gs_free char *prop = NULL; + const char *s_type = NULL; + const char *setting_name; extract_setting_and_property(prompt, line, &sett, &prop); @@ -6345,11 +6348,11 @@ get_setting_and_property(const char *prompt, } static gboolean -_get_and_check_property(const char * prompt, - const char * line, +_get_and_check_property(const char *prompt, + const char *line, const char **array, const char **array_multi, - gboolean * multi) + gboolean *multi) { gs_free char *prop = NULL; gboolean found = FALSE; @@ -6398,8 +6401,8 @@ static const char *const * get_allowed_property_values(char ***out_to_free) { gs_unref_object NMSetting *setting = NULL; - gs_free char * property = NULL; - const char *const * avals = NULL; + gs_free char *property = NULL; + const char *const *avals = NULL; get_setting_and_property(rl_prompt, rl_line_buffer, &setting, &property); if (setting && property) @@ -6444,7 +6447,7 @@ static gboolean should_complete_boolean(const char *prompt, const char *line) { gs_unref_object NMSetting *setting = NULL; - gs_free char * property = NULL; + gs_free char *property = NULL; get_setting_and_property(prompt, line, &setting, &property); return setting && property && _setting_property_is_boolean(setting, property); @@ -6477,10 +6480,10 @@ static char ** nmcli_editor_tab_completion(const char *text, int start, int end) { rl_compentry_func_t *generator_func = NULL; - const char * line = rl_line_buffer; - gs_free char * prompt_tmp = NULL; - gs_free char * word = NULL; - char ** match_array = NULL; + const char *line = rl_line_buffer; + gs_free char *prompt_tmp = NULL; + gs_free char *word = NULL; + char **match_array = NULL; size_t n1; int num; @@ -6615,11 +6618,11 @@ static void load_history_cmds(const char *uuid) { GKeyFile *kf; - char * filename; - char ** keys; - char * line; + char *filename; + char **keys; + char *line; size_t i; - GError * err = NULL; + GError *err = NULL; filename = g_build_filename(g_get_home_dir(), NMCLI_EDITOR_HISTORY, NULL); kf = g_key_file_new(); @@ -6645,13 +6648,13 @@ load_history_cmds(const char *uuid) static void save_history_cmds(const char *uuid) { - nm_auto_unref_keyfile GKeyFile *kf = NULL; - gs_free_error GError *error = NULL; - gs_free char * filename = NULL; - gs_free char * data = NULL; - HIST_ENTRY ** hist; - gsize len; - gsize i; + nm_auto_unref_keyfile GKeyFile *kf = NULL; + gs_free_error GError *error = NULL; + gs_free char *filename = NULL; + gs_free char *data = NULL; + HIST_ENTRY **hist; + gsize len; + gsize i; hist = history_list(); if (!hist) @@ -6723,13 +6726,14 @@ typedef enum { NMC_EDITOR_MAIN_CMD_HELP, NMC_EDITOR_MAIN_CMD_NMCLI, NMC_EDITOR_MAIN_CMD_QUIT, + NMC_EDITOR_MAIN_CMD_ADD, } NmcEditorMainCmd; static void _split_cmd(const char *cmd, char **out_arg0, const char **out_argr) { gs_free char *arg0 = NULL; - const char * argr = NULL; + const char *argr = NULL; gsize l; NM_SET_OUT(out_arg0, NULL); @@ -6760,8 +6764,8 @@ static NmcEditorMainCmd parse_editor_main_cmd(const char *cmd, char **cmd_arg) { NmcEditorMainCmd editor_cmd = NMC_EDITOR_MAIN_CMD_UNKNOWN; - gs_free char * cmd_arg0 = NULL; - const char * cmd_argr; + gs_free char *cmd_arg0 = NULL; + const char *cmd_argr; _split_cmd(cmd, &cmd_arg0, &cmd_argr); if (!cmd_arg0) @@ -6773,6 +6777,8 @@ parse_editor_main_cmd(const char *cmd, char **cmd_arg) editor_cmd = NMC_EDITOR_MAIN_CMD_REMOVE; else if (matches(cmd_arg0, "set")) editor_cmd = NMC_EDITOR_MAIN_CMD_SET; + else if (matches(cmd_arg0, "add")) + editor_cmd = NMC_EDITOR_MAIN_CMD_ADD; else if (matches(cmd_arg0, "describe")) editor_cmd = NMC_EDITOR_MAIN_CMD_DESCRIBE; else if (matches(cmd_arg0, "print")) @@ -6854,6 +6860,11 @@ editor_main_help(const char *command) "This command sets property value.\n\n" "Example: nmcli> set con.id My connection\n")); break; + case NMC_EDITOR_MAIN_CMD_ADD: + g_print(_("add [. ] :: add property value\n\n" + "This command appends property value.\n\n" + "Example: nmcli> add ipv4.addresses 192.168.1.1/24\n")); + break; case NMC_EDITOR_MAIN_CMD_DESCRIBE: g_print(_("describe [.] :: describe property\n\n" "Shows property description. You can consult nm-settings(5) " @@ -6951,8 +6962,8 @@ static NmcEditorSubCmd parse_editor_sub_cmd(const char *cmd, char **cmd_arg) { NmcEditorSubCmd editor_cmd = NMC_EDITOR_SUB_CMD_UNKNOWN; - gs_free char * cmd_arg0 = NULL; - const char * cmd_argr; + gs_free char *cmd_arg0 = NULL; + const char *cmd_argr; _split_cmd(cmd, &cmd_arg0, &cmd_argr); if (!cmd_arg0) @@ -7074,14 +7085,14 @@ editor_sub_usage(const char *command) /*****************************************************************************/ typedef struct { - NMDevice * device; + NMDevice *device; NMActiveConnection *ac; guint monitor_id; - NmCli * nmc; + NmCli *nmc; } MonitorACInfo; static gboolean nmc_editor_cb_called; -static GError * nmc_editor_error; +static GError *nmc_editor_error; static MonitorACInfo *nmc_editor_monitor_ac; static void @@ -7107,7 +7118,7 @@ static void add_connection_editor_cb(GObject *client, GAsyncResult *result, gpointer user_data) { gs_unref_object NMRemoteConnection *connection = NULL; - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; connection = nm_client_add_connection2_finish(NM_CLIENT(client), result, NULL, &error); set_info_and_signal_editor_thread(error, NULL); @@ -7126,9 +7137,9 @@ update_connection_editor_cb(GObject *connection, GAsyncResult *result, gpointer static gboolean progress_activation_editor_cb(gpointer user_data) { - MonitorACInfo * info = (MonitorACInfo *) user_data; - NMDevice * device = info->device; - NMActiveConnection * ac = info->ac; + MonitorACInfo *info = (MonitorACInfo *) user_data; + NMDevice *device = info->device; + NMActiveConnection *ac = info->ac; NMActiveConnectionState ac_state; NMDeviceState dev_state; @@ -7174,11 +7185,11 @@ static void activate_connection_editor_cb(GObject *client, GAsyncResult *result, gpointer user_data) { ActivateConnectionInfo *info = (ActivateConnectionInfo *) user_data; - NMDevice * device = info->device; - const GPtrArray * ac_devs; - MonitorACInfo * monitor_ac_info = NULL; - NMActiveConnection * active; - GError * error = NULL; + NMDevice *device = info->device; + const GPtrArray *ac_devs; + MonitorACInfo *monitor_ac_info = NULL; + NMActiveConnection *active; + GError *error = NULL; active = nm_client_activate_connection_finish(NM_CLIENT(client), result, &error); @@ -7237,7 +7248,7 @@ static void editor_show_status_line(NMConnection *connection, gboolean dirty, gboolean temp) { NMSettingConnection *s_con; - const char * con_type, *con_id, *con_uuid; + const char *con_type, *con_id, *con_uuid; s_con = nm_connection_get_setting_connection(connection); g_assert(s_con); @@ -7296,17 +7307,17 @@ confirm_quit(const NmcConfig *nmc_config) * Return: TRUE - continue; FALSE - should quit */ static gboolean -property_edit_submenu(NmCli * nmc, - NMConnection * connection, +property_edit_submenu(NmCli *nmc, + NMConnection *connection, NMRemoteConnection **rem_con, - GWeakRef * rem_con_weak, - NMSetting * curr_setting, - const char * prop_name) + GWeakRef *rem_con_weak, + NMSetting *curr_setting, + const char *prop_name) { NmcEditorSubCmd cmdsub; gboolean set_result; - GError * tmp_err = NULL; - gs_free char * prompt = NULL; + GError *tmp_err = NULL; + gs_free char *prompt = NULL; gboolean temp_changes; /* Set global variable for use in TAB completion */ @@ -7467,8 +7478,8 @@ static void split_editor_main_cmd_args(const char *str, char **setting, char **property, char **value) { gs_free char *cmd_arg0 = NULL; - const char * cmd_argr; - const char * s; + const char *cmd_argr; + const char *s; NM_SET_OUT(setting, NULL); NM_SET_OUT(property, NULL); @@ -7489,12 +7500,12 @@ split_editor_main_cmd_args(const char *str, char **setting, char **property, cha } static NMSetting * -create_setting_by_name(const char * name, +create_setting_by_name(const char *name, const NMMetaSettingValidPartItem *const *valid_settings_main, const NMMetaSettingValidPartItem *const *valid_settings_slave) { const char *setting_name; - NMSetting * setting = NULL; + NMSetting *setting = NULL; /* Get a valid setting name */ setting_name = check_valid_name(name, valid_settings_main, valid_settings_slave, NULL); @@ -7508,15 +7519,15 @@ create_setting_by_name(const char * name, } static const char * -ask_check_setting(const NmcConfig * nmc_config, - const char * arg, +ask_check_setting(const NmcConfig *nmc_config, + const char *arg, const NMMetaSettingValidPartItem *const *valid_settings_main, const NMMetaSettingValidPartItem *const *valid_settings_slave, - const char * valid_settings_str) + const char *valid_settings_str) { gs_free char *setting_name_user = NULL; - const char * setting_name; - GError * err = NULL; + const char *setting_name; + GError *err = NULL; if (!arg) { g_print(_("Available settings: %s\n"), valid_settings_str); @@ -7538,13 +7549,13 @@ ask_check_setting(const NmcConfig * nmc_config, static const char * ask_check_property(const NmcConfig *nmc_config, - const char * arg, - const char ** valid_props, - const char * valid_props_str) + const char *arg, + const char **valid_props, + const char *valid_props_str) { gs_free_error GError *tmp_err = NULL; - gs_free char * prop_name_user = NULL; - const char * prop_name; + gs_free char *prop_name_user = NULL; + const char *prop_name; if (!arg) { g_print(_("Available properties: %s\n"), valid_props_str); @@ -7609,16 +7620,16 @@ confirm_connection_saving(const NmcConfig *nmc_config, NMConnection *local, NMCo typedef struct { guint level; - char * main_prompt; + char *main_prompt; NMSetting *curr_setting; - char ** valid_props; - char * valid_props_str; + char **valid_props; + char *valid_props_str; } NmcEditorMenuContext; static void -menu_switch_to_level0(const NmcConfig * nmc_config, +menu_switch_to_level0(const NmcConfig *nmc_config, NmcEditorMenuContext *menu_ctx, - const char * prompt) + const char *prompt) { menu_ctx->level = 0; g_free(menu_ctx->main_prompt); @@ -7631,10 +7642,10 @@ menu_switch_to_level0(const NmcConfig * nmc_config, } static void -menu_switch_to_level1(const NmcConfig * nmc_config, +menu_switch_to_level1(const NmcConfig *nmc_config, NmcEditorMenuContext *menu_ctx, - NMSetting * setting, - const char * setting_name) + NMSetting *setting, + const char *setting_name) { menu_ctx->level = 1; g_free(menu_ctx->main_prompt); @@ -7660,19 +7671,19 @@ editor_save_timeout(gpointer user_data) static gboolean editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_type) { - gs_unref_object NMRemoteConnection * rem_con = NULL; - NMSettingConnection * s_con; - NMRemoteConnection * con_tmp; + gs_unref_object NMRemoteConnection *rem_con = NULL; + NMSettingConnection *s_con; + NMRemoteConnection *con_tmp; GWeakRef weak = {{NULL}}; gboolean removed; NmcEditorMainCmd cmd; gboolean cmd_loop = TRUE; const NMMetaSettingValidPartItem *const *valid_settings_main; const NMMetaSettingValidPartItem *const *valid_settings_slave; - gs_free char * valid_settings_str = NULL; - const char * s_type = NULL; + gs_free char *valid_settings_str = NULL; + const char *s_type = NULL; gboolean temp_changes; - GError * err1 = NULL; + GError *err1 = NULL; NmcEditorMenuContext menu_ctx = {0}; s_con = nm_connection_get_setting_connection(connection); @@ -7724,15 +7735,16 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty split_editor_main_cmd_args(cmd_arg, &cmd_arg_s, &cmd_arg_p, &cmd_arg_v); switch (cmd) { + case NMC_EDITOR_MAIN_CMD_ADD: case NMC_EDITOR_MAIN_CMD_SET: /* Set property value */ if (!cmd_arg) { if (menu_ctx.level == 1) { gs_strfreev char **avals_to_free = NULL; - gs_free char * prop_val_user = NULL; - const char * prop_name; + gs_free char *prop_val_user = NULL; + const char *prop_name; const char *const *avals; - GError * tmp_err = NULL; + GError *tmp_err = NULL; prop_name = ask_check_property(&nmc->nmc_config, cmd_arg, @@ -7769,10 +7781,10 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty g_print(_("use 'goto ' first, or 'set .'\n")); } } else { - gs_free char * prop_name = NULL; + gs_free char *prop_name = NULL; gs_unref_object NMSetting *ss_created = NULL; - NMSetting * ss = NULL; - GError * tmp_err = NULL; + NMSetting *ss = NULL; + GError *tmp_err = NULL; if (cmd_arg_s) { /* setting provided as "setting.property" */ @@ -7847,7 +7859,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty if (menu_ctx.level == 0 || cmd_arg_s) { /* in top level - no setting selected yet */ const char *setting_name; - NMSetting * setting; + NMSetting *setting; const char *user_arg = cmd_arg_s ?: cmd_arg_p; setting_name = ask_check_setting(&nmc->nmc_config, @@ -7920,7 +7932,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty /* Remove setting from connection, or delete value of a property */ if (!cmd_arg) { if (menu_ctx.level == 1) { - GError * tmp_err = NULL; + GError *tmp_err = NULL; const char *prop_name; prop_name = ask_check_property(&nmc->nmc_config, @@ -7946,7 +7958,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty } else { NMSetting *ss = NULL; gboolean descr_all; - char * user_s; + char *user_s; /* cmd_arg_s != NULL means argument is "setting.property" */ descr_all = !cmd_arg_s && !menu_ctx.curr_setting; @@ -7985,16 +7997,17 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty nmc_tab_completion.setting = NULL; /* for TAB completion */ } } else { - gs_free char *prop_name = NULL; - gs_free_error GError *tmp_err = NULL; + gs_free char *prop_name = NULL; + gs_free_error GError *tmp_err = NULL; prop_name = is_property_valid(ss, cmd_arg_p, &tmp_err); if (prop_name) { if (!nmc_setting_set_property(nmc->client, ss, prop_name, - NM_META_ACCESSOR_MODIFIER_SET, - NULL, + cmd_arg_v ? NM_META_ACCESSOR_MODIFIER_DEL + : NM_META_ACCESSOR_MODIFIER_SET, + cmd_arg_v ? cmd_arg_v : NULL, &tmp_err)) { g_print(_("Error: failed to remove value of '%s': %s\n"), prop_name, @@ -8051,9 +8064,9 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty } } else { gs_unref_object NMSetting *ss_free = NULL; - NMSetting * ss = NULL; + NMSetting *ss = NULL; gboolean descr_all; - char * user_s; + char *user_s; /* cmd_arg_s != NULL means argument is "setting.property" */ descr_all = !cmd_arg_s && !menu_ctx.curr_setting; @@ -8086,7 +8099,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty print_setting_description(ss); } else { gs_free_error GError *tmp_err = NULL; - gs_free char * prop_name = NULL; + gs_free char *prop_name = NULL; prop_name = is_property_valid(ss, cmd_arg_p, &tmp_err); if (prop_name) { @@ -8120,7 +8133,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty else { NMSetting *ss = NULL; gboolean whole_setting; - char * user_s; + char *user_s; /* cmd_arg_s != NULL means argument is "setting.property" */ whole_setting = !cmd_arg_s && !menu_ctx.curr_setting; @@ -8150,7 +8163,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty editor_show_setting(ss, nmc); } else { gs_free char *prop_name = NULL; - GError * err = NULL; + GError *err = NULL; prop_name = is_property_valid(ss, cmd_arg_p, &err); if (prop_name) { @@ -8220,8 +8233,8 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty case NMC_EDITOR_MAIN_CMD_SAVE: /* Save the connection */ if (nm_connection_verify(connection, &err1)) { - gboolean temporary = FALSE; - gboolean connection_changed; + gboolean temporary = FALSE; + gboolean connection_changed; nm_auto_unref_gsource GSource *source = NULL; gboolean timeout = FALSE; gulong handler_id = 0; @@ -8338,7 +8351,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty case NMC_EDITOR_MAIN_CMD_ACTIVATE: { - GError * tmp_err = NULL; + GError *tmp_err = NULL; const char *ifname = cmd_arg_p; const char *ap_nsp = cmd_arg_v; @@ -8421,7 +8434,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty case NMC_EDITOR_MAIN_CMD_NMCLI: if (cmd_arg_p && matches(cmd_arg_p, "status-line")) { - GError * tmp_err = NULL; + GError *tmp_err = NULL; gboolean bb; if (!nmc_string_to_bool(cmd_arg_v ? g_strstrip(cmd_arg_v) : "", &bb, &tmp_err)) { g_print(_("Error: status-line: %s\n"), tmp_err->message); @@ -8429,7 +8442,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty } else nmc->editor_status_line = bb; } else if (cmd_arg_p && matches(cmd_arg_p, "save-confirmation")) { - GError * tmp_err = NULL; + GError *tmp_err = NULL; gboolean bb; if (!nmc_string_to_bool(cmd_arg_v ? g_strstrip(cmd_arg_v) : "", &bb, &tmp_err)) { g_print(_("Error: save-confirmation: %s\n"), tmp_err->message); @@ -8437,7 +8450,7 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty } else nmc->editor_save_confirmation = bb; } else if (cmd_arg_p && matches(cmd_arg_p, "show-secrets")) { - GError * tmp_err = NULL; + GError *tmp_err = NULL; gboolean bb; if (!nmc_string_to_bool(cmd_arg_v ? g_strstrip(cmd_arg_v) : "", &bb, &tmp_err)) { g_print(_("Error: show-secrets: %s\n"), tmp_err->message); @@ -8508,9 +8521,9 @@ get_ethernet_device_name(NmCli *nmc) static void editor_init_new_connection(NmCli *nmc, NMConnection *connection, const char *slave_type) { - NMSetting * setting, *base_setting; + NMSetting *setting, *base_setting; NMSettingConnection *s_con; - const char * con_type; + const char *con_type; s_con = nm_connection_get_setting_connection(connection); g_assert(s_con); @@ -8579,9 +8592,9 @@ editor_init_new_connection(NmCli *nmc, NMConnection *connection, const char *sla static void editor_init_existing_connection(NMConnection *connection) { - NMSettingIPConfig * s_ip4, *s_ip6; - NMSettingProxy * s_proxy; - NMSettingWireless * s_wireless; + NMSettingIPConfig *s_ip4, *s_ip6; + NMSettingProxy *s_proxy; + NMSettingWireless *s_wireless; NMSettingConnection *s_con; /* FIXME: this approach of connecting handlers to do something is fundamentally @@ -8623,21 +8636,21 @@ nmc_complete_connection_type(const char *prefix) static void do_connection_edit(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - const GPtrArray *connections; + const GPtrArray *connections; gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - const char * connection_type; - const char * type = NULL; - const char * con_name = NULL; - const char * con = NULL; - const char * con_id = NULL; - const char * con_uuid = NULL; - const char * con_path = NULL; - const char * con_filename = NULL; - const char * selector = NULL; - gs_free_error GError *error = NULL; - GError * err1 = NULL; - nmc_arg_t exp_args[] = {{"type", TRUE, &type, FALSE}, + NMSettingConnection *s_con; + const char *connection_type; + const char *type = NULL; + const char *con_name = NULL; + const char *con = NULL; + const char *con_id = NULL; + const char *con_uuid = NULL; + const char *con_path = NULL; + const char *con_filename = NULL; + const char *selector = NULL; + gs_free_error GError *error = NULL; + GError *err1 = NULL; + nmc_arg_t exp_args[] = {{"type", TRUE, &type, FALSE}, {"con-name", TRUE, &con_name, FALSE}, {"id", TRUE, &con_id, FALSE}, {"uuid", TRUE, &con_uuid, FALSE}, @@ -8731,7 +8744,7 @@ do_connection_edit(const NMCCommand *cmd, NmCli *nmc, int argc, const char *cons editor_init_existing_connection(connection); } else { - const char * slave_type = NULL; + const char *slave_type = NULL; gs_free char *uuid = NULL; gs_free char *default_name = NULL; gs_free char *tmp_str = NULL; @@ -8825,7 +8838,7 @@ do_connection_edit(const NMCCommand *cmd, NmCli *nmc, int argc, const char *cons static void modify_connection_cb(GObject *connection, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; + NmCli *nmc = user_data; gs_free_error GError *error = NULL; if (!nm_remote_connection_commit_changes_finish(NM_REMOTE_CONNECTION(connection), @@ -8849,10 +8862,10 @@ modify_connection_cb(GObject *connection, GAsyncResult *result, gpointer user_da static void do_connection_modify(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMConnection * connection = NULL; - NMRemoteConnection *rc = NULL; - gs_free_error GError *error = NULL; - gboolean temporary = FALSE; + NMConnection *connection = NULL; + NMRemoteConnection *rc = NULL; + gs_free_error GError *error = NULL; + gboolean temporary = FALSE; if (next_arg(nmc, &argc, &argv, "--temporary", NULL) > 0) { temporary = TRUE; @@ -8891,10 +8904,10 @@ do_connection_modify(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co static void clone_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data) { - nm_auto_free_add_connection_info AddConnectionInfo *info = user_data; - NmCli * nmc = info->nmc; - gs_unref_object NMRemoteConnection *connection = NULL; - gs_free_error GError *error = NULL; + nm_auto_free_add_connection_info AddConnectionInfo *info = user_data; + NmCli *nmc = info->nmc; + gs_unref_object NMRemoteConnection *connection = NULL; + gs_free_error GError *error = NULL; connection = nm_client_add_connection2_finish(NM_CLIENT(client), result, NULL, &error); if (error) { @@ -8917,17 +8930,17 @@ clone_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data) static void do_connection_clone(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMConnection * connection = NULL; + NMConnection *connection = NULL; gs_unref_object NMConnection *new_connection = NULL; - const char * new_name; - gs_free char * new_name_free = NULL; - gs_free char * uuid = NULL; + const char *new_name; + gs_free char *new_name_free = NULL; + gs_free char *uuid = NULL; gboolean temporary = FALSE; - gs_strfreev char ** arg_arr = NULL; + gs_strfreev char **arg_arr = NULL; int arg_num; - const char *const ** argv_ptr; - int * argc_ptr; - GError * error = NULL; + const char *const **argv_ptr; + int *argc_ptr; + GError *error = NULL; if (next_arg(nmc, &argc, &argv, "--temporary", NULL) > 0) { temporary = TRUE; @@ -8999,7 +9012,7 @@ static void delete_cb(GObject *con, GAsyncResult *result, gpointer user_data) { ConnectionCbInfo *info = (ConnectionCbInfo *) user_data; - GError * error = NULL; + GError *error = NULL; if (!nm_remote_connection_delete_finish(NM_REMOTE_CONNECTION(con), result, &error)) { if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) @@ -9018,15 +9031,15 @@ delete_cb(GObject *con, GAsyncResult *result, gpointer user_data) static void do_connection_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMConnection * connection; - ConnectionCbInfo * info = NULL; - gs_strfreev char ** arg_arr = NULL; - const char *const * arg_ptr; - guint i; - int arg_num; + NMConnection *connection; + ConnectionCbInfo *info = NULL; + gs_strfreev char **arg_arr = NULL; + const char *const *arg_ptr; + guint i; + int arg_num; nm_auto_free_gstring GString *invalid_cons = NULL; - gs_unref_ptrarray GPtrArray *found_cons = NULL; - GError * error = NULL; + gs_unref_ptrarray GPtrArray *found_cons = NULL; + GError *error = NULL; if (nmc->timeout == -1) nmc->timeout = 10; @@ -9168,10 +9181,10 @@ connection_removed(NMClient *client, NMRemoteConnection *con, NmCli *nmc) static void do_connection_monitor(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - GError * error = NULL; - guint i; + GError *error = NULL; + guint i; gs_unref_ptrarray GPtrArray *found_cons = NULL; - const GPtrArray * connections = NULL; + const GPtrArray *connections = NULL; next_arg(nmc, &argc, &argv, NULL); if (argc == 0) { @@ -9222,9 +9235,9 @@ do_connection_monitor(const NMCCommand *cmd, NmCli *nmc, int argc, const char *c static void connection_reload_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; - gs_free_error GError *error = NULL; - gs_unref_variant GVariant *ret = NULL; + NmCli *nmc = user_data; + gs_free_error GError *error = NULL; + gs_unref_variant GVariant *ret = NULL; ret = nm_dbus_call_finish(result, &error); if (error) { @@ -9261,10 +9274,10 @@ do_connection_reload(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co static void do_connection_load(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - GError * error = NULL; + GError *error = NULL; gs_strfreev char **filenames = NULL; gs_strfreev char **failures = NULL; - gs_free char * current_dir = NULL; + gs_free char *current_dir = NULL; int i; next_arg(nmc, &argc, &argv, NULL); @@ -9318,13 +9331,13 @@ do_connection_load(const NMCCommand *cmd, NmCli *nmc, int argc, const char *cons static void do_connection_import(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - gs_free_error GError *error = NULL; - const char * type = NULL, *filename = NULL; - gs_free char * type_ask = NULL; - gs_free char * filename_ask = NULL; - gs_unref_object NMConnection *connection = NULL; - NMVpnEditorPlugin * plugin; - gs_free char * service_type = NULL; + gs_free_error GError *error = NULL; + const char *type = NULL, *filename = NULL; + gs_free char *type_ask = NULL; + gs_free char *filename_ask = NULL; + gs_unref_object NMConnection *connection = NULL; + NMVpnEditorPlugin *plugin; + gs_free char *service_type = NULL; gboolean temporary = FALSE; /* Check --temporary */ @@ -9457,18 +9470,18 @@ do_connection_import(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co static void do_connection_export(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMConnection * connection = NULL; - const char * out_name = NULL; - gs_free char * out_name_ask = NULL; - const char * path = NULL; - const char * type = NULL; - NMVpnEditorPlugin *plugin; + NMConnection *connection = NULL; + const char *out_name = NULL; + gs_free char *out_name_ask = NULL; + const char *path = NULL; + const char *type = NULL; + NMVpnEditorPlugin *plugin; gs_free_error GError *error = NULL; char tmpfile[] = "/tmp/nmcli-export-temp-XXXXXX"; - gs_strfreev char ** arg_arr = NULL; + gs_strfreev char **arg_arr = NULL; int arg_num; - const char *const ** argv_ptr; - int * argc_ptr; + const char *const **argv_ptr; + int *argc_ptr; next_arg(nmc, &argc, &argv, NULL); argv_ptr = &argv; @@ -9577,8 +9590,8 @@ gen_func_connection_names(const char *text, int state) { guint i; const GPtrArray *connections; - const char ** connection_names; - char * ret; + const char **connection_names; + char *ret; connections = nm_client_get_connections(nm_cli_global_readline->client); if (connections->len == 0) @@ -9600,8 +9613,8 @@ gen_func_active_connection_names(const char *text, int state) { guint i; const GPtrArray *acs; - const char ** connections; - char * ret; + const char **connections; + char *ret; if (!nm_cli_global_readline->client) return NULL; @@ -9624,8 +9637,8 @@ gen_func_active_connection_names(const char *text, int state) static char ** nmcli_con_tab_completion(const char *text, int start, int end) { - char ** match_array = NULL; - rl_compentry_func_t * generator_func = NULL; + char **match_array = NULL; + rl_compentry_func_t *generator_func = NULL; const NMMetaAbstractInfo *info; /* Disable readline's default filename completion */ diff --git a/src/nmcli/connections.h b/src/nmcli/connections.h index 74c1fe00..782c4eaf 100644 --- a/src/nmcli/connections.h +++ b/src/nmcli/connections.h @@ -10,12 +10,12 @@ void monitor_connections(NmCli *nmc); -gboolean nmc_process_connection_properties(NmCli * nmc, - NMConnection * connection, - int * argc, +gboolean nmc_process_connection_properties(NmCli *nmc, + NMConnection *connection, + int *argc, const char *const **argv, gboolean allow_remove_setting, - GError ** error); + GError **error); NMMetaColor nmc_active_connection_state_to_color(NMActiveConnection *ac); diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c index d2e472a0..e23ef681 100644 --- a/src/nmcli/devices.c +++ b/src/nmcli/devices.c @@ -93,9 +93,10 @@ wifi_signal_to_color(guint8 strength) /*****************************************************************************/ -static gconstpointer _metagen_device_status_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_device_status_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMDevice * d = target; + NMDevice *d = target; NMActiveConnection *ac; NMC_HANDLE_COLOR(nmc_device_state_to_color(d)); @@ -152,13 +153,14 @@ const NmcMetaGenericInfo /*****************************************************************************/ -static gconstpointer _metagen_device_detail_general_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_device_detail_general_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMDevice * d = target; + NMDevice *d = target; NMActiveConnection *ac; NMDeviceStateReason state_reason; NMConnectivityState connectivity; - const char * s; + const char *s; NMC_HANDLE_COLOR(NM_META_COLOR_NONE); @@ -317,7 +319,7 @@ static NMRemoteConnection ** _device_get_available_connections(NMDevice *d, guint *out_len) { NMRemoteConnection **avail_cons; - const GPtrArray * avail_cons_arr; + const GPtrArray *avail_cons_arr; avail_cons_arr = nm_device_get_available_connections(d); if (!avail_cons_arr || avail_cons_arr->len == 0) { @@ -333,15 +335,16 @@ _device_get_available_connections(NMDevice *d, guint *out_len) return avail_cons; } -static gconstpointer _metagen_device_detail_connections_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_device_detail_connections_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMDevice *d = target; + NMDevice *d = target; gs_free NMRemoteConnection **avail_cons = NULL; guint avail_cons_len; guint i; guint j; - char ** arr = NULL; - GString * str; + char **arr = NULL; + GString *str; gboolean had_prefix; gboolean has_prefix; @@ -360,8 +363,8 @@ static gconstpointer _metagen_device_detail_connections_get_fcn(NMC_META_GENERIC j = 0; for (i = 0; i < avail_cons_len; i++) { NMRemoteConnection *ac = avail_cons[i]; - const char * ac_id = nm_connection_get_id(NM_CONNECTION(ac)); - const char * ac_uuid = nm_connection_get_uuid(NM_CONNECTION(ac)); + const char *ac_id = nm_connection_get_id(NM_CONNECTION(ac)); + const char *ac_uuid = nm_connection_get_uuid(NM_CONNECTION(ac)); if (!ac_id || !ac_uuid) { const char *ac_path = nm_connection_get_path(NM_CONNECTION(ac)); @@ -390,7 +393,7 @@ static gconstpointer _metagen_device_detail_connections_get_fcn(NMC_META_GENERIC had_prefix = FALSE; for (i = 0; i < avail_cons_len; i++) { NMRemoteConnection *ac = avail_cons[i]; - const char * p = nm_connection_get_path(NM_CONNECTION(ac)); + const char *p = nm_connection_get_path(NM_CONNECTION(ac)); if (!p) continue; @@ -447,9 +450,10 @@ const NmcMetaGenericInfo *const /*****************************************************************************/ -static gconstpointer _metagen_device_detail_capabilities_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_device_detail_capabilities_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMDevice * d = target; + NMDevice *d = target; NMDeviceCapabilities caps; guint32 speed; @@ -511,7 +515,7 @@ const NmcMetaGenericInfo /*****************************************************************************/ static gconstpointer - _metagen_device_detail_wired_properties_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +_metagen_device_detail_wired_properties_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { NMDevice *d = target; @@ -552,9 +556,9 @@ const NmcMetaGenericInfo *const /*****************************************************************************/ static gconstpointer - _metagen_device_detail_wifi_properties_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +_metagen_device_detail_wifi_properties_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMDevice * d = target; + NMDevice *d = target; NMDeviceWifiCapabilities wcaps; NMC_HANDLE_COLOR(NM_META_COLOR_NONE); @@ -649,9 +653,9 @@ const NmcMetaGenericInfo *const /*****************************************************************************/ static gconstpointer - _metagen_device_detail_interface_flags_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +_metagen_device_detail_interface_flags_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NMDevice * d = target; + NMDevice *d = target; NMDeviceInterfaceFlags flags; NMC_HANDLE_COLOR(NM_META_COLOR_NONE); @@ -1049,8 +1053,8 @@ quit(void) static int compare_devices(const void *a, const void *b) { - NMDevice * da = *(NMDevice **) a; - NMDevice * db = *(NMDevice **) b; + NMDevice *da = *(NMDevice **) a; + NMDevice *db = *(NMDevice **) b; NMActiveConnection *da_ac = nm_device_get_active_connection(da); NMActiveConnection *db_ac = nm_device_get_active_connection(db); @@ -1067,7 +1071,7 @@ NMDevice ** nmc_get_devices_sorted(NMClient *client) { const GPtrArray *devs; - NMDevice ** sorted; + NMDevice **sorted; devs = nm_client_get_devices(client); @@ -1111,9 +1115,9 @@ get_device_list(NmCli *nmc, int argc, const char *const *argv) int arg_num = argc; gs_strfreev char **arg_arr = NULL; const char *const *arg_ptr = argv; - NMDevice ** devices; - GSList * queue = NULL; - NMDevice * device; + NMDevice **devices; + GSList *queue = NULL; + NMDevice *device; int i; if (argc == 0) { @@ -1171,8 +1175,8 @@ static NMDevice * get_device(NmCli *nmc, int *argc, const char *const **argv, GError **error) { gs_free NMDevice **devices = NULL; - gs_free char * ifname_ask = NULL; - const char * ifname = NULL; + gs_free char *ifname_ask = NULL; + const char *ifname = NULL; int i; if (*argc == 0) { @@ -1245,39 +1249,39 @@ sort_access_points(const GPtrArray *aps) } typedef struct { - NmCli * nmc; + NmCli *nmc; int index; guint32 output_flags; const char *active_bssid; const char *device; - GPtrArray * output_data; + GPtrArray *output_data; } APInfo; static void fill_output_access_point(gpointer data, gpointer user_data) { - NMAccessPoint * ap = NM_ACCESS_POINT(data); - APInfo * info = (APInfo *) user_data; - NmcOutputField * arr; + NMAccessPoint *ap = NM_ACCESS_POINT(data); + APInfo *info = (APInfo *) user_data; + NmcOutputField *arr; gboolean active = FALSE; NM80211ApFlags flags; NM80211ApSecurityFlags wpa_flags, rsn_flags; guint32 freq, bitrate; guint8 strength; - GBytes * ssid; - const char * bssid; + GBytes *ssid; + const char *bssid; NM80211Mode mode; - char * channel_str; - char * freq_str; - char * ssid_str = NULL; - char * ssid_hex_str = NULL; - char * bitrate_str; - char * strength_str; - char * wpa_flags_str; - char * rsn_flags_str; - GString * security_str; - char * ap_name; - const char * sig_bars; + char *channel_str; + char *freq_str; + char *ssid_str = NULL; + char *ssid_hex_str = NULL; + char *bitrate_str; + char *strength_str; + char *wpa_flags_str; + char *rsn_flags_str; + GString *security_str; + char *ap_name; + const char *sig_bars; NMMetaColor color; if (info->active_bssid) { @@ -1413,16 +1417,16 @@ construct_header_name(const char *base, const char *spec) } static gboolean -print_bond_bridge_info(NMDevice * device, - NmCli * nmc, +print_bond_bridge_info(NMDevice *device, + NmCli *nmc, const char *group_prefix, const char *one_field) { - const GPtrArray * slaves = NULL; - GString * slaves_str; + const GPtrArray *slaves = NULL; + GString *slaves_str; int idx; const NMMetaAbstractInfo *const *tmpl; - NmcOutputField * arr; + NmcOutputField *arr; NMC_OUTPUT_DATA_DEFINE_SCOPED(out); if (NM_IS_DEVICE_BOND(device)) @@ -1434,7 +1438,7 @@ print_bond_bridge_info(NMDevice * device, slaves_str = g_string_new(NULL); for (idx = 0; slaves && idx < slaves->len; idx++) { - NMDevice * slave = g_ptr_array_index(slaves, idx); + NMDevice *slave = g_ptr_array_index(slaves, idx); const char *iface = nm_device_get_iface(slave); if (iface) { @@ -1483,11 +1487,11 @@ sanitize_team_config(const char *config) static gboolean print_team_info(NMDevice *device, NmCli *nmc, const char *group_prefix, const char *one_field) { - const GPtrArray * slaves = NULL; - GString * slaves_str; + const GPtrArray *slaves = NULL; + GString *slaves_str; int idx; const NMMetaAbstractInfo *const *tmpl; - NmcOutputField * arr; + NmcOutputField *arr; NMC_OUTPUT_DATA_DEFINE_SCOPED(out); if (NM_IS_DEVICE_TEAM(device)) @@ -1497,7 +1501,7 @@ print_team_info(NMDevice *device, NmCli *nmc, const char *group_prefix, const ch slaves_str = g_string_new(NULL); for (idx = 0; slaves && idx < slaves->len; idx++) { - NMDevice * slave = g_ptr_array_index(slaves, idx); + NMDevice *slave = g_ptr_array_index(slaves, idx); const char *iface = nm_device_get_iface(slave); if (iface) { @@ -1528,18 +1532,18 @@ print_team_info(NMDevice *device, NmCli *nmc, const char *group_prefix, const ch static gboolean show_device_info(NMDevice *device, NmCli *nmc) { - GError * error = NULL; + GError *error = NULL; NMDeviceState state = NM_DEVICE_STATE_UNKNOWN; - GArray * sections_array; + GArray *sections_array; int k; - const char * fields_str = NULL; + const char *fields_str = NULL; const NMMetaAbstractInfo *const *tmpl; - NmcOutputField * arr; + NmcOutputField *arr; gboolean was_output = FALSE; - NMIPConfig * cfg4, *cfg6; - NMDhcpConfig * dhcp4, *dhcp6; - const char * base_hdr = _("Device details"); - GPtrArray * fields_in_section = NULL; + NMIPConfig *cfg4, *cfg6; + NMDhcpConfig *dhcp4, *dhcp6; + const char *base_hdr = _("Device details"); + GPtrArray *fields_in_section = NULL; if (!nmc->required_fields || g_ascii_strcasecmp(nmc->required_fields, "common") == 0) fields_str = NMC_FIELDS_DEV_SHOW_SECTIONS_COMMON; @@ -1562,9 +1566,9 @@ show_device_info(NMDevice *device, NmCli *nmc) } { - gs_unref_array GArray *out_indices = NULL; - gs_free char * header_name = NULL; - gs_free NmcOutputField *row = NULL; + gs_unref_array GArray *out_indices = NULL; + gs_free char *header_name = NULL; + gs_free NmcOutputField *row = NULL; int i; /* Main header (pretty only) */ @@ -1676,7 +1680,7 @@ show_device_info(NMDevice *device, NmCli *nmc) /* Wireless specific information */ if ((NM_IS_DEVICE_WIFI(device))) { NMAccessPoint *active_ap = NULL; - const char * active_bssid = NULL; + const char *active_bssid = NULL; /* section AP */ if (!g_ascii_strcasecmp(nmc_fields_dev_show_sections[section_idx]->name, @@ -1701,12 +1705,12 @@ show_device_info(NMDevice *device, NmCli *nmc) { gs_unref_ptrarray GPtrArray *aps = NULL; APInfo info = { - .nmc = nmc, - .index = 1, - .output_flags = NMC_OF_FLAG_SECTION_PREFIX, - .active_bssid = active_bssid, - .device = nm_device_get_iface(device), - .output_data = out.output_data, + .nmc = nmc, + .index = 1, + .output_flags = NMC_OF_FLAG_SECTION_PREFIX, + .active_bssid = active_bssid, + .device = nm_device_get_iface(device), + .output_data = out.output_data, }; aps = sort_access_points( @@ -1908,9 +1912,9 @@ nmc_device_state_to_color(NMDevice *device) static void do_devices_status(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - GError *error = NULL; + GError *error = NULL; gs_free NMDevice **devices = NULL; - const char * fields_str = NULL; + const char *fields_str = NULL; next_arg(nmc, &argc, &argv, NULL); @@ -2020,17 +2024,17 @@ progress_cb(gpointer user_data) } typedef struct { - NmCli * nmc; - NMDevice * device; + NmCli *nmc; + NMDevice *device; NMActiveConnection *active; - char * specific_object; + char *specific_object; bool hotspot : 1; bool create : 1; } AddAndActivateInfo; static AddAndActivateInfo * -add_and_activate_info_new(NmCli * nmc, - NMDevice * device, +add_and_activate_info_new(NmCli *nmc, + NMDevice *device, gboolean hotspot, gboolean create, const char *specific_object) @@ -2103,10 +2107,10 @@ connected_state_cb(AddAndActivateInfo *info) static void add_and_activate_cb(GObject *client, GAsyncResult *result, gpointer user_data) { - nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data; - NmCli * nmc = info->nmc; - gs_unref_object NMActiveConnection *active = NULL; - gs_free_error GError *error = NULL; + nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data; + NmCli *nmc = info->nmc; + gs_unref_object NMActiveConnection *active = NULL; + gs_free_error GError *error = NULL; if (info->create) active = nm_client_add_and_activate_connection_finish(NM_CLIENT(client), result, &error); @@ -2151,7 +2155,7 @@ add_and_activate_cb(GObject *client, GAsyncResult *result, gpointer user_data) static void create_connect_connection_for_device(AddAndActivateInfo *info) { - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; /* Create new connection and tie it to the device */ @@ -2172,10 +2176,10 @@ create_connect_connection_for_device(AddAndActivateInfo *info) static void connect_device_cb(GObject *client, GAsyncResult *result, gpointer user_data) { - nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data; - NmCli * nmc = info->nmc; - gs_unref_object NMActiveConnection *active = NULL; - GError * error = NULL; + nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data; + NmCli *nmc = info->nmc; + gs_unref_object NMActiveConnection *active = NULL; + GError *error = NULL; active = nm_client_activate_connection_finish(NM_CLIENT(client), result, &error); @@ -2220,8 +2224,8 @@ connect_device_cb(GObject *client, GAsyncResult *result, gpointer user_data) static void do_device_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device = NULL; - AddAndActivateInfo *info; + NMDevice *device = NULL; + AddAndActivateInfo *info; gs_free_error GError *error = NULL; /* Set default timeout for connect operation. */ @@ -2277,8 +2281,8 @@ do_device_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const } typedef struct { - NmCli * nmc; - GSList * queue; + NmCli *nmc; + GSList *queue; guint timeout_id; gboolean cmd_disconnect; GCancellable *cancellable; @@ -2367,10 +2371,10 @@ device_cb_info_finish(DeviceCbInfo *info, NMDevice *device) static void reapply_device_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMDevice * device = NM_DEVICE(object); + NMDevice *device = NM_DEVICE(object); DeviceCbInfo *info = (DeviceCbInfo *) user_data; - NmCli * nmc = info->nmc; - GError * error = NULL; + NmCli *nmc = info->nmc; + GError *error = NULL; if (!nm_device_reapply_finish(device, result, &error)) { g_string_printf(nmc->return_text, @@ -2393,8 +2397,8 @@ reapply_device_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void do_device_reapply(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device; - DeviceCbInfo *info = NULL; + NMDevice *device; + DeviceCbInfo *info = NULL; gs_free_error GError *error = NULL; /* Set default timeout for reapply operation. */ @@ -2447,10 +2451,10 @@ NM_AUTO_DEFINE_FCN_VOID0(ModifyInfo *, _auto_free_modify_info, modify_info_free) static void modify_reapply_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMDevice * device = NM_DEVICE(object); + NMDevice *device = NM_DEVICE(object); nm_auto(_auto_free_modify_info) ModifyInfo *info = user_data; - NmCli * nmc = info->nmc; - GError * error = NULL; + NmCli *nmc = info->nmc; + GError *error = NULL; if (!nm_device_reapply_finish(device, result, &error)) { g_string_printf(nmc->return_text, @@ -2473,14 +2477,14 @@ modify_reapply_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void modify_get_applied_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMDevice * device = NM_DEVICE(object); + NMDevice *device = NM_DEVICE(object); nm_auto(_auto_free_modify_info) ModifyInfo *info = user_data; - NmCli * nmc = info->nmc; - gs_free_error GError *error = NULL; - NMConnection * connection; - guint64 version_id; - int argc; - const char *const * argv; + NmCli *nmc = info->nmc; + gs_free_error GError *error = NULL; + NMConnection *connection; + guint64 version_id; + int argc; + const char *const *argv; connection = nm_device_get_applied_connection_finish(device, result, &version_id, &error); if (!connection) { @@ -2521,8 +2525,8 @@ modify_get_applied_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void do_device_modify(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device = NULL; - ModifyInfo * info; + NMDevice *device = NULL; + ModifyInfo *info; gs_free_error GError *error = NULL; next_arg(nmc, &argc, &argv, NULL); @@ -2552,11 +2556,11 @@ do_device_modify(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const static void disconnect_device_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMDevice * device = NM_DEVICE(object); + NMDevice *device = NM_DEVICE(object); DeviceCbInfo *info = (DeviceCbInfo *) user_data; - NmCli * nmc; + NmCli *nmc; NMDeviceState state; - GError * error = NULL; + GError *error = NULL; if (!nm_device_disconnect_finish(device, result, &error)) { if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) @@ -2588,9 +2592,9 @@ disconnect_device_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void do_devices_disconnect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device; + NMDevice *device; DeviceCbInfo *info = NULL; - GSList * queue, *iter; + GSList *queue, *iter; /* Set default timeout for disconnect operation. */ if (nmc->timeout == -1) @@ -2633,10 +2637,10 @@ out: static void delete_device_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMDevice * device = NM_DEVICE(object); + NMDevice *device = NM_DEVICE(object); DeviceCbInfo *info = (DeviceCbInfo *) user_data; - NmCli * nmc = info->nmc; - GError * error = NULL; + NmCli *nmc = info->nmc; + GError *error = NULL; if (!nm_device_delete_finish(device, result, &error)) { g_string_printf(nmc->return_text, _("Error: not all devices deleted.")); @@ -2656,9 +2660,9 @@ delete_device_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void do_devices_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device; + NMDevice *device; DeviceCbInfo *info = NULL; - GSList * queue, *iter; + GSList *queue, *iter; /* Set default timeout for delete operation. */ if (nmc->timeout == -1) @@ -2814,7 +2818,7 @@ static void device_ac(NMDevice *device, GParamSpec *pspec, NmCli *nmc) { NMActiveConnection *ac = nm_device_get_active_connection(device); - const char * id = ac ? nm_active_connection_get_id(ac) : NULL; + const char *id = ac ? nm_active_connection_get_id(ac) : NULL; if (!id) return; @@ -2928,7 +2932,7 @@ static NMAccessPoint * find_ap_on_device(NMDevice *device, const char *bssid, const char *ssid, gboolean complete) { const GPtrArray *aps; - NMAccessPoint * ap = NULL; + NMAccessPoint *ap = NULL; int i; g_return_val_if_fail(NM_IS_DEVICE_WIFI(device), NULL); @@ -2954,7 +2958,7 @@ find_ap_on_device(NMDevice *device, const char *bssid, const char *ssid, gboolea if (ssid) { /* Parameter is SSID */ GBytes *candidate_ssid; - char * ssid_tmp; + char *ssid_tmp; candidate_ssid = nm_access_point_get_ssid(candidate_ap); if (!candidate_ssid) @@ -2987,8 +2991,8 @@ find_ap_on_device(NMDevice *device, const char *bssid, const char *ssid, gboolea static void show_access_point_info(NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) { - NMAccessPoint * active_ap = NULL; - const char * active_bssid = NULL; + NMAccessPoint *active_ap = NULL; + const char *active_bssid = NULL; NmcOutputField *arr; if (nm_device_get_state(NM_DEVICE(wifi)) == NM_DEVICE_STATE_ACTIVATED) { @@ -3003,12 +3007,12 @@ show_access_point_info(NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) { gs_unref_ptrarray GPtrArray *aps = NULL; APInfo info = { - .nmc = nmc, - .index = 1, - .output_flags = 0, - .active_bssid = active_bssid, - .device = nm_device_get_iface(NM_DEVICE(wifi)), - .output_data = out->output_data, + .nmc = nmc, + .index = 1, + .output_flags = 0, + .active_bssid = active_bssid, + .device = nm_device_get_iface(NM_DEVICE(wifi)), + .output_data = out->output_data, }; aps = sort_access_points(nm_device_wifi_get_access_points(wifi)); @@ -3019,21 +3023,21 @@ show_access_point_info(NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) } static void -wifi_print_aps(NMDeviceWifi * wifi, - NmCli * nmc, - GArray * _out_indices, +wifi_print_aps(NMDeviceWifi *wifi, + NmCli *nmc, + GArray *_out_indices, const NMMetaAbstractInfo *const *tmpl, - const char * bssid_user, - gboolean * bssid_found) + const char *bssid_user, + gboolean *bssid_found) { - NMAccessPoint * ap = NULL; + NMAccessPoint *ap = NULL; const GPtrArray *aps; - APInfo * info; + APInfo *info; guint i; - NmcOutputField * arr; - const char * base_hdr = _("Wi-Fi scan list"); + NmcOutputField *arr; + const char *base_hdr = _("Wi-Fi scan list"); NMC_OUTPUT_DATA_DEFINE_SCOPED(out); - gs_free char * header_name = NULL; + gs_free char *header_name = NULL; static gboolean empty_line = FALSE; if (empty_line) @@ -3097,17 +3101,17 @@ _device_wifi_get_last_scan(NMDeviceWifi *wifi) } typedef struct { - NmCli * nmc; - NMDevice ** devices; + NmCli *nmc; + NMDevice **devices; const NMMetaAbstractInfo *const *tmpl; - char * bssid_user; - GArray * out_indices; + char *bssid_user; + GArray *out_indices; gint64 rescan_cutoff_msec; guint pending; } ScanInfo; typedef struct { - ScanInfo * scan_info; + ScanInfo *scan_info; NMDeviceWifi *wifi; gulong last_scan_id; guint timeout_id; @@ -3118,7 +3122,7 @@ static void wifi_list_finish(WifiListData *wifi_list_data, gboolean force_finished) { ScanInfo *scan_info = wifi_list_data->scan_info; - NmCli * nmc = scan_info->nmc; + NmCli *nmc = scan_info->nmc; gboolean bssid_found = FALSE; guint i; @@ -3189,9 +3193,9 @@ wifi_list_rescan_retry_cb(gpointer user_data, GCancellable *cancellable) static void wifi_list_rescan_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) { - NMDeviceWifi *wifi = NM_DEVICE_WIFI(source_object); + NMDeviceWifi *wifi = NM_DEVICE_WIFI(source_object); gs_free_error GError *error = NULL; - WifiListData * wifi_list_data; + WifiListData *wifi_list_data; gboolean force_finished; gboolean done; @@ -3248,7 +3252,7 @@ wifi_list_scan_timeout(gpointer user_data) } static void -complete_aps(NMDevice ** devices, +complete_aps(NMDevice **devices, const char *ifname, const char *bssid_prefix, const char *ssid_prefix) @@ -3272,21 +3276,21 @@ nmc_complete_bssid(NMClient *client, const char *ifname, const char *bssid_prefi static void do_device_wifi_list(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - GError * error = NULL; - NMDevice * device = NULL; - const char *ifname = NULL; - const char *bssid_user = NULL; - const char *rescan = NULL; - gs_free NMDevice ** devices = NULL; - const char * fields_str = NULL; + GError *error = NULL; + NMDevice *device = NULL; + const char *ifname = NULL; + const char *bssid_user = NULL; + const char *rescan = NULL; + gs_free NMDevice **devices = NULL; + const char *fields_str = NULL; const NMMetaAbstractInfo *const *tmpl; - gs_unref_array GArray *out_indices = NULL; - int option; - gint64 rescan_cutoff_msec; - ScanInfo * scan_info = NULL; - gboolean ifname_handled; - NMDevice * ifname_handled_candidate; - guint i, j; + gs_unref_array GArray *out_indices = NULL; + int option; + gint64 rescan_cutoff_msec; + ScanInfo *scan_info = NULL; + gboolean ifname_handled; + NMDevice *ifname_handled_candidate; + guint i, j; devices = nmc_get_devices_sorted(nmc->client); @@ -3488,11 +3492,11 @@ do_device_wifi_list(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con static void activate_update2_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) { - NMRemoteConnection *remote_con = NM_REMOTE_CONNECTION(source_object); - AddAndActivateInfo *info = user_data; - NmCli * nmc = info->nmc; - gs_unref_variant GVariant *ret = NULL; - GError * error = NULL; + NMRemoteConnection *remote_con = NM_REMOTE_CONNECTION(source_object); + AddAndActivateInfo *info = user_data; + NmCli *nmc = info->nmc; + gs_unref_variant GVariant *ret = NULL; + GError *error = NULL; ret = nm_remote_connection_update2_finish(remote_con, res, &error); @@ -3515,11 +3519,11 @@ activate_update2_cb(GObject *source_object, GAsyncResult *res, gpointer user_dat } static void -save_and_activate_connection(NmCli * nmc, - NMDevice * device, +save_and_activate_connection(NmCli *nmc, + NMDevice *device, NMConnection *connection, gboolean hotspot, - const char * specific_object) + const char *specific_object) { AddAndActivateInfo *info; @@ -3551,29 +3555,29 @@ save_and_activate_connection(NmCli * nmc, static void do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device = NULL; - NMAccessPoint * ap = NULL; - NM80211ApFlags ap_flags; - NM80211ApSecurityFlags ap_wpa_flags; - NM80211ApSecurityFlags ap_rsn_flags; + NMDevice *device = NULL; + NMAccessPoint *ap = NULL; + NM80211ApFlags ap_flags; + NM80211ApSecurityFlags ap_wpa_flags; + NM80211ApSecurityFlags ap_rsn_flags; gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - NMSettingWireless * s_wifi; - const char * param_user = NULL; - const char * ifname = NULL; - const char * bssid = NULL; - const char * password = NULL; - const char * con_name = NULL; + NMSettingConnection *s_con; + NMSettingWireless *s_wifi; + const char *param_user = NULL; + const char *ifname = NULL; + const char *bssid = NULL; + const char *password = NULL; + const char *con_name = NULL; gboolean private = FALSE; - gboolean hidden = FALSE; - gboolean wep_passphrase = FALSE; - GByteArray *bssid1_arr = NULL; - GByteArray *bssid2_arr = NULL; + gboolean hidden = FALSE; + gboolean wep_passphrase = FALSE; + GByteArray *bssid1_arr = NULL; + GByteArray *bssid2_arr = NULL; gs_free NMDevice **devices = NULL; int devices_idx; - char * ssid_ask = NULL; - char * passwd_ask = NULL; - const GPtrArray * avail_cons; + char *ssid_ask = NULL; + char *passwd_ask = NULL; + const GPtrArray *avail_cons; gboolean name_match = FALSE; int i; @@ -3781,8 +3785,8 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char * /* For hidden SSID first scan it so that NM learns about the AP */ if (hidden) { GVariantBuilder builder, array_builder; - GVariant * options; - GError * scan_err = NULL; + GVariant *options; + GError *scan_err = NULL; g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); g_variant_builder_init(&array_builder, G_VARIANT_TYPE("aay")); @@ -3840,7 +3844,7 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char * avail_cons = nm_device_get_available_connections(device); for (i = 0; i < avail_cons->len; i++) { NMConnection *avail_con = g_ptr_array_index(avail_cons, i); - const char * id = nm_connection_get_id(NM_CONNECTION(avail_con)); + const char *id = nm_connection_get_id(NM_CONNECTION(avail_con)); if (con_name) { if (!id || strcmp(id, con_name)) @@ -3929,7 +3933,7 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char * || (ap_rsn_flags != NM_802_11_AP_SEC_NONE && !NM_FLAGS_ANY(ap_rsn_flags, NM_802_11_AP_SEC_KEY_MGMT_OWE | NM_802_11_AP_SEC_KEY_MGMT_OWE_TM))) { - const char * con_password = NULL; + const char *con_password = NULL; NMSettingWirelessSecurity *s_wsec = NULL; if (connection) { @@ -4006,7 +4010,7 @@ static GBytes * generate_ssid_for_hotspot(void) { GBytes *ssid_bytes; - char * ssid = NULL; + char *ssid = NULL; ssid = g_strdup_printf("Hotspot-%s", g_get_host_name()); if (strlen(ssid) > 32) @@ -4059,11 +4063,11 @@ generate_wep_key(char *key, size_t len) static gboolean set_wireless_security_for_hotspot(NMSettingWirelessSecurity *s_wsec, - const char * wifi_mode, + const char *wifi_mode, NMDeviceWifiCapabilities caps, - const char * password, + const char *password, gboolean show_password, - GError ** error) + GError **error) { char generated_key[11]; const char *key; @@ -4135,15 +4139,15 @@ set_wireless_security_for_hotspot(NMSettingWirelessSecurity *s_wsec, } static NMConnection * -find_hotspot_conn(NMDevice * device, +find_hotspot_conn(NMDevice *device, const GPtrArray *connections, - const char * con_name, - GBytes * ssid_bytes, - const char * wifi_mode, - const char * band, + const char *con_name, + GBytes *ssid_bytes, + const char *wifi_mode, + const char *band, gint64 channel_int) { - NMConnection * connection; + NMConnection *connection; NMSettingWireless *s_wifi; int i; @@ -4177,19 +4181,19 @@ find_hotspot_conn(NMDevice * device, static NMConnection * create_hotspot_conn(const GPtrArray *connections, - const char * con_name, - GBytes * ssid_bytes, - const char * wifi_mode, - const char * band, + const char *con_name, + GBytes *ssid_bytes, + const char *wifi_mode, + const char *band, gint64 channel_int) { - char * default_name = NULL; - NMConnection * connection; - NMSettingConnection * s_con; - NMSettingWireless * s_wifi; + char *default_name = NULL; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; - NMSettingIPConfig * s_ip4, *s_ip6; - NMSettingProxy * s_proxy; + NMSettingIPConfig *s_ip4, *s_ip6; + NMSettingProxy *s_proxy; connection = nm_simple_connection_new(); s_con = (NMSettingConnection *) nm_setting_connection_new(); @@ -4244,22 +4248,22 @@ create_hotspot_conn(const GPtrArray *connections, static void do_device_wifi_hotspot(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - const char * ifname = NULL; - const char * con_name = NULL; - gs_unref_bytes GBytes *ssid_bytes = NULL; - const char * wifi_mode; - const char * band = NULL; - const char * channel = NULL; - gint64 channel_int = -1; - const char * password = NULL; - gboolean show_password = FALSE; - NMDevice * device = NULL; - gs_free NMDevice ** devices = NULL; - NMDeviceWifiCapabilities caps; + const char *ifname = NULL; + const char *con_name = NULL; + gs_unref_bytes GBytes *ssid_bytes = NULL; + const char *wifi_mode; + const char *band = NULL; + const char *channel = NULL; + gint64 channel_int = -1; + const char *password = NULL; + gboolean show_password = FALSE; + NMDevice *device = NULL; + gs_free NMDevice **devices = NULL; + NMDeviceWifiCapabilities caps; gs_unref_object NMConnection *connection = NULL; - const GPtrArray * connections; - NMSettingWirelessSecurity * s_wsec; - GError * error = NULL; + const GPtrArray *connections; + NMSettingWirelessSecurity *s_wsec; + GError *error = NULL; /* Set default timeout waiting for operation completion. */ if (nmc->timeout == -1) @@ -4459,7 +4463,7 @@ do_device_wifi_hotspot(const NMCCommand *cmd, NmCli *nmc, int argc, const char * static void request_rescan_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = (NmCli *) user_data; + NmCli *nmc = (NmCli *) user_data; GError *error = NULL; nm_device_wifi_request_scan_finish(NM_DEVICE_WIFI(object), result, &error); @@ -4474,13 +4478,13 @@ request_rescan_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void do_device_wifi_rescan(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device; - const char * ifname = NULL; - gs_unref_ptrarray GPtrArray *ssids = NULL; - gs_free NMDevice **devices = NULL; - GVariantBuilder builder, array_builder; - GVariant * options; - int i; + NMDevice *device; + const char *ifname = NULL; + gs_unref_ptrarray GPtrArray *ssids = NULL; + gs_free NMDevice **devices = NULL; + GVariantBuilder builder, array_builder; + GVariant *options; + int i; ssids = g_ptr_array_new(); devices = nmc_get_devices_sorted(nmc->client); @@ -4599,13 +4603,13 @@ string_append_mecard(GString *string, const char *tag, const char *text) static void print_wifi_connection(const NmcConfig *nmc_config, NMConnection *connection) { - NMSettingWireless * s_wireless; - NMSettingWirelessSecurity *s_wsec; - const char * key_mgmt = NULL; - const char * psk = NULL; - const char * type = NULL; - GBytes * ssid_bytes; - gs_free char * ssid = NULL; + NMSettingWireless *s_wireless; + NMSettingWirelessSecurity *s_wsec; + const char *key_mgmt = NULL; + const char *psk = NULL; + const char *type = NULL; + GBytes *ssid_bytes; + gs_free char *ssid = NULL; nm_auto_free_gstring GString *string = NULL; s_wireless = nm_connection_get_setting_wireless(connection); @@ -4661,9 +4665,9 @@ print_wifi_connection(const NmcConfig *nmc_config, NMConnection *connection) static gboolean wifi_show_device(const NmcConfig *nmc_config, NMDevice *device, GError **error) { - NMActiveConnection *active_conn; + NMActiveConnection *active_conn; gs_unref_object NMConnection *connection = NULL; - gs_unref_variant GVariant *secrets = NULL; + gs_unref_variant GVariant *secrets = NULL; if (!NM_IS_DEVICE_WIFI(device)) { g_set_error(error, @@ -4708,10 +4712,10 @@ wifi_show_device(const NmcConfig *nmc_config, NMDevice *device, GError **error) static void do_device_wifi_show_password(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - const char *ifname = NULL; - gs_free NMDevice **devices = NULL; - gs_free_error GError *error = NULL; - gboolean found = FALSE; + const char *ifname = NULL; + gs_free NMDevice **devices = NULL; + gs_free_error GError *error = NULL; + gboolean found = FALSE; int i; devices = nmc_get_devices_sorted(nmc->client); @@ -4795,9 +4799,9 @@ static int show_device_lldp_list(NMDevice *device, NmCli *nmc, const char *fields_str, int *counter) { const NMMetaAbstractInfo *const *tmpl; - NmcOutputField * arr; - GPtrArray * neighbors; - const char * str; + NmcOutputField *arr; + GPtrArray *neighbors; + const char *str; int i; NMC_OUTPUT_DATA_DEFINE_SCOPED(out); gs_free char *header_name = NULL; @@ -4894,10 +4898,10 @@ show_device_lldp_list(NMDevice *device, NmCli *nmc, const char *fields_str, int static void do_device_lldp_list(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice * device = NULL; - gs_free_error GError *error = NULL; - const char * fields_str = NULL; - int counter = 0; + NMDevice *device = NULL; + gs_free_error GError *error = NULL; + const char *fields_str = NULL; + int counter = 0; gs_unref_array GArray *out_indices = NULL; next_arg(nmc, &argc, &argv, NULL); @@ -4996,7 +5000,7 @@ is_single_word(const char *line) static char ** nmcli_device_tab_completion(const char *text, int start, int end) { - char ** match_array = NULL; + char **match_array = NULL; rl_compentry_func_t *generator_func = NULL; /* Disable readline's default filename completion */ diff --git a/src/nmcli/general.c b/src/nmcli/general.c index d87df17a..65437e79 100644 --- a/src/nmcli/general.c +++ b/src/nmcli/general.c @@ -108,10 +108,11 @@ static NM_UTILS_LOOKUP_DEFINE( static const NmcMetaGenericInfo *const metagen_general_status[]; -static gconstpointer _metagen_general_status_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_general_status_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NmCli * nmc = target; - const char * value; + NmCli *nmc = target; + const char *value; gboolean v_bool; NMState state; NMConnectivityState connectivity; @@ -209,12 +210,13 @@ static const NmcMetaGenericInfo /*****************************************************************************/ -static gconstpointer _metagen_general_permissions_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_general_permissions_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { NMClientPermission perm = GPOINTER_TO_UINT(target); - NmCli * nmc = environment_user_data; + NmCli *nmc = environment_user_data; NMClientPermissionResult perm_result; - const char * s; + const char *s; switch (info->info_type) { case NMC_GENERIC_INFO_TYPE_GENERAL_PERMISSIONS_PERMISSION: @@ -252,9 +254,10 @@ typedef struct { char **domains; } GetGeneralLoggingData; -static gconstpointer _metagen_general_logging_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) +static gconstpointer +_metagen_general_logging_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS) { - NmCli * nmc = environment_user_data; + NmCli *nmc = environment_user_data; GetGeneralLoggingData *d = target; nm_assert(info->info_type < _NMC_GENERIC_INFO_TYPE_GENERAL_LOGGING_NUM); @@ -466,9 +469,9 @@ static gboolean show_nm_status(NmCli *nmc, const char *pretty_header_name, const char *print_flds) { gs_free_error GError *error = NULL; - const char * fields_str; - const char * fields_all = print_flds ?: NMC_FIELDS_NM_STATUS_ALL; - const char * fields_common = print_flds ?: NMC_FIELDS_NM_STATUS_COMMON; + const char *fields_str; + const char *fields_all = print_flds ?: NMC_FIELDS_NM_STATUS_ALL; + const char *fields_common = print_flds ?: NMC_FIELDS_NM_STATUS_COMMON; if (!nmc->required_fields || g_ascii_strcasecmp(nmc->required_fields, "common") == 0) fields_str = fields_common; @@ -519,9 +522,9 @@ timeout_cb(gpointer user_data) static void print_permissions(void *user_data) { - NmCli * nmc = user_data; + NmCli *nmc = user_data; gs_free_error GError *error = NULL; - const char * fields_str = NULL; + const char *fields_str = NULL; gpointer permissions[G_N_ELEMENTS(nm_auth_permission_sorted) + 1]; gboolean is_running; int i; @@ -603,9 +606,9 @@ show_nm_permissions(NmCli *nmc) static void reload_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; - gs_free_error GError *error = NULL; - gs_unref_variant GVariant *ret = NULL; + NmCli *nmc = user_data; + gs_free_error GError *error = NULL; + gs_unref_variant GVariant *ret = NULL; ret = nm_dbus_call_finish(result, &error); if (error) { @@ -622,8 +625,8 @@ static void do_general_reload(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { gs_free const char **values = NULL; - gs_free char * err_token = NULL; - gs_free char * joined = NULL; + gs_free char *err_token = NULL; + gs_free char *joined = NULL; int flags = 0; next_arg(nmc, &argc, &argv, NULL); @@ -694,13 +697,13 @@ do_general_permissions(const NMCCommand *cmd, NmCli *nmc, int argc, const char * static void show_general_logging(NmCli *nmc) { - gs_free char *level_cache = NULL; - gs_free char *domains_cache = NULL; - gs_free_error GError *error = NULL; - const char * fields_str = NULL; - GetGeneralLoggingData d = { - .level = &level_cache, - .domains = &domains_cache, + gs_free char *level_cache = NULL; + gs_free char *domains_cache = NULL; + gs_free_error GError *error = NULL; + const char *fields_str = NULL; + GetGeneralLoggingData d = { + .level = &level_cache, + .domains = &domains_cache, }; if (!nmc->required_fields || g_ascii_strcasecmp(nmc->required_fields, "common") == 0) { @@ -742,9 +745,9 @@ nmc_complete_strings_nocase(const char *prefix, ...) static void _set_logging_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; - gs_unref_variant GVariant *res = NULL; - gs_free_error GError *error = NULL; + NmCli *nmc = user_data; + gs_unref_variant GVariant *res = NULL; + gs_free_error GError *error = NULL; res = nm_client_dbus_call_finish(NM_CLIENT(object), result, &error); if (!res) { @@ -878,7 +881,7 @@ do_general_logging(const NMCCommand *cmd, NmCli *nmc, int argc, const char *cons static void save_hostname_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; + NmCli *nmc = user_data; gs_free_error GError *error = NULL; nm_client_save_hostname_finish(NM_CLIENT(object), result, &error); @@ -984,9 +987,9 @@ nmc_switch_parse_on_off(NmCli *nmc, const char *arg1, const char *arg2, gboolean static void _do_networking_on_off_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError *error = NULL; + NmCli *nmc = user_data; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; ret = nm_client_dbus_call_finish(NM_CLIENT(object), result, &error); if (!ret) { @@ -1119,7 +1122,7 @@ do_radio_all(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *arg static void _do_radio_wifi_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NmCli * nmc = user_data; + NmCli *nmc = user_data; gs_free_error GError *error = NULL; if (!nm_client_dbus_set_property_finish(NM_CLIENT(object), result, &error)) { @@ -1214,7 +1217,7 @@ static void networkmanager_running(NMClient *client, GParamSpec *param, NmCli *nmc) { gboolean running; - char * str; + char *str; running = nm_client_get_nm_running(client); str = nmc_colorize(&nmc->nmc_config, @@ -1237,7 +1240,7 @@ static void client_primary_connection(NMClient *client, GParamSpec *param, NmCli *nmc) { NMActiveConnection *primary; - const char * id; + const char *id; primary = nm_client_get_primary_connection(client); if (primary) { @@ -1255,7 +1258,7 @@ static void client_connectivity(NMClient *client, GParamSpec *param, NmCli *nmc) { NMConnectivityState connectivity; - char * str; + char *str; g_object_get(client, NM_CLIENT_CONNECTIVITY, &connectivity, NULL); str = nmc_colorize(&nmc->nmc_config, @@ -1270,7 +1273,7 @@ static void client_state(NMClient *client, GParamSpec *param, NmCli *nmc) { NMState state; - char * str; + char *str; g_object_get(client, NM_CLIENT_STATE, &state, NULL); str = nmc_colorize(&nmc->nmc_config, @@ -1284,8 +1287,8 @@ client_state(NMClient *client, GParamSpec *param, NmCli *nmc) static void device_overview(NmCli *nmc, NMDevice *device) { - GString * outbuf = g_string_sized_new(80); - char * tmp; + GString *outbuf = g_string_sized_new(80); + char *tmp; const GPtrArray *activatable; activatable = nm_device_get_available_connections(device); @@ -1392,8 +1395,8 @@ device_overview(NmCli *nmc, NMDevice *device) static void ac_overview(NmCli *nmc, NMActiveConnection *ac) { - GString * outbuf = g_string_sized_new(80); - NMIPConfig * ip; + GString *outbuf = g_string_sized_new(80); + NMIPConfig *ip; nm_auto_str_buf NMStrBuf str = NM_STR_BUF_INIT(NM_UTILS_GET_NEXT_REALLOC_SIZE_104, FALSE); if (nm_active_connection_get_master(ac)) { @@ -1463,12 +1466,12 @@ ac_overview(NmCli *nmc, NMActiveConnection *ac) void nmc_command_func_overview(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) { - NMDevice ** devices; - const GPtrArray * p; + NMDevice **devices; + const GPtrArray *p; NMActiveConnection *ac; NMMetaColor color; - NMDnsEntry * dns; - char * tmp; + NMDnsEntry *dns; + char *tmp; int i; next_arg(nmc, &argc, &argv, NULL); diff --git a/src/nmcli/generate-docs-nm-settings-nmcli.c b/src/nmcli/generate-docs-nm-settings-nmcli.c index cd1bb670..196e4d35 100644 --- a/src/nmcli/generate-docs-nm-settings-nmcli.c +++ b/src/nmcli/generate-docs-nm-settings-nmcli.c @@ -34,8 +34,8 @@ main(int argc, char *argv[]) for (i_sett_infos = 0; i_sett_infos < G_N_ELEMENTS(nm_meta_setting_infos_editor); i_sett_infos++) { const NMMetaSettingInfoEditor *sett_info = &nm_meta_setting_infos_editor[i_sett_infos]; - gs_free char * tmp_s1 = NULL; - gs_free char * tmp_s2 = NULL; + gs_free char *tmp_s1 = NULL; + gs_free char *tmp_s2 = NULL; g_print("%sgeneral->setting_name)); @@ -47,9 +47,9 @@ main(int argc, char *argv[]) for (i_property = 0; i_property < sett_info->properties_num; i_property++) { const NMMetaPropertyInfo *prop_info = sett_info->properties[i_property]; - gs_free char * tmp2 = NULL; - gs_free char * tmp3 = NULL; - gs_free char * tmp4 = NULL; + gs_free char *tmp2 = NULL; + gs_free char *tmp3 = NULL; + gs_free char *tmp4 = NULL; g_print("%sproperty_name)); diff --git a/src/nmcli/generate-docs-nm-settings-nmcli.xml b/src/nmcli/generate-docs-nm-settings-nmcli.xml index 02fd8800..1d329305 100644 --- a/src/nmcli/generate-docs-nm-settings-nmcli.xml +++ b/src/nmcli/generate-docs-nm-settings-nmcli.xml @@ -818,6 +818,8 @@ + diff --git a/src/nmcli/generate-docs-nm-settings-nmcli.xml.in b/src/nmcli/generate-docs-nm-settings-nmcli.xml.in index 02fd8800..1d329305 100644 --- a/src/nmcli/generate-docs-nm-settings-nmcli.xml.in +++ b/src/nmcli/generate-docs-nm-settings-nmcli.xml.in @@ -818,6 +818,8 @@ + diff --git a/src/nmcli/nmcli.c b/src/nmcli/nmcli.c index b2b2cd81..fae40584 100644 --- a/src/nmcli/nmcli.c +++ b/src/nmcli/nmcli.c @@ -118,7 +118,7 @@ typedef struct { } ArgsInfo; /* --- Global variables --- */ -GMainLoop * loop = NULL; +GMainLoop *loop = NULL; struct termios termios_orig; NM_CACHED_QUARK_FCN("nmcli-error-quark", nmcli_error_quark); @@ -150,10 +150,10 @@ static void complete_one(gpointer key, gpointer value, gpointer user_data) { const char **option_with_value = user_data; - const char * option = option_with_value[0]; - const char * prefix = option_with_value[1]; - const char * name = key; - const char * last; + const char *option = option_with_value[0]; + const char *prefix = option_with_value[1]; + const char *name = key; + const char *last; last = strrchr(prefix, ','); if (last) @@ -272,9 +272,9 @@ static gboolean matches_arg(NmCli *nmc, int *argc, const char *const **argv, const char *pattern, char **arg) { gs_free char *opt_free = NULL; - const char * opt = (*argv)[0]; + const char *opt = (*argv)[0]; gs_free char *arg_tmp = NULL; - const char * s; + const char *s; nm_assert(opt); nm_assert(opt[0] == '-'); @@ -377,7 +377,7 @@ check_colors_check_palette_one_file(const char *base_dir, const char *name, cons for (i = 0; i < G_N_ELEMENTS(extensions); i++) { gs_free char *filename = NULL; - char * contents; + char *contents; filename = check_colors_construct_filename(base_dir, name, term, extensions[i]); if (g_file_get_contents(filename, &contents, NULL, NULL)) @@ -470,9 +470,9 @@ check_colors_check_palette(const char *base_dir_1, static gboolean check_colors(NmcColorOption color_option, char **out_palette_str) { - const char * base_dir_1, *base_dir_2; + const char *base_dir_1, *base_dir_2; const char *const NAME = "nmcli"; - const char * term; + const char *term; *out_palette_str = NULL; @@ -681,8 +681,8 @@ parse_color_scheme(char *palette_buffer, NmcColorPalette *out_palette, GError ** static void set_colors(NmcColorOption color_option, - bool * out_use_colors, - char ** out_palette_buffer, + bool *out_use_colors, + char **out_palette_buffer, NmcColorPalette *out_palette) { gs_free char *palette_str = NULL; @@ -730,7 +730,7 @@ process_command_line(NmCli *nmc, int argc, char **argv_orig) {NULL, nmc_command_func_overview, usage, TRUE, TRUE}, }; NmcColorOption colors = NMC_USE_COLOR_AUTO; - const char * base; + const char *base; const char *const *argv; base = strrchr(argv_orig[0], '/'); diff --git a/src/nmcli/nmcli.h b/src/nmcli/nmcli.h index f1303378..157aae99 100644 --- a/src/nmcli/nmcli.h +++ b/src/nmcli/nmcli.h @@ -85,7 +85,7 @@ typedef struct _NmcMetaGenericInfo NmcMetaGenericInfo; struct _NmcOutputField { const NMMetaAbstractInfo *info; int width; /* Width in screen columns */ - void * value; /* Value of current field - char* or char** (NULL-terminated array) */ + void *value; /* Value of current field - char* or char** (NULL-terminated array) */ gboolean value_is_array; /* Whether value is char** instead of char* */ gboolean free_value; /* Whether to free the value */ NmcOfFlags flags; /* Flags - whether and how to print values/field names/headers */ @@ -118,14 +118,14 @@ typedef struct _NmCli { NMClient *client; /* Pointer to NMClient of libnm */ NMCResultCode return_value; /* Return code of nmcli */ - GString * return_text; /* Reason text */ + GString *return_text; /* Reason text */ NmcPagerData pager_data; int timeout; /* Operation timeout */ - NMSecretAgentSimple * secret_agent; /* Secret agent */ - GHashTable * pwds_hash; /* Hash table with passwords in passwd-file */ + NMSecretAgentSimple *secret_agent; /* Secret agent */ + GHashTable *pwds_hash; /* Hash table with passwords in passwd-file */ struct _NMPolkitListener *pk_listener; /* polkit agent listener */ int should_wait; /* Semaphore indicating whether nmcli should not end or not yet */ @@ -135,7 +135,7 @@ typedef struct _NmCli { const NmcConfig nmc_config; NmcConfig nmc_config_mutable; }; - char * required_fields; /* Required fields in output: '--fields' option */ + char *required_fields; /* Required fields in output: '--fields' option */ gboolean ask; /* Ask for missing parameters: option '--ask' */ gboolean complete; /* Autocomplete the command line */ gboolean editor_status_line; /* Whether to display status line in connection editor */ @@ -163,9 +163,9 @@ void nm_cli_spawn_pager(const NmcConfig *nmc_config, NmcPagerData *pager_data); void nmc_empty_output_fields(NmcOutputData *output_data); #define NMC_OUTPUT_DATA_DEFINE_SCOPED(out) \ - gs_unref_array GArray * out##_indices = NULL; \ + gs_unref_array GArray *out##_indices = NULL; \ nm_auto(nmc_empty_output_fields) NmcOutputData out = { \ - .output_data = g_ptr_array_new_full(20, g_free), \ + .output_data = g_ptr_array_new_full(20, g_free), \ } /*****************************************************************************/ diff --git a/src/nmcli/polkit-agent.c b/src/nmcli/polkit-agent.c index 7776d7e7..41567023 100644 --- a/src/nmcli/polkit-agent.c +++ b/src/nmcli/polkit-agent.c @@ -43,7 +43,7 @@ gboolean nmc_polkit_agent_init(NmCli *nmc, gboolean for_session, GError **error) { NMPolkitListener *listener; - GDBusConnection * dbus_connection = NULL; + GDBusConnection *dbus_connection = NULL; g_return_val_if_fail(error == NULL || *error == NULL, FALSE); diff --git a/src/nmcli/settings.c b/src/nmcli/settings.c index f4966400..c80d0c7c 100644 --- a/src/nmcli/settings.c +++ b/src/nmcli/settings.c @@ -24,8 +24,8 @@ static gboolean get_answer(const char *prop, const char *value) { - char * tmp_str; - char * question; + char *tmp_str; + char *question; gboolean answer = FALSE; if (value) @@ -226,7 +226,7 @@ proxy_method_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data) static void wireless_band_channel_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data) { - const char * value = NULL, *mode; + const char *value = NULL, *mode; char str[16]; NMSettingWireless *s_wireless = NM_SETTING_WIRELESS(object); @@ -257,9 +257,9 @@ static void connection_master_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data) { NMSettingConnection *s_con = NM_SETTING_CONNECTION(object); - NMConnection * connection = NM_CONNECTION(user_data); - NMSetting * s_ipv4, *s_ipv6; - const char * value, *tmp_str; + NMConnection *connection = NM_CONNECTION(user_data); + NMSetting *s_ipv4, *s_ipv6; + const char *value, *tmp_str; value = nm_setting_connection_get_master(s_con); if (value) { @@ -350,16 +350,16 @@ nmc_setting_connection_connect_handlers(NMSettingConnection *setting, NMConnecti /*****************************************************************************/ static gboolean -_set_fcn_precheck_connection_secondaries(NMClient * client, +_set_fcn_precheck_connection_secondaries(NMClient *client, const char *value, - char ** value_coerced, - GError ** error) + char **value_coerced, + GError **error) { - const GPtrArray * connections; - NMConnection * con; + const GPtrArray *connections; + NMConnection *con; gs_free const char **strv0 = NULL; - gs_strfreev char ** strv = NULL; - char ** iter; + gs_strfreev char **strv = NULL; + char **iter; gboolean modified = FALSE; strv0 = nm_strsplit_set(value, " \t,"); @@ -419,7 +419,7 @@ _env_warn_fcn_handle( fmt_l10n, /* the untranslated format string, but it is marked for translation using N_(). */ va_list ap) { - NmCli * nmc = environment_user_data; + NmCli *nmc = environment_user_data; gs_free char *m = NULL; if (nmc->complete) @@ -443,9 +443,9 @@ _env_warn_fcn_handle( static NMDevice *const * _env_get_nm_devices(const NMMetaEnvironment *environment, gpointer environment_user_data, - guint * out_len) + guint *out_len) { - NmCli * nmc = environment_user_data; + NmCli *nmc = environment_user_data; const GPtrArray *devices; nm_assert(nmc); @@ -467,9 +467,9 @@ _env_get_nm_devices(const NMMetaEnvironment *environment, static NMRemoteConnection *const * _env_get_nm_connections(const NMMetaEnvironment *environment, gpointer environment_user_data, - guint * out_len) + guint *out_len) { - NmCli * nmc = environment_user_data; + NmCli *nmc = environment_user_data; const GPtrArray *values; nm_assert(nmc); @@ -497,11 +497,11 @@ const NMMetaEnvironment *const nmc_meta_environment = &((NMMetaEnvironment){ }); static char * -get_property_val(NMSetting * setting, - const char * prop, +get_property_val(NMSetting *setting, + const char *prop, NMMetaAccessorGetType get_type, gboolean show_secrets, - GError ** error) + GError **error) { const NMMetaPropertyInfo *property_info; @@ -514,8 +514,8 @@ get_property_val(NMSetting * setting, if ((property_info = nm_meta_property_info_find_by_setting(setting, prop))) { if (property_info->property_type->get_fcn) { NMMetaAccessorGetOutFlags out_flags = NM_META_ACCESSOR_GET_OUT_FLAGS_NONE; - char * to_free = NULL; - const char * value; + char *to_free = NULL; + const char *value; value = property_info->property_type->get_fcn( property_info, @@ -560,15 +560,15 @@ nmc_setting_get_property_parsable(NMSetting *setting, const char *prop, GError * } gboolean -nmc_setting_set_property(NMClient * client, - NMSetting * setting, - const char * prop, +nmc_setting_set_property(NMClient *client, + NMSetting *setting, + const char *prop, NMMetaAccessorModifier modifier, - const char * value, - GError ** error) + const char *value, + GError **error) { const NMMetaPropertyInfo *property_info; - gs_free char * value_to_free = NULL; + gs_free char *value_to_free = NULL; gboolean success; g_return_val_if_fail(NM_IS_SETTING(setting), FALSE); @@ -639,7 +639,7 @@ char ** nmc_setting_get_valid_properties(NMSetting *setting) { const NMMetaSettingInfoEditor *setting_info; - char ** valid_props; + char **valid_props; guint i, num; setting_info = nm_meta_setting_info_editor_find_by_setting(setting); @@ -686,14 +686,14 @@ nmc_setting_get_property_allowed_values(NMSetting *setting, const char *prop, ch char * nmc_setting_get_property_desc(NMSetting *setting, const char *prop) { - gs_free char * desc_to_free = NULL; - const char * setting_desc = NULL; - const char * setting_desc_title = ""; - const char * nmcli_desc = NULL; - const char * nmcli_desc_title = ""; - const char * nmcli_nl = ""; + gs_free char *desc_to_free = NULL; + const char *setting_desc = NULL; + const char *setting_desc_title = ""; + const char *nmcli_desc = NULL; + const char *nmcli_desc_title = ""; + const char *nmcli_nl = ""; const NMMetaPropertyInfo *property_info; - const char * desc = NULL; + const char *desc = NULL; g_return_val_if_fail(NM_IS_SETTING(setting), FALSE); @@ -732,8 +732,8 @@ gboolean setting_details(const NmcConfig *nmc_config, NMSetting *setting, const char *one_prop) { const NMMetaSettingInfoEditor *setting_info; - gs_free_error GError *error = NULL; - gs_free char * fields_str = NULL; + gs_free_error GError *error = NULL; + gs_free char *fields_str = NULL; g_return_val_if_fail(NM_IS_SETTING(setting), FALSE); diff --git a/src/nmcli/settings.h b/src/nmcli/settings.h index 2dbe7607..9cbf13c4 100644 --- a/src/nmcli/settings.h +++ b/src/nmcli/settings.h @@ -17,20 +17,20 @@ void nmc_setting_ip6_connect_handlers(NMSettingIPConfig *setting); void nmc_setting_proxy_connect_handlers(NMSettingProxy *setting); void nmc_setting_wireless_connect_handlers(NMSettingWireless *setting); void nmc_setting_connection_connect_handlers(NMSettingConnection *setting, - NMConnection * connection); + NMConnection *connection); char **nmc_setting_get_valid_properties(NMSetting *setting); -char * nmc_setting_get_property_desc(NMSetting *setting, const char *prop); +char *nmc_setting_get_property_desc(NMSetting *setting, const char *prop); const char *const * nmc_setting_get_property_allowed_values(NMSetting *setting, const char *prop, char ***out_to_free); -char * nmc_setting_get_property(NMSetting *setting, const char *prop, GError **error); -char * nmc_setting_get_property_parsable(NMSetting *setting, const char *prop, GError **error); -gboolean nmc_setting_set_property(NMClient * client, - NMSetting * setting, - const char * prop, +char *nmc_setting_get_property(NMSetting *setting, const char *prop, GError **error); +char *nmc_setting_get_property_parsable(NMSetting *setting, const char *prop, GError **error); +gboolean nmc_setting_set_property(NMClient *client, + NMSetting *setting, + const char *prop, NMMetaAccessorModifier modifier, - const char * val, - GError ** error); + const char *val, + GError **error); gboolean setting_details(const NmcConfig *nmc_config, NMSetting *setting, const char *one_prop); diff --git a/src/nmcli/utils.c b/src/nmcli/utils.c index 85768c19..7645a08c 100644 --- a/src/nmcli/utils.c +++ b/src/nmcli/utils.c @@ -40,8 +40,8 @@ _meta_type_nmc_generic_info_get_name(const NMMetaAbstractInfo *abstract_info, gb static const NMMetaAbstractInfo *const * _meta_type_nmc_generic_info_get_nested(const NMMetaAbstractInfo *abstract_info, - guint * out_len, - gpointer * out_to_free) + guint *out_len, + gpointer *out_to_free) { const NmcMetaGenericInfo *info; @@ -52,16 +52,16 @@ _meta_type_nmc_generic_info_get_nested(const NMMetaAbstractInfo *abstract_info, } static gconstpointer -_meta_type_nmc_generic_info_get_fcn(const NMMetaAbstractInfo * abstract_info, - const NMMetaEnvironment * environment, +_meta_type_nmc_generic_info_get_fcn(const NMMetaAbstractInfo *abstract_info, + const NMMetaEnvironment *environment, gpointer environment_user_data, gpointer target, gpointer target_data, NMMetaAccessorGetType get_type, NMMetaAccessorGetFlags get_flags, NMMetaAccessorGetOutFlags *out_flags, - gboolean * out_is_default, - gpointer * out_to_free) + gboolean *out_is_default, + gpointer *out_to_free) { const NmcMetaGenericInfo *info = (const NmcMetaGenericInfo *) abstract_info; @@ -244,11 +244,11 @@ nmc_arg_is_option(const char *str, const char *opt_name) * Returns: TRUE on success, FALSE on an error and sets 'error' */ gboolean -nmc_parse_args(nmc_arg_t * arg_arr, +nmc_parse_args(nmc_arg_t *arg_arr, gboolean last, - int * argc, + int *argc, const char *const **argv, - GError ** error) + GError **error) { nmc_arg_t *p; gboolean found; @@ -376,7 +376,7 @@ nmc_colorize(const NmcConfig *nmc_config, NMMetaColor color, const char *fmt, .. { va_list args; gs_free char *str = NULL; - const char * ansi_seq = NULL; + const char *ansi_seq = NULL; va_start(args, fmt); str = g_strdup_vprintf(fmt, args); @@ -423,7 +423,7 @@ void nmc_filter_out_colors_inplace(char *str) { const char *p1; - char * p2; + char *p2; gboolean copy_char = TRUE; if (!str) @@ -463,7 +463,7 @@ nmc_filter_out_colors(const char *str) char * nmc_get_user_input(const char *ask_str) { - char * line = NULL; + char *line = NULL; size_t line_ln = 0; ssize_t num; @@ -489,11 +489,11 @@ int nmc_string_to_arg_array(const char *line, const char *delim, gboolean unquote, - char *** argv, - int * argc) + char ***argv, + int *argc) { gs_free const char **arr0 = NULL; - char ** arr; + char **arr; arr0 = nm_strsplit_set(line ?: "", delim ?: " \t"); if (!arr0) @@ -503,7 +503,7 @@ nmc_string_to_arg_array(const char *line, if (unquote) { int i = 0; - char * s; + char *s; size_t l; const char *quotes = "\"'"; @@ -658,17 +658,17 @@ typedef struct _PrintDataCol { } PrintDataCol; static gboolean -_output_selection_append(GArray * cols, +_output_selection_append(GArray *cols, guint parent_idx, const NMMetaSelectionItem *selection_item, - GPtrArray * gfree_keeper, - GError ** error) + GPtrArray *gfree_keeper, + GError **error) { gs_free gpointer nested_to_free = NULL; guint col_idx; guint i; const NMMetaAbstractInfo *const *nested; - NMMetaSelectionResultList * selection; + NMMetaSelectionResultList *selection; col_idx = cols->len; @@ -787,16 +787,16 @@ _output_selection_complete(GArray *cols) */ static gboolean _output_selection_parse(const NMMetaAbstractInfo *const *fields, - const char * fields_str, - PrintDataCol ** out_cols_data, - guint * out_cols_len, - GPtrArray ** out_gfree_keeper, - GError ** error) + const char *fields_str, + PrintDataCol **out_cols_data, + guint *out_cols_len, + GPtrArray **out_gfree_keeper, + GError **error) { - NMMetaSelectionResultList *selection; + NMMetaSelectionResultList *selection; gs_unref_ptrarray GPtrArray *gfree_keeper = NULL; - gs_unref_array GArray *cols = NULL; - guint i; + gs_unref_array GArray *cols = NULL; + guint i; selection = nm_meta_selection_create_parse_list(fields, fields_str, FALSE, error); if (!selection) @@ -853,15 +853,15 @@ _output_selection_parse(const NMMetaAbstractInfo *const *fields, * Caller is responsible for freeing the array. */ GArray * -parse_output_fields(const char * fields_str, +parse_output_fields(const char *fields_str, const NMMetaAbstractInfo *const *fields_array, gboolean parse_groups, - GPtrArray ** out_group_fields, - GError ** error) + GPtrArray **out_group_fields, + GError **error) { gs_free NMMetaSelectionResultList *selection = NULL; - GArray * array; - GPtrArray * group_fields = NULL; + GArray *array; + GPtrArray *group_fields = NULL; guint i; g_return_val_if_fail(!error || !*error, NULL); @@ -926,7 +926,7 @@ nmc_empty_output_fields(NmcOutputData *output_data) typedef struct { guint col_idx; const PrintDataCol *col; - const char * title; + const char *title; bool title_to_free : 1; /* whether the column should be printed. If not %TRUE, @@ -946,7 +946,7 @@ typedef struct { const PrintDataHeaderCell *header_cell; NMMetaColor color; union { - const char * plain; + const char *plain; const char *const *strv; } text; PrintDataCellFormatType text_format : 3; @@ -993,16 +993,16 @@ _print_data_cell_clear(gpointer cell_p) } static void -_print_fill(const NmcConfig * nmc_config, - gpointer const * targets, +_print_fill(const NmcConfig *nmc_config, + gpointer const *targets, gpointer targets_data, const PrintDataCol *cols, guint cols_len, - GArray ** out_header_row, - GArray ** out_cells) + GArray **out_header_row, + GArray **out_cells) { - GArray * cells; - GArray * header_row; + GArray *cells; + GArray *header_row; guint i_row, i_col; guint targets_len; NMMetaAccessorGetType text_get_type; @@ -1012,8 +1012,8 @@ _print_fill(const NmcConfig * nmc_config, g_array_set_clear_func(header_row, _print_data_header_cell_clear); for (i_col = 0; i_col < cols_len; i_col++) { - const PrintDataCol * col; - PrintDataHeaderCell * header_cell; + const PrintDataCol *col; + PrintDataHeaderCell *header_cell; guint col_idx; const NMMetaAbstractInfo *info; @@ -1064,9 +1064,9 @@ _print_fill(const NmcConfig * nmc_config, PrintDataCell *cells_line = &g_array_index(cells, PrintDataCell, i_row * header_row->len); for (i_col = 0; i_col < header_row->len; i_col++) { - char * to_free = NULL; - PrintDataCell * cell = &cells_line[i_col]; - PrintDataHeaderCell * header_cell; + char *to_free = NULL; + PrintDataCell *cell = &cells_line[i_col]; + PrintDataHeaderCell *header_cell; const NMMetaAbstractInfo *info; NMMetaAccessorGetOutFlags text_out_flags, color_out_flags; gconstpointer value; @@ -1155,7 +1155,7 @@ _print_fill(const NmcConfig * nmc_config, const PrintDataCell *cells_line = &g_array_index(cells, PrintDataCell, i_row * header_row->len); const PrintDataCell *cell = &cells_line[i_col]; - const char *const * i_strv; + const char *const *i_strv; switch (cell->text_format) { case PRINT_DATA_CELL_FORMAT_TYPE_PLAIN: @@ -1185,7 +1185,7 @@ static gboolean _print_skip_column(const NmcConfig *nmc_config, const PrintDataHeaderCell *header_cell) { const NMMetaSelectionItem *selection_item; - const NMMetaAbstractInfo * info; + const NMMetaAbstractInfo *info; selection_item = header_cell->col->selection_item; info = selection_item->info; @@ -1217,16 +1217,16 @@ _print_skip_column(const NmcConfig *nmc_config, const PrintDataHeaderCell *heade } static void -_print_do(const NmcConfig * nmc_config, - const char * header_name_no_l10n, +_print_do(const NmcConfig *nmc_config, + const char *header_name_no_l10n, guint col_len, guint row_len, const PrintDataHeaderCell *header_row, - const PrintDataCell * cells) + const PrintDataCell *cells) { - int width1, width2; - int table_width = 0; - guint i_row, i_col; + int width1, width2; + int table_width = 0; + guint i_row, i_col; nm_auto_free_gstring GString *str = NULL; g_assert(col_len); @@ -1235,7 +1235,7 @@ _print_do(const NmcConfig * nmc_config, if (nmc_config->print_output == NMC_PRINT_PRETTY && header_name_no_l10n) { gs_free char *line = NULL; int header_width; - const char * header_name = _(header_name_no_l10n); + const char *header_name = _(header_name_no_l10n); header_width = nmc_string_screen_width(header_name, NULL) + 4; @@ -1261,7 +1261,7 @@ _print_do(const NmcConfig * nmc_config, && !nmc_config->multiline_output) { for (i_col = 0; i_col < col_len; i_col++) { const PrintDataHeaderCell *header_cell = &header_row[i_col]; - const char * title; + const char *title; if (_print_skip_column(nmc_config, header_cell)) continue; @@ -1297,7 +1297,7 @@ _print_do(const NmcConfig * nmc_config, for (i_col = 0; i_col < col_len; i_col++) { const PrintDataCell *cell = ¤t_line[i_col]; - const char *const * lines = NULL; + const char *const *lines = NULL; guint i_lines, lines_len; if (_print_skip_column(nmc_config, cell->header_cell)) @@ -1318,7 +1318,7 @@ _print_do(const NmcConfig * nmc_config, for (i_lines = 0; i_lines < lines_len; i_lines++) { gs_free char *text_to_free = NULL; - const char * text; + const char *text; text = colorize_string(nmc_config, cell->color, lines[i_lines], &text_to_free); if (nmc_config->multiline_output) { @@ -1385,19 +1385,19 @@ _print_do(const NmcConfig * nmc_config, } gboolean -nmc_print(const NmcConfig * nmc_config, - gpointer const * targets, +nmc_print(const NmcConfig *nmc_config, + gpointer const *targets, gpointer targets_data, - const char * header_name_no_l10n, + const char *header_name_no_l10n, const NMMetaAbstractInfo *const *fields, - const char * fields_str, - GError ** error) + const char *fields_str, + GError **error) { gs_unref_ptrarray GPtrArray *gfree_keeper = NULL; - gs_free PrintDataCol *cols_data = NULL; - guint cols_len; - gs_unref_array GArray *header_row = NULL; - gs_unref_array GArray *cells = NULL; + gs_free PrintDataCol *cols_data = NULL; + guint cols_len; + gs_unref_array GArray *header_row = NULL; + gs_unref_array GArray *cells = NULL; if (!_output_selection_parse(fields, fields_str, &cols_data, &cols_len, &gfree_keeper, error)) return FALSE; @@ -1528,15 +1528,15 @@ nmc_terminal_spawn_pager(const NmcConfig *nmc_config) /*****************************************************************************/ static const char * -get_value_to_print(const NmcConfig * nmc_config, +get_value_to_print(const NmcConfig *nmc_config, const NmcOutputField *field, gboolean field_name, - const char * not_set_str, - char ** out_to_free) + const char *not_set_str, + char **out_to_free) { gboolean is_array = field->value_is_array; - const char * value; - const char * out; + const char *value; + const char *out; gs_free char *free_value = NULL; nm_assert(out_to_free && !*out_to_free); @@ -1569,18 +1569,18 @@ get_value_to_print(const NmcConfig * nmc_config, * of 'field_values' array. */ void -print_required_fields(const NmcConfig * nmc_config, - NmcPagerData * pager_data, +print_required_fields(const NmcConfig *nmc_config, + NmcPagerData *pager_data, NmcOfFlags of_flags, - const GArray * indices, - const char * header_name, + const GArray *indices, + const char *header_name, int indent, const NmcOutputField *field_values) { nm_auto_free_gstring GString *str = NULL; int width1, width2; int table_width = 0; - const char * not_set_str; + const char *not_set_str; int i; gboolean main_header_add = of_flags & NMC_OF_FLAG_MAIN_HEADER_ADD; gboolean main_header_only = of_flags & NMC_OF_FLAG_MAIN_HEADER_ONLY; @@ -1635,7 +1635,7 @@ print_required_fields(const NmcConfig * nmc_config, if (is_array) { gs_free char *val_to_free = NULL; - const char ** p, *val, *print_val; + const char **p, *val, *print_val; int j; /* value is a null-terminated string array */ @@ -1664,9 +1664,9 @@ print_required_fields(const NmcConfig * nmc_config, } else { gs_free char *val_to_free = NULL; gs_free char *tmp = NULL; - const char * hdr_name = (const char *) field_values[0].value; - const char * val = (const char *) field_values[idx].value; - const char * print_val; + const char *hdr_name = (const char *) field_values[0].value; + const char *val = (const char *) field_values[idx].value; + const char *print_val; /* value is a string */ @@ -1703,7 +1703,7 @@ print_required_fields(const NmcConfig * nmc_config, for (i = 0; i < indices->len; i++) { gs_free char *val_to_free = NULL; int idx; - const char * value; + const char *value; idx = g_array_index(indices, int, i); @@ -1782,7 +1782,7 @@ print_data_prepare_width(GPtrArray *output_data) for (j = 0; j < output_data->len; j++) { gboolean field_names; gs_free char *val_to_free = NULL; - const char * value; + const char *value; row = g_ptr_array_index(output_data, j); field_names = row[0].flags & NMC_OF_FLAG_FIELD_NAMES; @@ -1798,10 +1798,10 @@ print_data_prepare_width(GPtrArray *output_data) } void -print_data(const NmcConfig * nmc_config, - NmcPagerData * pager_data, - const GArray * indices, - const char * header_name, +print_data(const NmcConfig *nmc_config, + NmcPagerData *pager_data, + const GArray *indices, + const char *header_name, int indent, const NmcOutputData *out) { diff --git a/src/nmcli/utils.h b/src/nmcli/utils.h index aadaab67..c6ead55b 100644 --- a/src/nmcli/utils.h +++ b/src/nmcli/utils.h @@ -11,7 +11,7 @@ /* === Types === */ typedef struct { - const char * name; + const char *name; gboolean has_value; const char **value; gboolean mandatory; @@ -22,16 +22,16 @@ typedef struct { int next_arg(NmCli *nmc, int *argc, const char *const **argv, ...); gboolean nmc_arg_is_help(const char *arg); gboolean nmc_arg_is_option(const char *arg, const char *opt_name); -gboolean nmc_parse_args(nmc_arg_t * arg_arr, +gboolean nmc_parse_args(nmc_arg_t *arg_arr, gboolean last, - int * argc, + int *argc, const char *const **argv, - GError ** error); -char * ssid_to_hex(const char *str, gsize len); + GError **error); +char *ssid_to_hex(const char *str, gsize len); void nmc_terminal_erase_line(void); void nmc_terminal_show_progress(const char *str); pid_t nmc_terminal_spawn_pager(const NmcConfig *nmc_config); -char * nmc_colorize(const NmcConfig *nmc_config, NMMetaColor color, const char *fmt, ...) +char *nmc_colorize(const NmcConfig *nmc_config, NMMetaColor color, const char *fmt, ...) _nm_printf(3, 4); void nmc_filter_out_colors_inplace(char *str); char *nmc_filter_out_colors(const char *str); @@ -39,8 +39,8 @@ char *nmc_get_user_input(const char *ask_str); int nmc_string_to_arg_array(const char *line, const char *delim, gboolean unquote, - char *** argv, - int * argc); + char ***argv, + int *argc); char *nmc_util_strv_for_display(const char *const *strv, gboolean brackets); int nmc_string_screen_width(const char *start, const char *end); void set_val_str(NmcOutputField fields_array[], guint32 index, char *value); @@ -50,25 +50,25 @@ void set_val_arrc(NmcOutputField fields_array[], guint32 index, const char **va void set_val_color_all(NmcOutputField fields_array[], NMMetaColor color); void nmc_free_output_field_values(NmcOutputField fields_array[]); -GArray * parse_output_fields(const char * fields_str, +GArray *parse_output_fields(const char *fields_str, const NMMetaAbstractInfo *const *fields_array, gboolean parse_groups, - GPtrArray ** group_fields, - GError ** error); + GPtrArray **group_fields, + GError **error); NmcOutputField *nmc_dup_fields_array(const NMMetaAbstractInfo *const *fields, NmcOfFlags flags); void nmc_empty_output_fields(NmcOutputData *output_data); -void print_required_fields(const NmcConfig * nmc_config, - NmcPagerData * pager_data, +void print_required_fields(const NmcConfig *nmc_config, + NmcPagerData *pager_data, NmcOfFlags of_flags, - const GArray * indices, - const char * header_name, + const GArray *indices, + const char *header_name, int indent, const NmcOutputField *field_values); void print_data_prepare_width(GPtrArray *output_data); -void print_data(const NmcConfig * nmc_config, - NmcPagerData * pager_data, - const GArray * indices, - const char * header_name, +void print_data(const NmcConfig *nmc_config, + NmcPagerData *pager_data, + const GArray *indices, + const char *header_name, int indent, const NmcOutputData *out); @@ -251,8 +251,8 @@ struct _NmcMetaGenericInfo { const NMMetaType *meta_type; }; NmcGenericInfoType info_type; - const char * name; - const char * name_header; + const char *name; + const char *name_header; const NmcMetaGenericInfo *const *nested; #define NMC_META_GENERIC_INFO_GET_FCN_ARGS \ @@ -327,7 +327,7 @@ typedef enum { static inline char * nmc_meta_generic_get_enum_with_detail(NmcMetaGenericGetEnumType get_enum_type, gint64 enum_val, - const char * str_val, + const char *str_val, NMMetaAccessorGetType get_type) { if (!NM_IN_SET(get_type, NM_META_ACCESSOR_GET_TYPE_PRETTY, NM_META_ACCESSOR_GET_TYPE_PARSABLE)) @@ -359,13 +359,13 @@ nmc_meta_generic_get_enum_with_detail(NmcMetaGenericGetEnumType get_enum_type, /*****************************************************************************/ -gboolean nmc_print(const NmcConfig * nmc_config, - gpointer const * targets, +gboolean nmc_print(const NmcConfig *nmc_config, + gpointer const *targets, gpointer targets_data, - const char * header_name_no_l10n, + const char *header_name_no_l10n, const NMMetaAbstractInfo *const *fields, - const char * fields_str, - GError ** error); + const char *fields_str, + GError **error); /*****************************************************************************/ diff --git a/src/nmtui/nm-editor-bindings.c b/src/nmtui/nm-editor-bindings.c index 59474fba..22ffdfd5 100644 --- a/src/nmtui/nm-editor-bindings.c +++ b/src/nmtui/nm-editor-bindings.c @@ -55,16 +55,16 @@ nm_editor_bindings_init(void) } static gboolean -ip_addresses_with_prefix_to_strv(GBinding * binding, +ip_addresses_with_prefix_to_strv(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - GPtrArray * addrs; + GPtrArray *addrs; NMIPAddress *addr; - const char * addrstr; + const char *addrstr; guint32 prefix; - char ** strings; + char **strings; int i; addrs = g_value_get_boxed(source_value); @@ -86,16 +86,16 @@ ip_addresses_with_prefix_to_strv(GBinding * binding, } static gboolean -ip_addresses_with_prefix_from_strv(GBinding * binding, +ip_addresses_with_prefix_from_strv(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int addr_family = GPOINTER_TO_INT(user_data); - char ** strings; - GPtrArray * addrs; + char **strings; + GPtrArray *addrs; NMIPAddress *addr; - char * addrstr; + char *addrstr; int prefix; int i; @@ -165,9 +165,9 @@ ip_addresses_with_prefix_from_strv(GBinding * binding, void nm_editor_bind_ip_addresses_with_prefix_to_strv(int addr_family, gpointer source, - const char * source_property, + const char *source_property, gpointer target, - const char * target_property, + const char *target_property, GBindingFlags flags) { g_object_bind_property_full(source, @@ -182,9 +182,9 @@ nm_editor_bind_ip_addresses_with_prefix_to_strv(int addr_family, } static gboolean -ip_addresses_check_and_copy(GBinding * binding, +ip_addresses_check_and_copy(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int addr_family = GPOINTER_TO_INT(user_data); @@ -220,9 +220,9 @@ ip_addresses_check_and_copy(GBinding * binding, void nm_editor_bind_ip_addresses_to_strv(int addr_family, gpointer source, - const char * source_property, + const char *source_property, gpointer target, - const char * target_property, + const char *target_property, GBindingFlags flags) { g_object_bind_property_full(source, @@ -237,9 +237,9 @@ nm_editor_bind_ip_addresses_to_strv(int addr_family, } static gboolean -ip_gateway_to_string(GBinding * binding, +ip_gateway_to_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { g_value_set_string(target_value, g_value_get_string(source_value)); @@ -247,9 +247,9 @@ ip_gateway_to_string(GBinding * binding, } static gboolean -ip_gateway_from_string(GBinding * binding, +ip_gateway_from_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int addr_family = GPOINTER_TO_INT(user_data); @@ -264,9 +264,9 @@ ip_gateway_from_string(GBinding * binding, } static gboolean -ip_addresses_to_gateway(GBinding * binding, +ip_addresses_to_gateway(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { GPtrArray *addrs; @@ -280,9 +280,9 @@ ip_addresses_to_gateway(GBinding * binding, } static gboolean -ip_addresses_to_sensitivity(GBinding * binding, +ip_addresses_to_sensitivity(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { GPtrArray *addrs; @@ -319,8 +319,8 @@ void nm_editor_bind_ip_gateway_to_string(int addr_family, NMSettingIPConfig *source, gpointer target, - const char * target_property, - const char * target_sensitive_property, + const char *target_property, + const char *target_sensitive_property, GBindingFlags flags) { g_object_bind_property_full(source, @@ -353,14 +353,14 @@ nm_editor_bind_ip_gateway_to_string(int addr_family, } static gboolean -ip_route_transform_to_dest_string(GBinding * binding, +ip_route_transform_to_dest_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - NMIPRoute * route; + NMIPRoute *route; const char *addrstr; - char * string; + char *string; route = g_value_get_boxed(source_value); if (route) @@ -377,12 +377,12 @@ ip_route_transform_to_dest_string(GBinding * binding, } static gboolean -ip_route_transform_to_next_hop_string(GBinding * binding, +ip_route_transform_to_next_hop_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - NMIPRoute * route; + NMIPRoute *route; const char *addrstr; route = g_value_get_boxed(source_value); @@ -398,13 +398,13 @@ ip_route_transform_to_next_hop_string(GBinding * binding, } static gboolean -ip_route_transform_to_metric_string(GBinding * binding, +ip_route_transform_to_metric_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMIPRoute *route; - char * string; + char *string; route = g_value_get_boxed(source_value); if (route && nm_ip_route_get_dest(route) && nm_ip_route_get_metric(route) != -1) { @@ -416,15 +416,15 @@ ip_route_transform_to_metric_string(GBinding * binding, } static gboolean -ip_route_transform_from_dest_string(GBinding * binding, +ip_route_transform_from_dest_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int addr_family = GPOINTER_TO_INT(user_data); - NMIPRoute * route; + NMIPRoute *route; const char *text; - char * addrstr; + char *addrstr; int prefix; text = g_value_get_string(source_value); @@ -461,13 +461,13 @@ ip_route_transform_from_dest_string(GBinding * binding, } static gboolean -ip_route_transform_from_next_hop_string(GBinding * binding, +ip_route_transform_from_next_hop_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int addr_family = GPOINTER_TO_INT(user_data); - NMIPRoute * route; + NMIPRoute *route; const char *text; text = g_value_get_string(source_value); @@ -490,12 +490,12 @@ ip_route_transform_from_next_hop_string(GBinding * binding, } static gboolean -ip_route_transform_from_metric_string(GBinding * binding, +ip_route_transform_from_metric_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - NMIPRoute * route; + NMIPRoute *route; const char *text; gint64 metric; @@ -538,13 +538,13 @@ ip_route_transform_from_metric_string(GBinding * binding, void nm_editor_bind_ip_route_to_strings(int addr_family, gpointer source, - const char * source_property, + const char *source_property, gpointer dest_target, - const char * dest_target_property, + const char *dest_target_property, gpointer next_hop_target, - const char * next_hop_target_property, + const char *next_hop_target_property, gpointer metric_target, - const char * metric_target_property, + const char *metric_target_property, GBindingFlags flags) { g_object_bind_property_full(source, @@ -577,13 +577,13 @@ nm_editor_bind_ip_route_to_strings(int addr_family, } gboolean -peer_transform_to_public_key_string(GBinding * binding, +peer_transform_to_public_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - char * string; + char *string; peer = g_value_get_boxed(source_value); if (peer && nm_wireguard_peer_get_public_key(peer)) { @@ -595,13 +595,13 @@ peer_transform_to_public_key_string(GBinding * binding, } gboolean -peer_transform_to_allowed_ips_string(GBinding * binding, +peer_transform_to_allowed_ips_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - GString * string = NULL; + GString *string = NULL; guint i, len; peer = g_value_get_boxed(source_value); @@ -623,13 +623,13 @@ peer_transform_to_allowed_ips_string(GBinding * binding, } gboolean -peer_transform_to_endpoint_string(GBinding * binding, +peer_transform_to_endpoint_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - char * string; + char *string; peer = g_value_get_boxed(source_value); if (peer && nm_wireguard_peer_get_endpoint(peer)) { @@ -641,13 +641,13 @@ peer_transform_to_endpoint_string(GBinding * binding, } gboolean -peer_transform_to_preshared_key_string(GBinding * binding, +peer_transform_to_preshared_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - char * string; + char *string; peer = g_value_get_boxed(source_value); if (peer && nm_wireguard_peer_get_preshared_key(peer)) { @@ -659,13 +659,13 @@ peer_transform_to_preshared_key_string(GBinding * binding, } gboolean -peer_transform_to_persistent_keepalive_string(GBinding * binding, +peer_transform_to_persistent_keepalive_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - char * string; + char *string; peer = g_value_get_boxed(source_value); if (peer && nm_wireguard_peer_get_persistent_keepalive(peer)) { @@ -677,13 +677,13 @@ peer_transform_to_persistent_keepalive_string(GBinding * binding, } gboolean -peer_transform_from_public_key_string(GBinding * binding, +peer_transform_from_public_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - const char * text; + const char *text; text = g_value_get_string(source_value); @@ -700,14 +700,14 @@ peer_transform_from_public_key_string(GBinding * binding, } gboolean -peer_transform_from_allowed_ips_string(GBinding * binding, +peer_transform_from_allowed_ips_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - const char * text; - char ** strv; + const char *text; + char **strv; guint i; text = g_value_get_string(source_value); @@ -730,13 +730,13 @@ peer_transform_from_allowed_ips_string(GBinding * binding, } gboolean -peer_transform_from_endpoint_string(GBinding * binding, +peer_transform_from_endpoint_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - const char * text; + const char *text; text = g_value_get_string(source_value); @@ -753,13 +753,13 @@ peer_transform_from_endpoint_string(GBinding * binding, } gboolean -peer_transform_from_preshared_key_string(GBinding * binding, +peer_transform_from_preshared_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - const char * text; + const char *text; text = g_value_get_string(source_value); @@ -777,13 +777,13 @@ peer_transform_from_preshared_key_string(GBinding * binding, } gboolean -peer_transform_from_persistent_keepalive_string(GBinding * binding, +peer_transform_from_persistent_keepalive_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMWireGuardPeer *peer; - const char * text; + const char *text; text = g_value_get_string(source_value); @@ -801,12 +801,12 @@ peer_transform_from_persistent_keepalive_string(GBinding * binding, /* Wireless security method binding */ typedef struct { - NMConnection * connection; + NMConnection *connection; NMSettingWirelessSecurity *s_wsec; gboolean s_wsec_in_use; GObject *target; - char * target_property; + char *target_property; gboolean updating; } NMEditorWirelessSecurityMethodBinding; @@ -873,7 +873,7 @@ static void wireless_connection_changed(NMConnection *connection, gpointer user_data) { NMEditorWirelessSecurityMethodBinding *binding = user_data; - NMSettingWirelessSecurity * s_wsec; + NMSettingWirelessSecurity *s_wsec; if (binding->updating) return; @@ -890,7 +890,7 @@ static void wireless_security_target_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { NMEditorWirelessSecurityMethodBinding *binding = user_data; - char * method; + char *method; if (binding->updating) return; @@ -1029,14 +1029,14 @@ wireless_security_target_destroyed(gpointer user_data, GObject *ex_target) * changes. */ void -nm_editor_bind_wireless_security_method(NMConnection * connection, +nm_editor_bind_wireless_security_method(NMConnection *connection, NMSettingWirelessSecurity *s_wsec, gpointer target, - const char * target_property, + const char *target_property, GBindingFlags flags) { NMEditorWirelessSecurityMethodBinding *binding; - char * notify; + char *notify; binding = g_slice_new0(NMEditorWirelessSecurityMethodBinding); @@ -1078,8 +1078,8 @@ nm_editor_bind_wireless_security_method(NMConnection * connection, typedef struct { NMSettingWirelessSecurity *s_wsec; - GObject * entry, *key_selector; - char * entry_property, *key_selector_property; + GObject *entry, *key_selector; + char *entry_property, *key_selector_property; gboolean updating; } NMEditorWepKeyBinding; @@ -1088,7 +1088,7 @@ static void wep_key_setting_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { NMEditorWepKeyBinding *binding = user_data; - const char * key; + const char *key; int index; if (binding->updating) @@ -1107,7 +1107,7 @@ static void wep_key_ui_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { NMEditorWepKeyBinding *binding = user_data; - char * key; + char *key; int index; if (binding->updating) @@ -1180,13 +1180,13 @@ wep_key_target_destroyed(gpointer user_data, GObject *ex_target) void nm_editor_bind_wireless_security_wep_key(NMSettingWirelessSecurity *s_wsec, gpointer entry, - const char * entry_property, + const char *entry_property, gpointer key_selector, - const char * key_selector_property, + const char *key_selector_property, GBindingFlags flags) { NMEditorWepKeyBinding *binding; - char * notify; + char *notify; binding = g_slice_new0(NMEditorWepKeyBinding); binding->s_wsec = g_object_ref(s_wsec); @@ -1237,7 +1237,7 @@ nm_editor_bind_wireless_security_wep_key(NMSettingWirelessSecurity *s_wsec, /* VLAN binding */ typedef struct { - NMSettingVlan * s_vlan; + NMSettingVlan *s_vlan; NMSettingConnection *s_con; char *last_ifname_parent; @@ -1250,7 +1250,7 @@ static gboolean parse_interface_name(const char *ifname, char **parent_ifname, int *id) { const char *ifname_end; - char * end; + char *end; if (!ifname || !*ifname) return FALSE; @@ -1280,8 +1280,8 @@ static void vlan_settings_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { NMEditorVlanWidgetBinding *binding = user_data; - const char * ifname, *parent; - char * ifname_parent; + const char *ifname, *parent; + char *ifname_parent; int ifname_id, id; if (binding->updating) @@ -1341,7 +1341,7 @@ void nm_editor_bind_vlan_name(NMSettingVlan *s_vlan, NMSettingConnection *s_con) { NMEditorVlanWidgetBinding *binding; - const char * ifname; + const char *ifname; binding = g_slice_new0(NMEditorVlanWidgetBinding); binding->s_vlan = s_vlan; diff --git a/src/nmtui/nm-editor-bindings.h b/src/nmtui/nm-editor-bindings.h index a9bf51ed..ef2f36f2 100644 --- a/src/nmtui/nm-editor-bindings.h +++ b/src/nmtui/nm-editor-bindings.h @@ -10,97 +10,97 @@ void nm_editor_bindings_init(void); void nm_editor_bind_ip_addresses_with_prefix_to_strv(int family, gpointer source, - const char * source_property, + const char *source_property, gpointer target, - const char * target_property, + const char *target_property, GBindingFlags flags); void nm_editor_bind_ip_addresses_to_strv(int family, gpointer source, - const char * source_property, + const char *source_property, gpointer target, - const char * target_property, + const char *target_property, GBindingFlags flags); void nm_editor_bind_ip_gateway_to_string(int family, NMSettingIPConfig *source, gpointer target, - const char * target_property, - const char * target_sensitive_property, + const char *target_property, + const char *target_sensitive_property, GBindingFlags flags); void nm_editor_bind_ip_route_to_strings(int family, gpointer source, - const char * source_property, + const char *source_property, gpointer dest_target, - const char * dest_target_property, + const char *dest_target_property, gpointer next_hop_target, - const char * next_hop_target_property, + const char *next_hop_target_property, gpointer metric_target, - const char * metric_target_property, + const char *metric_target_property, GBindingFlags flags); -void nm_editor_bind_wireless_security_method(NMConnection * connection, +void nm_editor_bind_wireless_security_method(NMConnection *connection, NMSettingWirelessSecurity *s_wsec, gpointer target, - const char * target_property, + const char *target_property, GBindingFlags flags); void nm_editor_bind_wireless_security_wep_key(NMSettingWirelessSecurity *s_wsec, gpointer entry, - const char * entry_property, + const char *entry_property, gpointer key_selector, - const char * key_selector_property, + const char *key_selector_property, GBindingFlags flags); void nm_editor_bind_vlan_name(NMSettingVlan *s_vlan, NMSettingConnection *s_con); -gboolean peer_transform_to_public_key_string(GBinding * binding, +gboolean peer_transform_to_public_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_to_allowed_ips_string(GBinding * binding, +gboolean peer_transform_to_allowed_ips_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_to_endpoint_string(GBinding * binding, +gboolean peer_transform_to_endpoint_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_to_preshared_key_string(GBinding * binding, +gboolean peer_transform_to_preshared_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_to_persistent_keepalive_string(GBinding * binding, +gboolean peer_transform_to_persistent_keepalive_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_from_public_key_string(GBinding * binding, +gboolean peer_transform_from_public_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_from_allowed_ips_string(GBinding * binding, +gboolean peer_transform_from_allowed_ips_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_from_endpoint_string(GBinding * binding, +gboolean peer_transform_from_endpoint_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_from_preshared_key_string(GBinding * binding, +gboolean peer_transform_from_preshared_key_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); -gboolean peer_transform_from_persistent_keepalive_string(GBinding * binding, +gboolean peer_transform_from_persistent_keepalive_string(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data); #endif /* NM_EDITOR_BINDINGS_H */ diff --git a/src/nmtui/nm-editor-utils.c b/src/nmtui/nm-editor-utils.c index 2b6acbbe..a3ee7a75 100644 --- a/src/nmtui/nm-editor-utils.c +++ b/src/nmtui/nm-editor-utils.c @@ -49,9 +49,9 @@ wifi_connection_setup_func(NMConnection *connection, NMSettingConnection *s_con, static void bond_connection_setup_func(NMConnection *connection, NMSettingConnection *s_con, NMSetting *s_hw) { - NMSettingBond * s_bond = NM_SETTING_BOND(s_hw); + NMSettingBond *s_bond = NM_SETTING_BOND(s_hw); guint i; - const char * value; + const char *value; static const char *const options[] = { NM_SETTING_BOND_OPTION_MODE, NM_SETTING_BOND_OPTION_MIIMON, @@ -67,9 +67,9 @@ bond_connection_setup_func(NMConnection *connection, NMSettingConnection *s_con, } static void -wireguard_connection_setup_func(NMConnection * connection, +wireguard_connection_setup_func(NMConnection *connection, NMSettingConnection *s_con, - NMSetting * s_hw) + NMSetting *s_hw) { NMSettingIPConfig *s_ip; @@ -82,14 +82,14 @@ wireguard_connection_setup_func(NMConnection * connection, nm_connection_add_setting(connection, (NMSetting *) s_ip); } -typedef void (*NMEditorNewConnectionSetupFunc)(NMConnection * connection, +typedef void (*NMEditorNewConnectionSetupFunc)(NMConnection *connection, NMSettingConnection *s_con, - NMSetting * s_hw); + NMSetting *s_hw); typedef struct { NMEditorConnectionTypeData data; - const char * id_format; + const char *id_format; NMEditorNewConnectionSetupFunc connection_setup_func; gboolean no_autoconnect; } NMEditorConnectionTypeDataReal; @@ -127,8 +127,8 @@ sort_types(gconstpointer a, gconstpointer b) NMEditorConnectionTypeData ** nm_editor_utils_get_connection_type_list(void) { - GPtrArray * array; - NMEditorConnectionTypeDataReal * item; + GPtrArray *array; + NMEditorConnectionTypeDataReal *item; static NMEditorConnectionTypeData **list; #if 0 GHashTable *vpn_plugins_hash; @@ -291,8 +291,8 @@ static char * get_available_connection_name(const char *format, NMClient *client) { const GPtrArray *conns; - GSList * names = NULL, *iter; - char * cname = NULL; + GSList *names = NULL, *iter; + char *cname = NULL; int i = 0; nm_assert(_assert_format_int(format)); @@ -308,7 +308,7 @@ get_available_connection_name(const char *format, NMClient *client) /* Find the next available unique connection name */ for (i = 1; !cname && i < 10000; i++) { - char * temp; + char *temp; gboolean found = FALSE; NM_PRAGMA_WARNING_DISABLE("-Wformat-nonliteral") @@ -334,11 +334,11 @@ static char * get_available_iface_name(const char *try_name, NMClient *client) { const GPtrArray *connections; - NMConnection * connection; - char * new_name; + NMConnection *connection; + char *new_name; unsigned num = 1; int i = 0; - const char * ifname = NULL; + const char *ifname = NULL; connections = nm_client_get_connections(client); @@ -374,14 +374,14 @@ get_available_iface_name(const char *try_name, NMClient *client) NMConnection * nm_editor_utils_create_connection(GType type, NMConnection *master, NMClient *client) { - NMEditorConnectionTypeData ** types; + NMEditorConnectionTypeData **types; NMEditorConnectionTypeDataReal *type_data = NULL; - const char * master_setting_type = NULL, *master_uuid = NULL; + const char *master_setting_type = NULL, *master_uuid = NULL; GType master_type = G_TYPE_INVALID, slave_setting_type = G_TYPE_INVALID; - NMConnection * connection; + NMConnection *connection; NMSettingConnection *s_con; - NMSetting * s_hw, *s_slave; - char * uuid, *id, *ifname; + NMSetting *s_hw, *s_slave; + char *uuid, *id, *ifname; int i; if (master) { @@ -469,8 +469,8 @@ nm_editor_utils_create_connection(GType type, NMConnection *master, NMClient *cl NMEditorConnectionTypeData * nm_editor_utils_get_connection_type_data(NMConnection *conn) { - NMSettingConnection * s_con; - const char * conn_type; + NMSettingConnection *s_con; + const char *conn_type; GType conn_gtype; NMEditorConnectionTypeData **types; int i; diff --git a/src/nmtui/nm-editor-utils.h b/src/nmtui/nm-editor-utils.h index 5b624f93..decbc271 100644 --- a/src/nmtui/nm-editor-utils.h +++ b/src/nmtui/nm-editor-utils.h @@ -15,7 +15,7 @@ typedef struct { } NMEditorConnectionTypeData; NMEditorConnectionTypeData **nm_editor_utils_get_connection_type_list(void); -NMEditorConnectionTypeData * nm_editor_utils_get_connection_type_data(NMConnection *conn); +NMEditorConnectionTypeData *nm_editor_utils_get_connection_type_data(NMConnection *conn); NMConnection *nm_editor_utils_create_connection(GType type, NMConnection *master, NMClient *client); diff --git a/src/nmtui/nmt-address-list.c b/src/nmtui/nmt-address-list.c index 265457d6..1678f33f 100644 --- a/src/nmtui/nmt-address-list.c +++ b/src/nmtui/nmt-address-list.c @@ -32,7 +32,7 @@ G_DEFINE_TYPE(NmtAddressList, nmt_address_list, NMT_TYPE_WIDGET_LIST) typedef struct { NmtAddressListType list_type; - char ** strings; + char **strings; } NmtAddressListPrivate; enum { @@ -73,9 +73,9 @@ nmt_address_list_init(NmtAddressList *list) {} static gboolean -strings_transform_to_entry(GBinding * binding, +strings_transform_to_entry(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int n = GPOINTER_TO_INT(user_data); @@ -90,12 +90,12 @@ strings_transform_to_entry(GBinding * binding, } static gboolean -strings_transform_from_entry(GBinding * binding, +strings_transform_from_entry(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - NmtAddressList * list = NMT_ADDRESS_LIST(g_binding_get_source(binding)); + NmtAddressList *list = NMT_ADDRESS_LIST(g_binding_get_source(binding)); NmtAddressListPrivate *priv = NMT_ADDRESS_LIST_GET_PRIVATE(list); int n = GPOINTER_TO_INT(user_data); @@ -119,7 +119,7 @@ static NmtNewtWidget * nmt_address_list_create_widget(NmtWidgetList *list, int num) { NmtAddressListPrivate *priv = NMT_ADDRESS_LIST_GET_PRIVATE(list); - NmtNewtWidget * entry; + NmtNewtWidget *entry; if (priv->list_type == NMT_ADDRESS_LIST_IP4_WITH_PREFIX) entry = nmt_ip_entry_new(25, AF_INET, TRUE, FALSE); @@ -178,10 +178,10 @@ nmt_address_list_remove_clicked(NmtWidgetList *list, int num) } static void -nmt_address_list_set_property(GObject * object, +nmt_address_list_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtAddressListPrivate *priv = NMT_ADDRESS_LIST_GET_PRIVATE(object); @@ -223,7 +223,7 @@ nmt_address_list_get_property(GObject *object, guint prop_id, GValue *value, GPa static void nmt_address_list_class_init(NmtAddressListClass *list_class) { - GObjectClass * object_class = G_OBJECT_CLASS(list_class); + GObjectClass *object_class = G_OBJECT_CLASS(list_class); NmtWidgetListClass *widget_list_class = NMT_WIDGET_LIST_CLASS(list_class); g_type_class_add_private(list_class, sizeof(NmtAddressListPrivate)); diff --git a/src/nmtui/nmt-connect-connection-list.c b/src/nmtui/nmt-connect-connection-list.c index 486e1400..535cf8fd 100644 --- a/src/nmtui/nmt-connect-connection-list.c +++ b/src/nmtui/nmt-connect-connection-list.c @@ -27,7 +27,7 @@ G_DEFINE_TYPE(NmtConnectConnectionList, nmt_connect_connection_list, NMT_TYPE_NE NmtConnectConnectionListPrivate)) typedef struct { - char * name; + char *name; NMDevice *device; int sort_order; @@ -37,11 +37,11 @@ typedef struct { typedef struct { const char *name; - char * ssid; + char *ssid; - NMConnection * conn; - NMAccessPoint * ap; - NMDevice * device; + NMConnection *conn; + NMAccessPoint *ap; + NMDevice *device; NMActiveConnection *active; } NmtConnectConnection; @@ -124,7 +124,7 @@ static int get_sort_order_for_connection(NMConnection *conn) { NMSettingConnection *s_con; - const char * type; + const char *type; int i; s_con = nm_connection_get_setting_connection(conn); @@ -178,7 +178,7 @@ add_connections_for_device(NmtConnectDevice *nmtdev, const GPtrArray *connection int i; for (i = 0; i < connections->len; i++) { - NMConnection * conn = connections->pdata[i]; + NMConnection *conn = connections->pdata[i]; NMSettingConnection *s_con; s_con = nm_connection_get_setting_connection(conn); @@ -201,7 +201,7 @@ static char * hash_ap(NMAccessPoint *ap) { unsigned char input[66]; - GBytes * ssid; + GBytes *ssid; NM80211Mode mode; guint32 flags; guint32 wpa_flags; @@ -246,12 +246,12 @@ static void add_connections_for_aps(NmtConnectDevice *nmtdev, const GPtrArray *connections) { NmtConnectConnection *nmtconn; - NMConnection * conn; - NMAccessPoint * ap; - const GPtrArray * aps; - GHashTable * seen_ssids; - GBytes * ssid; - char * ap_hash; + NMConnection *conn; + NMAccessPoint *ap; + const GPtrArray *aps; + GHashTable *seen_ssids; + GBytes *ssid; + char *ap_hash; int i, c; aps = nm_device_wifi_get_access_points(NM_DEVICE_WIFI(nmtdev->device)); @@ -301,13 +301,13 @@ add_connections_for_aps(NmtConnectDevice *nmtdev, const GPtrArray *connections) } static GSList * -append_nmt_devices_for_devices(GSList * nmt_devices, +append_nmt_devices_for_devices(GSList *nmt_devices, const GPtrArray *devices, - char ** names, + char **names, const GPtrArray *connections) { NmtConnectDevice *nmtdev; - NMDevice * device; + NMDevice *device; int i, sort_order; for (i = 0; i < devices->len; i++) { @@ -337,11 +337,11 @@ append_nmt_devices_for_devices(GSList * nmt_devices, static GSList * append_nmt_devices_for_virtual_devices(GSList *nmt_devices, const GPtrArray *connections) { - NmtConnectDevice * nmtdev = NULL; + NmtConnectDevice *nmtdev = NULL; int i; - GHashTable * devices_by_name; - char * name; - NMConnection * conn; + GHashTable *devices_by_name; + char *name; + NMConnection *conn; NmtConnectConnection *nmtconn; int sort_order; @@ -381,9 +381,9 @@ append_nmt_devices_for_virtual_devices(GSList *nmt_devices, const GPtrArray *con static GSList * append_nmt_devices_for_vpns(GSList *nmt_devices, const GPtrArray *connections) { - NmtConnectDevice * nmtdev; + NmtConnectDevice *nmtdev; int i; - NMConnection * conn; + NMConnection *conn; NmtConnectConnection *nmtconn; nmtdev = g_slice_new0(NmtConnectDevice); @@ -444,14 +444,14 @@ static void nmt_connect_connection_list_rebuild(NmtConnectConnectionList *list) { NmtConnectConnectionListPrivate *priv = NMT_CONNECT_CONNECTION_LIST_GET_PRIVATE(list); - NmtNewtListbox * listbox = NMT_NEWT_LISTBOX(list); - const GPtrArray * devices, *acs, *connections; + NmtNewtListbox *listbox = NMT_NEWT_LISTBOX(list); + const GPtrArray *devices, *acs, *connections; int max_width; - char ** names, *row, active_col; - const char * strength_col; - GSList * nmt_devices, *diter, *citer; - NmtConnectDevice * nmtdev; - NmtConnectConnection * nmtconn; + char **names, *row, active_col; + const char *strength_col; + GSList *nmt_devices, *diter, *citer; + NmtConnectDevice *nmtdev; + NmtConnectConnection *nmtconn; g_slist_free_full(priv->nmt_devices, (GDestroyNotify) nmt_connect_device_free); priv->nmt_devices = NULL; @@ -599,17 +599,17 @@ nmt_connect_connection_list_class_init(NmtConnectConnectionListClass *list_class */ gboolean nmt_connect_connection_list_get_connection(NmtConnectConnectionList *list, - const char * identifier, - NMConnection ** connection, - NMDevice ** device, - NMObject ** specific_object, - NMActiveConnection ** active) + const char *identifier, + NMConnection **connection, + NMDevice **device, + NMObject **specific_object, + NMActiveConnection **active) { NmtConnectConnectionListPrivate *priv = NMT_CONNECT_CONNECTION_LIST_GET_PRIVATE(list); - GSList * diter, *citer; - NmtConnectDevice * nmtdev; - NmtConnectConnection * nmtconn = NULL; - NMConnection * conn = NULL; + GSList *diter, *citer; + NmtConnectDevice *nmtdev; + NmtConnectConnection *nmtconn = NULL; + NMConnection *conn = NULL; g_return_val_if_fail(identifier, FALSE); @@ -669,10 +669,10 @@ found: */ gboolean nmt_connect_connection_list_get_selection(NmtConnectConnectionList *list, - NMConnection ** connection, - NMDevice ** device, - NMObject ** specific_object, - NMActiveConnection ** active) + NMConnection **connection, + NMDevice **device, + NMObject **specific_object, + NMActiveConnection **active) { NmtConnectConnection *nmtconn; diff --git a/src/nmtui/nmt-connect-connection-list.h b/src/nmtui/nmt-connect-connection-list.h index 15a319b1..1eea4d04 100644 --- a/src/nmtui/nmt-connect-connection-list.h +++ b/src/nmtui/nmt-connect-connection-list.h @@ -39,15 +39,15 @@ GType nmt_connect_connection_list_get_type(void); NmtNewtWidget *nmt_connect_connection_list_new(void); gboolean nmt_connect_connection_list_get_connection(NmtConnectConnectionList *list, - const char * identifier, - NMConnection ** connection, - NMDevice ** device, - NMObject ** specific_object, - NMActiveConnection ** active); + const char *identifier, + NMConnection **connection, + NMDevice **device, + NMObject **specific_object, + NMActiveConnection **active); gboolean nmt_connect_connection_list_get_selection(NmtConnectConnectionList *list, - NMConnection ** connection, - NMDevice ** device, - NMObject ** specific_object, - NMActiveConnection ** active); + NMConnection **connection, + NMDevice **device, + NMObject **specific_object, + NMActiveConnection **active); #endif /* NMT_CONNECT_CONNECTION_LIST_H */ diff --git a/src/nmtui/nmt-device-entry.c b/src/nmtui/nmt-device-entry.c index e831f4e4..7f312bd1 100644 --- a/src/nmtui/nmt-device-entry.c +++ b/src/nmtui/nmt-device-entry.c @@ -44,8 +44,8 @@ typedef struct { char *interface_name; char *mac_address; - char * label; - NmtNewtEntry * entry; + char *label; + NmtNewtEntry *entry; NmtNewtWidget *button; gboolean updating; @@ -91,13 +91,13 @@ nmt_device_entry_new(const char *label, int width, GType hardware_type) static gboolean device_entry_parse(NmtDeviceEntry *deventry, - const char * text, - char ** interface_name, - char ** mac_address) + const char *text, + char **interface_name, + char **mac_address) { NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); guint8 buf[NM_UTILS_HWADDR_LEN_MAX]; - char ** words; + char **words; int len; *interface_name = *mac_address = NULL; @@ -151,7 +151,7 @@ static gboolean device_entry_validate(NmtNewtEntry *entry, const char *text, gpointer user_data) { NmtDeviceEntry *deventry = user_data; - char * ifname, *mac; + char *ifname, *mac; if (!device_entry_parse(deventry, text, &ifname, &mac)) return FALSE; @@ -165,8 +165,8 @@ static NMDevice * find_device_by_interface_name(NmtDeviceEntry *deventry, const char *interface_name) { NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); - const GPtrArray * devices; - NMDevice * device = NULL; + const GPtrArray *devices; + NMDevice *device = NULL; int i; devices = nm_client_get_devices(nm_client); @@ -192,14 +192,14 @@ static NMDevice * find_device_by_mac_address(NmtDeviceEntry *deventry, const char *mac_address) { NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); - const GPtrArray * devices; - NMDevice * device = NULL; + const GPtrArray *devices; + NMDevice *device = NULL; int i; devices = nm_client_get_devices(nm_client); for (i = 0; i < devices->len && !device; i++) { NMDevice *candidate = devices->pdata[i]; - char * hwaddr; + char *hwaddr; if (priv->hardware_type != G_TYPE_NONE && !G_TYPE_CHECK_INSTANCE_TYPE(candidate, priv->hardware_type)) @@ -222,9 +222,9 @@ static void update_entry(NmtDeviceEntry *deventry) { NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); - const char * ifname; - char * mac, *text; - NMDevice * ifname_device, *mac_device; + const char *ifname; + char *mac, *text; + NMDevice *ifname_device, *mac_device; if (priv->interface_name) { ifname = priv->interface_name; @@ -314,8 +314,8 @@ static void entry_text_changed(GObject *object, GParamSpec *pspec, gpointer deventry) { NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); - const char * text; - char * ifname, *mac; + const char *text; + char *ifname, *mac; if (priv->updating) return; @@ -335,7 +335,7 @@ static void nmt_device_entry_init(NmtDeviceEntry *deventry) { NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); - NmtNewtWidget * entry; + NmtNewtWidget *entry; priv->hardware_type = G_TYPE_NONE; @@ -401,7 +401,7 @@ nmt_device_entry_finalize(GObject *object) * accepted by the filter will be allowed. */ void -nmt_device_entry_set_device_filter(NmtDeviceEntry * deventry, +nmt_device_entry_set_device_filter(NmtDeviceEntry *deventry, NmtDeviceEntryDeviceFilter filter, gpointer user_data) { @@ -412,15 +412,15 @@ nmt_device_entry_set_device_filter(NmtDeviceEntry * deventry, } static void -nmt_device_entry_set_property(GObject * object, +nmt_device_entry_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { - NmtDeviceEntry * deventry = NMT_DEVICE_ENTRY(object); + NmtDeviceEntry *deventry = NMT_DEVICE_ENTRY(object); NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE(deventry); - const char * interface_name; - const char * mac_address; + const char *interface_name; + const char *mac_address; switch (prop_id) { case PROP_LABEL: diff --git a/src/nmtui/nmt-device-entry.h b/src/nmtui/nmt-device-entry.h index 13f82bc8..f66c3d8d 100644 --- a/src/nmtui/nmt-device-entry.h +++ b/src/nmtui/nmt-device-entry.h @@ -33,9 +33,9 @@ GType nmt_device_entry_get_type(void); NmtNewtWidget *nmt_device_entry_new(const char *label, int width, GType hardware_type); typedef gboolean (*NmtDeviceEntryDeviceFilter)(NmtDeviceEntry *deventry, - NMDevice * device, + NMDevice *device, gpointer user_data); -void nmt_device_entry_set_device_filter(NmtDeviceEntry * deventry, +void nmt_device_entry_set_device_filter(NmtDeviceEntry *deventry, NmtDeviceEntryDeviceFilter filter, gpointer user_data); diff --git a/src/nmtui/nmt-edit-connection-list.c b/src/nmtui/nmt-edit-connection-list.c index 9b31e06f..aec669c8 100644 --- a/src/nmtui/nmt-edit-connection-list.c +++ b/src/nmtui/nmt-edit-connection-list.c @@ -32,7 +32,7 @@ typedef struct { NmtEditConnectionListFilter connection_filter; gpointer connection_filter_data; - NmtNewtListbox * listbox; + NmtNewtListbox *listbox; NmtNewtButtonBox *buttons; NmtNewtWidget *add; @@ -73,8 +73,8 @@ static void nmt_edit_connection_list_init(NmtEditConnectionList *list) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); - NmtNewtWidget * listbox, *buttons; - NmtNewtGrid * grid = NMT_NEWT_GRID(list); + NmtNewtWidget *listbox, *buttons; + NmtNewtGrid *grid = NMT_NEWT_GRID(list); listbox = g_object_new(NMT_TYPE_NEWT_LISTBOX, "flags", @@ -135,8 +135,8 @@ static void free_connections(NmtEditConnectionList *list) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); - NMConnection * conn; - GSList * iter; + NMConnection *conn; + GSList *iter; for (iter = priv->connections; iter; iter = iter->next) { conn = iter->data; @@ -152,11 +152,11 @@ static void nmt_edit_connection_list_rebuild(NmtEditConnectionList *list) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); - const GPtrArray * connections; - GSList * iter; + const GPtrArray *connections; + GSList *iter; gboolean did_header = FALSE, did_vpn = FALSE; - NMEditorConnectionTypeData ** types; - NMConnection * conn, *selected_conn; + NMEditorConnectionTypeData **types; + NMConnection *conn, *selected_conn; int i, row, selected_row; selected_row = nmt_newt_listbox_get_active(priv->listbox); @@ -213,7 +213,7 @@ nmt_edit_connection_list_rebuild(NmtEditConnectionList *list) for (iter = priv->connections; iter; iter = iter->next) { NMSetting *setting; - char * indented; + char *indented; conn = iter->data; setting = nm_connection_get_setting(conn, types[i]->setting_type); @@ -254,7 +254,7 @@ rebuild_on_connections_changed(GObject *object, GParamSpec *pspec, gpointer list static void nmt_edit_connection_list_constructed(GObject *object) { - NmtEditConnectionList * list = NMT_EDIT_CONNECTION_LIST(object); + NmtEditConnectionList *list = NMT_EDIT_CONNECTION_LIST(object); NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); if (priv->extra) @@ -280,7 +280,7 @@ static void edit_clicked(NmtNewtButton *button, gpointer list) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); - NMConnection * connection; + NMConnection *connection; connection = nmt_newt_listbox_get_active_key(priv->listbox); g_return_if_fail(connection != NULL); @@ -292,7 +292,7 @@ static void delete_clicked(NmtNewtButton *button, gpointer list) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); - NMRemoteConnection * connection; + NMRemoteConnection *connection; connection = nmt_newt_listbox_get_active_key(priv->listbox); g_return_if_fail(connection != NULL); @@ -318,8 +318,8 @@ void nmt_edit_connection_list_recommit(NmtEditConnectionList *list) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(list); - NMConnection * conn; - GSList * iter; + NMConnection *conn; + GSList *iter; for (iter = priv->connections; iter; iter = iter->next) { conn = iter->data; @@ -346,10 +346,10 @@ nmt_edit_connection_list_finalize(GObject *object) } static void -nmt_edit_connection_list_set_property(GObject * object, +nmt_edit_connection_list_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(object); @@ -375,14 +375,14 @@ nmt_edit_connection_list_set_property(GObject * object, } static void -nmt_edit_connection_list_get_property(GObject * object, +nmt_edit_connection_list_get_property(GObject *object, guint prop_id, - GValue * value, + GValue *value, GParamSpec *pspec) { NmtEditConnectionListPrivate *priv = NMT_EDIT_CONNECTION_LIST_GET_PRIVATE(object); - GPtrArray * connections; - GSList * iter; + GPtrArray *connections; + GSList *iter; switch (prop_id) { case PROP_GROUPED: diff --git a/src/nmtui/nmt-edit-connection-list.h b/src/nmtui/nmt-edit-connection-list.h index 824f767a..a5375be4 100644 --- a/src/nmtui/nmt-edit-connection-list.h +++ b/src/nmtui/nmt-edit-connection-list.h @@ -37,7 +37,7 @@ typedef struct { GType nmt_edit_connection_list_get_type(void); typedef gboolean (*NmtEditConnectionListFilter)(NmtEditConnectionList *list, - NMConnection * connection, + NMConnection *connection, gpointer user_data); void nmt_edit_connection_list_recommit(NmtEditConnectionList *list); diff --git a/src/nmtui/nmt-editor-grid.c b/src/nmtui/nmt-editor-grid.c index 8c79e8d9..bb257805 100644 --- a/src/nmtui/nmt-editor-grid.c +++ b/src/nmtui/nmt-editor-grid.c @@ -35,14 +35,14 @@ G_DEFINE_TYPE(NmtEditorGrid, nmt_editor_grid, NMT_TYPE_NEWT_CONTAINER) typedef struct { GArray *rows; - int * row_heights; + int *row_heights; int indent; } NmtEditorGridPrivate; typedef struct { - NmtNewtWidget * label; - NmtNewtWidget * widget; - NmtNewtWidget * extra; + NmtNewtWidget *label; + NmtNewtWidget *widget; + NmtNewtWidget *extra; NmtEditorGridRowFlags flags; } NmtEditorGridRow; @@ -102,13 +102,13 @@ nmt_editor_grid_finalize(GObject *object) */ void nmt_editor_grid_append(NmtEditorGrid *grid, - const char * label, + const char *label, NmtNewtWidget *widget, NmtNewtWidget *extra) { - NmtEditorGridPrivate * priv = NMT_EDITOR_GRID_GET_PRIVATE(grid); + NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(grid); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_editor_grid_parent_class); - NmtNewtContainer * container = NMT_NEWT_CONTAINER(grid); + NmtNewtContainer *container = NMT_NEWT_CONTAINER(grid); NmtEditorGridRow row; g_return_if_fail(label != NULL || widget != NULL); @@ -147,7 +147,7 @@ static int nmt_editor_grid_find_widget(NmtEditorGrid *grid, NmtNewtWidget *widget) { NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(grid); - NmtEditorGridRow * rows = (NmtEditorGridRow *) priv->rows->data; + NmtEditorGridRow *rows = (NmtEditorGridRow *) priv->rows->data; int i; for (i = 0; i < priv->rows->len; i++) { @@ -177,12 +177,12 @@ nmt_editor_grid_find_widget(NmtEditorGrid *grid, NmtNewtWidget *widget) * Sets flags to adjust the layout of @widget's row in @grid. */ void -nmt_editor_grid_set_row_flags(NmtEditorGrid * grid, - NmtNewtWidget * widget, +nmt_editor_grid_set_row_flags(NmtEditorGrid *grid, + NmtNewtWidget *widget, NmtEditorGridRowFlags flags) { NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(grid); - NmtEditorGridRow * rows = (NmtEditorGridRow *) priv->rows->data; + NmtEditorGridRow *rows = (NmtEditorGridRow *) priv->rows->data; int i; i = nmt_editor_grid_find_widget(grid, widget); @@ -193,10 +193,10 @@ nmt_editor_grid_set_row_flags(NmtEditorGrid * grid, static void nmt_editor_grid_remove(NmtNewtContainer *container, NmtNewtWidget *widget) { - NmtEditorGrid * grid = NMT_EDITOR_GRID(container); - NmtEditorGridPrivate * priv = NMT_EDITOR_GRID_GET_PRIVATE(grid); + NmtEditorGrid *grid = NMT_EDITOR_GRID(container); + NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(grid); NmtNewtContainerClass *parent_class = NMT_NEWT_CONTAINER_CLASS(nmt_editor_grid_parent_class); - NmtEditorGridRow * rows = (NmtEditorGridRow *) priv->rows->data; + NmtEditorGridRow *rows = (NmtEditorGridRow *) priv->rows->data; int i; i = nmt_editor_grid_find_widget(grid, widget); @@ -219,9 +219,9 @@ static newtComponent * nmt_editor_grid_get_components(NmtNewtWidget *widget) { NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(widget); - NmtEditorGridRow * rows = (NmtEditorGridRow *) priv->rows->data; - newtComponent * child_cos; - GPtrArray * cos; + NmtEditorGridRow *rows = (NmtEditorGridRow *) priv->rows->data; + newtComponent *child_cos; + GPtrArray *cos; int i, c; cos = g_ptr_array_new(); @@ -257,7 +257,7 @@ nmt_editor_grid_get_components(NmtNewtWidget *widget) static NmtEditorGridFormState * get_form_state(NmtNewtWidget *widget) { - NmtNewtForm * form = nmt_newt_widget_get_form(widget); + NmtNewtForm *form = nmt_newt_widget_get_form(widget); NmtEditorGridFormState *state; if (!form) @@ -276,7 +276,7 @@ static void nmt_editor_grid_realize(NmtNewtWidget *widget) { NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(widget); - NmtNewtWidget * parent; + NmtNewtWidget *parent; NMT_NEWT_WIDGET_CLASS(nmt_editor_grid_parent_class)->realize(widget); @@ -307,8 +307,8 @@ nmt_editor_grid_unrealize(NmtNewtWidget *widget) static void nmt_editor_grid_size_request(NmtNewtWidget *widget, int *width, int *height) { - NmtEditorGridPrivate * priv = NMT_EDITOR_GRID_GET_PRIVATE(widget); - NmtEditorGridRow * rows = (NmtEditorGridRow *) priv->rows->data; + NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(widget); + NmtEditorGridRow *rows = (NmtEditorGridRow *) priv->rows->data; NmtEditorGridFormState *state = get_form_state(widget); gboolean add_padding = FALSE; int i; @@ -355,8 +355,8 @@ nmt_editor_grid_size_request(NmtNewtWidget *widget, int *width, int *height) static void nmt_editor_grid_size_allocate(NmtNewtWidget *widget, int x, int y, int width, int height) { - NmtEditorGridPrivate * priv = NMT_EDITOR_GRID_GET_PRIVATE(widget); - NmtEditorGridRow * rows = (NmtEditorGridRow *) priv->rows->data; + NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE(widget); + NmtEditorGridRow *rows = (NmtEditorGridRow *) priv->rows->data; NmtEditorGridFormState *state = get_form_state(widget); int col0_width, col1_width, col2_width; int i, row; @@ -422,8 +422,8 @@ nmt_editor_grid_size_allocate(NmtNewtWidget *widget, int x, int y, int width, in static void nmt_editor_grid_class_init(NmtEditorGridClass *grid_class) { - GObjectClass * object_class = G_OBJECT_CLASS(grid_class); - NmtNewtWidgetClass * widget_class = NMT_NEWT_WIDGET_CLASS(grid_class); + GObjectClass *object_class = G_OBJECT_CLASS(grid_class); + NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(grid_class); NmtNewtContainerClass *container_class = NMT_NEWT_CONTAINER_CLASS(grid_class); g_type_class_add_private(grid_class, sizeof(NmtEditorGridPrivate)); diff --git a/src/nmtui/nmt-editor-grid.h b/src/nmtui/nmt-editor-grid.h index 39a86067..3a917536 100644 --- a/src/nmtui/nmt-editor-grid.h +++ b/src/nmtui/nmt-editor-grid.h @@ -38,11 +38,11 @@ typedef enum { NmtNewtWidget *nmt_editor_grid_new(void); void nmt_editor_grid_append(NmtEditorGrid *grid, - const char * label, + const char *label, NmtNewtWidget *widget, NmtNewtWidget *extra); -void nmt_editor_grid_set_row_flags(NmtEditorGrid * grid, - NmtNewtWidget * widget, +void nmt_editor_grid_set_row_flags(NmtEditorGrid *grid, + NmtNewtWidget *widget, NmtEditorGridRowFlags flags); #endif /* NMT_EDITOR_GRID_H */ diff --git a/src/nmtui/nmt-editor-page-device.c b/src/nmtui/nmt-editor-page-device.c index 950f4db1..57503f47 100644 --- a/src/nmtui/nmt-editor-page-device.c +++ b/src/nmtui/nmt-editor-page-device.c @@ -60,10 +60,10 @@ nmt_editor_page_device_get_device_entry(NmtEditorPageDevice *page) } static void -nmt_editor_page_device_set_property(GObject * object, +nmt_editor_page_device_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE(object); @@ -78,9 +78,9 @@ nmt_editor_page_device_set_property(GObject * object, } static void -nmt_editor_page_device_get_property(GObject * object, +nmt_editor_page_device_get_property(GObject *object, guint prop_id, - GValue * value, + GValue *value, GParamSpec *pspec) { NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE(object); diff --git a/src/nmtui/nmt-editor-page.c b/src/nmtui/nmt-editor-page.c index 6d90d71e..d94b1f0f 100644 --- a/src/nmtui/nmt-editor-page.c +++ b/src/nmtui/nmt-editor-page.c @@ -22,7 +22,7 @@ G_DEFINE_ABSTRACT_TYPE(NmtEditorPage, nmt_editor_page, G_TYPE_OBJECT) typedef struct { NMConnection *connection; - GSList * sections; + GSList *sections; } NmtEditorPagePrivate; diff --git a/src/nmtui/nmt-editor-section.c b/src/nmtui/nmt-editor-section.c index 3fbfe7a3..462d1f89 100644 --- a/src/nmtui/nmt-editor-section.c +++ b/src/nmtui/nmt-editor-section.c @@ -22,7 +22,7 @@ G_DEFINE_TYPE(NmtEditorSection, nmt_editor_section, NMT_TYPE_NEWT_SECTION) typedef struct { NmtEditorGrid *header, *body; - char * title; + char *title; NmtNewtWidget *header_widget; NmtNewtWidget *toggle; @@ -156,12 +156,12 @@ nmt_editor_section_get_title(NmtEditorSection *section) } static void -nmt_editor_section_set_property(GObject * object, +nmt_editor_section_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { - NmtEditorSection * section = NMT_EDITOR_SECTION(object); + NmtEditorSection *section = NMT_EDITOR_SECTION(object); NmtEditorSectionPrivate *priv = NMT_EDITOR_SECTION_GET_PRIVATE(section); switch (prop_id) { diff --git a/src/nmtui/nmt-editor-section.h b/src/nmtui/nmt-editor-section.h index b7baf821..43e6852b 100644 --- a/src/nmtui/nmt-editor-section.h +++ b/src/nmtui/nmt-editor-section.h @@ -35,7 +35,7 @@ GType nmt_editor_section_get_type(void); NmtEditorSection * nmt_editor_section_new(const char *title, NmtNewtWidget *header_widget, gboolean show_by_default); -const char * nmt_editor_section_get_title(NmtEditorSection *section); +const char *nmt_editor_section_get_title(NmtEditorSection *section); NmtNewtWidget *nmt_editor_section_get_header_widget(NmtEditorSection *section); NmtEditorGrid *nmt_editor_section_get_body(NmtEditorSection *section); diff --git a/src/nmtui/nmt-editor.c b/src/nmtui/nmt-editor.c index 94e9b7a8..8e6a760c 100644 --- a/src/nmtui/nmt-editor.c +++ b/src/nmtui/nmt-editor.c @@ -55,7 +55,7 @@ typedef struct { NMEditorConnectionTypeData *type_data; - GSList * pages; + GSList *pages; NmtNewtWidget *ok, *cancel; gboolean running; } NmtEditorPrivate; @@ -128,7 +128,7 @@ static void connection_added(GObject *client, GAsyncResult *result, gpointer op) { NMRemoteConnection *connection; - GError * error = NULL; + GError *error = NULL; connection = nm_client_add_connection_finish(NM_CLIENT(client), result, &error); nmt_sync_op_complete_boolean(op, error == NULL, error); @@ -147,10 +147,10 @@ page_saved(gpointer data, gpointer user_data) static void save_connection_and_exit(NmtNewtButton *button, gpointer user_data) { - NmtEditor * editor = user_data; + NmtEditor *editor = user_data; NmtEditorPrivate *priv = NMT_EDITOR_GET_PRIVATE(editor); NmtSyncOp op; - GError * error = NULL; + GError *error = NULL; nm_connection_replace_settings_from_connection(priv->orig_connection, priv->edit_connection); @@ -195,7 +195,7 @@ static void got_secrets(GObject *object, GAsyncResult *result, gpointer op) { GVariant *secrets; - GError * error = NULL; + GError *error = NULL; secrets = nm_remote_connection_get_secrets_finish(NM_REMOTE_CONNECTION(object), result, &error); if (secrets) @@ -208,9 +208,9 @@ static NMConnection * build_edit_connection(NMConnection *orig_connection) { NMConnection *edit_connection; - GVariant * settings, *secrets; + GVariant *settings, *secrets; GVariantIter iter; - const char * setting_name; + const char *setting_name; NmtSyncOp op; edit_connection = nm_simple_connection_new_clone(orig_connection); @@ -243,9 +243,9 @@ build_edit_connection(NMConnection *orig_connection) } static gboolean -permissions_transform_to_allusers(GBinding * binding, +permissions_transform_to_allusers(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { char **perms = g_value_get_boxed(source_value); @@ -255,13 +255,13 @@ permissions_transform_to_allusers(GBinding * binding, } static gboolean -permissions_transform_from_allusers(GBinding * binding, +permissions_transform_from_allusers(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { gboolean allusers = g_value_get_boolean(source_value); - char ** perms = NULL; + char **perms = NULL; if (!allusers) { perms = g_new(char *, 2); @@ -277,8 +277,8 @@ static NmtNewtWidget * add_sections_for_page(NmtEditor *editor, NmtEditorGrid *grid, NmtEditorPage *page) { NmtEditorPrivate *priv = NMT_EDITOR_GET_PRIVATE(editor); - NmtNewtWidget * first_section = NULL; - const GSList * sections, *iter; + NmtNewtWidget *first_section = NULL; + const GSList *sections, *iter; g_return_val_if_fail(NMT_IS_EDITOR_PAGE(page), NULL); @@ -297,16 +297,16 @@ add_sections_for_page(NmtEditor *editor, NmtEditorGrid *grid, NmtEditorPage *pag static void nmt_editor_constructed(GObject *object) { - NmtEditor * editor = NMT_EDITOR(object); - NmtEditorPrivate * priv = NMT_EDITOR_GET_PRIVATE(editor); + NmtEditor *editor = NMT_EDITOR(object); + NmtEditorPrivate *priv = NMT_EDITOR_GET_PRIVATE(editor); NMSettingConnection *s_con; - NmtNewtWidget * vbox, *widget, *buttons; - NmtEditorGrid * grid; - const char * deventry_label; - NmtDeviceEntry * deventry; + NmtNewtWidget *vbox, *widget, *buttons; + NmtEditorGrid *grid; + const char *deventry_label; + NmtDeviceEntry *deventry; GType hardware_type; - const char * slave_type; - NmtEditorPage * page; + const char *slave_type; + NmtEditorPage *page; if (G_OBJECT_CLASS(nmt_editor_parent_class)->constructed) G_OBJECT_CLASS(nmt_editor_parent_class)->constructed(object); diff --git a/src/nmtui/nmt-ip-entry.c b/src/nmtui/nmt-ip-entry.c index b801eec4..9bd0f12d 100644 --- a/src/nmtui/nmt-ip-entry.c +++ b/src/nmtui/nmt-ip-entry.c @@ -76,7 +76,7 @@ static gboolean ip_entry_filter(NmtNewtEntry *entry, const char *text, int ch, int position, gpointer user_data) { NmtIPEntryPrivate *priv = NMT_IP_ENTRY_GET_PRIVATE(entry); - const char * slash; + const char *slash; gboolean inaddr; if (g_ascii_isdigit(ch)) diff --git a/src/nmtui/nmt-mac-entry.c b/src/nmtui/nmt-mac-entry.c index 3f71f4c9..11ceecf9 100644 --- a/src/nmtui/nmt-mac-entry.c +++ b/src/nmtui/nmt-mac-entry.c @@ -85,7 +85,7 @@ static gboolean mac_validator(NmtNewtEntry *entry, const char *text, gpointer user_data) { NmtMacEntryPrivate *priv = NMT_MAC_ENTRY_GET_PRIVATE(entry); - const char * p; + const char *p; if (!*text) return TRUE; diff --git a/src/nmtui/nmt-mtu-entry.c b/src/nmtui/nmt-mtu-entry.c index eab25a23..664ee88f 100644 --- a/src/nmtui/nmt-mtu-entry.c +++ b/src/nmtui/nmt-mtu-entry.c @@ -75,9 +75,9 @@ mtu_validator(NmtNewtEntry *entry, const char *text, gpointer user_data) } static gboolean -mtu_transform_to_text(GBinding * binding, +mtu_transform_to_text(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { int mtu = g_value_get_int(source_value); @@ -93,8 +93,8 @@ static void nmt_mtu_entry_init(NmtMtuEntry *entry) { NmtMtuEntryPrivate *priv = NMT_MTU_ENTRY_GET_PRIVATE(entry); - NmtNewtGrid * grid = NMT_NEWT_GRID(entry); - NmtNewtWidget * real_entry, *label; + NmtNewtGrid *grid = NMT_NEWT_GRID(entry); + NmtNewtWidget *real_entry, *label; real_entry = nmt_newt_entry_numeric_new(10, 0, 65535); priv->entry = NMT_NEWT_ENTRY(real_entry); diff --git a/src/nmtui/nmt-page-bond-port.c b/src/nmtui/nmt-page-bond-port.c index 156553c2..bed8a0f6 100644 --- a/src/nmtui/nmt-page-bond-port.c +++ b/src/nmtui/nmt-page-bond-port.c @@ -29,12 +29,12 @@ nmt_page_bond_port_new(NMConnection *conn) static void nmt_page_bond_port_constructed(GObject *object) { - NmtPageBondPort * bond = NMT_PAGE_BOND_PORT(object); - NmtEditorSection * section; - NmtEditorGrid * grid; + NmtPageBondPort *bond = NMT_PAGE_BOND_PORT(object); + NmtEditorSection *section; + NmtEditorGrid *grid; NMSettingBondPort *s_port; - NmtNewtWidget * widget; - NMConnection * conn; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(bond)); s_port = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_BOND_PORT); diff --git a/src/nmtui/nmt-page-bond.c b/src/nmtui/nmt-page-bond.c index aea7949e..edcf681e 100644 --- a/src/nmtui/nmt-page-bond.c +++ b/src/nmtui/nmt-page-bond.c @@ -41,13 +41,13 @@ typedef struct { /* Note: when adding new options to the UI also ensure they are * initialized in bond_connection_setup_func() */ - NmtNewtPopup * mode; - NmtNewtEntry * primary; - NmtNewtPopup * monitoring; - NmtNewtEntry * miimon; - NmtNewtEntry * updelay; - NmtNewtEntry * downdelay; - NmtNewtEntry * arp_interval; + NmtNewtPopup *mode; + NmtNewtEntry *primary; + NmtNewtPopup *monitoring; + NmtNewtEntry *miimon; + NmtNewtEntry *updelay; + NmtNewtEntry *downdelay; + NmtNewtEntry *arp_interval; NmtAddressList *arp_ip_target; NmtPageBondMonitoringMode monitoring_mode; @@ -96,11 +96,11 @@ static NmtNewtPopupEntry bond_monitoring[] = {{N_("MII (recommended)"), "mii"}, static void bond_options_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NMSettingBond * s_bond = NM_SETTING_BOND(object); - NmtPageBond * bond = NMT_PAGE_BOND(user_data); - NmtPageBondPrivate * priv = NMT_PAGE_BOND_GET_PRIVATE(bond); + NMSettingBond *s_bond = NM_SETTING_BOND(object); + NmtPageBond *bond = NMT_PAGE_BOND(user_data); + NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); gs_free const char **ips = NULL; - const char * val; + const char *val; gboolean visible_mii; NMBondMode mode; @@ -161,9 +161,9 @@ bond_options_changed(GObject *object, GParamSpec *pspec, gpointer user_data) static void slaves_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NmtPageBond * bond = NMT_PAGE_BOND(user_data); + NmtPageBond *bond = NMT_PAGE_BOND(user_data); NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); - GPtrArray * slaves; + GPtrArray *slaves; g_object_get(object, "connections", &slaves, NULL); if (slaves->len == 0) { @@ -207,9 +207,9 @@ _bond_add_option(NMSettingBond *s_bond, const char *option, const char *value) #define WIDGET_CHANGED_FUNC(widget, func, option, dflt) \ static void widget##_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_data) \ { \ - NmtPageBond * bond = NMT_PAGE_BOND(user_data); \ + NmtPageBond *bond = NMT_PAGE_BOND(user_data); \ NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); \ - const char * v; \ + const char *v; \ \ if (priv->updating) \ return; \ @@ -229,9 +229,9 @@ WIDGET_CHANGED_FUNC(arp_interval, nmt_newt_entry_get_text, NM_SETTING_BOND_OPTIO static void mode_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NmtPageBond * bond = NMT_PAGE_BOND(user_data); + NmtPageBond *bond = NMT_PAGE_BOND(user_data); NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); - const char * mode; + const char *mode; if (priv->updating) return; @@ -261,7 +261,7 @@ mode_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_data) static void monitoring_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NmtPageBond * bond = NMT_PAGE_BOND(user_data); + NmtPageBond *bond = NMT_PAGE_BOND(user_data); NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); gboolean visible_mii; @@ -290,9 +290,9 @@ monitoring_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_data static void arp_ip_target_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NmtPageBond * bond = NMT_PAGE_BOND(user_data); + NmtPageBond *bond = NMT_PAGE_BOND(user_data); NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); - char ** ips, *target; + char **ips, *target; if (priv->updating) return; @@ -311,7 +311,7 @@ arp_ip_target_widget_changed(GObject *object, GParamSpec *pspec, gpointer user_d static gboolean bond_connection_type_filter(GType connection_type, gpointer user_data) { - NmtPageBond * bond = user_data; + NmtPageBond *bond = user_data; NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); if (priv->slave_type != NM_TYPE_SETTING_WIRED && connection_type == NM_TYPE_SETTING_INFINIBAND) @@ -325,14 +325,14 @@ bond_connection_type_filter(GType connection_type, gpointer user_data) static void nmt_page_bond_constructed(GObject *object) { - NmtPageBond * bond = NMT_PAGE_BOND(object); + NmtPageBond *bond = NMT_PAGE_BOND(object); NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE(bond); - NmtEditorSection * section; - NmtEditorGrid * grid; - NMSettingWired * s_wired; - NMSettingBond * s_bond; - NmtNewtWidget * widget, *label; - NMConnection * conn; + NmtEditorSection *section; + NmtEditorGrid *grid; + NMSettingWired *s_wired; + NMSettingBond *s_bond; + NmtNewtWidget *widget, *label; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(bond)); s_bond = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_BOND); @@ -426,7 +426,7 @@ nmt_page_bond_saved(NmtEditorPage *editor_page) static void nmt_page_bond_class_init(NmtPageBondClass *bond_class) { - GObjectClass * object_class = G_OBJECT_CLASS(bond_class); + GObjectClass *object_class = G_OBJECT_CLASS(bond_class); NmtEditorPageClass *editor_page_class = NMT_EDITOR_PAGE_CLASS(bond_class); g_type_class_add_private(bond_class, sizeof(NmtPageBondPrivate)); diff --git a/src/nmtui/nmt-page-bridge-port.c b/src/nmtui/nmt-page-bridge-port.c index f6c18d7c..e39d15e2 100644 --- a/src/nmtui/nmt-page-bridge-port.c +++ b/src/nmtui/nmt-page-bridge-port.c @@ -29,12 +29,12 @@ nmt_page_bridge_port_init(NmtPageBridgePort *bridge) static void nmt_page_bridge_port_constructed(GObject *object) { - NmtPageBridgePort * bridge = NMT_PAGE_BRIDGE_PORT(object); - NmtEditorSection * section; - NmtEditorGrid * grid; + NmtPageBridgePort *bridge = NMT_PAGE_BRIDGE_PORT(object); + NmtEditorSection *section; + NmtEditorGrid *grid; NMSettingBridgePort *s_port; - NmtNewtWidget * widget; - NMConnection * conn; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(bridge)); s_port = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_BRIDGE_PORT); diff --git a/src/nmtui/nmt-page-bridge.c b/src/nmtui/nmt-page-bridge.c index 684b17bd..bc32e2a2 100644 --- a/src/nmtui/nmt-page-bridge.c +++ b/src/nmtui/nmt-page-bridge.c @@ -45,13 +45,13 @@ bridge_connection_type_filter(GType connection_type, gpointer user_data) static void nmt_page_bridge_constructed(GObject *object) { - NmtPageBridge * bridge = NMT_PAGE_BRIDGE(object); + NmtPageBridge *bridge = NMT_PAGE_BRIDGE(object); NmtPageBridgePrivate *priv = NMT_PAGE_BRIDGE_GET_PRIVATE(bridge); - NmtEditorSection * section; - NmtEditorGrid * grid; - NMSettingBridge * s_bridge; - NmtNewtWidget * widget, *label, *stp; - NMConnection * conn; + NmtEditorSection *section; + NmtEditorGrid *grid; + NMSettingBridge *s_bridge; + NmtNewtWidget *widget, *label, *stp; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(bridge)); s_bridge = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_BRIDGE); @@ -171,7 +171,7 @@ nmt_page_bridge_saved(NmtEditorPage *editor_page) static void nmt_page_bridge_class_init(NmtPageBridgeClass *bridge_class) { - GObjectClass * object_class = G_OBJECT_CLASS(bridge_class); + GObjectClass *object_class = G_OBJECT_CLASS(bridge_class); NmtEditorPageClass *editor_page_class = NMT_EDITOR_PAGE_CLASS(bridge_class); object_class->constructed = nmt_page_bridge_constructed; diff --git a/src/nmtui/nmt-page-dsl.c b/src/nmtui/nmt-page-dsl.c index a0d8cdf4..5fa756cc 100644 --- a/src/nmtui/nmt-page-dsl.c +++ b/src/nmtui/nmt-page-dsl.c @@ -41,8 +41,8 @@ static NmtEditorSection * build_dsl_section(NmtPageDsl *dsl, NMSettingPppoe *s_pppoe) { NmtEditorSection *section; - NmtEditorGrid * grid; - NmtNewtWidget * widget; + NmtEditorGrid *grid; + NmtNewtWidget *widget; section = nmt_editor_section_new(_("DSL"), NULL, TRUE); grid = nmt_editor_section_get_body(section); @@ -77,12 +77,12 @@ build_dsl_section(NmtPageDsl *dsl, NMSettingPppoe *s_pppoe) static void nmt_page_dsl_constructed(GObject *object) { - NmtPageDsl * dsl = NMT_PAGE_DSL(object); + NmtPageDsl *dsl = NMT_PAGE_DSL(object); NmtPageDslPrivate *priv = NMT_PAGE_DSL_GET_PRIVATE(dsl); - NMConnection * conn; - NMSettingPppoe * s_pppoe; - NmtEditorSection * section; - const GSList * sections, *iter; + NMConnection *conn; + NMSettingPppoe *s_pppoe; + NmtEditorSection *section; + const GSList *sections, *iter; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(dsl)); s_pppoe = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_PPPOE); @@ -108,7 +108,7 @@ nmt_page_dsl_constructed(GObject *object) static void nmt_page_dsl_finalize(GObject *object) { - NmtPageDsl * dsl = NMT_PAGE_DSL(object); + NmtPageDsl *dsl = NMT_PAGE_DSL(object); NmtPageDslPrivate *priv = NMT_PAGE_DSL_GET_PRIVATE(dsl); g_clear_object(&priv->ethernet_page); diff --git a/src/nmtui/nmt-page-ethernet.c b/src/nmtui/nmt-page-ethernet.c index addbd3f3..89026d0f 100644 --- a/src/nmtui/nmt-page-ethernet.c +++ b/src/nmtui/nmt-page-ethernet.c @@ -34,13 +34,13 @@ nmt_page_ethernet_init(NmtPageEthernet *ethernet) static void nmt_page_ethernet_constructed(GObject *object) { - NmtPageEthernet * ethernet = NMT_PAGE_ETHERNET(object); - NmtDeviceEntry * deventry; + NmtPageEthernet *ethernet = NMT_PAGE_ETHERNET(object); + NmtDeviceEntry *deventry; NmtEditorSection *section; - NmtEditorGrid * grid; - NMSettingWired * s_wired; - NmtNewtWidget * widget; - NMConnection * conn; + NmtEditorGrid *grid; + NMSettingWired *s_wired; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(ethernet)); s_wired = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_WIRED); diff --git a/src/nmtui/nmt-page-infiniband.c b/src/nmtui/nmt-page-infiniband.c index 1216208f..b292c751 100644 --- a/src/nmtui/nmt-page-infiniband.c +++ b/src/nmtui/nmt-page-infiniband.c @@ -39,13 +39,13 @@ static NmtNewtPopupEntry transport_mode[] = {{N_("Datagram"), "datagram"}, static void nmt_page_infiniband_constructed(GObject *object) { - NmtPageInfiniband * infiniband = NMT_PAGE_INFINIBAND(object); - NmtDeviceEntry * deventry; - NmtEditorSection * section; - NmtEditorGrid * grid; + NmtPageInfiniband *infiniband = NMT_PAGE_INFINIBAND(object); + NmtDeviceEntry *deventry; + NmtEditorSection *section; + NmtEditorGrid *grid; NMSettingInfiniband *s_ib; - NmtNewtWidget * widget; - NMConnection * conn; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(infiniband)); s_ib = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_INFINIBAND); diff --git a/src/nmtui/nmt-page-ip-tunnel.c b/src/nmtui/nmt-page-ip-tunnel.c index 96864919..c74037b6 100644 --- a/src/nmtui/nmt-page-ip-tunnel.c +++ b/src/nmtui/nmt-page-ip-tunnel.c @@ -43,8 +43,8 @@ nmt_page_ip_tunnel_init(NmtPageIPTunnel *ip_tunnel) static void mode_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NMSettingIPTunnel * s_ip_tunnel = NM_SETTING_IP_TUNNEL(object); - NmtPageIPTunnel * ip_tunnel = NMT_PAGE_IP_TUNNEL(user_data); + NMSettingIPTunnel *s_ip_tunnel = NM_SETTING_IP_TUNNEL(object); + NmtPageIPTunnel *ip_tunnel = NMT_PAGE_IP_TUNNEL(user_data); NmtPageIPTunnelPrivate *priv = NMT_PAGE_IP_TUNNEL_GET_PRIVATE(ip_tunnel); NMIPTunnelMode mode; gboolean enable_keys; @@ -93,14 +93,14 @@ add_offset(GBinding *binding, const GValue *from_value, GValue *to_value, gpoint static void nmt_page_ip_tunnel_constructed(GObject *object) { - NmtPageIPTunnel * ip_tunnel = NMT_PAGE_IP_TUNNEL(object); + NmtPageIPTunnel *ip_tunnel = NMT_PAGE_IP_TUNNEL(object); NmtPageIPTunnelPrivate *priv = NMT_PAGE_IP_TUNNEL_GET_PRIVATE(ip_tunnel); - NmtEditorSection * section; - NmtEditorGrid * grid; - NMSettingIPTunnel * s_ip_tunnel; - NmtNewtWidget * widget, *parent; - NMConnection * conn; - GClosure * s2w, *w2s; + NmtEditorSection *section; + NmtEditorGrid *grid; + NMSettingIPTunnel *s_ip_tunnel; + NmtNewtWidget *widget, *parent; + NMConnection *conn; + GClosure *s2w, *w2s; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(ip_tunnel)); s_ip_tunnel = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_IP_TUNNEL); diff --git a/src/nmtui/nmt-page-ip4.c b/src/nmtui/nmt-page-ip4.c index a7e4bdae..4d01b356 100644 --- a/src/nmtui/nmt-page-ip4.c +++ b/src/nmtui/nmt-page-ip4.c @@ -44,7 +44,7 @@ nmt_page_ip4_init(NmtPageIP4 *ip4) static void edit_routes(NmtNewtButton *button, gpointer user_data) { - NMSetting * s_ip4 = user_data; + NMSetting *s_ip4 = user_data; NmtNewtForm *form; form = nmt_route_editor_new(s_ip4); @@ -53,13 +53,13 @@ edit_routes(NmtNewtButton *button, gpointer user_data) } static gboolean -ip4_routes_transform_to_description(GBinding * binding, +ip4_routes_transform_to_description(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { GPtrArray *routes; - char * text; + char *text; routes = g_value_get_boxed(source_value); if (!routes || !routes->len) @@ -77,13 +77,13 @@ ip4_routes_transform_to_description(GBinding * binding, static void nmt_page_ip4_constructed(GObject *object) { - NmtPageIP4 * ip4 = NMT_PAGE_IP4(object); + NmtPageIP4 *ip4 = NMT_PAGE_IP4(object); gboolean show_by_default; - NmtEditorSection * section; - NmtEditorGrid * grid; + NmtEditorSection *section; + NmtEditorGrid *grid; NMSettingIPConfig *s_ip4; - NmtNewtWidget * widget, *button; - NMConnection * conn; + NmtNewtWidget *widget, *button; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(ip4)); s_ip4 = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_IP4_CONFIG); diff --git a/src/nmtui/nmt-page-ip6.c b/src/nmtui/nmt-page-ip6.c index 0d4de65a..7e7a48c5 100644 --- a/src/nmtui/nmt-page-ip6.c +++ b/src/nmtui/nmt-page-ip6.c @@ -45,7 +45,7 @@ nmt_page_ip6_init(NmtPageIP6 *ip6) static void edit_routes(NmtNewtButton *button, gpointer user_data) { - NMSetting * s_ip6 = user_data; + NMSetting *s_ip6 = user_data; NmtNewtForm *form; form = nmt_route_editor_new(s_ip6); @@ -54,13 +54,13 @@ edit_routes(NmtNewtButton *button, gpointer user_data) } static gboolean -ip6_routes_transform_to_description(GBinding * binding, +ip6_routes_transform_to_description(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { GPtrArray *routes; - char * text; + char *text; routes = g_value_get_boxed(source_value); if (!routes || !routes->len) @@ -78,13 +78,13 @@ ip6_routes_transform_to_description(GBinding * binding, static void nmt_page_ip6_constructed(GObject *object) { - NmtPageIP6 * ip6 = NMT_PAGE_IP6(object); + NmtPageIP6 *ip6 = NMT_PAGE_IP6(object); gboolean show_by_default; - NmtEditorSection * section; - NmtEditorGrid * grid; + NmtEditorSection *section; + NmtEditorGrid *grid; NMSettingIPConfig *s_ip6; - NmtNewtWidget * widget, *button; - NMConnection * conn; + NmtNewtWidget *widget, *button; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(ip6)); s_ip6 = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_IP6_CONFIG); diff --git a/src/nmtui/nmt-page-ppp.c b/src/nmtui/nmt-page-ppp.c index ffa1a8b2..6f844fd6 100644 --- a/src/nmtui/nmt-page-ppp.c +++ b/src/nmtui/nmt-page-ppp.c @@ -37,9 +37,9 @@ nmt_page_ppp_init(NmtPagePpp *ppp) {} static gboolean -transform_lcp_echo_properties_to_checkbox(GBinding * binding, +transform_lcp_echo_properties_to_checkbox(GBinding *binding, const GValue *from_value, - GValue * to_value, + GValue *to_value, gpointer user_data) { NMSettingPpp *s_ppp = NM_SETTING_PPP(g_binding_get_source(binding)); @@ -54,12 +54,12 @@ transform_lcp_echo_properties_to_checkbox(GBinding * binding, } static gboolean -transform_checkbox_to_lcp_echo_interval(GBinding * binding, +transform_checkbox_to_lcp_echo_interval(GBinding *binding, const GValue *from_value, - GValue * to_value, + GValue *to_value, gpointer user_data) { - NmtPagePpp * ppp = user_data; + NmtPagePpp *ppp = user_data; NmtPagePppPrivate *priv = NMT_PAGE_PPP_GET_PRIVATE(ppp); if (g_value_get_boolean(from_value)) @@ -71,12 +71,12 @@ transform_checkbox_to_lcp_echo_interval(GBinding * binding, } static gboolean -transform_checkbox_to_lcp_echo_failure(GBinding * binding, +transform_checkbox_to_lcp_echo_failure(GBinding *binding, const GValue *from_value, - GValue * to_value, + GValue *to_value, gpointer user_data) { - NmtPagePpp * ppp = user_data; + NmtPagePpp *ppp = user_data; NmtPagePppPrivate *priv = NMT_PAGE_PPP_GET_PRIVATE(ppp); if (g_value_get_boolean(from_value)) @@ -90,15 +90,15 @@ transform_checkbox_to_lcp_echo_failure(GBinding * binding, static void nmt_page_ppp_constructed(GObject *object) { - NmtPagePpp * ppp = NMT_PAGE_PPP(object); + NmtPagePpp *ppp = NMT_PAGE_PPP(object); NmtPagePppPrivate *priv = NMT_PAGE_PPP_GET_PRIVATE(ppp); - NmtEditorSection * section; - NmtEditorGrid * grid; - NMSettingPpp * s_ppp; - NmtNewtWidget * widget, *use_mppe; - NmtNewtGrid * auth_grid, *mppe_grid; - NmtNewtSection * auth_section, *mppe_section; - NMConnection * conn; + NmtEditorSection *section; + NmtEditorGrid *grid; + NMSettingPpp *s_ppp; + NmtNewtWidget *widget, *use_mppe; + NmtNewtGrid *auth_grid, *mppe_grid; + NmtNewtSection *auth_section, *mppe_section; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(ppp)); s_ppp = nm_connection_get_setting_ppp(conn); diff --git a/src/nmtui/nmt-page-team-port.c b/src/nmtui/nmt-page-team-port.c index c1f3cbc6..af401fa6 100644 --- a/src/nmtui/nmt-page-team-port.c +++ b/src/nmtui/nmt-page-team-port.c @@ -37,10 +37,10 @@ nmt_page_team_port_init(NmtPageTeamPort *team) static void edit_clicked(NmtNewtButton *button, gpointer user_data) { - NmtPageTeamPort * team = user_data; + NmtPageTeamPort *team = user_data; NmtPageTeamPortPrivate *priv = NMT_PAGE_TEAM_PORT_GET_PRIVATE(team); - const char * config; - char * new_config; + const char *config; + char *new_config; config = nm_setting_team_port_get_config(priv->s_port); if (!config) @@ -57,13 +57,13 @@ edit_clicked(NmtNewtButton *button, gpointer user_data) static void nmt_page_team_port_constructed(GObject *object) { - NmtPageTeamPort * team = NMT_PAGE_TEAM_PORT(object); + NmtPageTeamPort *team = NMT_PAGE_TEAM_PORT(object); NmtPageTeamPortPrivate *priv = NMT_PAGE_TEAM_PORT_GET_PRIVATE(team); - NmtEditorSection * section; - NmtNewtGrid * grid; - NMSettingTeamPort * s_port; - NmtNewtWidget * widget; - NMConnection * conn; + NmtEditorSection *section; + NmtNewtGrid *grid; + NMSettingTeamPort *s_port; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(team)); s_port = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_TEAM_PORT); diff --git a/src/nmtui/nmt-page-team.c b/src/nmtui/nmt-page-team.c index d61c06c5..1a554aad 100644 --- a/src/nmtui/nmt-page-team.c +++ b/src/nmtui/nmt-page-team.c @@ -45,9 +45,9 @@ nmt_page_team_init(NmtPageTeam *team) static void slaves_changed(GObject *object, GParamSpec *pspec, gpointer user_data) { - NmtPageTeam * team = NMT_PAGE_TEAM(user_data); + NmtPageTeam *team = NMT_PAGE_TEAM(user_data); NmtPageTeamPrivate *priv = NMT_PAGE_TEAM_GET_PRIVATE(team); - GPtrArray * slaves; + GPtrArray *slaves; g_object_get(object, "connections", &slaves, NULL); if (slaves->len == 0) { @@ -65,7 +65,7 @@ slaves_changed(GObject *object, GParamSpec *pspec, gpointer user_data) static gboolean team_connection_type_filter(GType connection_type, gpointer user_data) { - NmtPageTeam * team = user_data; + NmtPageTeam *team = user_data; NmtPageTeamPrivate *priv = NMT_PAGE_TEAM_GET_PRIVATE(team); if (priv->slave_type != NM_TYPE_SETTING_WIRED) { @@ -84,10 +84,10 @@ team_connection_type_filter(GType connection_type, gpointer user_data) static void edit_clicked(NmtNewtButton *button, gpointer user_data) { - NmtPageTeam * team = user_data; + NmtPageTeam *team = user_data; NmtPageTeamPrivate *priv = NMT_PAGE_TEAM_GET_PRIVATE(team); - const char * config; - char * new_config; + const char *config; + char *new_config; config = nm_setting_team_get_config(priv->s_team); if (!config) @@ -104,13 +104,13 @@ edit_clicked(NmtNewtButton *button, gpointer user_data) static void nmt_page_team_constructed(GObject *object) { - NmtPageTeam * team = NMT_PAGE_TEAM(object); + NmtPageTeam *team = NMT_PAGE_TEAM(object); NmtPageTeamPrivate *priv = NMT_PAGE_TEAM_GET_PRIVATE(team); - NmtEditorSection * section; - NmtNewtGrid * grid; - NMSettingTeam * s_team; - NmtNewtWidget * widget; - NMConnection * conn; + NmtEditorSection *section; + NmtNewtGrid *grid; + NMSettingTeam *s_team; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(team)); s_team = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_TEAM); @@ -162,7 +162,7 @@ nmt_page_team_saved(NmtEditorPage *editor_page) static void nmt_page_team_class_init(NmtPageTeamClass *team_class) { - GObjectClass * object_class = G_OBJECT_CLASS(team_class); + GObjectClass *object_class = G_OBJECT_CLASS(team_class); NmtEditorPageClass *editor_page_class = NMT_EDITOR_PAGE_CLASS(team_class); g_type_class_add_private(team_class, sizeof(NmtPageTeamPrivate)); diff --git a/src/nmtui/nmt-page-vlan.c b/src/nmtui/nmt-page-vlan.c index 5baf9756..1956d3d6 100644 --- a/src/nmtui/nmt-page-vlan.c +++ b/src/nmtui/nmt-page-vlan.c @@ -42,13 +42,13 @@ vlan_device_filter(NmtDeviceEntry *deventry, NMDevice *device, gpointer user_dat static void nmt_page_vlan_constructed(GObject *object) { - NmtPageVlan * vlan = NMT_PAGE_VLAN(object); + NmtPageVlan *vlan = NMT_PAGE_VLAN(object); NmtEditorSection *section; - NmtEditorGrid * grid; - NMSettingWired * s_wired; - NMSettingVlan * s_vlan; - NmtNewtWidget * widget, *parent, *id_entry; - NMConnection * conn; + NmtEditorGrid *grid; + NMSettingWired *s_wired; + NMSettingVlan *s_vlan; + NmtNewtWidget *widget, *parent, *id_entry; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(vlan)); s_vlan = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_VLAN); diff --git a/src/nmtui/nmt-page-wifi.c b/src/nmtui/nmt-page-wifi.c index 1a476b02..60960e64 100644 --- a/src/nmtui/nmt-page-wifi.c +++ b/src/nmtui/nmt-page-wifi.c @@ -80,9 +80,9 @@ static NmtNewtPopupEntry wep_auth[] = {{N_("Open System"), "open"}, {NULL, NULL}}; static gboolean -mode_transform_to_band_visibility(GBinding * binding, +mode_transform_to_band_visibility(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { if (!g_strcmp0(g_value_get_string(source_value), NM_SETTING_WIRELESS_MODE_INFRA)) @@ -93,9 +93,9 @@ mode_transform_to_band_visibility(GBinding * binding, } static gboolean -band_transform_to_channel_visibility(GBinding * binding, +band_transform_to_channel_visibility(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { g_value_set_boolean(target_value, g_value_get_string(source_value) != NULL); @@ -103,13 +103,13 @@ band_transform_to_channel_visibility(GBinding * binding, } static gboolean -ssid_transform_to_entry(GBinding * binding, +ssid_transform_to_entry(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { GBytes *ssid; - char * utf8; + char *utf8; ssid = g_value_get_boxed(source_value); if (ssid) @@ -121,15 +121,15 @@ ssid_transform_to_entry(GBinding * binding, } static gboolean -ssid_transform_from_entry(GBinding * binding, +ssid_transform_from_entry(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { NMSettingWireless *s_wireless = user_data; - const char * text; - GBytes * old_ssid, *ssid; - char * utf8; + const char *text; + GBytes *old_ssid, *ssid; + char *utf8; text = g_value_get_string(source_value); @@ -153,17 +153,17 @@ ssid_transform_from_entry(GBinding * binding, static void nmt_page_wifi_constructed(GObject *object) { - NmtPageWifiPrivate * priv = NMT_PAGE_WIFI_GET_PRIVATE(object); - NmtPageWifi * wifi = NMT_PAGE_WIFI(object); - NmtDeviceEntry * deventry; - NmtEditorSection * section; - NmtEditorGrid * grid; - NMSettingWireless * s_wireless; + NmtPageWifiPrivate *priv = NMT_PAGE_WIFI_GET_PRIVATE(object); + NmtPageWifi *wifi = NMT_PAGE_WIFI(object); + NmtDeviceEntry *deventry; + NmtEditorSection *section; + NmtEditorGrid *grid; + NMSettingWireless *s_wireless; NMSettingWirelessSecurity *s_wsec; - NmtNewtWidget * widget, *hbox, *subgrid; - NmtNewtWidget * mode, *band, *security, *entry; - NmtNewtStack * stack; - NMConnection * conn; + NmtNewtWidget *widget, *hbox, *subgrid; + NmtNewtWidget *mode, *band, *security, *entry; + NmtNewtStack *stack; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(wifi)); s_wireless = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_WIRELESS); diff --git a/src/nmtui/nmt-page-wireguard.c b/src/nmtui/nmt-page-wireguard.c index 30a984e0..77e327b8 100644 --- a/src/nmtui/nmt-page-wireguard.c +++ b/src/nmtui/nmt-page-wireguard.c @@ -43,13 +43,13 @@ nmt_page_wireguard_init(NmtPageWireGuard *wireguard) static void nmt_page_wireguard_constructed(GObject *object) { - NmtPageWireGuard * wireguard = NMT_PAGE_WIREGUARD(object); + NmtPageWireGuard *wireguard = NMT_PAGE_WIREGUARD(object); NmtPageWireGuardPrivate *priv = NMT_PAGE_WIREGUARD_GET_PRIVATE(wireguard); - NmtEditorSection * section; - NmtEditorGrid * grid; - NMSettingWireGuard * s_wireguard; - NmtNewtWidget * widget; - NMConnection * conn; + NmtEditorSection *section; + NmtEditorGrid *grid; + NMSettingWireGuard *s_wireguard; + NmtNewtWidget *widget; + NMConnection *conn; conn = nmt_editor_page_get_connection(NMT_EDITOR_PAGE(wireguard)); s_wireguard = _nm_connection_ensure_setting(conn, NM_TYPE_SETTING_WIREGUARD); diff --git a/src/nmtui/nmt-password-dialog.c b/src/nmtui/nmt-password-dialog.c index 99b9b3f7..6189997f 100644 --- a/src/nmtui/nmt-password-dialog.c +++ b/src/nmtui/nmt-password-dialog.c @@ -23,8 +23,8 @@ G_DEFINE_TYPE(NmtPasswordDialog, nmt_password_dialog, NMT_TYPE_NEWT_FORM) (G_TYPE_INSTANCE_GET_PRIVATE((o), NMT_TYPE_PASSWORD_DIALOG, NmtPasswordDialogPrivate)) typedef struct { - char * request_id; - char * prompt; + char *request_id; + char *prompt; GPtrArray *secrets; GPtrArray *entries; @@ -60,7 +60,7 @@ NmtNewtForm * nmt_password_dialog_new(const char *request_id, const char *title, const char *prompt, - GPtrArray * secrets) + GPtrArray *secrets) { return g_object_new(NMT_TYPE_PASSWORD_DIALOG, "request-id", @@ -111,11 +111,11 @@ maybe_save_input_and_exit(NmtNewtWidget *widget, gpointer dialog) static void nmt_password_dialog_constructed(GObject *object) { - NmtPasswordDialog * dialog = NMT_PASSWORD_DIALOG(object); + NmtPasswordDialog *dialog = NMT_PASSWORD_DIALOG(object); NmtPasswordDialogPrivate *priv = NMT_PASSWORD_DIALOG_GET_PRIVATE(dialog); - NmtNewtWidget * widget; - NmtNewtGrid * grid, *secret_grid; - NmtNewtButtonBox * bbox; + NmtNewtWidget *widget; + NmtNewtGrid *grid, *secret_grid; + NmtNewtButtonBox *bbox; int i; widget = nmt_newt_grid_new(); @@ -187,10 +187,10 @@ nmt_password_dialog_finalize(GObject *object) } static void -nmt_password_dialog_set_property(GObject * object, +nmt_password_dialog_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtPasswordDialogPrivate *priv = NMT_PASSWORD_DIALOG_GET_PRIVATE(object); diff --git a/src/nmtui/nmt-password-dialog.h b/src/nmtui/nmt-password-dialog.h index 77e8f292..4c60e33d 100644 --- a/src/nmtui/nmt-password-dialog.h +++ b/src/nmtui/nmt-password-dialog.h @@ -34,11 +34,11 @@ GType nmt_password_dialog_get_type(void); NmtNewtForm *nmt_password_dialog_new(const char *request_id, const char *title, const char *prompt, - GPtrArray * secrets); + GPtrArray *secrets); gboolean nmt_password_dialog_succeeded(NmtPasswordDialog *dialog); const char *nmt_password_dialog_get_request_id(NmtPasswordDialog *dialog); -GPtrArray * nmt_password_dialog_get_secrets(NmtPasswordDialog *dialog); +GPtrArray *nmt_password_dialog_get_secrets(NmtPasswordDialog *dialog); #endif /* NMT_PASSWORD_DIALOG_H */ diff --git a/src/nmtui/nmt-password-fields.c b/src/nmtui/nmt-password-fields.c index 45073c7e..09573c72 100644 --- a/src/nmtui/nmt-password-fields.c +++ b/src/nmtui/nmt-password-fields.c @@ -24,7 +24,7 @@ G_DEFINE_TYPE(NmtPasswordFields, nmt_password_fields, NMT_TYPE_NEWT_GRID) typedef struct { NmtPasswordFieldsExtras extras; - NmtNewtEntry * entry; + NmtNewtEntry *entry; NmtNewtCheckbox *always_ask; NmtNewtCheckbox *show_password; @@ -113,7 +113,7 @@ static void nmt_password_fields_constructed(GObject *object) { NmtPasswordFieldsPrivate *priv = NMT_PASSWORD_FIELDS_GET_PRIVATE(object); - NmtNewtGrid * grid = NMT_NEWT_GRID(object); + NmtNewtGrid *grid = NMT_NEWT_GRID(object); nmt_newt_grid_add(grid, NMT_NEWT_WIDGET(priv->entry), 0, 0); @@ -169,12 +169,12 @@ nmt_password_fields_finalize(GObject *object) } static void -nmt_password_fields_set_property(GObject * object, +nmt_password_fields_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { - NmtPasswordFields * fields = NMT_PASSWORD_FIELDS(object); + NmtPasswordFields *fields = NMT_PASSWORD_FIELDS(object); NmtPasswordFieldsPrivate *priv = NMT_PASSWORD_FIELDS_GET_PRIVATE(fields); switch (prop_id) { @@ -205,7 +205,7 @@ nmt_password_fields_set_property(GObject * object, static void nmt_password_fields_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NmtPasswordFields * entry = NMT_PASSWORD_FIELDS(object); + NmtPasswordFields *entry = NMT_PASSWORD_FIELDS(object); NmtPasswordFieldsPrivate *priv = NMT_PASSWORD_FIELDS_GET_PRIVATE(entry); switch (prop_id) { diff --git a/src/nmtui/nmt-route-editor.c b/src/nmtui/nmt-route-editor.c index ffccf38d..52272310 100644 --- a/src/nmtui/nmt-route-editor.c +++ b/src/nmtui/nmt-route-editor.c @@ -56,9 +56,9 @@ nmt_route_editor_init(NmtRouteEditor *entry) static void save_routes_and_exit(NmtNewtButton *button, gpointer user_data) { - NmtRouteEditor * editor = user_data; + NmtRouteEditor *editor = user_data; NmtRouteEditorPrivate *priv = NMT_ROUTE_EDITOR_GET_PRIVATE(editor); - GPtrArray * routes; + GPtrArray *routes; g_object_get(priv->edit_setting, NM_SETTING_IP_CONFIG_ROUTES, &routes, NULL); g_object_set(priv->orig_setting, NM_SETTING_IP_CONFIG_ROUTES, routes, NULL); @@ -70,9 +70,9 @@ save_routes_and_exit(NmtNewtButton *button, gpointer user_data) static void nmt_route_editor_constructed(GObject *object) { - NmtRouteEditor * editor = NMT_ROUTE_EDITOR(object); + NmtRouteEditor *editor = NMT_ROUTE_EDITOR(object); NmtRouteEditorPrivate *priv = NMT_ROUTE_EDITOR_GET_PRIVATE(editor); - NmtNewtWidget * vbox, *routes, *buttons, *ok, *cancel; + NmtNewtWidget *vbox, *routes, *buttons, *ok, *cancel; if (G_OBJECT_CLASS(nmt_route_editor_parent_class)->constructed) G_OBJECT_CLASS(nmt_route_editor_parent_class)->constructed(object); @@ -123,10 +123,10 @@ nmt_route_editor_finalize(GObject *object) } static void -nmt_route_editor_set_property(GObject * object, +nmt_route_editor_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtRouteEditorPrivate *priv = NMT_ROUTE_EDITOR_GET_PRIVATE(object); diff --git a/src/nmtui/nmt-route-entry.c b/src/nmtui/nmt-route-entry.c index 5cd150b0..e186fff2 100644 --- a/src/nmtui/nmt-route-entry.c +++ b/src/nmtui/nmt-route-entry.c @@ -75,9 +75,9 @@ nmt_route_entry_init(NmtRouteEntry *entry) {} static gboolean -entry_validity_transform_to_warning_label(GBinding * binding, +entry_validity_transform_to_warning_label(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { if (g_value_get_boolean(source_value)) @@ -109,8 +109,8 @@ static void nmt_route_entry_constructed(GObject *object) { NmtRouteEntryPrivate *priv = NMT_ROUTE_ENTRY_GET_PRIVATE(object); - NmtNewtGrid * grid = NMT_NEWT_GRID(object); - NmtNewtWidget * warning_label; + NmtNewtGrid *grid = NMT_NEWT_GRID(object); + NmtNewtWidget *warning_label; priv->dest = nmt_ip_entry_new(priv->ip_entry_width, priv->family, TRUE, FALSE); priv->next_hop = nmt_ip_entry_new(priv->ip_entry_width, priv->family, FALSE, TRUE); @@ -213,7 +213,7 @@ nmt_route_entry_get_property(GObject *object, guint prop_id, GValue *value, GPar static void nmt_route_entry_class_init(NmtRouteEntryClass *entry_class) { - GObjectClass * object_class = G_OBJECT_CLASS(entry_class); + GObjectClass *object_class = G_OBJECT_CLASS(entry_class); NmtNewtWidgetClass *widget_class = NMT_NEWT_WIDGET_CLASS(entry_class); g_type_class_add_private(entry_class, sizeof(NmtRouteEntryPrivate)); diff --git a/src/nmtui/nmt-route-table.c b/src/nmtui/nmt-route-table.c index fcb14e6a..4dc28d7c 100644 --- a/src/nmtui/nmt-route-table.c +++ b/src/nmtui/nmt-route-table.c @@ -32,7 +32,7 @@ typedef struct { int ip_entry_width; int metric_entry_width; - GPtrArray * routes; + GPtrArray *routes; NmtNewtWidget *list; } NmtRouteTablePrivate; @@ -59,15 +59,15 @@ nmt_route_table_new(int family) } static gboolean -route_list_transform_to_route(GBinding * binding, +route_list_transform_to_route(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - NmtRouteTable * table = NMT_ROUTE_TABLE(g_binding_get_source(binding)); + NmtRouteTable *table = NMT_ROUTE_TABLE(g_binding_get_source(binding)); NmtRouteTablePrivate *priv = NMT_ROUTE_TABLE_GET_PRIVATE(table); int n = GPOINTER_TO_INT(user_data); - NMIPRoute * route; + NMIPRoute *route; if (n >= priv->routes->len) return FALSE; @@ -78,16 +78,16 @@ route_list_transform_to_route(GBinding * binding, } static gboolean -route_list_transform_from_route(GBinding * binding, +route_list_transform_from_route(GBinding *binding, const GValue *source_value, - GValue * target_value, + GValue *target_value, gpointer user_data) { - NmtRouteTable * table = NMT_ROUTE_TABLE(g_binding_get_source(binding)); + NmtRouteTable *table = NMT_ROUTE_TABLE(g_binding_get_source(binding)); NmtRouteTablePrivate *priv = NMT_ROUTE_TABLE_GET_PRIVATE(table); int n = GPOINTER_TO_INT(user_data); - GPtrArray * routes; - NMIPRoute * route; + GPtrArray *routes; + NMIPRoute *route; if (n >= priv->routes->len) return FALSE; @@ -108,7 +108,7 @@ static NmtNewtWidget * create_route_entry(NmtWidgetList *list, int num, gpointer table) { NmtRouteTablePrivate *priv = NMT_ROUTE_TABLE_GET_PRIVATE(table); - NmtNewtWidget * entry; + NmtNewtWidget *entry; entry = nmt_route_entry_new(priv->family, priv->ip_entry_width, priv->metric_entry_width); @@ -128,7 +128,7 @@ static void add_route(NmtWidgetList *list, gpointer table) { NmtRouteTablePrivate *priv = NMT_ROUTE_TABLE_GET_PRIVATE(table); - NMIPRoute * route; + NMIPRoute *route; if (priv->family == AF_INET) route = nm_ip_route_new(AF_INET, "0.0.0.0", 32, NULL, -1, NULL); @@ -157,10 +157,10 @@ static void nmt_route_table_init(NmtRouteTable *table) { NmtRouteTablePrivate *priv = NMT_ROUTE_TABLE_GET_PRIVATE(table); - NmtNewtWidget * header, *empty; - NmtNewtWidget * dest_prefix_label, *next_hop_label, *metric_label; + NmtNewtWidget *header, *empty; + NmtNewtWidget *dest_prefix_label, *next_hop_label, *metric_label; int dest_prefix_width, next_hop_width, metric_width; - char * text; + char *text; priv->routes = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_route_unref); @@ -219,7 +219,7 @@ static void nmt_route_table_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { NmtRouteTablePrivate *priv = NMT_ROUTE_TABLE_GET_PRIVATE(object); - GPtrArray * array; + GPtrArray *array; int i; switch (prop_id) { diff --git a/src/nmtui/nmt-slave-list.c b/src/nmtui/nmt-slave-list.c index a6ce554d..b3ba8dc4 100644 --- a/src/nmtui/nmt-slave-list.c +++ b/src/nmtui/nmt-slave-list.c @@ -22,7 +22,7 @@ G_DEFINE_TYPE(NmtSlaveList, nmt_slave_list, NMT_TYPE_EDIT_CONNECTION_LIST) typedef struct { NMConnection *master; - const char * master_type, *master_uuid; + const char *master_type, *master_uuid; NmtAddConnectionTypeFilter type_filter; gpointer type_filter_data; @@ -38,7 +38,7 @@ enum { }; static gboolean nmt_slave_list_connection_filter(NmtEditConnectionList *list, - NMConnection * connection, + NMConnection *connection, gpointer user_data); /** @@ -59,7 +59,7 @@ static gboolean nmt_slave_list_connection_filter(NmtEditConnectionList *list, * Returns: a new #NmtSlaveList. */ NmtNewtWidget * -nmt_slave_list_new(NMConnection * master, +nmt_slave_list_new(NMConnection *master, NmtAddConnectionTypeFilter type_filter, gpointer type_filter_data) { @@ -93,12 +93,12 @@ nmt_slave_list_finalize(GObject *object) static gboolean nmt_slave_list_connection_filter(NmtEditConnectionList *list, - NMConnection * connection, + NMConnection *connection, gpointer user_data) { NmtSlaveListPrivate *priv = NMT_SLAVE_LIST_GET_PRIVATE(list); NMSettingConnection *s_con; - const char * master, *master_ifname, *slave_type; + const char *master, *master_ifname, *slave_type; s_con = nm_connection_get_setting_connection(connection); g_return_val_if_fail(s_con != NULL, FALSE); @@ -193,7 +193,7 @@ nmt_slave_list_get_property(GObject *object, guint prop_id, GValue *value, GPara static void nmt_slave_list_class_init(NmtSlaveListClass *list_class) { - GObjectClass * object_class = G_OBJECT_CLASS(list_class); + GObjectClass *object_class = G_OBJECT_CLASS(list_class); NmtEditConnectionListClass *connection_list_class = NMT_EDIT_CONNECTION_LIST_CLASS(list_class); g_type_class_add_private(list_class, sizeof(NmtSlaveListPrivate)); diff --git a/src/nmtui/nmt-slave-list.h b/src/nmtui/nmt-slave-list.h index f220fc12..ab7de7b7 100644 --- a/src/nmtui/nmt-slave-list.h +++ b/src/nmtui/nmt-slave-list.h @@ -30,7 +30,7 @@ typedef struct { GType nmt_slave_list_get_type(void); -NmtNewtWidget *nmt_slave_list_new(NMConnection * master, +NmtNewtWidget *nmt_slave_list_new(NMConnection *master, NmtAddConnectionTypeFilter type_filter, gpointer type_filter_data); diff --git a/src/nmtui/nmt-utils.c b/src/nmtui/nmt-utils.c index bac763f6..84d9e9bb 100644 --- a/src/nmtui/nmt-utils.c +++ b/src/nmtui/nmt-utils.c @@ -42,7 +42,7 @@ typedef struct { gpointer result; - GError * error; + GError *error; gpointer complete; } NmtSyncOpReal; diff --git a/src/nmtui/nmt-widget-list.c b/src/nmtui/nmt-widget-list.c index cd0c6c3c..18d4d16e 100644 --- a/src/nmtui/nmt-widget-list.c +++ b/src/nmtui/nmt-widget-list.c @@ -45,7 +45,7 @@ typedef struct { GPtrArray *remove_buttons; NmtNewtWidget *add_button; - GBinding * add_sensitivity; + GBinding *add_sensitivity; } NmtWidgetListPrivate; enum { @@ -106,7 +106,7 @@ NmtNewtWidget * nmt_widget_list_new(NmtWidgetListCallback create_callback, gpointer user_data, GDestroyNotify destroy_notify, - NmtNewtWidget * empty_widget) + NmtNewtWidget *empty_widget) { return g_object_new(NMT_TYPE_WIDGET_LIST, "create-callback", @@ -166,9 +166,9 @@ static void ensure_widgets(NmtWidgetList *list) { NmtWidgetListPrivate *priv = NMT_WIDGET_LIST_GET_PRIVATE(list); - NmtNewtWidget * widget, *button, *focus; + NmtNewtWidget *widget, *button, *focus; gboolean was_empty; - NmtNewtForm * form; + NmtNewtForm *form; int i; was_empty = priv->widgets->len == 0; diff --git a/src/nmtui/nmt-widget-list.h b/src/nmtui/nmt-widget-list.h index 1825c884..f6ed8c4d 100644 --- a/src/nmtui/nmt-widget-list.h +++ b/src/nmtui/nmt-widget-list.h @@ -42,7 +42,7 @@ typedef NmtNewtWidget *(*NmtWidgetListCallback)(NmtWidgetList *list, int n, gpoi NmtNewtWidget *nmt_widget_list_new(NmtWidgetListCallback create_callback, gpointer user_data, GDestroyNotify destroy_notify, - NmtNewtWidget * empty_widget); + NmtNewtWidget *empty_widget); int nmt_widget_list_get_length(NmtWidgetList *list); void nmt_widget_list_set_length(NmtWidgetList *list, int length); diff --git a/src/nmtui/nmt-wireguard-peer-editor.c b/src/nmtui/nmt-wireguard-peer-editor.c index 810bdf69..a78cfdf0 100644 --- a/src/nmtui/nmt-wireguard-peer-editor.c +++ b/src/nmtui/nmt-wireguard-peer-editor.c @@ -28,8 +28,8 @@ G_DEFINE_TYPE(NmtWireguardPeerEditor, nmt_wireguard_peer_editor, NMT_TYPE_NEWT_F typedef struct { NMSettingWireGuard *orig_setting; NMSettingWireGuard *edit_setting; - NMWireGuardPeer * peer; - NmtNewtEntry * private_key; + NMWireGuardPeer *peer; + NmtNewtEntry *private_key; } NmtWireguardPeerEditorPrivate; enum { @@ -55,7 +55,7 @@ nmt_wireguard_peer_editor_init(NmtWireguardPeerEditor *peer) static void save_peer_and_exit(NmtNewtButton *button, gpointer user_data) { - NmtWireguardPeerEditor * editor = user_data; + NmtWireguardPeerEditor *editor = user_data; NmtWireguardPeerEditorPrivate *priv = NMT_WIREGUARD_PEER_EDITOR_GET_PRIVATE(editor); nm_setting_wireguard_append_peer(priv->orig_setting, priv->peer); @@ -67,10 +67,10 @@ static void nmt_wireguard_peer_editor_constructed(GObject *object) { NmtWireguardPeerEditor *peer = NMT_WIREGUARD_PEER_EDITOR(object); - NmtEditorSection * section; - NmtEditorGrid * grid; - NmtNewtWidget * widget, *label; - NmtNewtWidget * buttons, *ok, *cancel; + NmtEditorSection *section; + NmtEditorGrid *grid; + NmtNewtWidget *widget, *label; + NmtNewtWidget *buttons, *ok, *cancel; if (G_OBJECT_CLASS(nmt_wireguard_peer_editor_parent_class)->constructed) G_OBJECT_CLASS(nmt_wireguard_peer_editor_parent_class)->constructed(object); @@ -161,10 +161,10 @@ nmt_wireguard_peer_editor_constructed(GObject *object) } static void -nmt_wireguard_peer_editor_set_property(GObject * object, +nmt_wireguard_peer_editor_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtWireguardPeerEditorPrivate *priv = NMT_WIREGUARD_PEER_EDITOR_GET_PRIVATE(object); @@ -184,9 +184,9 @@ nmt_wireguard_peer_editor_set_property(GObject * object, } static void -nmt_wireguard_peer_editor_get_property(GObject * object, +nmt_wireguard_peer_editor_get_property(GObject *object, guint prop_id, - GValue * value, + GValue *value, GParamSpec *pspec) { NmtWireguardPeerEditorPrivate *priv = NMT_WIREGUARD_PEER_EDITOR_GET_PRIVATE(object); diff --git a/src/nmtui/nmt-wireguard-peer-list.c b/src/nmtui/nmt-wireguard-peer-list.c index 03f3ef9a..3ac8a88c 100644 --- a/src/nmtui/nmt-wireguard-peer-list.c +++ b/src/nmtui/nmt-wireguard-peer-list.c @@ -24,9 +24,9 @@ G_DEFINE_TYPE(NmtWireguardPeerList, nmt_wireguard_peer_list, NMT_TYPE_NEWT_GRID) typedef struct { NMSettingWireGuard *setting; - GSList * peers; + GSList *peers; - NmtNewtListbox * listbox; + NmtNewtListbox *listbox; NmtNewtButtonBox *buttons; NmtNewtWidget *add; @@ -98,8 +98,8 @@ static void nmt_wireguard_peer_list_init(NmtWireguardPeerList *list) { NmtWireguardPeerListPrivate *priv = NMT_WIREGUARD_PEER_LIST_GET_PRIVATE(list); - NmtNewtWidget * listbox, *buttons; - NmtNewtGrid * grid = NMT_NEWT_GRID(list); + NmtNewtWidget *listbox, *buttons; + NmtNewtGrid *grid = NMT_NEWT_GRID(list); listbox = g_object_new(NMT_TYPE_NEWT_LISTBOX, "flags", @@ -166,8 +166,8 @@ static void nmt_wireguard_peer_list_add_peer(NmtWireguardPeerList *list) { NmtWireguardPeerListPrivate *priv = NMT_WIREGUARD_PEER_LIST_GET_PRIVATE(list); - NMWireGuardPeer * peer = nm_wireguard_peer_new(); - NmtNewtForm * editor; + NMWireGuardPeer *peer = nm_wireguard_peer_new(); + NmtNewtForm *editor; editor = nmt_wireguard_peer_editor_new(priv->setting, peer); @@ -183,8 +183,8 @@ static void nmt_wireguard_peer_list_edit_peer(NmtWireguardPeerList *list) { NmtWireguardPeerListPrivate *priv = NMT_WIREGUARD_PEER_LIST_GET_PRIVATE(list); - NMWireGuardPeer * orig_peer, *edit_peer; - NmtNewtForm * editor; + NMWireGuardPeer *orig_peer, *edit_peer; + NmtNewtForm *editor; int selected_row; selected_row = nmt_newt_listbox_get_active(priv->listbox); @@ -216,10 +216,10 @@ nmt_wireguard_peer_list_remove_peer(NmtWireguardPeerList *list) } static void -nmt_wireguard_peer_list_set_property(GObject * object, +nmt_wireguard_peer_list_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtWireguardPeerListPrivate *priv = NMT_WIREGUARD_PEER_LIST_GET_PRIVATE(object); @@ -237,14 +237,14 @@ nmt_wireguard_peer_list_set_property(GObject * object, } static void -nmt_wireguard_peer_list_get_property(GObject * object, +nmt_wireguard_peer_list_get_property(GObject *object, guint prop_id, - GValue * value, + GValue *value, GParamSpec *pspec) { NmtWireguardPeerListPrivate *priv = NMT_WIREGUARD_PEER_LIST_GET_PRIVATE(object); - GPtrArray * peers; - GSList * iter; + GPtrArray *peers; + GSList *iter; switch (prop_id) { case PROP_SETTING: @@ -269,10 +269,10 @@ static void nmt_wireguard_peer_list_rebuild(NmtWireguardPeerList *list) { NmtWireguardPeerListPrivate *priv = NMT_WIREGUARD_PEER_LIST_GET_PRIVATE(list); - GSList * iter; - NMWireGuardPeer * peer, *selected_peer; + GSList *iter; + NMWireGuardPeer *peer, *selected_peer; int i, row, selected_row, num; - NMSettingWireGuard * setting = priv->setting; + NMSettingWireGuard *setting = priv->setting; selected_row = nmt_newt_listbox_get_active(priv->listbox); selected_peer = nmt_newt_listbox_get_active_key(priv->listbox); diff --git a/src/nmtui/nmtui-connect.c b/src/nmtui/nmtui-connect.c index 4aa91acb..fb456653 100644 --- a/src/nmtui/nmtui-connect.c +++ b/src/nmtui/nmtui-connect.c @@ -33,11 +33,11 @@ static gboolean openconnect_authenticate(NMConnection *connection, char **cookie, char **gateway, char **gwcert) { - GError * error = NULL; + GError *error = NULL; NMSettingVpn *s_vpn; gboolean ret; int status = 0; - const char * gw, *port; + const char *gw, *port; nmt_newt_message_dialog( _("openconnect will be run to authenticate.\nIt will return to nmtui when completed.")); @@ -80,13 +80,13 @@ openconnect_authenticate(NMConnection *connection, char **cookie, char **gateway static void secrets_requested(NMSecretAgentSimple *agent, - const char * request_id, - const char * title, - const char * msg, - GPtrArray * secrets, + const char *request_id, + const char *title, + const char *msg, + GPtrArray *secrets, gpointer user_data) { - NmtNewtForm * form; + NmtNewtForm *form; NMConnection *connection = NM_CONNECTION(user_data); int i; @@ -138,16 +138,16 @@ secrets_requested(NMSecretAgentSimple *agent, } typedef struct { - NMDevice * device; + NMDevice *device; NMActiveConnection *active; - NmtSyncOp * op; + NmtSyncOp *op; } ActivateConnectionInfo; static void connect_cancelled(NmtNewtForm *form, gpointer user_data) { ActivateConnectionInfo *info = user_data; - GError * error = NULL; + GError *error = NULL; error = g_error_new_literal(G_IO_ERROR, G_IO_ERROR_CANCELLED, "Cancelled"); nmt_sync_op_complete_boolean(info->op, FALSE, error); @@ -158,8 +158,8 @@ static void check_activated(ActivateConnectionInfo *info) { NMActiveConnectionState ac_state; - const char * reason = NULL; - gs_free_error GError *error = NULL; + const char *reason = NULL; + gs_free_error GError *error = NULL; ac_state = nmc_activation_get_effective_state(info->active, info->device, &reason); if (!NM_IN_SET(ac_state, @@ -193,9 +193,9 @@ activate_device_state_changed(GObject *object, GParamSpec *pspec, gpointer user_ static void activate_callback(GObject *client, GAsyncResult *result, gpointer user_data) { - NmtSyncOp * op = user_data; + NmtSyncOp *op = user_data; NMActiveConnection *ac; - GError * error = NULL; + GError *error = NULL; ac = nm_client_activate_connection_finish(NM_CLIENT(client), result, &error); if (error) @@ -207,9 +207,9 @@ activate_callback(GObject *client, GAsyncResult *result, gpointer user_data) static void add_and_activate_callback(GObject *client, GAsyncResult *result, gpointer user_data) { - NmtSyncOp * op = user_data; + NmtSyncOp *op = user_data; NMActiveConnection *ac; - GError * error = NULL; + GError *error = NULL; ac = nm_client_add_and_activate_connection_finish(NM_CLIENT(client), result, &error); if (error) @@ -232,13 +232,13 @@ deactivate_connection(NMActiveConnection *ac) static void activate_connection(NMConnection *connection, NMDevice *device, NMObject *specific_object) { - NmtNewtForm * form; + NmtNewtForm *form; gs_unref_object NMSecretAgentSimple *agent = NULL; - NmtNewtWidget * label; + NmtNewtWidget *label; NmtSyncOp op; - const char * specific_object_path; - NMActiveConnection * ac; - GError * error = NULL; + const char *specific_object_path; + NMActiveConnection *ac; + GError *error = NULL; ActivateConnectionInfo info = {}; form = g_object_new(NMT_TYPE_NEWT_FORM, "escape-exits", TRUE, NULL); @@ -351,10 +351,10 @@ static void listbox_activated(NmtNewtListbox *listbox, gpointer user_data) { NmtConnectConnectionList *list = NMT_CONNECT_CONNECTION_LIST(listbox); - NMConnection * connection; - NMDevice * device; - NMObject * specific_object; - NMActiveConnection * ac; + NMConnection *connection; + NMDevice *device; + NMObject *specific_object; + NMActiveConnection *ac; if (!nmt_connect_connection_list_get_selection(list, &connection, @@ -379,9 +379,9 @@ static void listbox_active_changed(GObject *object, GParamSpec *pspec, gpointer button) { NmtConnectConnectionList *list = NMT_CONNECT_CONNECTION_LIST(object); - static const char * activate, *deactivate; + static const char *activate, *deactivate; static int deactivate_padding, activate_padding; - NMActiveConnection * ac; + NMActiveConnection *ac; gboolean has_selection; if (G_UNLIKELY(activate == NULL)) { @@ -412,7 +412,7 @@ static NmtNewtForm * nmt_connect_connection_list(gboolean is_top) { int screen_width, screen_height; - NmtNewtForm * form; + NmtNewtForm *form; NmtNewtWidget *list, *activate, *quit, *bbox, *grid; newtGetScreenSize(&screen_width, &screen_height); @@ -455,10 +455,10 @@ nmt_connect_connection_list(gboolean is_top) static NmtNewtForm * nmt_connect_connection(const char *identifier) { - NmtNewtWidget * list; - NMConnection * connection; - NMDevice * device; - NMObject * specific_object; + NmtNewtWidget *list; + NMConnection *connection; + NMDevice *device; + NMObject *specific_object; NMActiveConnection *ac; list = nmt_connect_connection_list_new(); diff --git a/src/nmtui/nmtui-edit.c b/src/nmtui/nmtui-edit.c index 534643a7..ec80a203 100644 --- a/src/nmtui/nmtui-edit.c +++ b/src/nmtui/nmtui-edit.c @@ -45,13 +45,13 @@ list_remove_connection(NmtEditConnectionList *list, NMRemoteConnection *connecti static gboolean edit_connection_list_filter(NmtEditConnectionList *list, - NMConnection * connection, + NMConnection *connection, gpointer user_data) { NMSettingConnection *s_con; - const char * master, *slave_type; - const char * uuid, *ifname; - const GPtrArray * conns; + const char *master, *slave_type; + const char *uuid, *ifname; + const GPtrArray *conns; int i; gboolean found_master = FALSE; @@ -86,7 +86,7 @@ static NmtNewtForm * nmt_edit_main_connection_list(gboolean is_top) { int screen_width, screen_height; - NmtNewtForm * form; + NmtNewtForm *form; NmtNewtWidget *quit, *list; newtGetScreenSize(&screen_width, &screen_height); @@ -137,9 +137,9 @@ typedef struct { NmtNewtTextbox *textbox; NmtNewtListbox *listbox; - char * primary_text; - char * secondary_text; - NMConnection * master; + char *primary_text; + char *secondary_text; + NMConnection *master; NmtAddConnectionTypeFilter type_filter; gpointer type_filter_data; @@ -181,8 +181,8 @@ static void nmt_add_connection_init(NmtAddConnection *form) { NmtAddConnectionPrivate *priv = NMT_ADD_CONNECTION_GET_PRIVATE(form); - NmtNewtWidget * textbox, *listbox, *button; - NmtNewtGrid * grid, *buttons; + NmtNewtWidget *textbox, *listbox, *button; + NmtNewtGrid *grid, *buttons; grid = NMT_NEWT_GRID(nmt_newt_grid_new()); @@ -222,9 +222,9 @@ nmt_add_connection_init(NmtAddConnection *form) static void nmt_add_connection_constructed(GObject *object) { - NmtAddConnectionPrivate * priv = NMT_ADD_CONNECTION_GET_PRIVATE(object); + NmtAddConnectionPrivate *priv = NMT_ADD_CONNECTION_GET_PRIVATE(object); NMEditorConnectionTypeData **types; - char * text; + char *text; int i, num_types; if (priv->secondary_text) { @@ -275,10 +275,10 @@ nmt_add_connection_finalize(GObject *object) } static void -nmt_add_connection_set_property(GObject * object, +nmt_add_connection_set_property(GObject *object, guint prop_id, const GValue *value, - GParamSpec * pspec) + GParamSpec *pspec) { NmtAddConnectionPrivate *priv = NMT_ADD_CONNECTION_GET_PRIVATE(object); @@ -334,7 +334,7 @@ nmt_add_connection_get_property(GObject *object, guint prop_id, GValue *value, G static void nmt_add_connection_class_init(NmtAddConnectionClass *add_class) { - GObjectClass * object_class = G_OBJECT_CLASS(add_class); + GObjectClass *object_class = G_OBJECT_CLASS(add_class); NmtNewtFormClass *form_class = NMT_NEWT_FORM_CLASS(add_class); g_type_class_add_private(add_class, sizeof(NmtAddConnectionPrivate)); @@ -404,9 +404,9 @@ nmt_add_connection(void) } void -nmt_add_connection_full(const char * primary_text, - const char * secondary_text, - NMConnection * master, +nmt_add_connection_full(const char *primary_text, + const char *secondary_text, + NMConnection *master, NmtAddConnectionTypeFilter type_filter, gpointer type_filter_data) { @@ -453,7 +453,7 @@ static void connection_deleted_callback(GObject *connection, GAsyncResult *result, gpointer user_data) { ConnectionDeleteData *data = user_data; - GError * error = NULL; + GError *error = NULL; if (!nm_remote_connection_delete_finish(data->connection, result, &error)) { nmt_newt_message_dialog(_("Unable to delete connection: %s"), error->message); @@ -481,7 +481,7 @@ static void remove_one_connection(NMRemoteConnection *connection) { ConnectionDeleteData data; - GError * error = NULL; + GError *error = NULL; data.got_callback = data.got_signal = FALSE; nmt_sync_op_init(&data.op); @@ -506,12 +506,12 @@ remove_one_connection(NMRemoteConnection *connection) void nmt_remove_connection(NMRemoteConnection *connection) { - const GPtrArray * all_conns; - GSList * slaves, *iter; + const GPtrArray *all_conns; + GSList *slaves, *iter; int i; - NMRemoteConnection * slave; + NMRemoteConnection *slave; NMSettingConnection *s_con; - const char * uuid, *iface, *master; + const char *uuid, *iface, *master; int choice; choice = nmt_newt_choice_dialog(_("Cancel"), diff --git a/src/nmtui/nmtui-edit.h b/src/nmtui/nmtui-edit.h index 99e370b4..e8685602 100644 --- a/src/nmtui/nmtui-edit.h +++ b/src/nmtui/nmtui-edit.h @@ -13,9 +13,9 @@ typedef gboolean (*NmtAddConnectionTypeFilter)(GType connection_type, gpointer u NmtNewtForm *nmtui_edit(gboolean is_top, int argc, char **argv); void nmt_add_connection(void); -void nmt_add_connection_full(const char * primary_text, - const char * secondary_text, - NMConnection * master, +void nmt_add_connection_full(const char *primary_text, + const char *secondary_text, + NMConnection *master, NmtAddConnectionTypeFilter type_filter, gpointer type_filter_data); diff --git a/src/nmtui/nmtui-hostname.c b/src/nmtui/nmtui-hostname.c index 2f252428..65af73cc 100644 --- a/src/nmtui/nmtui-hostname.c +++ b/src/nmtui/nmtui-hostname.c @@ -21,12 +21,12 @@ static char * nmtui_hostname_run_dialog(void) { - NmtNewtForm * form; - NmtNewtWidget * widget, *ok, *cancel; - NmtNewtGrid * grid; - NmtNewtEntry * entry; + NmtNewtForm *form; + NmtNewtWidget *widget, *ok, *cancel; + NmtNewtGrid *grid; + NmtNewtEntry *entry; NmtNewtButtonBox *bbox; - char * hostname, *ret = NULL; + char *hostname, *ret = NULL; form = g_object_new(NMT_TYPE_NEWT_FORM, "title", _("Set Hostname"), "escape-exits", TRUE, NULL); @@ -79,9 +79,9 @@ NmtNewtForm * nmtui_hostname(gboolean is_top, int argc, char **argv) { const char *hostname; - char * tmp = NULL; + char *tmp = NULL; NmtSyncOp op; - GError * error = NULL; + GError *error = NULL; if (argc == 2) hostname = argv[1]; diff --git a/src/nmtui/nmtui.c b/src/nmtui/nmtui.c index 897e0911..c99d1641 100644 --- a/src/nmtui/nmtui.c +++ b/src/nmtui/nmtui.c @@ -27,14 +27,14 @@ #include "nmtui-connect.h" #include "nmtui-hostname.h" -NMClient * nm_client; +NMClient *nm_client; static GMainLoop *loop; typedef NmtNewtForm *(*NmtuiSubprogram)(gboolean is_top, int argc, char **argv); static const struct { - const char * name, *shortcut, *arg; - const char * display_name; + const char *name, *shortcut, *arg; + const char *display_name; NmtuiSubprogram func; } subprograms[] = { {"edit", "nmtui-edit", N_("connection"), N_("Edit a connection"), nmtui_edit}, @@ -57,7 +57,7 @@ quit_func(int argc, char **argv) static void main_list_activated(NmtNewtWidget *widget, NmtNewtListbox *listbox) { - NmtNewtForm * form; + NmtNewtForm *form; NmtuiSubprogram sub; sub = nmt_newt_listbox_get_active_key(listbox); @@ -73,10 +73,10 @@ main_list_activated(NmtNewtWidget *widget, NmtNewtListbox *listbox) static NmtNewtForm * nmtui_main(gboolean is_top, int argc, char **argv) { - NmtNewtForm * form; - NmtNewtWidget * widget, *ok; - NmtNewtGrid * grid; - NmtNewtListbox * listbox; + NmtNewtForm *form; + NmtNewtWidget *widget, *ok; + NmtNewtGrid *grid; + NmtNewtListbox *listbox; NmtNewtButtonBox *bbox; int i; @@ -162,7 +162,7 @@ usage(void) typedef struct { NmtuiSubprogram subprogram; int argc; - char ** argv; + char **argv; } NmtuiStartupData; static void @@ -175,7 +175,7 @@ static gboolean idle_run_subprogram(gpointer user_data) { NmtuiStartupData *data = user_data; - NmtNewtForm * form; + NmtNewtForm *form; form = data->subprogram(TRUE, data->argc, data->argv); if (form) { @@ -210,10 +210,10 @@ GOptionEntry entries[] = {{"sleep", int main(int argc, char **argv) { - GOptionContext * opts; - GError * error = NULL; + GOptionContext *opts; + GError *error = NULL; NmtuiStartupData startup_data; - const char * prgname; + const char *prgname; int i; setlocale(LC_ALL, ""); diff --git a/src/tests/client/test-client.check-on-disk/test_003.expected b/src/tests/client/test-client.check-on-disk/test_003.expected index beb58fe4..5ba040ef 100644 --- a/src/tests/client/test-client.check-on-disk/test_003.expected +++ b/src/tests/client/test-client.check-on-disk/test_003.expected @@ -4430,12 +4430,12 @@ UUID-con-gsm3-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 7193 +size: 7191 location: src/tests/client/test-client.py:test_003()/102 cmd: $NMCLI --pretty con s ethernet lang: C returncode: 0 -stdout: 7050 bytes +stdout: 7048 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -4542,7 +4542,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -4560,7 +4560,7 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -4726,12 +4726,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6210 +size: 6209 location: src/tests/client/test-client.py:test_003()/104 cmd: $NMCLI --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 6027 bytes +stdout: 6026 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -4838,7 +4838,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -5236,12 +5236,12 @@ UUID-con-gsm3-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 7205 +size: 7203 location: src/tests/client/test-client.py:test_003()/112 cmd: $NMCLI --pretty --color yes con s ethernet lang: C returncode: 0 -stdout: 7050 bytes +stdout: 7048 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -5348,7 +5348,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -5366,7 +5366,7 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -5532,12 +5532,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6222 +size: 6221 location: src/tests/client/test-client.py:test_003()/114 cmd: $NMCLI --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 6027 bytes +stdout: 6026 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -5644,7 +5644,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -7958,12 +7958,12 @@ UUID-con-gsm3-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 6473 +size: 6461 location: src/tests/client/test-client.py:test_003()/162 cmd: $NMCLI --mode tabular --pretty con s ethernet lang: C returncode: 0 -stdout: 6315 bytes +stdout: 6303 bytes >>> ========================================= Connection profile details (ethernet) @@ -7988,17 +7988,17 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth1 eth1 activated no no -- no /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deactivating no no -- no /org/freedesktop/NetworkManager/ActiveConnection/1 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- @@ -8052,12 +8052,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deza <<< -size: 5549 +size: 5543 location: src/tests/client/test-client.py:test_003()/164 cmd: $NMCLI --mode tabular --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 5351 bytes +stdout: 5345 bytes >>> ========================================= Connection profile details (ethernet) @@ -8082,9 +8082,9 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deactivating no no -- no /org/freedesktop/NetworkManager/ActiveConnection/1 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- @@ -8306,12 +8306,12 @@ UUID-con-gsm3-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 6485 +size: 6473 location: src/tests/client/test-client.py:test_003()/172 cmd: $NMCLI --mode tabular --pretty --color yes con s ethernet lang: C returncode: 0 -stdout: 6315 bytes +stdout: 6303 bytes >>> ========================================= Connection profile details (ethernet) @@ -8336,17 +8336,17 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth1 eth1 activated no no -- no /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deactivating no no -- no /org/freedesktop/NetworkManager/ActiveConnection/1 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- @@ -8400,12 +8400,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deza <<< -size: 5561 +size: 5555 location: src/tests/client/test-client.py:test_003()/174 cmd: $NMCLI --mode tabular --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 5351 bytes +stdout: 5345 bytes >>> ========================================= Connection profile details (ethernet) @@ -8430,9 +8430,9 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deactivating no no -- no /org/freedesktop/NetworkManager/ActiveConnection/1 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- @@ -11032,12 +11032,12 @@ TYPE: ethernet ------------------------------------------------------------------------------- <<< -size: 7210 +size: 7208 location: src/tests/client/test-client.py:test_003()/222 cmd: $NMCLI --mode multiline --pretty con s ethernet lang: C returncode: 0 -stdout: 7050 bytes +stdout: 7048 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -11144,7 +11144,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -11162,7 +11162,7 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -11328,12 +11328,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6227 +size: 6226 location: src/tests/client/test-client.py:test_003()/224 cmd: $NMCLI --mode multiline --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 6027 bytes +stdout: 6026 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -11440,7 +11440,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -12064,12 +12064,12 @@ TYPE: ethernet ------------------------------------------------------------------------------- <<< -size: 7222 +size: 7220 location: src/tests/client/test-client.py:test_003()/232 cmd: $NMCLI --mode multiline --pretty --color yes con s ethernet lang: C returncode: 0 -stdout: 7050 bytes +stdout: 7048 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -12176,7 +12176,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -12194,7 +12194,7 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -12360,12 +12360,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6239 +size: 6238 location: src/tests/client/test-client.py:test_003()/234 cmd: $NMCLI --mode multiline --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 6027 bytes +stdout: 6026 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -12472,7 +12472,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -15260,18 +15260,18 @@ stderr: 58 bytes Błąd: ethernet — nie ma takiego profilu połączenia. <<< -size: 1421 +size: 1420 location: src/tests/client/test-client.py:test_003()/284 cmd: $NMCLI --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 1238 bytes +stdout: 1237 bytes >>> =============================================================================== Connection profile details =============================================================================== =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -15586,18 +15586,18 @@ stderr: 58 bytes Błąd: ethernet — nie ma takiego profilu połączenia. <<< -size: 1433 +size: 1432 location: src/tests/client/test-client.py:test_003()/294 cmd: $NMCLI --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 1238 bytes +stdout: 1237 bytes >>> =============================================================================== Connection profile details =============================================================================== =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -16804,19 +16804,19 @@ stderr: 58 bytes Błąd: ethernet — nie ma takiego profilu połączenia. <<< -size: 1261 +size: 1255 location: src/tests/client/test-client.py:test_003()/344 cmd: $NMCLI --mode tabular --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 1063 bytes +stdout: 1057 bytes >>> ============================== Connection profile details ============================== -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deactivating no no -- no /org/freedesktop/NetworkManager/ActiveConnection/1 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- @@ -17036,19 +17036,19 @@ stderr: 58 bytes Błąd: ethernet — nie ma takiego profilu połączenia. <<< -size: 1273 +size: 1267 location: src/tests/client/test-client.py:test_003()/354 cmd: $NMCLI --mode tabular --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 1063 bytes +stdout: 1057 bytes >>> ============================== Connection profile details ============================== -====================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) -====================================================================== +==================================================================== + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 eth0 deactivating no no -- no /org/freedesktop/NetworkManager/ActiveConnection/1 /org/freedesktop/NetworkManager/Settings/Connection/6 -- -- @@ -18710,18 +18710,18 @@ stderr: 58 bytes Błąd: ethernet — nie ma takiego profilu połączenia. <<< -size: 1438 +size: 1437 location: src/tests/client/test-client.py:test_003()/404 cmd: $NMCLI --mode multiline --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 1238 bytes +stdout: 1237 bytes >>> =============================================================================== Connection profile details =============================================================================== =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL @@ -19258,18 +19258,18 @@ stderr: 58 bytes Błąd: ethernet — nie ma takiego profilu połączenia. <<< -size: 1450 +size: 1449 location: src/tests/client/test-client.py:test_003()/414 cmd: $NMCLI --mode multiline --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 1238 bytes +stdout: 1237 bytes >>> =============================================================================== Connection profile details =============================================================================== =============================================================================== - Activate connection details (UUID-ethernet-REPLACED-REPLACED-REPL) + Active connection details (UUID-ethernet-REPLACED-REPLACED-REPL) =============================================================================== GENERAL.NAME: ethernet GENERAL.UUID: UUID-ethernet-REPLACED-REPLACED-REPL diff --git a/src/tests/client/test-client.check-on-disk/test_004.expected b/src/tests/client/test-client.check-on-disk/test_004.expected index 25d4f424..ca8af006 100644 --- a/src/tests/client/test-client.check-on-disk/test_004.expected +++ b/src/tests/client/test-client.check-on-disk/test_004.expected @@ -7398,12 +7398,12 @@ connection.type: 802-11-wireless connection.interface-name: -- <<< -size: 6335 +size: 6334 location: src/tests/client/test-client.py:test_004()/125 cmd: $NMCLI --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -7501,7 +7501,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -7658,12 +7658,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6335 +size: 6334 location: src/tests/client/test-client.py:test_004()/127 cmd: $NMCLI --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -7761,7 +7761,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -8164,15 +8164,15 @@ vpn.timeout: 0 ------------------------------------------------------------------------------- <<< -size: 1181 +size: 1180 location: src/tests/client/test-client.py:test_004()/133 cmd: $NMCLI --pretty -f GENERAL con s con-vpn-1 lang: C returncode: 0 -stdout: 1026 bytes +stdout: 1025 bytes >>> =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -11324,12 +11324,12 @@ connection.interface-name: -- ------------------------------------------------------------------------------- <<< -size: 6347 +size: 6346 location: src/tests/client/test-client.py:test_004()/175 cmd: $NMCLI --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -11427,7 +11427,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -11584,12 +11584,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6347 +size: 6346 location: src/tests/client/test-client.py:test_004()/177 cmd: $NMCLI --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -11687,7 +11687,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -12090,15 +12090,15 @@ vpn.timeout: 0 ------------------------------------------------------------------------------- <<< -size: 1193 +size: 1192 location: src/tests/client/test-client.py:test_004()/183 cmd: $NMCLI --pretty --color yes -f GENERAL con s con-vpn-1 lang: C returncode: 0 -stdout: 1026 bytes +stdout: 1025 bytes >>> =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -25006,12 +25006,12 @@ interface-name <<< -size: 5499 +size: 5493 location: src/tests/client/test-client.py:test_004()/425 cmd: $NMCLI --mode tabular --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 5340 bytes +stdout: 5334 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -25036,9 +25036,9 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) -====================================================================== +==================================================================== + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP wlan0 wlan0 activated no no -- yes /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/3 -- -- @@ -25090,12 +25090,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — Połączono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5499 +size: 5493 location: src/tests/client/test-client.py:test_004()/427 cmd: $NMCLI --mode tabular --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 5340 bytes +stdout: 5334 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -25120,9 +25120,9 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) -====================================================================== +==================================================================== + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP wlan0 wlan0 activated no no -- yes /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/3 -- -- @@ -25268,16 +25268,16 @@ name service-type user-name data vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 nie 0 <<< -size: 1134 +size: 1128 location: src/tests/client/test-client.py:test_004()/433 cmd: $NMCLI --mode tabular --pretty -f GENERAL con s con-vpn-1 lang: C returncode: 0 -stdout: 965 bytes +stdout: 959 bytes >>> -====================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) -====================================================================== +==================================================================== + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP wlan0 wlan0 activated no no -- yes /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/3 -- -- @@ -27314,12 +27314,12 @@ interface-name <<< -size: 5511 +size: 5505 location: src/tests/client/test-client.py:test_004()/475 cmd: $NMCLI --mode tabular --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 5340 bytes +stdout: 5334 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -27344,9 +27344,9 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) -====================================================================== +==================================================================== + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP wlan0 wlan0 activated no no -- yes /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/3 -- -- @@ -27398,12 +27398,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — Połączono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5511 +size: 5505 location: src/tests/client/test-client.py:test_004()/477 cmd: $NMCLI --mode tabular --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 5340 bytes +stdout: 5334 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -27428,9 +27428,9 @@ name method browser-only pac-url pac-script -------------------------------------------------- proxy none no -- -- -====================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) -====================================================================== +==================================================================== + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP wlan0 wlan0 activated no no -- yes /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/3 -- -- @@ -27576,16 +27576,16 @@ name service-type user-name data vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 nie 0 <<< -size: 1146 +size: 1140 location: src/tests/client/test-client.py:test_004()/483 cmd: $NMCLI --mode tabular --pretty --color yes -f GENERAL con s con-vpn-1 lang: C returncode: 0 -stdout: 965 bytes +stdout: 959 bytes >>> -====================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) -====================================================================== +==================================================================== + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) +==================================================================== GROUP NAME UUID DEVICES IP-IFACE STATE DEFAULT DEFAULT6 SPEC-OBJECT VPN DBUS-PATH CON-PATH ZONE MASTER-PATH ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP wlan0 wlan0 activated no no -- yes /org/freedesktop/NetworkManager/ActiveConnection/2 /org/freedesktop/NetworkManager/Settings/Connection/3 -- -- @@ -39006,12 +39006,12 @@ connection.type: 802-11-wireless connection.interface-name: -- <<< -size: 6352 +size: 6351 location: src/tests/client/test-client.py:test_004()/725 cmd: $NMCLI --mode multiline --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -39109,7 +39109,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -39266,12 +39266,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6352 +size: 6351 location: src/tests/client/test-client.py:test_004()/727 cmd: $NMCLI --mode multiline --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -39369,7 +39369,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -39772,15 +39772,15 @@ vpn.timeout: 0 ------------------------------------------------------------------------------- <<< -size: 1198 +size: 1197 location: src/tests/client/test-client.py:test_004()/733 cmd: $NMCLI --mode multiline --pretty -f GENERAL con s con-vpn-1 lang: C returncode: 0 -stdout: 1026 bytes +stdout: 1025 bytes >>> =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -43462,12 +43462,12 @@ connection.interface-name: -- ------------------------------------------------------------------------------- <<< -size: 6364 +size: 6363 location: src/tests/client/test-client.py:test_004()/775 cmd: $NMCLI --mode multiline --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -43565,7 +43565,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -43722,12 +43722,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6364 +size: 6363 location: src/tests/client/test-client.py:test_004()/777 cmd: $NMCLI --mode multiline --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 6191 bytes +stdout: 6190 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -43825,7 +43825,7 @@ proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -44228,15 +44228,15 @@ vpn.timeout: 0 ------------------------------------------------------------------------------- <<< -size: 1210 +size: 1209 location: src/tests/client/test-client.py:test_004()/783 cmd: $NMCLI --mode multiline --pretty --color yes -f GENERAL con s con-vpn-1 lang: C returncode: 0 -stdout: 1026 bytes +stdout: 1025 bytes >>> =============================================================================== - Activate connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) + Active connection details (UUID-con-vpn-1-REPLACED-REPLACED-REP) =============================================================================== GENERAL.NAME: con-vpn-1 GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP diff --git a/tools/run-nm-test.sh b/tools/run-nm-test.sh index 230a7a66..b1d3dd93 100755 --- a/tools/run-nm-test.sh +++ b/tools/run-nm-test.sh @@ -37,6 +37,7 @@ usage() { echo " --no-libtool: when running with valgrind, the script tries automatically to" echo " use libtool as necessary. This disables libtool usage" echo " --make-first|-m: before running the test, make it (only works with autotools build)" + echo " --no-make-first|-M: disable --make-first option" echo " --valgrind|-v: run under valgrind" echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)" echo " -d: set NMTST_DEBUG=d" @@ -165,6 +166,10 @@ else NMTST_MAKE_FIRST=1 shift ;; + --no-make-first|-M) + NMTST_MAKE_FIRST=0 + shift + ;; "--valgrind"|-v) NMTST_USE_VALGRIND=1 shift; diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py index f990a0e4..a7788510 100755 --- a/tools/test-networkmanager-service.py +++ b/tools/test-networkmanager-service.py @@ -1077,6 +1077,9 @@ class Device(ExportedObj): elif isinstance(self, WifiDevice): if con_inst.get_type() == NM.SETTING_WIRELESS_SETTING_NAME: return True + elif isinstance(self, VlanDevice): + if con_inst.get_type() == NM.SETTING_VLAN_SETTING_NAME: + return True return False def available_connections_get(self): @@ -1630,6 +1633,9 @@ class NetworkManager(ExportedObj): ac = ActiveConnection(device, con_inst, None) self.active_connection_add(ac) + + gl.manager.devices_available_connections_update() + return ExportedObj.to_path(ac) def active_connection_add(self, ac): -- cgit 1.3.0-6-gf8a5