The daemon provides an interface for dynamic loading of :ref:`daemon modules <modules-implemented>`.
-.. tip:: Use syntactic sugar for module loading. Declaring a variable ``modules`` equals to loading a table of modules.
+.. tip:: Use declarative interface for module loading.
.. code-block:: lua
- modules = { hints = {file = '/etc/hosts'} }
+ modules = {
+ hints = {file = '/etc/hosts'}
+ }
Equals to:
^^^^^^^^^^^^^^^^^^^
The cache in Knot DNS Resolver is persistent with LMDB backend, this means that the daemon doesn't lose
-the cached data on restart or crash to avoid cold-starts. Interestingly the cache may be reused between cache
-daemons or manipulated from other processes, making for example synchronisation between load-balanced recursors possible.
+the cached data on restart or crash to avoid cold-starts. The cache may be reused between cache
+daemons or manipulated from other processes, making for example synchronised load-balanced recursors possible.
.. function:: cache.open(max_size)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \addtogroup resolution
+/** \addtogroup utils
* @{
*/
/*
* Connection limits.
+ * @cond internal
*/
#define KR_CONN_RTT_MAX 5000
#define KR_DNS_PORT 53
#define KR_EDNS_VERSION 0
#define KR_EDNS_PAYLOAD 4096
+/* @endcond */
/** @} */
/*
* API definition.
+ * @cond internal
*/
typedef uint32_t (module_api_cb)(void);
typedef int (module_init_cb)(struct kr_module *);
typedef int (module_config_cb)(struct kr_module *, const char *);
typedef const knot_layer_api_t* (module_layer_cb)(void);
typedef struct kr_prop *(module_prop_cb)(void);
-
-#define KR_MODULE_API ((uint32_t) 0x20150401)
-
-/**
- * Property callback.
- */
typedef char *(kr_prop_cb)(void *, struct kr_module *, const char *);
+#define KR_MODULE_API ((uint32_t) 0x20150401)
+/* @endcond */
/**
* Module property (named callable).
/*
* General-purpose attributes.
+ * @cond internal
*/
#define auto_free __attribute__((cleanup(_cleanup_free)))
extern void _cleanup_free(char **p);
extern void _cleanup_close(int *p);
#define auto_fclose __attribute__((cleanup(_cleanup_fclose)))
extern void _cleanup_fclose(FILE **p);
+/* @endcond */
/*
* Defines.