^^^^^^^^^^^^^
Tunables:
-* ``sockpath``: the the unix socket file where dnstap messages will be sent
-* ``logRespPkt``: if true responses in wire format will be logged
+* ``socket_path``: the the unix socket file where dnstap messages will be sent
+* ``log_responses``: if true responses in wire format will be logged
.. code-block:: lua
modules = {
dnstap = {
- sockPath = "/tmp/dnstap.sock",
- logRespPkt = true
+ socket_path = "/tmp/dnstap.sock",
+ log_responses = true
}
}
#include "contrib/cleanup.h"
#define DEBUG_MSG(fmt, ...) kr_log_verbose("[dnstap] " fmt, ##__VA_ARGS__);
-#define CFG_SOCK_PATH "sockPath"
-#define CFG_LOG_RESP_PKT "logRespPkt"
+#define CFG_SOCK_PATH "socket_path"
+#define CFG_LOG_RESP_PKT "log_responses"
#define DEFAULT_SOCK_PATH "/tmp/dnstap.sock"
#define DNSTAP_CONTENT_TYPE "protobuf:dnstap.Dnstap"
#define DNSTAP_INITIAL_BUF_SIZE 256
KR_EXPORT
int dnstap_init(struct kr_module *module) {
- DEBUG_MSG("loading\n");
/* allocated memory for internal data */
struct dnstap_data *data = malloc(sizeof(*data));
if (!data) {
KR_EXPORT
int dnstap_deinit(struct kr_module *module) {
- DEBUG_MSG("unloading\n");
struct dnstap_data *data = module->data;
/* Free allocated memory */
if (data) {
modules = {
'hints',
dnstap = {
- sockPath = "/tmp/dnstap.sock",
- logRespPkt = true,
+ socket_path = "/tmp/dnstap.sock",
+ log_responses = true,
}
}
hints['fake1.localdomain'] = '1.2.3.4'