diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 11:26:25 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 11:26:25 +0100 |
| commit | f54a568880bf47c2ea54c9b30d291156b34d6539 (patch) | |
| tree | aab9bb44b306da7651e8caf38bbab5cfeeb81b7d /src/nm-connectivity.h | |
| parent | e8ac7dacdcf4b38addef4f8ac6ab038f9d29582c (diff) | |
| parent | bbae86d3d2997a853ca0365e8eb7a3ca7489ee09 (diff) | |
Update upstream source from tag 'upstream/1.15.2'
Update to upstream version '1.15.2' with Debian dir b4be4b7cfce96679a31cb9d423107789761e3b49
Diffstat (limited to 'src/nm-connectivity.h')
| -rw-r--r-- | src/nm-connectivity.h | 17 |
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); |