diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-27 13:59:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-27 14:01:23 +0200 |
commit | fc2f9534d07db2b185c02b1961428b53daf1986e (patch) | |
tree | a6a8d6417b63ab59dd16890dd1be0da14ceb3eac /src/network/networkd-link.h | |
parent | f6b8196f7cf1e366e15597283bc3d13af72a7eb5 (diff) |
networkd: split up networkd.h into per-object header files
No functional changes, just moving definitions into separate header
files.
Diffstat (limited to 'src/network/networkd-link.h')
-rw-r--r-- | src/network/networkd-link.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h index 0625520790..f588faf209 100644 --- a/src/network/networkd-link.h +++ b/src/network/networkd-link.h @@ -1,5 +1,7 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ +#pragma once + /*** This file is part of systemd. @@ -19,11 +21,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#pragma once - #include <endian.h> -#include "networkd.h" +#include "sd-dhcp-client.h" +#include "sd-dhcp-server.h" +#include "sd-ipv4ll.h" +#include "sd-icmp6-nd.h" +#include "sd-dhcp6-client.h" +#include "sd-lldp.h" + +typedef struct Link Link; typedef enum LinkState { LINK_STATE_PENDING, @@ -38,6 +45,21 @@ typedef enum LinkState { _LINK_STATE_INVALID = -1 } LinkState; +typedef enum LinkOperationalState { + LINK_OPERSTATE_OFF, + LINK_OPERSTATE_NO_CARRIER, + LINK_OPERSTATE_DORMANT, + LINK_OPERSTATE_CARRIER, + LINK_OPERSTATE_DEGRADED, + LINK_OPERSTATE_ROUTABLE, + _LINK_OPERSTATE_MAX, + _LINK_OPERSTATE_INVALID = -1 +} LinkOperationalState; + +#include "networkd.h" +#include "networkd-network.h" +#include "networkd-address.h" + struct Link { Manager *manager; @@ -131,6 +153,9 @@ bool link_dhcp6_enabled(Link *link); const char* link_state_to_string(LinkState s) _const_; LinkState link_state_from_string(const char *s) _pure_; +const char* link_operstate_to_string(LinkOperationalState s) _const_; +LinkOperationalState link_operstate_from_string(const char *s) _pure_; + extern const sd_bus_vtable link_vtable[]; int link_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error); |