summary refs log tree commit diff
path: root/src/nm-config.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-02-07 02:39:23 +0100
committerMichael Biebl <biebl@debian.org>2018-02-07 02:39:23 +0100
commit50f6b47074e01dffb8dc536c0a20961dcf28ae9b (patch)
treeb4bd771d78ebe38661b8c4ec8b9a8e0eb8261eb5 /src/nm-config.h
parentafcd268ea7b1149fbfb66bce4eca659b675da0a2 (diff)
New upstream version 1.10.4 upstream/1.10.4
Diffstat (limited to 'src/nm-config.h')
-rw-r--r--src/nm-config.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/nm-config.h b/src/nm-config.h
index 8bdd5002..42ab4682 100644
--- a/src/nm-config.h
+++ b/src/nm-config.h
@@ -165,6 +165,13 @@ gint nm_config_keyfile_get_boolean (const GKeyFile *keyfile,
                                     const char *section,
                                     const char *key,
                                     gint default_value);
+gint64 nm_config_keyfile_get_int64 (const GKeyFile *keyfile,
+                                    const char *section,
+                                    const char *key,
+                                    guint base,
+                                    gint64 min,
+                                    gint64 max,
+                                    gint64 fallback);
 char *nm_config_keyfile_get_value (const GKeyFile *keyfile,
                                    const char *section,
                                    const char *key,
@@ -205,6 +212,10 @@ struct _NMConfigDeviceStateData {
 	int ifindex;
 	NMConfigDeviceStateManagedType managed;
 
+	/* a value of zero means that no metric is set. */
+	guint32 route_metric_default_aspired;
+	guint32 route_metric_default_effective;
+
 	/* the UUID of the last settings-connection active
 	 * on the device. */
 	const char *connection_uuid;
@@ -213,17 +224,25 @@ struct _NMConfigDeviceStateData {
 
 	/* whether the device was nm-owned (0/1) or -1 for
 	 * non-software devices. */
-	gint nm_owned;
+	int nm_owned:3;
 };
 
 NMConfigDeviceStateData *nm_config_device_state_load (int ifindex);
+GHashTable *nm_config_device_state_load_all (void);
 gboolean nm_config_device_state_write (int ifindex,
                                        NMConfigDeviceStateManagedType managed,
                                        const char *perm_hw_addr_fake,
                                        const char *connection_uuid,
-                                       gint nm_owned);
+                                       gint nm_owned,
+                                       guint32 route_metric_default_aspired,
+                                       guint32 route_metric_default_effective);
+
 void nm_config_device_state_prune_unseen (GHashTable *seen_ifindexes);
 
+const GHashTable *nm_config_device_state_get_all (NMConfig *self);
+const NMConfigDeviceStateData *nm_config_device_state_get (NMConfig *self,
+                                                           int ifindex);
+
 /*****************************************************************************/
 
 #endif /* __NETWORKMANAGER_CONFIG_H__ */