1254322Serwin/*
2254322Serwin * Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
3254322Serwin *
4254322Serwin * Permission to use, copy, modify, and/or distribute this software for any
5254322Serwin * purpose with or without fee is hereby granted, provided that the above
6254322Serwin * copyright notice and this permission notice appear in all copies.
7254322Serwin *
8254322Serwin * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9254322Serwin * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10254322Serwin * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11254322Serwin * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12254322Serwin * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13254322Serwin * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14254322Serwin * PERFORMANCE OF THIS SOFTWARE.
15254322Serwin */
16254322Serwin
17254322Serwin/* $Id: update.h,v 1.5 2011/08/30 23:46:53 tbox Exp $ */
18254322Serwin
19254322Serwin#ifndef DNS_UPDATE_H
20254322Serwin#define DNS_UPDATE_H 1
21254322Serwin
22254322Serwin/*! \file dns/update.h */
23254322Serwin
24254322Serwin/***
25254322Serwin ***	Imports
26254322Serwin ***/
27254322Serwin
28254322Serwin#include <isc/lang.h>
29254322Serwin
30254322Serwin#include <dns/types.h>
31254322Serwin#include <dns/diff.h>
32254322Serwin
33254322Serwintypedef struct {
34254322Serwin	void (*func)(void *arg, dns_zone_t *zone, int level,
35254322Serwin		     const char *message);
36254322Serwin	void *arg;
37254322Serwin} dns_update_log_t;
38254322Serwin
39254322SerwinISC_LANG_BEGINDECLS
40254322Serwin
41254322Serwin/***
42254322Serwin ***	Functions
43254322Serwin ***/
44254322Serwin
45254322Serwinisc_uint32_t
46254322Serwindns_update_soaserial(isc_uint32_t serial, dns_updatemethod_t method);
47254322Serwin/*%<
48254322Serwin * Return the next serial number after 'serial', depending on the
49254322Serwin * update method 'method':
50254322Serwin *
51254322Serwin *\li	* dns_updatemethod_increment increments the serial number by one
52254322Serwin *\li	* dns_updatemethod_unixtime sets the serial number to the current
53254322Serwin *	  time (seconds since UNIX epoch) if possible, or increments by one
54254322Serwin *	  if not.
55254322Serwin */
56254322Serwin
57254322Serwinisc_result_t
58254322Serwindns_update_signatures(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
59254322Serwin		      dns_dbversion_t *oldver, dns_dbversion_t *newver,
60254322Serwin		      dns_diff_t *diff, isc_uint32_t sigvalidityinterval);
61254322Serwin
62254322SerwinISC_LANG_ENDDECLS
63254322Serwin
64254322Serwin#endif /* DNS_UPDATE_H */
65