X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fsubnet.h;h=7e926e4f16849d04363337ff1c9b40e400c5f8ba;hp=50cfefd7f84ae3589706db68de5a98ce2a0b9580;hb=14979f835df4214a7c2510852f7ffedc9e08c2c0;hpb=ac066bb057dcb187bf91670793ba5e6ca456e052 diff --git a/src/subnet.h b/src/subnet.h index 50cfefd7..7e926e4f 100644 --- a/src/subnet.h +++ b/src/subnet.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: subnet.h,v 1.1.2.12 2001/10/27 13:13:35 guus Exp $ + $Id: subnet.h,v 1.1.2.17 2002/03/01 14:09:31 guus Exp $ */ #ifndef __TINC_SUBNET_H__ @@ -36,18 +36,19 @@ enum typedef struct subnet_mac_t { mac_t address; + time_t lastseen; } subnet_mac_t; typedef struct subnet_ipv4_t { ipv4_t address; - ipv4_t mask; + int masklength; } subnet_ipv4_t; typedef struct subnet_ipv6_t { ipv6_t address; - ipv6_t mask; + int masklength; } subnet_ipv6_t; #include "node.h" @@ -66,17 +67,18 @@ typedef struct subnet_t { subnet_ipv4_t ipv4; subnet_ipv6_t ipv6; } net; - } subnet_t; extern subnet_t *new_subnet(void); extern void free_subnet(subnet_t *); extern void init_subnets(void); +extern void exit_subnets(void); +extern avl_tree_t *new_subnet_tree(void); +extern void free_subnet_tree(avl_tree_t *); extern void subnet_add(struct node_t *, subnet_t *); extern void subnet_del(struct node_t *, subnet_t *); extern char *net2str(subnet_t *); extern subnet_t *str2net(char *); -extern int subnet_compare(subnet_t *, subnet_t *); extern subnet_t *lookup_subnet(struct node_t *, subnet_t *); extern subnet_t *lookup_subnet_mac(mac_t *); extern subnet_t *lookup_subnet_ipv4(ipv4_t *);