]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/io: don't expose io_stream_* types
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 15 Sep 2020 12:20:35 +0000 (14:20 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 2 Oct 2020 06:50:26 +0000 (08:50 +0200)
We don't need them anywhere, so let's keep their scope small.

daemon/io.c
daemon/io.h

index a1af8709ed0900451d2df1ed9982f093a42b9872..c9c2f343770374d5b337f76c9c1627763329d9fc 100644 (file)
@@ -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.
  *
index 2dac70f2dadc9b576b2b2ffe59593093d7070e10..eefde8097f894c00ab30f4c0d0a190150270c9a1 100644 (file)
 
 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);