summaryrefslogtreecommitdiff
path: root/src/network/networkd.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-05 08:13:30 +0100
committerTom Gundersen <teg@jklm.no>2014-06-13 17:07:20 +0200
commitdd43110f781a9245ec00531456fee68ed763a179 (patch)
tree427a5d4f640f8b0c77f63e024764f0f01c6644ac /src/network/networkd.h
parent500792d8180c9a11d65f107cdc79dea21b2964c4 (diff)
networkd: add dhcp server support
When enabled in [Network] it will set up a dhcp server on the interface, listening on one of its statically configured IPv4 addresses and with a fixed size pool of leases determined from it. Example: [Match] Name=ve-arch-tree [Network] Address=192.168.12.5/24 DHCPServer=yes [Route] Gateway=192.168.12.5 Destination=192.168.12.0/24 In this case we will configure ve-arch-tree with the address 192.168.12.5 and hand out addresses in the range 192.168.12.6 - 192.168.12.38. In the future, we should (as suggested by Lennart) introduce a syntax to pick the server address automatically.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r--src/network/networkd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 6f77c7785f..87eadd1c51 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -27,6 +27,7 @@
#include "sd-rtnl.h"
#include "sd-bus.h"
#include "sd-dhcp-client.h"
+#include "sd-dhcp-server.h"
#include "sd-ipv4ll.h"
#include "udev.h"
@@ -149,6 +150,8 @@ struct Network {
bool dhcp_critical;
bool ipv4ll;
+ bool dhcp_server;
+
LIST_HEAD(Address, static_addresses);
LIST_HEAD(Route, static_routes);
@@ -256,6 +259,8 @@ struct Link {
char *lease_file;
uint16_t original_mtu;
sd_ipv4ll *ipv4ll;
+
+ sd_dhcp_server *dhcp_server;
};
struct Manager {