|
unbound 0.1
|
This file contains functions to integrate with the windows services API. More...
Macros | |
| #define | SERVICE_NAME "unbound" |
| service name for unbound (internal to ServiceManager) | |
| #define | MSG_GENERIC_SUCCESS ((DWORD)0x20010001L) |
| from gen_msg.h - success message record for windows message log | |
| #define | MSG_GENERIC_INFO ((DWORD)0x60010002L) |
| from gen_msg.h - informational message record for windows message log | |
| #define | MSG_GENERIC_WARN ((DWORD)0xA0010003L) |
| from gen_msg.h - warning message record for windows message log | |
| #define | MSG_GENERIC_ERR ((DWORD)0xE0010004L) |
| from gen_msg.h - error message record for windows message log | |
Functions | |
| void | wsvc_command_option (const char *wopt, const char *cfgfile, int v, int c) |
| Handle commandline service for windows. | |
| void | wsvc_setup_worker (struct worker *worker) |
| Setup lead worker events. | |
| void | wsvc_desetup_worker (struct worker *worker) |
| Desetup lead worker events. | |
| void | worker_win_stop_cb (int fd, short ev, void *arg) |
| windows worker stop event callback handler | |
| void | wsvc_cron_cb (void *arg) |
| windows cron timer callback handler | |
This file contains functions to integrate with the windows services API.
This means it handles the commandline switches to install and remove the service (via CreateService and DeleteService), it handles the ServiceMain() main service entry point when started as a service, and it handles the Handler[_ex]() to process requests to the service (such as start and stop and status).
| #define SERVICE_NAME "unbound" |
service name for unbound (internal to ServiceManager)
Referenced by event_reg_install(), event_reg_remove(), log_vmsg(), reportev(), service_main(), service_start(), wsvc_install(), wsvc_rc_start(), wsvc_rc_stop(), and wsvc_remove().
| #define MSG_GENERIC_SUCCESS ((DWORD)0x20010001L) |
from gen_msg.h - success message record for windows message log
Referenced by log_vmsg().
| #define MSG_GENERIC_INFO ((DWORD)0x60010002L) |
from gen_msg.h - informational message record for windows message log
Referenced by log_vmsg().
| #define MSG_GENERIC_WARN ((DWORD)0xA0010003L) |
from gen_msg.h - warning message record for windows message log
Referenced by log_vmsg().
| #define MSG_GENERIC_ERR ((DWORD)0xE0010004L) |
from gen_msg.h - error message record for windows message log
Referenced by log_vmsg(), and reportev().
| void wsvc_command_option | ( | const char * | wopt, |
| const char * | cfgfile, | ||
| int | v, | ||
| int | c ) |
Handle commandline service for windows.
| wopt | windows option string (install, remove, service). |
| cfgfile | configfile to open (default or passed with -c). |
| v | amount of commandline verbosity added with -v. |
| c | true if cfgfile was set by commandline -c option. |
References daemon::cfgfile, fatal_exit(), service_start(), wsvc_command_option(), wsvc_install(), wsvc_rc_start(), wsvc_rc_stop(), and wsvc_remove().
Referenced by main(), and wsvc_command_option().
| void wsvc_setup_worker | ( | struct worker * | worker | ) |
Setup lead worker events.
| worker | the worker |
References worker::base, comm_timer_create(), fatal_exit(), service_cron, service_stop_ev, service_stop_event, set_cron_timer(), ub_winsock_register_wsaevent(), worker_win_stop_cb(), wsvc_cron_cb(), and wsvc_setup_worker().
Referenced by worker_init(), and wsvc_setup_worker().
| void wsvc_desetup_worker | ( | struct worker * | worker | ) |
Desetup lead worker events.
| worker | the worker |
References comm_timer_delete(), service_cron, and wsvc_desetup_worker().
Referenced by worker_delete(), and wsvc_desetup_worker().
| void worker_win_stop_cb | ( | int | fd, |
| short | ev, | ||
| void * | arg ) |
windows worker stop event callback handler
References worker::base, comm_base_exit(), worker::need_to_exit, VERB_QUERY, verbose(), and worker_win_stop_cb().
Referenced by fptr_whitelist_event(), worker_win_stop_cb(), and wsvc_setup_worker().
| void wsvc_cron_cb | ( | void * | arg | ) |
windows cron timer callback handler
References cron_thread, set_cron_timer(), VERB_ALGO, verbose(), win_do_cron(), and wsvc_cron_cb().
Referenced by fptr_whitelist_comm_timer(), wsvc_cron_cb(), and wsvc_setup_worker().