1/* 2 * Copyright (C) 2011 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 33typedef 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 39ISC_LANG_BEGINDECLS 40 41/*** 42 *** Functions 43 ***/ 44 45isc_uint32_t 46dns_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 57isc_result_t 58dns_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 62ISC_LANG_ENDDECLS 63 64#endif /* DNS_UPDATE_H */ 65