1
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*!
* \file ddns.h
*
* \author Lubos Slovak <lubos.slovak@nic.cz>
*
* \brief Dynamic updates processing.
*
* \addtogroup query_processing
* @{
*/
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
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/>.
*/
#ifndef _KNOT_DDNS_H_
#define _KNOT_DDNS_H_
#include "updates/changesets.h"
#include "zone/zone.h"
#include "packet/packet.h"
#include "rrset.h"
#include "dname.h"
typedef struct knot_ddns_prereq_t {
knot_rrset_t **exist;
size_t exist_count;
size_t exist_allocd;
knot_rrset_t **exist_full;
size_t exist_full_count;
size_t exist_full_allocd;
knot_rrset_t **not_exist;
size_t not_exist_count;
size_t not_exist_allocd;
knot_dname_t **in_use;
size_t in_use_count;
size_t in_use_allocd;
knot_dname_t **not_in_use;
size_t not_in_use_count;
size_t not_in_use_allocd;
} knot_ddns_prereq_t;
int knot_ddns_check_zone(const knot_zone_t *zone, knot_packet_t *query,
uint8_t *rcode);
int knot_ddns_process_prereqs(knot_packet_t *query,
knot_ddns_prereq_t **prereqs, uint8_t *rcode);
int knot_ddns_check_prereqs(const knot_zone_contents_t *zone,
knot_ddns_prereq_t **prereqs, uint8_t *rcode);
int knot_ddns_process_update(knot_packet_t *query,
knot_changeset_t **changeset, uint8_t *rcode);
void knot_ddns_prereqs_free(knot_ddns_prereq_t **prereq);
#endif /* _KNOT_DDNS_H_ */
/*! @} */
|