2 edge.h -- edge management
4 Copyright (C) 2003-2004 Guus Sliepen <guus@tinc-vpn.org>,
5 2003-2004 Ivo Timmermans <ivo@tinc-vpn.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include "support/avl.h"
30 typedef struct edge_status {
38 struct sockaddr_storage address;
45 node_options_t options;
48 extern avl_tree_t *edges;
50 extern bool edge_init(void);
51 extern bool edge_exit(void);
52 extern struct edge *edge_new(void) __attribute__ ((__malloc__));
53 extern void edge_free(struct edge *);
54 extern avl_tree_t *edge_tree_new(void) __attribute__ ((__malloc__));
55 extern void edge_tree_free(avl_tree_t *);
56 extern void edge_add(struct edge *);
57 extern void edge_del(struct edge *);
58 extern struct edge *edge_get(struct node *, struct node *);