diff options
Diffstat (limited to 'usr.sbin/nsd/xfrd-notify.h')
-rw-r--r-- | usr.sbin/nsd/xfrd-notify.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/usr.sbin/nsd/xfrd-notify.h b/usr.sbin/nsd/xfrd-notify.h index 242c7e763ca..4f084d302e7 100644 --- a/usr.sbin/nsd/xfrd-notify.h +++ b/usr.sbin/nsd/xfrd-notify.h @@ -1,7 +1,7 @@ /* * xfrd-notify.h - notify sending routines. * - * Copyright (c) 2001-2011, NLnet Labs. All rights reserved. + * Copyright (c) 2006, NLnet Labs. All rights reserved. * * See LICENSE for the license. * @@ -10,9 +10,12 @@ #ifndef XFRD_NOTIFY_H #define XFRD_NOTIFY_H -#include "config.h" +#ifndef USE_MINI_EVENT +#include <event.h> +#else +#include "mini_event.h" +#endif #include "tsig.h" -#include "netio.h" #include "rbtree.h" struct nsd; @@ -22,6 +25,7 @@ struct zone_options; struct zone; struct xfrd_soa; struct acl_options; +struct xfrd_state; /** * This struct keeps track of outbound notifies for a zone. @@ -38,26 +42,32 @@ struct notify_zone_t { /* notify sending handler */ /* Not saved on disk (i.e. kill of daemon stops notifies) */ - netio_handler_type notify_send_handler; - struct timespec notify_timeout; + int notify_send_enable; + struct event notify_send_handler; + struct timeval notify_timeout; struct acl_options* notify_current; /* current slave to notify */ + uint8_t notify_restart; /* restart notify after repattern */ uint8_t notify_retry; /* how manieth retry in sending to current */ uint16_t notify_query_id; /* is this notify waiting for a socket? */ uint8_t is_waiting; - /* next in the waiting list for the udp sockets */ + /* the double linked waiting list for the udp sockets */ struct notify_zone_t* waiting_next; + struct notify_zone_t* waiting_prev; }; /* initialise outgoing notifies */ -void init_notify_send(rbtree_t* tree, netio_type* netio, region_type* region, - const dname_type* apex, struct zone_options* options, - struct zone* dbzone); +void init_notify_send(rbtree_t* tree, region_type* region, + struct zone_options* options); +/* delete notify zone */ +void xfrd_del_notify(struct xfrd_state* xfrd, const dname_type* dname); /* send notifications to all in the notify list */ void xfrd_send_notify(rbtree_t* tree, const struct dname* apex, struct xfrd_soa* new_soa); +/* start notifications, if not started already (does not clobber SOA) */ +void xfrd_notify_start(struct notify_zone_t* zone); /* handle soa update notify for a master zone. newsoa can be NULL. Makes sure that the soa (serial) has changed. Or drops notify. */ @@ -66,5 +76,7 @@ void notify_handle_master_zone_soainfo(rbtree_t* tree, /* close fds in use for notification sending */ void close_notify_fds(rbtree_t* tree); +/* stop send of notify */ +void notify_disable(struct notify_zone_t* zone); #endif /* XFRD_NOTIFY_H */ |