Allow weight to be assigned to Subnets.
[oweals/tinc.git] / src / subnet.h
index c50ac6c8577c4cb0f5a0bbe8417b13dfde6d214d..6d7c75995a9ac5f73a4fcc90bd3e58433093c012 100644 (file)
@@ -53,6 +53,7 @@ typedef struct subnet_t {
 
        subnet_type_t type;             /* subnet type (IPv4? IPv6? MAC? something even weirder?) */
        time_t expires;                 /* expiry time */
+       int weight;                     /* weight (higher value is higher priority) */
 
        /* And now for the actual subnet: */
 
@@ -82,5 +83,6 @@ extern subnet_t *lookup_subnet_mac(const mac_t *);
 extern subnet_t *lookup_subnet_ipv4(const ipv4_t *);
 extern subnet_t *lookup_subnet_ipv6(const ipv6_t *);
 extern void dump_subnets(void);
+extern void subnet_cache_flush(void);
 
 #endif                                                 /* __TINC_SUBNET_H__ */