From 3e9cb77429b07a0317c7f394c22cf5cb78b59136 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Sun, 28 Aug 2011 22:36:56 +0400 Subject: ipdb: implement delegation prefix allocation --- accel-pppd/ipdb.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'accel-pppd/ipdb.h') diff --git a/accel-pppd/ipdb.h b/accel-pppd/ipdb.h index 1fcaf61..2781bd0 100644 --- a/accel-pppd/ipdb.h +++ b/accel-pppd/ipdb.h @@ -29,21 +29,36 @@ struct ipv6db_item_t struct list_head addr_list; }; +struct ipv6db_prefix_t +{ + struct ipdb_t *owner; + struct list_head prefix_list; +}; + struct ipdb_t { struct list_head entry; + struct ipv4db_item_t *(*get_ipv4)(struct ppp_t *ppp); void (*put_ipv4)(struct ppp_t *ppp, struct ipv4db_item_t *); + struct ipv6db_item_t *(*get_ipv6)(struct ppp_t *ppp); void (*put_ipv6)(struct ppp_t *ppp, struct ipv6db_item_t *); + + struct ipv6db_prefix_t *(*get_ipv6_prefix)(struct ppp_t *ppp); + void (*put_ipv6_prefix)(struct ppp_t *ppp, struct ipv6db_prefix_t *); }; struct ipv4db_item_t *ipdb_get_ipv4(struct ppp_t *ppp); void ipdb_put_ipv4(struct ppp_t *ppp, struct ipv4db_item_t *); + struct ipv6db_item_t *ipdb_get_ipv6(struct ppp_t *ppp); void ipdb_put_ipv6(struct ppp_t *ppp, struct ipv6db_item_t *); +struct ipv6db_prefix_t __export *ipdb_get_ipv6_prefix(struct ppp_t *ppp); +void __export ipdb_put_ipv6_prefix(struct ppp_t *ppp, struct ipv6db_prefix_t *it); + void ipdb_register(struct ipdb_t *); #endif -- cgit v1.2.3