xref: /freebsd/contrib/unbound/libunbound/remote.h (revision 7a789145f88a6aceacc59029a0cafe7de7aeefea)
1*7a789145SDag-Erling Smørgrav /*
2*7a789145SDag-Erling Smørgrav  * libunbound/remote.h - prototypes for remote control methods.
3*7a789145SDag-Erling Smørgrav  *
4*7a789145SDag-Erling Smørgrav  * Copyright (c) 2026, NLnet Labs. All rights reserved.
5*7a789145SDag-Erling Smørgrav  *
6*7a789145SDag-Erling Smørgrav  * This software is open source.
7*7a789145SDag-Erling Smørgrav  *
8*7a789145SDag-Erling Smørgrav  * Redistribution and use in source and binary forms, with or without
9*7a789145SDag-Erling Smørgrav  * modification, are permitted provided that the following conditions
10*7a789145SDag-Erling Smørgrav  * are met:
11*7a789145SDag-Erling Smørgrav  *
12*7a789145SDag-Erling Smørgrav  * Redistributions of source code must retain the above copyright notice,
13*7a789145SDag-Erling Smørgrav  * this list of conditions and the following disclaimer.
14*7a789145SDag-Erling Smørgrav  *
15*7a789145SDag-Erling Smørgrav  * Redistributions in binary form must reproduce the above copyright notice,
16*7a789145SDag-Erling Smørgrav  * this list of conditions and the following disclaimer in the documentation
17*7a789145SDag-Erling Smørgrav  * and/or other materials provided with the distribution.
18*7a789145SDag-Erling Smørgrav  *
19*7a789145SDag-Erling Smørgrav  * Neither the name of the NLNET LABS nor the names of its contributors may
20*7a789145SDag-Erling Smørgrav  * be used to endorse or promote products derived from this software without
21*7a789145SDag-Erling Smørgrav  * specific prior written permission.
22*7a789145SDag-Erling Smørgrav  *
23*7a789145SDag-Erling Smørgrav  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24*7a789145SDag-Erling Smørgrav  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25*7a789145SDag-Erling Smørgrav  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26*7a789145SDag-Erling Smørgrav  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27*7a789145SDag-Erling Smørgrav  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28*7a789145SDag-Erling Smørgrav  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29*7a789145SDag-Erling Smørgrav  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30*7a789145SDag-Erling Smørgrav  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31*7a789145SDag-Erling Smørgrav  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32*7a789145SDag-Erling Smørgrav  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33*7a789145SDag-Erling Smørgrav  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34*7a789145SDag-Erling Smørgrav  */
35*7a789145SDag-Erling Smørgrav 
36*7a789145SDag-Erling Smørgrav /**
37*7a789145SDag-Erling Smørgrav  * \file
38*7a789145SDag-Erling Smørgrav  *
39*7a789145SDag-Erling Smørgrav  * This file declares the methods that must be implemented to use the
40*7a789145SDag-Erling Smørgrav  * remote control service.
41*7a789145SDag-Erling Smørgrav  */
42*7a789145SDag-Erling Smørgrav 
43*7a789145SDag-Erling Smørgrav #ifndef LIBUNBOUND_REMOTE_H
44*7a789145SDag-Erling Smørgrav #define LIBUNBOUND_REMOTE_H
45*7a789145SDag-Erling Smørgrav 
46*7a789145SDag-Erling Smørgrav struct comm_reply;
47*7a789145SDag-Erling Smørgrav struct comm_point;
48*7a789145SDag-Erling Smørgrav 
49*7a789145SDag-Erling Smørgrav /** fast reload thread commands to remote service thread event callback */
50*7a789145SDag-Erling Smørgrav void fast_reload_service_cb(int fd, short bits, void* arg);
51*7a789145SDag-Erling Smørgrav 
52*7a789145SDag-Erling Smørgrav /** fast reload callback for the remote control client connection */
53*7a789145SDag-Erling Smørgrav int fast_reload_client_callback(struct comm_point* c, void* arg, int err,
54*7a789145SDag-Erling Smørgrav 	struct comm_reply* rep);
55*7a789145SDag-Erling Smørgrav 
56*7a789145SDag-Erling Smørgrav /** handle remote control accept callbacks */
57*7a789145SDag-Erling Smørgrav int remote_accept_callback(struct comm_point*, void*, int, struct comm_reply*);
58*7a789145SDag-Erling Smørgrav 
59*7a789145SDag-Erling Smørgrav /** handle remote control data callbacks */
60*7a789145SDag-Erling Smørgrav int remote_control_callback(struct comm_point*, void*, int, struct comm_reply*);
61*7a789145SDag-Erling Smørgrav 
62*7a789145SDag-Erling Smørgrav /** routine to printout option values over SSL */
63*7a789145SDag-Erling Smørgrav void  remote_get_opt_ssl(char* line, void* arg);
64*7a789145SDag-Erling Smørgrav 
65*7a789145SDag-Erling Smørgrav #endif /* LIBUNBOUND_REMOTE_H */
66