-avl_tree_t *connection_tree; /* Meta connections */
-connection_t *broadcast;
-
-static int connection_compare(const connection_t *a, const connection_t *b)
-{
- return (void *)a - (void *)b;
-}
-
-void init_connections(void)
-{
- cp();
-
- connection_tree = avl_alloc_tree((avl_compare_t) connection_compare, (avl_action_t) free_connection);
- broadcast = new_connection();
- broadcast->name = xstrdup(_("everyone"));
- broadcast->hostname = xstrdup(_("BROADCAST"));
+void init_connections(meshlink_handle_t *mesh) {
+ mesh->connections = list_alloc((list_action_t) free_connection);
+ mesh->everyone = new_connection();
+ mesh->everyone->name = xstrdup("mesh->everyone");