scheme.h 4.22 KB
Newer Older
1
/*  Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
/*!
 * \file
 *
 * Server configuration scheme.
 *
 * \addtogroup config
 *
 * @{
 */

#pragma once

28
#include "libknot/lookup.h"
29 30 31 32 33 34 35
#include "libknot/yparser/ypscheme.h"

#define C_ACL			"\x03""acl"
#define C_ACTION		"\x06""action"
#define C_ADDR			"\x07""address"
#define C_ALG			"\x09""algorithm"
#define C_ANY			"\x03""any"
36
#define C_ASYNC_START		"\x0B""async-start"
37
#define C_BACKEND		"\x07""backend"
38 39
#define C_BG_WORKERS		"\x12""background-workers"
#define C_COMMENT		"\x07""comment"
40
#define C_CONFIG		"\x06""config"
41
#define C_CTL			"\x07""control"
42
#define C_DDNS_MASTER		"\x0B""ddns-master"
43
#define C_DENY			"\x04""deny"
44
#define C_DISABLE_ANY		"\x0B""disable-any"
45 46
#define C_DNSKEY_TTL		"\x0A""dnskey-ttl"
#define C_DNSSEC_POLICY		"\x0D""dnssec-policy"
47
#define C_DNSSEC_SIGNING	"\x0E""dnssec-signing"
48 49
#define C_DOMAIN		"\x06""domain"
#define C_FILE			"\x04""file"
50
#define C_GLOBAL_MODULE		"\x0D""global-module"
51
#define C_ID			"\x02""id"
52
#define C_IDENT			"\x08""identity"
53 54
#define C_INCL			"\x07""include"
#define C_IXFR_DIFF		"\x15""ixfr-from-differences"
55
#define C_JOURNAL		"\x07""journal"
56
#define C_KASP_DB		"\x07""kasp-db"
57
#define C_KEY			"\x03""key"
58 59
#define C_KEYSTORE		"\x08""keystore"
#define C_KSK_SIZE		"\x08""ksk-size"
60
#define C_LISTEN		"\x06""listen"
61
#define C_LOG			"\x03""log"
62
#define C_MANUAL		"\x06""manual"
63
#define C_MASTER		"\x06""master"
64
#define C_MAX_JOURNAL_SIZE	"\x10""max-journal-size"
65 66
#define C_MAX_TCP_CLIENTS	"\x0F""max-tcp-clients"
#define C_MAX_UDP_PAYLOAD	"\x0F""max-udp-payload"
67
#define C_MAX_ZONE_SIZE		"\x0D""max-zone-size"
68 69
#define C_MAX_IPV4_UDP_PAYLOAD	"\x14""max-ipv4-udp-payload"
#define C_MAX_IPV6_UDP_PAYLOAD	"\x14""max-ipv6-udp-payload"
70 71
#define C_MODULE		"\x06""module"
#define C_NOTIFY		"\x06""notify"
72 73 74
#define C_NSEC3			"\x05""nsec3"
#define C_NSEC3_ITER		"\x10""nsec3-iterations"
#define C_NSEC3_SALT_LEN	"\x11""nsec3-salt-length"
75
#define C_NSEC3_SALT_LIFETIME	"\x13""nsec3-salt-lifetime"
76 77
#define C_NSID			"\x04""nsid"
#define C_PIDFILE		"\x07""pidfile"
78 79
#define C_POLICY		"\x06""policy"
#define C_PROPAG_DELAY		"\x11""propagation-delay"
80 81
#define C_RATE_LIMIT		"\x0A""rate-limit"
#define C_RATE_LIMIT_SLIP	"\x0F""rate-limit-slip"
82
#define C_RATE_LIMIT_TBL_SIZE	"\x15""rate-limit-table-size"
83
#define C_RATE_LIMIT_WHITELIST	"\x14""rate-limit-whitelist"
84
#define C_REQUEST_EDNS_OPTION	"\x13""request-edns-option"
85
#define C_RMT			"\x06""remote"
86
#define C_RRSIG_LIFETIME	"\x0E""rrsig-lifetime"
87
#define C_RRSIG_REFRESH		"\x0D""rrsig-refresh"
88 89 90 91 92 93
#define C_RUNDIR		"\x06""rundir"
#define C_SECRET		"\x06""secret"
#define C_SEM_CHECKS		"\x0F""semantic-checks"
#define C_SERIAL_POLICY		"\x0D""serial-policy"
#define C_SERVER		"\x06""server"
#define C_SRV			"\x06""server"
94
#define C_STORAGE		"\x07""storage"
95
#define C_TARGET		"\x06""target"
96 97 98
#define C_TCP_HSHAKE_TIMEOUT	"\x15""tcp-handshake-timeout"
#define C_TCP_IDLE_TIMEOUT	"\x10""tcp-idle-timeout"
#define C_TCP_REPLY_TIMEOUT	"\x11""tcp-reply-timeout"
99
#define C_TCP_WORKERS		"\x0B""tcp-workers"
100
#define C_TIMEOUT		"\x07""timeout"
101
#define C_TIMER_DB		"\x08""timer-db"
102
#define C_TPL			"\x08""template"
103
#define C_UDP_WORKERS		"\x0B""udp-workers"
104 105 106 107 108
#define C_USER			"\x04""user"
#define C_VERSION		"\x07""version"
#define C_VIA			"\x03""via"
#define C_ZONE			"\x04""zone"
#define C_ZONEFILE_SYNC		"\x0D""zonefile-sync"
109 110 111 112 113 114 115
#define C_ZSK_LIFETIME		"\x0C""zsk-lifetime"
#define C_ZSK_SIZE		"\x08""zsk-size"

enum {
	KEYSTORE_BACKEND_PEM    = 1,
	KEYSTORE_BACKEND_PKCS11 = 2
};
116 117 118 119 120 121

enum {
	SERIAL_POLICY_INCREMENT = 1,
	SERIAL_POLICY_UNIXTIME  = 2
};

122
extern const knot_lookup_t acl_actions[];
123

124
extern const yp_item_t conf_scheme[];
125 126

/*! @} */