-
- struct conn_list_t *next; /* after all, it's a list of connections */
- struct conn_list_t *prev; /* doubly linked for O(1) deletions */
-} conn_list_t;
-
-#include "subnet.h"
-
-extern conn_list_t *conn_list;
-extern conn_list_t *myself;
-
-extern conn_list_t *new_conn_list();
-extern void free_conn_list(conn_list_t *);
-extern void conn_list_add(conn_list_t *);
-extern void conn_list_del(conn_list_t *);
-extern conn_list_t *lookup_id(char *);
-extern void dump_conn_list(void);
-extern int read_host_config(conn_list_t *);
-extern void destroy_conn_list(void);
-extern void prune_conn_list(void);
-
-#endif /* __TINC_CONNLIST_H__ */
+} connection_t;
+
+extern rbltree_t *connection_tree;
+extern connection_t *myself;
+
+extern void init_connections(void);
+extern connection_t *new_connection(void);
+extern void free_connection(connection_t *);
+extern void connection_add(connection_t *);
+extern void connection_del(connection_t *);
+extern connection_t *lookup_id(char *);
+extern void dump_connection_list(void);
+extern int read_host_config(connection_t *);
+extern void destroy_connection(void);
+extern void prune_connection_tree(void);
+
+#endif /* __TINC_CONNECTION_H__ */