]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon: documentation and warnings fixes
authorOto Šťáva <oto.stava@nic.cz>
Thu, 2 Feb 2023 07:47:25 +0000 (08:47 +0100)
committerOto Šťáva <oto.stava@nic.cz>
Thu, 2 Feb 2023 07:47:25 +0000 (08:47 +0100)
daemon/main.c
daemon/session2.h
daemon/worker.h

index 6d11c18816381a136eb7c37250ea4b0062c4b4fe..af7c920e6a6ecf4892e3e58c4947d8b0cb0a5371 100644 (file)
@@ -532,7 +532,7 @@ int main(int argc, char **argv)
                return EXIT_FAILURE;
        }
        /* Initialize the worker. */
-       ret = worker_init(the_args->forks);
+       ret = worker_init();
        if (ret != 0) {
                kr_log_error(SYSTEM, "failed to initialize worker: %s\n", kr_strerror(ret));
                return EXIT_FAILURE;
index 13ab0aad10c179fb24ef62789b284ac2edaf7dd3..a0337b8888538ba64e71a943335dca14959e48a3 100644 (file)
  *   is retrieved.
  *
  * Protocol layer:
- *   - An implementation of a particular protocol. A layer transforms data
- *   within the resolver to conform to a particular protocol, e.g. UDP, TCP,
- *   TLS, HTTP, QUIC, etc.
+ *   - An implementation of a particular protocol. A layer transforms payloads
+ *   to conform to a particular protocol, e.g. UDP, TCP, TLS, HTTP, QUIC, etc.
+ *   While transforming a payload, a layer may also modify metadata - e.g. the
+ *   UDP and TCP layers in the Unwrap direction implement the PROXYv2 protocol,
+ *   using which they retrieve the IP address of the actual originating client
+ *   and store it in the appropriate struct.
  *
  * Protolayer:
  *   - Same as 'Protocol layer'.
index 1cfb0f42ad2f77a7da5e7e59b4383712081268f3..892b86133a0787080a273f4d585cdd3986ef6ef4 100644 (file)
@@ -23,10 +23,10 @@ KR_EXPORT extern struct worker_ctx *the_worker;
 
 /** Create and initialize the worker.
  * \return error code (ENOMEM) */
-int worker_init();
+int worker_init(void);
 
 /** Destroy the worker (free memory). */
-void worker_deinit();
+void worker_deinit(void);
 
 /**
  * End current DNS/TCP session, this disassociates pending tasks from this session