diff options
author | Maria Matejka <mq@ucw.cz> | 2023-04-02 19:15:22 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-04 17:00:59 +0200 |
commit | 836e857b3098f8962c621a33f7ae5b532cf512f3 (patch) | |
tree | 96c62361fd7b2dd57cecdf9d9b9323f8aa95f021 /sysdep/unix/unix.h | |
parent | 571c4f69bfbcf437d848b332bb2f4995fea2347d (diff) |
Sockets: Unified API for main and other loops
Now sk_open() requires an explicit IO loop to open the socket in. Also
specific functions for socket RX pause / resume are added to allow for
BGP corking.
And last but not least, socket reloop is now synchronous to resolve
weird cases of the target loop stopping before actually picking up the
relooped socket. Now the caller must ensure that both loops are locked
while relooping, and this way all sockets always have their respective
loop.
Diffstat (limited to 'sysdep/unix/unix.h')
-rw-r--r-- | sysdep/unix/unix.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h index e26afe41..606b79cd 100644 --- a/sysdep/unix/unix.h +++ b/sysdep/unix/unix.h @@ -9,6 +9,9 @@ #ifndef _BIRD_UNIX_H_ #define _BIRD_UNIX_H_ +#include "nest/bird.h" +#include "lib/io-loop.h" + #include <sys/socket.h> #include <signal.h> @@ -110,7 +113,7 @@ extern volatile sig_atomic_t async_shutdown_flag; void io_init(void); void io_loop(void); void io_log_dump(void); -int sk_open_unix(struct birdsock *s, char *name); +int sk_open_unix(struct birdsock *s, struct birdloop *, char *name); struct rfile *rf_open(struct pool *, const char *name, const char *mode); void *rf_file(struct rfile *f); int rf_fileno(struct rfile *f); |