diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-02-08 21:46:57 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-02-08 21:46:57 +0300 |
commit | a04cc1eba9bdf614eea9d7858db4581fc22474d7 (patch) | |
tree | e827a28279c57c27e8836e3aea307076a27a5f5a /accel-pppd/ipdb.h | |
parent | 38077f9b9d9e86f4a7d2317b3697ea4370889999 (diff) | |
download | accel-ppp-a04cc1eba9bdf614eea9d7858db4581fc22474d7.tar.gz accel-ppp-a04cc1eba9bdf614eea9d7858db4581fc22474d7.zip |
snapshot
Diffstat (limited to 'accel-pppd/ipdb.h')
-rw-r--r-- | accel-pppd/ipdb.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/accel-pppd/ipdb.h b/accel-pppd/ipdb.h index ebf38853..35394205 100644 --- a/accel-pppd/ipdb.h +++ b/accel-pppd/ipdb.h @@ -6,22 +6,34 @@ #include "ppp.h" #include "list.h" -struct ipdb_item_t +struct ipv4db_item_t { struct ipdb_t *owner; in_addr_t addr; in_addr_t peer_addr; }; +struct ipv6db_item_t +{ + struct ipdb_t *owner; + struct in6_addr addr; + struct in6_addr peer_addr; +}; + + struct ipdb_t { struct list_head entry; - struct ipdb_item_t *(*get)(struct ppp_t *ppp); - void (*put)(struct ppp_t *ppp, struct ipdb_item_t *); + 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 ipdb_item_t *ipdb_get(struct ppp_t *ppp); -void ipdb_put(struct ppp_t *ppp, struct ipdb_item_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 *); void ipdb_register(struct ipdb_t *); |