Back to index

natlog  0.91.0
Public Types | Static Public Member Functions | Private Attributes | Static Private Attributes
Options Struct Reference

#include <options.h>

Collaboration diagram for Options:
Collaboration graph

List of all members.

Public Types

enum  Time { RAW, UTC, LT }
enum  ExitStatus { OK, FAILED }

Static Public Member Functions

static Optionsinstance ()

Private Attributes

FBB::ArgConfig & d_arg
bool d_daemon
bool d_stdout
bool d_useSyslog
bool d_verbose
bool d_warnings
< std::string, Time >
std::string d_conntrackPath
std::string d_syslogTag
std::string d_PIDfile
std::string d_timeSpecError
std::string d_syslogPriorityError
std::string d_syslogFacilityError
< std::string, FBB::Facility >
< std::string, FBB::Priority >

Static Private Attributes

static char const s_defaultConfigPath [] = "/etc/natlog.conf"
static char const s_defaultConntrackPath [] = "/usr/sbin/conntrack"
static char const s_defaultSyslogIdent [] = "NATLOG"
static char const s_defaultSyslogFacility [] = "DAEMON"
static char const s_defaultSyslogPriority [] = "NOTICE"
static char const s_defaultPIDfile [] = "/var/run/"
static std::unordered_map
< std::string, Time > const 
static std::unordered_map
< std::string, FBB::Facility >
static std::unordered_map
< std::string, FBB::Priority >
static Optionss_options = 0

Detailed Description

Definition at line 10 of file options.h.

Member Enumeration Documentation


Definition at line 19 of file options.h.


Definition at line 12 of file options.h.


Member Function Documentation

Options & Options::instance ( ) [static]

Definition at line 3 of file

    if (s_options == 0)
        s_options = new Options;  
                                    // yes, it exists until the program ends
                                    // and memory is claimed back by the
                                    // operaring system
    return *s_options;

Here is the caller graph for this function:

Member Data Documentation

FBB::ArgConfig& Options::d_arg [private]

Definition at line 26 of file options.h.

std::string Options::d_conntrackPath [private]

Definition at line 36 of file options.h.

bool Options::d_daemon [private]

Definition at line 28 of file options.h.

std::string Options::d_PIDfile [private]

Definition at line 38 of file options.h.

bool Options::d_stdout [private]

Definition at line 29 of file options.h.

std::unordered_map<std::string, FBB::Facility>::const_iterator Options::d_syslogFacility [private]

Definition at line 44 of file options.h.

std::string Options::d_syslogFacilityError [private]

Definition at line 41 of file options.h.

std::unordered_map<std::string, FBB::Priority>::const_iterator Options::d_syslogPriority [private]

Definition at line 46 of file options.h.

std::string Options::d_syslogPriorityError [private]

Definition at line 40 of file options.h.

std::string Options::d_syslogTag [private]

Definition at line 37 of file options.h.

std::unordered_map<std::string, Time>::const_iterator Options::d_time [private]

Definition at line 34 of file options.h.

std::string Options::d_timeSpecError [private]

Definition at line 39 of file options.h.

bool Options::d_useSyslog [private]

Definition at line 30 of file options.h.

bool Options::d_verbose [private]

Definition at line 31 of file options.h.

bool Options::d_warnings [private]

Definition at line 32 of file options.h.

char const Options::s_defaultConfigPath = "/etc/natlog.conf" [static, private]

Definition at line 50 of file options.h.

char const Options::s_defaultConntrackPath = "/usr/sbin/conntrack" [static, private]

Definition at line 51 of file options.h.

char const Options::s_defaultPIDfile = "/var/run/" [static, private]

Definition at line 55 of file options.h.

char const Options::s_defaultSyslogFacility = "DAEMON" [static, private]

Definition at line 53 of file options.h.

char const Options::s_defaultSyslogIdent = "NATLOG" [static, private]

Definition at line 52 of file options.h.

char const Options::s_defaultSyslogPriority = "NOTICE" [static, private]

Definition at line 54 of file options.h.

Options * Options::s_options = 0 [static, private]

Definition at line 63 of file options.h.

unordered_map< string, Facility > const Options::s_syslogFacilities [static, private]
Initial value:
        {"DAEMON", Facility::DAEMON}, 
        {"LOCAL0", Facility::LOCAL0},
        {"LOCAL1", Facility::LOCAL1},
        {"LOCAL2", Facility::LOCAL2},
        {"LOCAL3", Facility::LOCAL3},
        {"LOCAL4", Facility::LOCAL4},
        {"LOCAL5", Facility::LOCAL5},
        {"LOCAL6", Facility::LOCAL6},
        {"LOCAL7", Facility::LOCAL7},
        {"USER",   Facility::USER}

Definition at line 59 of file options.h.

unordered_map< string, Priority > const Options::s_syslogPriorities [static, private]
Initial value:
       {"EMERG",    Priority::EMERG},
       {"ALERT",    Priority::ALERT},
       {"CRIT",     Priority::CRIT},
       {"ERR",      Priority::ERR},
       {"WARNING",  Priority::WARNING},
       {"NOTICE",   Priority::NOTICE},
       {"INFO",     Priority::INFO},
       {"DEBUG",    Priority::DEBUG}

Definition at line 61 of file options.h.

unordered_map< string, Options::Time > const Options::s_time [static, private]
Initial value:
        {"raw",     RAW},
        {"utc",     UTC},
        {"local",   LT},

Definition at line 57 of file options.h.

The documentation for this struct was generated from the following files: