#ifndef foomischfoo #define foomischfoo #include #include #include #include #include #include "utils.h" void debug_resource_usage(); struct connection; typedef void(*connection_cb_t)(struct connection *, bool); struct connection { struct saddr remote; struct saddr local; struct list_head *addrs; unsigned next_addr; connection_cb_t cb; }; void connection_set_local(struct connection *conn, int fd); void connection_set_remote(struct connection *conn, struct saddr *remote); void connect_any(struct uring_task *task, struct list_head *addrs, struct connection *conn, connection_cb_t cb); #endif