Go to the source code of this file.
Defines | |
#define | VF_VERSION "0.3.3" |
#define | VF_READ_BUFSIZE 1024 |
#define | VF_DEFAULT_HOST "localhost" |
#define | VF_DEFAULT_PORT 25 |
#define | VF_DEFAULT_LOGFILE "/var/log/veldfire.log" |
#define | VF_DEFAULT_LOGLEVEL 3 |
#define | VF_DEFAULT_CONFIGFILE "/etc/veldfire/veldfire.conf" |
#define | VF_DEFAULT_SECTION "veldfire" |
#define | VF_DEFAULT_TIMEOUT 60 |
#define | VF_DEFAULT_MAXCONNECTION 128 |
#define | VF_USER_CONFIGFILE ".veldfirerc" |
#define | VF_ENV_FROM "VELDFIRE_FROM" |
#define | VF_ENV_SUBJECT "VELDFIRE_SUBJECT" |
#define | VF_ENV_HOST "VELDFIRE_HOST" |
#define | VF_ENV_PORT "VELDFIRE_PORT" |
#define | VF_ENV_LOGFILE "VELDFIRE_LOGFILE" |
#define | VF_ENV_LOGLEVEL "VELDFIRE_LOGLEVEL" |
#define | VF_ENV_CONFIGFILE "VELDFIRE_CONFIGFILE" |
#define | VF_ENV_SECTION "VELDFIRE_SECTION" |
#define | VF_ENV_REPORT "VELDFIRE_REPORT" |
#define | VF_ENV_SENDTIMEOUT "VELDFIRE_SENDTIMEOUT" |
#define | VF_ENV_RECVTIMEOUT "VELDFIRE_RECVTIMEOUT" |
#define | VF_ENV_TIMEOUT "VELDFIRE_TIMEOUT" |
#define | VF_ENV_MAXCONNECTION "VELDFIRE_MAXCONNECTION" |
#define | VF_ENV_FOREGROUND "VELDFIRE_FOREGROUND" |
#define | VF_ENV_PRINTLOG "VELDFIRE_PRINTLOG" |
#define | VF_CONF_TO "to" |
#define | VF_CONF_FROM "from" |
#define | VF_CONF_SUBJECT "subject" |
#define | VF_CONF_HOST "host" |
#define | VF_CONF_PORT "port" |
#define | VF_CONF_LOGFILE "logfile" |
#define | VF_CONF_LOGLEVEL "loglevel" |
#define | VF_CONF_REPORT "report" |
#define | VF_CONF_MAXCONNECTION "maxconnection" |
#define | VF_CONF_SENDTIMEOUT "sendtimeout" |
#define | VF_CONF_RECVTIMEOUT "recvtimeout" |
#define | VF_CONF_TIMEOUT "timeout" |
#define | VF_CONF_BULK "bulk" |
#define | VF_CONF_NOMESSAGE "nomessage" |
#define | VF_CONF_DEBUG "debug" |
#define | VF_CONF_FOREGROUND "foreground" |
#define | VF_CONF_HEADER "header" |
#define | VF_CONF_PRINTLOG "printlog" |
#define | VF_USERAGENT "User-Agent: Veldfire-" VF_VERSION |
Functions | |
veldfire * | __veldfire_init (void) |
Obtain a veldfire structure in memory. | |
void | __veldfire_defaults (veldfire *v) |
Set default values. | |
void | __veldfire_env (veldfire *v) |
Read environment variables. | |
void | __veldfire_configfile (veldfire *v) |
Read values from the configuration file. | |
void | __veldfire_commandline (veldfire *v, int ac, char *av[]) |
Read the command line options. | |
char ** | __veldfire_add_header (veldfire *v, char *header) |
Add a header to our array. | |
void | __veldfire_cleanup (veldfire *v) |
Free all allocated memory. | |
veldfire * | VF__init (int ac, char *av[]) |
Initialise a veldfire data structure. | |
void | VF__cleanup (veldfire *v) |
Release resources. | |
void | VF__version (veldfire *v) |
Print a version information string. | |
void | VF__help (veldfire *v) |
Usage message printed to standard out. | |
int | VF__check_config (veldfire *v) |
Check the configuration for sanity. | |
char * | VF__get_msg (veldfire *v) |
Get the email message, either via the terminal or via stdin (eg pipe). |
Definition in file init.c.
|
Read buffer increment Definition at line 39 of file init.c. Referenced by VF__get_msg(). |
|
User configuration file Definition at line 53 of file init.c. Referenced by __veldfire_defaults(). |
|
User Agent Header Definition at line 96 of file init.c. Referenced by __veldfire_defaults(). |
|
Official Veldfire Version Number Definition at line 38 of file init.c. Referenced by VF__version(). |
|
Add a header to our array.
Definition at line 431 of file init.c. References _veldfire::headers. Referenced by __veldfire_configfile(), and __veldfire_defaults(). |
|
Free all allocated memory.
Definition at line 534 of file init.c. References _veldfire::c, _veldfire::freemsg, _veldfire::headers, _veldfire::log, and _veldfire::msg. Referenced by VF__cleanup(), VF__help(), VF__init(), and VF__version(). |
|
Read the command line options.
Definition at line 365 of file init.c. References _veldfire::prog, and VF__help(). Referenced by VF__init(). Here is the call graph for this function: ![]() |
|
Read values from the configuration file.
Definition at line 256 of file init.c. References __veldfire_add_header(), _veldfire::bulk, _veldfire::c, _veldfire::configfile, _veldfire::debug, _veldfire::foreground, _veldfire::from, _veldfire::host, _veldfire::logfile, _veldfire::loglevel, _veldfire::maxconnection, _veldfire::nomessage, _veldfire::port, _veldfire::printlog, _veldfire::recvtimeout, _veldfire::report, _veldfire::section, _veldfire::sendtimeout, _veldfire::subject, _veldfire::to, VF_CONF_BULK, VF_CONF_DEBUG, VF_CONF_FOREGROUND, VF_CONF_FROM, VF_CONF_HEADER, VF_CONF_HOST, VF_CONF_LOGFILE, VF_CONF_LOGLEVEL, VF_CONF_MAXCONNECTION, VF_CONF_NOMESSAGE, VF_CONF_PORT, VF_CONF_PRINTLOG, VF_CONF_RECVTIMEOUT, VF_CONF_REPORT, VF_CONF_SENDTIMEOUT, VF_CONF_SUBJECT, VF_CONF_TIMEOUT, and VF_CONF_TO. Referenced by VF__init(). Here is the call graph for this function: ![]() |
|
Set default values.
Definition at line 173 of file init.c. References __veldfire_add_header(), _veldfire::configfile, _veldfire::host, _veldfire::logfile, _veldfire::loglevel, _veldfire::maxconnection, _veldfire::port, _veldfire::recvtimeout, _veldfire::section, _veldfire::sendtimeout, VF_DEFAULT_CONFIGFILE, VF_DEFAULT_HOST, VF_DEFAULT_LOGFILE, VF_DEFAULT_LOGLEVEL, VF_DEFAULT_MAXCONNECTION, VF_DEFAULT_PORT, VF_DEFAULT_SECTION, VF_DEFAULT_TIMEOUT, VF_USER_CONFIGFILE, and VF_USERAGENT. Referenced by VF__init(). Here is the call graph for this function: ![]() |
|
Read environment variables.
Definition at line 225 of file init.c. References _veldfire::configfile, _veldfire::foreground, _veldfire::from, _veldfire::host, _veldfire::logfile, _veldfire::loglevel, _veldfire::maxconnection, _veldfire::port, _veldfire::printlog, _veldfire::recvtimeout, _veldfire::report, _veldfire::section, _veldfire::sendtimeout, _veldfire::subject, VF_ENV_CONFIGFILE, VF_ENV_FOREGROUND, VF_ENV_FROM, VF_ENV_HOST, VF_ENV_LOGFILE, VF_ENV_LOGLEVEL, VF_ENV_MAXCONNECTION, VF_ENV_PORT, VF_ENV_PRINTLOG, VF_ENV_RECVTIMEOUT, VF_ENV_REPORT, VF_ENV_SECTION, VF_ENV_SENDTIMEOUT, VF_ENV_SUBJECT, and VF_ENV_TIMEOUT. Referenced by VF__init(). |
|
Obtain a veldfire structure in memory.
Definition at line 155 of file init.c. Referenced by VF__init(). |
|
Check the configuration for sanity.
Definition at line 558 of file init.c. References _veldfire::files, _veldfire::to, and VF__help(). Referenced by VF__init(). Here is the call graph for this function: ![]() |
|
Release resources.
Definition at line 146 of file init.c. References __veldfire_cleanup(). Referenced by main(). Here is the call graph for this function: ![]() |
|
Get the email message, either via the terminal or via stdin (eg pipe).
Definition at line 613 of file init.c. References _veldfire::freemsg, _veldfire::nomessage, and VF_READ_BUFSIZE. Referenced by main(). |
|
Usage message printed to standard out.
Definition at line 488 of file init.c. References __veldfire_cleanup(), _veldfire::prog, VF_DEFAULT_CONFIGFILE, VF_DEFAULT_HOST, VF_DEFAULT_LOGFILE, VF_DEFAULT_LOGLEVEL, VF_DEFAULT_MAXCONNECTION, VF_DEFAULT_PORT, and VF_DEFAULT_SECTION. Referenced by __veldfire_commandline(), and VF__check_config(). Here is the call graph for this function: ![]() |
|
Initialise a veldfire data structure.
Definition at line 117 of file init.c. References __veldfire_cleanup(), __veldfire_commandline(), __veldfire_configfile(), __veldfire_defaults(), __veldfire_env(), __veldfire_init(), _veldfire::log, _veldfire::logfile, _veldfire::loglevel, _veldfire::printlog, and VF__check_config(). Referenced by main(). Here is the call graph for this function: ![]() |
|
Print a version information string.
Definition at line 475 of file init.c. References __veldfire_cleanup(), and VF_VERSION. Here is the call graph for this function: ![]() |