1 /* 2 * checkconf/worker_cb.c - fake callback routines to make fptr_wlist work 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * Neither the name of the NLNET LABS nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 29 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 */ 35 36 /** 37 * \file 38 * 39 * This file contains fake callback functions, so that the symbols exist 40 * and the fptr_wlist continues to work even if the daemon/worker is not 41 * linked into the resulting program. 42 */ 43 #include "config.h" 44 #include "libunbound/context.h" 45 #include "libunbound/worker.h" 46 #include "util/fptr_wlist.h" 47 #include "util/log.h" 48 #include "services/mesh.h" 49 50 void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube), 51 uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len), 52 int ATTR_UNUSED(error), void* ATTR_UNUSED(arg)) 53 { 54 log_assert(0); 55 } 56 57 int worker_handle_request(struct comm_point* ATTR_UNUSED(c), 58 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 59 struct comm_reply* ATTR_UNUSED(repinfo)) 60 { 61 log_assert(0); 62 return 0; 63 } 64 65 int worker_handle_reply(struct comm_point* ATTR_UNUSED(c), 66 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 67 struct comm_reply* ATTR_UNUSED(reply_info)) 68 { 69 log_assert(0); 70 return 0; 71 } 72 73 int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), 74 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 75 struct comm_reply* ATTR_UNUSED(reply_info)) 76 { 77 log_assert(0); 78 return 0; 79 } 80 81 int remote_accept_callback(struct comm_point* ATTR_UNUSED(c), 82 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 83 struct comm_reply* ATTR_UNUSED(repinfo)) 84 { 85 log_assert(0); 86 return 0; 87 } 88 89 int remote_control_callback(struct comm_point* ATTR_UNUSED(c), 90 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 91 struct comm_reply* ATTR_UNUSED(repinfo)) 92 { 93 log_assert(0); 94 return 0; 95 } 96 97 void worker_sighandler(int ATTR_UNUSED(sig), void* ATTR_UNUSED(arg)) 98 { 99 log_assert(0); 100 } 101 102 struct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname), 103 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype), 104 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), 105 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), 106 int ATTR_UNUSED(nocaps), struct edns_option* ATTR_UNUSED(opt_list), 107 struct sockaddr_storage* ATTR_UNUSED(addr), 108 socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone), 109 size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q)) 110 { 111 log_assert(0); 112 return 0; 113 } 114 115 #ifdef UB_ON_WINDOWS 116 void 117 worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev), void* 118 ATTR_UNUSED(arg)) { 119 log_assert(0); 120 } 121 122 void 123 wsvc_cron_cb(void* ATTR_UNUSED(arg)) 124 { 125 log_assert(0); 126 } 127 #endif /* UB_ON_WINDOWS */ 128 129 void 130 worker_alloc_cleanup(void* ATTR_UNUSED(arg)) 131 { 132 log_assert(0); 133 } 134 135 struct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname), 136 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype), 137 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), 138 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), 139 int ATTR_UNUSED(nocaps), struct edns_option* ATTR_UNUSED(opt_list), 140 struct sockaddr_storage* ATTR_UNUSED(addr), 141 socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone), 142 size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q)) 143 { 144 log_assert(0); 145 return 0; 146 } 147 148 int libworker_handle_reply(struct comm_point* ATTR_UNUSED(c), 149 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 150 struct comm_reply* ATTR_UNUSED(reply_info)) 151 { 152 log_assert(0); 153 return 0; 154 } 155 156 int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), 157 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 158 struct comm_reply* ATTR_UNUSED(reply_info)) 159 { 160 log_assert(0); 161 return 0; 162 } 163 164 void libworker_handle_control_cmd(struct tube* ATTR_UNUSED(tube), 165 uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len), 166 int ATTR_UNUSED(error), void* ATTR_UNUSED(arg)) 167 { 168 log_assert(0); 169 } 170 171 void libworker_fg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode), 172 struct sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s), 173 char* ATTR_UNUSED(why_bogus)) 174 { 175 log_assert(0); 176 } 177 178 void libworker_bg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode), 179 struct sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s), 180 char* ATTR_UNUSED(why_bogus)) 181 { 182 log_assert(0); 183 } 184 185 void libworker_event_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode), 186 struct sldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s), 187 char* ATTR_UNUSED(why_bogus)) 188 { 189 log_assert(0); 190 } 191 192 int context_query_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b)) 193 { 194 log_assert(0); 195 return 0; 196 } 197 198 void worker_stat_timer_cb(void* ATTR_UNUSED(arg)) 199 { 200 log_assert(0); 201 } 202 203 void worker_probe_timer_cb(void* ATTR_UNUSED(arg)) 204 { 205 log_assert(0); 206 } 207 208 void worker_start_accept(void* ATTR_UNUSED(arg)) 209 { 210 log_assert(0); 211 } 212 213 void worker_stop_accept(void* ATTR_UNUSED(arg)) 214 { 215 log_assert(0); 216 } 217 218 /** keep track of lock id in lock-verify application */ 219 struct order_id { 220 /** the thread id that created it */ 221 int thr; 222 /** the instance number of creation */ 223 int instance; 224 }; 225 226 int order_lock_cmp(const void* e1, const void* e2) 227 { 228 const struct order_id* o1 = e1; 229 const struct order_id* o2 = e2; 230 if(o1->thr < o2->thr) return -1; 231 if(o1->thr > o2->thr) return 1; 232 if(o1->instance < o2->instance) return -1; 233 if(o1->instance > o2->instance) return 1; 234 return 0; 235 } 236 237 int 238 codeline_cmp(const void* a, const void* b) 239 { 240 return strcmp(a, b); 241 } 242 243 int replay_var_compare(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b)) 244 { 245 log_assert(0); 246 return 0; 247 } 248 249 void remote_get_opt_ssl(char* ATTR_UNUSED(str), void* ATTR_UNUSED(arg)) 250 { 251 log_assert(0); 252 } 253