コード例 #1
0
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);
}
コード例 #2
0
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);
}