#ifndef __PLB_P_H__ #define __PLB_P_H__ 1 #define PLB_CONFIG_FILE "/etc/plb.conf" static const char *config_file = PLB_CONFIG_FILE; static const char *cfg_listen_ip = "0.0.0.0"; static const char *cfg_listen_port = "80"; static const char *cfg_bind_ipv6 = "0"; static const char *cfg_protocol = "HTTP"; static const char *cfg_servers_ip = ""; static const char *cfg_servers_port = "80"; static const char *cfg_user = "nobody"; static const char *cfg_group = "nobody"; static const char *cfg_chroot_dir = "/var/empty"; static const char *cfg_timeout_header_client_read; static const char *cfg_timeout_header_client_write; static const char *cfg_timeout_header_server_read; static const char *cfg_timeout_header_server_write; static const char *cfg_timeout_forward_client_read; static const char *cfg_timeout_forward_client_write; static const char *cfg_timeout_forward_server_read; static const char *cfg_timeout_forward_server_write; static const char *cfg_timeout_cleanup; static const char *cfg_server_retry; static const char *cfg_max_clients; static const char *cfg_backlog; static const char *cfg_log_file; static const char *cfg_log_level; static const char *cfg_pid_file = "/var/run/plb.pid"; static ConfigKeywords plb_config_keywords[] = { { "listen_ip", &cfg_listen_ip }, { "listen_port", &cfg_listen_port }, { "protocol", &cfg_protocol }, { "bind_ipv6", &cfg_bind_ipv6 }, { "servers_ip", &cfg_servers_ip }, { "servers_port", &cfg_servers_port }, { "user", &cfg_user }, { "group", &cfg_group }, { "chroot_dir", &cfg_chroot_dir }, { "timeout_header_client_read", &cfg_timeout_header_client_read }, { "timeout_header_client_write", &cfg_timeout_header_client_write }, { "timeout_header_server_read", &cfg_timeout_header_server_read }, { "timeout_header_server_write", &cfg_timeout_header_server_write }, { "timeout_forward_client_read", &cfg_timeout_forward_client_read }, { "timeout_forward_client_write", &cfg_timeout_forward_client_write }, { "timeout_forward_server_read", &cfg_timeout_forward_server_read }, { "timeout_forward_server_write", &cfg_timeout_forward_server_write }, { "timeout_cleanup", &cfg_timeout_cleanup }, { "server_retry", &cfg_server_retry }, { "max_clients", &cfg_max_clients }, { "backlog", &cfg_backlog }, { "log_level", &cfg_log_level }, { "log_file", &cfg_log_file }, { "pid_file", &cfg_pid_file } }; static const char *GETOPT_OPTIONS = "Bc:d:g:hl:v"; static struct option long_options[] = { { "daemonize", 0, NULL, 'B' }, { "config", 1, NULL, 'c' }, { "loglevel", 1, NULL, 'd' }, { "pidfile", 1, NULL, 'g' }, { "logfile", 1, NULL, 'l' }, { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'v' }, { NULL, 0, NULL, 0 } }; extern int event_gotsig; extern int (*event_sigcb)(void); #endif