From abf58d6ba5df9bbe04c4c7008cbbc8c7dc626392 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 8 Oct 2004 08:49:26 +0000 Subject: Wade Berrier writes: Hello, Here's a patch for a first attempt at static leases for udhcpd. Included in the tarball are 2 files (static_leases.c, static_leases.h) and a patch against the latest cvs. In the config file you can configure static leases with the following format: static_lease 00:60:08:11:CE:4E 192.168.0.54 static_lease 00:60:08:11:CE:3E 192.168.0.44 Comments/suggestions/improvements are welcome. Wade --- networking/udhcp/dhcpd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'networking/udhcp/dhcpd.h') diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index 39658a8ff..c47f6aa3f 100644 --- a/networking/udhcp/dhcpd.h +++ b/networking/udhcp/dhcpd.h @@ -99,6 +99,12 @@ struct option_set { struct option_set *next; }; +struct static_lease { + uint8_t *mac; + uint32_t *ip; + struct static_lease *next; +}; + struct server_config_t { uint32_t server; /* Our IP, in network order */ uint32_t start; /* Start address of leases, network order */ @@ -124,6 +130,7 @@ struct server_config_t { uint32_t siaddr; /* next server bootp option */ char *sname; /* bootp server name */ char *boot_file; /* bootp boot file option */ + struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */ }; extern struct server_config_t server_config; -- cgit v1.2.3-55-g6feb