xref: /freebsd/contrib/unbound/dns64/dns64.h (revision 98e0ffaefb0f241cda3a72395d3be04192ae0d47)
1*ff825849SDag-Erling Smørgrav /*
2*ff825849SDag-Erling Smørgrav  * dns64/dns64.h - DNS64 module
3*ff825849SDag-Erling Smørgrav  *
4*ff825849SDag-Erling Smørgrav  * Copyright (c) 2009, Viagénie. All rights reserved.
5*ff825849SDag-Erling Smørgrav  *
6*ff825849SDag-Erling Smørgrav  * This software is open source.
7*ff825849SDag-Erling Smørgrav  *
8*ff825849SDag-Erling Smørgrav  * Redistribution and use in source and binary forms, with or without
9*ff825849SDag-Erling Smørgrav  * modification, are permitted provided that the following conditions
10*ff825849SDag-Erling Smørgrav  * are met:
11*ff825849SDag-Erling Smørgrav  *
12*ff825849SDag-Erling Smørgrav  * Redistributions of source code must retain the above copyright notice,
13*ff825849SDag-Erling Smørgrav  * this list of conditions and the following disclaimer.
14*ff825849SDag-Erling Smørgrav  *
15*ff825849SDag-Erling Smørgrav  * Redistributions in binary form must reproduce the above copyright notice,
16*ff825849SDag-Erling Smørgrav  * this list of conditions and the following disclaimer in the documentation
17*ff825849SDag-Erling Smørgrav  * and/or other materials provided with the distribution.
18*ff825849SDag-Erling Smørgrav  *
19*ff825849SDag-Erling Smørgrav  * Neither the name of the NLNET LABS nor the names of its contributors may
20*ff825849SDag-Erling Smørgrav  * be used to endorse or promote products derived from this software without
21*ff825849SDag-Erling Smørgrav  * specific prior written permission.
22*ff825849SDag-Erling Smørgrav  *
23*ff825849SDag-Erling Smørgrav  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24*ff825849SDag-Erling Smørgrav  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25*ff825849SDag-Erling Smørgrav  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26*ff825849SDag-Erling Smørgrav  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
27*ff825849SDag-Erling Smørgrav  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28*ff825849SDag-Erling Smørgrav  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29*ff825849SDag-Erling Smørgrav  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30*ff825849SDag-Erling Smørgrav  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31*ff825849SDag-Erling Smørgrav  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32*ff825849SDag-Erling Smørgrav  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33*ff825849SDag-Erling Smørgrav  * POSSIBILITY OF SUCH DAMAGE.
34*ff825849SDag-Erling Smørgrav  */
35*ff825849SDag-Erling Smørgrav 
36*ff825849SDag-Erling Smørgrav /**
37*ff825849SDag-Erling Smørgrav  * \file
38*ff825849SDag-Erling Smørgrav  *
39*ff825849SDag-Erling Smørgrav  * This file contains a module that performs DNS64 query processing.
40*ff825849SDag-Erling Smørgrav  */
41*ff825849SDag-Erling Smørgrav 
42*ff825849SDag-Erling Smørgrav #ifndef DNS64_DNS64_H
43*ff825849SDag-Erling Smørgrav #define DNS64_DNS64_H
44*ff825849SDag-Erling Smørgrav #include "util/module.h"
45*ff825849SDag-Erling Smørgrav 
46*ff825849SDag-Erling Smørgrav /**
47*ff825849SDag-Erling Smørgrav  * Get the dns64 function block.
48*ff825849SDag-Erling Smørgrav  * @return: function block with function pointers to dns64 methods.
49*ff825849SDag-Erling Smørgrav  */
50*ff825849SDag-Erling Smørgrav struct module_func_block *dns64_get_funcblock(void);
51*ff825849SDag-Erling Smørgrav 
52*ff825849SDag-Erling Smørgrav /** dns64 init */
53*ff825849SDag-Erling Smørgrav int dns64_init(struct module_env* env, int id);
54*ff825849SDag-Erling Smørgrav 
55*ff825849SDag-Erling Smørgrav /** dns64 deinit */
56*ff825849SDag-Erling Smørgrav void dns64_deinit(struct module_env* env, int id);
57*ff825849SDag-Erling Smørgrav 
58*ff825849SDag-Erling Smørgrav /** dns64 operate on a query */
59*ff825849SDag-Erling Smørgrav void dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,
60*ff825849SDag-Erling Smørgrav 		struct outbound_entry* outbound);
61*ff825849SDag-Erling Smørgrav 
62*ff825849SDag-Erling Smørgrav void dns64_inform_super(struct module_qstate* qstate, int id,
63*ff825849SDag-Erling Smørgrav     struct module_qstate* super);
64*ff825849SDag-Erling Smørgrav 
65*ff825849SDag-Erling Smørgrav /** dns64 cleanup query state */
66*ff825849SDag-Erling Smørgrav void dns64_clear(struct module_qstate* qstate, int id);
67*ff825849SDag-Erling Smørgrav 
68*ff825849SDag-Erling Smørgrav /** dns64 alloc size routine */
69*ff825849SDag-Erling Smørgrav size_t dns64_get_mem(struct module_env* env, int id);
70*ff825849SDag-Erling Smørgrav 
71*ff825849SDag-Erling Smørgrav #endif /* DNS64_DNS64_H */
72