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