summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/network-internal.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-07 16:35:05 +0200
committerTom Gundersen <teg@jklm.no>2014-05-07 16:54:02 +0200
commitdeb2e5230b4dcbc0e2e02cc47a0b2d0d7179a044 (patch)
treeec088f69f3d58588bc22b3d3bf4c207b46f807f7 /src/libsystemd-network/network-internal.c
parent089377209f47e62f29b80b018ad9bbf17f6d5fbd (diff)
sd-network: expose both admin and operational state directly
Also add a call to check if a link is loopback, as this should commonly be ignored.
Diffstat (limited to 'src/libsystemd-network/network-internal.c')
-rw-r--r--src/libsystemd-network/network-internal.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index e7ba628fc7..52e614c4ea 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -326,17 +326,3 @@ int net_parse_inaddr(const char *address, unsigned char *family, void *dst) {
return 0;
}
-
-bool link_has_carrier(unsigned flags, uint8_t operstate) {
- /* see Documentation/networking/operstates.txt in the kernel sources */
-
- if (operstate == IF_OPER_UP)
- return true;
-
- if (operstate == IF_OPER_UNKNOWN)
- /* operstate may not be implemented, so fall back to flags */
- if ((flags & IFF_LOWER_UP) && !(flags & IFF_DORMANT))
- return true;
-
- return false;
-}