/* * Flush all cookies. This is really only called upon shutdown. */ void olsr_delete_all_cookies(void) { int ci_index; /* * Walk the full index range and kill 'em all. */ for (ci_index = 1; ci_index < COOKIE_ID_MAX; ci_index++) { if (!cookies[ci_index]) { continue; } olsr_free_cookie(cookies[ci_index]); } }
void olsr_os_cleanup_iptunnel(void) { while (tunnel_tree.count > 0) { struct olsr_iptunnel_entry *t; /* kill tunnel */ t = (struct olsr_iptunnel_entry *)avl_walk_first(&tunnel_tree); t->usage = 1; olsr_os_del_ipip_tunnel(t); } if (!store_iptunnel_state) { olsr_if_set_state(olsr_cnf->ip_version == AF_INET ? DEV_IPV4_TUNNEL : DEV_IPV6_TUNNEL, false); } olsr_free_cookie(tunnel_cookie); }
void olsr_os_cleanup_iptunnel(const char * dev) { while (tunnel_tree.count > 0) { struct olsr_iptunnel_entry *t; /* kill tunnel */ t = (struct olsr_iptunnel_entry *)avl_walk_first(&tunnel_tree); t->usage = 1; olsr_os_del_ipip_tunnel(t); } if (!store_iptunnel_state) { olsr_if_set_state(dev, false); } olsr_free_cookie(tunnel_cookie); }