1238106Sdes/*
2238106Sdes * checkconf/worker_cb.c - fake callback routines to make fptr_wlist work
3238106Sdes *
4238106Sdes * Copyright (c) 2007, NLnet Labs. All rights reserved.
5238106Sdes *
6238106Sdes * This software is open source.
7238106Sdes *
8238106Sdes * Redistribution and use in source and binary forms, with or without
9238106Sdes * modification, are permitted provided that the following conditions
10238106Sdes * are met:
11238106Sdes *
12238106Sdes * Redistributions of source code must retain the above copyright notice,
13238106Sdes * this list of conditions and the following disclaimer.
14238106Sdes *
15238106Sdes * Redistributions in binary form must reproduce the above copyright notice,
16238106Sdes * this list of conditions and the following disclaimer in the documentation
17238106Sdes * and/or other materials provided with the distribution.
18238106Sdes *
19238106Sdes * Neither the name of the NLNET LABS nor the names of its contributors may
20238106Sdes * be used to endorse or promote products derived from this software without
21238106Sdes * specific prior written permission.
22238106Sdes *
23238106Sdes * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24269257Sdes * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25269257Sdes * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26269257Sdes * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27269257Sdes * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28269257Sdes * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29269257Sdes * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30269257Sdes * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31269257Sdes * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32269257Sdes * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33269257Sdes * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34238106Sdes */
35238106Sdes
36238106Sdes/**
37238106Sdes * \file
38238106Sdes *
39238106Sdes * This file contains fake callback functions, so that the symbols exist
40238106Sdes * and the fptr_wlist continues to work even if the daemon/worker is not
41238106Sdes * linked into the resulting program.
42238106Sdes */
43238106Sdes#include "config.h"
44255585Sdes#include "libunbound/context.h"
45255585Sdes#include "libunbound/worker.h"
46255585Sdes#include "util/fptr_wlist.h"
47238106Sdes#include "util/log.h"
48238106Sdes#include "services/mesh.h"
49238106Sdes
50238106Sdesvoid worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
51238106Sdes	uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len),
52238106Sdes	int ATTR_UNUSED(error), void* ATTR_UNUSED(arg))
53238106Sdes{
54238106Sdes	log_assert(0);
55238106Sdes}
56238106Sdes
57238106Sdesint worker_handle_request(struct comm_point* ATTR_UNUSED(c),
58238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
59238106Sdes        struct comm_reply* ATTR_UNUSED(repinfo))
60238106Sdes{
61238106Sdes	log_assert(0);
62238106Sdes	return 0;
63238106Sdes}
64238106Sdes
65238106Sdesint worker_handle_reply(struct comm_point* ATTR_UNUSED(c),
66238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
67238106Sdes        struct comm_reply* ATTR_UNUSED(reply_info))
68238106Sdes{
69238106Sdes	log_assert(0);
70238106Sdes	return 0;
71238106Sdes}
72238106Sdes
73238106Sdesint worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
74238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
75238106Sdes        struct comm_reply* ATTR_UNUSED(reply_info))
76238106Sdes{
77238106Sdes	log_assert(0);
78238106Sdes	return 0;
79238106Sdes}
80238106Sdes
81238106Sdesint remote_accept_callback(struct comm_point* ATTR_UNUSED(c),
82238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
83238106Sdes        struct comm_reply* ATTR_UNUSED(repinfo))
84238106Sdes{
85238106Sdes	log_assert(0);
86238106Sdes	return 0;
87238106Sdes}
88238106Sdes
89238106Sdesint remote_control_callback(struct comm_point* ATTR_UNUSED(c),
90238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
91238106Sdes        struct comm_reply* ATTR_UNUSED(repinfo))
92238106Sdes{
93238106Sdes	log_assert(0);
94238106Sdes	return 0;
95238106Sdes}
96238106Sdes
97238106Sdesvoid worker_sighandler(int ATTR_UNUSED(sig), void* ATTR_UNUSED(arg))
98238106Sdes{
99238106Sdes	log_assert(0);
100238106Sdes}
101238106Sdes
102238106Sdesstruct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname),
103238106Sdes	size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
104238106Sdes	uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
105255585Sdes	int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
106285206Sdes	int ATTR_UNUSED(nocaps), struct sockaddr_storage* ATTR_UNUSED(addr),
107255585Sdes	socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone),
108255585Sdes	size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q))
109238106Sdes{
110238106Sdes	log_assert(0);
111238106Sdes	return 0;
112238106Sdes}
113238106Sdes
114238106Sdes#ifdef UB_ON_WINDOWS
115238106Sdesvoid
116238106Sdesworker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev), void*
117238106Sdes	ATTR_UNUSED(arg)) {
118238106Sdes	log_assert(0);
119238106Sdes}
120238106Sdes
121238106Sdesvoid
122238106Sdeswsvc_cron_cb(void* ATTR_UNUSED(arg))
123238106Sdes{
124238106Sdes	log_assert(0);
125238106Sdes}
126238106Sdes#endif /* UB_ON_WINDOWS */
127238106Sdes
128238106Sdesvoid
129238106Sdesworker_alloc_cleanup(void* ATTR_UNUSED(arg))
130238106Sdes{
131238106Sdes	log_assert(0);
132238106Sdes}
133238106Sdes
134238106Sdesstruct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname),
135238106Sdes	size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
136238106Sdes	uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
137238106Sdes	int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
138285206Sdes	int ATTR_UNUSED(nocaps), struct sockaddr_storage* ATTR_UNUSED(addr),
139255585Sdes	socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone),
140255585Sdes	size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q))
141238106Sdes{
142238106Sdes	log_assert(0);
143238106Sdes	return 0;
144238106Sdes}
145238106Sdes
146238106Sdesint libworker_handle_reply(struct comm_point* ATTR_UNUSED(c),
147238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
148238106Sdes        struct comm_reply* ATTR_UNUSED(reply_info))
149238106Sdes{
150238106Sdes	log_assert(0);
151238106Sdes	return 0;
152238106Sdes}
153238106Sdes
154238106Sdesint libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c),
155238106Sdes	void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
156238106Sdes        struct comm_reply* ATTR_UNUSED(reply_info))
157238106Sdes{
158238106Sdes	log_assert(0);
159238106Sdes	return 0;
160238106Sdes}
161238106Sdes
162238106Sdesvoid libworker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
163238106Sdes        uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len),
164238106Sdes        int ATTR_UNUSED(error), void* ATTR_UNUSED(arg))
165238106Sdes{
166238106Sdes        log_assert(0);
167238106Sdes}
168238106Sdes
169238106Sdesvoid libworker_fg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode),
170269257Sdes	struct sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s),
171238106Sdes	char* ATTR_UNUSED(why_bogus))
172238106Sdes{
173238106Sdes	log_assert(0);
174238106Sdes}
175238106Sdes
176238106Sdesvoid libworker_bg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode),
177269257Sdes	struct sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s),
178238106Sdes	char* ATTR_UNUSED(why_bogus))
179238106Sdes{
180238106Sdes	log_assert(0);
181238106Sdes}
182238106Sdes
183269257Sdesvoid libworker_event_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode),
184269257Sdes	struct sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s),
185269257Sdes	char* ATTR_UNUSED(why_bogus))
186269257Sdes{
187269257Sdes	log_assert(0);
188269257Sdes}
189269257Sdes
190238106Sdesint context_query_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
191238106Sdes{
192238106Sdes	log_assert(0);
193238106Sdes	return 0;
194238106Sdes}
195238106Sdes
196238106Sdesvoid worker_stat_timer_cb(void* ATTR_UNUSED(arg))
197238106Sdes{
198238106Sdes	log_assert(0);
199238106Sdes}
200238106Sdes
201238106Sdesvoid worker_probe_timer_cb(void* ATTR_UNUSED(arg))
202238106Sdes{
203238106Sdes	log_assert(0);
204238106Sdes}
205238106Sdes
206238106Sdesvoid worker_start_accept(void* ATTR_UNUSED(arg))
207238106Sdes{
208238106Sdes	log_assert(0);
209238106Sdes}
210238106Sdes
211238106Sdesvoid worker_stop_accept(void* ATTR_UNUSED(arg))
212238106Sdes{
213238106Sdes	log_assert(0);
214238106Sdes}
215238106Sdes
216238106Sdes/** keep track of lock id in lock-verify application */
217238106Sdesstruct order_id {
218238106Sdes        /** the thread id that created it */
219238106Sdes        int thr;
220238106Sdes        /** the instance number of creation */
221238106Sdes        int instance;
222238106Sdes};
223238106Sdes
224238106Sdesint order_lock_cmp(const void* e1, const void* e2)
225238106Sdes{
226238106Sdes        struct order_id* o1 = (struct order_id*)e1;
227238106Sdes        struct order_id* o2 = (struct order_id*)e2;
228238106Sdes        if(o1->thr < o2->thr) return -1;
229238106Sdes        if(o1->thr > o2->thr) return 1;
230238106Sdes        if(o1->instance < o2->instance) return -1;
231238106Sdes        if(o1->instance > o2->instance) return 1;
232238106Sdes        return 0;
233238106Sdes}
234238106Sdes
235238106Sdesint
236238106Sdescodeline_cmp(const void* a, const void* b)
237238106Sdes{
238238106Sdes        return strcmp((const char*)a, (const char*)b);
239238106Sdes}
240238106Sdes
241238106Sdesint replay_var_compare(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
242238106Sdes{
243238106Sdes        log_assert(0);
244238106Sdes        return 0;
245238106Sdes}
246238106Sdes
247238106Sdesvoid remote_get_opt_ssl(char* ATTR_UNUSED(str), void* ATTR_UNUSED(arg))
248238106Sdes{
249238106Sdes        log_assert(0);
250238106Sdes}
251