Dan Williams
4db851f852
libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices property
...
Mirror new NetworkManager API to return both real devices and
device placeholders.
2015-12-04 12:16:41 +01:00
Dan Williams
deb6c5f714
libnm-glib/libnm: add support for "real" NMDevice property
2015-12-04 12:15:12 +01:00
Lubomir Rintel
b2fa116486
libnm,libnm-glib: add Device.Managed setter
2015-09-18 13:14:23 +02:00
Mathieu Trudel-Lapierre
f3b8285be5
wifi: expose the last_seen property for a NMAccessPoint
...
https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00053.html
2015-04-29 07:49:23 +02:00
Jiří Klimeš
922a78d120
libnm-glib: add :parent property for VLAN devices
2014-11-24 10:33:22 +01:00
Jiří Klimeš
576c82049b
libnm-glib: implement nm_device_delete() for D-Bus device' Delete() method
2014-07-22 14:24:42 +02:00
Jiří Klimeš
3dbe8041a7
libnm-glib: add nm_device_is_software() function to NMDevice
...
It says whether the device is a software one, according to device capabilities.
2014-07-22 14:24:42 +02:00
Dan Winship
5cd37d250a
libnm-glib: add nm_device_get_setting_type()
...
Add a function mapping NMDevices to their corresponding base NMSetting
types.
2014-03-06 09:38:36 -05:00
Jiří Klimeš
ee6f684f0a
libnm-glib: support 'type', 'id' properties in NMActiveConnection (rh #1061822 )
...
https://bugzilla.redhat.com/show_bug.cgi?id=1061822
2014-03-05 16:17:13 +01:00
Thomas Haller
f8dcab53d9
libnm-glib: take reference in NMRemoteConnection before calling DBUS
...
We always have to take a reference to the NMRemoteConnection
before calling to DBUS, because the connection might be deleted
in the meantime.
https://bugzilla.gnome.org/show_bug.cgi?id=723168
Signed-off-by: Thomas Haller <thaller@redhat.com >
2014-02-21 16:20:29 +01:00
Thomas Haller
f76934de15
libnm-glib: add function nm_remote_settings_get_connection_by_id()
...
Utility function, to search the list of connections for a connection
with a matching id/name. Returns the first match.
Signed-off-by: Thomas Haller <thaller@redhat.com >
2014-01-27 15:39:51 -05:00
Dan Winship
f7b1b28202
libnm-util, libnm-glib: add device/connection describing functions
...
Add functions to describe and disambiguate devices and connections for
display to the user. Originally from libnm-gtk.
2014-01-27 15:39:51 -05:00
Jiří Klimeš
8ee4f58e9e
libnm-glib: additional functions to get nameservers (rh #1056146 )
...
This commit adds two new functions for introspection users to get nameservers:
guint32 nm_ip6_config_get_num_nameservers (NMIP6Config *config)
const struct in6_addr *nm_ip6_config_get_nameserver (NMIP6Config *config, guint32 idx)
The existing function can't be used due to GObject introspection limitations:
const GSList *nm_ip6_config_get_nameservers (NMIP6Config *config);
https://bugzilla.redhat.com/show_bug.cgi?id=1056146
2014-01-23 12:53:18 +01:00
Jiří Klimeš
3391fa810c
libnm-glib: export missing get_gateway() and get_searches() functions
...
They were added by db9b7e10ac
commit.
2014-01-22 15:52:19 +01:00
Jiří Klimeš
f53f39847a
libnm-glib: add NMActiveConnection:vpn property
...
It is mainly useful for GObject introspection users helping them to find out
whether the connection is VPN easier.
2014-01-15 13:10:42 +01:00
Jiří Klimeš
17a7763d81
libnm-glib: add 'mtu' property to NMDevice
2013-12-20 11:37:54 +01:00
Jiří Klimeš
567cfa41f4
libnm-glib: add nm_device_get_hw_address() to NMDevice
...
It simplifies code getting MAC addresses for clients.
2013-12-20 11:37:54 +01:00
Dan Winship
4783f43c53
libnm-glib: expose new NMActiveConnection IP/DHCP config properties
2013-12-19 11:49:50 -05:00
Dan Winship
a52ebc74b5
libnm-glib: add nm_remote_settings_load_connections()
...
https://bugzilla.gnome.org/show_bug.cgi?id=709830
2013-11-15 13:38:48 -05:00
Dan Winship
47cc8b25f2
libnm-glib: add NMDevice:physical-port-id property
...
Add the physical-port-id property to NMDevice so that clients can
recognize NPAR/SR-IOV devices.
2013-11-06 10:26:16 -05:00
Dan Winship
f668423832
libnm-glib: Add NMClient:primary-connection and :activating-connection
...
https://bugzilla.gnome.org/show_bug.cgi?id=704841
2013-08-28 11:01:43 -04:00
Dan Winship
84919405e1
libnm-glib: support new connectivity property/methods
2013-08-28 10:54:09 -04:00
Giovanni Campagna
36963d6381
libnm-glib: add missing symbol
...
The symbol is part of the public API (included in the GIR file),
and gjs complains loudly if a defined symbol is not found.
https://bugzilla.gnome.org/show_bug.cgi?id=706259
Acked-by: Pavel Šimerda <psimerda@redhat.com >
2013-08-19 12:18:34 +02:00
Dan Winship
4d8063cd78
libnm-glib: add NMClient:startup, nm_client_get_startup()
...
Expose the new NMManager:startup property on NMClient.
2013-08-16 17:27:34 -04:00
Jiri Pirko
c4eade715f
libnm-glib: add support for team device
...
Signed-off-by: Jiri Pirko <jiri@resnulli.us >
2013-08-15 10:54:15 -05:00
Dan Williams
e7dbe20526
libnm-glib: add support for agent capabilities during registration
...
Tries the new RegisterWithCapabilities method first, and falls back
to the old Register method for compatibility with older NetworkManager.
2013-07-31 08:16:40 -05:00
Dan Winship
1f81851017
core: add monitor-connection-files=false and ReloadConnections
...
Add a "monitor-connection-files" config option, which can be set to
"false" to disable automatic reloading of connections on file change.
To go with this, add a new ReloadConnections method on
o.fd.NM.Settings that can be used to manually reload connections, and
add an nm-cli command to call it.
2013-06-14 12:57:47 -03:00
Dan Williams
c41bd34570
libnm-glib: add support for new connection unsaved functionality
2013-05-28 12:26:56 -05:00
Dan Winship
ae9a389f83
libnm-glib, cli: add nm_device_get_type_description
...
Add a new libnm-glib method to get the type description for a device,
and use it in nmcli. For most types, the type description is based on
the class name, but for NMDeviceGeneric, it comes from the
:type-description property.
2013-05-07 12:46:56 -04:00
Dan Winship
ce4f2a4bd6
core, libnm-glib: add NMDeviceGeneric
...
Add NMDeviceGeneric, to provide generic support for unknown device
types, and create NMDeviceGenerics for those devices that NM
previously was ignoring. Allow NMSettingGeneric connections to be
activated on (managed) NMDeviceGenerics.
2013-05-07 12:46:56 -04:00
Dan Williams
110a40358d
libnm-glib: never call NM D-Bus methods if NM isn't running
...
Though the client shouldn't be calling anything when NM isn't running
(because clients have nm_client_get_manager_running()), make sure
that NMClient never calls a NetworkManager method when NM isn't
on the bus.
Next, ensure NMObject doesn't try to refresh properties when NM isn't
running. Creating an NMClient may trigger a property refresh request,
but if NM isn't running, defer that until NM starts, to ensure that
we don't D-Bus autostart NM.
Third, ensure NMRemoteSettings doesn't attempt to list connections
unless NM is running.
This prevents service activation of NetworkManager in lieu of dbus-glib
learning about DBUS_HEADER_FLAG_NO_AUTO_START.
2013-04-08 11:30:32 -05:00
Dan Winship
dbbec9b7d7
libnm-glib: match interface name in nm_device_connection_compatible()
...
Do NMSettingConnection:interface-name matching on the client side as
well, so that, eg, nm-applet does not list connections under the wrong
device.
(Also, move some return-if-fail checks from the subclass method
implementations into the wrapper function.)
https://bugzilla.gnome.org/show_bug.cgi?id=693684
2013-03-13 16:45:19 -04:00
Dan Winship
43f259ee1f
libnm-glib: add NMDevice:available-connections
...
NMDevice has a D-Bus "AvailableConnections" property, but we weren't
exposing it on NMDevice. Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=693669
2013-02-14 09:31:33 -05:00
Jiří Klimeš
0309bdc2e0
libnm-glib: add nm_client_set_logging() for setting debugging level and domains
2013-01-09 16:47:49 +01:00
Jiří Klimeš
4ce355022c
libnm-glib: add nm_client_get_logging() function
...
to get current logging level and domains.
2013-01-09 16:47:49 +01:00
Jiří Klimeš
e837098b00
libnm-glib: add nm_device_wifi_request_scan_simple() to tell NM to scan for APs
...
by calling RequestScan() D-Bus call on the Wi-Fi device (without any options).
2013-01-09 16:41:40 +01:00
Jiří Klimeš
1a7f9e661a
core,libnm-glib: expose "slaves" property on NMDeviceBridge
2012-11-30 13:21:51 -06:00
Thomas Graf
cfff5a63d9
bridge: add bridge device type
...
This adds a new device type 'bridge'. Kernel devices are created
on demand.
2012-11-30 13:21:51 -06:00
Dan Winship
ad74379c2c
core, libnm-glib: expose "slaves" property on NMDeviceBond
...
https://bugzilla.gnome.org/show_bug.cgi?id=686367
2012-10-19 12:09:27 -04:00
Jiří Klimeš
434a4f39b5
libnm-glib: add 'driver-version' and 'firmware-version' properties to NMDevice
2012-06-08 08:55:22 +02:00
Jiří Klimeš
e0329b44c4
libnm-glib: add 'autoconnect' property for devices
2012-05-22 18:30:53 +02:00
Pantelis Koukousoulas
8039dd30d8
adsl: add libnm-glib and nmcli code
...
For the finale, this is the libnm-glib and nmcli part of the support,
with this you can now make a full pppoatm connection from NetworkManager
by configuring it in system scope in a keyfile.
As an example, here is mine:
(password and username snipped for obvious reasons)
[connection]
id=MYISP
uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc1e
type=adsl
timestamp=1304621332
[adsl]
username=user@myisp.com
password=mypassword
vpi=8
vci=35
encapsulation=vcmux
protocol=pppoa
[ipv6]
method=ignore
[ipv4]
method=auto
Extract from logs:
NetworkManager[29155]: <info> Activation (ueagle-atm0) starting connection 'MYISP'
NetworkManager[29155]: <info> (ueagle-atm0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[29155]: <info> (ueagle-atm0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) successful.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[29155]: <info> (ueagle-atm0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[29155]: <info> starting PPP connection
NetworkManager[29155]: <debug> [1304671146.590156] [nm-ppp-manager.c:1047] nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock nodefaultroute user user@myisp.com plugin pppoatm.so 8.35 noipdefault noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam /org/freedesktop/NetworkManager/PPP/0 plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
NetworkManager[29155]: <info> pppd started with pid 29175
NetworkManager[29155]: <debug> [1304671146.591235] [NetworkManagerUtils.c:816] nm_utils_get_proc_sys_net_value(): (ueagle-atm0): error reading /proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to open file '/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or directory
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) complete.
Plugin pppoatm.so loaded.
Plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so loaded.
** Message: nm-ppp-plugin: (plugin_init): initializing
** Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
NetworkManager[29155]: <debug> [1304671146.612937] [nm-udev-manager.c:621] handle_uevent(): UDEV event: action 'add' subsys 'net' device 'ppp0'
NetworkManager[29155]: <debug> [1304671146.613134] [nm-udev-manager.c:525] net_add(): ignoring interface with type 512
NetworkManager[29155]: <debug> [1304671146.617308] [nm-netlink-monitor.c:117] link_msg_handler(): netlink link message: iface idx 35 flags 0x1090
Using interface ppp0
Connect: ppp0 <--> 8.35
** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
** Message: nm-ppp-plugin: (nm_phasechange): status 6 / phase 'authenticate'
** Message: nm-ppp-plugin: (get_credentials): passwd-hook, requesting credentials...
NetworkManager[29155]: <debug> [1304671149.639511] [nm-agent-manager.c:1044] nm_agent_manager_get_secrets(): Secrets requested for connection /org/freedesktop/NetworkManager/Settings/0 (adsl)
NetworkManager[29155]: <debug> [1304671149.639684] [nm-settings-connection.c:717] nm_settings_connection_get_secrets(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets requested flags 0x1 hint 'password'
NetworkManager[29155]: <debug> [1304671149.640950] [nm-agent-manager.c:959] get_start(): (0x9b4ad10/adsl) system settings secrets sufficient
NetworkManager[29155]: <debug> [1304671149.641332] [nm-settings-connection.c:573] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) existing secrets returned
NetworkManager[29155]: <debug> [1304671149.641541] [nm-settings-connection.c:579] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets request completed
NetworkManager[29155]: <debug> [1304671149.643074] [nm-settings-connection.c:618] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) new agent secrets processed
** Message: nm-ppp-plugin: (get_credentials): got credentials from NetworkManager
PAP authentication succeeded
** Message: nm-ppp-plugin: (nm_phasechange): status 8 / phase 'network'
local IP address 94.70.90.201
remote IP address 80.106.108.12
primary DNS address 195.170.0.1
secondary DNS address 195.170.2.2
** Message: nm-ppp-plugin: (nm_phasechange): status 9 / phase 'running'
** Message: nm-ppp-plugin: (nm_ip_up): ip-up event
** Message: nm-ppp-plugin: (nm_ip_up): sending Ip4Config to NetworkManager...
NetworkManager[29155]: <debug> [1304671150.607440] [nm-netlink-monitor.c:117] link_msg_handler(): netlink link message: iface idx 35 flags 0x110D1
NetworkManager[29155]: <info> PPP manager(IP Config Get) reply received.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) started...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) started...
NetworkManager[29155]: <debug> [1304671150.608918] [nm-system.c:222] sync_addresses(): (ppp0): syncing addresses (family 2)
NetworkManager[29155]: <info> (ueagle-atm0): device state change: ip-config -> activated (reason 'none') [70 100 0]
NetworkManager[29155]: <info> Policy set 'MYISP' (ppp0) as default for IPv4 routing and DNS.
NetworkManager[29155]: <info> Activation (ueagle-atm0) successful, device activated.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) complete.
Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com >
2012-05-18 15:42:56 -05:00
Dan Williams
51f37ca8d5
trivial: fix distcheck in libnm-glib
2012-04-30 16:19:46 -05:00
Jiří Klimeš
7c7e8dc692
libnm-glib: add "object-creation-failed" signal to NMObject
...
The signal is private for libnm-glib and should not be used externally.
It is emitted when there's an error while creating an object.
In addition, this commit makes use of the signal in NMClient to ensure
that the callbacks are always called for nm_client_activate_connection()
and nm_client_add_and_activate_connection().
2012-04-25 16:39:17 +02:00
Dan Williams
1da9738f1b
libnm-glib: add 'registered' property for NMSecretAgent
...
So clients can track when the agent is actually registered and when
it's registration state changes.
2012-03-19 13:24:28 -05:00
Jiří Klimeš
a11067f584
libnm-glib: add errors to device classes and nm_device_connection_compatible()
...
Add nm_device_connection_compatible() that returns an error when it fails.
nm_device_connection_valid() does the same work except it doesn't set GError.
2012-03-16 09:54:36 +01:00
Dan Williams
c02702e574
libnm-glib: add NMDeviceVlan
...
And fix a small bug with bond devices too if their device type
isnt' set at construction time.
2012-03-07 11:45:25 -06:00
Dan Winship
6c38f0cfd1
libnm-glib: add NMDeviceBond
...
it exists on the server/D-Bus side, so it should exist in libnm-glib too
2012-03-05 15:55:43 -05:00
Jiří Klimeš
ff249e871f
libnm-glib: add NMDeviceOlpcMesh
2012-02-28 10:29:03 +01:00
Dan Williams
7b48862ef6
build: fix distcheck
2012-02-15 19:38:18 -06:00