OpenDNSSEC-signer  1.4.1
xfrhandler.h
Go to the documentation of this file.
1 /*
2  * $Id: xfrhandler.h 4518 2011-02-24 15:39:09Z matthijs $
3  *
4  * Copyright (c) 2009 NLNet Labs. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
34 #ifndef DAEMON_XFRHANDLER_H
35 #define DAEMON_XFRHANDLER_H
36 
37 #include "config.h"
38 #include "shared/allocator.h"
39 #include "shared/locks.h"
40 #include "wire/buffer.h"
41 #include "wire/netio.h"
42 #include "wire/notify.h"
43 #include "wire/tcpset.h"
44 #include "wire/xfrd.h"
45 
53  /* Engine reference */
55  void* engine;
56  /* Start time */
57  time_t start_time;
58  time_t current_time;
59  /* Network support */
65  size_t udp_use_num;
70  unsigned got_time : 1;
71  unsigned need_to_exit : 1;
72  unsigned started : 1;
73 };
74 
82 
88 void xfrhandler_start(xfrhandler_type* xfrhandler);
89 
96 time_t xfrhandler_time(xfrhandler_type* xfrhandler);
97 
103 void xfrhandler_signal(xfrhandler_type* xfrhandler);
104 
110 void xfrhandler_cleanup(xfrhandler_type* xfrhandler);
111 
112 #endif /* DAEMON_XFRHANDLER_H */
xfrd_type * udp_waiting_first
Definition: xfrhandler.h:63
xfrd_type * udp_waiting_last
Definition: xfrhandler.h:64
time_t current_time
Definition: xfrhandler.h:58
void xfrhandler_cleanup(xfrhandler_type *xfrhandler)
Definition: xfrhandler.c:216
buffer_type * packet
Definition: xfrhandler.h:62
netio_type * netio
Definition: xfrhandler.h:60
unsigned need_to_exit
Definition: xfrhandler.h:71
netio_handler_type dnshandler
Definition: xfrhandler.h:69
pid_t ods_thread_type
Definition: locks.h:102
unsigned got_time
Definition: xfrhandler.h:70
time_t xfrhandler_time(xfrhandler_type *xfrhandler)
Definition: xfrhandler.c:158
size_t udp_use_num
Definition: xfrhandler.h:65
void xfrhandler_start(xfrhandler_type *xfrhandler)
Definition: xfrhandler.c:120
notify_type * notify_waiting_first
Definition: xfrhandler.h:66
tcp_set_type * tcp_set
Definition: xfrhandler.h:61
notify_type * notify_waiting_last
Definition: xfrhandler.h:67
void xfrhandler_signal(xfrhandler_type *xfrhandler)
Definition: xfrhandler.c:176
xfrhandler_type * xfrhandler_create(allocator_type *allocator)
Definition: xfrhandler.c:54
allocator_type * allocator
Definition: xfrhandler.h:52
unsigned started
Definition: xfrhandler.h:72
ods_thread_type thread_id
Definition: xfrhandler.h:54