OpenDNSSEC-signer  1.4.3
dnshandler.h
Go to the documentation of this file.
1 /*
2  * $Id: dnshandler.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_DNSHANDLER_H
35 #define DAEMON_DNSHANDLER_H
36 
37 #include "config.h"
38 #include "shared/allocator.h"
39 #include "shared/locks.h"
40 #include "shared/status.h"
41 #include "wire/listener.h"
42 #include "wire/netio.h"
43 #include "wire/query.h"
44 #include "wire/sock.h"
45 
46 #include <stdint.h>
47 
48 #define ODS_SE_NOTIFY_CMD "NOTIFY"
49 #define ODS_SE_MAX_HANDLERS 5
50 
55  void* engine;
61  unsigned need_to_exit;
62 };
63 
72  listener_type* interfaces);
73 
81 
87 void dnshandler_start(dnshandler_type* dnshandler);
88 
94 void dnshandler_signal(dnshandler_type* dnshandler);
95 
103 void dnshandler_fwd_notify(dnshandler_type* dnshandler,
104  uint8_t* pkt, size_t len);
105 
111 void dnshandler_cleanup(dnshandler_type* dnshandler);
112 
113 #endif /* DAEMON_DNSHANDLER_H */
void dnshandler_start(dnshandler_type *dnshandler)
Definition: dnshandler.c:129
socklist_type * socklist
Definition: dnshandler.h:57
query_type * query
Definition: dnshandler.h:59
void dnshandler_fwd_notify(dnshandler_type *dnshandler, uint8_t *pkt, size_t len)
Definition: dnshandler.c:249
allocator_type * allocator
Definition: dnshandler.h:53
listener_type * interfaces
Definition: dnshandler.h:56
void dnshandler_cleanup(dnshandler_type *dnshandler)
Definition: dnshandler.c:296
enum ods_enum_status ods_status
Definition: status.h:91
pid_t ods_thread_type
Definition: locks.h:102
unsigned need_to_exit
Definition: dnshandler.h:61
ods_status dnshandler_listen(dnshandler_type *dnshandler)
Definition: dnshandler.c:110
void dnshandler_signal(dnshandler_type *dnshandler)
Definition: dnshandler.c:235
netio_handler_type xfrhandler
Definition: dnshandler.h:60
dnshandler_type * dnshandler_create(allocator_type *allocator, listener_type *interfaces)
Definition: dnshandler.c:53
netio_type * netio
Definition: dnshandler.h:58
ods_thread_type thread_id
Definition: dnshandler.h:54