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 LIMITED 25 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * 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 "util/log.h" 45 #include "services/mesh.h" 46 struct comm_reply; 47 struct comm_point; 48 struct module_qstate; 49 struct tube; 50 51 void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube), 52 uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len), 53 int ATTR_UNUSED(error), void* ATTR_UNUSED(arg)) 54 { 55 log_assert(0); 56 } 57 58 int worker_handle_request(struct comm_point* ATTR_UNUSED(c), 59 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 60 struct comm_reply* ATTR_UNUSED(repinfo)) 61 { 62 log_assert(0); 63 return 0; 64 } 65 66 int worker_handle_reply(struct comm_point* ATTR_UNUSED(c), 67 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 68 struct comm_reply* ATTR_UNUSED(reply_info)) 69 { 70 log_assert(0); 71 return 0; 72 } 73 74 int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), 75 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 76 struct comm_reply* ATTR_UNUSED(reply_info)) 77 { 78 log_assert(0); 79 return 0; 80 } 81 82 int remote_accept_callback(struct comm_point* ATTR_UNUSED(c), 83 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 84 struct comm_reply* ATTR_UNUSED(repinfo)) 85 { 86 log_assert(0); 87 return 0; 88 } 89 90 int remote_control_callback(struct comm_point* ATTR_UNUSED(c), 91 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 92 struct comm_reply* ATTR_UNUSED(repinfo)) 93 { 94 log_assert(0); 95 return 0; 96 } 97 98 void worker_sighandler(int ATTR_UNUSED(sig), void* ATTR_UNUSED(arg)) 99 { 100 log_assert(0); 101 } 102 103 struct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname), 104 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype), 105 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), 106 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), 107 struct sockaddr_storage* ATTR_UNUSED(addr), 108 socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q)) 109 { 110 log_assert(0); 111 return 0; 112 } 113 114 #ifdef UB_ON_WINDOWS 115 void 116 worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev), void* 117 ATTR_UNUSED(arg)) { 118 log_assert(0); 119 } 120 121 void 122 wsvc_cron_cb(void* ATTR_UNUSED(arg)) 123 { 124 log_assert(0); 125 } 126 #endif /* UB_ON_WINDOWS */ 127 128 void 129 worker_alloc_cleanup(void* ATTR_UNUSED(arg)) 130 { 131 log_assert(0); 132 } 133 134 struct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname), 135 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype), 136 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags), 137 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec), 138 struct sockaddr_storage* ATTR_UNUSED(addr), 139 socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q)) 140 { 141 log_assert(0); 142 return 0; 143 } 144 145 int libworker_handle_reply(struct comm_point* ATTR_UNUSED(c), 146 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 147 struct comm_reply* ATTR_UNUSED(reply_info)) 148 { 149 log_assert(0); 150 return 0; 151 } 152 153 int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), 154 void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), 155 struct comm_reply* ATTR_UNUSED(reply_info)) 156 { 157 log_assert(0); 158 return 0; 159 } 160 161 void libworker_handle_control_cmd(struct tube* ATTR_UNUSED(tube), 162 uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len), 163 int ATTR_UNUSED(error), void* ATTR_UNUSED(arg)) 164 { 165 log_assert(0); 166 } 167 168 void libworker_fg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode), 169 ldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s), 170 char* ATTR_UNUSED(why_bogus)) 171 { 172 log_assert(0); 173 } 174 175 void libworker_bg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode), 176 ldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s), 177 char* ATTR_UNUSED(why_bogus)) 178 { 179 log_assert(0); 180 } 181 182 int context_query_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b)) 183 { 184 log_assert(0); 185 return 0; 186 } 187 188 void worker_stat_timer_cb(void* ATTR_UNUSED(arg)) 189 { 190 log_assert(0); 191 } 192 193 void worker_probe_timer_cb(void* ATTR_UNUSED(arg)) 194 { 195 log_assert(0); 196 } 197 198 void worker_start_accept(void* ATTR_UNUSED(arg)) 199 { 200 log_assert(0); 201 } 202 203 void worker_stop_accept(void* ATTR_UNUSED(arg)) 204 { 205 log_assert(0); 206 } 207 208 /** keep track of lock id in lock-verify application */ 209 struct order_id { 210 /** the thread id that created it */ 211 int thr; 212 /** the instance number of creation */ 213 int instance; 214 }; 215 216 int order_lock_cmp(const void* e1, const void* e2) 217 { 218 struct order_id* o1 = (struct order_id*)e1; 219 struct order_id* o2 = (struct order_id*)e2; 220 if(o1->thr < o2->thr) return -1; 221 if(o1->thr > o2->thr) return 1; 222 if(o1->instance < o2->instance) return -1; 223 if(o1->instance > o2->instance) return 1; 224 return 0; 225 } 226 227 int 228 codeline_cmp(const void* a, const void* b) 229 { 230 return strcmp((const char*)a, (const char*)b); 231 } 232 233 int replay_var_compare(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b)) 234 { 235 log_assert(0); 236 return 0; 237 } 238 239 void remote_get_opt_ssl(char* ATTR_UNUSED(str), void* ATTR_UNUSED(arg)) 240 { 241 log_assert(0); 242 } 243