|
unbound
0.1
|
Main program to start the DNS resolver daemon. More...
#include "config.h"#include <sys/time.h>#include "util/log.h"#include "daemon/daemon.h"#include "daemon/remote.h"#include "util/config_file.h"#include "util/storage/slabhash.h"#include "services/listen_dnsport.h"#include "services/cache/rrset.h"#include "services/cache/infra.h"#include "util/fptr_wlist.h"#include "util/data/msgreply.h"#include "util/module.h"#include "util/net_help.h"#include "util/ub_event.h"#include <signal.h>#include <fcntl.h>#include <openssl/crypto.h>Functions | |
| static void | usage (void) |
| print usage. More... | |
| int | replay_var_compare (const void *ATTR_UNUSED(a), const void *ATTR_UNUSED(b)) |
| static void | checkrlimits (struct config_file *cfg) |
| check file descriptor count | |
| static void | log_ident_set_fromdefault (struct config_file *cfg, const char *log_default_identity) |
| set default logfile identity based on value from argv[0] at startup | |
| static void | apply_settings (struct daemon *daemon, struct config_file *cfg, int cmdline_verbose, int debug_mode, const char *log_default_identity) |
| set verbosity, check rlimits, cache settings | |
| static void | detach (void) |
| detach from command line | |
| static void | perform_setup (struct daemon *daemon, struct config_file *cfg, int debug_mode, const char **cfgfile, int need_pidfile) |
| daemonize, drop user privileges and chroot if needed | |
| static void | run_daemon (const char *cfgfile, int cmdline_verbose, int debug_mode, const char *log_default_identity, int need_pidfile) |
| Run the daemon. More... | |
| int | main (int argc, char *argv[]) |
| main program. More... | |
Variables | |
| int | optind |
| getopt global, in case header files fail to declare it. More... | |
| char * | optarg |
| getopt global, in case header files fail to declare it. More... | |
Main program to start the DNS resolver daemon.
|
static |
print usage.
References module_list_avail(), ub_default_event_base(), ub_event_base_free(), and ub_get_event_sys().
Referenced by main().
|
static |
Run the daemon.
| cfgfile | the config file name. |
| cmdline_verbose | verbosity resulting from commandline -v. These increase verbosity as specified in the config file. |
| debug_mode | if set, do not daemonize. |
| log_default_identity | Default identity to report in logs |
| need_pidfile | if false, no pidfile is checked or created. |
References daemon_init().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
main program.
Set options given commandline arguments.
| argc | number of commandline arguments. |
| argv | array of commandline arguments. |
References log_ident_set(), log_init(), optarg, optind, usage(), and verbosity.
| int optind |
getopt global, in case header files fail to declare it.
Referenced by main().
| char* optarg |
getopt global, in case header files fail to declare it.
Referenced by main().
1.8.13