summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDamien Neil <source@isc.org>2000-12-11 18:56:45 +0000
committerDamien Neil <source@isc.org>2000-12-11 18:56:45 +0000
commitb992d7e23d870ada9317330b0b2b08e5823255d2 (patch)
treeb86f08c03623b4d2daa5c8157c429250610fde21 /includes
parent8c3c6552968783b0a13cce6c86bd7def0aa1489c (diff)
downloadisc-dhcp-b992d7e23d870ada9317330b0b2b08e5823255d2.tar.gz
DDNS implementation rewrite. DDNS should now operate according to
<draft-ietf-dhc-dhcp-dns-12.txt>. common/options.c, common/tables.c, includes/dhcp.h: Split the fqdn.name option into fqdn.hostname and fqdn.domainname. includes/dhcpd.h, server/Makefile.dist, server/ddns.c, server/dhcp.c, server/mdb.c, server/stables.c: Added a new file (server/ddns.c) containing the DDNS updates code. This file exports two functions: ddns_updates() and ddns_removals(). ddns_updates() is called when a lease is granted, and ddns_removals() is called when the lease expires or is released. server/dhcpd.c: Remove the previous DDNS update code, and add default code for the ddns-hostname, ddns-domainname, ddns-ttl, and ddns-rev-domainname server options.
Diffstat (limited to 'includes')
-rw-r--r--includes/dhcp.h5
-rw-r--r--includes/dhcpd.h10
2 files changed, 13 insertions, 2 deletions
diff --git a/includes/dhcp.h b/includes/dhcp.h
index d4d31138..0602ae10 100644
--- a/includes/dhcp.h
+++ b/includes/dhcp.h
@@ -192,5 +192,6 @@ struct dhcp_packet {
#define FQDN_ENCODED 3
#define FQDN_RCODE1 4
#define FQDN_RCODE2 5
-#define FQDN_NAME 6
-#define FQDN_SUBOPTION_COUNT 6
+#define FQDN_HOSTNAME 6
+#define FQDN_DOMAINNAME 7
+#define FQDN_SUBOPTION_COUNT 7
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index 1302b4d8..a6c3882c 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -377,6 +377,7 @@ struct lease_state {
#define SV_LOCAL_ADDRESS 35
#define SV_OMAPI_KEY 36
#define SV_STASH_AGENT_OPTIONS 37
+#define SV_DDNS_TTL 38
#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
# define DEFAULT_DEFAULT_LEASE_TIME 43200
@@ -390,6 +391,10 @@ struct lease_state {
# define DEFAULT_MAX_LEASE_TIME 86400
#endif
+#if !defined (DEFAULT_DDNS_TTL)
+# define DEFAULT_DDNS_TTL 3600
+#endif
+
/* Client option names */
#define CL_TIMEOUT 1
@@ -1092,6 +1097,11 @@ int parse_lease_declaration PROTO ((struct lease **, struct parse *));
void parse_address_range PROTO ((struct parse *,
struct group *, int, struct pool *));
+/* ddns.c */
+int ddns_updates PROTO ((struct packet *, struct lease *,
+ struct lease_state *));
+int ddns_removals PROTO ((struct lease *));
+
/* parse.c */
void skip_to_semi PROTO ((struct parse *));
void skip_to_rbrace PROTO ((struct parse *, int));