-void connection_add(connection_t *c) {
- cp();
-
- splay_insert(connection_tree, c);
-}
-
-void connection_del(connection_t *c) {
- cp();
-
- splay_delete(connection_tree, c);
-}
-
-int dump_connections(struct evbuffer *out) {
- splay_node_t *node;
- connection_t *c;
-
- cp();
-
- for(node = connection_tree->head; node; node = node->next) {
- c = node->data;
- if(evbuffer_add_printf(out,
- _(" %s at %s options %lx socket %d status %04x\n"),
- c->name, c->hostname, c->options, c->socket,
- c->status.value) == -1)
- return errno;
- }
-
- return 0;
+void connection_add(meshlink_handle_t *mesh, connection_t *c) {
+ c->mesh = mesh;
+ list_insert_tail(mesh->connections, c);