+void free_subnet(subnet_t *subnet)
+{
+cp
+ free(subnet);
+}
+
+/* Adding and removing subnets */
+
+void subnet_add(node_t *n, subnet_t *subnet)
+{
+cp
+ subnet->owner = n;
+
+ avl_insert(subnet_tree, subnet);
+cp
+ avl_insert(n->subnet_tree, subnet);
+cp
+}
+
+void subnet_del(node_t *n, subnet_t *subnet)
+{
+cp
+ avl_delete(n->subnet_tree, subnet);
+cp
+ avl_delete(subnet_tree, subnet);