]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/lib/dns/include/dns/update.h
Update BIND to 9.9.8
[FreeBSD/stable/9.git] / contrib / bind9 / lib / dns / include / dns / update.h
1 /*
2  * Copyright (C) 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14  * PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 /* $Id: update.h,v 1.5 2011/08/30 23:46:53 tbox Exp $ */
18
19 #ifndef DNS_UPDATE_H
20 #define DNS_UPDATE_H 1
21
22 /*! \file dns/update.h */
23
24 /***
25  ***    Imports
26  ***/
27
28 #include <isc/lang.h>
29
30 #include <dns/types.h>
31 #include <dns/diff.h>
32
33 typedef struct {
34         void (*func)(void *arg, dns_zone_t *zone, int level,
35                      const char *message);
36         void *arg;
37 } dns_update_log_t;
38
39 ISC_LANG_BEGINDECLS
40
41 /***
42  ***    Functions
43  ***/
44
45 isc_uint32_t
46 dns_update_soaserial(isc_uint32_t serial, dns_updatemethod_t method);
47 /*%<
48  * Return the next serial number after 'serial', depending on the
49  * update method 'method':
50  *
51  *\li   * dns_updatemethod_increment increments the serial number by one
52  *\li   * dns_updatemethod_unixtime sets the serial number to the current
53  *        time (seconds since UNIX epoch) if possible, or increments by one
54  *        if not.
55  */
56
57 isc_result_t
58 dns_update_signatures(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
59                       dns_dbversion_t *oldver, dns_dbversion_t *newver,
60                       dns_diff_t *diff, isc_uint32_t sigvalidityinterval);
61
62 isc_result_t
63 dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
64                          dns_dbversion_t *oldver, dns_dbversion_t *newver,
65                          dns_diff_t *diff, isc_uint32_t sigvalidityinterval,
66                          dns_update_state_t **state);
67
68 ISC_LANG_ENDDECLS
69
70 #endif /* DNS_UPDATE_H */