aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorSUZUKI, Shinsuke <suz@kame.net>2006-01-26 06:21:37 +0000
committerSUZUKI, Shinsuke <suz@kame.net>2006-01-26 06:21:37 +0000
commitd859b0a9117ccd0c5b42e6ba56da47d955516026 (patch)
treede087126d87a42118b0b0d1f2ec460c9eb6fa133 /config.h
parente137e82e0a14b4b60f165b2621a25fbc8c040c2c (diff)
supported IA-NA address-pool
ToDo: IA-PD prefix-pool, write a manual
Diffstat (limited to 'config.h')
-rw-r--r--config.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/config.h b/config.h
index 156a93a..3ffb793 100644
--- a/config.h
+++ b/config.h
@@ -33,6 +33,29 @@
TAILQ_HEAD(ia_conflist, ia_conf);
TAILQ_HEAD(pifc_list, prefix_ifconf);
+#ifdef USE_POOL
+struct dhcp6_poolspec {
+ char* name;
+ u_int32_t pltime;
+ u_int32_t vltime;
+};
+
+struct dhcp6_range {
+ struct in6_addr min;
+ struct in6_addr max;
+};
+
+struct pool_conf {
+ struct pool_conf *next;
+
+ char* name;
+
+ struct in6_addr min;
+ struct in6_addr max;
+ struct in6_addr cur;
+};
+#endif /* USE_POOL */
+
/* per-interface information */
struct dhcp6_if {
struct dhcp6_if *next;
@@ -55,7 +78,9 @@ struct dhcp6_if {
#define DHCIFF_RAPID_COMMIT 0x2
int server_pref; /* server preference (server only) */
-
+#ifdef USE_POOL
+ struct dhcp6_poolspec pool; /* address pool (server only) */
+#endif
char *scriptpath; /* path to config script (client only) */
struct dhcp6_list reqopt_list;
@@ -197,6 +222,10 @@ struct host_conf {
struct dhcp6_list prefix_list;
/* address to be assigned for the host */
struct dhcp6_list addr_list;
+#ifdef USE_POOL
+ /* address pool from which addresses are assigned for the host */
+ struct dhcp6_poolspec pool;
+#endif
/* secret key shared with the client for delayed authentication */
struct keyinfo *delayedkey;
@@ -241,6 +270,7 @@ struct cf_list {
enum { DECL_SEND, DECL_ALLOW, DECL_INFO_ONLY, DECL_REQUEST, DECL_DUID,
DECL_PREFIX, DECL_PREFERENCE, DECL_SCRIPT, DECL_DELAYEDKEY,
DECL_ADDRESS,
+ DECL_RANGE, DECL_ADDRESSPOOL, /* USE_POOL */
IFPARAM_SLA_ID, IFPARAM_SLA_LEN,
DHCPOPT_RAPID_COMMIT, DHCPOPT_AUTHINFO,
DHCPOPT_DNS, DHCPOPT_DNSNAME,
@@ -287,3 +317,13 @@ extern struct dhcp6_prefix *find_prefix6 __P((struct dhcp6_list *,
struct dhcp6_prefix *));
extern struct ia_conf *find_iaconf __P((struct ia_conflist *, int, u_int32_t));
extern struct keyinfo *find_key __P((char *, size_t, u_int32_t));
+#ifdef USE_POOL
+extern int configure_pool __P((struct cf_namelist *));
+extern struct pool_conf *find_pool __P((const char *));
+extern int is_available_in_pool __P((struct pool_conf *, struct in6_addr *));
+extern int get_free_address_from_pool __P((struct pool_conf *,
+ struct in6_addr *));
+struct host_conf *create_dynamic_hostconf __P((struct duid *,
+ struct dhcp6_poolspec *));
+#endif /* USE_POOL */
+