chiark / gitweb /
networkd: refuse to use .network files with missing Address/Gateway key
[elogind.git] / src / network / networkd.h
index 547533fbab5e60b09e031989917471b30ef6db83..75309a9b85f67970097954962b6b8c40ac7b8712 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-event.h"
 #include "sd-rtnl.h"
+#include "sd-dhcp-client.h"
 #include "udev.h"
 
 #include "rtnl-util.h"
@@ -84,6 +85,7 @@ struct Network {
 
         char *description;
         Bridge *bridge;
+        bool dhcp;
 
         LIST_HEAD(Address, static_addresses);
         LIST_HEAD(Route, static_routes);
@@ -117,6 +119,7 @@ struct Route {
         uint64_t section;
 
         unsigned char family;
+        unsigned char dst_family;
         unsigned char dst_prefixlen;
 
         union {
@@ -153,9 +156,15 @@ struct Link {
 
         Network *network;
 
+        Route *dhcp_route;
+        Address *dhcp_address;
+
         LinkState state;
 
-        unsigned rtnl_messages;
+        unsigned addr_messages;
+        unsigned route_messages;
+
+        sd_dhcp_client *dhcp;
 };
 
 struct Manager {
@@ -261,7 +270,7 @@ int config_parse_label(const char *unit, const char *filename, unsigned line,
 
 int link_new(Manager *manager, struct udev_device *device, Link **ret);
 void link_free(Link *link);
-int link_add(Manager *manager, struct udev_device *device);
+int link_add(Manager *manager, struct udev_device *device, Link **ret);
 int link_configure(Link *link);
 
 int link_update(Link *link, sd_rtnl_message *message);