2
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
2
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3
3
* Copyright (C) 1999-2002 Internet Software Consortium.
5
* Permission to use, copy, modify, and distribute this software for any
5
* Permission to use, copy, modify, and/or distribute this software for any
6
6
* purpose with or without fee is hereby granted, provided that the above
7
7
* copyright notice and this permission notice appear in all copies.
32
34
dns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, dns_zt_t **zt);
34
36
* Creates a new zone table.
37
* 'mctx' to be initialized.
39
* \li 'mctx' to be initialized.
40
* ISC_R_SUCCESS on success.
42
* \li #ISC_R_SUCCESS on success.
45
47
dns_zt_mount(dns_zt_t *zt, dns_zone_t *zone);
47
49
* Mounts the zone on the zone table.
52
* \li 'zt' to be valid
53
* \li 'zone' to be valid
61
63
dns_zt_unmount(dns_zt_t *zt, dns_zone_t *zone);
63
65
* Unmount the given zone from the table.
69
* \li 'zone' to be valid
76
78
dns_zt_find(dns_zt_t *zt, dns_name_t *name, unsigned int options,
77
79
dns_name_t *foundname, dns_zone_t **zone);
79
81
* Find the best match for 'name' in 'zt'. If foundname is non NULL
80
82
* then the name of the zone found is returned.
83
* If the DNS_ZTFIND_NOEXACT is set, the best partial match (if any)
85
* \li If the DNS_ZTFIND_NOEXACT is set, the best partial match (if any)
84
86
* to 'name' will be returned.
89
* 'foundname' to be initialized and associated with a fixedname or NULL
90
* 'zone' to be non NULL and '*zone' to be NULL
89
* \li 'zt' to be valid
90
* \li 'name' to be valid
91
* \li 'foundname' to be initialized and associated with a fixedname or NULL
92
* \li 'zone' to be non NULL and '*zone' to be NULL
96
* \li #DNS_R_PARTIALMATCH
100
102
dns_zt_detach(dns_zt_t **ztp);
102
104
* Detach the given zonetable, if the reference count goes to zero the
103
105
* zonetable will be freed. In either case 'ztp' is set to NULL.
108
* \li '*ztp' to be valid
110
112
dns_zt_flushanddetach(dns_zt_t **ztp);
112
114
* Detach the given zonetable, if the reference count goes to zero the
113
115
* zonetable will be flushed and then freed. In either case 'ztp' is
119
* \li '*ztp' to be valid
121
123
dns_zt_attach(dns_zt_t *zt, dns_zt_t **ztp);
123
125
* Attach 'zt' to '*ztp'.
128
* \li 'zt' to be valid
129
* \li '*ztp' to be NULL
134
136
dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop);
136
138
* Load all zones in the table. If 'stop' is ISC_TRUE,
137
139
* stop on the first error and return it. If 'stop'
138
140
* is ISC_FALSE, ignore errors.
142
144
* and whose master file has changed since the last load.
147
* \li 'zt' to be valid
151
dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze);
153
* Freeze/thaw updates to master zones.
154
* Any pending updates will be flushed.
155
* Zones will be reloaded on thaw.
149
159
dns_zt_apply(dns_zt_t *zt, isc_boolean_t stop,
150
160
isc_result_t (*action)(dns_zone_t *, void *), void *uap);
163
dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
164
isc_result_t (*action)(dns_zone_t *, void *), void *uap);
152
166
* Apply a given 'action' to all zone zones in the table.
153
167
* If 'stop' is 'ISC_TRUE' then walking the zone tree will stop if
154
168
* 'action' does not return ISC_R_SUCCESS.
158
* 'action' to be non NULL.
171
* \li 'zt' to be valid.
172
* \li 'action' to be non NULL.
161
* ISC_R_SUCCESS if action was applied to all nodes.
175
* \li ISC_R_SUCCESS if action was applied to all nodes. If 'stop' is
176
* ISC_FALSE and 'sub' is non NULL then the first error (if any)
177
* reported by 'action' is returned in '*sub';
162
178
* any error code from 'action'.