}
/** delete the tap structure */
-void tap_data_free(struct tap_data* data)
+static void tap_data_free(struct tap_data* data)
{
ub_event_del(data->ev);
ub_event_free(data->ev);
struct tube;
struct query_info;
#include "util/data/packed_rrset.h"
+#include "daemon/worker.h"
+#include "daemon/remote.h"
+#include "util/fptr_wlist.h"
+#include "libunbound/context.h"
void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len),
missing prototype warnings.
- Merge PR #373 from fobser: Warning: arithmetic on a pointer to void
is a GNU extension.
+ - Fix missing prototypes in the code.
3 December 2020: Wouter
- make depend.
* module actions.
*/
#include "config.h"
+#include "dynlibmod/dynlibmod.h"
#include "util/module.h"
#include "util/config_file.h"
-#include "dynlibmod/dynlibmod.h"
#if HAVE_WINDOWS_H
#include <windows.h>
#define __DYNMOD HMODULE
#define __DYNSYM FARPROC
#define __LOADSYM GetProcAddress
-void log_dlerror() {
+static void log_dlerror() {
DWORD dwLastError = GetLastError();
LPSTR MessageBuffer;
DWORD dwBufferLength;
}
-HMODULE open_library(const char* fname) {
+static HMODULE open_library(const char* fname) {
return LoadLibrary(fname);
}
-void close_library(const char* fname, __DYNMOD handle) {
+static void close_library(const char* fname, __DYNMOD handle) {
(void)fname;
(void)handle;
}
#define __DYNMOD void*
#define __DYNSYM void*
#define __LOADSYM dlsym
-void log_dlerror() {
+static void log_dlerror() {
log_err("dynlibmod: %s", dlerror());
}
-void* open_library(const char* fname) {
+static void* open_library(const char* fname) {
return dlopen(fname, RTLD_LAZY | RTLD_GLOBAL);
}
-void close_library(const char* fname, __DYNMOD handle) {
+static void close_library(const char* fname, __DYNMOD handle) {
if(!handle) return;
if(dlclose(handle) != 0) {
log_err("dlclose %s: %s", fname, strerror(errno));
#include "iterator/iter_hints.h"
#include "sldns/sbuffer.h"
#include "sldns/str2wire.h"
+#ifdef USE_DNSTAP
+#include "dnstap/dtstream.h"
+#endif
#ifdef HAVE_TARGETCONDITIONALS_H
#include <TargetConditionals.h>
* conversions.
*/
#include "config.h"
+#include "pythonmod/pythonmod_utils.h"
#include "util/module.h"
#include "util/netevent.h"
#include "util/net_help.h"
#include "util/module.h"
struct delegpt_addr;
+struct sldns_buffer;
/**
* Store the reply_info and query_info pair in message cache (qstate->msg_cache)
* @param pkt: a sldns_buffer which contains sldns_packet data
* @return 0 on failure, out of memory or parse error.
*/
-int createResponse(struct module_qstate* qstate, sldns_buffer* pkt);
+int createResponse(struct module_qstate* qstate, struct sldns_buffer* pkt);
/**
* Convert reply->addr to string
}
}
-nghttp2_session_callbacks* http2_req_callbacks_create()
+nghttp2_session_callbacks* http2_req_callbacks_create(void)
{
nghttp2_session_callbacks *callbacks;
if(nghttp2_session_callbacks_new(&callbacks) == NGHTTP2_ERR_NOMEM) {
* Create nghttp2 callbacks to handle HTTP2 requests.
* @return malloc'ed struct, NULL on failure
*/
-nghttp2_session_callbacks* http2_req_callbacks_create();
+nghttp2_session_callbacks* http2_req_callbacks_create(void);
/** Free http2 stream buffers and decrease buffer counters */
void http2_req_stream_clear(struct http2_stream* h2_stream);
#include "util/fptr_wlist.h"
#include "util/log.h"
#include "services/mesh.h"
+#ifdef USE_DNSTAP
+#include "dnstap/dtstream.h"
+#endif
void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len),
#include "sldns/sbuffer.h"
#include "sldns/wire2str.h"
#include "sldns/str2wire.h"
+#include "daemon/remote.h"
#include <signal.h>
struct worker;
struct daemon_remote;
#ifdef HAVE_TIME_H
# include <time.h>
#endif
+#include <ctype.h>
#include "testcode/testpkts.h"
#include "testcode/replay.h"
#include "testcode/fake_event.h"
#include "daemon/remote.h"
+#include "libunbound/worker.h"
#include "util/config_file.h"
#include "sldns/keyraw.h"
-#include <ctype.h>
+#ifdef UB_ON_WINDOWS
+#include "winrc/win_svc.h"
+#endif
/** signal that this is a testbound compile */
#define unbound_testbound 1
+/** renamed main routine */
+int daemon_main(int argc, char* argv[]);
/**
* include the main program from the unbound daemon.
* rename main to daemon_main to call it
}
/** remove config file at exit */
-void remove_configfile(void)
+static void remove_configfile(void)
{
struct config_strlist* p;
for(p=cfgfiles; p; p=p->next)
log_assert(0);
}
+#ifdef UB_ON_WINDOWS
void wsvc_command_option(const char* ATTR_UNUSED(wopt),
const char* ATTR_UNUSED(cfgfile), int ATTR_UNUSED(v),
int ATTR_UNUSED(c))
{
log_assert(0);
}
+#endif
+#ifdef UB_ON_WINDOWS
void wsvc_setup_worker(struct worker* ATTR_UNUSED(worker))
{
/* do nothing */
}
+#endif
+#ifdef UB_ON_WINDOWS
void wsvc_desetup_worker(struct worker* ATTR_UNUSED(worker))
{
/* do nothing */
}
+#endif
#ifdef UB_ON_WINDOWS
void worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev),