about summary refs log tree commit diff
path: root/src/nm-connectivity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-connectivity.h')
-rw-r--r--src/nm-connectivity.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nm-connectivity.h b/src/nm-connectivity.h
index 178f27ad..f262298a 100644
--- a/src/nm-connectivity.h
+++ b/src/nm-connectivity.h
@@ -24,6 +24,21 @@
 
 #include "nm-dbus-interface.h"
 
+/*****************************************************************************/
+
+static inline int
+nm_connectivity_state_cmp (NMConnectivityState a, NMConnectivityState b)
+{
+	if (a == NM_CONNECTIVITY_PORTAL && b == NM_CONNECTIVITY_LIMITED)
+		return 1;
+	if (b == NM_CONNECTIVITY_PORTAL && a == NM_CONNECTIVITY_LIMITED)
+		return -1;
+	NM_CMP_DIRECT (a, b);
+	return 0;
+}
+
+/*****************************************************************************/
+
 #define NM_CONNECTIVITY_ERROR     ((NMConnectivityState) -1)
 #define NM_CONNECTIVITY_FAKE      ((NMConnectivityState) -2)
 #define NM_CONNECTIVITY_CANCELLED ((NMConnectivityState) -3)
@@ -58,6 +73,8 @@ typedef void (*NMConnectivityCheckCallback) (NMConnectivity *self,
                                              gpointer user_data);
 
 NMConnectivityCheckHandle *nm_connectivity_check_start (NMConnectivity *self,
+                                                        int family,
+                                                        int ifindex,
                                                         const char *iface,
                                                         NMConnectivityCheckCallback callback,
                                                         gpointer user_data);