Exemplo n.º 1
0
void subnet_add(node_t *n, subnet_t *subnet) {
	subnet->owner = n;

	avl_insert(subnet_tree, subnet);
	avl_insert(n->subnet_tree, subnet);

	subnet_cache_flush();
}
Exemplo n.º 2
0
void subnet_del(node_t *n, subnet_t *subnet) {
	avl_delete(n->subnet_tree, subnet);
	avl_delete(subnet_tree, subnet);

	subnet_cache_flush();
}
Exemplo n.º 3
0
void init_subnets(void) {
	subnet_tree = avl_alloc_tree((avl_compare_t) subnet_compare, (avl_action_t) free_subnet);

	subnet_cache_flush();
}
Exemplo n.º 4
0
void graph(void) {
	subnet_cache_flush();
	sssp_bfs();
	mst_kruskal();
	graph_changed = true;
}