From: Vladimír Čunát Date: Tue, 15 Sep 2020 12:20:35 +0000 (+0200) Subject: daemon/io: don't expose io_stream_* types X-Git-Tag: v5.2.0~28^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e863b94b1aac01140c543ba8b8666de9cb42715c;p=thirdparty%2Fknot-resolver.git daemon/io: don't expose io_stream_* types We don't need them anywhere, so let's keep their scope small. --- diff --git a/daemon/io.c b/daemon/io.c index a1af8709e..c9c2f3437 100644 --- a/daemon/io.c +++ b/daemon/io.c @@ -436,6 +436,19 @@ int io_listen_tcp(uv_loop_t *loop, uv_tcp_t *handle, int fd, int tcp_backlog, bo return 0; } + +enum io_stream_mode { + io_mode_text = 0, + io_mode_binary = 1, +}; + +struct io_stream_data { + enum io_stream_mode mode; + size_t blen; + char *buf; + knot_mm_t *pool; +}; + /** * TTY control: process input and free() the buffer. * diff --git a/daemon/io.h b/daemon/io.h index 2dac70f2d..eefde8097 100644 --- a/daemon/io.h +++ b/daemon/io.h @@ -14,18 +14,7 @@ struct tls_ctx; struct tls_client_ctx; - -enum io_stream_mode { - io_mode_text = 0, - io_mode_binary = 1, -}; - -struct io_stream_data { - enum io_stream_mode mode; - size_t blen; - char *buf; - knot_mm_t *pool; -}; +struct io_stream_data; /** Bind address into a file-descriptor (only, no libuv). type is e.g. SOCK_DGRAM */ int io_bind(const struct sockaddr *addr, int type, const endpoint_flags_t *flags);