chiark / gitweb /
networkd: introduce sit tunnel
[elogind.git] / src / network / networkd.h
index 3e4e1f2ba6d929c0518ae5b477674a8f288f1fe4..cfe24f5702f0d0328290c27c3d2ee66a9b0f7cb8 100644 (file)
@@ -138,6 +138,7 @@ struct Network {
         Hashmap *macvlans;
         bool dhcp;
         bool dhcp_dns;
+        bool dhcp_ntp;
         bool dhcp_mtu;
         bool dhcp_hostname;
         bool dhcp_domainname;
@@ -151,6 +152,7 @@ struct Network {
         Hashmap *routes_by_section;
 
         LIST_HEAD(Address, dns);
+        LIST_HEAD(Address, ntp);
 
         LIST_FIELDS(Network, networks);
 };
@@ -210,6 +212,16 @@ typedef enum LinkState {
         _LINK_STATE_INVALID = -1
 } LinkState;
 
+typedef enum LinkOperationalState {
+        LINK_OPERSTATE_UNKNOWN,
+        LINK_OPERSTATE_DORMANT,
+        LINK_OPERSTATE_CARRIER,
+        LINK_OPERSTATE_DEGRADED,
+        LINK_OPERSTATE_ROUTABLE,
+        _LINK_OPERSTATE_MAX,
+        _LINK_OPERSTATE_INVALID = -1
+} LinkOperationalState;
+
 struct Link {
         Manager *manager;
 
@@ -222,11 +234,12 @@ struct Link {
         struct udev_device *udev_device;
 
         unsigned flags;
-        uint8_t operstate;
+        uint8_t kernel_operstate;
 
         Network *network;
 
         LinkState state;
+        LinkOperationalState operstate;
 
         unsigned addr_messages;
         unsigned route_messages;
@@ -421,6 +434,9 @@ bool link_has_carrier(unsigned flags, uint8_t operstate);
 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_;
+
 DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref);
 #define _cleanup_link_unref_ _cleanup_(link_unrefp)